
int start_bunzip(void *jmpbuf,bunzip_data **bdp,int in_fd,void *inbuf,int len)

{
  undefined *puVar1;
  bunzip_data *bd;
  uint uVar2;
  uint32_t *puVar3;
  int iVar4;
  
  if (in_fd == -1) {
    bd = (bunzip_data *)(*(code *)PTR_xzalloc_0012a1d0)(0xa080);
    *bdp = bd;
    bd->jmpbuf = (jmp_buf *)jmpbuf;
    bd->in_fd = -1;
    bd->inbuf = (uint8_t *)inbuf;
  }
  else {
    bd = (bunzip_data *)(*(code *)PTR_xzalloc_0012a1d0)(0xb080);
    *bdp = bd;
    bd->jmpbuf = (jmp_buf *)jmpbuf;
    bd->in_fd = in_fd;
    puVar1 = PTR_memcpy_0012b150;
    bd->inbuf = (uint8_t *)(bd + 1);
    (*(code *)puVar1)(bd + 1,inbuf,len);
  }
  puVar1 = PTR_crc32_filltable_0012aa3c;
  bd->inbufCount = len;
  (*(code *)puVar1)(bd->crc32Table,1);
  uVar2 = get_bits(bd,0x10);
  puVar1 = PTR_malloc_or_warn_0012aac0;
  if (8 < uVar2 - 0x6831) {
    return -2;
  }
  uVar2 = uVar2 * 100000 + 0x6105c200;
  bd->dbufSize = uVar2;
  puVar3 = (uint32_t *)(*(code *)puVar1)(uVar2 * 4);
  if (puVar3 != (uint32_t *)0x0) {
    bd->dbuf = puVar3;
    return 0;
  }
  (*(code *)PTR_free_0012b168)(bd);
  iVar4 = (*(code *)PTR_xfunc_die_0012a1b4)();
  return iVar4;
}



undefined4
FUN_000a5f88(undefined4 param_1,int *param_2,int param_3,undefined4 param_4,undefined4 param_5)

{
  undefined *puVar1;
  int iVar2;
  int iVar3;
  undefined4 uVar4;
  
  if (param_3 == -1) {
    iVar2 = (*(code *)PTR_FUN_0012a1d0)(0xa080);
    *param_2 = iVar2;
    *(undefined4 *)(iVar2 + 0x44) = param_1;
    *(undefined4 *)(iVar2 + 8) = 0xffffffff;
    *(undefined4 *)(iVar2 + 0x18) = param_4;
  }
  else {
    iVar2 = (*(code *)PTR_FUN_0012a1d0)(0xb080);
    *param_2 = iVar2;
    *(undefined4 *)(iVar2 + 0x44) = param_1;
    *(int *)(iVar2 + 8) = param_3;
    puVar1 = PTR_memcpy_0012b150;
    *(int *)(iVar2 + 0x18) = iVar2 + 0xa080;
    (*(code *)puVar1)(iVar2 + 0xa080,param_4,param_5);
  }
  puVar1 = PTR_FUN_0012aa3c;
  *(undefined4 *)(iVar2 + 0x10) = param_5;
  (*(code *)puVar1)(iVar2 + 0x48,1);
  iVar3 = FUN_000a531c(iVar2,0x10);
  puVar1 = PTR_FUN_0012aac0;
  if (8 < iVar3 - 0x6831U) {
    return 0xfffffffe;
  }
  iVar3 = iVar3 * 100000 + 0x6105c200;
  *(int *)(iVar2 + 0x40) = iVar3;
  iVar3 = (*(code *)puVar1)(iVar3 * 4);
  if (iVar3 != 0) {
    *(int *)(iVar2 + 0x3c) = iVar3;
    return 0;
  }
  (*(code *)PTR_free_0012b168)(iVar2);
  uVar4 = (*(code *)PTR_FUN_0012a1b4)();
  return uVar4;
}


