
int updatewindow(z_streamp strm,Bytef *end,uint copy)

{
  Bytef *pBVar1;
  uint uVar2;
  uint uVar3;
  internal_state *piVar4;
  uInt uVar5;
  
  piVar4 = strm->state;
  if (piVar4->window == (Bytef *)0x0) {
    pBVar1 = (Bytef *)(*strm->zalloc)(strm->opaque,1 << (piVar4->last_flush & 0x1fU),1);
    piVar4->window = pBVar1;
    if (pBVar1 == (Bytef *)0x0) {
      return 1;
    }
  }
  if (piVar4->w_size == 0) {
    piVar4->w_size = 1 << (piVar4->last_flush & 0x1fU);
    piVar4->w_mask = 0;
    piVar4->w_bits = 0;
  }
  uVar3 = piVar4->w_size;
  if (copy < uVar3) {
    uVar3 = uVar3 - piVar4->w_mask;
    if (copy <= uVar3) {
      uVar3 = copy;
    }
    (*(code *)PTR_memcpy_000370fc)(piVar4->window + piVar4->w_mask,(int)end - copy,uVar3);
    uVar5 = copy - uVar3;
    if (uVar5 == 0) {
      uVar2 = uVar3 + piVar4->w_mask;
      piVar4->w_mask = uVar2;
      if (uVar2 == piVar4->w_size) {
        piVar4->w_mask = 0;
      }
      if (piVar4->w_bits < piVar4->w_size) {
        piVar4->w_bits = piVar4->w_bits + uVar3;
      }
    }
    else {
      (*(code *)PTR_memcpy_000370fc)(piVar4->window,(int)end - uVar5,uVar5);
      piVar4->w_mask = uVar5;
      piVar4->w_bits = piVar4->w_size;
    }
  }
  else {
    (*(code *)PTR_memcpy_000370fc)(piVar4->window,(int)end - uVar3,uVar3);
    piVar4->w_mask = 0;
    piVar4->w_bits = piVar4->w_size;
  }
  return 0;
}



undefined4 FUN_00018730(int param_1,int param_2,uint param_3)

{
  int iVar1;
  uint uVar2;
  uint uVar3;
  int iVar4;
  
  iVar4 = *(int *)(param_1 + 0x1c);
  if (*(int *)(iVar4 + 0x38) == 0) {
    iVar1 = (**(code **)(param_1 + 0x20))
                      (*(undefined4 *)(param_1 + 0x28),1 << (*(uint *)(iVar4 + 0x28) & 0x1f),1);
    *(int *)(iVar4 + 0x38) = iVar1;
    if (iVar1 == 0) {
      return 1;
    }
  }
  if (*(int *)(iVar4 + 0x2c) == 0) {
    *(int *)(iVar4 + 0x2c) = 1 << (*(uint *)(iVar4 + 0x28) & 0x1f);
    *(undefined4 *)(iVar4 + 0x34) = 0;
    *(undefined4 *)(iVar4 + 0x30) = 0;
  }
  uVar3 = *(uint *)(iVar4 + 0x2c);
  if (param_3 < uVar3) {
    uVar3 = uVar3 - *(int *)(iVar4 + 0x34);
    if (param_3 <= uVar3) {
      uVar3 = param_3;
    }
    (*(code *)PTR_memcpy_000370fc)
              (*(int *)(iVar4 + 0x38) + *(int *)(iVar4 + 0x34),param_2 - param_3,uVar3);
    iVar1 = param_3 - uVar3;
    if (iVar1 == 0) {
      uVar2 = uVar3 + *(int *)(iVar4 + 0x34);
      *(uint *)(iVar4 + 0x34) = uVar2;
      if (uVar2 == *(uint *)(iVar4 + 0x2c)) {
        *(undefined4 *)(iVar4 + 0x34) = 0;
      }
      if (*(uint *)(iVar4 + 0x30) < *(uint *)(iVar4 + 0x2c)) {
        *(uint *)(iVar4 + 0x30) = *(uint *)(iVar4 + 0x30) + uVar3;
      }
    }
    else {
      (*(code *)PTR_memcpy_000370fc)(*(undefined4 *)(iVar4 + 0x38),param_2 - iVar1,iVar1);
      *(int *)(iVar4 + 0x34) = iVar1;
      *(undefined4 *)(iVar4 + 0x30) = *(undefined4 *)(iVar4 + 0x2c);
    }
  }
  else {
    (*(code *)PTR_memcpy_000370fc)(*(undefined4 *)(iVar4 + 0x38),param_2 - uVar3,uVar3);
    *(undefined4 *)(iVar4 + 0x34) = 0;
    *(undefined4 *)(iVar4 + 0x30) = *(undefined4 *)(iVar4 + 0x2c);
  }
  return 0;
}


