
void bufchain_consume(bufchain *ch,int len)

{
  int iVar1;
  bufchain_granule *pbVar2;
  int iVar3;
  
  iVar1 = ch->buffersize;
  if (iVar1 < len) {
    (*(code *)PTR___assert_fail_000796c0)
              (PTR_s_j_000790a8 + -0x1ab8,PTR_s_j_000790a8 + -0x1ac0,0x2c4,
               PTR_s_j_000790a8 + -0x1b34);
    return;
  }
  if (0 < len) {
    pbVar2 = ch->head;
    while( true ) {
      if (pbVar2 == (bufchain_granule *)0x0) {
        (*(code *)PTR___assert_fail_000796c0)
                  (PTR_s_j_000790a8 + -0x1aa0,PTR_s_j_000790a8 + -0x1ac0,0x2c7,
                   PTR_s_j_000790a8 + -0x1b34);
        return;
      }
      iVar3 = (int)pbVar2->bufend - (int)pbVar2->bufpos;
      if (len < iVar3) break;
      pbVar2 = pbVar2->next;
      ch->head = pbVar2;
      if (pbVar2 == (bufchain_granule *)0x0) {
        ch->tail = (bufchain_granule *)0x0;
      }
      len = len - iVar3;
      (*(code *)PTR_free_000797cc)();
      iVar1 = ch->buffersize - iVar3;
      ch->buffersize = iVar1;
      if (len == 0) {
        return;
      }
      pbVar2 = ch->head;
    }
    pbVar2->bufpos = pbVar2->bufpos + len;
    ch->buffersize = iVar1 - len;
  }
  return;
}



void bufchain_consume(int *param_1,int param_2)

{
  int iVar1;
  int *piVar2;
  int iVar3;
  
  iVar1 = param_1[2];
  if (iVar1 < param_2) {
    (*(code *)PTR___assert_fail_000796c0)
              (PTR_s_j_000790a8 + -0x1ab8,PTR_s_j_000790a8 + -0x1ac0,0x2c4,
               PTR_s_j_000790a8 + -0x1b34);
    return;
  }
  if (0 < param_2) {
    piVar2 = (int *)*param_1;
    while( true ) {
      if (piVar2 == (int *)0x0) {
        (*(code *)PTR___assert_fail_000796c0)
                  (PTR_s_j_000790a8 + -0x1aa0,PTR_s_j_000790a8 + -0x1ac0,0x2c7,
                   PTR_s_j_000790a8 + -0x1b34);
        return;
      }
      iVar3 = piVar2[2] - piVar2[1];
      if (param_2 < iVar3) break;
      iVar1 = *piVar2;
      *param_1 = iVar1;
      if (iVar1 == 0) {
        param_1[1] = 0;
      }
      param_2 = param_2 - iVar3;
      (*(code *)PTR_free_000797cc)();
      iVar1 = param_1[2] - iVar3;
      param_1[2] = iVar1;
      if (param_2 == 0) {
        return;
      }
      piVar2 = (int *)*param_1;
    }
    piVar2[1] = piVar2[1] + param_2;
    param_1[2] = iVar1 - param_2;
  }
  return;
}