lui gp,0x9
addiu gp,gp,-0x3e38
addu gp,gp,t9
addiu sp,sp,-0x38
li v0,-0x1
sw gp,0x10(sp)
sw s5,0x30(sp)
or s5,a1,zero
sw s4,0x2c(sp)
or s4,a0,zero
sw s3,0x28(sp)
sw s2,0x24(sp)
or s2,a3,zero
sw s1,0x20(sp)
or s1,a2,zero
sw ra,0x34(sp)
sw s0,0x1c(sp)
bne a2,v0,0x000a60d4
_lw s3,0x48(sp)
lw t9,-0x7f80(gp)
jalr t9
_ori a0,zero,0xa080
lw gp,0x10(sp)
or s0,v0,zero
sw v0,0x0(s5)
sw s4,0x44(v0)
sw s1,0x8(v0)
sw s2,0x18(v0)
lw t9,-0x7714(gp)
li a1,0x1
addiu a0,s0,0x48
jalr t9
_sw s3,0x10(s0)
li a1,0x10
lw gp,0x10(sp)
lw t9,-0x7728(gp)
addiu t9,t9,0x531c
bal 0x000a531c
_or a0,s0,zero
addiu v1,v0,-0x6831
sltiu v1,v1,0x9
bne v1,zero,0x000a605c
_lw gp,0x10(sp)
lw ra,0x34(sp)
li v0,-0x2
lw s5,0x30(sp)
lw s4,0x2c(sp)
lw s3,0x28(sp)
lw s2,0x24(sp)
lw s1,0x20(sp)
lw s0,0x1c(sp)
jr ra
_addiu sp,sp,0x38
lui a0,0x1
lw t9,-0x7690(gp)
lui v1,0x6105
ori a0,a0,0x86a0
mul a1,v0,a0
ori v1,v1,0xc200
addu v0,a1,v1
sll a0,v0,0x2
jalr t9
_sw v0,0x40(s0)
beq v0,zero,0x000a60b8
_lw gp,0x10(sp)
lw ra,0x34(sp)
lw s5,0x30(sp)
lw s4,0x2c(sp)
lw s3,0x28(sp)
lw s2,0x24(sp)
lw s1,0x20(sp)
sw v0,0x3c(s0)
or v0,zero,zero
lw s0,0x1c(sp)
jr ra
_addiu sp,sp,0x38
lw t9,-0x6fe8(gp)
jalr t9
_or a0,s0,zero
lw gp,0x10(sp)
lw t9,-0x7f9c(gp)
jalr t9
_nop
lw t9,-0x7f80(gp)
jalr t9
_ori a0,zero,0xb080
ori a0,zero,0xa080
lw gp,0x10(sp)
or a2,s3,zero
addu a0,v0,a0
sw v0,0x0(s5)
sw s4,0x44(v0)
or a1,s2,zero
sw s1,0x8(v0)
or s0,v0,zero
lw t9,-0x7000(gp)
jalr t9
_sw a0,0x18(v0)
b 0x000a5ff8
_lw gp,0x10(sp)
(translation_unit "undefined4\nFUN_000a5f88(undefined4 param_1,int *param_2,int param_3,undefined4 param_4,undefined4 param_5)\n\n{\n  undefined *puVar1;\n  int iVar2;\n  int iVar3;\n  undefined4 uVar4;\n  \n  if (param_3 == -1) {\n    iVar2 = (*(code *)PTR_FUN_0012a1d0)(0xa080);\n    *param_2 = iVar2;\n    *(undefined4 *)(iVar2 + 0x44) = param_1;\n    *(undefined4 *)(iVar2 + 8) = 0xffffffff;\n    *(undefined4 *)(iVar2 + 0x18) = param_4;\n  }\n  else {\n    iVar2 = (*(code *)PTR_FUN_0012a1d0)(0xb080);\n    *param_2 = iVar2;\n    *(undefined4 *)(iVar2 + 0x44) = param_1;\n    *(int *)(iVar2 + 8) = param_3;\n    puVar1 = PTR_memcpy_0012b150;\n    *(int *)(iVar2 + 0x18) = iVar2 + 0xa080;\n    (*(code *)puVar1)(iVar2 + 0xa080,param_4,param_5);\n  }\n  puVar1 = PTR_FUN_0012aa3c;\n  *(undefined4 *)(iVar2 + 0x10) = param_5;\n  (*(code *)puVar1)(iVar2 + 0x48,1);\n  iVar3 = FUN_000a531c(iVar2,0x10);\n  puVar1 = PTR_FUN_0012aac0;\n  if (8 < iVar3 - 0x6831U) {\n    return 0xfffffffe;\n  }\n  iVar3 = iVar3 * 100000 + 0x6105c200;\n  *(int *)(iVar2 + 0x40) = iVar3;\n  iVar3 = (*(code *)puVar1)(iVar3 * 4);\n  if (iVar3 != 0) {\n    *(int *)(iVar2 + 0x3c) = iVar3;\n    return 0;\n  }\n  (*(code *)PTR_free_0012b168)(iVar2);\n  uVar4 = (*(code *)PTR_FUN_0012a1b4)();\n  return uVar4;\n}\n\n" (function_definition "undefined4\nFUN_000a5f88(undefined4 param_1,int *param_2,int param_3,undefined4 param_4,undefined4 param_5)\n\n{\n  undefined *puVar1;\n  int iVar2;\n  int iVar3;\n  undefined4 uVar4;\n  \n  if (param_3 == -1) {\n    iVar2 = (*(code *)PTR_FUN_0012a1d0)(0xa080);\n    *param_2 = iVar2;\n    *(undefined4 *)(iVar2 + 0x44) = param_1;\n    *(undefined4 *)(iVar2 + 8) = 0xffffffff;\n    *(undefined4 *)(iVar2 + 0x18) = param_4;\n  }\n  else {\n    iVar2 = (*(code *)PTR_FUN_0012a1d0)(0xb080);\n    *param_2 = iVar2;\n    *(undefined4 *)(iVar2 + 0x44) = param_1;\n    *(int *)(iVar2 + 8) = param_3;\n    puVar1 = PTR_memcpy_0012b150;\n    *(int *)(iVar2 + 0x18) = iVar2 + 0xa080;\n    (*(code *)puVar1)(iVar2 + 0xa080,param_4,param_5);\n  }\n  puVar1 = PTR_FUN_0012aa3c;\n  *(undefined4 *)(iVar2 + 0x10) = param_5;\n  (*(code *)puVar1)(iVar2 + 0x48,1);\n  iVar3 = FUN_000a531c(iVar2,0x10);\n  puVar1 = PTR_FUN_0012aac0;\n  if (8 < iVar3 - 0x6831U) {\n    return 0xfffffffe;\n  }\n  iVar3 = iVar3 * 100000 + 0x6105c200;\n  *(int *)(iVar2 + 0x40) = iVar3;\n  iVar3 = (*(code *)puVar1)(iVar3 * 4);\n  if (iVar3 != 0) {\n    *(int *)(iVar2 + 0x3c) = iVar3;\n    return 0;\n  }\n  (*(code *)PTR_free_0012b168)(iVar2);\n  uVar4 = (*(code *)PTR_FUN_0012a1b4)();\n  return uVar4;\n}" type_identifier (function_declarator "FUN_000a5f88(undefined4 param_1,int *param_2,int param_3,undefined4 param_4,undefined4 param_5)" identifier (parameter_list "(undefined4 param_1,int *param_2,int param_3,undefined4 param_4,undefined4 param_5)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "int *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "int param_3" primitive_type identifier) , (parameter_declaration "undefined4 param_4" type_identifier identifier) , (parameter_declaration "undefined4 param_5" type_identifier identifier) ))) (compound_statement "{\n  undefined *puVar1;\n  int iVar2;\n  int iVar3;\n  undefined4 uVar4;\n  \n  if (param_3 == -1) {\n    iVar2 = (*(code *)PTR_FUN_0012a1d0)(0xa080);\n    *param_2 = iVar2;\n    *(undefined4 *)(iVar2 + 0x44) = param_1;\n    *(undefined4 *)(iVar2 + 8) = 0xffffffff;\n    *(undefined4 *)(iVar2 + 0x18) = param_4;\n  }\n  else {\n    iVar2 = (*(code *)PTR_FUN_0012a1d0)(0xb080);\n    *param_2 = iVar2;\n    *(undefined4 *)(iVar2 + 0x44) = param_1;\n    *(int *)(iVar2 + 8) = param_3;\n    puVar1 = PTR_memcpy_0012b150;\n    *(int *)(iVar2 + 0x18) = iVar2 + 0xa080;\n    (*(code *)puVar1)(iVar2 + 0xa080,param_4,param_5);\n  }\n  puVar1 = PTR_FUN_0012aa3c;\n  *(undefined4 *)(iVar2 + 0x10) = param_5;\n  (*(code *)puVar1)(iVar2 + 0x48,1);\n  iVar3 = FUN_000a531c(iVar2,0x10);\n  puVar1 = PTR_FUN_0012aac0;\n  if (8 < iVar3 - 0x6831U) {\n    return 0xfffffffe;\n  }\n  iVar3 = iVar3 * 100000 + 0x6105c200;\n  *(int *)(iVar2 + 0x40) = iVar3;\n  iVar3 = (*(code *)puVar1)(iVar3 * 4);\n  if (iVar3 != 0) {\n    *(int *)(iVar2 + 0x3c) = iVar3;\n    return 0;\n  }\n  (*(code *)PTR_free_0012b168)(iVar2);\n  uVar4 = (*(code *)PTR_FUN_0012a1b4)();\n  return uVar4;\n}" { (declaration "undefined *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "undefined4 uVar4;" type_identifier identifier ;) (if_statement "if (param_3 == -1) {\n    iVar2 = (*(code *)PTR_FUN_0012a1d0)(0xa080);\n    *param_2 = iVar2;\n    *(undefined4 *)(iVar2 + 0x44) = param_1;\n    *(undefined4 *)(iVar2 + 8) = 0xffffffff;\n    *(undefined4 *)(iVar2 + 0x18) = param_4;\n  }\n  else {\n    iVar2 = (*(code *)PTR_FUN_0012a1d0)(0xb080);\n    *param_2 = iVar2;\n    *(undefined4 *)(iVar2 + 0x44) = param_1;\n    *(int *)(iVar2 + 8) = param_3;\n    puVar1 = PTR_memcpy_0012b150;\n    *(int *)(iVar2 + 0x18) = iVar2 + 0xa080;\n    (*(code *)puVar1)(iVar2 + 0xa080,param_4,param_5);\n  }" if (parenthesized_expression "(param_3 == -1)" ( (binary_expression "param_3 == -1" identifier == number_literal) )) (compound_statement "{\n    iVar2 = (*(code *)PTR_FUN_0012a1d0)(0xa080);\n    *param_2 = iVar2;\n    *(undefined4 *)(iVar2 + 0x44) = param_1;\n    *(undefined4 *)(iVar2 + 8) = 0xffffffff;\n    *(undefined4 *)(iVar2 + 0x18) = param_4;\n  }" { (expression_statement "iVar2 = (*(code *)PTR_FUN_0012a1d0)(0xa080);" (assignment_expression "iVar2 = (*(code *)PTR_FUN_0012a1d0)(0xa080)" identifier = (call_expression "(*(code *)PTR_FUN_0012a1d0)(0xa080)" (parenthesized_expression "(*(code *)PTR_FUN_0012a1d0)" ( (pointer_expression "*(code *)PTR_FUN_0012a1d0" * (cast_expression "(code *)PTR_FUN_0012a1d0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(0xa080)" ( number_literal )))) ;) (expression_statement "*param_2 = iVar2;" (assignment_expression "*param_2 = iVar2" (pointer_expression "*param_2" * identifier) = identifier) ;) (expression_statement "*(undefined4 *)(iVar2 + 0x44) = param_1;" (assignment_expression "*(undefined4 *)(iVar2 + 0x44) = param_1" (pointer_expression "*(undefined4 *)(iVar2 + 0x44)" * (cast_expression "(undefined4 *)(iVar2 + 0x44)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0x44)" ( (binary_expression "iVar2 + 0x44" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(undefined4 *)(iVar2 + 8) = 0xffffffff;" (assignment_expression "*(undefined4 *)(iVar2 + 8) = 0xffffffff" (pointer_expression "*(undefined4 *)(iVar2 + 8)" * (cast_expression "(undefined4 *)(iVar2 + 8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 8)" ( (binary_expression "iVar2 + 8" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined4 *)(iVar2 + 0x18) = param_4;" (assignment_expression "*(undefined4 *)(iVar2 + 0x18) = param_4" (pointer_expression "*(undefined4 *)(iVar2 + 0x18)" * (cast_expression "(undefined4 *)(iVar2 + 0x18)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0x18)" ( (binary_expression "iVar2 + 0x18" identifier + number_literal) )))) = identifier) ;) }) (else_clause "else {\n    iVar2 = (*(code *)PTR_FUN_0012a1d0)(0xb080);\n    *param_2 = iVar2;\n    *(undefined4 *)(iVar2 + 0x44) = param_1;\n    *(int *)(iVar2 + 8) = param_3;\n    puVar1 = PTR_memcpy_0012b150;\n    *(int *)(iVar2 + 0x18) = iVar2 + 0xa080;\n    (*(code *)puVar1)(iVar2 + 0xa080,param_4,param_5);\n  }" else (compound_statement "{\n    iVar2 = (*(code *)PTR_FUN_0012a1d0)(0xb080);\n    *param_2 = iVar2;\n    *(undefined4 *)(iVar2 + 0x44) = param_1;\n    *(int *)(iVar2 + 8) = param_3;\n    puVar1 = PTR_memcpy_0012b150;\n    *(int *)(iVar2 + 0x18) = iVar2 + 0xa080;\n    (*(code *)puVar1)(iVar2 + 0xa080,param_4,param_5);\n  }" { (expression_statement "iVar2 = (*(code *)PTR_FUN_0012a1d0)(0xb080);" (assignment_expression "iVar2 = (*(code *)PTR_FUN_0012a1d0)(0xb080)" identifier = (call_expression "(*(code *)PTR_FUN_0012a1d0)(0xb080)" (parenthesized_expression "(*(code *)PTR_FUN_0012a1d0)" ( (pointer_expression "*(code *)PTR_FUN_0012a1d0" * (cast_expression "(code *)PTR_FUN_0012a1d0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(0xb080)" ( number_literal )))) ;) (expression_statement "*param_2 = iVar2;" (assignment_expression "*param_2 = iVar2" (pointer_expression "*param_2" * identifier) = identifier) ;) (expression_statement "*(undefined4 *)(iVar2 + 0x44) = param_1;" (assignment_expression "*(undefined4 *)(iVar2 + 0x44) = param_1" (pointer_expression "*(undefined4 *)(iVar2 + 0x44)" * (cast_expression "(undefined4 *)(iVar2 + 0x44)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0x44)" ( (binary_expression "iVar2 + 0x44" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(int *)(iVar2 + 8) = param_3;" (assignment_expression "*(int *)(iVar2 + 8) = param_3" (pointer_expression "*(int *)(iVar2 + 8)" * (cast_expression "(int *)(iVar2 + 8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 8)" ( (binary_expression "iVar2 + 8" identifier + number_literal) )))) = identifier) ;) (expression_statement "puVar1 = PTR_memcpy_0012b150;" (assignment_expression "puVar1 = PTR_memcpy_0012b150" identifier = identifier) ;) (expression_statement "*(int *)(iVar2 + 0x18) = iVar2 + 0xa080;" (assignment_expression "*(int *)(iVar2 + 0x18) = iVar2 + 0xa080" (pointer_expression "*(int *)(iVar2 + 0x18)" * (cast_expression "(int *)(iVar2 + 0x18)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0x18)" ( (binary_expression "iVar2 + 0x18" identifier + number_literal) )))) = (binary_expression "iVar2 + 0xa080" identifier + number_literal)) ;) (expression_statement "(*(code *)puVar1)(iVar2 + 0xa080,param_4,param_5);" (call_expression "(*(code *)puVar1)(iVar2 + 0xa080,param_4,param_5)" (parenthesized_expression "(*(code *)puVar1)" ( (pointer_expression "*(code *)puVar1" * (cast_expression "(code *)puVar1" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar2 + 0xa080,param_4,param_5)" ( (binary_expression "iVar2 + 0xa080" identifier + number_literal) , identifier , identifier ))) ;) }))) (expression_statement "puVar1 = PTR_FUN_0012aa3c;" (assignment_expression "puVar1 = PTR_FUN_0012aa3c" identifier = identifier) ;) (expression_statement "*(undefined4 *)(iVar2 + 0x10) = param_5;" (assignment_expression "*(undefined4 *)(iVar2 + 0x10) = param_5" (pointer_expression "*(undefined4 *)(iVar2 + 0x10)" * (cast_expression "(undefined4 *)(iVar2 + 0x10)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0x10)" ( (binary_expression "iVar2 + 0x10" identifier + number_literal) )))) = identifier) ;) (expression_statement "(*(code *)puVar1)(iVar2 + 0x48,1);" (call_expression "(*(code *)puVar1)(iVar2 + 0x48,1)" (parenthesized_expression "(*(code *)puVar1)" ( (pointer_expression "*(code *)puVar1" * (cast_expression "(code *)puVar1" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar2 + 0x48,1)" ( (binary_expression "iVar2 + 0x48" identifier + number_literal) , number_literal ))) ;) (expression_statement "iVar3 = FUN_000a531c(iVar2,0x10);" (assignment_expression "iVar3 = FUN_000a531c(iVar2,0x10)" identifier = (call_expression "FUN_000a531c(iVar2,0x10)" identifier (argument_list "(iVar2,0x10)" ( identifier , number_literal )))) ;) (expression_statement "puVar1 = PTR_FUN_0012aac0;" (assignment_expression "puVar1 = PTR_FUN_0012aac0" identifier = identifier) ;) (if_statement "if (8 < iVar3 - 0x6831U) {\n    return 0xfffffffe;\n  }" if (parenthesized_expression "(8 < iVar3 - 0x6831U)" ( (binary_expression "8 < iVar3 - 0x6831U" number_literal < (binary_expression "iVar3 - 0x6831U" identifier - number_literal)) )) (compound_statement "{\n    return 0xfffffffe;\n  }" { (return_statement "return 0xfffffffe;" return number_literal ;) })) (expression_statement "iVar3 = iVar3 * 100000 + 0x6105c200;" (assignment_expression "iVar3 = iVar3 * 100000 + 0x6105c200" identifier = (binary_expression "iVar3 * 100000 + 0x6105c200" (binary_expression "iVar3 * 100000" identifier * number_literal) + number_literal)) ;) (expression_statement "*(int *)(iVar2 + 0x40) = iVar3;" (assignment_expression "*(int *)(iVar2 + 0x40) = iVar3" (pointer_expression "*(int *)(iVar2 + 0x40)" * (cast_expression "(int *)(iVar2 + 0x40)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0x40)" ( (binary_expression "iVar2 + 0x40" identifier + number_literal) )))) = identifier) ;) (expression_statement "iVar3 = (*(code *)puVar1)(iVar3 * 4);" (assignment_expression "iVar3 = (*(code *)puVar1)(iVar3 * 4)" identifier = (call_expression "(*(code *)puVar1)(iVar3 * 4)" (parenthesized_expression "(*(code *)puVar1)" ( (pointer_expression "*(code *)puVar1" * (cast_expression "(code *)puVar1" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar3 * 4)" ( (binary_expression "iVar3 * 4" identifier * number_literal) )))) ;) (if_statement "if (iVar3 != 0) {\n    *(int *)(iVar2 + 0x3c) = iVar3;\n    return 0;\n  }" if (parenthesized_expression "(iVar3 != 0)" ( (binary_expression "iVar3 != 0" identifier != number_literal) )) (compound_statement "{\n    *(int *)(iVar2 + 0x3c) = iVar3;\n    return 0;\n  }" { (expression_statement "*(int *)(iVar2 + 0x3c) = iVar3;" (assignment_expression "*(int *)(iVar2 + 0x3c) = iVar3" (pointer_expression "*(int *)(iVar2 + 0x3c)" * (cast_expression "(int *)(iVar2 + 0x3c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0x3c)" ( (binary_expression "iVar2 + 0x3c" identifier + number_literal) )))) = identifier) ;) (return_statement "return 0;" return number_literal ;) })) (expression_statement "(*(code *)PTR_free_0012b168)(iVar2);" (call_expression "(*(code *)PTR_free_0012b168)(iVar2)" (parenthesized_expression "(*(code *)PTR_free_0012b168)" ( (pointer_expression "*(code *)PTR_free_0012b168" * (cast_expression "(code *)PTR_free_0012b168" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar2)" ( identifier ))) ;) (expression_statement "uVar4 = (*(code *)PTR_FUN_0012a1b4)();" (assignment_expression "uVar4 = (*(code *)PTR_FUN_0012a1b4)()" identifier = (call_expression "(*(code *)PTR_FUN_0012a1b4)()" (parenthesized_expression "(*(code *)PTR_FUN_0012a1b4)" ( (pointer_expression "*(code *)PTR_FUN_0012a1b4" * (cast_expression "(code *)PTR_FUN_0012a1b4" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( )))) ;) (return_statement "return uVar4;" return identifier ;) })))
(translation_unit "int start_bunzip(void *jmpbuf,bunzip_data **bdp,int in_fd,void *inbuf,int len)\n\n{\n  undefined *puVar1;\n  bunzip_data *bd;\n  uint uVar2;\n  uint32_t *puVar3;\n  int iVar4;\n  \n  if (in_fd == -1) {\n    bd = (bunzip_data *)(*(code *)PTR_xzalloc_0012a1d0)(0xa080);\n    *bdp = bd;\n    bd->jmpbuf = (jmp_buf *)jmpbuf;\n    bd->in_fd = -1;\n    bd->inbuf = (uint8_t *)inbuf;\n  }\n  else {\n    bd = (bunzip_data *)(*(code *)PTR_xzalloc_0012a1d0)(0xb080);\n    *bdp = bd;\n    bd->jmpbuf = (jmp_buf *)jmpbuf;\n    bd->in_fd = in_fd;\n    puVar1 = PTR_memcpy_0012b150;\n    bd->inbuf = (uint8_t *)(bd + 1);\n    (*(code *)puVar1)(bd + 1,inbuf,len);\n  }\n  puVar1 = PTR_crc32_filltable_0012aa3c;\n  bd->inbufCount = len;\n  (*(code *)puVar1)(bd->crc32Table,1);\n  uVar2 = get_bits(bd,0x10);\n  puVar1 = PTR_malloc_or_warn_0012aac0;\n  if (8 < uVar2 - 0x6831) {\n    return -2;\n  }\n  uVar2 = uVar2 * 100000 + 0x6105c200;\n  bd->dbufSize = uVar2;\n  puVar3 = (uint32_t *)(*(code *)puVar1)(uVar2 * 4);\n  if (puVar3 != (uint32_t *)0x0) {\n    bd->dbuf = puVar3;\n    return 0;\n  }\n  (*(code *)PTR_free_0012b168)(bd);\n  iVar4 = (*(code *)PTR_xfunc_die_0012a1b4)();\n  return iVar4;\n}\n\n" (function_definition "int start_bunzip(void *jmpbuf,bunzip_data **bdp,int in_fd,void *inbuf,int len)\n\n{\n  undefined *puVar1;\n  bunzip_data *bd;\n  uint uVar2;\n  uint32_t *puVar3;\n  int iVar4;\n  \n  if (in_fd == -1) {\n    bd = (bunzip_data *)(*(code *)PTR_xzalloc_0012a1d0)(0xa080);\n    *bdp = bd;\n    bd->jmpbuf = (jmp_buf *)jmpbuf;\n    bd->in_fd = -1;\n    bd->inbuf = (uint8_t *)inbuf;\n  }\n  else {\n    bd = (bunzip_data *)(*(code *)PTR_xzalloc_0012a1d0)(0xb080);\n    *bdp = bd;\n    bd->jmpbuf = (jmp_buf *)jmpbuf;\n    bd->in_fd = in_fd;\n    puVar1 = PTR_memcpy_0012b150;\n    bd->inbuf = (uint8_t *)(bd + 1);\n    (*(code *)puVar1)(bd + 1,inbuf,len);\n  }\n  puVar1 = PTR_crc32_filltable_0012aa3c;\n  bd->inbufCount = len;\n  (*(code *)puVar1)(bd->crc32Table,1);\n  uVar2 = get_bits(bd,0x10);\n  puVar1 = PTR_malloc_or_warn_0012aac0;\n  if (8 < uVar2 - 0x6831) {\n    return -2;\n  }\n  uVar2 = uVar2 * 100000 + 0x6105c200;\n  bd->dbufSize = uVar2;\n  puVar3 = (uint32_t *)(*(code *)puVar1)(uVar2 * 4);\n  if (puVar3 != (uint32_t *)0x0) {\n    bd->dbuf = puVar3;\n    return 0;\n  }\n  (*(code *)PTR_free_0012b168)(bd);\n  iVar4 = (*(code *)PTR_xfunc_die_0012a1b4)();\n  return iVar4;\n}" primitive_type (function_declarator "start_bunzip(void *jmpbuf,bunzip_data **bdp,int in_fd,void *inbuf,int len)" identifier (parameter_list "(void *jmpbuf,bunzip_data **bdp,int in_fd,void *inbuf,int len)" ( (parameter_declaration "void *jmpbuf" primitive_type (pointer_declarator "*jmpbuf" * identifier)) , (parameter_declaration "bunzip_data **bdp" type_identifier (pointer_declarator "**bdp" * (pointer_declarator "*bdp" * identifier))) , (parameter_declaration "int in_fd" primitive_type identifier) , (parameter_declaration "void *inbuf" primitive_type (pointer_declarator "*inbuf" * identifier)) , (parameter_declaration "int len" primitive_type identifier) ))) (compound_statement "{\n  undefined *puVar1;\n  bunzip_data *bd;\n  uint uVar2;\n  uint32_t *puVar3;\n  int iVar4;\n  \n  if (in_fd == -1) {\n    bd = (bunzip_data *)(*(code *)PTR_xzalloc_0012a1d0)(0xa080);\n    *bdp = bd;\n    bd->jmpbuf = (jmp_buf *)jmpbuf;\n    bd->in_fd = -1;\n    bd->inbuf = (uint8_t *)inbuf;\n  }\n  else {\n    bd = (bunzip_data *)(*(code *)PTR_xzalloc_0012a1d0)(0xb080);\n    *bdp = bd;\n    bd->jmpbuf = (jmp_buf *)jmpbuf;\n    bd->in_fd = in_fd;\n    puVar1 = PTR_memcpy_0012b150;\n    bd->inbuf = (uint8_t *)(bd + 1);\n    (*(code *)puVar1)(bd + 1,inbuf,len);\n  }\n  puVar1 = PTR_crc32_filltable_0012aa3c;\n  bd->inbufCount = len;\n  (*(code *)puVar1)(bd->crc32Table,1);\n  uVar2 = get_bits(bd,0x10);\n  puVar1 = PTR_malloc_or_warn_0012aac0;\n  if (8 < uVar2 - 0x6831) {\n    return -2;\n  }\n  uVar2 = uVar2 * 100000 + 0x6105c200;\n  bd->dbufSize = uVar2;\n  puVar3 = (uint32_t *)(*(code *)puVar1)(uVar2 * 4);\n  if (puVar3 != (uint32_t *)0x0) {\n    bd->dbuf = puVar3;\n    return 0;\n  }\n  (*(code *)PTR_free_0012b168)(bd);\n  iVar4 = (*(code *)PTR_xfunc_die_0012a1b4)();\n  return iVar4;\n}" { (declaration "undefined *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "bunzip_data *bd;" type_identifier (pointer_declarator "*bd" * identifier) ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "uint32_t *puVar3;" primitive_type (pointer_declarator "*puVar3" * identifier) ;) (declaration "int iVar4;" primitive_type identifier ;) (if_statement "if (in_fd == -1) {\n    bd = (bunzip_data *)(*(code *)PTR_xzalloc_0012a1d0)(0xa080);\n    *bdp = bd;\n    bd->jmpbuf = (jmp_buf *)jmpbuf;\n    bd->in_fd = -1;\n    bd->inbuf = (uint8_t *)inbuf;\n  }\n  else {\n    bd = (bunzip_data *)(*(code *)PTR_xzalloc_0012a1d0)(0xb080);\n    *bdp = bd;\n    bd->jmpbuf = (jmp_buf *)jmpbuf;\n    bd->in_fd = in_fd;\n    puVar1 = PTR_memcpy_0012b150;\n    bd->inbuf = (uint8_t *)(bd + 1);\n    (*(code *)puVar1)(bd + 1,inbuf,len);\n  }" if (parenthesized_expression "(in_fd == -1)" ( (binary_expression "in_fd == -1" identifier == number_literal) )) (compound_statement "{\n    bd = (bunzip_data *)(*(code *)PTR_xzalloc_0012a1d0)(0xa080);\n    *bdp = bd;\n    bd->jmpbuf = (jmp_buf *)jmpbuf;\n    bd->in_fd = -1;\n    bd->inbuf = (uint8_t *)inbuf;\n  }" { (expression_statement "bd = (bunzip_data *)(*(code *)PTR_xzalloc_0012a1d0)(0xa080);" (assignment_expression "bd = (bunzip_data *)(*(code *)PTR_xzalloc_0012a1d0)(0xa080)" identifier = (cast_expression "(bunzip_data *)(*(code *)PTR_xzalloc_0012a1d0)(0xa080)" ( (type_descriptor "bunzip_data *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR_xzalloc_0012a1d0)(0xa080)" (parenthesized_expression "(*(code *)PTR_xzalloc_0012a1d0)" ( (pointer_expression "*(code *)PTR_xzalloc_0012a1d0" * (cast_expression "(code *)PTR_xzalloc_0012a1d0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(0xa080)" ( number_literal ))))) ;) (expression_statement "*bdp = bd;" (assignment_expression "*bdp = bd" (pointer_expression "*bdp" * identifier) = identifier) ;) (expression_statement "bd->jmpbuf = (jmp_buf *)jmpbuf;" (assignment_expression "bd->jmpbuf = (jmp_buf *)jmpbuf" (field_expression "bd->jmpbuf" identifier -> field_identifier) = (cast_expression "(jmp_buf *)jmpbuf" ( (type_descriptor "jmp_buf *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) ;) (expression_statement "bd->in_fd = -1;" (assignment_expression "bd->in_fd = -1" (field_expression "bd->in_fd" identifier -> field_identifier) = number_literal) ;) (expression_statement "bd->inbuf = (uint8_t *)inbuf;" (assignment_expression "bd->inbuf = (uint8_t *)inbuf" (field_expression "bd->inbuf" identifier -> field_identifier) = (cast_expression "(uint8_t *)inbuf" ( (type_descriptor "uint8_t *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) ;) }) (else_clause "else {\n    bd = (bunzip_data *)(*(code *)PTR_xzalloc_0012a1d0)(0xb080);\n    *bdp = bd;\n    bd->jmpbuf = (jmp_buf *)jmpbuf;\n    bd->in_fd = in_fd;\n    puVar1 = PTR_memcpy_0012b150;\n    bd->inbuf = (uint8_t *)(bd + 1);\n    (*(code *)puVar1)(bd + 1,inbuf,len);\n  }" else (compound_statement "{\n    bd = (bunzip_data *)(*(code *)PTR_xzalloc_0012a1d0)(0xb080);\n    *bdp = bd;\n    bd->jmpbuf = (jmp_buf *)jmpbuf;\n    bd->in_fd = in_fd;\n    puVar1 = PTR_memcpy_0012b150;\n    bd->inbuf = (uint8_t *)(bd + 1);\n    (*(code *)puVar1)(bd + 1,inbuf,len);\n  }" { (expression_statement "bd = (bunzip_data *)(*(code *)PTR_xzalloc_0012a1d0)(0xb080);" (assignment_expression "bd = (bunzip_data *)(*(code *)PTR_xzalloc_0012a1d0)(0xb080)" identifier = (cast_expression "(bunzip_data *)(*(code *)PTR_xzalloc_0012a1d0)(0xb080)" ( (type_descriptor "bunzip_data *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR_xzalloc_0012a1d0)(0xb080)" (parenthesized_expression "(*(code *)PTR_xzalloc_0012a1d0)" ( (pointer_expression "*(code *)PTR_xzalloc_0012a1d0" * (cast_expression "(code *)PTR_xzalloc_0012a1d0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(0xb080)" ( number_literal ))))) ;) (expression_statement "*bdp = bd;" (assignment_expression "*bdp = bd" (pointer_expression "*bdp" * identifier) = identifier) ;) (expression_statement "bd->jmpbuf = (jmp_buf *)jmpbuf;" (assignment_expression "bd->jmpbuf = (jmp_buf *)jmpbuf" (field_expression "bd->jmpbuf" identifier -> field_identifier) = (cast_expression "(jmp_buf *)jmpbuf" ( (type_descriptor "jmp_buf *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) ;) (expression_statement "bd->in_fd = in_fd;" (assignment_expression "bd->in_fd = in_fd" (field_expression "bd->in_fd" identifier -> field_identifier) = identifier) ;) (expression_statement "puVar1 = PTR_memcpy_0012b150;" (assignment_expression "puVar1 = PTR_memcpy_0012b150" identifier = identifier) ;) (expression_statement "bd->inbuf = (uint8_t *)(bd + 1);" (assignment_expression "bd->inbuf = (uint8_t *)(bd + 1)" (field_expression "bd->inbuf" identifier -> field_identifier) = (cast_expression "(uint8_t *)(bd + 1)" ( (type_descriptor "uint8_t *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(bd + 1)" ( (binary_expression "bd + 1" identifier + number_literal) )))) ;) (expression_statement "(*(code *)puVar1)(bd + 1,inbuf,len);" (call_expression "(*(code *)puVar1)(bd + 1,inbuf,len)" (parenthesized_expression "(*(code *)puVar1)" ( (pointer_expression "*(code *)puVar1" * (cast_expression "(code *)puVar1" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(bd + 1,inbuf,len)" ( (binary_expression "bd + 1" identifier + number_literal) , identifier , identifier ))) ;) }))) (expression_statement "puVar1 = PTR_crc32_filltable_0012aa3c;" (assignment_expression "puVar1 = PTR_crc32_filltable_0012aa3c" identifier = identifier) ;) (expression_statement "bd->inbufCount = len;" (assignment_expression "bd->inbufCount = len" (field_expression "bd->inbufCount" identifier -> field_identifier) = identifier) ;) (expression_statement "(*(code *)puVar1)(bd->crc32Table,1);" (call_expression "(*(code *)puVar1)(bd->crc32Table,1)" (parenthesized_expression "(*(code *)puVar1)" ( (pointer_expression "*(code *)puVar1" * (cast_expression "(code *)puVar1" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(bd->crc32Table,1)" ( (field_expression "bd->crc32Table" identifier -> field_identifier) , number_literal ))) ;) (expression_statement "uVar2 = get_bits(bd,0x10);" (assignment_expression "uVar2 = get_bits(bd,0x10)" identifier = (call_expression "get_bits(bd,0x10)" identifier (argument_list "(bd,0x10)" ( identifier , number_literal )))) ;) (expression_statement "puVar1 = PTR_malloc_or_warn_0012aac0;" (assignment_expression "puVar1 = PTR_malloc_or_warn_0012aac0" identifier = identifier) ;) (if_statement "if (8 < uVar2 - 0x6831) {\n    return -2;\n  }" if (parenthesized_expression "(8 < uVar2 - 0x6831)" ( (binary_expression "8 < uVar2 - 0x6831" number_literal < (binary_expression "uVar2 - 0x6831" identifier - number_literal)) )) (compound_statement "{\n    return -2;\n  }" { (return_statement "return -2;" return number_literal ;) })) (expression_statement "uVar2 = uVar2 * 100000 + 0x6105c200;" (assignment_expression "uVar2 = uVar2 * 100000 + 0x6105c200" identifier = (binary_expression "uVar2 * 100000 + 0x6105c200" (binary_expression "uVar2 * 100000" identifier * number_literal) + number_literal)) ;) (expression_statement "bd->dbufSize = uVar2;" (assignment_expression "bd->dbufSize = uVar2" (field_expression "bd->dbufSize" identifier -> field_identifier) = identifier) ;) (expression_statement "puVar3 = (uint32_t *)(*(code *)puVar1)(uVar2 * 4);" (assignment_expression "puVar3 = (uint32_t *)(*(code *)puVar1)(uVar2 * 4)" identifier = (cast_expression "(uint32_t *)(*(code *)puVar1)(uVar2 * 4)" ( (type_descriptor "uint32_t *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)puVar1)(uVar2 * 4)" (parenthesized_expression "(*(code *)puVar1)" ( (pointer_expression "*(code *)puVar1" * (cast_expression "(code *)puVar1" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(uVar2 * 4)" ( (binary_expression "uVar2 * 4" identifier * number_literal) ))))) ;) (if_statement "if (puVar3 != (uint32_t *)0x0) {\n    bd->dbuf = puVar3;\n    return 0;\n  }" if (parenthesized_expression "(puVar3 != (uint32_t *)0x0)" ( (binary_expression "puVar3 != (uint32_t *)0x0" identifier != (cast_expression "(uint32_t *)0x0" ( (type_descriptor "uint32_t *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    bd->dbuf = puVar3;\n    return 0;\n  }" { (expression_statement "bd->dbuf = puVar3;" (assignment_expression "bd->dbuf = puVar3" (field_expression "bd->dbuf" identifier -> field_identifier) = identifier) ;) (return_statement "return 0;" return number_literal ;) })) (expression_statement "(*(code *)PTR_free_0012b168)(bd);" (call_expression "(*(code *)PTR_free_0012b168)(bd)" (parenthesized_expression "(*(code *)PTR_free_0012b168)" ( (pointer_expression "*(code *)PTR_free_0012b168" * (cast_expression "(code *)PTR_free_0012b168" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(bd)" ( identifier ))) ;) (expression_statement "iVar4 = (*(code *)PTR_xfunc_die_0012a1b4)();" (assignment_expression "iVar4 = (*(code *)PTR_xfunc_die_0012a1b4)()" identifier = (call_expression "(*(code *)PTR_xfunc_die_0012a1b4)()" (parenthesized_expression "(*(code *)PTR_xfunc_die_0012a1b4)" ( (pointer_expression "*(code *)PTR_xfunc_die_0012a1b4" * (cast_expression "(code *)PTR_xfunc_die_0012a1b4" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( )))) ;) (return_statement "return iVar4;" return identifier ;) })))
(translation_unit "undefined4\nFUN_000a5f88(undefined4 param_1,int *param_2,int param_3,undefined4 param_4,undefined4 param_5)\n\n{\n  undefined *puVar1;\n  int iVar2;\n  int iVar3;\n  undefined4 uVar4;\n  \n  if (param_3 == -1) {\n    iVar2 = (*(code *)PTR_FUN_0012a1d0)(0xa080);\n    *param_2 = iVar2;\n    *(undefined4 *)(iVar2 + 0x44) = param_1;\n    *(undefined4 *)(iVar2 + 8) = 0xffffffff;\n    *(undefined4 *)(iVar2 + 0x18) = param_4;\n  }\n  else {\n    iVar2 = (*(code *)PTR_FUN_0012a1d0)(0xb080);\n    *param_2 = iVar2;\n    *(undefined4 *)(iVar2 + 0x44) = param_1;\n    *(int *)(iVar2 + 8) = param_3;\n    puVar1 = PTR_memcpy_0012b150;\n    *(int *)(iVar2 + 0x18) = iVar2 + 0xa080;\n    (*(code *)puVar1)(iVar2 + 0xa080,param_4,param_5);\n  }\n  puVar1 = PTR_FUN_0012aa3c;\n  *(undefined4 *)(iVar2 + 0x10) = param_5;\n  (*(code *)puVar1)(iVar2 + 0x48,1);\n  iVar3 = FUN_000a531c(iVar2,0x10);\n  puVar1 = PTR_FUN_0012aac0;\n  if (8 < iVar3 - 0x6831U) {\n    return 0xfffffffe;\n  }\n  iVar3 = iVar3 * 100000 + 0x6105c200;\n  *(int *)(iVar2 + 0x40) = iVar3;\n  iVar3 = (*(code *)puVar1)(iVar3 * 4);\n  if (iVar3 != 0) {\n    *(int *)(iVar2 + 0x3c) = iVar3;\n    return 0;\n  }\n  (*(code *)PTR_free_0012b168)(iVar2);\n  uVar4 = (*(code *)PTR_FUN_0012a1b4)();\n  return uVar4;\n}\n\n" (function_definition "undefined4\nFUN_000a5f88(undefined4 param_1,int *param_2,int param_3,undefined4 param_4,undefined4 param_5)\n\n{\n  undefined *puVar1;\n  int iVar2;\n  int iVar3;\n  undefined4 uVar4;\n  \n  if (param_3 == -1) {\n    iVar2 = (*(code *)PTR_FUN_0012a1d0)(0xa080);\n    *param_2 = iVar2;\n    *(undefined4 *)(iVar2 + 0x44) = param_1;\n    *(undefined4 *)(iVar2 + 8) = 0xffffffff;\n    *(undefined4 *)(iVar2 + 0x18) = param_4;\n  }\n  else {\n    iVar2 = (*(code *)PTR_FUN_0012a1d0)(0xb080);\n    *param_2 = iVar2;\n    *(undefined4 *)(iVar2 + 0x44) = param_1;\n    *(int *)(iVar2 + 8) = param_3;\n    puVar1 = PTR_memcpy_0012b150;\n    *(int *)(iVar2 + 0x18) = iVar2 + 0xa080;\n    (*(code *)puVar1)(iVar2 + 0xa080,param_4,param_5);\n  }\n  puVar1 = PTR_FUN_0012aa3c;\n  *(undefined4 *)(iVar2 + 0x10) = param_5;\n  (*(code *)puVar1)(iVar2 + 0x48,1);\n  iVar3 = FUN_000a531c(iVar2,0x10);\n  puVar1 = PTR_FUN_0012aac0;\n  if (8 < iVar3 - 0x6831U) {\n    return 0xfffffffe;\n  }\n  iVar3 = iVar3 * 100000 + 0x6105c200;\n  *(int *)(iVar2 + 0x40) = iVar3;\n  iVar3 = (*(code *)puVar1)(iVar3 * 4);\n  if (iVar3 != 0) {\n    *(int *)(iVar2 + 0x3c) = iVar3;\n    return 0;\n  }\n  (*(code *)PTR_free_0012b168)(iVar2);\n  uVar4 = (*(code *)PTR_FUN_0012a1b4)();\n  return uVar4;\n}" type_identifier (function_declarator "FUN_000a5f88(undefined4 param_1,int *param_2,int param_3,undefined4 param_4,undefined4 param_5)" identifier (parameter_list "(undefined4 param_1,int *param_2,int param_3,undefined4 param_4,undefined4 param_5)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "int *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "int param_3" primitive_type identifier) , (parameter_declaration "undefined4 param_4" type_identifier identifier) , (parameter_declaration "undefined4 param_5" type_identifier identifier) ))) (compound_statement "{\n  undefined *puVar1;\n  int iVar2;\n  int iVar3;\n  undefined4 uVar4;\n  \n  if (param_3 == -1) {\n    iVar2 = (*(code *)PTR_FUN_0012a1d0)(0xa080);\n    *param_2 = iVar2;\n    *(undefined4 *)(iVar2 + 0x44) = param_1;\n    *(undefined4 *)(iVar2 + 8) = 0xffffffff;\n    *(undefined4 *)(iVar2 + 0x18) = param_4;\n  }\n  else {\n    iVar2 = (*(code *)PTR_FUN_0012a1d0)(0xb080);\n    *param_2 = iVar2;\n    *(undefined4 *)(iVar2 + 0x44) = param_1;\n    *(int *)(iVar2 + 8) = param_3;\n    puVar1 = PTR_memcpy_0012b150;\n    *(int *)(iVar2 + 0x18) = iVar2 + 0xa080;\n    (*(code *)puVar1)(iVar2 + 0xa080,param_4,param_5);\n  }\n  puVar1 = PTR_FUN_0012aa3c;\n  *(undefined4 *)(iVar2 + 0x10) = param_5;\n  (*(code *)puVar1)(iVar2 + 0x48,1);\n  iVar3 = FUN_000a531c(iVar2,0x10);\n  puVar1 = PTR_FUN_0012aac0;\n  if (8 < iVar3 - 0x6831U) {\n    return 0xfffffffe;\n  }\n  iVar3 = iVar3 * 100000 + 0x6105c200;\n  *(int *)(iVar2 + 0x40) = iVar3;\n  iVar3 = (*(code *)puVar1)(iVar3 * 4);\n  if (iVar3 != 0) {\n    *(int *)(iVar2 + 0x3c) = iVar3;\n    return 0;\n  }\n  (*(code *)PTR_free_0012b168)(iVar2);\n  uVar4 = (*(code *)PTR_FUN_0012a1b4)();\n  return uVar4;\n}" { (declaration "undefined *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "undefined4 uVar4;" type_identifier identifier ;) (if_statement "if (param_3 == -1) {\n    iVar2 = (*(code *)PTR_FUN_0012a1d0)(0xa080);\n    *param_2 = iVar2;\n    *(undefined4 *)(iVar2 + 0x44) = param_1;\n    *(undefined4 *)(iVar2 + 8) = 0xffffffff;\n    *(undefined4 *)(iVar2 + 0x18) = param_4;\n  }\n  else {\n    iVar2 = (*(code *)PTR_FUN_0012a1d0)(0xb080);\n    *param_2 = iVar2;\n    *(undefined4 *)(iVar2 + 0x44) = param_1;\n    *(int *)(iVar2 + 8) = param_3;\n    puVar1 = PTR_memcpy_0012b150;\n    *(int *)(iVar2 + 0x18) = iVar2 + 0xa080;\n    (*(code *)puVar1)(iVar2 + 0xa080,param_4,param_5);\n  }" if (parenthesized_expression "(param_3 == -1)" ( (binary_expression "param_3 == -1" identifier == number_literal) )) (compound_statement "{\n    iVar2 = (*(code *)PTR_FUN_0012a1d0)(0xa080);\n    *param_2 = iVar2;\n    *(undefined4 *)(iVar2 + 0x44) = param_1;\n    *(undefined4 *)(iVar2 + 8) = 0xffffffff;\n    *(undefined4 *)(iVar2 + 0x18) = param_4;\n  }" { (expression_statement "iVar2 = (*(code *)PTR_FUN_0012a1d0)(0xa080);" (assignment_expression "iVar2 = (*(code *)PTR_FUN_0012a1d0)(0xa080)" identifier = (call_expression "(*(code *)PTR_FUN_0012a1d0)(0xa080)" (parenthesized_expression "(*(code *)PTR_FUN_0012a1d0)" ( (pointer_expression "*(code *)PTR_FUN_0012a1d0" * (cast_expression "(code *)PTR_FUN_0012a1d0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(0xa080)" ( number_literal )))) ;) (expression_statement "*param_2 = iVar2;" (assignment_expression "*param_2 = iVar2" (pointer_expression "*param_2" * identifier) = identifier) ;) (expression_statement "*(undefined4 *)(iVar2 + 0x44) = param_1;" (assignment_expression "*(undefined4 *)(iVar2 + 0x44) = param_1" (pointer_expression "*(undefined4 *)(iVar2 + 0x44)" * (cast_expression "(undefined4 *)(iVar2 + 0x44)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0x44)" ( (binary_expression "iVar2 + 0x44" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(undefined4 *)(iVar2 + 8) = 0xffffffff;" (assignment_expression "*(undefined4 *)(iVar2 + 8) = 0xffffffff" (pointer_expression "*(undefined4 *)(iVar2 + 8)" * (cast_expression "(undefined4 *)(iVar2 + 8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 8)" ( (binary_expression "iVar2 + 8" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined4 *)(iVar2 + 0x18) = param_4;" (assignment_expression "*(undefined4 *)(iVar2 + 0x18) = param_4" (pointer_expression "*(undefined4 *)(iVar2 + 0x18)" * (cast_expression "(undefined4 *)(iVar2 + 0x18)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0x18)" ( (binary_expression "iVar2 + 0x18" identifier + number_literal) )))) = identifier) ;) }) (else_clause "else {\n    iVar2 = (*(code *)PTR_FUN_0012a1d0)(0xb080);\n    *param_2 = iVar2;\n    *(undefined4 *)(iVar2 + 0x44) = param_1;\n    *(int *)(iVar2 + 8) = param_3;\n    puVar1 = PTR_memcpy_0012b150;\n    *(int *)(iVar2 + 0x18) = iVar2 + 0xa080;\n    (*(code *)puVar1)(iVar2 + 0xa080,param_4,param_5);\n  }" else (compound_statement "{\n    iVar2 = (*(code *)PTR_FUN_0012a1d0)(0xb080);\n    *param_2 = iVar2;\n    *(undefined4 *)(iVar2 + 0x44) = param_1;\n    *(int *)(iVar2 + 8) = param_3;\n    puVar1 = PTR_memcpy_0012b150;\n    *(int *)(iVar2 + 0x18) = iVar2 + 0xa080;\n    (*(code *)puVar1)(iVar2 + 0xa080,param_4,param_5);\n  }" { (expression_statement "iVar2 = (*(code *)PTR_FUN_0012a1d0)(0xb080);" (assignment_expression "iVar2 = (*(code *)PTR_FUN_0012a1d0)(0xb080)" identifier = (call_expression "(*(code *)PTR_FUN_0012a1d0)(0xb080)" (parenthesized_expression "(*(code *)PTR_FUN_0012a1d0)" ( (pointer_expression "*(code *)PTR_FUN_0012a1d0" * (cast_expression "(code *)PTR_FUN_0012a1d0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(0xb080)" ( number_literal )))) ;) (expression_statement "*param_2 = iVar2;" (assignment_expression "*param_2 = iVar2" (pointer_expression "*param_2" * identifier) = identifier) ;) (expression_statement "*(undefined4 *)(iVar2 + 0x44) = param_1;" (assignment_expression "*(undefined4 *)(iVar2 + 0x44) = param_1" (pointer_expression "*(undefined4 *)(iVar2 + 0x44)" * (cast_expression "(undefined4 *)(iVar2 + 0x44)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0x44)" ( (binary_expression "iVar2 + 0x44" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(int *)(iVar2 + 8) = param_3;" (assignment_expression "*(int *)(iVar2 + 8) = param_3" (pointer_expression "*(int *)(iVar2 + 8)" * (cast_expression "(int *)(iVar2 + 8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 8)" ( (binary_expression "iVar2 + 8" identifier + number_literal) )))) = identifier) ;) (expression_statement "puVar1 = PTR_memcpy_0012b150;" (assignment_expression "puVar1 = PTR_memcpy_0012b150" identifier = identifier) ;) (expression_statement "*(int *)(iVar2 + 0x18) = iVar2 + 0xa080;" (assignment_expression "*(int *)(iVar2 + 0x18) = iVar2 + 0xa080" (pointer_expression "*(int *)(iVar2 + 0x18)" * (cast_expression "(int *)(iVar2 + 0x18)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0x18)" ( (binary_expression "iVar2 + 0x18" identifier + number_literal) )))) = (binary_expression "iVar2 + 0xa080" identifier + number_literal)) ;) (expression_statement "(*(code *)puVar1)(iVar2 + 0xa080,param_4,param_5);" (call_expression "(*(code *)puVar1)(iVar2 + 0xa080,param_4,param_5)" (parenthesized_expression "(*(code *)puVar1)" ( (pointer_expression "*(code *)puVar1" * (cast_expression "(code *)puVar1" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar2 + 0xa080,param_4,param_5)" ( (binary_expression "iVar2 + 0xa080" identifier + number_literal) , identifier , identifier ))) ;) }))) (expression_statement "puVar1 = PTR_FUN_0012aa3c;" (assignment_expression "puVar1 = PTR_FUN_0012aa3c" identifier = identifier) ;) (expression_statement "*(undefined4 *)(iVar2 + 0x10) = param_5;" (assignment_expression "*(undefined4 *)(iVar2 + 0x10) = param_5" (pointer_expression "*(undefined4 *)(iVar2 + 0x10)" * (cast_expression "(undefined4 *)(iVar2 + 0x10)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0x10)" ( (binary_expression "iVar2 + 0x10" identifier + number_literal) )))) = identifier) ;) (expression_statement "(*(code *)puVar1)(iVar2 + 0x48,1);" (call_expression "(*(code *)puVar1)(iVar2 + 0x48,1)" (parenthesized_expression "(*(code *)puVar1)" ( (pointer_expression "*(code *)puVar1" * (cast_expression "(code *)puVar1" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar2 + 0x48,1)" ( (binary_expression "iVar2 + 0x48" identifier + number_literal) , number_literal ))) ;) (expression_statement "iVar3 = FUN_000a531c(iVar2,0x10);" (assignment_expression "iVar3 = FUN_000a531c(iVar2,0x10)" identifier = (call_expression "FUN_000a531c(iVar2,0x10)" identifier (argument_list "(iVar2,0x10)" ( identifier , number_literal )))) ;) (expression_statement "puVar1 = PTR_FUN_0012aac0;" (assignment_expression "puVar1 = PTR_FUN_0012aac0" identifier = identifier) ;) (if_statement "if (8 < iVar3 - 0x6831U) {\n    return 0xfffffffe;\n  }" if (parenthesized_expression "(8 < iVar3 - 0x6831U)" ( (binary_expression "8 < iVar3 - 0x6831U" number_literal < (binary_expression "iVar3 - 0x6831U" identifier - number_literal)) )) (compound_statement "{\n    return 0xfffffffe;\n  }" { (return_statement "return 0xfffffffe;" return number_literal ;) })) (expression_statement "iVar3 = iVar3 * 100000 + 0x6105c200;" (assignment_expression "iVar3 = iVar3 * 100000 + 0x6105c200" identifier = (binary_expression "iVar3 * 100000 + 0x6105c200" (binary_expression "iVar3 * 100000" identifier * number_literal) + number_literal)) ;) (expression_statement "*(int *)(iVar2 + 0x40) = iVar3;" (assignment_expression "*(int *)(iVar2 + 0x40) = iVar3" (pointer_expression "*(int *)(iVar2 + 0x40)" * (cast_expression "(int *)(iVar2 + 0x40)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0x40)" ( (binary_expression "iVar2 + 0x40" identifier + number_literal) )))) = identifier) ;) (expression_statement "iVar3 = (*(code *)puVar1)(iVar3 * 4);" (assignment_expression "iVar3 = (*(code *)puVar1)(iVar3 * 4)" identifier = (call_expression "(*(code *)puVar1)(iVar3 * 4)" (parenthesized_expression "(*(code *)puVar1)" ( (pointer_expression "*(code *)puVar1" * (cast_expression "(code *)puVar1" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar3 * 4)" ( (binary_expression "iVar3 * 4" identifier * number_literal) )))) ;) (if_statement "if (iVar3 != 0) {\n    *(int *)(iVar2 + 0x3c) = iVar3;\n    return 0;\n  }" if (parenthesized_expression "(iVar3 != 0)" ( (binary_expression "iVar3 != 0" identifier != number_literal) )) (compound_statement "{\n    *(int *)(iVar2 + 0x3c) = iVar3;\n    return 0;\n  }" { (expression_statement "*(int *)(iVar2 + 0x3c) = iVar3;" (assignment_expression "*(int *)(iVar2 + 0x3c) = iVar3" (pointer_expression "*(int *)(iVar2 + 0x3c)" * (cast_expression "(int *)(iVar2 + 0x3c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0x3c)" ( (binary_expression "iVar2 + 0x3c" identifier + number_literal) )))) = identifier) ;) (return_statement "return 0;" return number_literal ;) })) (expression_statement "(*(code *)PTR_free_0012b168)(iVar2);" (call_expression "(*(code *)PTR_free_0012b168)(iVar2)" (parenthesized_expression "(*(code *)PTR_free_0012b168)" ( (pointer_expression "*(code *)PTR_free_0012b168" * (cast_expression "(code *)PTR_free_0012b168" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar2)" ( identifier ))) ;) (expression_statement "uVar4 = (*(code *)PTR_FUN_0012a1b4)();" (assignment_expression "uVar4 = (*(code *)PTR_FUN_0012a1b4)()" identifier = (call_expression "(*(code *)PTR_FUN_0012a1b4)()" (parenthesized_expression "(*(code *)PTR_FUN_0012a1b4)" ( (pointer_expression "*(code *)PTR_FUN_0012a1b4" * (cast_expression "(code *)PTR_FUN_0012a1b4" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( )))) ;) (return_statement "return uVar4;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( LIT )))) ;) (expression_statement (assignment_expression (pointer_expression * 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) )))) = LIT) ;) (expression_statement (assignment_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 (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( LIT )))) ;) (expression_statement (assignment_expression (pointer_expression * 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) )))) = IDENT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (binary_expression IDENT + LIT)) ;) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( (binary_expression IDENT + LIT) , IDENT , IDENT ))) ;) }))) (expression_statement (assignment_expression 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 (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( (binary_expression IDENT + LIT) , LIT ))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , LIT )))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < (binary_expression IDENT - LIT)) )) (compound_statement { (return_statement return LIT ;) })) (expression_statement (assignment_expression IDENT = (binary_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) )))) = IDENT) ;) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( (binary_expression IDENT * LIT) )))) ;) (if_statement if (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) )))) = IDENT) ;) (return_statement return LIT ;) })) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT ))) ;) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( )))) ;) (return_statement return IDENT ;) })))
(function_definition "undefined4\nFUN_000a5f88(undefined4 param_1,int *param_2,int param_3,undefined4 param_4,undefined4 param_5)\n\n{\n  undefined *puVar1;\n  int iVar2;\n  int iVar3;\n  undefined4 uVar4;\n  \n  if (param_3 == -1) {\n    iVar2 = (*(code *)PTR_FUN_0012a1d0)(0xa080);\n    *param_2 = iVar2;\n    *(undefined4 *)(iVar2 + 0x44) = param_1;\n    *(undefined4 *)(iVar2 + 8) = 0xffffffff;\n    *(undefined4 *)(iVar2 + 0x18) = param_4;\n  }\n  else {\n    iVar2 = (*(code *)PTR_FUN_0012a1d0)(0xb080);\n    *param_2 = iVar2;\n    *(undefined4 *)(iVar2 + 0x44) = param_1;\n    *(int *)(iVar2 + 8) = param_3;\n    puVar1 = PTR_memcpy_0012b150;\n    *(int *)(iVar2 + 0x18) = iVar2 + 0xa080;\n    (*(code *)puVar1)(iVar2 + 0xa080,param_4,param_5);\n  }\n  puVar1 = PTR_FUN_0012aa3c;\n  *(undefined4 *)(iVar2 + 0x10) = param_5;\n  (*(code *)puVar1)(iVar2 + 0x48,1);\n  iVar3 = FUN_000a531c(iVar2,0x10);\n  puVar1 = PTR_FUN_0012aac0;\n  if (8 < iVar3 - 0x6831U) {\n    return 0xfffffffe;\n  }\n  iVar3 = iVar3 * 100000 + 0x6105c200;\n  *(int *)(iVar2 + 0x40) = iVar3;\n  iVar3 = (*(code *)puVar1)(iVar3 * 4);\n  if (iVar3 != 0) {\n    *(int *)(iVar2 + 0x3c) = iVar3;\n    return 0;\n  }\n  (*(code *)PTR_free_0012b168)(iVar2);\n  uVar4 = (*(code *)PTR_FUN_0012a1b4)();\n  return uVar4;\n}" (type_identifier "undefined4") (function_declarator "FUN_000a5f88(undefined4 param_1,int *param_2,int param_3,undefined4 param_4,undefined4 param_5)" (identifier "FUN_000a5f88") (parameter_list "(undefined4 param_1,int *param_2,int param_3,undefined4 param_4,undefined4 param_5)" (( "(") (parameter_declaration "undefined4 param_1" (type_identifier "undefined4") (identifier "param_1")) (, ",") (parameter_declaration "int *param_2" (primitive_type "int") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) (, ",") (parameter_declaration "int param_3" (primitive_type "int") (identifier "param_3")) (, ",") (parameter_declaration "undefined4 param_4" (type_identifier "undefined4") (identifier "param_4")) (, ",") (parameter_declaration "undefined4 param_5" (type_identifier "undefined4") (identifier "param_5")) () ")"))) (compound_statement "{\n  undefined *puVar1;\n  int iVar2;\n  int iVar3;\n  undefined4 uVar4;\n  \n  if (param_3 == -1) {\n    iVar2 = (*(code *)PTR_FUN_0012a1d0)(0xa080);\n    *param_2 = iVar2;\n    *(undefined4 *)(iVar2 + 0x44) = param_1;\n    *(undefined4 *)(iVar2 + 8) = 0xffffffff;\n    *(undefined4 *)(iVar2 + 0x18) = param_4;\n  }\n  else {\n    iVar2 = (*(code *)PTR_FUN_0012a1d0)(0xb080);\n    *param_2 = iVar2;\n    *(undefined4 *)(iVar2 + 0x44) = param_1;\n    *(int *)(iVar2 + 8) = param_3;\n    puVar1 = PTR_memcpy_0012b150;\n    *(int *)(iVar2 + 0x18) = iVar2 + 0xa080;\n    (*(code *)puVar1)(iVar2 + 0xa080,param_4,param_5);\n  }\n  puVar1 = PTR_FUN_0012aa3c;\n  *(undefined4 *)(iVar2 + 0x10) = param_5;\n  (*(code *)puVar1)(iVar2 + 0x48,1);\n  iVar3 = FUN_000a531c(iVar2,0x10);\n  puVar1 = PTR_FUN_0012aac0;\n  if (8 < iVar3 - 0x6831U) {\n    return 0xfffffffe;\n  }\n  iVar3 = iVar3 * 100000 + 0x6105c200;\n  *(int *)(iVar2 + 0x40) = iVar3;\n  iVar3 = (*(code *)puVar1)(iVar3 * 4);\n  if (iVar3 != 0) {\n    *(int *)(iVar2 + 0x3c) = iVar3;\n    return 0;\n  }\n  (*(code *)PTR_free_0012b168)(iVar2);\n  uVar4 = (*(code *)PTR_FUN_0012a1b4)();\n  return uVar4;\n}" ({ "{") (declaration "undefined *puVar1;" (type_identifier "undefined") (pointer_declarator "*puVar1" (* "*") (identifier "puVar1")) (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (declaration "undefined4 uVar4;" (type_identifier "undefined4") (identifier "uVar4") (; ";")) (if_statement "if (param_3 == -1) {\n    iVar2 = (*(code *)PTR_FUN_0012a1d0)(0xa080);\n    *param_2 = iVar2;\n    *(undefined4 *)(iVar2 + 0x44) = param_1;\n    *(undefined4 *)(iVar2 + 8) = 0xffffffff;\n    *(undefined4 *)(iVar2 + 0x18) = param_4;\n  }\n  else {\n    iVar2 = (*(code *)PTR_FUN_0012a1d0)(0xb080);\n    *param_2 = iVar2;\n    *(undefined4 *)(iVar2 + 0x44) = param_1;\n    *(int *)(iVar2 + 8) = param_3;\n    puVar1 = PTR_memcpy_0012b150;\n    *(int *)(iVar2 + 0x18) = iVar2 + 0xa080;\n    (*(code *)puVar1)(iVar2 + 0xa080,param_4,param_5);\n  }" (if "if") (parenthesized_expression "(param_3 == -1)" (( "(") (binary_expression "param_3 == -1" (identifier "param_3") (== "==") (number_literal "-1")) () ")")) (compound_statement "{\n    iVar2 = (*(code *)PTR_FUN_0012a1d0)(0xa080);\n    *param_2 = iVar2;\n    *(undefined4 *)(iVar2 + 0x44) = param_1;\n    *(undefined4 *)(iVar2 + 8) = 0xffffffff;\n    *(undefined4 *)(iVar2 + 0x18) = param_4;\n  }" ({ "{") (expression_statement "iVar2 = (*(code *)PTR_FUN_0012a1d0)(0xa080);" (assignment_expression "iVar2 = (*(code *)PTR_FUN_0012a1d0)(0xa080)" (identifier "iVar2") (= "=") (call_expression "(*(code *)PTR_FUN_0012a1d0)(0xa080)" (parenthesized_expression "(*(code *)PTR_FUN_0012a1d0)" (( "(") (pointer_expression "*(code *)PTR_FUN_0012a1d0" (* "*") (cast_expression "(code *)PTR_FUN_0012a1d0" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_FUN_0012a1d0"))) () ")")) (argument_list "(0xa080)" (( "(") (number_literal "0xa080") () ")")))) (; ";")) (expression_statement "*param_2 = iVar2;" (assignment_expression "*param_2 = iVar2" (pointer_expression "*param_2" (* "*") (identifier "param_2")) (= "=") (identifier "iVar2")) (; ";")) (expression_statement "*(undefined4 *)(iVar2 + 0x44) = param_1;" (assignment_expression "*(undefined4 *)(iVar2 + 0x44) = param_1" (pointer_expression "*(undefined4 *)(iVar2 + 0x44)" (* "*") (cast_expression "(undefined4 *)(iVar2 + 0x44)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar2 + 0x44)" (( "(") (binary_expression "iVar2 + 0x44" (identifier "iVar2") (+ "+") (number_literal "0x44")) () ")")))) (= "=") (identifier "param_1")) (; ";")) (expression_statement "*(undefined4 *)(iVar2 + 8) = 0xffffffff;" (assignment_expression "*(undefined4 *)(iVar2 + 8) = 0xffffffff" (pointer_expression "*(undefined4 *)(iVar2 + 8)" (* "*") (cast_expression "(undefined4 *)(iVar2 + 8)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar2 + 8)" (( "(") (binary_expression "iVar2 + 8" (identifier "iVar2") (+ "+") (number_literal "8")) () ")")))) (= "=") (number_literal "0xffffffff")) (; ";")) (expression_statement "*(undefined4 *)(iVar2 + 0x18) = param_4;" (assignment_expression "*(undefined4 *)(iVar2 + 0x18) = param_4" (pointer_expression "*(undefined4 *)(iVar2 + 0x18)" (* "*") (cast_expression "(undefined4 *)(iVar2 + 0x18)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar2 + 0x18)" (( "(") (binary_expression "iVar2 + 0x18" (identifier "iVar2") (+ "+") (number_literal "0x18")) () ")")))) (= "=") (identifier "param_4")) (; ";")) (} "}")) (else_clause "else {\n    iVar2 = (*(code *)PTR_FUN_0012a1d0)(0xb080);\n    *param_2 = iVar2;\n    *(undefined4 *)(iVar2 + 0x44) = param_1;\n    *(int *)(iVar2 + 8) = param_3;\n    puVar1 = PTR_memcpy_0012b150;\n    *(int *)(iVar2 + 0x18) = iVar2 + 0xa080;\n    (*(code *)puVar1)(iVar2 + 0xa080,param_4,param_5);\n  }" (else "else") (compound_statement "{\n    iVar2 = (*(code *)PTR_FUN_0012a1d0)(0xb080);\n    *param_2 = iVar2;\n    *(undefined4 *)(iVar2 + 0x44) = param_1;\n    *(int *)(iVar2 + 8) = param_3;\n    puVar1 = PTR_memcpy_0012b150;\n    *(int *)(iVar2 + 0x18) = iVar2 + 0xa080;\n    (*(code *)puVar1)(iVar2 + 0xa080,param_4,param_5);\n  }" ({ "{") (expression_statement "iVar2 = (*(code *)PTR_FUN_0012a1d0)(0xb080);" (assignment_expression "iVar2 = (*(code *)PTR_FUN_0012a1d0)(0xb080)" (identifier "iVar2") (= "=") (call_expression "(*(code *)PTR_FUN_0012a1d0)(0xb080)" (parenthesized_expression "(*(code *)PTR_FUN_0012a1d0)" (( "(") (pointer_expression "*(code *)PTR_FUN_0012a1d0" (* "*") (cast_expression "(code *)PTR_FUN_0012a1d0" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_FUN_0012a1d0"))) () ")")) (argument_list "(0xb080)" (( "(") (number_literal "0xb080") () ")")))) (; ";")) (expression_statement "*param_2 = iVar2;" (assignment_expression "*param_2 = iVar2" (pointer_expression "*param_2" (* "*") (identifier "param_2")) (= "=") (identifier "iVar2")) (; ";")) (expression_statement "*(undefined4 *)(iVar2 + 0x44) = param_1;" (assignment_expression "*(undefined4 *)(iVar2 + 0x44) = param_1" (pointer_expression "*(undefined4 *)(iVar2 + 0x44)" (* "*") (cast_expression "(undefined4 *)(iVar2 + 0x44)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar2 + 0x44)" (( "(") (binary_expression "iVar2 + 0x44" (identifier "iVar2") (+ "+") (number_literal "0x44")) () ")")))) (= "=") (identifier "param_1")) (; ";")) (expression_statement "*(int *)(iVar2 + 8) = param_3;" (assignment_expression "*(int *)(iVar2 + 8) = param_3" (pointer_expression "*(int *)(iVar2 + 8)" (* "*") (cast_expression "(int *)(iVar2 + 8)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar2 + 8)" (( "(") (binary_expression "iVar2 + 8" (identifier "iVar2") (+ "+") (number_literal "8")) () ")")))) (= "=") (identifier "param_3")) (; ";")) (expression_statement "puVar1 = PTR_memcpy_0012b150;" (assignment_expression "puVar1 = PTR_memcpy_0012b150" (identifier "puVar1") (= "=") (identifier "PTR_memcpy_0012b150")) (; ";")) (expression_statement "*(int *)(iVar2 + 0x18) = iVar2 + 0xa080;" (assignment_expression "*(int *)(iVar2 + 0x18) = iVar2 + 0xa080" (pointer_expression "*(int *)(iVar2 + 0x18)" (* "*") (cast_expression "(int *)(iVar2 + 0x18)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar2 + 0x18)" (( "(") (binary_expression "iVar2 + 0x18" (identifier "iVar2") (+ "+") (number_literal "0x18")) () ")")))) (= "=") (binary_expression "iVar2 + 0xa080" (identifier "iVar2") (+ "+") (number_literal "0xa080"))) (; ";")) (expression_statement "(*(code *)puVar1)(iVar2 + 0xa080,param_4,param_5);" (call_expression "(*(code *)puVar1)(iVar2 + 0xa080,param_4,param_5)" (parenthesized_expression "(*(code *)puVar1)" (( "(") (pointer_expression "*(code *)puVar1" (* "*") (cast_expression "(code *)puVar1" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "puVar1"))) () ")")) (argument_list "(iVar2 + 0xa080,param_4,param_5)" (( "(") (binary_expression "iVar2 + 0xa080" (identifier "iVar2") (+ "+") (number_literal "0xa080")) (, ",") (identifier "param_4") (, ",") (identifier "param_5") () ")"))) (; ";")) (} "}")))) (expression_statement "puVar1 = PTR_FUN_0012aa3c;" (assignment_expression "puVar1 = PTR_FUN_0012aa3c" (identifier "puVar1") (= "=") (identifier "PTR_FUN_0012aa3c")) (; ";")) (expression_statement "*(undefined4 *)(iVar2 + 0x10) = param_5;" (assignment_expression "*(undefined4 *)(iVar2 + 0x10) = param_5" (pointer_expression "*(undefined4 *)(iVar2 + 0x10)" (* "*") (cast_expression "(undefined4 *)(iVar2 + 0x10)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar2 + 0x10)" (( "(") (binary_expression "iVar2 + 0x10" (identifier "iVar2") (+ "+") (number_literal "0x10")) () ")")))) (= "=") (identifier "param_5")) (; ";")) (expression_statement "(*(code *)puVar1)(iVar2 + 0x48,1);" (call_expression "(*(code *)puVar1)(iVar2 + 0x48,1)" (parenthesized_expression "(*(code *)puVar1)" (( "(") (pointer_expression "*(code *)puVar1" (* "*") (cast_expression "(code *)puVar1" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "puVar1"))) () ")")) (argument_list "(iVar2 + 0x48,1)" (( "(") (binary_expression "iVar2 + 0x48" (identifier "iVar2") (+ "+") (number_literal "0x48")) (, ",") (number_literal "1") () ")"))) (; ";")) (expression_statement "iVar3 = FUN_000a531c(iVar2,0x10);" (assignment_expression "iVar3 = FUN_000a531c(iVar2,0x10)" (identifier "iVar3") (= "=") (call_expression "FUN_000a531c(iVar2,0x10)" (identifier "FUN_000a531c") (argument_list "(iVar2,0x10)" (( "(") (identifier "iVar2") (, ",") (number_literal "0x10") () ")")))) (; ";")) (expression_statement "puVar1 = PTR_FUN_0012aac0;" (assignment_expression "puVar1 = PTR_FUN_0012aac0" (identifier "puVar1") (= "=") (identifier "PTR_FUN_0012aac0")) (; ";")) (if_statement "if (8 < iVar3 - 0x6831U) {\n    return 0xfffffffe;\n  }" (if "if") (parenthesized_expression "(8 < iVar3 - 0x6831U)" (( "(") (binary_expression "8 < iVar3 - 0x6831U" (number_literal "8") (< "<") (binary_expression "iVar3 - 0x6831U" (identifier "iVar3") (- "-") (number_literal "0x6831U"))) () ")")) (compound_statement "{\n    return 0xfffffffe;\n  }" ({ "{") (return_statement "return 0xfffffffe;" (return "return") (number_literal "0xfffffffe") (; ";")) (} "}"))) (expression_statement "iVar3 = iVar3 * 100000 + 0x6105c200;" (assignment_expression "iVar3 = iVar3 * 100000 + 0x6105c200" (identifier "iVar3") (= "=") (binary_expression "iVar3 * 100000 + 0x6105c200" (binary_expression "iVar3 * 100000" (identifier "iVar3") (* "*") (number_literal "100000")) (+ "+") (number_literal "0x6105c200"))) (; ";")) (expression_statement "*(int *)(iVar2 + 0x40) = iVar3;" (assignment_expression "*(int *)(iVar2 + 0x40) = iVar3" (pointer_expression "*(int *)(iVar2 + 0x40)" (* "*") (cast_expression "(int *)(iVar2 + 0x40)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar2 + 0x40)" (( "(") (binary_expression "iVar2 + 0x40" (identifier "iVar2") (+ "+") (number_literal "0x40")) () ")")))) (= "=") (identifier "iVar3")) (; ";")) (expression_statement "iVar3 = (*(code *)puVar1)(iVar3 * 4);" (assignment_expression "iVar3 = (*(code *)puVar1)(iVar3 * 4)" (identifier "iVar3") (= "=") (call_expression "(*(code *)puVar1)(iVar3 * 4)" (parenthesized_expression "(*(code *)puVar1)" (( "(") (pointer_expression "*(code *)puVar1" (* "*") (cast_expression "(code *)puVar1" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "puVar1"))) () ")")) (argument_list "(iVar3 * 4)" (( "(") (binary_expression "iVar3 * 4" (identifier "iVar3") (* "*") (number_literal "4")) () ")")))) (; ";")) (if_statement "if (iVar3 != 0) {\n    *(int *)(iVar2 + 0x3c) = iVar3;\n    return 0;\n  }" (if "if") (parenthesized_expression "(iVar3 != 0)" (( "(") (binary_expression "iVar3 != 0" (identifier "iVar3") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    *(int *)(iVar2 + 0x3c) = iVar3;\n    return 0;\n  }" ({ "{") (expression_statement "*(int *)(iVar2 + 0x3c) = iVar3;" (assignment_expression "*(int *)(iVar2 + 0x3c) = iVar3" (pointer_expression "*(int *)(iVar2 + 0x3c)" (* "*") (cast_expression "(int *)(iVar2 + 0x3c)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar2 + 0x3c)" (( "(") (binary_expression "iVar2 + 0x3c" (identifier "iVar2") (+ "+") (number_literal "0x3c")) () ")")))) (= "=") (identifier "iVar3")) (; ";")) (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (expression_statement "(*(code *)PTR_free_0012b168)(iVar2);" (call_expression "(*(code *)PTR_free_0012b168)(iVar2)" (parenthesized_expression "(*(code *)PTR_free_0012b168)" (( "(") (pointer_expression "*(code *)PTR_free_0012b168" (* "*") (cast_expression "(code *)PTR_free_0012b168" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_free_0012b168"))) () ")")) (argument_list "(iVar2)" (( "(") (identifier "iVar2") () ")"))) (; ";")) (expression_statement "uVar4 = (*(code *)PTR_FUN_0012a1b4)();" (assignment_expression "uVar4 = (*(code *)PTR_FUN_0012a1b4)()" (identifier "uVar4") (= "=") (call_expression "(*(code *)PTR_FUN_0012a1b4)()" (parenthesized_expression "(*(code *)PTR_FUN_0012a1b4)" (( "(") (pointer_expression "*(code *)PTR_FUN_0012a1b4" (* "*") (cast_expression "(code *)PTR_FUN_0012a1b4" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_FUN_0012a1b4"))) () ")")) (argument_list "()" (( "(") () ")")))) (; ";")) (return_statement "return uVar4;" (return "return") (identifier "uVar4") (; ";")) (} "}")))
(translation_unit (function_definition type: (type_identifier) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (parameter_declaration type: (primitive_type) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (identifier)))) body: (compound_statement (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (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 (number_literal))))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) 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: (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: (identifier)))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (identifier) right: (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 (number_literal))))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) 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: (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: (identifier) right: (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: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list (binary_expression left: (identifier) right: (number_literal)) (identifier) (identifier))))))) (expression_statement (assignment_expression left: (identifier) 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: (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: (identifier) right: (number_literal)) (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (number_literal))))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (number_literal) right: (binary_expression left: (identifier) right: (number_literal)))) consequence: (compound_statement (return_statement (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (binary_expression left: (identifier) right: (number_literal)) right: (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))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list (binary_expression left: (identifier) right: (number_literal)))))) (if_statement condition: (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: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (identifier))) (return_statement (number_literal)))) (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 (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (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)))) (return_statement (identifier)))))