lui gp,0x2
addiu gp,gp,0x68c0
addu gp,gp,t9
addiu sp,sp,-0x30
sw ra,0x2c(sp)
sw s3,0x28(sp)
sw s2,0x24(sp)
sw s1,0x20(sp)
sw s0,0x1c(sp)
sw gp,0x10(sp)
or s3,a1,zero
lw s0,0x1c(a0)
lw v0,0x38(s0)
bne v0,zero,0x00018798
_or s1,a2,zero
lw v0,0x28(s0)
lw t9,0x20(a0)
li a2,0x1
li a1,0x1
sllv a1,a1,v0
lw a0,0x28(a0)
jalr t9
_nop
lw gp,0x10(sp)
beq v0,zero,0x000188b0
_sw v0,0x38(s0)
lw v0,0x2c(s0)
bne v0,zero,0x000187b8
_li v0,0x1
lw v1,0x28(s0)
sllv v0,v0,v1
sw v0,0x2c(s0)
sw zero,0x34(s0)
sw zero,0x30(s0)
lw a1,0x2c(s0)
sltu v0,s1,a1
beq v0,zero,0x00018838
_lw t9,-0x7ef4(gp)
lw v0,0x34(s0)
subu a1,a1,v0
sltu s2,a1,s1
movz a1,s1,s2
or s2,a1,zero
lw a0,0x38(s0)
or a2,a1,zero
subu a1,s3,s1
addu a0,a0,v0
jalr t9
_nop
lw gp,0x10(sp)
subu s1,s1,s2
bne s1,zero,0x0001887c
_or a2,s1,zero
lw v1,0x34(s0)
addu v1,s2,v1
sw v1,0x34(s0)
lw v0,0x2c(s0)
beq v1,v0,0x000188a8
_nop
lw a1,0x30(s0)
sltu v0,a1,v0
beq v0,zero,0x000188b8
_addu a1,a1,s2
sw a1,0x30(s0)
b 0x00018860
_or v0,zero,zero
or a2,a1,zero
subu a1,s3,a1
lw a0,0x38(s0)
jalr t9
_nop
lw gp,0x10(sp)
sw zero,0x34(s0)
lw v0,0x2c(s0)
sw v0,0x30(s0)
or v0,zero,zero
lw ra,0x2c(sp)
lw s3,0x28(sp)
lw s2,0x24(sp)
lw s1,0x20(sp)
lw s0,0x1c(sp)
jr ra
_addiu sp,sp,0x30
subu a1,s3,s1
lw a0,0x38(s0)
lw t9,-0x7ef4(gp)
jalr t9
_nop
lw gp,0x10(sp)
sw s1,0x34(s0)
lw v0,0x2c(s0)
sw v0,0x30(s0)
b 0x00018860
_or v0,zero,zero
b 0x0001881c
_sw zero,0x34(s0)
b 0x00018860
_li v0,0x1
b 0x00018860
_or v0,zero,zero
(translation_unit "undefined4 FUN_00018730(int param_1,int param_2,uint param_3)\n\n{\n  int iVar1;\n  uint uVar2;\n  uint uVar3;\n  int iVar4;\n  \n  iVar4 = *(int *)(param_1 + 0x1c);\n  if (*(int *)(iVar4 + 0x38) == 0) {\n    iVar1 = (**(code **)(param_1 + 0x20))\n                      (*(undefined4 *)(param_1 + 0x28),1 << (*(uint *)(iVar4 + 0x28) & 0x1f),1);\n    *(int *)(iVar4 + 0x38) = iVar1;\n    if (iVar1 == 0) {\n      return 1;\n    }\n  }\n  if (*(int *)(iVar4 + 0x2c) == 0) {\n    *(int *)(iVar4 + 0x2c) = 1 << (*(uint *)(iVar4 + 0x28) & 0x1f);\n    *(undefined4 *)(iVar4 + 0x34) = 0;\n    *(undefined4 *)(iVar4 + 0x30) = 0;\n  }\n  uVar3 = *(uint *)(iVar4 + 0x2c);\n  if (param_3 < uVar3) {\n    uVar3 = uVar3 - *(int *)(iVar4 + 0x34);\n    if (param_3 <= uVar3) {\n      uVar3 = param_3;\n    }\n    (*(code *)PTR_memcpy_000370fc)\n              (*(int *)(iVar4 + 0x38) + *(int *)(iVar4 + 0x34),param_2 - param_3,uVar3);\n    iVar1 = param_3 - uVar3;\n    if (iVar1 == 0) {\n      uVar2 = uVar3 + *(int *)(iVar4 + 0x34);\n      *(uint *)(iVar4 + 0x34) = uVar2;\n      if (uVar2 == *(uint *)(iVar4 + 0x2c)) {\n        *(undefined4 *)(iVar4 + 0x34) = 0;\n      }\n      if (*(uint *)(iVar4 + 0x30) < *(uint *)(iVar4 + 0x2c)) {\n        *(uint *)(iVar4 + 0x30) = *(uint *)(iVar4 + 0x30) + uVar3;\n      }\n    }\n    else {\n      (*(code *)PTR_memcpy_000370fc)(*(undefined4 *)(iVar4 + 0x38),param_2 - iVar1,iVar1);\n      *(int *)(iVar4 + 0x34) = iVar1;\n      *(undefined4 *)(iVar4 + 0x30) = *(undefined4 *)(iVar4 + 0x2c);\n    }\n  }\n  else {\n    (*(code *)PTR_memcpy_000370fc)(*(undefined4 *)(iVar4 + 0x38),param_2 - uVar3,uVar3);\n    *(undefined4 *)(iVar4 + 0x34) = 0;\n    *(undefined4 *)(iVar4 + 0x30) = *(undefined4 *)(iVar4 + 0x2c);\n  }\n  return 0;\n}\n\n" (function_definition "undefined4 FUN_00018730(int param_1,int param_2,uint param_3)\n\n{\n  int iVar1;\n  uint uVar2;\n  uint uVar3;\n  int iVar4;\n  \n  iVar4 = *(int *)(param_1 + 0x1c);\n  if (*(int *)(iVar4 + 0x38) == 0) {\n    iVar1 = (**(code **)(param_1 + 0x20))\n                      (*(undefined4 *)(param_1 + 0x28),1 << (*(uint *)(iVar4 + 0x28) & 0x1f),1);\n    *(int *)(iVar4 + 0x38) = iVar1;\n    if (iVar1 == 0) {\n      return 1;\n    }\n  }\n  if (*(int *)(iVar4 + 0x2c) == 0) {\n    *(int *)(iVar4 + 0x2c) = 1 << (*(uint *)(iVar4 + 0x28) & 0x1f);\n    *(undefined4 *)(iVar4 + 0x34) = 0;\n    *(undefined4 *)(iVar4 + 0x30) = 0;\n  }\n  uVar3 = *(uint *)(iVar4 + 0x2c);\n  if (param_3 < uVar3) {\n    uVar3 = uVar3 - *(int *)(iVar4 + 0x34);\n    if (param_3 <= uVar3) {\n      uVar3 = param_3;\n    }\n    (*(code *)PTR_memcpy_000370fc)\n              (*(int *)(iVar4 + 0x38) + *(int *)(iVar4 + 0x34),param_2 - param_3,uVar3);\n    iVar1 = param_3 - uVar3;\n    if (iVar1 == 0) {\n      uVar2 = uVar3 + *(int *)(iVar4 + 0x34);\n      *(uint *)(iVar4 + 0x34) = uVar2;\n      if (uVar2 == *(uint *)(iVar4 + 0x2c)) {\n        *(undefined4 *)(iVar4 + 0x34) = 0;\n      }\n      if (*(uint *)(iVar4 + 0x30) < *(uint *)(iVar4 + 0x2c)) {\n        *(uint *)(iVar4 + 0x30) = *(uint *)(iVar4 + 0x30) + uVar3;\n      }\n    }\n    else {\n      (*(code *)PTR_memcpy_000370fc)(*(undefined4 *)(iVar4 + 0x38),param_2 - iVar1,iVar1);\n      *(int *)(iVar4 + 0x34) = iVar1;\n      *(undefined4 *)(iVar4 + 0x30) = *(undefined4 *)(iVar4 + 0x2c);\n    }\n  }\n  else {\n    (*(code *)PTR_memcpy_000370fc)(*(undefined4 *)(iVar4 + 0x38),param_2 - uVar3,uVar3);\n    *(undefined4 *)(iVar4 + 0x34) = 0;\n    *(undefined4 *)(iVar4 + 0x30) = *(undefined4 *)(iVar4 + 0x2c);\n  }\n  return 0;\n}" type_identifier (function_declarator "FUN_00018730(int param_1,int param_2,uint param_3)" identifier (parameter_list "(int param_1,int param_2,uint param_3)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "uint param_3" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  uint uVar2;\n  uint uVar3;\n  int iVar4;\n  \n  iVar4 = *(int *)(param_1 + 0x1c);\n  if (*(int *)(iVar4 + 0x38) == 0) {\n    iVar1 = (**(code **)(param_1 + 0x20))\n                      (*(undefined4 *)(param_1 + 0x28),1 << (*(uint *)(iVar4 + 0x28) & 0x1f),1);\n    *(int *)(iVar4 + 0x38) = iVar1;\n    if (iVar1 == 0) {\n      return 1;\n    }\n  }\n  if (*(int *)(iVar4 + 0x2c) == 0) {\n    *(int *)(iVar4 + 0x2c) = 1 << (*(uint *)(iVar4 + 0x28) & 0x1f);\n    *(undefined4 *)(iVar4 + 0x34) = 0;\n    *(undefined4 *)(iVar4 + 0x30) = 0;\n  }\n  uVar3 = *(uint *)(iVar4 + 0x2c);\n  if (param_3 < uVar3) {\n    uVar3 = uVar3 - *(int *)(iVar4 + 0x34);\n    if (param_3 <= uVar3) {\n      uVar3 = param_3;\n    }\n    (*(code *)PTR_memcpy_000370fc)\n              (*(int *)(iVar4 + 0x38) + *(int *)(iVar4 + 0x34),param_2 - param_3,uVar3);\n    iVar1 = param_3 - uVar3;\n    if (iVar1 == 0) {\n      uVar2 = uVar3 + *(int *)(iVar4 + 0x34);\n      *(uint *)(iVar4 + 0x34) = uVar2;\n      if (uVar2 == *(uint *)(iVar4 + 0x2c)) {\n        *(undefined4 *)(iVar4 + 0x34) = 0;\n      }\n      if (*(uint *)(iVar4 + 0x30) < *(uint *)(iVar4 + 0x2c)) {\n        *(uint *)(iVar4 + 0x30) = *(uint *)(iVar4 + 0x30) + uVar3;\n      }\n    }\n    else {\n      (*(code *)PTR_memcpy_000370fc)(*(undefined4 *)(iVar4 + 0x38),param_2 - iVar1,iVar1);\n      *(int *)(iVar4 + 0x34) = iVar1;\n      *(undefined4 *)(iVar4 + 0x30) = *(undefined4 *)(iVar4 + 0x2c);\n    }\n  }\n  else {\n    (*(code *)PTR_memcpy_000370fc)(*(undefined4 *)(iVar4 + 0x38),param_2 - uVar3,uVar3);\n    *(undefined4 *)(iVar4 + 0x34) = 0;\n    *(undefined4 *)(iVar4 + 0x30) = *(undefined4 *)(iVar4 + 0x2c);\n  }\n  return 0;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (expression_statement "iVar4 = *(int *)(param_1 + 0x1c);" (assignment_expression "iVar4 = *(int *)(param_1 + 0x1c)" identifier = (pointer_expression "*(int *)(param_1 + 0x1c)" * (cast_expression "(int *)(param_1 + 0x1c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1c)" ( (binary_expression "param_1 + 0x1c" identifier + number_literal) ))))) ;) (if_statement "if (*(int *)(iVar4 + 0x38) == 0) {\n    iVar1 = (**(code **)(param_1 + 0x20))\n                      (*(undefined4 *)(param_1 + 0x28),1 << (*(uint *)(iVar4 + 0x28) & 0x1f),1);\n    *(int *)(iVar4 + 0x38) = iVar1;\n    if (iVar1 == 0) {\n      return 1;\n    }\n  }" if (parenthesized_expression "(*(int *)(iVar4 + 0x38) == 0)" ( (binary_expression "*(int *)(iVar4 + 0x38) == 0" (pointer_expression "*(int *)(iVar4 + 0x38)" * (cast_expression "(int *)(iVar4 + 0x38)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar4 + 0x38)" ( (binary_expression "iVar4 + 0x38" identifier + number_literal) )))) == number_literal) )) (compound_statement "{\n    iVar1 = (**(code **)(param_1 + 0x20))\n                      (*(undefined4 *)(param_1 + 0x28),1 << (*(uint *)(iVar4 + 0x28) & 0x1f),1);\n    *(int *)(iVar4 + 0x38) = iVar1;\n    if (iVar1 == 0) {\n      return 1;\n    }\n  }" { (expression_statement "iVar1 = (**(code **)(param_1 + 0x20))\n                      (*(undefined4 *)(param_1 + 0x28),1 << (*(uint *)(iVar4 + 0x28) & 0x1f),1);" (assignment_expression "iVar1 = (**(code **)(param_1 + 0x20))\n                      (*(undefined4 *)(param_1 + 0x28),1 << (*(uint *)(iVar4 + 0x28) & 0x1f),1)" identifier = (call_expression "(**(code **)(param_1 + 0x20))\n                      (*(undefined4 *)(param_1 + 0x28),1 << (*(uint *)(iVar4 + 0x28) & 0x1f),1)" (parenthesized_expression "(**(code **)(param_1 + 0x20))" ( (pointer_expression "**(code **)(param_1 + 0x20)" * (pointer_expression "*(code **)(param_1 + 0x20)" * (cast_expression "(code **)(param_1 + 0x20)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x20)" ( (binary_expression "param_1 + 0x20" identifier + number_literal) ))))) )) (argument_list "(*(undefined4 *)(param_1 + 0x28),1 << (*(uint *)(iVar4 + 0x28) & 0x1f),1)" ( (pointer_expression "*(undefined4 *)(param_1 + 0x28)" * (cast_expression "(undefined4 *)(param_1 + 0x28)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x28)" ( (binary_expression "param_1 + 0x28" identifier + number_literal) )))) , (binary_expression "1 << (*(uint *)(iVar4 + 0x28) & 0x1f)" number_literal << (parenthesized_expression "(*(uint *)(iVar4 + 0x28) & 0x1f)" ( (binary_expression "*(uint *)(iVar4 + 0x28) & 0x1f" (pointer_expression "*(uint *)(iVar4 + 0x28)" * (cast_expression "(uint *)(iVar4 + 0x28)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar4 + 0x28)" ( (binary_expression "iVar4 + 0x28" identifier + number_literal) )))) & number_literal) ))) , number_literal )))) ;) (expression_statement "*(int *)(iVar4 + 0x38) = iVar1;" (assignment_expression "*(int *)(iVar4 + 0x38) = iVar1" (pointer_expression "*(int *)(iVar4 + 0x38)" * (cast_expression "(int *)(iVar4 + 0x38)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar4 + 0x38)" ( (binary_expression "iVar4 + 0x38" identifier + number_literal) )))) = identifier) ;) (if_statement "if (iVar1 == 0) {\n      return 1;\n    }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n      return 1;\n    }" { (return_statement "return 1;" return number_literal ;) })) })) (if_statement "if (*(int *)(iVar4 + 0x2c) == 0) {\n    *(int *)(iVar4 + 0x2c) = 1 << (*(uint *)(iVar4 + 0x28) & 0x1f);\n    *(undefined4 *)(iVar4 + 0x34) = 0;\n    *(undefined4 *)(iVar4 + 0x30) = 0;\n  }" if (parenthesized_expression "(*(int *)(iVar4 + 0x2c) == 0)" ( (binary_expression "*(int *)(iVar4 + 0x2c) == 0" (pointer_expression "*(int *)(iVar4 + 0x2c)" * (cast_expression "(int *)(iVar4 + 0x2c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar4 + 0x2c)" ( (binary_expression "iVar4 + 0x2c" identifier + number_literal) )))) == number_literal) )) (compound_statement "{\n    *(int *)(iVar4 + 0x2c) = 1 << (*(uint *)(iVar4 + 0x28) & 0x1f);\n    *(undefined4 *)(iVar4 + 0x34) = 0;\n    *(undefined4 *)(iVar4 + 0x30) = 0;\n  }" { (expression_statement "*(int *)(iVar4 + 0x2c) = 1 << (*(uint *)(iVar4 + 0x28) & 0x1f);" (assignment_expression "*(int *)(iVar4 + 0x2c) = 1 << (*(uint *)(iVar4 + 0x28) & 0x1f)" (pointer_expression "*(int *)(iVar4 + 0x2c)" * (cast_expression "(int *)(iVar4 + 0x2c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar4 + 0x2c)" ( (binary_expression "iVar4 + 0x2c" identifier + number_literal) )))) = (binary_expression "1 << (*(uint *)(iVar4 + 0x28) & 0x1f)" number_literal << (parenthesized_expression "(*(uint *)(iVar4 + 0x28) & 0x1f)" ( (binary_expression "*(uint *)(iVar4 + 0x28) & 0x1f" (pointer_expression "*(uint *)(iVar4 + 0x28)" * (cast_expression "(uint *)(iVar4 + 0x28)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar4 + 0x28)" ( (binary_expression "iVar4 + 0x28" identifier + number_literal) )))) & number_literal) )))) ;) (expression_statement "*(undefined4 *)(iVar4 + 0x34) = 0;" (assignment_expression "*(undefined4 *)(iVar4 + 0x34) = 0" (pointer_expression "*(undefined4 *)(iVar4 + 0x34)" * (cast_expression "(undefined4 *)(iVar4 + 0x34)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar4 + 0x34)" ( (binary_expression "iVar4 + 0x34" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined4 *)(iVar4 + 0x30) = 0;" (assignment_expression "*(undefined4 *)(iVar4 + 0x30) = 0" (pointer_expression "*(undefined4 *)(iVar4 + 0x30)" * (cast_expression "(undefined4 *)(iVar4 + 0x30)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar4 + 0x30)" ( (binary_expression "iVar4 + 0x30" identifier + number_literal) )))) = number_literal) ;) })) (expression_statement "uVar3 = *(uint *)(iVar4 + 0x2c);" (assignment_expression "uVar3 = *(uint *)(iVar4 + 0x2c)" identifier = (pointer_expression "*(uint *)(iVar4 + 0x2c)" * (cast_expression "(uint *)(iVar4 + 0x2c)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar4 + 0x2c)" ( (binary_expression "iVar4 + 0x2c" identifier + number_literal) ))))) ;) (if_statement "if (param_3 < uVar3) {\n    uVar3 = uVar3 - *(int *)(iVar4 + 0x34);\n    if (param_3 <= uVar3) {\n      uVar3 = param_3;\n    }\n    (*(code *)PTR_memcpy_000370fc)\n              (*(int *)(iVar4 + 0x38) + *(int *)(iVar4 + 0x34),param_2 - param_3,uVar3);\n    iVar1 = param_3 - uVar3;\n    if (iVar1 == 0) {\n      uVar2 = uVar3 + *(int *)(iVar4 + 0x34);\n      *(uint *)(iVar4 + 0x34) = uVar2;\n      if (uVar2 == *(uint *)(iVar4 + 0x2c)) {\n        *(undefined4 *)(iVar4 + 0x34) = 0;\n      }\n      if (*(uint *)(iVar4 + 0x30) < *(uint *)(iVar4 + 0x2c)) {\n        *(uint *)(iVar4 + 0x30) = *(uint *)(iVar4 + 0x30) + uVar3;\n      }\n    }\n    else {\n      (*(code *)PTR_memcpy_000370fc)(*(undefined4 *)(iVar4 + 0x38),param_2 - iVar1,iVar1);\n      *(int *)(iVar4 + 0x34) = iVar1;\n      *(undefined4 *)(iVar4 + 0x30) = *(undefined4 *)(iVar4 + 0x2c);\n    }\n  }\n  else {\n    (*(code *)PTR_memcpy_000370fc)(*(undefined4 *)(iVar4 + 0x38),param_2 - uVar3,uVar3);\n    *(undefined4 *)(iVar4 + 0x34) = 0;\n    *(undefined4 *)(iVar4 + 0x30) = *(undefined4 *)(iVar4 + 0x2c);\n  }" if (parenthesized_expression "(param_3 < uVar3)" ( (binary_expression "param_3 < uVar3" identifier < identifier) )) (compound_statement "{\n    uVar3 = uVar3 - *(int *)(iVar4 + 0x34);\n    if (param_3 <= uVar3) {\n      uVar3 = param_3;\n    }\n    (*(code *)PTR_memcpy_000370fc)\n              (*(int *)(iVar4 + 0x38) + *(int *)(iVar4 + 0x34),param_2 - param_3,uVar3);\n    iVar1 = param_3 - uVar3;\n    if (iVar1 == 0) {\n      uVar2 = uVar3 + *(int *)(iVar4 + 0x34);\n      *(uint *)(iVar4 + 0x34) = uVar2;\n      if (uVar2 == *(uint *)(iVar4 + 0x2c)) {\n        *(undefined4 *)(iVar4 + 0x34) = 0;\n      }\n      if (*(uint *)(iVar4 + 0x30) < *(uint *)(iVar4 + 0x2c)) {\n        *(uint *)(iVar4 + 0x30) = *(uint *)(iVar4 + 0x30) + uVar3;\n      }\n    }\n    else {\n      (*(code *)PTR_memcpy_000370fc)(*(undefined4 *)(iVar4 + 0x38),param_2 - iVar1,iVar1);\n      *(int *)(iVar4 + 0x34) = iVar1;\n      *(undefined4 *)(iVar4 + 0x30) = *(undefined4 *)(iVar4 + 0x2c);\n    }\n  }" { (expression_statement "uVar3 = uVar3 - *(int *)(iVar4 + 0x34);" (assignment_expression "uVar3 = uVar3 - *(int *)(iVar4 + 0x34)" identifier = (binary_expression "uVar3 - *(int *)(iVar4 + 0x34)" identifier - (pointer_expression "*(int *)(iVar4 + 0x34)" * (cast_expression "(int *)(iVar4 + 0x34)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar4 + 0x34)" ( (binary_expression "iVar4 + 0x34" identifier + number_literal) )))))) ;) (if_statement "if (param_3 <= uVar3) {\n      uVar3 = param_3;\n    }" if (parenthesized_expression "(param_3 <= uVar3)" ( (binary_expression "param_3 <= uVar3" identifier <= identifier) )) (compound_statement "{\n      uVar3 = param_3;\n    }" { (expression_statement "uVar3 = param_3;" (assignment_expression "uVar3 = param_3" identifier = identifier) ;) })) (expression_statement "(*(code *)PTR_memcpy_000370fc)\n              (*(int *)(iVar4 + 0x38) + *(int *)(iVar4 + 0x34),param_2 - param_3,uVar3);" (call_expression "(*(code *)PTR_memcpy_000370fc)\n              (*(int *)(iVar4 + 0x38) + *(int *)(iVar4 + 0x34),param_2 - param_3,uVar3)" (parenthesized_expression "(*(code *)PTR_memcpy_000370fc)" ( (pointer_expression "*(code *)PTR_memcpy_000370fc" * (cast_expression "(code *)PTR_memcpy_000370fc" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(*(int *)(iVar4 + 0x38) + *(int *)(iVar4 + 0x34),param_2 - param_3,uVar3)" ( (binary_expression "*(int *)(iVar4 + 0x38) + *(int *)(iVar4 + 0x34)" (pointer_expression "*(int *)(iVar4 + 0x38)" * (cast_expression "(int *)(iVar4 + 0x38)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar4 + 0x38)" ( (binary_expression "iVar4 + 0x38" identifier + number_literal) )))) + (pointer_expression "*(int *)(iVar4 + 0x34)" * (cast_expression "(int *)(iVar4 + 0x34)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar4 + 0x34)" ( (binary_expression "iVar4 + 0x34" identifier + number_literal) ))))) , (binary_expression "param_2 - param_3" identifier - identifier) , identifier ))) ;) (expression_statement "iVar1 = param_3 - uVar3;" (assignment_expression "iVar1 = param_3 - uVar3" identifier = (binary_expression "param_3 - uVar3" identifier - identifier)) ;) (if_statement "if (iVar1 == 0) {\n      uVar2 = uVar3 + *(int *)(iVar4 + 0x34);\n      *(uint *)(iVar4 + 0x34) = uVar2;\n      if (uVar2 == *(uint *)(iVar4 + 0x2c)) {\n        *(undefined4 *)(iVar4 + 0x34) = 0;\n      }\n      if (*(uint *)(iVar4 + 0x30) < *(uint *)(iVar4 + 0x2c)) {\n        *(uint *)(iVar4 + 0x30) = *(uint *)(iVar4 + 0x30) + uVar3;\n      }\n    }\n    else {\n      (*(code *)PTR_memcpy_000370fc)(*(undefined4 *)(iVar4 + 0x38),param_2 - iVar1,iVar1);\n      *(int *)(iVar4 + 0x34) = iVar1;\n      *(undefined4 *)(iVar4 + 0x30) = *(undefined4 *)(iVar4 + 0x2c);\n    }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n      uVar2 = uVar3 + *(int *)(iVar4 + 0x34);\n      *(uint *)(iVar4 + 0x34) = uVar2;\n      if (uVar2 == *(uint *)(iVar4 + 0x2c)) {\n        *(undefined4 *)(iVar4 + 0x34) = 0;\n      }\n      if (*(uint *)(iVar4 + 0x30) < *(uint *)(iVar4 + 0x2c)) {\n        *(uint *)(iVar4 + 0x30) = *(uint *)(iVar4 + 0x30) + uVar3;\n      }\n    }" { (expression_statement "uVar2 = uVar3 + *(int *)(iVar4 + 0x34);" (assignment_expression "uVar2 = uVar3 + *(int *)(iVar4 + 0x34)" identifier = (binary_expression "uVar3 + *(int *)(iVar4 + 0x34)" identifier + (pointer_expression "*(int *)(iVar4 + 0x34)" * (cast_expression "(int *)(iVar4 + 0x34)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar4 + 0x34)" ( (binary_expression "iVar4 + 0x34" identifier + number_literal) )))))) ;) (expression_statement "*(uint *)(iVar4 + 0x34) = uVar2;" (assignment_expression "*(uint *)(iVar4 + 0x34) = uVar2" (pointer_expression "*(uint *)(iVar4 + 0x34)" * (cast_expression "(uint *)(iVar4 + 0x34)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar4 + 0x34)" ( (binary_expression "iVar4 + 0x34" identifier + number_literal) )))) = identifier) ;) (if_statement "if (uVar2 == *(uint *)(iVar4 + 0x2c)) {\n        *(undefined4 *)(iVar4 + 0x34) = 0;\n      }" if (parenthesized_expression "(uVar2 == *(uint *)(iVar4 + 0x2c))" ( (binary_expression "uVar2 == *(uint *)(iVar4 + 0x2c)" identifier == (pointer_expression "*(uint *)(iVar4 + 0x2c)" * (cast_expression "(uint *)(iVar4 + 0x2c)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar4 + 0x2c)" ( (binary_expression "iVar4 + 0x2c" identifier + number_literal) ))))) )) (compound_statement "{\n        *(undefined4 *)(iVar4 + 0x34) = 0;\n      }" { (expression_statement "*(undefined4 *)(iVar4 + 0x34) = 0;" (assignment_expression "*(undefined4 *)(iVar4 + 0x34) = 0" (pointer_expression "*(undefined4 *)(iVar4 + 0x34)" * (cast_expression "(undefined4 *)(iVar4 + 0x34)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar4 + 0x34)" ( (binary_expression "iVar4 + 0x34" identifier + number_literal) )))) = number_literal) ;) })) (if_statement "if (*(uint *)(iVar4 + 0x30) < *(uint *)(iVar4 + 0x2c)) {\n        *(uint *)(iVar4 + 0x30) = *(uint *)(iVar4 + 0x30) + uVar3;\n      }" if (parenthesized_expression "(*(uint *)(iVar4 + 0x30) < *(uint *)(iVar4 + 0x2c))" ( (binary_expression "*(uint *)(iVar4 + 0x30) < *(uint *)(iVar4 + 0x2c)" (pointer_expression "*(uint *)(iVar4 + 0x30)" * (cast_expression "(uint *)(iVar4 + 0x30)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar4 + 0x30)" ( (binary_expression "iVar4 + 0x30" identifier + number_literal) )))) < (pointer_expression "*(uint *)(iVar4 + 0x2c)" * (cast_expression "(uint *)(iVar4 + 0x2c)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar4 + 0x2c)" ( (binary_expression "iVar4 + 0x2c" identifier + number_literal) ))))) )) (compound_statement "{\n        *(uint *)(iVar4 + 0x30) = *(uint *)(iVar4 + 0x30) + uVar3;\n      }" { (expression_statement "*(uint *)(iVar4 + 0x30) = *(uint *)(iVar4 + 0x30) + uVar3;" (assignment_expression "*(uint *)(iVar4 + 0x30) = *(uint *)(iVar4 + 0x30) + uVar3" (pointer_expression "*(uint *)(iVar4 + 0x30)" * (cast_expression "(uint *)(iVar4 + 0x30)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar4 + 0x30)" ( (binary_expression "iVar4 + 0x30" identifier + number_literal) )))) = (binary_expression "*(uint *)(iVar4 + 0x30) + uVar3" (pointer_expression "*(uint *)(iVar4 + 0x30)" * (cast_expression "(uint *)(iVar4 + 0x30)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar4 + 0x30)" ( (binary_expression "iVar4 + 0x30" identifier + number_literal) )))) + identifier)) ;) })) }) (else_clause "else {\n      (*(code *)PTR_memcpy_000370fc)(*(undefined4 *)(iVar4 + 0x38),param_2 - iVar1,iVar1);\n      *(int *)(iVar4 + 0x34) = iVar1;\n      *(undefined4 *)(iVar4 + 0x30) = *(undefined4 *)(iVar4 + 0x2c);\n    }" else (compound_statement "{\n      (*(code *)PTR_memcpy_000370fc)(*(undefined4 *)(iVar4 + 0x38),param_2 - iVar1,iVar1);\n      *(int *)(iVar4 + 0x34) = iVar1;\n      *(undefined4 *)(iVar4 + 0x30) = *(undefined4 *)(iVar4 + 0x2c);\n    }" { (expression_statement "(*(code *)PTR_memcpy_000370fc)(*(undefined4 *)(iVar4 + 0x38),param_2 - iVar1,iVar1);" (call_expression "(*(code *)PTR_memcpy_000370fc)(*(undefined4 *)(iVar4 + 0x38),param_2 - iVar1,iVar1)" (parenthesized_expression "(*(code *)PTR_memcpy_000370fc)" ( (pointer_expression "*(code *)PTR_memcpy_000370fc" * (cast_expression "(code *)PTR_memcpy_000370fc" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(*(undefined4 *)(iVar4 + 0x38),param_2 - iVar1,iVar1)" ( (pointer_expression "*(undefined4 *)(iVar4 + 0x38)" * (cast_expression "(undefined4 *)(iVar4 + 0x38)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar4 + 0x38)" ( (binary_expression "iVar4 + 0x38" identifier + number_literal) )))) , (binary_expression "param_2 - iVar1" identifier - identifier) , identifier ))) ;) (expression_statement "*(int *)(iVar4 + 0x34) = iVar1;" (assignment_expression "*(int *)(iVar4 + 0x34) = iVar1" (pointer_expression "*(int *)(iVar4 + 0x34)" * (cast_expression "(int *)(iVar4 + 0x34)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar4 + 0x34)" ( (binary_expression "iVar4 + 0x34" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(undefined4 *)(iVar4 + 0x30) = *(undefined4 *)(iVar4 + 0x2c);" (assignment_expression "*(undefined4 *)(iVar4 + 0x30) = *(undefined4 *)(iVar4 + 0x2c)" (pointer_expression "*(undefined4 *)(iVar4 + 0x30)" * (cast_expression "(undefined4 *)(iVar4 + 0x30)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar4 + 0x30)" ( (binary_expression "iVar4 + 0x30" identifier + number_literal) )))) = (pointer_expression "*(undefined4 *)(iVar4 + 0x2c)" * (cast_expression "(undefined4 *)(iVar4 + 0x2c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar4 + 0x2c)" ( (binary_expression "iVar4 + 0x2c" identifier + number_literal) ))))) ;) }))) }) (else_clause "else {\n    (*(code *)PTR_memcpy_000370fc)(*(undefined4 *)(iVar4 + 0x38),param_2 - uVar3,uVar3);\n    *(undefined4 *)(iVar4 + 0x34) = 0;\n    *(undefined4 *)(iVar4 + 0x30) = *(undefined4 *)(iVar4 + 0x2c);\n  }" else (compound_statement "{\n    (*(code *)PTR_memcpy_000370fc)(*(undefined4 *)(iVar4 + 0x38),param_2 - uVar3,uVar3);\n    *(undefined4 *)(iVar4 + 0x34) = 0;\n    *(undefined4 *)(iVar4 + 0x30) = *(undefined4 *)(iVar4 + 0x2c);\n  }" { (expression_statement "(*(code *)PTR_memcpy_000370fc)(*(undefined4 *)(iVar4 + 0x38),param_2 - uVar3,uVar3);" (call_expression "(*(code *)PTR_memcpy_000370fc)(*(undefined4 *)(iVar4 + 0x38),param_2 - uVar3,uVar3)" (parenthesized_expression "(*(code *)PTR_memcpy_000370fc)" ( (pointer_expression "*(code *)PTR_memcpy_000370fc" * (cast_expression "(code *)PTR_memcpy_000370fc" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(*(undefined4 *)(iVar4 + 0x38),param_2 - uVar3,uVar3)" ( (pointer_expression "*(undefined4 *)(iVar4 + 0x38)" * (cast_expression "(undefined4 *)(iVar4 + 0x38)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar4 + 0x38)" ( (binary_expression "iVar4 + 0x38" identifier + number_literal) )))) , (binary_expression "param_2 - uVar3" identifier - identifier) , identifier ))) ;) (expression_statement "*(undefined4 *)(iVar4 + 0x34) = 0;" (assignment_expression "*(undefined4 *)(iVar4 + 0x34) = 0" (pointer_expression "*(undefined4 *)(iVar4 + 0x34)" * (cast_expression "(undefined4 *)(iVar4 + 0x34)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar4 + 0x34)" ( (binary_expression "iVar4 + 0x34" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined4 *)(iVar4 + 0x30) = *(undefined4 *)(iVar4 + 0x2c);" (assignment_expression "*(undefined4 *)(iVar4 + 0x30) = *(undefined4 *)(iVar4 + 0x2c)" (pointer_expression "*(undefined4 *)(iVar4 + 0x30)" * (cast_expression "(undefined4 *)(iVar4 + 0x30)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar4 + 0x30)" ( (binary_expression "iVar4 + 0x30" identifier + number_literal) )))) = (pointer_expression "*(undefined4 *)(iVar4 + 0x2c)" * (cast_expression "(undefined4 *)(iVar4 + 0x2c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar4 + 0x2c)" ( (binary_expression "iVar4 + 0x2c" identifier + number_literal) ))))) ;) }))) (return_statement "return 0;" return number_literal ;) })))
(translation_unit "int updatewindow(z_streamp strm,Bytef *end,uint copy)\n\n{\n  Bytef *pBVar1;\n  uint uVar2;\n  uint uVar3;\n  internal_state *piVar4;\n  uInt uVar5;\n  \n  piVar4 = strm->state;\n  if (piVar4->window == (Bytef *)0x0) {\n    pBVar1 = (Bytef *)(*strm->zalloc)(strm->opaque,1 << (piVar4->last_flush & 0x1fU),1);\n    piVar4->window = pBVar1;\n    if (pBVar1 == (Bytef *)0x0) {\n      return 1;\n    }\n  }\n  if (piVar4->w_size == 0) {\n    piVar4->w_size = 1 << (piVar4->last_flush & 0x1fU);\n    piVar4->w_mask = 0;\n    piVar4->w_bits = 0;\n  }\n  uVar3 = piVar4->w_size;\n  if (copy < uVar3) {\n    uVar3 = uVar3 - piVar4->w_mask;\n    if (copy <= uVar3) {\n      uVar3 = copy;\n    }\n    (*(code *)PTR_memcpy_000370fc)(piVar4->window + piVar4->w_mask,(int)end - copy,uVar3);\n    uVar5 = copy - uVar3;\n    if (uVar5 == 0) {\n      uVar2 = uVar3 + piVar4->w_mask;\n      piVar4->w_mask = uVar2;\n      if (uVar2 == piVar4->w_size) {\n        piVar4->w_mask = 0;\n      }\n      if (piVar4->w_bits < piVar4->w_size) {\n        piVar4->w_bits = piVar4->w_bits + uVar3;\n      }\n    }\n    else {\n      (*(code *)PTR_memcpy_000370fc)(piVar4->window,(int)end - uVar5,uVar5);\n      piVar4->w_mask = uVar5;\n      piVar4->w_bits = piVar4->w_size;\n    }\n  }\n  else {\n    (*(code *)PTR_memcpy_000370fc)(piVar4->window,(int)end - uVar3,uVar3);\n    piVar4->w_mask = 0;\n    piVar4->w_bits = piVar4->w_size;\n  }\n  return 0;\n}\n\n" (function_definition "int updatewindow(z_streamp strm,Bytef *end,uint copy)\n\n{\n  Bytef *pBVar1;\n  uint uVar2;\n  uint uVar3;\n  internal_state *piVar4;\n  uInt uVar5;\n  \n  piVar4 = strm->state;\n  if (piVar4->window == (Bytef *)0x0) {\n    pBVar1 = (Bytef *)(*strm->zalloc)(strm->opaque,1 << (piVar4->last_flush & 0x1fU),1);\n    piVar4->window = pBVar1;\n    if (pBVar1 == (Bytef *)0x0) {\n      return 1;\n    }\n  }\n  if (piVar4->w_size == 0) {\n    piVar4->w_size = 1 << (piVar4->last_flush & 0x1fU);\n    piVar4->w_mask = 0;\n    piVar4->w_bits = 0;\n  }\n  uVar3 = piVar4->w_size;\n  if (copy < uVar3) {\n    uVar3 = uVar3 - piVar4->w_mask;\n    if (copy <= uVar3) {\n      uVar3 = copy;\n    }\n    (*(code *)PTR_memcpy_000370fc)(piVar4->window + piVar4->w_mask,(int)end - copy,uVar3);\n    uVar5 = copy - uVar3;\n    if (uVar5 == 0) {\n      uVar2 = uVar3 + piVar4->w_mask;\n      piVar4->w_mask = uVar2;\n      if (uVar2 == piVar4->w_size) {\n        piVar4->w_mask = 0;\n      }\n      if (piVar4->w_bits < piVar4->w_size) {\n        piVar4->w_bits = piVar4->w_bits + uVar3;\n      }\n    }\n    else {\n      (*(code *)PTR_memcpy_000370fc)(piVar4->window,(int)end - uVar5,uVar5);\n      piVar4->w_mask = uVar5;\n      piVar4->w_bits = piVar4->w_size;\n    }\n  }\n  else {\n    (*(code *)PTR_memcpy_000370fc)(piVar4->window,(int)end - uVar3,uVar3);\n    piVar4->w_mask = 0;\n    piVar4->w_bits = piVar4->w_size;\n  }\n  return 0;\n}" primitive_type (function_declarator "updatewindow(z_streamp strm,Bytef *end,uint copy)" identifier (parameter_list "(z_streamp strm,Bytef *end,uint copy)" ( (parameter_declaration "z_streamp strm" type_identifier identifier) , (parameter_declaration "Bytef *end" type_identifier (pointer_declarator "*end" * identifier)) , (parameter_declaration "uint copy" type_identifier identifier) ))) (compound_statement "{\n  Bytef *pBVar1;\n  uint uVar2;\n  uint uVar3;\n  internal_state *piVar4;\n  uInt uVar5;\n  \n  piVar4 = strm->state;\n  if (piVar4->window == (Bytef *)0x0) {\n    pBVar1 = (Bytef *)(*strm->zalloc)(strm->opaque,1 << (piVar4->last_flush & 0x1fU),1);\n    piVar4->window = pBVar1;\n    if (pBVar1 == (Bytef *)0x0) {\n      return 1;\n    }\n  }\n  if (piVar4->w_size == 0) {\n    piVar4->w_size = 1 << (piVar4->last_flush & 0x1fU);\n    piVar4->w_mask = 0;\n    piVar4->w_bits = 0;\n  }\n  uVar3 = piVar4->w_size;\n  if (copy < uVar3) {\n    uVar3 = uVar3 - piVar4->w_mask;\n    if (copy <= uVar3) {\n      uVar3 = copy;\n    }\n    (*(code *)PTR_memcpy_000370fc)(piVar4->window + piVar4->w_mask,(int)end - copy,uVar3);\n    uVar5 = copy - uVar3;\n    if (uVar5 == 0) {\n      uVar2 = uVar3 + piVar4->w_mask;\n      piVar4->w_mask = uVar2;\n      if (uVar2 == piVar4->w_size) {\n        piVar4->w_mask = 0;\n      }\n      if (piVar4->w_bits < piVar4->w_size) {\n        piVar4->w_bits = piVar4->w_bits + uVar3;\n      }\n    }\n    else {\n      (*(code *)PTR_memcpy_000370fc)(piVar4->window,(int)end - uVar5,uVar5);\n      piVar4->w_mask = uVar5;\n      piVar4->w_bits = piVar4->w_size;\n    }\n  }\n  else {\n    (*(code *)PTR_memcpy_000370fc)(piVar4->window,(int)end - uVar3,uVar3);\n    piVar4->w_mask = 0;\n    piVar4->w_bits = piVar4->w_size;\n  }\n  return 0;\n}" { (declaration "Bytef *pBVar1;" type_identifier (pointer_declarator "*pBVar1" * identifier) ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "internal_state *piVar4;" type_identifier (pointer_declarator "*piVar4" * identifier) ;) (declaration "uInt uVar5;" type_identifier identifier ;) (expression_statement "piVar4 = strm->state;" (assignment_expression "piVar4 = strm->state" identifier = (field_expression "strm->state" identifier -> field_identifier)) ;) (if_statement "if (piVar4->window == (Bytef *)0x0) {\n    pBVar1 = (Bytef *)(*strm->zalloc)(strm->opaque,1 << (piVar4->last_flush & 0x1fU),1);\n    piVar4->window = pBVar1;\n    if (pBVar1 == (Bytef *)0x0) {\n      return 1;\n    }\n  }" if (parenthesized_expression "(piVar4->window == (Bytef *)0x0)" ( (binary_expression "piVar4->window == (Bytef *)0x0" (field_expression "piVar4->window" identifier -> field_identifier) == (cast_expression "(Bytef *)0x0" ( (type_descriptor "Bytef *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    pBVar1 = (Bytef *)(*strm->zalloc)(strm->opaque,1 << (piVar4->last_flush & 0x1fU),1);\n    piVar4->window = pBVar1;\n    if (pBVar1 == (Bytef *)0x0) {\n      return 1;\n    }\n  }" { (expression_statement "pBVar1 = (Bytef *)(*strm->zalloc)(strm->opaque,1 << (piVar4->last_flush & 0x1fU),1);" (assignment_expression "pBVar1 = (Bytef *)(*strm->zalloc)(strm->opaque,1 << (piVar4->last_flush & 0x1fU),1)" identifier = (cast_expression "(Bytef *)(*strm->zalloc)(strm->opaque,1 << (piVar4->last_flush & 0x1fU),1)" ( (type_descriptor "Bytef *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "(*strm->zalloc)(strm->opaque,1 << (piVar4->last_flush & 0x1fU),1)" (parenthesized_expression "(*strm->zalloc)" ( (pointer_expression "*strm->zalloc" * (field_expression "strm->zalloc" identifier -> field_identifier)) )) (argument_list "(strm->opaque,1 << (piVar4->last_flush & 0x1fU),1)" ( (field_expression "strm->opaque" identifier -> field_identifier) , (binary_expression "1 << (piVar4->last_flush & 0x1fU)" number_literal << (parenthesized_expression "(piVar4->last_flush & 0x1fU)" ( (binary_expression "piVar4->last_flush & 0x1fU" (field_expression "piVar4->last_flush" identifier -> field_identifier) & number_literal) ))) , number_literal ))))) ;) (expression_statement "piVar4->window = pBVar1;" (assignment_expression "piVar4->window = pBVar1" (field_expression "piVar4->window" identifier -> field_identifier) = identifier) ;) (if_statement "if (pBVar1 == (Bytef *)0x0) {\n      return 1;\n    }" if (parenthesized_expression "(pBVar1 == (Bytef *)0x0)" ( (binary_expression "pBVar1 == (Bytef *)0x0" identifier == (cast_expression "(Bytef *)0x0" ( (type_descriptor "Bytef *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      return 1;\n    }" { (return_statement "return 1;" return number_literal ;) })) })) (if_statement "if (piVar4->w_size == 0) {\n    piVar4->w_size = 1 << (piVar4->last_flush & 0x1fU);\n    piVar4->w_mask = 0;\n    piVar4->w_bits = 0;\n  }" if (parenthesized_expression "(piVar4->w_size == 0)" ( (binary_expression "piVar4->w_size == 0" (field_expression "piVar4->w_size" identifier -> field_identifier) == number_literal) )) (compound_statement "{\n    piVar4->w_size = 1 << (piVar4->last_flush & 0x1fU);\n    piVar4->w_mask = 0;\n    piVar4->w_bits = 0;\n  }" { (expression_statement "piVar4->w_size = 1 << (piVar4->last_flush & 0x1fU);" (assignment_expression "piVar4->w_size = 1 << (piVar4->last_flush & 0x1fU)" (field_expression "piVar4->w_size" identifier -> field_identifier) = (binary_expression "1 << (piVar4->last_flush & 0x1fU)" number_literal << (parenthesized_expression "(piVar4->last_flush & 0x1fU)" ( (binary_expression "piVar4->last_flush & 0x1fU" (field_expression "piVar4->last_flush" identifier -> field_identifier) & number_literal) )))) ;) (expression_statement "piVar4->w_mask = 0;" (assignment_expression "piVar4->w_mask = 0" (field_expression "piVar4->w_mask" identifier -> field_identifier) = number_literal) ;) (expression_statement "piVar4->w_bits = 0;" (assignment_expression "piVar4->w_bits = 0" (field_expression "piVar4->w_bits" identifier -> field_identifier) = number_literal) ;) })) (expression_statement "uVar3 = piVar4->w_size;" (assignment_expression "uVar3 = piVar4->w_size" identifier = (field_expression "piVar4->w_size" identifier -> field_identifier)) ;) (if_statement "if (copy < uVar3) {\n    uVar3 = uVar3 - piVar4->w_mask;\n    if (copy <= uVar3) {\n      uVar3 = copy;\n    }\n    (*(code *)PTR_memcpy_000370fc)(piVar4->window + piVar4->w_mask,(int)end - copy,uVar3);\n    uVar5 = copy - uVar3;\n    if (uVar5 == 0) {\n      uVar2 = uVar3 + piVar4->w_mask;\n      piVar4->w_mask = uVar2;\n      if (uVar2 == piVar4->w_size) {\n        piVar4->w_mask = 0;\n      }\n      if (piVar4->w_bits < piVar4->w_size) {\n        piVar4->w_bits = piVar4->w_bits + uVar3;\n      }\n    }\n    else {\n      (*(code *)PTR_memcpy_000370fc)(piVar4->window,(int)end - uVar5,uVar5);\n      piVar4->w_mask = uVar5;\n      piVar4->w_bits = piVar4->w_size;\n    }\n  }\n  else {\n    (*(code *)PTR_memcpy_000370fc)(piVar4->window,(int)end - uVar3,uVar3);\n    piVar4->w_mask = 0;\n    piVar4->w_bits = piVar4->w_size;\n  }" if (parenthesized_expression "(copy < uVar3)" ( (binary_expression "copy < uVar3" identifier < identifier) )) (compound_statement "{\n    uVar3 = uVar3 - piVar4->w_mask;\n    if (copy <= uVar3) {\n      uVar3 = copy;\n    }\n    (*(code *)PTR_memcpy_000370fc)(piVar4->window + piVar4->w_mask,(int)end - copy,uVar3);\n    uVar5 = copy - uVar3;\n    if (uVar5 == 0) {\n      uVar2 = uVar3 + piVar4->w_mask;\n      piVar4->w_mask = uVar2;\n      if (uVar2 == piVar4->w_size) {\n        piVar4->w_mask = 0;\n      }\n      if (piVar4->w_bits < piVar4->w_size) {\n        piVar4->w_bits = piVar4->w_bits + uVar3;\n      }\n    }\n    else {\n      (*(code *)PTR_memcpy_000370fc)(piVar4->window,(int)end - uVar5,uVar5);\n      piVar4->w_mask = uVar5;\n      piVar4->w_bits = piVar4->w_size;\n    }\n  }" { (expression_statement "uVar3 = uVar3 - piVar4->w_mask;" (assignment_expression "uVar3 = uVar3 - piVar4->w_mask" identifier = (binary_expression "uVar3 - piVar4->w_mask" identifier - (field_expression "piVar4->w_mask" identifier -> field_identifier))) ;) (if_statement "if (copy <= uVar3) {\n      uVar3 = copy;\n    }" if (parenthesized_expression "(copy <= uVar3)" ( (binary_expression "copy <= uVar3" identifier <= identifier) )) (compound_statement "{\n      uVar3 = copy;\n    }" { (expression_statement "uVar3 = copy;" (assignment_expression "uVar3 = copy" identifier = identifier) ;) })) (expression_statement "(*(code *)PTR_memcpy_000370fc)(piVar4->window + piVar4->w_mask,(int)end - copy,uVar3);" (call_expression "(*(code *)PTR_memcpy_000370fc)(piVar4->window + piVar4->w_mask,(int)end - copy,uVar3)" (parenthesized_expression "(*(code *)PTR_memcpy_000370fc)" ( (pointer_expression "*(code *)PTR_memcpy_000370fc" * (cast_expression "(code *)PTR_memcpy_000370fc" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(piVar4->window + piVar4->w_mask,(int)end - copy,uVar3)" ( (binary_expression "piVar4->window + piVar4->w_mask" (field_expression "piVar4->window" identifier -> field_identifier) + (field_expression "piVar4->w_mask" identifier -> field_identifier)) , (binary_expression "(int)end - copy" (cast_expression "(int)end" ( (type_descriptor "int" primitive_type) ) identifier) - identifier) , identifier ))) ;) (expression_statement "uVar5 = copy - uVar3;" (assignment_expression "uVar5 = copy - uVar3" identifier = (binary_expression "copy - uVar3" identifier - identifier)) ;) (if_statement "if (uVar5 == 0) {\n      uVar2 = uVar3 + piVar4->w_mask;\n      piVar4->w_mask = uVar2;\n      if (uVar2 == piVar4->w_size) {\n        piVar4->w_mask = 0;\n      }\n      if (piVar4->w_bits < piVar4->w_size) {\n        piVar4->w_bits = piVar4->w_bits + uVar3;\n      }\n    }\n    else {\n      (*(code *)PTR_memcpy_000370fc)(piVar4->window,(int)end - uVar5,uVar5);\n      piVar4->w_mask = uVar5;\n      piVar4->w_bits = piVar4->w_size;\n    }" if (parenthesized_expression "(uVar5 == 0)" ( (binary_expression "uVar5 == 0" identifier == number_literal) )) (compound_statement "{\n      uVar2 = uVar3 + piVar4->w_mask;\n      piVar4->w_mask = uVar2;\n      if (uVar2 == piVar4->w_size) {\n        piVar4->w_mask = 0;\n      }\n      if (piVar4->w_bits < piVar4->w_size) {\n        piVar4->w_bits = piVar4->w_bits + uVar3;\n      }\n    }" { (expression_statement "uVar2 = uVar3 + piVar4->w_mask;" (assignment_expression "uVar2 = uVar3 + piVar4->w_mask" identifier = (binary_expression "uVar3 + piVar4->w_mask" identifier + (field_expression "piVar4->w_mask" identifier -> field_identifier))) ;) (expression_statement "piVar4->w_mask = uVar2;" (assignment_expression "piVar4->w_mask = uVar2" (field_expression "piVar4->w_mask" identifier -> field_identifier) = identifier) ;) (if_statement "if (uVar2 == piVar4->w_size) {\n        piVar4->w_mask = 0;\n      }" if (parenthesized_expression "(uVar2 == piVar4->w_size)" ( (binary_expression "uVar2 == piVar4->w_size" identifier == (field_expression "piVar4->w_size" identifier -> field_identifier)) )) (compound_statement "{\n        piVar4->w_mask = 0;\n      }" { (expression_statement "piVar4->w_mask = 0;" (assignment_expression "piVar4->w_mask = 0" (field_expression "piVar4->w_mask" identifier -> field_identifier) = number_literal) ;) })) (if_statement "if (piVar4->w_bits < piVar4->w_size) {\n        piVar4->w_bits = piVar4->w_bits + uVar3;\n      }" if (parenthesized_expression "(piVar4->w_bits < piVar4->w_size)" ( (binary_expression "piVar4->w_bits < piVar4->w_size" (field_expression "piVar4->w_bits" identifier -> field_identifier) < (field_expression "piVar4->w_size" identifier -> field_identifier)) )) (compound_statement "{\n        piVar4->w_bits = piVar4->w_bits + uVar3;\n      }" { (expression_statement "piVar4->w_bits = piVar4->w_bits + uVar3;" (assignment_expression "piVar4->w_bits = piVar4->w_bits + uVar3" (field_expression "piVar4->w_bits" identifier -> field_identifier) = (binary_expression "piVar4->w_bits + uVar3" (field_expression "piVar4->w_bits" identifier -> field_identifier) + identifier)) ;) })) }) (else_clause "else {\n      (*(code *)PTR_memcpy_000370fc)(piVar4->window,(int)end - uVar5,uVar5);\n      piVar4->w_mask = uVar5;\n      piVar4->w_bits = piVar4->w_size;\n    }" else (compound_statement "{\n      (*(code *)PTR_memcpy_000370fc)(piVar4->window,(int)end - uVar5,uVar5);\n      piVar4->w_mask = uVar5;\n      piVar4->w_bits = piVar4->w_size;\n    }" { (expression_statement "(*(code *)PTR_memcpy_000370fc)(piVar4->window,(int)end - uVar5,uVar5);" (call_expression "(*(code *)PTR_memcpy_000370fc)(piVar4->window,(int)end - uVar5,uVar5)" (parenthesized_expression "(*(code *)PTR_memcpy_000370fc)" ( (pointer_expression "*(code *)PTR_memcpy_000370fc" * (cast_expression "(code *)PTR_memcpy_000370fc" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(piVar4->window,(int)end - uVar5,uVar5)" ( (field_expression "piVar4->window" identifier -> field_identifier) , (binary_expression "(int)end - uVar5" (cast_expression "(int)end" ( (type_descriptor "int" primitive_type) ) identifier) - identifier) , identifier ))) ;) (expression_statement "piVar4->w_mask = uVar5;" (assignment_expression "piVar4->w_mask = uVar5" (field_expression "piVar4->w_mask" identifier -> field_identifier) = identifier) ;) (expression_statement "piVar4->w_bits = piVar4->w_size;" (assignment_expression "piVar4->w_bits = piVar4->w_size" (field_expression "piVar4->w_bits" identifier -> field_identifier) = (field_expression "piVar4->w_size" identifier -> field_identifier)) ;) }))) }) (else_clause "else {\n    (*(code *)PTR_memcpy_000370fc)(piVar4->window,(int)end - uVar3,uVar3);\n    piVar4->w_mask = 0;\n    piVar4->w_bits = piVar4->w_size;\n  }" else (compound_statement "{\n    (*(code *)PTR_memcpy_000370fc)(piVar4->window,(int)end - uVar3,uVar3);\n    piVar4->w_mask = 0;\n    piVar4->w_bits = piVar4->w_size;\n  }" { (expression_statement "(*(code *)PTR_memcpy_000370fc)(piVar4->window,(int)end - uVar3,uVar3);" (call_expression "(*(code *)PTR_memcpy_000370fc)(piVar4->window,(int)end - uVar3,uVar3)" (parenthesized_expression "(*(code *)PTR_memcpy_000370fc)" ( (pointer_expression "*(code *)PTR_memcpy_000370fc" * (cast_expression "(code *)PTR_memcpy_000370fc" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(piVar4->window,(int)end - uVar3,uVar3)" ( (field_expression "piVar4->window" identifier -> field_identifier) , (binary_expression "(int)end - uVar3" (cast_expression "(int)end" ( (type_descriptor "int" primitive_type) ) identifier) - identifier) , identifier ))) ;) (expression_statement "piVar4->w_mask = 0;" (assignment_expression "piVar4->w_mask = 0" (field_expression "piVar4->w_mask" identifier -> field_identifier) = number_literal) ;) (expression_statement "piVar4->w_bits = piVar4->w_size;" (assignment_expression "piVar4->w_bits = piVar4->w_size" (field_expression "piVar4->w_bits" identifier -> field_identifier) = (field_expression "piVar4->w_size" identifier -> field_identifier)) ;) }))) (return_statement "return 0;" return number_literal ;) })))
(translation_unit "undefined4 FUN_00018730(int param_1,int param_2,uint param_3)\n\n{\n  int iVar1;\n  uint uVar2;\n  uint uVar3;\n  int iVar4;\n  \n  iVar4 = *(int *)(param_1 + 0x1c);\n  if (*(int *)(iVar4 + 0x38) == 0) {\n    iVar1 = (**(code **)(param_1 + 0x20))\n                      (*(undefined4 *)(param_1 + 0x28),1 << (*(uint *)(iVar4 + 0x28) & 0x1f),1);\n    *(int *)(iVar4 + 0x38) = iVar1;\n    if (iVar1 == 0) {\n      return 1;\n    }\n  }\n  if (*(int *)(iVar4 + 0x2c) == 0) {\n    *(int *)(iVar4 + 0x2c) = 1 << (*(uint *)(iVar4 + 0x28) & 0x1f);\n    *(undefined4 *)(iVar4 + 0x34) = 0;\n    *(undefined4 *)(iVar4 + 0x30) = 0;\n  }\n  uVar3 = *(uint *)(iVar4 + 0x2c);\n  if (param_3 < uVar3) {\n    uVar3 = uVar3 - *(int *)(iVar4 + 0x34);\n    if (param_3 <= uVar3) {\n      uVar3 = param_3;\n    }\n    (*(code *)PTR_memcpy_000370fc)\n              (*(int *)(iVar4 + 0x38) + *(int *)(iVar4 + 0x34),param_2 - param_3,uVar3);\n    iVar1 = param_3 - uVar3;\n    if (iVar1 == 0) {\n      uVar2 = uVar3 + *(int *)(iVar4 + 0x34);\n      *(uint *)(iVar4 + 0x34) = uVar2;\n      if (uVar2 == *(uint *)(iVar4 + 0x2c)) {\n        *(undefined4 *)(iVar4 + 0x34) = 0;\n      }\n      if (*(uint *)(iVar4 + 0x30) < *(uint *)(iVar4 + 0x2c)) {\n        *(uint *)(iVar4 + 0x30) = *(uint *)(iVar4 + 0x30) + uVar3;\n      }\n    }\n    else {\n      (*(code *)PTR_memcpy_000370fc)(*(undefined4 *)(iVar4 + 0x38),param_2 - iVar1,iVar1);\n      *(int *)(iVar4 + 0x34) = iVar1;\n      *(undefined4 *)(iVar4 + 0x30) = *(undefined4 *)(iVar4 + 0x2c);\n    }\n  }\n  else {\n    (*(code *)PTR_memcpy_000370fc)(*(undefined4 *)(iVar4 + 0x38),param_2 - uVar3,uVar3);\n    *(undefined4 *)(iVar4 + 0x34) = 0;\n    *(undefined4 *)(iVar4 + 0x30) = *(undefined4 *)(iVar4 + 0x2c);\n  }\n  return 0;\n}\n\n" (function_definition "undefined4 FUN_00018730(int param_1,int param_2,uint param_3)\n\n{\n  int iVar1;\n  uint uVar2;\n  uint uVar3;\n  int iVar4;\n  \n  iVar4 = *(int *)(param_1 + 0x1c);\n  if (*(int *)(iVar4 + 0x38) == 0) {\n    iVar1 = (**(code **)(param_1 + 0x20))\n                      (*(undefined4 *)(param_1 + 0x28),1 << (*(uint *)(iVar4 + 0x28) & 0x1f),1);\n    *(int *)(iVar4 + 0x38) = iVar1;\n    if (iVar1 == 0) {\n      return 1;\n    }\n  }\n  if (*(int *)(iVar4 + 0x2c) == 0) {\n    *(int *)(iVar4 + 0x2c) = 1 << (*(uint *)(iVar4 + 0x28) & 0x1f);\n    *(undefined4 *)(iVar4 + 0x34) = 0;\n    *(undefined4 *)(iVar4 + 0x30) = 0;\n  }\n  uVar3 = *(uint *)(iVar4 + 0x2c);\n  if (param_3 < uVar3) {\n    uVar3 = uVar3 - *(int *)(iVar4 + 0x34);\n    if (param_3 <= uVar3) {\n      uVar3 = param_3;\n    }\n    (*(code *)PTR_memcpy_000370fc)\n              (*(int *)(iVar4 + 0x38) + *(int *)(iVar4 + 0x34),param_2 - param_3,uVar3);\n    iVar1 = param_3 - uVar3;\n    if (iVar1 == 0) {\n      uVar2 = uVar3 + *(int *)(iVar4 + 0x34);\n      *(uint *)(iVar4 + 0x34) = uVar2;\n      if (uVar2 == *(uint *)(iVar4 + 0x2c)) {\n        *(undefined4 *)(iVar4 + 0x34) = 0;\n      }\n      if (*(uint *)(iVar4 + 0x30) < *(uint *)(iVar4 + 0x2c)) {\n        *(uint *)(iVar4 + 0x30) = *(uint *)(iVar4 + 0x30) + uVar3;\n      }\n    }\n    else {\n      (*(code *)PTR_memcpy_000370fc)(*(undefined4 *)(iVar4 + 0x38),param_2 - iVar1,iVar1);\n      *(int *)(iVar4 + 0x34) = iVar1;\n      *(undefined4 *)(iVar4 + 0x30) = *(undefined4 *)(iVar4 + 0x2c);\n    }\n  }\n  else {\n    (*(code *)PTR_memcpy_000370fc)(*(undefined4 *)(iVar4 + 0x38),param_2 - uVar3,uVar3);\n    *(undefined4 *)(iVar4 + 0x34) = 0;\n    *(undefined4 *)(iVar4 + 0x30) = *(undefined4 *)(iVar4 + 0x2c);\n  }\n  return 0;\n}" type_identifier (function_declarator "FUN_00018730(int param_1,int param_2,uint param_3)" identifier (parameter_list "(int param_1,int param_2,uint param_3)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "uint param_3" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  uint uVar2;\n  uint uVar3;\n  int iVar4;\n  \n  iVar4 = *(int *)(param_1 + 0x1c);\n  if (*(int *)(iVar4 + 0x38) == 0) {\n    iVar1 = (**(code **)(param_1 + 0x20))\n                      (*(undefined4 *)(param_1 + 0x28),1 << (*(uint *)(iVar4 + 0x28) & 0x1f),1);\n    *(int *)(iVar4 + 0x38) = iVar1;\n    if (iVar1 == 0) {\n      return 1;\n    }\n  }\n  if (*(int *)(iVar4 + 0x2c) == 0) {\n    *(int *)(iVar4 + 0x2c) = 1 << (*(uint *)(iVar4 + 0x28) & 0x1f);\n    *(undefined4 *)(iVar4 + 0x34) = 0;\n    *(undefined4 *)(iVar4 + 0x30) = 0;\n  }\n  uVar3 = *(uint *)(iVar4 + 0x2c);\n  if (param_3 < uVar3) {\n    uVar3 = uVar3 - *(int *)(iVar4 + 0x34);\n    if (param_3 <= uVar3) {\n      uVar3 = param_3;\n    }\n    (*(code *)PTR_memcpy_000370fc)\n              (*(int *)(iVar4 + 0x38) + *(int *)(iVar4 + 0x34),param_2 - param_3,uVar3);\n    iVar1 = param_3 - uVar3;\n    if (iVar1 == 0) {\n      uVar2 = uVar3 + *(int *)(iVar4 + 0x34);\n      *(uint *)(iVar4 + 0x34) = uVar2;\n      if (uVar2 == *(uint *)(iVar4 + 0x2c)) {\n        *(undefined4 *)(iVar4 + 0x34) = 0;\n      }\n      if (*(uint *)(iVar4 + 0x30) < *(uint *)(iVar4 + 0x2c)) {\n        *(uint *)(iVar4 + 0x30) = *(uint *)(iVar4 + 0x30) + uVar3;\n      }\n    }\n    else {\n      (*(code *)PTR_memcpy_000370fc)(*(undefined4 *)(iVar4 + 0x38),param_2 - iVar1,iVar1);\n      *(int *)(iVar4 + 0x34) = iVar1;\n      *(undefined4 *)(iVar4 + 0x30) = *(undefined4 *)(iVar4 + 0x2c);\n    }\n  }\n  else {\n    (*(code *)PTR_memcpy_000370fc)(*(undefined4 *)(iVar4 + 0x38),param_2 - uVar3,uVar3);\n    *(undefined4 *)(iVar4 + 0x34) = 0;\n    *(undefined4 *)(iVar4 + 0x30) = *(undefined4 *)(iVar4 + 0x2c);\n  }\n  return 0;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (expression_statement "iVar4 = *(int *)(param_1 + 0x1c);" (assignment_expression "iVar4 = *(int *)(param_1 + 0x1c)" identifier = (pointer_expression "*(int *)(param_1 + 0x1c)" * (cast_expression "(int *)(param_1 + 0x1c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1c)" ( (binary_expression "param_1 + 0x1c" identifier + number_literal) ))))) ;) (if_statement "if (*(int *)(iVar4 + 0x38) == 0) {\n    iVar1 = (**(code **)(param_1 + 0x20))\n                      (*(undefined4 *)(param_1 + 0x28),1 << (*(uint *)(iVar4 + 0x28) & 0x1f),1);\n    *(int *)(iVar4 + 0x38) = iVar1;\n    if (iVar1 == 0) {\n      return 1;\n    }\n  }" if (parenthesized_expression "(*(int *)(iVar4 + 0x38) == 0)" ( (binary_expression "*(int *)(iVar4 + 0x38) == 0" (pointer_expression "*(int *)(iVar4 + 0x38)" * (cast_expression "(int *)(iVar4 + 0x38)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar4 + 0x38)" ( (binary_expression "iVar4 + 0x38" identifier + number_literal) )))) == number_literal) )) (compound_statement "{\n    iVar1 = (**(code **)(param_1 + 0x20))\n                      (*(undefined4 *)(param_1 + 0x28),1 << (*(uint *)(iVar4 + 0x28) & 0x1f),1);\n    *(int *)(iVar4 + 0x38) = iVar1;\n    if (iVar1 == 0) {\n      return 1;\n    }\n  }" { (expression_statement "iVar1 = (**(code **)(param_1 + 0x20))\n                      (*(undefined4 *)(param_1 + 0x28),1 << (*(uint *)(iVar4 + 0x28) & 0x1f),1);" (assignment_expression "iVar1 = (**(code **)(param_1 + 0x20))\n                      (*(undefined4 *)(param_1 + 0x28),1 << (*(uint *)(iVar4 + 0x28) & 0x1f),1)" identifier = (call_expression "(**(code **)(param_1 + 0x20))\n                      (*(undefined4 *)(param_1 + 0x28),1 << (*(uint *)(iVar4 + 0x28) & 0x1f),1)" (parenthesized_expression "(**(code **)(param_1 + 0x20))" ( (pointer_expression "**(code **)(param_1 + 0x20)" * (pointer_expression "*(code **)(param_1 + 0x20)" * (cast_expression "(code **)(param_1 + 0x20)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x20)" ( (binary_expression "param_1 + 0x20" identifier + number_literal) ))))) )) (argument_list "(*(undefined4 *)(param_1 + 0x28),1 << (*(uint *)(iVar4 + 0x28) & 0x1f),1)" ( (pointer_expression "*(undefined4 *)(param_1 + 0x28)" * (cast_expression "(undefined4 *)(param_1 + 0x28)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x28)" ( (binary_expression "param_1 + 0x28" identifier + number_literal) )))) , (binary_expression "1 << (*(uint *)(iVar4 + 0x28) & 0x1f)" number_literal << (parenthesized_expression "(*(uint *)(iVar4 + 0x28) & 0x1f)" ( (binary_expression "*(uint *)(iVar4 + 0x28) & 0x1f" (pointer_expression "*(uint *)(iVar4 + 0x28)" * (cast_expression "(uint *)(iVar4 + 0x28)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar4 + 0x28)" ( (binary_expression "iVar4 + 0x28" identifier + number_literal) )))) & number_literal) ))) , number_literal )))) ;) (expression_statement "*(int *)(iVar4 + 0x38) = iVar1;" (assignment_expression "*(int *)(iVar4 + 0x38) = iVar1" (pointer_expression "*(int *)(iVar4 + 0x38)" * (cast_expression "(int *)(iVar4 + 0x38)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar4 + 0x38)" ( (binary_expression "iVar4 + 0x38" identifier + number_literal) )))) = identifier) ;) (if_statement "if (iVar1 == 0) {\n      return 1;\n    }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n      return 1;\n    }" { (return_statement "return 1;" return number_literal ;) })) })) (if_statement "if (*(int *)(iVar4 + 0x2c) == 0) {\n    *(int *)(iVar4 + 0x2c) = 1 << (*(uint *)(iVar4 + 0x28) & 0x1f);\n    *(undefined4 *)(iVar4 + 0x34) = 0;\n    *(undefined4 *)(iVar4 + 0x30) = 0;\n  }" if (parenthesized_expression "(*(int *)(iVar4 + 0x2c) == 0)" ( (binary_expression "*(int *)(iVar4 + 0x2c) == 0" (pointer_expression "*(int *)(iVar4 + 0x2c)" * (cast_expression "(int *)(iVar4 + 0x2c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar4 + 0x2c)" ( (binary_expression "iVar4 + 0x2c" identifier + number_literal) )))) == number_literal) )) (compound_statement "{\n    *(int *)(iVar4 + 0x2c) = 1 << (*(uint *)(iVar4 + 0x28) & 0x1f);\n    *(undefined4 *)(iVar4 + 0x34) = 0;\n    *(undefined4 *)(iVar4 + 0x30) = 0;\n  }" { (expression_statement "*(int *)(iVar4 + 0x2c) = 1 << (*(uint *)(iVar4 + 0x28) & 0x1f);" (assignment_expression "*(int *)(iVar4 + 0x2c) = 1 << (*(uint *)(iVar4 + 0x28) & 0x1f)" (pointer_expression "*(int *)(iVar4 + 0x2c)" * (cast_expression "(int *)(iVar4 + 0x2c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar4 + 0x2c)" ( (binary_expression "iVar4 + 0x2c" identifier + number_literal) )))) = (binary_expression "1 << (*(uint *)(iVar4 + 0x28) & 0x1f)" number_literal << (parenthesized_expression "(*(uint *)(iVar4 + 0x28) & 0x1f)" ( (binary_expression "*(uint *)(iVar4 + 0x28) & 0x1f" (pointer_expression "*(uint *)(iVar4 + 0x28)" * (cast_expression "(uint *)(iVar4 + 0x28)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar4 + 0x28)" ( (binary_expression "iVar4 + 0x28" identifier + number_literal) )))) & number_literal) )))) ;) (expression_statement "*(undefined4 *)(iVar4 + 0x34) = 0;" (assignment_expression "*(undefined4 *)(iVar4 + 0x34) = 0" (pointer_expression "*(undefined4 *)(iVar4 + 0x34)" * (cast_expression "(undefined4 *)(iVar4 + 0x34)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar4 + 0x34)" ( (binary_expression "iVar4 + 0x34" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined4 *)(iVar4 + 0x30) = 0;" (assignment_expression "*(undefined4 *)(iVar4 + 0x30) = 0" (pointer_expression "*(undefined4 *)(iVar4 + 0x30)" * (cast_expression "(undefined4 *)(iVar4 + 0x30)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar4 + 0x30)" ( (binary_expression "iVar4 + 0x30" identifier + number_literal) )))) = number_literal) ;) })) (expression_statement "uVar3 = *(uint *)(iVar4 + 0x2c);" (assignment_expression "uVar3 = *(uint *)(iVar4 + 0x2c)" identifier = (pointer_expression "*(uint *)(iVar4 + 0x2c)" * (cast_expression "(uint *)(iVar4 + 0x2c)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar4 + 0x2c)" ( (binary_expression "iVar4 + 0x2c" identifier + number_literal) ))))) ;) (if_statement "if (param_3 < uVar3) {\n    uVar3 = uVar3 - *(int *)(iVar4 + 0x34);\n    if (param_3 <= uVar3) {\n      uVar3 = param_3;\n    }\n    (*(code *)PTR_memcpy_000370fc)\n              (*(int *)(iVar4 + 0x38) + *(int *)(iVar4 + 0x34),param_2 - param_3,uVar3);\n    iVar1 = param_3 - uVar3;\n    if (iVar1 == 0) {\n      uVar2 = uVar3 + *(int *)(iVar4 + 0x34);\n      *(uint *)(iVar4 + 0x34) = uVar2;\n      if (uVar2 == *(uint *)(iVar4 + 0x2c)) {\n        *(undefined4 *)(iVar4 + 0x34) = 0;\n      }\n      if (*(uint *)(iVar4 + 0x30) < *(uint *)(iVar4 + 0x2c)) {\n        *(uint *)(iVar4 + 0x30) = *(uint *)(iVar4 + 0x30) + uVar3;\n      }\n    }\n    else {\n      (*(code *)PTR_memcpy_000370fc)(*(undefined4 *)(iVar4 + 0x38),param_2 - iVar1,iVar1);\n      *(int *)(iVar4 + 0x34) = iVar1;\n      *(undefined4 *)(iVar4 + 0x30) = *(undefined4 *)(iVar4 + 0x2c);\n    }\n  }\n  else {\n    (*(code *)PTR_memcpy_000370fc)(*(undefined4 *)(iVar4 + 0x38),param_2 - uVar3,uVar3);\n    *(undefined4 *)(iVar4 + 0x34) = 0;\n    *(undefined4 *)(iVar4 + 0x30) = *(undefined4 *)(iVar4 + 0x2c);\n  }" if (parenthesized_expression "(param_3 < uVar3)" ( (binary_expression "param_3 < uVar3" identifier < identifier) )) (compound_statement "{\n    uVar3 = uVar3 - *(int *)(iVar4 + 0x34);\n    if (param_3 <= uVar3) {\n      uVar3 = param_3;\n    }\n    (*(code *)PTR_memcpy_000370fc)\n              (*(int *)(iVar4 + 0x38) + *(int *)(iVar4 + 0x34),param_2 - param_3,uVar3);\n    iVar1 = param_3 - uVar3;\n    if (iVar1 == 0) {\n      uVar2 = uVar3 + *(int *)(iVar4 + 0x34);\n      *(uint *)(iVar4 + 0x34) = uVar2;\n      if (uVar2 == *(uint *)(iVar4 + 0x2c)) {\n        *(undefined4 *)(iVar4 + 0x34) = 0;\n      }\n      if (*(uint *)(iVar4 + 0x30) < *(uint *)(iVar4 + 0x2c)) {\n        *(uint *)(iVar4 + 0x30) = *(uint *)(iVar4 + 0x30) + uVar3;\n      }\n    }\n    else {\n      (*(code *)PTR_memcpy_000370fc)(*(undefined4 *)(iVar4 + 0x38),param_2 - iVar1,iVar1);\n      *(int *)(iVar4 + 0x34) = iVar1;\n      *(undefined4 *)(iVar4 + 0x30) = *(undefined4 *)(iVar4 + 0x2c);\n    }\n  }" { (expression_statement "uVar3 = uVar3 - *(int *)(iVar4 + 0x34);" (assignment_expression "uVar3 = uVar3 - *(int *)(iVar4 + 0x34)" identifier = (binary_expression "uVar3 - *(int *)(iVar4 + 0x34)" identifier - (pointer_expression "*(int *)(iVar4 + 0x34)" * (cast_expression "(int *)(iVar4 + 0x34)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar4 + 0x34)" ( (binary_expression "iVar4 + 0x34" identifier + number_literal) )))))) ;) (if_statement "if (param_3 <= uVar3) {\n      uVar3 = param_3;\n    }" if (parenthesized_expression "(param_3 <= uVar3)" ( (binary_expression "param_3 <= uVar3" identifier <= identifier) )) (compound_statement "{\n      uVar3 = param_3;\n    }" { (expression_statement "uVar3 = param_3;" (assignment_expression "uVar3 = param_3" identifier = identifier) ;) })) (expression_statement "(*(code *)PTR_memcpy_000370fc)\n              (*(int *)(iVar4 + 0x38) + *(int *)(iVar4 + 0x34),param_2 - param_3,uVar3);" (call_expression "(*(code *)PTR_memcpy_000370fc)\n              (*(int *)(iVar4 + 0x38) + *(int *)(iVar4 + 0x34),param_2 - param_3,uVar3)" (parenthesized_expression "(*(code *)PTR_memcpy_000370fc)" ( (pointer_expression "*(code *)PTR_memcpy_000370fc" * (cast_expression "(code *)PTR_memcpy_000370fc" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(*(int *)(iVar4 + 0x38) + *(int *)(iVar4 + 0x34),param_2 - param_3,uVar3)" ( (binary_expression "*(int *)(iVar4 + 0x38) + *(int *)(iVar4 + 0x34)" (pointer_expression "*(int *)(iVar4 + 0x38)" * (cast_expression "(int *)(iVar4 + 0x38)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar4 + 0x38)" ( (binary_expression "iVar4 + 0x38" identifier + number_literal) )))) + (pointer_expression "*(int *)(iVar4 + 0x34)" * (cast_expression "(int *)(iVar4 + 0x34)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar4 + 0x34)" ( (binary_expression "iVar4 + 0x34" identifier + number_literal) ))))) , (binary_expression "param_2 - param_3" identifier - identifier) , identifier ))) ;) (expression_statement "iVar1 = param_3 - uVar3;" (assignment_expression "iVar1 = param_3 - uVar3" identifier = (binary_expression "param_3 - uVar3" identifier - identifier)) ;) (if_statement "if (iVar1 == 0) {\n      uVar2 = uVar3 + *(int *)(iVar4 + 0x34);\n      *(uint *)(iVar4 + 0x34) = uVar2;\n      if (uVar2 == *(uint *)(iVar4 + 0x2c)) {\n        *(undefined4 *)(iVar4 + 0x34) = 0;\n      }\n      if (*(uint *)(iVar4 + 0x30) < *(uint *)(iVar4 + 0x2c)) {\n        *(uint *)(iVar4 + 0x30) = *(uint *)(iVar4 + 0x30) + uVar3;\n      }\n    }\n    else {\n      (*(code *)PTR_memcpy_000370fc)(*(undefined4 *)(iVar4 + 0x38),param_2 - iVar1,iVar1);\n      *(int *)(iVar4 + 0x34) = iVar1;\n      *(undefined4 *)(iVar4 + 0x30) = *(undefined4 *)(iVar4 + 0x2c);\n    }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n      uVar2 = uVar3 + *(int *)(iVar4 + 0x34);\n      *(uint *)(iVar4 + 0x34) = uVar2;\n      if (uVar2 == *(uint *)(iVar4 + 0x2c)) {\n        *(undefined4 *)(iVar4 + 0x34) = 0;\n      }\n      if (*(uint *)(iVar4 + 0x30) < *(uint *)(iVar4 + 0x2c)) {\n        *(uint *)(iVar4 + 0x30) = *(uint *)(iVar4 + 0x30) + uVar3;\n      }\n    }" { (expression_statement "uVar2 = uVar3 + *(int *)(iVar4 + 0x34);" (assignment_expression "uVar2 = uVar3 + *(int *)(iVar4 + 0x34)" identifier = (binary_expression "uVar3 + *(int *)(iVar4 + 0x34)" identifier + (pointer_expression "*(int *)(iVar4 + 0x34)" * (cast_expression "(int *)(iVar4 + 0x34)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar4 + 0x34)" ( (binary_expression "iVar4 + 0x34" identifier + number_literal) )))))) ;) (expression_statement "*(uint *)(iVar4 + 0x34) = uVar2;" (assignment_expression "*(uint *)(iVar4 + 0x34) = uVar2" (pointer_expression "*(uint *)(iVar4 + 0x34)" * (cast_expression "(uint *)(iVar4 + 0x34)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar4 + 0x34)" ( (binary_expression "iVar4 + 0x34" identifier + number_literal) )))) = identifier) ;) (if_statement "if (uVar2 == *(uint *)(iVar4 + 0x2c)) {\n        *(undefined4 *)(iVar4 + 0x34) = 0;\n      }" if (parenthesized_expression "(uVar2 == *(uint *)(iVar4 + 0x2c))" ( (binary_expression "uVar2 == *(uint *)(iVar4 + 0x2c)" identifier == (pointer_expression "*(uint *)(iVar4 + 0x2c)" * (cast_expression "(uint *)(iVar4 + 0x2c)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar4 + 0x2c)" ( (binary_expression "iVar4 + 0x2c" identifier + number_literal) ))))) )) (compound_statement "{\n        *(undefined4 *)(iVar4 + 0x34) = 0;\n      }" { (expression_statement "*(undefined4 *)(iVar4 + 0x34) = 0;" (assignment_expression "*(undefined4 *)(iVar4 + 0x34) = 0" (pointer_expression "*(undefined4 *)(iVar4 + 0x34)" * (cast_expression "(undefined4 *)(iVar4 + 0x34)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar4 + 0x34)" ( (binary_expression "iVar4 + 0x34" identifier + number_literal) )))) = number_literal) ;) })) (if_statement "if (*(uint *)(iVar4 + 0x30) < *(uint *)(iVar4 + 0x2c)) {\n        *(uint *)(iVar4 + 0x30) = *(uint *)(iVar4 + 0x30) + uVar3;\n      }" if (parenthesized_expression "(*(uint *)(iVar4 + 0x30) < *(uint *)(iVar4 + 0x2c))" ( (binary_expression "*(uint *)(iVar4 + 0x30) < *(uint *)(iVar4 + 0x2c)" (pointer_expression "*(uint *)(iVar4 + 0x30)" * (cast_expression "(uint *)(iVar4 + 0x30)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar4 + 0x30)" ( (binary_expression "iVar4 + 0x30" identifier + number_literal) )))) < (pointer_expression "*(uint *)(iVar4 + 0x2c)" * (cast_expression "(uint *)(iVar4 + 0x2c)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar4 + 0x2c)" ( (binary_expression "iVar4 + 0x2c" identifier + number_literal) ))))) )) (compound_statement "{\n        *(uint *)(iVar4 + 0x30) = *(uint *)(iVar4 + 0x30) + uVar3;\n      }" { (expression_statement "*(uint *)(iVar4 + 0x30) = *(uint *)(iVar4 + 0x30) + uVar3;" (assignment_expression "*(uint *)(iVar4 + 0x30) = *(uint *)(iVar4 + 0x30) + uVar3" (pointer_expression "*(uint *)(iVar4 + 0x30)" * (cast_expression "(uint *)(iVar4 + 0x30)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar4 + 0x30)" ( (binary_expression "iVar4 + 0x30" identifier + number_literal) )))) = (binary_expression "*(uint *)(iVar4 + 0x30) + uVar3" (pointer_expression "*(uint *)(iVar4 + 0x30)" * (cast_expression "(uint *)(iVar4 + 0x30)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar4 + 0x30)" ( (binary_expression "iVar4 + 0x30" identifier + number_literal) )))) + identifier)) ;) })) }) (else_clause "else {\n      (*(code *)PTR_memcpy_000370fc)(*(undefined4 *)(iVar4 + 0x38),param_2 - iVar1,iVar1);\n      *(int *)(iVar4 + 0x34) = iVar1;\n      *(undefined4 *)(iVar4 + 0x30) = *(undefined4 *)(iVar4 + 0x2c);\n    }" else (compound_statement "{\n      (*(code *)PTR_memcpy_000370fc)(*(undefined4 *)(iVar4 + 0x38),param_2 - iVar1,iVar1);\n      *(int *)(iVar4 + 0x34) = iVar1;\n      *(undefined4 *)(iVar4 + 0x30) = *(undefined4 *)(iVar4 + 0x2c);\n    }" { (expression_statement "(*(code *)PTR_memcpy_000370fc)(*(undefined4 *)(iVar4 + 0x38),param_2 - iVar1,iVar1);" (call_expression "(*(code *)PTR_memcpy_000370fc)(*(undefined4 *)(iVar4 + 0x38),param_2 - iVar1,iVar1)" (parenthesized_expression "(*(code *)PTR_memcpy_000370fc)" ( (pointer_expression "*(code *)PTR_memcpy_000370fc" * (cast_expression "(code *)PTR_memcpy_000370fc" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(*(undefined4 *)(iVar4 + 0x38),param_2 - iVar1,iVar1)" ( (pointer_expression "*(undefined4 *)(iVar4 + 0x38)" * (cast_expression "(undefined4 *)(iVar4 + 0x38)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar4 + 0x38)" ( (binary_expression "iVar4 + 0x38" identifier + number_literal) )))) , (binary_expression "param_2 - iVar1" identifier - identifier) , identifier ))) ;) (expression_statement "*(int *)(iVar4 + 0x34) = iVar1;" (assignment_expression "*(int *)(iVar4 + 0x34) = iVar1" (pointer_expression "*(int *)(iVar4 + 0x34)" * (cast_expression "(int *)(iVar4 + 0x34)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar4 + 0x34)" ( (binary_expression "iVar4 + 0x34" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(undefined4 *)(iVar4 + 0x30) = *(undefined4 *)(iVar4 + 0x2c);" (assignment_expression "*(undefined4 *)(iVar4 + 0x30) = *(undefined4 *)(iVar4 + 0x2c)" (pointer_expression "*(undefined4 *)(iVar4 + 0x30)" * (cast_expression "(undefined4 *)(iVar4 + 0x30)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar4 + 0x30)" ( (binary_expression "iVar4 + 0x30" identifier + number_literal) )))) = (pointer_expression "*(undefined4 *)(iVar4 + 0x2c)" * (cast_expression "(undefined4 *)(iVar4 + 0x2c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar4 + 0x2c)" ( (binary_expression "iVar4 + 0x2c" identifier + number_literal) ))))) ;) }))) }) (else_clause "else {\n    (*(code *)PTR_memcpy_000370fc)(*(undefined4 *)(iVar4 + 0x38),param_2 - uVar3,uVar3);\n    *(undefined4 *)(iVar4 + 0x34) = 0;\n    *(undefined4 *)(iVar4 + 0x30) = *(undefined4 *)(iVar4 + 0x2c);\n  }" else (compound_statement "{\n    (*(code *)PTR_memcpy_000370fc)(*(undefined4 *)(iVar4 + 0x38),param_2 - uVar3,uVar3);\n    *(undefined4 *)(iVar4 + 0x34) = 0;\n    *(undefined4 *)(iVar4 + 0x30) = *(undefined4 *)(iVar4 + 0x2c);\n  }" { (expression_statement "(*(code *)PTR_memcpy_000370fc)(*(undefined4 *)(iVar4 + 0x38),param_2 - uVar3,uVar3);" (call_expression "(*(code *)PTR_memcpy_000370fc)(*(undefined4 *)(iVar4 + 0x38),param_2 - uVar3,uVar3)" (parenthesized_expression "(*(code *)PTR_memcpy_000370fc)" ( (pointer_expression "*(code *)PTR_memcpy_000370fc" * (cast_expression "(code *)PTR_memcpy_000370fc" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(*(undefined4 *)(iVar4 + 0x38),param_2 - uVar3,uVar3)" ( (pointer_expression "*(undefined4 *)(iVar4 + 0x38)" * (cast_expression "(undefined4 *)(iVar4 + 0x38)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar4 + 0x38)" ( (binary_expression "iVar4 + 0x38" identifier + number_literal) )))) , (binary_expression "param_2 - uVar3" identifier - identifier) , identifier ))) ;) (expression_statement "*(undefined4 *)(iVar4 + 0x34) = 0;" (assignment_expression "*(undefined4 *)(iVar4 + 0x34) = 0" (pointer_expression "*(undefined4 *)(iVar4 + 0x34)" * (cast_expression "(undefined4 *)(iVar4 + 0x34)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar4 + 0x34)" ( (binary_expression "iVar4 + 0x34" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined4 *)(iVar4 + 0x30) = *(undefined4 *)(iVar4 + 0x2c);" (assignment_expression "*(undefined4 *)(iVar4 + 0x30) = *(undefined4 *)(iVar4 + 0x2c)" (pointer_expression "*(undefined4 *)(iVar4 + 0x30)" * (cast_expression "(undefined4 *)(iVar4 + 0x30)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar4 + 0x30)" ( (binary_expression "iVar4 + 0x30" identifier + number_literal) )))) = (pointer_expression "*(undefined4 *)(iVar4 + 0x2c)" * (cast_expression "(undefined4 *)(iVar4 + 0x2c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar4 + 0x2c)" ( (binary_expression "iVar4 + 0x2c" identifier + number_literal) ))))) ;) }))) (return_statement "return 0;" return number_literal ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) , (binary_expression LIT << (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) & LIT) ))) , LIT )))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (return_statement return LIT ;) })) })) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) == LIT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (binary_expression LIT << (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) & LIT) )))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) })) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT - (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT <= IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) })) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) , (binary_expression IDENT - IDENT) , IDENT ))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT - IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) })) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) < (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + IDENT)) ;) })) }) (else_clause else (compound_statement { (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) , (binary_expression IDENT - IDENT) , IDENT ))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) }))) }) (else_clause else (compound_statement { (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) , (binary_expression IDENT - IDENT) , IDENT ))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) }))) (return_statement return LIT ;) })))
(function_definition "undefined4 FUN_00018730(int param_1,int param_2,uint param_3)\n\n{\n  int iVar1;\n  uint uVar2;\n  uint uVar3;\n  int iVar4;\n  \n  iVar4 = *(int *)(param_1 + 0x1c);\n  if (*(int *)(iVar4 + 0x38) == 0) {\n    iVar1 = (**(code **)(param_1 + 0x20))\n                      (*(undefined4 *)(param_1 + 0x28),1 << (*(uint *)(iVar4 + 0x28) & 0x1f),1);\n    *(int *)(iVar4 + 0x38) = iVar1;\n    if (iVar1 == 0) {\n      return 1;\n    }\n  }\n  if (*(int *)(iVar4 + 0x2c) == 0) {\n    *(int *)(iVar4 + 0x2c) = 1 << (*(uint *)(iVar4 + 0x28) & 0x1f);\n    *(undefined4 *)(iVar4 + 0x34) = 0;\n    *(undefined4 *)(iVar4 + 0x30) = 0;\n  }\n  uVar3 = *(uint *)(iVar4 + 0x2c);\n  if (param_3 < uVar3) {\n    uVar3 = uVar3 - *(int *)(iVar4 + 0x34);\n    if (param_3 <= uVar3) {\n      uVar3 = param_3;\n    }\n    (*(code *)PTR_memcpy_000370fc)\n              (*(int *)(iVar4 + 0x38) + *(int *)(iVar4 + 0x34),param_2 - param_3,uVar3);\n    iVar1 = param_3 - uVar3;\n    if (iVar1 == 0) {\n      uVar2 = uVar3 + *(int *)(iVar4 + 0x34);\n      *(uint *)(iVar4 + 0x34) = uVar2;\n      if (uVar2 == *(uint *)(iVar4 + 0x2c)) {\n        *(undefined4 *)(iVar4 + 0x34) = 0;\n      }\n      if (*(uint *)(iVar4 + 0x30) < *(uint *)(iVar4 + 0x2c)) {\n        *(uint *)(iVar4 + 0x30) = *(uint *)(iVar4 + 0x30) + uVar3;\n      }\n    }\n    else {\n      (*(code *)PTR_memcpy_000370fc)(*(undefined4 *)(iVar4 + 0x38),param_2 - iVar1,iVar1);\n      *(int *)(iVar4 + 0x34) = iVar1;\n      *(undefined4 *)(iVar4 + 0x30) = *(undefined4 *)(iVar4 + 0x2c);\n    }\n  }\n  else {\n    (*(code *)PTR_memcpy_000370fc)(*(undefined4 *)(iVar4 + 0x38),param_2 - uVar3,uVar3);\n    *(undefined4 *)(iVar4 + 0x34) = 0;\n    *(undefined4 *)(iVar4 + 0x30) = *(undefined4 *)(iVar4 + 0x2c);\n  }\n  return 0;\n}" (type_identifier "undefined4") (function_declarator "FUN_00018730(int param_1,int param_2,uint param_3)" (identifier "FUN_00018730") (parameter_list "(int param_1,int param_2,uint param_3)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) (, ",") (parameter_declaration "uint param_3" (type_identifier "uint") (identifier "param_3")) () ")"))) (compound_statement "{\n  int iVar1;\n  uint uVar2;\n  uint uVar3;\n  int iVar4;\n  \n  iVar4 = *(int *)(param_1 + 0x1c);\n  if (*(int *)(iVar4 + 0x38) == 0) {\n    iVar1 = (**(code **)(param_1 + 0x20))\n                      (*(undefined4 *)(param_1 + 0x28),1 << (*(uint *)(iVar4 + 0x28) & 0x1f),1);\n    *(int *)(iVar4 + 0x38) = iVar1;\n    if (iVar1 == 0) {\n      return 1;\n    }\n  }\n  if (*(int *)(iVar4 + 0x2c) == 0) {\n    *(int *)(iVar4 + 0x2c) = 1 << (*(uint *)(iVar4 + 0x28) & 0x1f);\n    *(undefined4 *)(iVar4 + 0x34) = 0;\n    *(undefined4 *)(iVar4 + 0x30) = 0;\n  }\n  uVar3 = *(uint *)(iVar4 + 0x2c);\n  if (param_3 < uVar3) {\n    uVar3 = uVar3 - *(int *)(iVar4 + 0x34);\n    if (param_3 <= uVar3) {\n      uVar3 = param_3;\n    }\n    (*(code *)PTR_memcpy_000370fc)\n              (*(int *)(iVar4 + 0x38) + *(int *)(iVar4 + 0x34),param_2 - param_3,uVar3);\n    iVar1 = param_3 - uVar3;\n    if (iVar1 == 0) {\n      uVar2 = uVar3 + *(int *)(iVar4 + 0x34);\n      *(uint *)(iVar4 + 0x34) = uVar2;\n      if (uVar2 == *(uint *)(iVar4 + 0x2c)) {\n        *(undefined4 *)(iVar4 + 0x34) = 0;\n      }\n      if (*(uint *)(iVar4 + 0x30) < *(uint *)(iVar4 + 0x2c)) {\n        *(uint *)(iVar4 + 0x30) = *(uint *)(iVar4 + 0x30) + uVar3;\n      }\n    }\n    else {\n      (*(code *)PTR_memcpy_000370fc)(*(undefined4 *)(iVar4 + 0x38),param_2 - iVar1,iVar1);\n      *(int *)(iVar4 + 0x34) = iVar1;\n      *(undefined4 *)(iVar4 + 0x30) = *(undefined4 *)(iVar4 + 0x2c);\n    }\n  }\n  else {\n    (*(code *)PTR_memcpy_000370fc)(*(undefined4 *)(iVar4 + 0x38),param_2 - uVar3,uVar3);\n    *(undefined4 *)(iVar4 + 0x34) = 0;\n    *(undefined4 *)(iVar4 + 0x30) = *(undefined4 *)(iVar4 + 0x2c);\n  }\n  return 0;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "uint uVar2;" (type_identifier "uint") (identifier "uVar2") (; ";")) (declaration "uint uVar3;" (type_identifier "uint") (identifier "uVar3") (; ";")) (declaration "int iVar4;" (primitive_type "int") (identifier "iVar4") (; ";")) (expression_statement "iVar4 = *(int *)(param_1 + 0x1c);" (assignment_expression "iVar4 = *(int *)(param_1 + 0x1c)" (identifier "iVar4") (= "=") (pointer_expression "*(int *)(param_1 + 0x1c)" (* "*") (cast_expression "(int *)(param_1 + 0x1c)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x1c)" (( "(") (binary_expression "param_1 + 0x1c" (identifier "param_1") (+ "+") (number_literal "0x1c")) () ")"))))) (; ";")) (if_statement "if (*(int *)(iVar4 + 0x38) == 0) {\n    iVar1 = (**(code **)(param_1 + 0x20))\n                      (*(undefined4 *)(param_1 + 0x28),1 << (*(uint *)(iVar4 + 0x28) & 0x1f),1);\n    *(int *)(iVar4 + 0x38) = iVar1;\n    if (iVar1 == 0) {\n      return 1;\n    }\n  }" (if "if") (parenthesized_expression "(*(int *)(iVar4 + 0x38) == 0)" (( "(") (binary_expression "*(int *)(iVar4 + 0x38) == 0" (pointer_expression "*(int *)(iVar4 + 0x38)" (* "*") (cast_expression "(int *)(iVar4 + 0x38)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar4 + 0x38)" (( "(") (binary_expression "iVar4 + 0x38" (identifier "iVar4") (+ "+") (number_literal "0x38")) () ")")))) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    iVar1 = (**(code **)(param_1 + 0x20))\n                      (*(undefined4 *)(param_1 + 0x28),1 << (*(uint *)(iVar4 + 0x28) & 0x1f),1);\n    *(int *)(iVar4 + 0x38) = iVar1;\n    if (iVar1 == 0) {\n      return 1;\n    }\n  }" ({ "{") (expression_statement "iVar1 = (**(code **)(param_1 + 0x20))\n                      (*(undefined4 *)(param_1 + 0x28),1 << (*(uint *)(iVar4 + 0x28) & 0x1f),1);" (assignment_expression "iVar1 = (**(code **)(param_1 + 0x20))\n                      (*(undefined4 *)(param_1 + 0x28),1 << (*(uint *)(iVar4 + 0x28) & 0x1f),1)" (identifier "iVar1") (= "=") (call_expression "(**(code **)(param_1 + 0x20))\n                      (*(undefined4 *)(param_1 + 0x28),1 << (*(uint *)(iVar4 + 0x28) & 0x1f),1)" (parenthesized_expression "(**(code **)(param_1 + 0x20))" (( "(") (pointer_expression "**(code **)(param_1 + 0x20)" (* "*") (pointer_expression "*(code **)(param_1 + 0x20)" (* "*") (cast_expression "(code **)(param_1 + 0x20)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 0x20)" (( "(") (binary_expression "param_1 + 0x20" (identifier "param_1") (+ "+") (number_literal "0x20")) () ")"))))) () ")")) (argument_list "(*(undefined4 *)(param_1 + 0x28),1 << (*(uint *)(iVar4 + 0x28) & 0x1f),1)" (( "(") (pointer_expression "*(undefined4 *)(param_1 + 0x28)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x28)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x28)" (( "(") (binary_expression "param_1 + 0x28" (identifier "param_1") (+ "+") (number_literal "0x28")) () ")")))) (, ",") (binary_expression "1 << (*(uint *)(iVar4 + 0x28) & 0x1f)" (number_literal "1") (<< "<<") (parenthesized_expression "(*(uint *)(iVar4 + 0x28) & 0x1f)" (( "(") (binary_expression "*(uint *)(iVar4 + 0x28) & 0x1f" (pointer_expression "*(uint *)(iVar4 + 0x28)" (* "*") (cast_expression "(uint *)(iVar4 + 0x28)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar4 + 0x28)" (( "(") (binary_expression "iVar4 + 0x28" (identifier "iVar4") (+ "+") (number_literal "0x28")) () ")")))) (& "&") (number_literal "0x1f")) () ")"))) (, ",") (number_literal "1") () ")")))) (; ";")) (expression_statement "*(int *)(iVar4 + 0x38) = iVar1;" (assignment_expression "*(int *)(iVar4 + 0x38) = iVar1" (pointer_expression "*(int *)(iVar4 + 0x38)" (* "*") (cast_expression "(int *)(iVar4 + 0x38)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar4 + 0x38)" (( "(") (binary_expression "iVar4 + 0x38" (identifier "iVar4") (+ "+") (number_literal "0x38")) () ")")))) (= "=") (identifier "iVar1")) (; ";")) (if_statement "if (iVar1 == 0) {\n      return 1;\n    }" (if "if") (parenthesized_expression "(iVar1 == 0)" (( "(") (binary_expression "iVar1 == 0" (identifier "iVar1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      return 1;\n    }" ({ "{") (return_statement "return 1;" (return "return") (number_literal "1") (; ";")) (} "}"))) (} "}"))) (if_statement "if (*(int *)(iVar4 + 0x2c) == 0) {\n    *(int *)(iVar4 + 0x2c) = 1 << (*(uint *)(iVar4 + 0x28) & 0x1f);\n    *(undefined4 *)(iVar4 + 0x34) = 0;\n    *(undefined4 *)(iVar4 + 0x30) = 0;\n  }" (if "if") (parenthesized_expression "(*(int *)(iVar4 + 0x2c) == 0)" (( "(") (binary_expression "*(int *)(iVar4 + 0x2c) == 0" (pointer_expression "*(int *)(iVar4 + 0x2c)" (* "*") (cast_expression "(int *)(iVar4 + 0x2c)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar4 + 0x2c)" (( "(") (binary_expression "iVar4 + 0x2c" (identifier "iVar4") (+ "+") (number_literal "0x2c")) () ")")))) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    *(int *)(iVar4 + 0x2c) = 1 << (*(uint *)(iVar4 + 0x28) & 0x1f);\n    *(undefined4 *)(iVar4 + 0x34) = 0;\n    *(undefined4 *)(iVar4 + 0x30) = 0;\n  }" ({ "{") (expression_statement "*(int *)(iVar4 + 0x2c) = 1 << (*(uint *)(iVar4 + 0x28) & 0x1f);" (assignment_expression "*(int *)(iVar4 + 0x2c) = 1 << (*(uint *)(iVar4 + 0x28) & 0x1f)" (pointer_expression "*(int *)(iVar4 + 0x2c)" (* "*") (cast_expression "(int *)(iVar4 + 0x2c)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar4 + 0x2c)" (( "(") (binary_expression "iVar4 + 0x2c" (identifier "iVar4") (+ "+") (number_literal "0x2c")) () ")")))) (= "=") (binary_expression "1 << (*(uint *)(iVar4 + 0x28) & 0x1f)" (number_literal "1") (<< "<<") (parenthesized_expression "(*(uint *)(iVar4 + 0x28) & 0x1f)" (( "(") (binary_expression "*(uint *)(iVar4 + 0x28) & 0x1f" (pointer_expression "*(uint *)(iVar4 + 0x28)" (* "*") (cast_expression "(uint *)(iVar4 + 0x28)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar4 + 0x28)" (( "(") (binary_expression "iVar4 + 0x28" (identifier "iVar4") (+ "+") (number_literal "0x28")) () ")")))) (& "&") (number_literal "0x1f")) () ")")))) (; ";")) (expression_statement "*(undefined4 *)(iVar4 + 0x34) = 0;" (assignment_expression "*(undefined4 *)(iVar4 + 0x34) = 0" (pointer_expression "*(undefined4 *)(iVar4 + 0x34)" (* "*") (cast_expression "(undefined4 *)(iVar4 + 0x34)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar4 + 0x34)" (( "(") (binary_expression "iVar4 + 0x34" (identifier "iVar4") (+ "+") (number_literal "0x34")) () ")")))) (= "=") (number_literal "0")) (; ";")) (expression_statement "*(undefined4 *)(iVar4 + 0x30) = 0;" (assignment_expression "*(undefined4 *)(iVar4 + 0x30) = 0" (pointer_expression "*(undefined4 *)(iVar4 + 0x30)" (* "*") (cast_expression "(undefined4 *)(iVar4 + 0x30)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar4 + 0x30)" (( "(") (binary_expression "iVar4 + 0x30" (identifier "iVar4") (+ "+") (number_literal "0x30")) () ")")))) (= "=") (number_literal "0")) (; ";")) (} "}"))) (expression_statement "uVar3 = *(uint *)(iVar4 + 0x2c);" (assignment_expression "uVar3 = *(uint *)(iVar4 + 0x2c)" (identifier "uVar3") (= "=") (pointer_expression "*(uint *)(iVar4 + 0x2c)" (* "*") (cast_expression "(uint *)(iVar4 + 0x2c)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar4 + 0x2c)" (( "(") (binary_expression "iVar4 + 0x2c" (identifier "iVar4") (+ "+") (number_literal "0x2c")) () ")"))))) (; ";")) (if_statement "if (param_3 < uVar3) {\n    uVar3 = uVar3 - *(int *)(iVar4 + 0x34);\n    if (param_3 <= uVar3) {\n      uVar3 = param_3;\n    }\n    (*(code *)PTR_memcpy_000370fc)\n              (*(int *)(iVar4 + 0x38) + *(int *)(iVar4 + 0x34),param_2 - param_3,uVar3);\n    iVar1 = param_3 - uVar3;\n    if (iVar1 == 0) {\n      uVar2 = uVar3 + *(int *)(iVar4 + 0x34);\n      *(uint *)(iVar4 + 0x34) = uVar2;\n      if (uVar2 == *(uint *)(iVar4 + 0x2c)) {\n        *(undefined4 *)(iVar4 + 0x34) = 0;\n      }\n      if (*(uint *)(iVar4 + 0x30) < *(uint *)(iVar4 + 0x2c)) {\n        *(uint *)(iVar4 + 0x30) = *(uint *)(iVar4 + 0x30) + uVar3;\n      }\n    }\n    else {\n      (*(code *)PTR_memcpy_000370fc)(*(undefined4 *)(iVar4 + 0x38),param_2 - iVar1,iVar1);\n      *(int *)(iVar4 + 0x34) = iVar1;\n      *(undefined4 *)(iVar4 + 0x30) = *(undefined4 *)(iVar4 + 0x2c);\n    }\n  }\n  else {\n    (*(code *)PTR_memcpy_000370fc)(*(undefined4 *)(iVar4 + 0x38),param_2 - uVar3,uVar3);\n    *(undefined4 *)(iVar4 + 0x34) = 0;\n    *(undefined4 *)(iVar4 + 0x30) = *(undefined4 *)(iVar4 + 0x2c);\n  }" (if "if") (parenthesized_expression "(param_3 < uVar3)" (( "(") (binary_expression "param_3 < uVar3" (identifier "param_3") (< "<") (identifier "uVar3")) () ")")) (compound_statement "{\n    uVar3 = uVar3 - *(int *)(iVar4 + 0x34);\n    if (param_3 <= uVar3) {\n      uVar3 = param_3;\n    }\n    (*(code *)PTR_memcpy_000370fc)\n              (*(int *)(iVar4 + 0x38) + *(int *)(iVar4 + 0x34),param_2 - param_3,uVar3);\n    iVar1 = param_3 - uVar3;\n    if (iVar1 == 0) {\n      uVar2 = uVar3 + *(int *)(iVar4 + 0x34);\n      *(uint *)(iVar4 + 0x34) = uVar2;\n      if (uVar2 == *(uint *)(iVar4 + 0x2c)) {\n        *(undefined4 *)(iVar4 + 0x34) = 0;\n      }\n      if (*(uint *)(iVar4 + 0x30) < *(uint *)(iVar4 + 0x2c)) {\n        *(uint *)(iVar4 + 0x30) = *(uint *)(iVar4 + 0x30) + uVar3;\n      }\n    }\n    else {\n      (*(code *)PTR_memcpy_000370fc)(*(undefined4 *)(iVar4 + 0x38),param_2 - iVar1,iVar1);\n      *(int *)(iVar4 + 0x34) = iVar1;\n      *(undefined4 *)(iVar4 + 0x30) = *(undefined4 *)(iVar4 + 0x2c);\n    }\n  }" ({ "{") (expression_statement "uVar3 = uVar3 - *(int *)(iVar4 + 0x34);" (assignment_expression "uVar3 = uVar3 - *(int *)(iVar4 + 0x34)" (identifier "uVar3") (= "=") (binary_expression "uVar3 - *(int *)(iVar4 + 0x34)" (identifier "uVar3") (- "-") (pointer_expression "*(int *)(iVar4 + 0x34)" (* "*") (cast_expression "(int *)(iVar4 + 0x34)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar4 + 0x34)" (( "(") (binary_expression "iVar4 + 0x34" (identifier "iVar4") (+ "+") (number_literal "0x34")) () ")")))))) (; ";")) (if_statement "if (param_3 <= uVar3) {\n      uVar3 = param_3;\n    }" (if "if") (parenthesized_expression "(param_3 <= uVar3)" (( "(") (binary_expression "param_3 <= uVar3" (identifier "param_3") (<= "<=") (identifier "uVar3")) () ")")) (compound_statement "{\n      uVar3 = param_3;\n    }" ({ "{") (expression_statement "uVar3 = param_3;" (assignment_expression "uVar3 = param_3" (identifier "uVar3") (= "=") (identifier "param_3")) (; ";")) (} "}"))) (expression_statement "(*(code *)PTR_memcpy_000370fc)\n              (*(int *)(iVar4 + 0x38) + *(int *)(iVar4 + 0x34),param_2 - param_3,uVar3);" (call_expression "(*(code *)PTR_memcpy_000370fc)\n              (*(int *)(iVar4 + 0x38) + *(int *)(iVar4 + 0x34),param_2 - param_3,uVar3)" (parenthesized_expression "(*(code *)PTR_memcpy_000370fc)" (( "(") (pointer_expression "*(code *)PTR_memcpy_000370fc" (* "*") (cast_expression "(code *)PTR_memcpy_000370fc" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_memcpy_000370fc"))) () ")")) (argument_list "(*(int *)(iVar4 + 0x38) + *(int *)(iVar4 + 0x34),param_2 - param_3,uVar3)" (( "(") (binary_expression "*(int *)(iVar4 + 0x38) + *(int *)(iVar4 + 0x34)" (pointer_expression "*(int *)(iVar4 + 0x38)" (* "*") (cast_expression "(int *)(iVar4 + 0x38)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar4 + 0x38)" (( "(") (binary_expression "iVar4 + 0x38" (identifier "iVar4") (+ "+") (number_literal "0x38")) () ")")))) (+ "+") (pointer_expression "*(int *)(iVar4 + 0x34)" (* "*") (cast_expression "(int *)(iVar4 + 0x34)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar4 + 0x34)" (( "(") (binary_expression "iVar4 + 0x34" (identifier "iVar4") (+ "+") (number_literal "0x34")) () ")"))))) (, ",") (binary_expression "param_2 - param_3" (identifier "param_2") (- "-") (identifier "param_3")) (, ",") (identifier "uVar3") () ")"))) (; ";")) (expression_statement "iVar1 = param_3 - uVar3;" (assignment_expression "iVar1 = param_3 - uVar3" (identifier "iVar1") (= "=") (binary_expression "param_3 - uVar3" (identifier "param_3") (- "-") (identifier "uVar3"))) (; ";")) (if_statement "if (iVar1 == 0) {\n      uVar2 = uVar3 + *(int *)(iVar4 + 0x34);\n      *(uint *)(iVar4 + 0x34) = uVar2;\n      if (uVar2 == *(uint *)(iVar4 + 0x2c)) {\n        *(undefined4 *)(iVar4 + 0x34) = 0;\n      }\n      if (*(uint *)(iVar4 + 0x30) < *(uint *)(iVar4 + 0x2c)) {\n        *(uint *)(iVar4 + 0x30) = *(uint *)(iVar4 + 0x30) + uVar3;\n      }\n    }\n    else {\n      (*(code *)PTR_memcpy_000370fc)(*(undefined4 *)(iVar4 + 0x38),param_2 - iVar1,iVar1);\n      *(int *)(iVar4 + 0x34) = iVar1;\n      *(undefined4 *)(iVar4 + 0x30) = *(undefined4 *)(iVar4 + 0x2c);\n    }" (if "if") (parenthesized_expression "(iVar1 == 0)" (( "(") (binary_expression "iVar1 == 0" (identifier "iVar1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      uVar2 = uVar3 + *(int *)(iVar4 + 0x34);\n      *(uint *)(iVar4 + 0x34) = uVar2;\n      if (uVar2 == *(uint *)(iVar4 + 0x2c)) {\n        *(undefined4 *)(iVar4 + 0x34) = 0;\n      }\n      if (*(uint *)(iVar4 + 0x30) < *(uint *)(iVar4 + 0x2c)) {\n        *(uint *)(iVar4 + 0x30) = *(uint *)(iVar4 + 0x30) + uVar3;\n      }\n    }" ({ "{") (expression_statement "uVar2 = uVar3 + *(int *)(iVar4 + 0x34);" (assignment_expression "uVar2 = uVar3 + *(int *)(iVar4 + 0x34)" (identifier "uVar2") (= "=") (binary_expression "uVar3 + *(int *)(iVar4 + 0x34)" (identifier "uVar3") (+ "+") (pointer_expression "*(int *)(iVar4 + 0x34)" (* "*") (cast_expression "(int *)(iVar4 + 0x34)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar4 + 0x34)" (( "(") (binary_expression "iVar4 + 0x34" (identifier "iVar4") (+ "+") (number_literal "0x34")) () ")")))))) (; ";")) (expression_statement "*(uint *)(iVar4 + 0x34) = uVar2;" (assignment_expression "*(uint *)(iVar4 + 0x34) = uVar2" (pointer_expression "*(uint *)(iVar4 + 0x34)" (* "*") (cast_expression "(uint *)(iVar4 + 0x34)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar4 + 0x34)" (( "(") (binary_expression "iVar4 + 0x34" (identifier "iVar4") (+ "+") (number_literal "0x34")) () ")")))) (= "=") (identifier "uVar2")) (; ";")) (if_statement "if (uVar2 == *(uint *)(iVar4 + 0x2c)) {\n        *(undefined4 *)(iVar4 + 0x34) = 0;\n      }" (if "if") (parenthesized_expression "(uVar2 == *(uint *)(iVar4 + 0x2c))" (( "(") (binary_expression "uVar2 == *(uint *)(iVar4 + 0x2c)" (identifier "uVar2") (== "==") (pointer_expression "*(uint *)(iVar4 + 0x2c)" (* "*") (cast_expression "(uint *)(iVar4 + 0x2c)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar4 + 0x2c)" (( "(") (binary_expression "iVar4 + 0x2c" (identifier "iVar4") (+ "+") (number_literal "0x2c")) () ")"))))) () ")")) (compound_statement "{\n        *(undefined4 *)(iVar4 + 0x34) = 0;\n      }" ({ "{") (expression_statement "*(undefined4 *)(iVar4 + 0x34) = 0;" (assignment_expression "*(undefined4 *)(iVar4 + 0x34) = 0" (pointer_expression "*(undefined4 *)(iVar4 + 0x34)" (* "*") (cast_expression "(undefined4 *)(iVar4 + 0x34)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar4 + 0x34)" (( "(") (binary_expression "iVar4 + 0x34" (identifier "iVar4") (+ "+") (number_literal "0x34")) () ")")))) (= "=") (number_literal "0")) (; ";")) (} "}"))) (if_statement "if (*(uint *)(iVar4 + 0x30) < *(uint *)(iVar4 + 0x2c)) {\n        *(uint *)(iVar4 + 0x30) = *(uint *)(iVar4 + 0x30) + uVar3;\n      }" (if "if") (parenthesized_expression "(*(uint *)(iVar4 + 0x30) < *(uint *)(iVar4 + 0x2c))" (( "(") (binary_expression "*(uint *)(iVar4 + 0x30) < *(uint *)(iVar4 + 0x2c)" (pointer_expression "*(uint *)(iVar4 + 0x30)" (* "*") (cast_expression "(uint *)(iVar4 + 0x30)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar4 + 0x30)" (( "(") (binary_expression "iVar4 + 0x30" (identifier "iVar4") (+ "+") (number_literal "0x30")) () ")")))) (< "<") (pointer_expression "*(uint *)(iVar4 + 0x2c)" (* "*") (cast_expression "(uint *)(iVar4 + 0x2c)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar4 + 0x2c)" (( "(") (binary_expression "iVar4 + 0x2c" (identifier "iVar4") (+ "+") (number_literal "0x2c")) () ")"))))) () ")")) (compound_statement "{\n        *(uint *)(iVar4 + 0x30) = *(uint *)(iVar4 + 0x30) + uVar3;\n      }" ({ "{") (expression_statement "*(uint *)(iVar4 + 0x30) = *(uint *)(iVar4 + 0x30) + uVar3;" (assignment_expression "*(uint *)(iVar4 + 0x30) = *(uint *)(iVar4 + 0x30) + uVar3" (pointer_expression "*(uint *)(iVar4 + 0x30)" (* "*") (cast_expression "(uint *)(iVar4 + 0x30)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar4 + 0x30)" (( "(") (binary_expression "iVar4 + 0x30" (identifier "iVar4") (+ "+") (number_literal "0x30")) () ")")))) (= "=") (binary_expression "*(uint *)(iVar4 + 0x30) + uVar3" (pointer_expression "*(uint *)(iVar4 + 0x30)" (* "*") (cast_expression "(uint *)(iVar4 + 0x30)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar4 + 0x30)" (( "(") (binary_expression "iVar4 + 0x30" (identifier "iVar4") (+ "+") (number_literal "0x30")) () ")")))) (+ "+") (identifier "uVar3"))) (; ";")) (} "}"))) (} "}")) (else_clause "else {\n      (*(code *)PTR_memcpy_000370fc)(*(undefined4 *)(iVar4 + 0x38),param_2 - iVar1,iVar1);\n      *(int *)(iVar4 + 0x34) = iVar1;\n      *(undefined4 *)(iVar4 + 0x30) = *(undefined4 *)(iVar4 + 0x2c);\n    }" (else "else") (compound_statement "{\n      (*(code *)PTR_memcpy_000370fc)(*(undefined4 *)(iVar4 + 0x38),param_2 - iVar1,iVar1);\n      *(int *)(iVar4 + 0x34) = iVar1;\n      *(undefined4 *)(iVar4 + 0x30) = *(undefined4 *)(iVar4 + 0x2c);\n    }" ({ "{") (expression_statement "(*(code *)PTR_memcpy_000370fc)(*(undefined4 *)(iVar4 + 0x38),param_2 - iVar1,iVar1);" (call_expression "(*(code *)PTR_memcpy_000370fc)(*(undefined4 *)(iVar4 + 0x38),param_2 - iVar1,iVar1)" (parenthesized_expression "(*(code *)PTR_memcpy_000370fc)" (( "(") (pointer_expression "*(code *)PTR_memcpy_000370fc" (* "*") (cast_expression "(code *)PTR_memcpy_000370fc" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_memcpy_000370fc"))) () ")")) (argument_list "(*(undefined4 *)(iVar4 + 0x38),param_2 - iVar1,iVar1)" (( "(") (pointer_expression "*(undefined4 *)(iVar4 + 0x38)" (* "*") (cast_expression "(undefined4 *)(iVar4 + 0x38)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar4 + 0x38)" (( "(") (binary_expression "iVar4 + 0x38" (identifier "iVar4") (+ "+") (number_literal "0x38")) () ")")))) (, ",") (binary_expression "param_2 - iVar1" (identifier "param_2") (- "-") (identifier "iVar1")) (, ",") (identifier "iVar1") () ")"))) (; ";")) (expression_statement "*(int *)(iVar4 + 0x34) = iVar1;" (assignment_expression "*(int *)(iVar4 + 0x34) = iVar1" (pointer_expression "*(int *)(iVar4 + 0x34)" (* "*") (cast_expression "(int *)(iVar4 + 0x34)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar4 + 0x34)" (( "(") (binary_expression "iVar4 + 0x34" (identifier "iVar4") (+ "+") (number_literal "0x34")) () ")")))) (= "=") (identifier "iVar1")) (; ";")) (expression_statement "*(undefined4 *)(iVar4 + 0x30) = *(undefined4 *)(iVar4 + 0x2c);" (assignment_expression "*(undefined4 *)(iVar4 + 0x30) = *(undefined4 *)(iVar4 + 0x2c)" (pointer_expression "*(undefined4 *)(iVar4 + 0x30)" (* "*") (cast_expression "(undefined4 *)(iVar4 + 0x30)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar4 + 0x30)" (( "(") (binary_expression "iVar4 + 0x30" (identifier "iVar4") (+ "+") (number_literal "0x30")) () ")")))) (= "=") (pointer_expression "*(undefined4 *)(iVar4 + 0x2c)" (* "*") (cast_expression "(undefined4 *)(iVar4 + 0x2c)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar4 + 0x2c)" (( "(") (binary_expression "iVar4 + 0x2c" (identifier "iVar4") (+ "+") (number_literal "0x2c")) () ")"))))) (; ";")) (} "}")))) (} "}")) (else_clause "else {\n    (*(code *)PTR_memcpy_000370fc)(*(undefined4 *)(iVar4 + 0x38),param_2 - uVar3,uVar3);\n    *(undefined4 *)(iVar4 + 0x34) = 0;\n    *(undefined4 *)(iVar4 + 0x30) = *(undefined4 *)(iVar4 + 0x2c);\n  }" (else "else") (compound_statement "{\n    (*(code *)PTR_memcpy_000370fc)(*(undefined4 *)(iVar4 + 0x38),param_2 - uVar3,uVar3);\n    *(undefined4 *)(iVar4 + 0x34) = 0;\n    *(undefined4 *)(iVar4 + 0x30) = *(undefined4 *)(iVar4 + 0x2c);\n  }" ({ "{") (expression_statement "(*(code *)PTR_memcpy_000370fc)(*(undefined4 *)(iVar4 + 0x38),param_2 - uVar3,uVar3);" (call_expression "(*(code *)PTR_memcpy_000370fc)(*(undefined4 *)(iVar4 + 0x38),param_2 - uVar3,uVar3)" (parenthesized_expression "(*(code *)PTR_memcpy_000370fc)" (( "(") (pointer_expression "*(code *)PTR_memcpy_000370fc" (* "*") (cast_expression "(code *)PTR_memcpy_000370fc" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_memcpy_000370fc"))) () ")")) (argument_list "(*(undefined4 *)(iVar4 + 0x38),param_2 - uVar3,uVar3)" (( "(") (pointer_expression "*(undefined4 *)(iVar4 + 0x38)" (* "*") (cast_expression "(undefined4 *)(iVar4 + 0x38)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar4 + 0x38)" (( "(") (binary_expression "iVar4 + 0x38" (identifier "iVar4") (+ "+") (number_literal "0x38")) () ")")))) (, ",") (binary_expression "param_2 - uVar3" (identifier "param_2") (- "-") (identifier "uVar3")) (, ",") (identifier "uVar3") () ")"))) (; ";")) (expression_statement "*(undefined4 *)(iVar4 + 0x34) = 0;" (assignment_expression "*(undefined4 *)(iVar4 + 0x34) = 0" (pointer_expression "*(undefined4 *)(iVar4 + 0x34)" (* "*") (cast_expression "(undefined4 *)(iVar4 + 0x34)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar4 + 0x34)" (( "(") (binary_expression "iVar4 + 0x34" (identifier "iVar4") (+ "+") (number_literal "0x34")) () ")")))) (= "=") (number_literal "0")) (; ";")) (expression_statement "*(undefined4 *)(iVar4 + 0x30) = *(undefined4 *)(iVar4 + 0x2c);" (assignment_expression "*(undefined4 *)(iVar4 + 0x30) = *(undefined4 *)(iVar4 + 0x2c)" (pointer_expression "*(undefined4 *)(iVar4 + 0x30)" (* "*") (cast_expression "(undefined4 *)(iVar4 + 0x30)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar4 + 0x30)" (( "(") (binary_expression "iVar4 + 0x30" (identifier "iVar4") (+ "+") (number_literal "0x30")) () ")")))) (= "=") (pointer_expression "*(undefined4 *)(iVar4 + 0x2c)" (* "*") (cast_expression "(undefined4 *)(iVar4 + 0x2c)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar4 + 0x2c)" (( "(") (binary_expression "iVar4 + 0x2c" (identifier "iVar4") (+ "+") (number_literal "0x2c")) () ")"))))) (; ";")) (} "}")))) (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}")))
(translation_unit (function_definition type: (type_identifier) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (primitive_type) declarator: (identifier)) (parameter_declaration type: (primitive_type) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (identifier)))) body: (compound_statement (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (parenthesized_expression (pointer_expression argument: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) arguments: (argument_list (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) (binary_expression left: (number_literal) right: (parenthesized_expression (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal)))) (number_literal))))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (return_statement (number_literal)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (binary_expression left: (number_literal) right: (parenthesized_expression (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal)))))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal))))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal)))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (compound_statement (expression_statement (assignment_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 (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal)))))) (binary_expression left: (identifier) right: (identifier)) (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal)))))))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) consequence: (compound_statement (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal))))) (if_statement condition: (parenthesized_expression (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) consequence: (compound_statement (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (identifier))))))) alternative: (else_clause (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 (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) (binary_expression left: (identifier) right: (identifier)) (identifier)))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (identifier))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))))))) alternative: (else_clause (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 (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) (binary_expression left: (identifier) right: (identifier)) (identifier)))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal)))))))))) (return_statement (number_literal)))))