lui gp,0x6
addiu gp,gp,0x4628
addu gp,gp,t9
addiu sp,sp,-0x28
lw v0,0x8(a0)
slt v1,v0,a1
sw gp,0x10(sp)
sw ra,0x24(sp)
sw s2,0x20(sp)
sw s1,0x1c(sp)
bne v1,zero,0x0001cb34
_sw s0,0x18(sp)
blez a1,0x0001caf4
_or s1,a1,zero
or s2,a0,zero
lw a0,0x0(a0)
bne a0,zero,0x0001cad0
_lw a3,-0x7fc8(gp)
b 0x0001cb18
_li a2,0x2c7
lw v0,0x0(a0)
beq v0,zero,0x0001cb0c
_sw v0,0x0(s2)
lw t9,-0x78a4(gp)
jalr t9
_subu s1,s1,s0
lw v0,0x8(s2)
lw gp,0x10(sp)
subu v0,v0,s0
beq s1,zero,0x0001caf4
_sw v0,0x8(s2)
lw a0,0x0(s2)
beq a0,zero,0x0001cb14
_lw a3,-0x7fc8(gp)
lw v1,0x4(a0)
lw s0,0x8(a0)
subu s0,s0,v1
slt a1,s1,s0
beq a1,zero,0x0001ca98
_addu v1,v1,s1
subu v0,v0,s1
sw v1,0x4(a0)
sw v0,0x8(s2)
lw ra,0x24(sp)
lw s2,0x20(sp)
lw s1,0x1c(sp)
lw s0,0x18(sp)
jr ra
_addiu sp,sp,0x28
b 0x0001caa4
_sw zero,0x4(s2)
li a2,0x2c7
lw a1,-0x7fc8(gp)
lw a0,-0x7fc8(gp)
lw t9,-0x79b0(gp)
addiu a3,a3,-0x1b34
addiu a1,a1,-0x1ac0
jalr t9
_addiu a0,a0,-0x1aa0
lw a3,-0x7fc8(gp)
li a2,0x2c4
lw a1,-0x7fc8(gp)
lw a0,-0x7fc8(gp)
lw t9,-0x79b0(gp)
addiu a3,a3,-0x1b34
addiu a1,a1,-0x1ac0
jalr t9
_addiu a0,a0,-0x1ab8
(translation_unit "void bufchain_consume(int *param_1,int param_2)\n\n{\n  int iVar1;\n  int *piVar2;\n  int iVar3;\n  \n  iVar1 = param_1[2];\n  if (iVar1 < param_2) {\n    (*(code *)PTR___assert_fail_000796c0)\n              (PTR_s_j_000790a8 + -0x1ab8,PTR_s_j_000790a8 + -0x1ac0,0x2c4,\n               PTR_s_j_000790a8 + -0x1b34);\n    return;\n  }\n  if (0 < param_2) {\n    piVar2 = (int *)*param_1;\n    while( true ) {\n      if (piVar2 == (int *)0x0) {\n        (*(code *)PTR___assert_fail_000796c0)\n                  (PTR_s_j_000790a8 + -0x1aa0,PTR_s_j_000790a8 + -0x1ac0,0x2c7,\n                   PTR_s_j_000790a8 + -0x1b34);\n        return;\n      }\n      iVar3 = piVar2[2] - piVar2[1];\n      if (param_2 < iVar3) break;\n      iVar1 = *piVar2;\n      *param_1 = iVar1;\n      if (iVar1 == 0) {\n        param_1[1] = 0;\n      }\n      param_2 = param_2 - iVar3;\n      (*(code *)PTR_free_000797cc)();\n      iVar1 = param_1[2] - iVar3;\n      param_1[2] = iVar1;\n      if (param_2 == 0) {\n        return;\n      }\n      piVar2 = (int *)*param_1;\n    }\n    piVar2[1] = piVar2[1] + param_2;\n    param_1[2] = iVar1 - param_2;\n  }\n  return;\n}\n\n" (function_definition "void bufchain_consume(int *param_1,int param_2)\n\n{\n  int iVar1;\n  int *piVar2;\n  int iVar3;\n  \n  iVar1 = param_1[2];\n  if (iVar1 < param_2) {\n    (*(code *)PTR___assert_fail_000796c0)\n              (PTR_s_j_000790a8 + -0x1ab8,PTR_s_j_000790a8 + -0x1ac0,0x2c4,\n               PTR_s_j_000790a8 + -0x1b34);\n    return;\n  }\n  if (0 < param_2) {\n    piVar2 = (int *)*param_1;\n    while( true ) {\n      if (piVar2 == (int *)0x0) {\n        (*(code *)PTR___assert_fail_000796c0)\n                  (PTR_s_j_000790a8 + -0x1aa0,PTR_s_j_000790a8 + -0x1ac0,0x2c7,\n                   PTR_s_j_000790a8 + -0x1b34);\n        return;\n      }\n      iVar3 = piVar2[2] - piVar2[1];\n      if (param_2 < iVar3) break;\n      iVar1 = *piVar2;\n      *param_1 = iVar1;\n      if (iVar1 == 0) {\n        param_1[1] = 0;\n      }\n      param_2 = param_2 - iVar3;\n      (*(code *)PTR_free_000797cc)();\n      iVar1 = param_1[2] - iVar3;\n      param_1[2] = iVar1;\n      if (param_2 == 0) {\n        return;\n      }\n      piVar2 = (int *)*param_1;\n    }\n    piVar2[1] = piVar2[1] + param_2;\n    param_1[2] = iVar1 - param_2;\n  }\n  return;\n}" primitive_type (function_declarator "bufchain_consume(int *param_1,int param_2)" identifier (parameter_list "(int *param_1,int param_2)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int param_2" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  int *piVar2;\n  int iVar3;\n  \n  iVar1 = param_1[2];\n  if (iVar1 < param_2) {\n    (*(code *)PTR___assert_fail_000796c0)\n              (PTR_s_j_000790a8 + -0x1ab8,PTR_s_j_000790a8 + -0x1ac0,0x2c4,\n               PTR_s_j_000790a8 + -0x1b34);\n    return;\n  }\n  if (0 < param_2) {\n    piVar2 = (int *)*param_1;\n    while( true ) {\n      if (piVar2 == (int *)0x0) {\n        (*(code *)PTR___assert_fail_000796c0)\n                  (PTR_s_j_000790a8 + -0x1aa0,PTR_s_j_000790a8 + -0x1ac0,0x2c7,\n                   PTR_s_j_000790a8 + -0x1b34);\n        return;\n      }\n      iVar3 = piVar2[2] - piVar2[1];\n      if (param_2 < iVar3) break;\n      iVar1 = *piVar2;\n      *param_1 = iVar1;\n      if (iVar1 == 0) {\n        param_1[1] = 0;\n      }\n      param_2 = param_2 - iVar3;\n      (*(code *)PTR_free_000797cc)();\n      iVar1 = param_1[2] - iVar3;\n      param_1[2] = iVar1;\n      if (param_2 == 0) {\n        return;\n      }\n      piVar2 = (int *)*param_1;\n    }\n    piVar2[1] = piVar2[1] + param_2;\n    param_1[2] = iVar1 - param_2;\n  }\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int *piVar2;" primitive_type (pointer_declarator "*piVar2" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (expression_statement "iVar1 = param_1[2];" (assignment_expression "iVar1 = param_1[2]" identifier = (subscript_expression "param_1[2]" identifier [ number_literal ])) ;) (if_statement "if (iVar1 < param_2) {\n    (*(code *)PTR___assert_fail_000796c0)\n              (PTR_s_j_000790a8 + -0x1ab8,PTR_s_j_000790a8 + -0x1ac0,0x2c4,\n               PTR_s_j_000790a8 + -0x1b34);\n    return;\n  }" if (parenthesized_expression "(iVar1 < param_2)" ( (binary_expression "iVar1 < param_2" identifier < identifier) )) (compound_statement "{\n    (*(code *)PTR___assert_fail_000796c0)\n              (PTR_s_j_000790a8 + -0x1ab8,PTR_s_j_000790a8 + -0x1ac0,0x2c4,\n               PTR_s_j_000790a8 + -0x1b34);\n    return;\n  }" { (expression_statement "(*(code *)PTR___assert_fail_000796c0)\n              (PTR_s_j_000790a8 + -0x1ab8,PTR_s_j_000790a8 + -0x1ac0,0x2c4,\n               PTR_s_j_000790a8 + -0x1b34);" (call_expression "(*(code *)PTR___assert_fail_000796c0)\n              (PTR_s_j_000790a8 + -0x1ab8,PTR_s_j_000790a8 + -0x1ac0,0x2c4,\n               PTR_s_j_000790a8 + -0x1b34)" (parenthesized_expression "(*(code *)PTR___assert_fail_000796c0)" ( (pointer_expression "*(code *)PTR___assert_fail_000796c0" * (cast_expression "(code *)PTR___assert_fail_000796c0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(PTR_s_j_000790a8 + -0x1ab8,PTR_s_j_000790a8 + -0x1ac0,0x2c4,\n               PTR_s_j_000790a8 + -0x1b34)" ( (binary_expression "PTR_s_j_000790a8 + -0x1ab8" identifier + number_literal) , (binary_expression "PTR_s_j_000790a8 + -0x1ac0" identifier + number_literal) , number_literal , (binary_expression "PTR_s_j_000790a8 + -0x1b34" identifier + number_literal) ))) ;) (return_statement "return;" return ;) })) (if_statement "if (0 < param_2) {\n    piVar2 = (int *)*param_1;\n    while( true ) {\n      if (piVar2 == (int *)0x0) {\n        (*(code *)PTR___assert_fail_000796c0)\n                  (PTR_s_j_000790a8 + -0x1aa0,PTR_s_j_000790a8 + -0x1ac0,0x2c7,\n                   PTR_s_j_000790a8 + -0x1b34);\n        return;\n      }\n      iVar3 = piVar2[2] - piVar2[1];\n      if (param_2 < iVar3) break;\n      iVar1 = *piVar2;\n      *param_1 = iVar1;\n      if (iVar1 == 0) {\n        param_1[1] = 0;\n      }\n      param_2 = param_2 - iVar3;\n      (*(code *)PTR_free_000797cc)();\n      iVar1 = param_1[2] - iVar3;\n      param_1[2] = iVar1;\n      if (param_2 == 0) {\n        return;\n      }\n      piVar2 = (int *)*param_1;\n    }\n    piVar2[1] = piVar2[1] + param_2;\n    param_1[2] = iVar1 - param_2;\n  }" if (parenthesized_expression "(0 < param_2)" ( (binary_expression "0 < param_2" number_literal < identifier) )) (compound_statement "{\n    piVar2 = (int *)*param_1;\n    while( true ) {\n      if (piVar2 == (int *)0x0) {\n        (*(code *)PTR___assert_fail_000796c0)\n                  (PTR_s_j_000790a8 + -0x1aa0,PTR_s_j_000790a8 + -0x1ac0,0x2c7,\n                   PTR_s_j_000790a8 + -0x1b34);\n        return;\n      }\n      iVar3 = piVar2[2] - piVar2[1];\n      if (param_2 < iVar3) break;\n      iVar1 = *piVar2;\n      *param_1 = iVar1;\n      if (iVar1 == 0) {\n        param_1[1] = 0;\n      }\n      param_2 = param_2 - iVar3;\n      (*(code *)PTR_free_000797cc)();\n      iVar1 = param_1[2] - iVar3;\n      param_1[2] = iVar1;\n      if (param_2 == 0) {\n        return;\n      }\n      piVar2 = (int *)*param_1;\n    }\n    piVar2[1] = piVar2[1] + param_2;\n    param_1[2] = iVar1 - param_2;\n  }" { (expression_statement "piVar2 = (int *)*param_1;" (assignment_expression "piVar2 = (int *)*param_1" identifier = (cast_expression "(int *)*param_1" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier))) ;) (while_statement "while( true ) {\n      if (piVar2 == (int *)0x0) {\n        (*(code *)PTR___assert_fail_000796c0)\n                  (PTR_s_j_000790a8 + -0x1aa0,PTR_s_j_000790a8 + -0x1ac0,0x2c7,\n                   PTR_s_j_000790a8 + -0x1b34);\n        return;\n      }\n      iVar3 = piVar2[2] - piVar2[1];\n      if (param_2 < iVar3) break;\n      iVar1 = *piVar2;\n      *param_1 = iVar1;\n      if (iVar1 == 0) {\n        param_1[1] = 0;\n      }\n      param_2 = param_2 - iVar3;\n      (*(code *)PTR_free_000797cc)();\n      iVar1 = param_1[2] - iVar3;\n      param_1[2] = iVar1;\n      if (param_2 == 0) {\n        return;\n      }\n      piVar2 = (int *)*param_1;\n    }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n      if (piVar2 == (int *)0x0) {\n        (*(code *)PTR___assert_fail_000796c0)\n                  (PTR_s_j_000790a8 + -0x1aa0,PTR_s_j_000790a8 + -0x1ac0,0x2c7,\n                   PTR_s_j_000790a8 + -0x1b34);\n        return;\n      }\n      iVar3 = piVar2[2] - piVar2[1];\n      if (param_2 < iVar3) break;\n      iVar1 = *piVar2;\n      *param_1 = iVar1;\n      if (iVar1 == 0) {\n        param_1[1] = 0;\n      }\n      param_2 = param_2 - iVar3;\n      (*(code *)PTR_free_000797cc)();\n      iVar1 = param_1[2] - iVar3;\n      param_1[2] = iVar1;\n      if (param_2 == 0) {\n        return;\n      }\n      piVar2 = (int *)*param_1;\n    }" { (if_statement "if (piVar2 == (int *)0x0) {\n        (*(code *)PTR___assert_fail_000796c0)\n                  (PTR_s_j_000790a8 + -0x1aa0,PTR_s_j_000790a8 + -0x1ac0,0x2c7,\n                   PTR_s_j_000790a8 + -0x1b34);\n        return;\n      }" if (parenthesized_expression "(piVar2 == (int *)0x0)" ( (binary_expression "piVar2 == (int *)0x0" identifier == (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        (*(code *)PTR___assert_fail_000796c0)\n                  (PTR_s_j_000790a8 + -0x1aa0,PTR_s_j_000790a8 + -0x1ac0,0x2c7,\n                   PTR_s_j_000790a8 + -0x1b34);\n        return;\n      }" { (expression_statement "(*(code *)PTR___assert_fail_000796c0)\n                  (PTR_s_j_000790a8 + -0x1aa0,PTR_s_j_000790a8 + -0x1ac0,0x2c7,\n                   PTR_s_j_000790a8 + -0x1b34);" (call_expression "(*(code *)PTR___assert_fail_000796c0)\n                  (PTR_s_j_000790a8 + -0x1aa0,PTR_s_j_000790a8 + -0x1ac0,0x2c7,\n                   PTR_s_j_000790a8 + -0x1b34)" (parenthesized_expression "(*(code *)PTR___assert_fail_000796c0)" ( (pointer_expression "*(code *)PTR___assert_fail_000796c0" * (cast_expression "(code *)PTR___assert_fail_000796c0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(PTR_s_j_000790a8 + -0x1aa0,PTR_s_j_000790a8 + -0x1ac0,0x2c7,\n                   PTR_s_j_000790a8 + -0x1b34)" ( (binary_expression "PTR_s_j_000790a8 + -0x1aa0" identifier + number_literal) , (binary_expression "PTR_s_j_000790a8 + -0x1ac0" identifier + number_literal) , number_literal , (binary_expression "PTR_s_j_000790a8 + -0x1b34" identifier + number_literal) ))) ;) (return_statement "return;" return ;) })) (expression_statement "iVar3 = piVar2[2] - piVar2[1];" (assignment_expression "iVar3 = piVar2[2] - piVar2[1]" identifier = (binary_expression "piVar2[2] - piVar2[1]" (subscript_expression "piVar2[2]" identifier [ number_literal ]) - (subscript_expression "piVar2[1]" identifier [ number_literal ]))) ;) (if_statement "if (param_2 < iVar3) break;" if (parenthesized_expression "(param_2 < iVar3)" ( (binary_expression "param_2 < iVar3" identifier < identifier) )) (break_statement "break;" break ;)) (expression_statement "iVar1 = *piVar2;" (assignment_expression "iVar1 = *piVar2" identifier = (pointer_expression "*piVar2" * identifier)) ;) (expression_statement "*param_1 = iVar1;" (assignment_expression "*param_1 = iVar1" (pointer_expression "*param_1" * identifier) = identifier) ;) (if_statement "if (iVar1 == 0) {\n        param_1[1] = 0;\n      }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n        param_1[1] = 0;\n      }" { (expression_statement "param_1[1] = 0;" (assignment_expression "param_1[1] = 0" (subscript_expression "param_1[1]" identifier [ number_literal ]) = number_literal) ;) })) (expression_statement "param_2 = param_2 - iVar3;" (assignment_expression "param_2 = param_2 - iVar3" identifier = (binary_expression "param_2 - iVar3" identifier - identifier)) ;) (expression_statement "(*(code *)PTR_free_000797cc)();" (call_expression "(*(code *)PTR_free_000797cc)()" (parenthesized_expression "(*(code *)PTR_free_000797cc)" ( (pointer_expression "*(code *)PTR_free_000797cc" * (cast_expression "(code *)PTR_free_000797cc" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))) ;) (expression_statement "iVar1 = param_1[2] - iVar3;" (assignment_expression "iVar1 = param_1[2] - iVar3" identifier = (binary_expression "param_1[2] - iVar3" (subscript_expression "param_1[2]" identifier [ number_literal ]) - identifier)) ;) (expression_statement "param_1[2] = iVar1;" (assignment_expression "param_1[2] = iVar1" (subscript_expression "param_1[2]" identifier [ number_literal ]) = identifier) ;) (if_statement "if (param_2 == 0) {\n        return;\n      }" if (parenthesized_expression "(param_2 == 0)" ( (binary_expression "param_2 == 0" identifier == number_literal) )) (compound_statement "{\n        return;\n      }" { (return_statement "return;" return ;) })) (expression_statement "piVar2 = (int *)*param_1;" (assignment_expression "piVar2 = (int *)*param_1" identifier = (cast_expression "(int *)*param_1" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier))) ;) })) (expression_statement "piVar2[1] = piVar2[1] + param_2;" (assignment_expression "piVar2[1] = piVar2[1] + param_2" (subscript_expression "piVar2[1]" identifier [ number_literal ]) = (binary_expression "piVar2[1] + param_2" (subscript_expression "piVar2[1]" identifier [ number_literal ]) + identifier)) ;) (expression_statement "param_1[2] = iVar1 - param_2;" (assignment_expression "param_1[2] = iVar1 - param_2" (subscript_expression "param_1[2]" identifier [ number_literal ]) = (binary_expression "iVar1 - param_2" identifier - identifier)) ;) })) (return_statement "return;" return ;) })))
(translation_unit "void bufchain_consume(bufchain *ch,int len)\n\n{\n  int iVar1;\n  bufchain_granule *pbVar2;\n  int iVar3;\n  \n  iVar1 = ch->buffersize;\n  if (iVar1 < len) {\n    (*(code *)PTR___assert_fail_000796c0)\n              (PTR_s_j_000790a8 + -0x1ab8,PTR_s_j_000790a8 + -0x1ac0,0x2c4,\n               PTR_s_j_000790a8 + -0x1b34);\n    return;\n  }\n  if (0 < len) {\n    pbVar2 = ch->head;\n    while( true ) {\n      if (pbVar2 == (bufchain_granule *)0x0) {\n        (*(code *)PTR___assert_fail_000796c0)\n                  (PTR_s_j_000790a8 + -0x1aa0,PTR_s_j_000790a8 + -0x1ac0,0x2c7,\n                   PTR_s_j_000790a8 + -0x1b34);\n        return;\n      }\n      iVar3 = (int)pbVar2->bufend - (int)pbVar2->bufpos;\n      if (len < iVar3) break;\n      pbVar2 = pbVar2->next;\n      ch->head = pbVar2;\n      if (pbVar2 == (bufchain_granule *)0x0) {\n        ch->tail = (bufchain_granule *)0x0;\n      }\n      len = len - iVar3;\n      (*(code *)PTR_free_000797cc)();\n      iVar1 = ch->buffersize - iVar3;\n      ch->buffersize = iVar1;\n      if (len == 0) {\n        return;\n      }\n      pbVar2 = ch->head;\n    }\n    pbVar2->bufpos = pbVar2->bufpos + len;\n    ch->buffersize = iVar1 - len;\n  }\n  return;\n}\n\n" (function_definition "void bufchain_consume(bufchain *ch,int len)\n\n{\n  int iVar1;\n  bufchain_granule *pbVar2;\n  int iVar3;\n  \n  iVar1 = ch->buffersize;\n  if (iVar1 < len) {\n    (*(code *)PTR___assert_fail_000796c0)\n              (PTR_s_j_000790a8 + -0x1ab8,PTR_s_j_000790a8 + -0x1ac0,0x2c4,\n               PTR_s_j_000790a8 + -0x1b34);\n    return;\n  }\n  if (0 < len) {\n    pbVar2 = ch->head;\n    while( true ) {\n      if (pbVar2 == (bufchain_granule *)0x0) {\n        (*(code *)PTR___assert_fail_000796c0)\n                  (PTR_s_j_000790a8 + -0x1aa0,PTR_s_j_000790a8 + -0x1ac0,0x2c7,\n                   PTR_s_j_000790a8 + -0x1b34);\n        return;\n      }\n      iVar3 = (int)pbVar2->bufend - (int)pbVar2->bufpos;\n      if (len < iVar3) break;\n      pbVar2 = pbVar2->next;\n      ch->head = pbVar2;\n      if (pbVar2 == (bufchain_granule *)0x0) {\n        ch->tail = (bufchain_granule *)0x0;\n      }\n      len = len - iVar3;\n      (*(code *)PTR_free_000797cc)();\n      iVar1 = ch->buffersize - iVar3;\n      ch->buffersize = iVar1;\n      if (len == 0) {\n        return;\n      }\n      pbVar2 = ch->head;\n    }\n    pbVar2->bufpos = pbVar2->bufpos + len;\n    ch->buffersize = iVar1 - len;\n  }\n  return;\n}" primitive_type (function_declarator "bufchain_consume(bufchain *ch,int len)" identifier (parameter_list "(bufchain *ch,int len)" ( (parameter_declaration "bufchain *ch" type_identifier (pointer_declarator "*ch" * identifier)) , (parameter_declaration "int len" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  bufchain_granule *pbVar2;\n  int iVar3;\n  \n  iVar1 = ch->buffersize;\n  if (iVar1 < len) {\n    (*(code *)PTR___assert_fail_000796c0)\n              (PTR_s_j_000790a8 + -0x1ab8,PTR_s_j_000790a8 + -0x1ac0,0x2c4,\n               PTR_s_j_000790a8 + -0x1b34);\n    return;\n  }\n  if (0 < len) {\n    pbVar2 = ch->head;\n    while( true ) {\n      if (pbVar2 == (bufchain_granule *)0x0) {\n        (*(code *)PTR___assert_fail_000796c0)\n                  (PTR_s_j_000790a8 + -0x1aa0,PTR_s_j_000790a8 + -0x1ac0,0x2c7,\n                   PTR_s_j_000790a8 + -0x1b34);\n        return;\n      }\n      iVar3 = (int)pbVar2->bufend - (int)pbVar2->bufpos;\n      if (len < iVar3) break;\n      pbVar2 = pbVar2->next;\n      ch->head = pbVar2;\n      if (pbVar2 == (bufchain_granule *)0x0) {\n        ch->tail = (bufchain_granule *)0x0;\n      }\n      len = len - iVar3;\n      (*(code *)PTR_free_000797cc)();\n      iVar1 = ch->buffersize - iVar3;\n      ch->buffersize = iVar1;\n      if (len == 0) {\n        return;\n      }\n      pbVar2 = ch->head;\n    }\n    pbVar2->bufpos = pbVar2->bufpos + len;\n    ch->buffersize = iVar1 - len;\n  }\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "bufchain_granule *pbVar2;" type_identifier (pointer_declarator "*pbVar2" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (expression_statement "iVar1 = ch->buffersize;" (assignment_expression "iVar1 = ch->buffersize" identifier = (field_expression "ch->buffersize" identifier -> field_identifier)) ;) (if_statement "if (iVar1 < len) {\n    (*(code *)PTR___assert_fail_000796c0)\n              (PTR_s_j_000790a8 + -0x1ab8,PTR_s_j_000790a8 + -0x1ac0,0x2c4,\n               PTR_s_j_000790a8 + -0x1b34);\n    return;\n  }" if (parenthesized_expression "(iVar1 < len)" ( (binary_expression "iVar1 < len" identifier < identifier) )) (compound_statement "{\n    (*(code *)PTR___assert_fail_000796c0)\n              (PTR_s_j_000790a8 + -0x1ab8,PTR_s_j_000790a8 + -0x1ac0,0x2c4,\n               PTR_s_j_000790a8 + -0x1b34);\n    return;\n  }" { (expression_statement "(*(code *)PTR___assert_fail_000796c0)\n              (PTR_s_j_000790a8 + -0x1ab8,PTR_s_j_000790a8 + -0x1ac0,0x2c4,\n               PTR_s_j_000790a8 + -0x1b34);" (call_expression "(*(code *)PTR___assert_fail_000796c0)\n              (PTR_s_j_000790a8 + -0x1ab8,PTR_s_j_000790a8 + -0x1ac0,0x2c4,\n               PTR_s_j_000790a8 + -0x1b34)" (parenthesized_expression "(*(code *)PTR___assert_fail_000796c0)" ( (pointer_expression "*(code *)PTR___assert_fail_000796c0" * (cast_expression "(code *)PTR___assert_fail_000796c0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(PTR_s_j_000790a8 + -0x1ab8,PTR_s_j_000790a8 + -0x1ac0,0x2c4,\n               PTR_s_j_000790a8 + -0x1b34)" ( (binary_expression "PTR_s_j_000790a8 + -0x1ab8" identifier + number_literal) , (binary_expression "PTR_s_j_000790a8 + -0x1ac0" identifier + number_literal) , number_literal , (binary_expression "PTR_s_j_000790a8 + -0x1b34" identifier + number_literal) ))) ;) (return_statement "return;" return ;) })) (if_statement "if (0 < len) {\n    pbVar2 = ch->head;\n    while( true ) {\n      if (pbVar2 == (bufchain_granule *)0x0) {\n        (*(code *)PTR___assert_fail_000796c0)\n                  (PTR_s_j_000790a8 + -0x1aa0,PTR_s_j_000790a8 + -0x1ac0,0x2c7,\n                   PTR_s_j_000790a8 + -0x1b34);\n        return;\n      }\n      iVar3 = (int)pbVar2->bufend - (int)pbVar2->bufpos;\n      if (len < iVar3) break;\n      pbVar2 = pbVar2->next;\n      ch->head = pbVar2;\n      if (pbVar2 == (bufchain_granule *)0x0) {\n        ch->tail = (bufchain_granule *)0x0;\n      }\n      len = len - iVar3;\n      (*(code *)PTR_free_000797cc)();\n      iVar1 = ch->buffersize - iVar3;\n      ch->buffersize = iVar1;\n      if (len == 0) {\n        return;\n      }\n      pbVar2 = ch->head;\n    }\n    pbVar2->bufpos = pbVar2->bufpos + len;\n    ch->buffersize = iVar1 - len;\n  }" if (parenthesized_expression "(0 < len)" ( (binary_expression "0 < len" number_literal < identifier) )) (compound_statement "{\n    pbVar2 = ch->head;\n    while( true ) {\n      if (pbVar2 == (bufchain_granule *)0x0) {\n        (*(code *)PTR___assert_fail_000796c0)\n                  (PTR_s_j_000790a8 + -0x1aa0,PTR_s_j_000790a8 + -0x1ac0,0x2c7,\n                   PTR_s_j_000790a8 + -0x1b34);\n        return;\n      }\n      iVar3 = (int)pbVar2->bufend - (int)pbVar2->bufpos;\n      if (len < iVar3) break;\n      pbVar2 = pbVar2->next;\n      ch->head = pbVar2;\n      if (pbVar2 == (bufchain_granule *)0x0) {\n        ch->tail = (bufchain_granule *)0x0;\n      }\n      len = len - iVar3;\n      (*(code *)PTR_free_000797cc)();\n      iVar1 = ch->buffersize - iVar3;\n      ch->buffersize = iVar1;\n      if (len == 0) {\n        return;\n      }\n      pbVar2 = ch->head;\n    }\n    pbVar2->bufpos = pbVar2->bufpos + len;\n    ch->buffersize = iVar1 - len;\n  }" { (expression_statement "pbVar2 = ch->head;" (assignment_expression "pbVar2 = ch->head" identifier = (field_expression "ch->head" identifier -> field_identifier)) ;) (while_statement "while( true ) {\n      if (pbVar2 == (bufchain_granule *)0x0) {\n        (*(code *)PTR___assert_fail_000796c0)\n                  (PTR_s_j_000790a8 + -0x1aa0,PTR_s_j_000790a8 + -0x1ac0,0x2c7,\n                   PTR_s_j_000790a8 + -0x1b34);\n        return;\n      }\n      iVar3 = (int)pbVar2->bufend - (int)pbVar2->bufpos;\n      if (len < iVar3) break;\n      pbVar2 = pbVar2->next;\n      ch->head = pbVar2;\n      if (pbVar2 == (bufchain_granule *)0x0) {\n        ch->tail = (bufchain_granule *)0x0;\n      }\n      len = len - iVar3;\n      (*(code *)PTR_free_000797cc)();\n      iVar1 = ch->buffersize - iVar3;\n      ch->buffersize = iVar1;\n      if (len == 0) {\n        return;\n      }\n      pbVar2 = ch->head;\n    }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n      if (pbVar2 == (bufchain_granule *)0x0) {\n        (*(code *)PTR___assert_fail_000796c0)\n                  (PTR_s_j_000790a8 + -0x1aa0,PTR_s_j_000790a8 + -0x1ac0,0x2c7,\n                   PTR_s_j_000790a8 + -0x1b34);\n        return;\n      }\n      iVar3 = (int)pbVar2->bufend - (int)pbVar2->bufpos;\n      if (len < iVar3) break;\n      pbVar2 = pbVar2->next;\n      ch->head = pbVar2;\n      if (pbVar2 == (bufchain_granule *)0x0) {\n        ch->tail = (bufchain_granule *)0x0;\n      }\n      len = len - iVar3;\n      (*(code *)PTR_free_000797cc)();\n      iVar1 = ch->buffersize - iVar3;\n      ch->buffersize = iVar1;\n      if (len == 0) {\n        return;\n      }\n      pbVar2 = ch->head;\n    }" { (if_statement "if (pbVar2 == (bufchain_granule *)0x0) {\n        (*(code *)PTR___assert_fail_000796c0)\n                  (PTR_s_j_000790a8 + -0x1aa0,PTR_s_j_000790a8 + -0x1ac0,0x2c7,\n                   PTR_s_j_000790a8 + -0x1b34);\n        return;\n      }" if (parenthesized_expression "(pbVar2 == (bufchain_granule *)0x0)" ( (binary_expression "pbVar2 == (bufchain_granule *)0x0" identifier == (cast_expression "(bufchain_granule *)0x0" ( (type_descriptor "bufchain_granule *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        (*(code *)PTR___assert_fail_000796c0)\n                  (PTR_s_j_000790a8 + -0x1aa0,PTR_s_j_000790a8 + -0x1ac0,0x2c7,\n                   PTR_s_j_000790a8 + -0x1b34);\n        return;\n      }" { (expression_statement "(*(code *)PTR___assert_fail_000796c0)\n                  (PTR_s_j_000790a8 + -0x1aa0,PTR_s_j_000790a8 + -0x1ac0,0x2c7,\n                   PTR_s_j_000790a8 + -0x1b34);" (call_expression "(*(code *)PTR___assert_fail_000796c0)\n                  (PTR_s_j_000790a8 + -0x1aa0,PTR_s_j_000790a8 + -0x1ac0,0x2c7,\n                   PTR_s_j_000790a8 + -0x1b34)" (parenthesized_expression "(*(code *)PTR___assert_fail_000796c0)" ( (pointer_expression "*(code *)PTR___assert_fail_000796c0" * (cast_expression "(code *)PTR___assert_fail_000796c0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(PTR_s_j_000790a8 + -0x1aa0,PTR_s_j_000790a8 + -0x1ac0,0x2c7,\n                   PTR_s_j_000790a8 + -0x1b34)" ( (binary_expression "PTR_s_j_000790a8 + -0x1aa0" identifier + number_literal) , (binary_expression "PTR_s_j_000790a8 + -0x1ac0" identifier + number_literal) , number_literal , (binary_expression "PTR_s_j_000790a8 + -0x1b34" identifier + number_literal) ))) ;) (return_statement "return;" return ;) })) (expression_statement "iVar3 = (int)pbVar2->bufend - (int)pbVar2->bufpos;" (assignment_expression "iVar3 = (int)pbVar2->bufend - (int)pbVar2->bufpos" identifier = (binary_expression "(int)pbVar2->bufend - (int)pbVar2->bufpos" (cast_expression "(int)pbVar2->bufend" ( (type_descriptor "int" primitive_type) ) (field_expression "pbVar2->bufend" identifier -> field_identifier)) - (cast_expression "(int)pbVar2->bufpos" ( (type_descriptor "int" primitive_type) ) (field_expression "pbVar2->bufpos" identifier -> field_identifier)))) ;) (if_statement "if (len < iVar3) break;" if (parenthesized_expression "(len < iVar3)" ( (binary_expression "len < iVar3" identifier < identifier) )) (break_statement "break;" break ;)) (expression_statement "pbVar2 = pbVar2->next;" (assignment_expression "pbVar2 = pbVar2->next" identifier = (field_expression "pbVar2->next" identifier -> field_identifier)) ;) (expression_statement "ch->head = pbVar2;" (assignment_expression "ch->head = pbVar2" (field_expression "ch->head" identifier -> field_identifier) = identifier) ;) (if_statement "if (pbVar2 == (bufchain_granule *)0x0) {\n        ch->tail = (bufchain_granule *)0x0;\n      }" if (parenthesized_expression "(pbVar2 == (bufchain_granule *)0x0)" ( (binary_expression "pbVar2 == (bufchain_granule *)0x0" identifier == (cast_expression "(bufchain_granule *)0x0" ( (type_descriptor "bufchain_granule *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        ch->tail = (bufchain_granule *)0x0;\n      }" { (expression_statement "ch->tail = (bufchain_granule *)0x0;" (assignment_expression "ch->tail = (bufchain_granule *)0x0" (field_expression "ch->tail" identifier -> field_identifier) = (cast_expression "(bufchain_granule *)0x0" ( (type_descriptor "bufchain_granule *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) })) (expression_statement "len = len - iVar3;" (assignment_expression "len = len - iVar3" identifier = (binary_expression "len - iVar3" identifier - identifier)) ;) (expression_statement "(*(code *)PTR_free_000797cc)();" (call_expression "(*(code *)PTR_free_000797cc)()" (parenthesized_expression "(*(code *)PTR_free_000797cc)" ( (pointer_expression "*(code *)PTR_free_000797cc" * (cast_expression "(code *)PTR_free_000797cc" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))) ;) (expression_statement "iVar1 = ch->buffersize - iVar3;" (assignment_expression "iVar1 = ch->buffersize - iVar3" identifier = (binary_expression "ch->buffersize - iVar3" (field_expression "ch->buffersize" identifier -> field_identifier) - identifier)) ;) (expression_statement "ch->buffersize = iVar1;" (assignment_expression "ch->buffersize = iVar1" (field_expression "ch->buffersize" identifier -> field_identifier) = identifier) ;) (if_statement "if (len == 0) {\n        return;\n      }" if (parenthesized_expression "(len == 0)" ( (binary_expression "len == 0" identifier == number_literal) )) (compound_statement "{\n        return;\n      }" { (return_statement "return;" return ;) })) (expression_statement "pbVar2 = ch->head;" (assignment_expression "pbVar2 = ch->head" identifier = (field_expression "ch->head" identifier -> field_identifier)) ;) })) (expression_statement "pbVar2->bufpos = pbVar2->bufpos + len;" (assignment_expression "pbVar2->bufpos = pbVar2->bufpos + len" (field_expression "pbVar2->bufpos" identifier -> field_identifier) = (binary_expression "pbVar2->bufpos + len" (field_expression "pbVar2->bufpos" identifier -> field_identifier) + identifier)) ;) (expression_statement "ch->buffersize = iVar1 - len;" (assignment_expression "ch->buffersize = iVar1 - len" (field_expression "ch->buffersize" identifier -> field_identifier) = (binary_expression "iVar1 - len" identifier - identifier)) ;) })) (return_statement "return;" return ;) })))
(translation_unit "void bufchain_consume(int *param_1,int param_2)\n\n{\n  int iVar1;\n  int *piVar2;\n  int iVar3;\n  \n  iVar1 = param_1[2];\n  if (iVar1 < param_2) {\n    (*(code *)PTR___assert_fail_000796c0)\n              (PTR_s_j_000790a8 + -0x1ab8,PTR_s_j_000790a8 + -0x1ac0,0x2c4,\n               PTR_s_j_000790a8 + -0x1b34);\n    return;\n  }\n  if (0 < param_2) {\n    piVar2 = (int *)*param_1;\n    while( true ) {\n      if (piVar2 == (int *)0x0) {\n        (*(code *)PTR___assert_fail_000796c0)\n                  (PTR_s_j_000790a8 + -0x1aa0,PTR_s_j_000790a8 + -0x1ac0,0x2c7,\n                   PTR_s_j_000790a8 + -0x1b34);\n        return;\n      }\n      iVar3 = piVar2[2] - piVar2[1];\n      if (param_2 < iVar3) break;\n      iVar1 = *piVar2;\n      *param_1 = iVar1;\n      if (iVar1 == 0) {\n        param_1[1] = 0;\n      }\n      param_2 = param_2 - iVar3;\n      (*(code *)PTR_free_000797cc)();\n      iVar1 = param_1[2] - iVar3;\n      param_1[2] = iVar1;\n      if (param_2 == 0) {\n        return;\n      }\n      piVar2 = (int *)*param_1;\n    }\n    piVar2[1] = piVar2[1] + param_2;\n    param_1[2] = iVar1 - param_2;\n  }\n  return;\n}\n\n" (function_definition "void bufchain_consume(int *param_1,int param_2)\n\n{\n  int iVar1;\n  int *piVar2;\n  int iVar3;\n  \n  iVar1 = param_1[2];\n  if (iVar1 < param_2) {\n    (*(code *)PTR___assert_fail_000796c0)\n              (PTR_s_j_000790a8 + -0x1ab8,PTR_s_j_000790a8 + -0x1ac0,0x2c4,\n               PTR_s_j_000790a8 + -0x1b34);\n    return;\n  }\n  if (0 < param_2) {\n    piVar2 = (int *)*param_1;\n    while( true ) {\n      if (piVar2 == (int *)0x0) {\n        (*(code *)PTR___assert_fail_000796c0)\n                  (PTR_s_j_000790a8 + -0x1aa0,PTR_s_j_000790a8 + -0x1ac0,0x2c7,\n                   PTR_s_j_000790a8 + -0x1b34);\n        return;\n      }\n      iVar3 = piVar2[2] - piVar2[1];\n      if (param_2 < iVar3) break;\n      iVar1 = *piVar2;\n      *param_1 = iVar1;\n      if (iVar1 == 0) {\n        param_1[1] = 0;\n      }\n      param_2 = param_2 - iVar3;\n      (*(code *)PTR_free_000797cc)();\n      iVar1 = param_1[2] - iVar3;\n      param_1[2] = iVar1;\n      if (param_2 == 0) {\n        return;\n      }\n      piVar2 = (int *)*param_1;\n    }\n    piVar2[1] = piVar2[1] + param_2;\n    param_1[2] = iVar1 - param_2;\n  }\n  return;\n}" primitive_type (function_declarator "bufchain_consume(int *param_1,int param_2)" identifier (parameter_list "(int *param_1,int param_2)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int param_2" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  int *piVar2;\n  int iVar3;\n  \n  iVar1 = param_1[2];\n  if (iVar1 < param_2) {\n    (*(code *)PTR___assert_fail_000796c0)\n              (PTR_s_j_000790a8 + -0x1ab8,PTR_s_j_000790a8 + -0x1ac0,0x2c4,\n               PTR_s_j_000790a8 + -0x1b34);\n    return;\n  }\n  if (0 < param_2) {\n    piVar2 = (int *)*param_1;\n    while( true ) {\n      if (piVar2 == (int *)0x0) {\n        (*(code *)PTR___assert_fail_000796c0)\n                  (PTR_s_j_000790a8 + -0x1aa0,PTR_s_j_000790a8 + -0x1ac0,0x2c7,\n                   PTR_s_j_000790a8 + -0x1b34);\n        return;\n      }\n      iVar3 = piVar2[2] - piVar2[1];\n      if (param_2 < iVar3) break;\n      iVar1 = *piVar2;\n      *param_1 = iVar1;\n      if (iVar1 == 0) {\n        param_1[1] = 0;\n      }\n      param_2 = param_2 - iVar3;\n      (*(code *)PTR_free_000797cc)();\n      iVar1 = param_1[2] - iVar3;\n      param_1[2] = iVar1;\n      if (param_2 == 0) {\n        return;\n      }\n      piVar2 = (int *)*param_1;\n    }\n    piVar2[1] = piVar2[1] + param_2;\n    param_1[2] = iVar1 - param_2;\n  }\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int *piVar2;" primitive_type (pointer_declarator "*piVar2" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (expression_statement "iVar1 = param_1[2];" (assignment_expression "iVar1 = param_1[2]" identifier = (subscript_expression "param_1[2]" identifier [ number_literal ])) ;) (if_statement "if (iVar1 < param_2) {\n    (*(code *)PTR___assert_fail_000796c0)\n              (PTR_s_j_000790a8 + -0x1ab8,PTR_s_j_000790a8 + -0x1ac0,0x2c4,\n               PTR_s_j_000790a8 + -0x1b34);\n    return;\n  }" if (parenthesized_expression "(iVar1 < param_2)" ( (binary_expression "iVar1 < param_2" identifier < identifier) )) (compound_statement "{\n    (*(code *)PTR___assert_fail_000796c0)\n              (PTR_s_j_000790a8 + -0x1ab8,PTR_s_j_000790a8 + -0x1ac0,0x2c4,\n               PTR_s_j_000790a8 + -0x1b34);\n    return;\n  }" { (expression_statement "(*(code *)PTR___assert_fail_000796c0)\n              (PTR_s_j_000790a8 + -0x1ab8,PTR_s_j_000790a8 + -0x1ac0,0x2c4,\n               PTR_s_j_000790a8 + -0x1b34);" (call_expression "(*(code *)PTR___assert_fail_000796c0)\n              (PTR_s_j_000790a8 + -0x1ab8,PTR_s_j_000790a8 + -0x1ac0,0x2c4,\n               PTR_s_j_000790a8 + -0x1b34)" (parenthesized_expression "(*(code *)PTR___assert_fail_000796c0)" ( (pointer_expression "*(code *)PTR___assert_fail_000796c0" * (cast_expression "(code *)PTR___assert_fail_000796c0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(PTR_s_j_000790a8 + -0x1ab8,PTR_s_j_000790a8 + -0x1ac0,0x2c4,\n               PTR_s_j_000790a8 + -0x1b34)" ( (binary_expression "PTR_s_j_000790a8 + -0x1ab8" identifier + number_literal) , (binary_expression "PTR_s_j_000790a8 + -0x1ac0" identifier + number_literal) , number_literal , (binary_expression "PTR_s_j_000790a8 + -0x1b34" identifier + number_literal) ))) ;) (return_statement "return;" return ;) })) (if_statement "if (0 < param_2) {\n    piVar2 = (int *)*param_1;\n    while( true ) {\n      if (piVar2 == (int *)0x0) {\n        (*(code *)PTR___assert_fail_000796c0)\n                  (PTR_s_j_000790a8 + -0x1aa0,PTR_s_j_000790a8 + -0x1ac0,0x2c7,\n                   PTR_s_j_000790a8 + -0x1b34);\n        return;\n      }\n      iVar3 = piVar2[2] - piVar2[1];\n      if (param_2 < iVar3) break;\n      iVar1 = *piVar2;\n      *param_1 = iVar1;\n      if (iVar1 == 0) {\n        param_1[1] = 0;\n      }\n      param_2 = param_2 - iVar3;\n      (*(code *)PTR_free_000797cc)();\n      iVar1 = param_1[2] - iVar3;\n      param_1[2] = iVar1;\n      if (param_2 == 0) {\n        return;\n      }\n      piVar2 = (int *)*param_1;\n    }\n    piVar2[1] = piVar2[1] + param_2;\n    param_1[2] = iVar1 - param_2;\n  }" if (parenthesized_expression "(0 < param_2)" ( (binary_expression "0 < param_2" number_literal < identifier) )) (compound_statement "{\n    piVar2 = (int *)*param_1;\n    while( true ) {\n      if (piVar2 == (int *)0x0) {\n        (*(code *)PTR___assert_fail_000796c0)\n                  (PTR_s_j_000790a8 + -0x1aa0,PTR_s_j_000790a8 + -0x1ac0,0x2c7,\n                   PTR_s_j_000790a8 + -0x1b34);\n        return;\n      }\n      iVar3 = piVar2[2] - piVar2[1];\n      if (param_2 < iVar3) break;\n      iVar1 = *piVar2;\n      *param_1 = iVar1;\n      if (iVar1 == 0) {\n        param_1[1] = 0;\n      }\n      param_2 = param_2 - iVar3;\n      (*(code *)PTR_free_000797cc)();\n      iVar1 = param_1[2] - iVar3;\n      param_1[2] = iVar1;\n      if (param_2 == 0) {\n        return;\n      }\n      piVar2 = (int *)*param_1;\n    }\n    piVar2[1] = piVar2[1] + param_2;\n    param_1[2] = iVar1 - param_2;\n  }" { (expression_statement "piVar2 = (int *)*param_1;" (assignment_expression "piVar2 = (int *)*param_1" identifier = (cast_expression "(int *)*param_1" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier))) ;) (while_statement "while( true ) {\n      if (piVar2 == (int *)0x0) {\n        (*(code *)PTR___assert_fail_000796c0)\n                  (PTR_s_j_000790a8 + -0x1aa0,PTR_s_j_000790a8 + -0x1ac0,0x2c7,\n                   PTR_s_j_000790a8 + -0x1b34);\n        return;\n      }\n      iVar3 = piVar2[2] - piVar2[1];\n      if (param_2 < iVar3) break;\n      iVar1 = *piVar2;\n      *param_1 = iVar1;\n      if (iVar1 == 0) {\n        param_1[1] = 0;\n      }\n      param_2 = param_2 - iVar3;\n      (*(code *)PTR_free_000797cc)();\n      iVar1 = param_1[2] - iVar3;\n      param_1[2] = iVar1;\n      if (param_2 == 0) {\n        return;\n      }\n      piVar2 = (int *)*param_1;\n    }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n      if (piVar2 == (int *)0x0) {\n        (*(code *)PTR___assert_fail_000796c0)\n                  (PTR_s_j_000790a8 + -0x1aa0,PTR_s_j_000790a8 + -0x1ac0,0x2c7,\n                   PTR_s_j_000790a8 + -0x1b34);\n        return;\n      }\n      iVar3 = piVar2[2] - piVar2[1];\n      if (param_2 < iVar3) break;\n      iVar1 = *piVar2;\n      *param_1 = iVar1;\n      if (iVar1 == 0) {\n        param_1[1] = 0;\n      }\n      param_2 = param_2 - iVar3;\n      (*(code *)PTR_free_000797cc)();\n      iVar1 = param_1[2] - iVar3;\n      param_1[2] = iVar1;\n      if (param_2 == 0) {\n        return;\n      }\n      piVar2 = (int *)*param_1;\n    }" { (if_statement "if (piVar2 == (int *)0x0) {\n        (*(code *)PTR___assert_fail_000796c0)\n                  (PTR_s_j_000790a8 + -0x1aa0,PTR_s_j_000790a8 + -0x1ac0,0x2c7,\n                   PTR_s_j_000790a8 + -0x1b34);\n        return;\n      }" if (parenthesized_expression "(piVar2 == (int *)0x0)" ( (binary_expression "piVar2 == (int *)0x0" identifier == (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        (*(code *)PTR___assert_fail_000796c0)\n                  (PTR_s_j_000790a8 + -0x1aa0,PTR_s_j_000790a8 + -0x1ac0,0x2c7,\n                   PTR_s_j_000790a8 + -0x1b34);\n        return;\n      }" { (expression_statement "(*(code *)PTR___assert_fail_000796c0)\n                  (PTR_s_j_000790a8 + -0x1aa0,PTR_s_j_000790a8 + -0x1ac0,0x2c7,\n                   PTR_s_j_000790a8 + -0x1b34);" (call_expression "(*(code *)PTR___assert_fail_000796c0)\n                  (PTR_s_j_000790a8 + -0x1aa0,PTR_s_j_000790a8 + -0x1ac0,0x2c7,\n                   PTR_s_j_000790a8 + -0x1b34)" (parenthesized_expression "(*(code *)PTR___assert_fail_000796c0)" ( (pointer_expression "*(code *)PTR___assert_fail_000796c0" * (cast_expression "(code *)PTR___assert_fail_000796c0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(PTR_s_j_000790a8 + -0x1aa0,PTR_s_j_000790a8 + -0x1ac0,0x2c7,\n                   PTR_s_j_000790a8 + -0x1b34)" ( (binary_expression "PTR_s_j_000790a8 + -0x1aa0" identifier + number_literal) , (binary_expression "PTR_s_j_000790a8 + -0x1ac0" identifier + number_literal) , number_literal , (binary_expression "PTR_s_j_000790a8 + -0x1b34" identifier + number_literal) ))) ;) (return_statement "return;" return ;) })) (expression_statement "iVar3 = piVar2[2] - piVar2[1];" (assignment_expression "iVar3 = piVar2[2] - piVar2[1]" identifier = (binary_expression "piVar2[2] - piVar2[1]" (subscript_expression "piVar2[2]" identifier [ number_literal ]) - (subscript_expression "piVar2[1]" identifier [ number_literal ]))) ;) (if_statement "if (param_2 < iVar3) break;" if (parenthesized_expression "(param_2 < iVar3)" ( (binary_expression "param_2 < iVar3" identifier < identifier) )) (break_statement "break;" break ;)) (expression_statement "iVar1 = *piVar2;" (assignment_expression "iVar1 = *piVar2" identifier = (pointer_expression "*piVar2" * identifier)) ;) (expression_statement "*param_1 = iVar1;" (assignment_expression "*param_1 = iVar1" (pointer_expression "*param_1" * identifier) = identifier) ;) (if_statement "if (iVar1 == 0) {\n        param_1[1] = 0;\n      }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n        param_1[1] = 0;\n      }" { (expression_statement "param_1[1] = 0;" (assignment_expression "param_1[1] = 0" (subscript_expression "param_1[1]" identifier [ number_literal ]) = number_literal) ;) })) (expression_statement "param_2 = param_2 - iVar3;" (assignment_expression "param_2 = param_2 - iVar3" identifier = (binary_expression "param_2 - iVar3" identifier - identifier)) ;) (expression_statement "(*(code *)PTR_free_000797cc)();" (call_expression "(*(code *)PTR_free_000797cc)()" (parenthesized_expression "(*(code *)PTR_free_000797cc)" ( (pointer_expression "*(code *)PTR_free_000797cc" * (cast_expression "(code *)PTR_free_000797cc" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))) ;) (expression_statement "iVar1 = param_1[2] - iVar3;" (assignment_expression "iVar1 = param_1[2] - iVar3" identifier = (binary_expression "param_1[2] - iVar3" (subscript_expression "param_1[2]" identifier [ number_literal ]) - identifier)) ;) (expression_statement "param_1[2] = iVar1;" (assignment_expression "param_1[2] = iVar1" (subscript_expression "param_1[2]" identifier [ number_literal ]) = identifier) ;) (if_statement "if (param_2 == 0) {\n        return;\n      }" if (parenthesized_expression "(param_2 == 0)" ( (binary_expression "param_2 == 0" identifier == number_literal) )) (compound_statement "{\n        return;\n      }" { (return_statement "return;" return ;) })) (expression_statement "piVar2 = (int *)*param_1;" (assignment_expression "piVar2 = (int *)*param_1" identifier = (cast_expression "(int *)*param_1" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier))) ;) })) (expression_statement "piVar2[1] = piVar2[1] + param_2;" (assignment_expression "piVar2[1] = piVar2[1] + param_2" (subscript_expression "piVar2[1]" identifier [ number_literal ]) = (binary_expression "piVar2[1] + param_2" (subscript_expression "piVar2[1]" identifier [ number_literal ]) + identifier)) ;) (expression_statement "param_1[2] = iVar1 - param_2;" (assignment_expression "param_1[2] = iVar1 - param_2" (subscript_expression "param_1[2]" identifier [ number_literal ]) = (binary_expression "iVar1 - param_2" identifier - identifier)) ;) })) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < IDENT) )) (compound_statement { (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( (binary_expression IDENT + LIT) , (binary_expression IDENT + LIT) , LIT , (binary_expression IDENT + LIT) ))) ;) (return_statement return ;) })) (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT))) ;) (while_statement while (parenthesized_expression ( BOOL )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( (binary_expression IDENT + LIT) , (binary_expression IDENT + LIT) , LIT , (binary_expression IDENT + LIT) ))) ;) (return_statement return ;) })) (expression_statement (assignment_expression IDENT = (binary_expression (subscript_expression IDENT [ LIT ]) - (subscript_expression IDENT [ LIT ]))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < IDENT) )) (break_statement break ;)) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) })) (expression_statement (assignment_expression IDENT = (binary_expression IDENT - IDENT)) ;) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( ))) ;) (expression_statement (assignment_expression IDENT = (binary_expression (subscript_expression IDENT [ LIT ]) - IDENT)) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (return_statement return ;) })) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT))) ;) })) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (binary_expression (subscript_expression IDENT [ LIT ]) + IDENT)) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (binary_expression IDENT - IDENT)) ;) })) (return_statement return ;) })))
(function_definition "void bufchain_consume(int *param_1,int param_2)\n\n{\n  int iVar1;\n  int *piVar2;\n  int iVar3;\n  \n  iVar1 = param_1[2];\n  if (iVar1 < param_2) {\n    (*(code *)PTR___assert_fail_000796c0)\n              (PTR_s_j_000790a8 + -0x1ab8,PTR_s_j_000790a8 + -0x1ac0,0x2c4,\n               PTR_s_j_000790a8 + -0x1b34);\n    return;\n  }\n  if (0 < param_2) {\n    piVar2 = (int *)*param_1;\n    while( true ) {\n      if (piVar2 == (int *)0x0) {\n        (*(code *)PTR___assert_fail_000796c0)\n                  (PTR_s_j_000790a8 + -0x1aa0,PTR_s_j_000790a8 + -0x1ac0,0x2c7,\n                   PTR_s_j_000790a8 + -0x1b34);\n        return;\n      }\n      iVar3 = piVar2[2] - piVar2[1];\n      if (param_2 < iVar3) break;\n      iVar1 = *piVar2;\n      *param_1 = iVar1;\n      if (iVar1 == 0) {\n        param_1[1] = 0;\n      }\n      param_2 = param_2 - iVar3;\n      (*(code *)PTR_free_000797cc)();\n      iVar1 = param_1[2] - iVar3;\n      param_1[2] = iVar1;\n      if (param_2 == 0) {\n        return;\n      }\n      piVar2 = (int *)*param_1;\n    }\n    piVar2[1] = piVar2[1] + param_2;\n    param_1[2] = iVar1 - param_2;\n  }\n  return;\n}" (primitive_type "void") (function_declarator "bufchain_consume(int *param_1,int param_2)" (identifier "bufchain_consume") (parameter_list "(int *param_1,int param_2)" (( "(") (parameter_declaration "int *param_1" (primitive_type "int") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) () ")"))) (compound_statement "{\n  int iVar1;\n  int *piVar2;\n  int iVar3;\n  \n  iVar1 = param_1[2];\n  if (iVar1 < param_2) {\n    (*(code *)PTR___assert_fail_000796c0)\n              (PTR_s_j_000790a8 + -0x1ab8,PTR_s_j_000790a8 + -0x1ac0,0x2c4,\n               PTR_s_j_000790a8 + -0x1b34);\n    return;\n  }\n  if (0 < param_2) {\n    piVar2 = (int *)*param_1;\n    while( true ) {\n      if (piVar2 == (int *)0x0) {\n        (*(code *)PTR___assert_fail_000796c0)\n                  (PTR_s_j_000790a8 + -0x1aa0,PTR_s_j_000790a8 + -0x1ac0,0x2c7,\n                   PTR_s_j_000790a8 + -0x1b34);\n        return;\n      }\n      iVar3 = piVar2[2] - piVar2[1];\n      if (param_2 < iVar3) break;\n      iVar1 = *piVar2;\n      *param_1 = iVar1;\n      if (iVar1 == 0) {\n        param_1[1] = 0;\n      }\n      param_2 = param_2 - iVar3;\n      (*(code *)PTR_free_000797cc)();\n      iVar1 = param_1[2] - iVar3;\n      param_1[2] = iVar1;\n      if (param_2 == 0) {\n        return;\n      }\n      piVar2 = (int *)*param_1;\n    }\n    piVar2[1] = piVar2[1] + param_2;\n    param_1[2] = iVar1 - param_2;\n  }\n  return;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "int *piVar2;" (primitive_type "int") (pointer_declarator "*piVar2" (* "*") (identifier "piVar2")) (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (expression_statement "iVar1 = param_1[2];" (assignment_expression "iVar1 = param_1[2]" (identifier "iVar1") (= "=") (subscript_expression "param_1[2]" (identifier "param_1") ([ "[") (number_literal "2") (] "]"))) (; ";")) (if_statement "if (iVar1 < param_2) {\n    (*(code *)PTR___assert_fail_000796c0)\n              (PTR_s_j_000790a8 + -0x1ab8,PTR_s_j_000790a8 + -0x1ac0,0x2c4,\n               PTR_s_j_000790a8 + -0x1b34);\n    return;\n  }" (if "if") (parenthesized_expression "(iVar1 < param_2)" (( "(") (binary_expression "iVar1 < param_2" (identifier "iVar1") (< "<") (identifier "param_2")) () ")")) (compound_statement "{\n    (*(code *)PTR___assert_fail_000796c0)\n              (PTR_s_j_000790a8 + -0x1ab8,PTR_s_j_000790a8 + -0x1ac0,0x2c4,\n               PTR_s_j_000790a8 + -0x1b34);\n    return;\n  }" ({ "{") (expression_statement "(*(code *)PTR___assert_fail_000796c0)\n              (PTR_s_j_000790a8 + -0x1ab8,PTR_s_j_000790a8 + -0x1ac0,0x2c4,\n               PTR_s_j_000790a8 + -0x1b34);" (call_expression "(*(code *)PTR___assert_fail_000796c0)\n              (PTR_s_j_000790a8 + -0x1ab8,PTR_s_j_000790a8 + -0x1ac0,0x2c4,\n               PTR_s_j_000790a8 + -0x1b34)" (parenthesized_expression "(*(code *)PTR___assert_fail_000796c0)" (( "(") (pointer_expression "*(code *)PTR___assert_fail_000796c0" (* "*") (cast_expression "(code *)PTR___assert_fail_000796c0" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR___assert_fail_000796c0"))) () ")")) (argument_list "(PTR_s_j_000790a8 + -0x1ab8,PTR_s_j_000790a8 + -0x1ac0,0x2c4,\n               PTR_s_j_000790a8 + -0x1b34)" (( "(") (binary_expression "PTR_s_j_000790a8 + -0x1ab8" (identifier "PTR_s_j_000790a8") (+ "+") (number_literal "-0x1ab8")) (, ",") (binary_expression "PTR_s_j_000790a8 + -0x1ac0" (identifier "PTR_s_j_000790a8") (+ "+") (number_literal "-0x1ac0")) (, ",") (number_literal "0x2c4") (, ",") (binary_expression "PTR_s_j_000790a8 + -0x1b34" (identifier "PTR_s_j_000790a8") (+ "+") (number_literal "-0x1b34")) () ")"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}"))) (if_statement "if (0 < param_2) {\n    piVar2 = (int *)*param_1;\n    while( true ) {\n      if (piVar2 == (int *)0x0) {\n        (*(code *)PTR___assert_fail_000796c0)\n                  (PTR_s_j_000790a8 + -0x1aa0,PTR_s_j_000790a8 + -0x1ac0,0x2c7,\n                   PTR_s_j_000790a8 + -0x1b34);\n        return;\n      }\n      iVar3 = piVar2[2] - piVar2[1];\n      if (param_2 < iVar3) break;\n      iVar1 = *piVar2;\n      *param_1 = iVar1;\n      if (iVar1 == 0) {\n        param_1[1] = 0;\n      }\n      param_2 = param_2 - iVar3;\n      (*(code *)PTR_free_000797cc)();\n      iVar1 = param_1[2] - iVar3;\n      param_1[2] = iVar1;\n      if (param_2 == 0) {\n        return;\n      }\n      piVar2 = (int *)*param_1;\n    }\n    piVar2[1] = piVar2[1] + param_2;\n    param_1[2] = iVar1 - param_2;\n  }" (if "if") (parenthesized_expression "(0 < param_2)" (( "(") (binary_expression "0 < param_2" (number_literal "0") (< "<") (identifier "param_2")) () ")")) (compound_statement "{\n    piVar2 = (int *)*param_1;\n    while( true ) {\n      if (piVar2 == (int *)0x0) {\n        (*(code *)PTR___assert_fail_000796c0)\n                  (PTR_s_j_000790a8 + -0x1aa0,PTR_s_j_000790a8 + -0x1ac0,0x2c7,\n                   PTR_s_j_000790a8 + -0x1b34);\n        return;\n      }\n      iVar3 = piVar2[2] - piVar2[1];\n      if (param_2 < iVar3) break;\n      iVar1 = *piVar2;\n      *param_1 = iVar1;\n      if (iVar1 == 0) {\n        param_1[1] = 0;\n      }\n      param_2 = param_2 - iVar3;\n      (*(code *)PTR_free_000797cc)();\n      iVar1 = param_1[2] - iVar3;\n      param_1[2] = iVar1;\n      if (param_2 == 0) {\n        return;\n      }\n      piVar2 = (int *)*param_1;\n    }\n    piVar2[1] = piVar2[1] + param_2;\n    param_1[2] = iVar1 - param_2;\n  }" ({ "{") (expression_statement "piVar2 = (int *)*param_1;" (assignment_expression "piVar2 = (int *)*param_1" (identifier "piVar2") (= "=") (cast_expression "(int *)*param_1" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*param_1" (* "*") (identifier "param_1")))) (; ";")) (while_statement "while( true ) {\n      if (piVar2 == (int *)0x0) {\n        (*(code *)PTR___assert_fail_000796c0)\n                  (PTR_s_j_000790a8 + -0x1aa0,PTR_s_j_000790a8 + -0x1ac0,0x2c7,\n                   PTR_s_j_000790a8 + -0x1b34);\n        return;\n      }\n      iVar3 = piVar2[2] - piVar2[1];\n      if (param_2 < iVar3) break;\n      iVar1 = *piVar2;\n      *param_1 = iVar1;\n      if (iVar1 == 0) {\n        param_1[1] = 0;\n      }\n      param_2 = param_2 - iVar3;\n      (*(code *)PTR_free_000797cc)();\n      iVar1 = param_1[2] - iVar3;\n      param_1[2] = iVar1;\n      if (param_2 == 0) {\n        return;\n      }\n      piVar2 = (int *)*param_1;\n    }" (while "while") (parenthesized_expression "( true )" (( "(") (true "true") () ")")) (compound_statement "{\n      if (piVar2 == (int *)0x0) {\n        (*(code *)PTR___assert_fail_000796c0)\n                  (PTR_s_j_000790a8 + -0x1aa0,PTR_s_j_000790a8 + -0x1ac0,0x2c7,\n                   PTR_s_j_000790a8 + -0x1b34);\n        return;\n      }\n      iVar3 = piVar2[2] - piVar2[1];\n      if (param_2 < iVar3) break;\n      iVar1 = *piVar2;\n      *param_1 = iVar1;\n      if (iVar1 == 0) {\n        param_1[1] = 0;\n      }\n      param_2 = param_2 - iVar3;\n      (*(code *)PTR_free_000797cc)();\n      iVar1 = param_1[2] - iVar3;\n      param_1[2] = iVar1;\n      if (param_2 == 0) {\n        return;\n      }\n      piVar2 = (int *)*param_1;\n    }" ({ "{") (if_statement "if (piVar2 == (int *)0x0) {\n        (*(code *)PTR___assert_fail_000796c0)\n                  (PTR_s_j_000790a8 + -0x1aa0,PTR_s_j_000790a8 + -0x1ac0,0x2c7,\n                   PTR_s_j_000790a8 + -0x1b34);\n        return;\n      }" (if "if") (parenthesized_expression "(piVar2 == (int *)0x0)" (( "(") (binary_expression "piVar2 == (int *)0x0" (identifier "piVar2") (== "==") (cast_expression "(int *)0x0" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n        (*(code *)PTR___assert_fail_000796c0)\n                  (PTR_s_j_000790a8 + -0x1aa0,PTR_s_j_000790a8 + -0x1ac0,0x2c7,\n                   PTR_s_j_000790a8 + -0x1b34);\n        return;\n      }" ({ "{") (expression_statement "(*(code *)PTR___assert_fail_000796c0)\n                  (PTR_s_j_000790a8 + -0x1aa0,PTR_s_j_000790a8 + -0x1ac0,0x2c7,\n                   PTR_s_j_000790a8 + -0x1b34);" (call_expression "(*(code *)PTR___assert_fail_000796c0)\n                  (PTR_s_j_000790a8 + -0x1aa0,PTR_s_j_000790a8 + -0x1ac0,0x2c7,\n                   PTR_s_j_000790a8 + -0x1b34)" (parenthesized_expression "(*(code *)PTR___assert_fail_000796c0)" (( "(") (pointer_expression "*(code *)PTR___assert_fail_000796c0" (* "*") (cast_expression "(code *)PTR___assert_fail_000796c0" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR___assert_fail_000796c0"))) () ")")) (argument_list "(PTR_s_j_000790a8 + -0x1aa0,PTR_s_j_000790a8 + -0x1ac0,0x2c7,\n                   PTR_s_j_000790a8 + -0x1b34)" (( "(") (binary_expression "PTR_s_j_000790a8 + -0x1aa0" (identifier "PTR_s_j_000790a8") (+ "+") (number_literal "-0x1aa0")) (, ",") (binary_expression "PTR_s_j_000790a8 + -0x1ac0" (identifier "PTR_s_j_000790a8") (+ "+") (number_literal "-0x1ac0")) (, ",") (number_literal "0x2c7") (, ",") (binary_expression "PTR_s_j_000790a8 + -0x1b34" (identifier "PTR_s_j_000790a8") (+ "+") (number_literal "-0x1b34")) () ")"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "iVar3 = piVar2[2] - piVar2[1];" (assignment_expression "iVar3 = piVar2[2] - piVar2[1]" (identifier "iVar3") (= "=") (binary_expression "piVar2[2] - piVar2[1]" (subscript_expression "piVar2[2]" (identifier "piVar2") ([ "[") (number_literal "2") (] "]")) (- "-") (subscript_expression "piVar2[1]" (identifier "piVar2") ([ "[") (number_literal "1") (] "]")))) (; ";")) (if_statement "if (param_2 < iVar3) break;" (if "if") (parenthesized_expression "(param_2 < iVar3)" (( "(") (binary_expression "param_2 < iVar3" (identifier "param_2") (< "<") (identifier "iVar3")) () ")")) (break_statement "break;" (break "break") (; ";"))) (expression_statement "iVar1 = *piVar2;" (assignment_expression "iVar1 = *piVar2" (identifier "iVar1") (= "=") (pointer_expression "*piVar2" (* "*") (identifier "piVar2"))) (; ";")) (expression_statement "*param_1 = iVar1;" (assignment_expression "*param_1 = iVar1" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (= "=") (identifier "iVar1")) (; ";")) (if_statement "if (iVar1 == 0) {\n        param_1[1] = 0;\n      }" (if "if") (parenthesized_expression "(iVar1 == 0)" (( "(") (binary_expression "iVar1 == 0" (identifier "iVar1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n        param_1[1] = 0;\n      }" ({ "{") (expression_statement "param_1[1] = 0;" (assignment_expression "param_1[1] = 0" (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]")) (= "=") (number_literal "0")) (; ";")) (} "}"))) (expression_statement "param_2 = param_2 - iVar3;" (assignment_expression "param_2 = param_2 - iVar3" (identifier "param_2") (= "=") (binary_expression "param_2 - iVar3" (identifier "param_2") (- "-") (identifier "iVar3"))) (; ";")) (expression_statement "(*(code *)PTR_free_000797cc)();" (call_expression "(*(code *)PTR_free_000797cc)()" (parenthesized_expression "(*(code *)PTR_free_000797cc)" (( "(") (pointer_expression "*(code *)PTR_free_000797cc" (* "*") (cast_expression "(code *)PTR_free_000797cc" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_free_000797cc"))) () ")")) (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "iVar1 = param_1[2] - iVar3;" (assignment_expression "iVar1 = param_1[2] - iVar3" (identifier "iVar1") (= "=") (binary_expression "param_1[2] - iVar3" (subscript_expression "param_1[2]" (identifier "param_1") ([ "[") (number_literal "2") (] "]")) (- "-") (identifier "iVar3"))) (; ";")) (expression_statement "param_1[2] = iVar1;" (assignment_expression "param_1[2] = iVar1" (subscript_expression "param_1[2]" (identifier "param_1") ([ "[") (number_literal "2") (] "]")) (= "=") (identifier "iVar1")) (; ";")) (if_statement "if (param_2 == 0) {\n        return;\n      }" (if "if") (parenthesized_expression "(param_2 == 0)" (( "(") (binary_expression "param_2 == 0" (identifier "param_2") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n        return;\n      }" ({ "{") (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "piVar2 = (int *)*param_1;" (assignment_expression "piVar2 = (int *)*param_1" (identifier "piVar2") (= "=") (cast_expression "(int *)*param_1" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*param_1" (* "*") (identifier "param_1")))) (; ";")) (} "}"))) (expression_statement "piVar2[1] = piVar2[1] + param_2;" (assignment_expression "piVar2[1] = piVar2[1] + param_2" (subscript_expression "piVar2[1]" (identifier "piVar2") ([ "[") (number_literal "1") (] "]")) (= "=") (binary_expression "piVar2[1] + param_2" (subscript_expression "piVar2[1]" (identifier "piVar2") ([ "[") (number_literal "1") (] "]")) (+ "+") (identifier "param_2"))) (; ";")) (expression_statement "param_1[2] = iVar1 - param_2;" (assignment_expression "param_1[2] = iVar1 - param_2" (subscript_expression "param_1[2]" (identifier "param_1") ([ "[") (number_literal "2") (] "]")) (= "=") (binary_expression "iVar1 - param_2" (identifier "iVar1") (- "-") (identifier "param_2"))) (; ";")) (} "}"))) (return_statement "return;" (return "return") (; ";")) (} "}")))
(translation_unit (function_definition type: (primitive_type) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (parameter_declaration type: (primitive_type) declarator: (identifier)))) body: (compound_statement (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (subscript_expression argument: (identifier) index: (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (compound_statement (expression_statement (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list (binary_expression left: (identifier) right: (number_literal)) (binary_expression left: (identifier) right: (number_literal)) (number_literal) (binary_expression left: (identifier) right: (number_literal))))) (return_statement))) (if_statement condition: (parenthesized_expression (binary_expression left: (number_literal) right: (identifier))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (pointer_expression argument: (identifier))))) (while_statement condition: (parenthesized_expression (true)) body: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (number_literal)))) consequence: (compound_statement (expression_statement (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list (binary_expression left: (identifier) right: (number_literal)) (binary_expression left: (identifier) right: (number_literal)) (number_literal) (binary_expression left: (identifier) right: (number_literal))))) (return_statement))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (subscript_expression argument: (identifier) index: (number_literal))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (break_statement)) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier)))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (identifier)))) (expression_statement (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (identifier)))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (return_statement))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (pointer_expression argument: (identifier))))))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (binary_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (identifier)))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (binary_expression left: (identifier) right: (identifier)))))) (return_statement))))