undefined4
MASKED(undefined4 param_1,int *param_2,int param_3,undefined4 param_4,undefined4 param_5)

{
  undefined *puVar1;
  int iVar2;
  int iVar3;
  undefined4 uVar4;
  
  if (param_3 == -1) {
    iVar2 = (*(code *)PTR_FUN_0012a1d0)(0xa080);
    *param_2 = iVar2;
    *(undefined4 *)(iVar2 + 0x44) = param_1;
    *(undefined4 *)(iVar2 + 8) = 0xffffffff;
    *(undefined4 *)(iVar2 + 0x18) = param_4;
  }
  else {
    iVar2 = (*(code *)PTR_FUN_0012a1d0)(0xb080);
    *param_2 = iVar2;
    *(undefined4 *)(iVar2 + 0x44) = param_1;
    *(int *)(iVar2 + 8) = param_3;
    puVar1 = PTR_memcpy_0012b150;
    *(int *)(iVar2 + 0x18) = iVar2 + 0xa080;
    (*(code *)puVar1)(iVar2 + 0xa080,param_4,param_5);
  }
  puVar1 = PTR_FUN_0012aa3c;
  *(undefined4 *)(iVar2 + 0x10) = param_5;
  (*(code *)puVar1)(iVar2 + 0x48,1);
  iVar3 = FUN_000a531c(iVar2,0x10);
  puVar1 = PTR_FUN_0012aac0;
  if (8 < iVar3 - 0x6831U) {
    return 0xfffffffe;
  }
  iVar3 = iVar3 * 100000 + 0x6105c200;
  *(int *)(iVar2 + 0x40) = iVar3;
  iVar3 = (*(code *)puVar1)(iVar3 * 4);
  if (iVar3 != 0) {
    *(int *)(iVar2 + 0x3c) = iVar3;
    return 0;
  }
  (*(code *)PTR_free_0012b168)(iVar2);
  uVar4 = (*(code *)PTR_FUN_0012a1b4)();
  return uVar4;
}