undefined4 MASKED(int param_1,int param_2,uint param_3)

{
  int iVar1;
  uint uVar2;
  uint uVar3;
  int iVar4;
  
  iVar4 = *(int *)(param_1 + 0x1c);
  if (*(int *)(iVar4 + 0x38) == 0) {
    iVar1 = (**(code **)(param_1 + 0x20))
                      (*(undefined4 *)(param_1 + 0x28),1 << (*(uint *)(iVar4 + 0x28) & 0x1f),1);
    *(int *)(iVar4 + 0x38) = iVar1;
    if (iVar1 == 0) {
      return 1;
    }
  }
  if (*(int *)(iVar4 + 0x2c) == 0) {
    *(int *)(iVar4 + 0x2c) = 1 << (*(uint *)(iVar4 + 0x28) & 0x1f);
    *(undefined4 *)(iVar4 + 0x34) = 0;
    *(undefined4 *)(iVar4 + 0x30) = 0;
  }
  uVar3 = *(uint *)(iVar4 + 0x2c);
  if (param_3 < uVar3) {
    uVar3 = uVar3 - *(int *)(iVar4 + 0x34);
    if (param_3 <= uVar3) {
      uVar3 = param_3;
    }
    (*(code *)PTR_memcpy_000370fc)
              (*(int *)(iVar4 + 0x38) + *(int *)(iVar4 + 0x34),param_2 - param_3,uVar3);
    iVar1 = param_3 - uVar3;
    if (iVar1 == 0) {
      uVar2 = uVar3 + *(int *)(iVar4 + 0x34);
      *(uint *)(iVar4 + 0x34) = uVar2;
      if (uVar2 == *(uint *)(iVar4 + 0x2c)) {
        *(undefined4 *)(iVar4 + 0x34) = 0;
      }
      if (*(uint *)(iVar4 + 0x30) < *(uint *)(iVar4 + 0x2c)) {
        *(uint *)(iVar4 + 0x30) = *(uint *)(iVar4 + 0x30) + uVar3;
      }
    }
    else {
      (*(code *)PTR_memcpy_000370fc)(*(undefined4 *)(iVar4 + 0x38),param_2 - iVar1,iVar1);
      *(int *)(iVar4 + 0x34) = iVar1;
      *(undefined4 *)(iVar4 + 0x30) = *(undefined4 *)(iVar4 + 0x2c);
    }
  }
  else {
    (*(code *)PTR_memcpy_000370fc)(*(undefined4 *)(iVar4 + 0x38),param_2 - uVar3,uVar3);
    *(undefined4 *)(iVar4 + 0x34) = 0;
    *(undefined4 *)(iVar4 + 0x30) = *(undefined4 *)(iVar4 + 0x2c);
  }
  return 0;
}