void MASKED(int *param_1,int param_2)

{
  int iVar1;
  int *piVar2;
  int iVar3;
  
  iVar1 = param_1[2];
  if (iVar1 < param_2) {
    (*(code *)PTR___assert_fail_000796c0)
              (PTR_s_j_000790a8 + -0x1ab8,PTR_s_j_000790a8 + -0x1ac0,0x2c4,
               PTR_s_j_000790a8 + -0x1b34);
    return;
  }
  if (0 < param_2) {
    piVar2 = (int *)*param_1;
    while( true ) {
      if (piVar2 == (int *)0x0) {
        (*(code *)PTR___assert_fail_000796c0)
                  (PTR_s_j_000790a8 + -0x1aa0,PTR_s_j_000790a8 + -0x1ac0,0x2c7,
                   PTR_s_j_000790a8 + -0x1b34);
        return;
      }
      iVar3 = piVar2[2] - piVar2[1];
      if (param_2 < iVar3) break;
      iVar1 = *piVar2;
      *param_1 = iVar1;
      if (iVar1 == 0) {
        param_1[1] = 0;
      }
      param_2 = param_2 - iVar3;
      (*(code *)PTR_free_000797cc)();
      iVar1 = param_1[2] - iVar3;
      param_1[2] = iVar1;
      if (param_2 == 0) {
        return;
      }
      piVar2 = (int *)*param_1;
    }
    piVar2[1] = piVar2[1] + param_2;
    param_1[2] = iVar1 - param_2;
  }
  return;
}

