
void hash_mpint(ssh_hash *h,void *s,Bignum b)

{
  uchar *str;
  int len;
  undefined4 local_14;
  
  local_14 = *(undefined4 *)PTR___stack_chk_guard_00112630;
  str = ssh2_mpint_fmt(b,&len);
  hash_string((ssh_hash *)&h->bytes,s,str,len);
                    /* WARNING: Subroutine does not return */
  safefree(str);
}



/* WARNING: Removing unreachable block (ram,0x0004a9c8) */

int FUN_0004a6e0(int param_1,undefined4 param_2,undefined4 param_3)

{
  undefined *puVar1;
  int iVar2;
  int iVar3;
  int iVar4;
  undefined4 uVar5;
  undefined4 uVar6;
  int iVar7;
  undefined4 *puVar8;
  code *pcVar9;
  undefined1 auStack_24 [4];
  undefined1 local_18 [4];
  int local_14;
  
  puVar1 = PTR___stack_chk_guard_00112630;
  local_14 = *(int *)PTR___stack_chk_guard_00112630;
  iVar2 = FUN_0004807c(param_3,local_18);
  iVar7 = iVar2;
  FUN_0004a62c(param_1 + 8,param_2,iVar2);
  safefree();
  if (local_14 == *(int *)puVar1) {
    return *(int *)puVar1;
  }
  (*(code *)PTR___stack_chk_fail_001122c8)();
  puVar8 = *(undefined4 **)(*(int *)(iVar2 + 0x98) + 0xc);
  iVar3 = puVar8[5];
  if (iVar3 == 0) {
    trap(7);
  }
  iVar3 = ((iVar3 + 0x1192af) / iVar3) * iVar3;
  iVar4 = safemalloc(iVar3,1);
  uVar5 = (*(code *)*puVar8)();
  if ((*(uint *)(iVar2 + 0x50) & 0x20) == 0) {
    FUN_0004a6e0(puVar8,uVar5,param_2);
    pcVar9 = (code *)puVar8[2];
  }
  else {
    pcVar9 = (code *)puVar8[2];
  }
  (*pcVar9)(uVar5,iVar7,puVar8[5]);
  (*(code *)puVar8[2])(uVar5,auStack_24,1);
  (*(code *)puVar8[2])(uVar5,iVar2 + 0xa4,*(undefined4 *)(iVar2 + 0xe4));
  (*(code *)puVar8[3])(uVar5,iVar4);
  if ((int)puVar8[5] < iVar3) {
    uVar5 = (*(code *)*puVar8)();
    if ((*(uint *)(iVar2 + 0x50) & 0x20) == 0) {
      FUN_0004a6e0(puVar8,uVar5,param_2);
      uVar6 = puVar8[5];
    }
    else {
      uVar6 = puVar8[5];
    }
    (*(code *)puVar8[2])(uVar5,iVar7,uVar6);
    iVar7 = puVar8[5];
    if (iVar7 < iVar3) {
      iVar2 = 0;
      do {
        (*(code *)puVar8[2])(uVar5,iVar4 + iVar2);
        uVar6 = (*(code *)puVar8[1])(uVar5);
        (*(code *)puVar8[3])(uVar6,iVar4 + iVar7);
        iVar7 = iVar7 + puVar8[5];
        iVar2 = iVar7 - puVar8[5];
      } while (iVar7 < iVar3);
    }
    (*(code *)puVar8[4])(uVar5);
  }
  if (0x1192b0 < iVar3) {
    smemclr(&_gp_1 + iVar4,iVar3 + -0x1192b0);
    return iVar4;
  }
  return iVar4;
}


lui gp,0xd
addiu gp,gp,-0x1430
addu gp,gp,t9
addiu sp,sp,-0x30
lw t9,-0x7b3c(gp)
sw s0,0x20(sp)
addiu t9,t9,-0x7f84
lw s0,-0x6c80(gp)
sw s2,0x28(sp)
or s2,a1,zero
addiu a1,sp,0x18
sw ra,0x2c(sp)
sw gp,0x10(sp)
sw s1,0x24(sp)
or s1,a0,zero
lw v0,0x0(s0)
or a0,a2,zero
sw v0,0x1c(sp)
bal 0x0004807c
_nop
addiu a0,s1,0x8
lw gp,0x10(sp)
or a2,v0,zero
lw a3,0x18(sp)
or a1,s2,zero
lw t9,-0x7b3c(gp)
addiu t9,t9,-0x59d4
bal 0x0004a62c
_or s1,v0,zero
lw gp,0x10(sp)
lw t9,-0x7fc0(gp)
bal 0x0003a244
_or a0,s1,zero
lw v1,0x1c(sp)
lw v0,0x0(s0)
bne v1,v0,0x0004a78c
_lw gp,0x10(sp)
lw ra,0x2c(sp)
lw s2,0x28(sp)
lw s1,0x24(sp)
lw s0,0x20(sp)
jr ra
_addiu sp,sp,0x30
lw t9,-0x6fe8(gp)
jalr t9
_nop
(translation_unit "/* WARNING: Removing unreachable block (ram,0x0004a9c8) */\n\nint FUN_0004a6e0(int param_1,undefined4 param_2,undefined4 param_3)\n\n{\n  undefined *puVar1;\n  int iVar2;\n  int iVar3;\n  int iVar4;\n  undefined4 uVar5;\n  undefined4 uVar6;\n  int iVar7;\n  undefined4 *puVar8;\n  code *pcVar9;\n  undefined1 auStack_24 [4];\n  undefined1 local_18 [4];\n  int local_14;\n  \n  puVar1 = PTR___stack_chk_guard_00112630;\n  local_14 = *(int *)PTR___stack_chk_guard_00112630;\n  iVar2 = FUN_0004807c(param_3,local_18);\n  iVar7 = iVar2;\n  FUN_0004a62c(param_1 + 8,param_2,iVar2);\n  safefree();\n  if (local_14 == *(int *)puVar1) {\n    return *(int *)puVar1;\n  }\n  (*(code *)PTR___stack_chk_fail_001122c8)();\n  puVar8 = *(undefined4 **)(*(int *)(iVar2 + 0x98) + 0xc);\n  iVar3 = puVar8[5];\n  if (iVar3 == 0) {\n    trap(7);\n  }\n  iVar3 = ((iVar3 + 0x1192af) / iVar3) * iVar3;\n  iVar4 = safemalloc(iVar3,1);\n  uVar5 = (*(code *)*puVar8)();\n  if ((*(uint *)(iVar2 + 0x50) & 0x20) == 0) {\n    FUN_0004a6e0(puVar8,uVar5,param_2);\n    pcVar9 = (code *)puVar8[2];\n  }\n  else {\n    pcVar9 = (code *)puVar8[2];\n  }\n  (*pcVar9)(uVar5,iVar7,puVar8[5]);\n  (*(code *)puVar8[2])(uVar5,auStack_24,1);\n  (*(code *)puVar8[2])(uVar5,iVar2 + 0xa4,*(undefined4 *)(iVar2 + 0xe4));\n  (*(code *)puVar8[3])(uVar5,iVar4);\n  if ((int)puVar8[5] < iVar3) {\n    uVar5 = (*(code *)*puVar8)();\n    if ((*(uint *)(iVar2 + 0x50) & 0x20) == 0) {\n      FUN_0004a6e0(puVar8,uVar5,param_2);\n      uVar6 = puVar8[5];\n    }\n    else {\n      uVar6 = puVar8[5];\n    }\n    (*(code *)puVar8[2])(uVar5,iVar7,uVar6);\n    iVar7 = puVar8[5];\n    if (iVar7 < iVar3) {\n      iVar2 = 0;\n      do {\n        (*(code *)puVar8[2])(uVar5,iVar4 + iVar2);\n        uVar6 = (*(code *)puVar8[1])(uVar5);\n        (*(code *)puVar8[3])(uVar6,iVar4 + iVar7);\n        iVar7 = iVar7 + puVar8[5];\n        iVar2 = iVar7 - puVar8[5];\n      } while (iVar7 < iVar3);\n    }\n    (*(code *)puVar8[4])(uVar5);\n  }\n  if (0x1192b0 < iVar3) {\n    smemclr(&_gp_1 + iVar4,iVar3 + -0x1192b0);\n    return iVar4;\n  }\n  return iVar4;\n}\n\n" comment (function_definition "int FUN_0004a6e0(int param_1,undefined4 param_2,undefined4 param_3)\n\n{\n  undefined *puVar1;\n  int iVar2;\n  int iVar3;\n  int iVar4;\n  undefined4 uVar5;\n  undefined4 uVar6;\n  int iVar7;\n  undefined4 *puVar8;\n  code *pcVar9;\n  undefined1 auStack_24 [4];\n  undefined1 local_18 [4];\n  int local_14;\n  \n  puVar1 = PTR___stack_chk_guard_00112630;\n  local_14 = *(int *)PTR___stack_chk_guard_00112630;\n  iVar2 = FUN_0004807c(param_3,local_18);\n  iVar7 = iVar2;\n  FUN_0004a62c(param_1 + 8,param_2,iVar2);\n  safefree();\n  if (local_14 == *(int *)puVar1) {\n    return *(int *)puVar1;\n  }\n  (*(code *)PTR___stack_chk_fail_001122c8)();\n  puVar8 = *(undefined4 **)(*(int *)(iVar2 + 0x98) + 0xc);\n  iVar3 = puVar8[5];\n  if (iVar3 == 0) {\n    trap(7);\n  }\n  iVar3 = ((iVar3 + 0x1192af) / iVar3) * iVar3;\n  iVar4 = safemalloc(iVar3,1);\n  uVar5 = (*(code *)*puVar8)();\n  if ((*(uint *)(iVar2 + 0x50) & 0x20) == 0) {\n    FUN_0004a6e0(puVar8,uVar5,param_2);\n    pcVar9 = (code *)puVar8[2];\n  }\n  else {\n    pcVar9 = (code *)puVar8[2];\n  }\n  (*pcVar9)(uVar5,iVar7,puVar8[5]);\n  (*(code *)puVar8[2])(uVar5,auStack_24,1);\n  (*(code *)puVar8[2])(uVar5,iVar2 + 0xa4,*(undefined4 *)(iVar2 + 0xe4));\n  (*(code *)puVar8[3])(uVar5,iVar4);\n  if ((int)puVar8[5] < iVar3) {\n    uVar5 = (*(code *)*puVar8)();\n    if ((*(uint *)(iVar2 + 0x50) & 0x20) == 0) {\n      FUN_0004a6e0(puVar8,uVar5,param_2);\n      uVar6 = puVar8[5];\n    }\n    else {\n      uVar6 = puVar8[5];\n    }\n    (*(code *)puVar8[2])(uVar5,iVar7,uVar6);\n    iVar7 = puVar8[5];\n    if (iVar7 < iVar3) {\n      iVar2 = 0;\n      do {\n        (*(code *)puVar8[2])(uVar5,iVar4 + iVar2);\n        uVar6 = (*(code *)puVar8[1])(uVar5);\n        (*(code *)puVar8[3])(uVar6,iVar4 + iVar7);\n        iVar7 = iVar7 + puVar8[5];\n        iVar2 = iVar7 - puVar8[5];\n      } while (iVar7 < iVar3);\n    }\n    (*(code *)puVar8[4])(uVar5);\n  }\n  if (0x1192b0 < iVar3) {\n    smemclr(&_gp_1 + iVar4,iVar3 + -0x1192b0);\n    return iVar4;\n  }\n  return iVar4;\n}" primitive_type (function_declarator "FUN_0004a6e0(int param_1,undefined4 param_2,undefined4 param_3)" identifier (parameter_list "(int param_1,undefined4 param_2,undefined4 param_3)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "undefined4 param_3" type_identifier identifier) ))) (compound_statement "{\n  undefined *puVar1;\n  int iVar2;\n  int iVar3;\n  int iVar4;\n  undefined4 uVar5;\n  undefined4 uVar6;\n  int iVar7;\n  undefined4 *puVar8;\n  code *pcVar9;\n  undefined1 auStack_24 [4];\n  undefined1 local_18 [4];\n  int local_14;\n  \n  puVar1 = PTR___stack_chk_guard_00112630;\n  local_14 = *(int *)PTR___stack_chk_guard_00112630;\n  iVar2 = FUN_0004807c(param_3,local_18);\n  iVar7 = iVar2;\n  FUN_0004a62c(param_1 + 8,param_2,iVar2);\n  safefree();\n  if (local_14 == *(int *)puVar1) {\n    return *(int *)puVar1;\n  }\n  (*(code *)PTR___stack_chk_fail_001122c8)();\n  puVar8 = *(undefined4 **)(*(int *)(iVar2 + 0x98) + 0xc);\n  iVar3 = puVar8[5];\n  if (iVar3 == 0) {\n    trap(7);\n  }\n  iVar3 = ((iVar3 + 0x1192af) / iVar3) * iVar3;\n  iVar4 = safemalloc(iVar3,1);\n  uVar5 = (*(code *)*puVar8)();\n  if ((*(uint *)(iVar2 + 0x50) & 0x20) == 0) {\n    FUN_0004a6e0(puVar8,uVar5,param_2);\n    pcVar9 = (code *)puVar8[2];\n  }\n  else {\n    pcVar9 = (code *)puVar8[2];\n  }\n  (*pcVar9)(uVar5,iVar7,puVar8[5]);\n  (*(code *)puVar8[2])(uVar5,auStack_24,1);\n  (*(code *)puVar8[2])(uVar5,iVar2 + 0xa4,*(undefined4 *)(iVar2 + 0xe4));\n  (*(code *)puVar8[3])(uVar5,iVar4);\n  if ((int)puVar8[5] < iVar3) {\n    uVar5 = (*(code *)*puVar8)();\n    if ((*(uint *)(iVar2 + 0x50) & 0x20) == 0) {\n      FUN_0004a6e0(puVar8,uVar5,param_2);\n      uVar6 = puVar8[5];\n    }\n    else {\n      uVar6 = puVar8[5];\n    }\n    (*(code *)puVar8[2])(uVar5,iVar7,uVar6);\n    iVar7 = puVar8[5];\n    if (iVar7 < iVar3) {\n      iVar2 = 0;\n      do {\n        (*(code *)puVar8[2])(uVar5,iVar4 + iVar2);\n        uVar6 = (*(code *)puVar8[1])(uVar5);\n        (*(code *)puVar8[3])(uVar6,iVar4 + iVar7);\n        iVar7 = iVar7 + puVar8[5];\n        iVar2 = iVar7 - puVar8[5];\n      } while (iVar7 < iVar3);\n    }\n    (*(code *)puVar8[4])(uVar5);\n  }\n  if (0x1192b0 < iVar3) {\n    smemclr(&_gp_1 + iVar4,iVar3 + -0x1192b0);\n    return iVar4;\n  }\n  return iVar4;\n}" { (declaration "undefined *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "undefined4 uVar5;" type_identifier identifier ;) (declaration "undefined4 uVar6;" type_identifier identifier ;) (declaration "int iVar7;" primitive_type identifier ;) (declaration "undefined4 *puVar8;" type_identifier (pointer_declarator "*puVar8" * identifier) ;) (declaration "code *pcVar9;" type_identifier (pointer_declarator "*pcVar9" * identifier) ;) (declaration "undefined1 auStack_24 [4];" type_identifier (array_declarator "auStack_24 [4]" identifier [ number_literal ]) ;) (declaration "undefined1 local_18 [4];" type_identifier (array_declarator "local_18 [4]" identifier [ number_literal ]) ;) (declaration "int local_14;" primitive_type identifier ;) (expression_statement "puVar1 = PTR___stack_chk_guard_00112630;" (assignment_expression "puVar1 = PTR___stack_chk_guard_00112630" identifier = identifier) ;) (expression_statement "local_14 = *(int *)PTR___stack_chk_guard_00112630;" (assignment_expression "local_14 = *(int *)PTR___stack_chk_guard_00112630" identifier = (pointer_expression "*(int *)PTR___stack_chk_guard_00112630" * (cast_expression "(int *)PTR___stack_chk_guard_00112630" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) ;) (expression_statement "iVar2 = FUN_0004807c(param_3,local_18);" (assignment_expression "iVar2 = FUN_0004807c(param_3,local_18)" identifier = (call_expression "FUN_0004807c(param_3,local_18)" identifier (argument_list "(param_3,local_18)" ( identifier , identifier )))) ;) (expression_statement "iVar7 = iVar2;" (assignment_expression "iVar7 = iVar2" identifier = identifier) ;) (expression_statement "FUN_0004a62c(param_1 + 8,param_2,iVar2);" (call_expression "FUN_0004a62c(param_1 + 8,param_2,iVar2)" identifier (argument_list "(param_1 + 8,param_2,iVar2)" ( (binary_expression "param_1 + 8" identifier + number_literal) , identifier , identifier ))) ;) (expression_statement "safefree();" (call_expression "safefree()" identifier (argument_list "()" ( ))) ;) (if_statement "if (local_14 == *(int *)puVar1) {\n    return *(int *)puVar1;\n  }" if (parenthesized_expression "(local_14 == *(int *)puVar1)" ( (binary_expression "local_14 == *(int *)puVar1" identifier == (pointer_expression "*(int *)puVar1" * (cast_expression "(int *)puVar1" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) )) (compound_statement "{\n    return *(int *)puVar1;\n  }" { (return_statement "return *(int *)puVar1;" return (pointer_expression "*(int *)puVar1" * (cast_expression "(int *)puVar1" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) ;) })) (expression_statement "(*(code *)PTR___stack_chk_fail_001122c8)();" (call_expression "(*(code *)PTR___stack_chk_fail_001122c8)()" (parenthesized_expression "(*(code *)PTR___stack_chk_fail_001122c8)" ( (pointer_expression "*(code *)PTR___stack_chk_fail_001122c8" * (cast_expression "(code *)PTR___stack_chk_fail_001122c8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))) ;) (expression_statement "puVar8 = *(undefined4 **)(*(int *)(iVar2 + 0x98) + 0xc);" (assignment_expression "puVar8 = *(undefined4 **)(*(int *)(iVar2 + 0x98) + 0xc)" identifier = (pointer_expression "*(undefined4 **)(*(int *)(iVar2 + 0x98) + 0xc)" * (cast_expression "(undefined4 **)(*(int *)(iVar2 + 0x98) + 0xc)" ( (type_descriptor "undefined4 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*(int *)(iVar2 + 0x98) + 0xc)" ( (binary_expression "*(int *)(iVar2 + 0x98) + 0xc" (pointer_expression "*(int *)(iVar2 + 0x98)" * (cast_expression "(int *)(iVar2 + 0x98)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0x98)" ( (binary_expression "iVar2 + 0x98" identifier + number_literal) )))) + number_literal) ))))) ;) (expression_statement "iVar3 = puVar8[5];" (assignment_expression "iVar3 = puVar8[5]" identifier = (subscript_expression "puVar8[5]" identifier [ number_literal ])) ;) (if_statement "if (iVar3 == 0) {\n    trap(7);\n  }" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (compound_statement "{\n    trap(7);\n  }" { (expression_statement "trap(7);" (call_expression "trap(7)" identifier (argument_list "(7)" ( number_literal ))) ;) })) (expression_statement "iVar3 = ((iVar3 + 0x1192af) / iVar3) * iVar3;" (assignment_expression "iVar3 = ((iVar3 + 0x1192af) / iVar3) * iVar3" identifier = (binary_expression "((iVar3 + 0x1192af) / iVar3) * iVar3" (parenthesized_expression "((iVar3 + 0x1192af) / iVar3)" ( (binary_expression "(iVar3 + 0x1192af) / iVar3" (parenthesized_expression "(iVar3 + 0x1192af)" ( (binary_expression "iVar3 + 0x1192af" identifier + number_literal) )) / identifier) )) * identifier)) ;) (expression_statement "iVar4 = safemalloc(iVar3,1);" (assignment_expression "iVar4 = safemalloc(iVar3,1)" identifier = (call_expression "safemalloc(iVar3,1)" identifier (argument_list "(iVar3,1)" ( identifier , number_literal )))) ;) (expression_statement "uVar5 = (*(code *)*puVar8)();" (assignment_expression "uVar5 = (*(code *)*puVar8)()" identifier = (call_expression "(*(code *)*puVar8)()" (parenthesized_expression "(*(code *)*puVar8)" ( (pointer_expression "*(code *)*puVar8" * (cast_expression "(code *)*puVar8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*puVar8" * identifier))) )) (argument_list "()" ( )))) ;) (if_statement "if ((*(uint *)(iVar2 + 0x50) & 0x20) == 0) {\n    FUN_0004a6e0(puVar8,uVar5,param_2);\n    pcVar9 = (code *)puVar8[2];\n  }\n  else {\n    pcVar9 = (code *)puVar8[2];\n  }" if (parenthesized_expression "((*(uint *)(iVar2 + 0x50) & 0x20) == 0)" ( (binary_expression "(*(uint *)(iVar2 + 0x50) & 0x20) == 0" (parenthesized_expression "(*(uint *)(iVar2 + 0x50) & 0x20)" ( (binary_expression "*(uint *)(iVar2 + 0x50) & 0x20" (pointer_expression "*(uint *)(iVar2 + 0x50)" * (cast_expression "(uint *)(iVar2 + 0x50)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0x50)" ( (binary_expression "iVar2 + 0x50" identifier + number_literal) )))) & number_literal) )) == number_literal) )) (compound_statement "{\n    FUN_0004a6e0(puVar8,uVar5,param_2);\n    pcVar9 = (code *)puVar8[2];\n  }" { (expression_statement "FUN_0004a6e0(puVar8,uVar5,param_2);" (call_expression "FUN_0004a6e0(puVar8,uVar5,param_2)" identifier (argument_list "(puVar8,uVar5,param_2)" ( identifier , identifier , identifier ))) ;) (expression_statement "pcVar9 = (code *)puVar8[2];" (assignment_expression "pcVar9 = (code *)puVar8[2]" identifier = (cast_expression "(code *)puVar8[2]" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "puVar8[2]" identifier [ number_literal ]))) ;) }) (else_clause "else {\n    pcVar9 = (code *)puVar8[2];\n  }" else (compound_statement "{\n    pcVar9 = (code *)puVar8[2];\n  }" { (expression_statement "pcVar9 = (code *)puVar8[2];" (assignment_expression "pcVar9 = (code *)puVar8[2]" identifier = (cast_expression "(code *)puVar8[2]" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "puVar8[2]" identifier [ number_literal ]))) ;) }))) (expression_statement "(*pcVar9)(uVar5,iVar7,puVar8[5]);" (call_expression "(*pcVar9)(uVar5,iVar7,puVar8[5])" (parenthesized_expression "(*pcVar9)" ( (pointer_expression "*pcVar9" * identifier) )) (argument_list "(uVar5,iVar7,puVar8[5])" ( identifier , identifier , (subscript_expression "puVar8[5]" identifier [ number_literal ]) ))) ;) (expression_statement "(*(code *)puVar8[2])(uVar5,auStack_24,1);" (call_expression "(*(code *)puVar8[2])(uVar5,auStack_24,1)" (parenthesized_expression "(*(code *)puVar8[2])" ( (pointer_expression "*(code *)puVar8[2]" * (cast_expression "(code *)puVar8[2]" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "puVar8[2]" identifier [ number_literal ]))) )) (argument_list "(uVar5,auStack_24,1)" ( identifier , identifier , number_literal ))) ;) (expression_statement "(*(code *)puVar8[2])(uVar5,iVar2 + 0xa4,*(undefined4 *)(iVar2 + 0xe4));" (call_expression "(*(code *)puVar8[2])(uVar5,iVar2 + 0xa4,*(undefined4 *)(iVar2 + 0xe4))" (parenthesized_expression "(*(code *)puVar8[2])" ( (pointer_expression "*(code *)puVar8[2]" * (cast_expression "(code *)puVar8[2]" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "puVar8[2]" identifier [ number_literal ]))) )) (argument_list "(uVar5,iVar2 + 0xa4,*(undefined4 *)(iVar2 + 0xe4))" ( identifier , (binary_expression "iVar2 + 0xa4" identifier + number_literal) , (pointer_expression "*(undefined4 *)(iVar2 + 0xe4)" * (cast_expression "(undefined4 *)(iVar2 + 0xe4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0xe4)" ( (binary_expression "iVar2 + 0xe4" identifier + number_literal) )))) ))) ;) (expression_statement "(*(code *)puVar8[3])(uVar5,iVar4);" (call_expression "(*(code *)puVar8[3])(uVar5,iVar4)" (parenthesized_expression "(*(code *)puVar8[3])" ( (pointer_expression "*(code *)puVar8[3]" * (cast_expression "(code *)puVar8[3]" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "puVar8[3]" identifier [ number_literal ]))) )) (argument_list "(uVar5,iVar4)" ( identifier , identifier ))) ;) (if_statement "if ((int)puVar8[5] < iVar3) {\n    uVar5 = (*(code *)*puVar8)();\n    if ((*(uint *)(iVar2 + 0x50) & 0x20) == 0) {\n      FUN_0004a6e0(puVar8,uVar5,param_2);\n      uVar6 = puVar8[5];\n    }\n    else {\n      uVar6 = puVar8[5];\n    }\n    (*(code *)puVar8[2])(uVar5,iVar7,uVar6);\n    iVar7 = puVar8[5];\n    if (iVar7 < iVar3) {\n      iVar2 = 0;\n      do {\n        (*(code *)puVar8[2])(uVar5,iVar4 + iVar2);\n        uVar6 = (*(code *)puVar8[1])(uVar5);\n        (*(code *)puVar8[3])(uVar6,iVar4 + iVar7);\n        iVar7 = iVar7 + puVar8[5];\n        iVar2 = iVar7 - puVar8[5];\n      } while (iVar7 < iVar3);\n    }\n    (*(code *)puVar8[4])(uVar5);\n  }" if (parenthesized_expression "((int)puVar8[5] < iVar3)" ( (binary_expression "(int)puVar8[5] < iVar3" (cast_expression "(int)puVar8[5]" ( (type_descriptor "int" primitive_type) ) (subscript_expression "puVar8[5]" identifier [ number_literal ])) < identifier) )) (compound_statement "{\n    uVar5 = (*(code *)*puVar8)();\n    if ((*(uint *)(iVar2 + 0x50) & 0x20) == 0) {\n      FUN_0004a6e0(puVar8,uVar5,param_2);\n      uVar6 = puVar8[5];\n    }\n    else {\n      uVar6 = puVar8[5];\n    }\n    (*(code *)puVar8[2])(uVar5,iVar7,uVar6);\n    iVar7 = puVar8[5];\n    if (iVar7 < iVar3) {\n      iVar2 = 0;\n      do {\n        (*(code *)puVar8[2])(uVar5,iVar4 + iVar2);\n        uVar6 = (*(code *)puVar8[1])(uVar5);\n        (*(code *)puVar8[3])(uVar6,iVar4 + iVar7);\n        iVar7 = iVar7 + puVar8[5];\n        iVar2 = iVar7 - puVar8[5];\n      } while (iVar7 < iVar3);\n    }\n    (*(code *)puVar8[4])(uVar5);\n  }" { (expression_statement "uVar5 = (*(code *)*puVar8)();" (assignment_expression "uVar5 = (*(code *)*puVar8)()" identifier = (call_expression "(*(code *)*puVar8)()" (parenthesized_expression "(*(code *)*puVar8)" ( (pointer_expression "*(code *)*puVar8" * (cast_expression "(code *)*puVar8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*puVar8" * identifier))) )) (argument_list "()" ( )))) ;) (if_statement "if ((*(uint *)(iVar2 + 0x50) & 0x20) == 0) {\n      FUN_0004a6e0(puVar8,uVar5,param_2);\n      uVar6 = puVar8[5];\n    }\n    else {\n      uVar6 = puVar8[5];\n    }" if (parenthesized_expression "((*(uint *)(iVar2 + 0x50) & 0x20) == 0)" ( (binary_expression "(*(uint *)(iVar2 + 0x50) & 0x20) == 0" (parenthesized_expression "(*(uint *)(iVar2 + 0x50) & 0x20)" ( (binary_expression "*(uint *)(iVar2 + 0x50) & 0x20" (pointer_expression "*(uint *)(iVar2 + 0x50)" * (cast_expression "(uint *)(iVar2 + 0x50)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0x50)" ( (binary_expression "iVar2 + 0x50" identifier + number_literal) )))) & number_literal) )) == number_literal) )) (compound_statement "{\n      FUN_0004a6e0(puVar8,uVar5,param_2);\n      uVar6 = puVar8[5];\n    }" { (expression_statement "FUN_0004a6e0(puVar8,uVar5,param_2);" (call_expression "FUN_0004a6e0(puVar8,uVar5,param_2)" identifier (argument_list "(puVar8,uVar5,param_2)" ( identifier , identifier , identifier ))) ;) (expression_statement "uVar6 = puVar8[5];" (assignment_expression "uVar6 = puVar8[5]" identifier = (subscript_expression "puVar8[5]" identifier [ number_literal ])) ;) }) (else_clause "else {\n      uVar6 = puVar8[5];\n    }" else (compound_statement "{\n      uVar6 = puVar8[5];\n    }" { (expression_statement "uVar6 = puVar8[5];" (assignment_expression "uVar6 = puVar8[5]" identifier = (subscript_expression "puVar8[5]" identifier [ number_literal ])) ;) }))) (expression_statement "(*(code *)puVar8[2])(uVar5,iVar7,uVar6);" (call_expression "(*(code *)puVar8[2])(uVar5,iVar7,uVar6)" (parenthesized_expression "(*(code *)puVar8[2])" ( (pointer_expression "*(code *)puVar8[2]" * (cast_expression "(code *)puVar8[2]" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "puVar8[2]" identifier [ number_literal ]))) )) (argument_list "(uVar5,iVar7,uVar6)" ( identifier , identifier , identifier ))) ;) (expression_statement "iVar7 = puVar8[5];" (assignment_expression "iVar7 = puVar8[5]" identifier = (subscript_expression "puVar8[5]" identifier [ number_literal ])) ;) (if_statement "if (iVar7 < iVar3) {\n      iVar2 = 0;\n      do {\n        (*(code *)puVar8[2])(uVar5,iVar4 + iVar2);\n        uVar6 = (*(code *)puVar8[1])(uVar5);\n        (*(code *)puVar8[3])(uVar6,iVar4 + iVar7);\n        iVar7 = iVar7 + puVar8[5];\n        iVar2 = iVar7 - puVar8[5];\n      } while (iVar7 < iVar3);\n    }" if (parenthesized_expression "(iVar7 < iVar3)" ( (binary_expression "iVar7 < iVar3" identifier < identifier) )) (compound_statement "{\n      iVar2 = 0;\n      do {\n        (*(code *)puVar8[2])(uVar5,iVar4 + iVar2);\n        uVar6 = (*(code *)puVar8[1])(uVar5);\n        (*(code *)puVar8[3])(uVar6,iVar4 + iVar7);\n        iVar7 = iVar7 + puVar8[5];\n        iVar2 = iVar7 - puVar8[5];\n      } while (iVar7 < iVar3);\n    }" { (expression_statement "iVar2 = 0;" (assignment_expression "iVar2 = 0" identifier = number_literal) ;) (do_statement "do {\n        (*(code *)puVar8[2])(uVar5,iVar4 + iVar2);\n        uVar6 = (*(code *)puVar8[1])(uVar5);\n        (*(code *)puVar8[3])(uVar6,iVar4 + iVar7);\n        iVar7 = iVar7 + puVar8[5];\n        iVar2 = iVar7 - puVar8[5];\n      } while (iVar7 < iVar3);" do (compound_statement "{\n        (*(code *)puVar8[2])(uVar5,iVar4 + iVar2);\n        uVar6 = (*(code *)puVar8[1])(uVar5);\n        (*(code *)puVar8[3])(uVar6,iVar4 + iVar7);\n        iVar7 = iVar7 + puVar8[5];\n        iVar2 = iVar7 - puVar8[5];\n      }" { (expression_statement "(*(code *)puVar8[2])(uVar5,iVar4 + iVar2);" (call_expression "(*(code *)puVar8[2])(uVar5,iVar4 + iVar2)" (parenthesized_expression "(*(code *)puVar8[2])" ( (pointer_expression "*(code *)puVar8[2]" * (cast_expression "(code *)puVar8[2]" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "puVar8[2]" identifier [ number_literal ]))) )) (argument_list "(uVar5,iVar4 + iVar2)" ( identifier , (binary_expression "iVar4 + iVar2" identifier + identifier) ))) ;) (expression_statement "uVar6 = (*(code *)puVar8[1])(uVar5);" (assignment_expression "uVar6 = (*(code *)puVar8[1])(uVar5)" identifier = (call_expression "(*(code *)puVar8[1])(uVar5)" (parenthesized_expression "(*(code *)puVar8[1])" ( (pointer_expression "*(code *)puVar8[1]" * (cast_expression "(code *)puVar8[1]" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "puVar8[1]" identifier [ number_literal ]))) )) (argument_list "(uVar5)" ( identifier )))) ;) (expression_statement "(*(code *)puVar8[3])(uVar6,iVar4 + iVar7);" (call_expression "(*(code *)puVar8[3])(uVar6,iVar4 + iVar7)" (parenthesized_expression "(*(code *)puVar8[3])" ( (pointer_expression "*(code *)puVar8[3]" * (cast_expression "(code *)puVar8[3]" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "puVar8[3]" identifier [ number_literal ]))) )) (argument_list "(uVar6,iVar4 + iVar7)" ( identifier , (binary_expression "iVar4 + iVar7" identifier + identifier) ))) ;) (expression_statement "iVar7 = iVar7 + puVar8[5];" (assignment_expression "iVar7 = iVar7 + puVar8[5]" identifier = (binary_expression "iVar7 + puVar8[5]" identifier + (subscript_expression "puVar8[5]" identifier [ number_literal ]))) ;) (expression_statement "iVar2 = iVar7 - puVar8[5];" (assignment_expression "iVar2 = iVar7 - puVar8[5]" identifier = (binary_expression "iVar7 - puVar8[5]" identifier - (subscript_expression "puVar8[5]" identifier [ number_literal ]))) ;) }) while (parenthesized_expression "(iVar7 < iVar3)" ( (binary_expression "iVar7 < iVar3" identifier < identifier) )) ;) })) (expression_statement "(*(code *)puVar8[4])(uVar5);" (call_expression "(*(code *)puVar8[4])(uVar5)" (parenthesized_expression "(*(code *)puVar8[4])" ( (pointer_expression "*(code *)puVar8[4]" * (cast_expression "(code *)puVar8[4]" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "puVar8[4]" identifier [ number_literal ]))) )) (argument_list "(uVar5)" ( identifier ))) ;) })) (if_statement "if (0x1192b0 < iVar3) {\n    smemclr(&_gp_1 + iVar4,iVar3 + -0x1192b0);\n    return iVar4;\n  }" if (parenthesized_expression "(0x1192b0 < iVar3)" ( (binary_expression "0x1192b0 < iVar3" number_literal < identifier) )) (compound_statement "{\n    smemclr(&_gp_1 + iVar4,iVar3 + -0x1192b0);\n    return iVar4;\n  }" { (expression_statement "smemclr(&_gp_1 + iVar4,iVar3 + -0x1192b0);" (call_expression "smemclr(&_gp_1 + iVar4,iVar3 + -0x1192b0)" identifier (argument_list "(&_gp_1 + iVar4,iVar3 + -0x1192b0)" ( (binary_expression "&_gp_1 + iVar4" (pointer_expression "&_gp_1" & identifier) + identifier) , (binary_expression "iVar3 + -0x1192b0" identifier + number_literal) ))) ;) (return_statement "return iVar4;" return identifier ;) })) (return_statement "return iVar4;" return identifier ;) })))
(translation_unit "void hash_mpint(ssh_hash *h,void *s,Bignum b)\n\n{\n  uchar *str;\n  int len;\n  undefined4 local_14;\n  \n  local_14 = *(undefined4 *)PTR___stack_chk_guard_00112630;\n  str = ssh2_mpint_fmt(b,&len);\n  hash_string((ssh_hash *)&h->bytes,s,str,len);\n                    /* WARNING: Subroutine does not return */\n  safefree(str);\n}\n\n" (function_definition "void hash_mpint(ssh_hash *h,void *s,Bignum b)\n\n{\n  uchar *str;\n  int len;\n  undefined4 local_14;\n  \n  local_14 = *(undefined4 *)PTR___stack_chk_guard_00112630;\n  str = ssh2_mpint_fmt(b,&len);\n  hash_string((ssh_hash *)&h->bytes,s,str,len);\n                    /* WARNING: Subroutine does not return */\n  safefree(str);\n}" primitive_type (function_declarator "hash_mpint(ssh_hash *h,void *s,Bignum b)" identifier (parameter_list "(ssh_hash *h,void *s,Bignum b)" ( (parameter_declaration "ssh_hash *h" type_identifier (pointer_declarator "*h" * identifier)) , (parameter_declaration "void *s" primitive_type (pointer_declarator "*s" * identifier)) , (parameter_declaration "Bignum b" type_identifier identifier) ))) (compound_statement "{\n  uchar *str;\n  int len;\n  undefined4 local_14;\n  \n  local_14 = *(undefined4 *)PTR___stack_chk_guard_00112630;\n  str = ssh2_mpint_fmt(b,&len);\n  hash_string((ssh_hash *)&h->bytes,s,str,len);\n                    /* WARNING: Subroutine does not return */\n  safefree(str);\n}" { (declaration "uchar *str;" type_identifier (pointer_declarator "*str" * identifier) ;) (declaration "int len;" primitive_type identifier ;) (declaration "undefined4 local_14;" type_identifier identifier ;) (expression_statement "local_14 = *(undefined4 *)PTR___stack_chk_guard_00112630;" (assignment_expression "local_14 = *(undefined4 *)PTR___stack_chk_guard_00112630" identifier = (pointer_expression "*(undefined4 *)PTR___stack_chk_guard_00112630" * (cast_expression "(undefined4 *)PTR___stack_chk_guard_00112630" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier))) ;) (expression_statement "str = ssh2_mpint_fmt(b,&len);" (assignment_expression "str = ssh2_mpint_fmt(b,&len)" identifier = (call_expression "ssh2_mpint_fmt(b,&len)" identifier (argument_list "(b,&len)" ( identifier , (pointer_expression "&len" & identifier) )))) ;) (expression_statement "hash_string((ssh_hash *)&h->bytes,s,str,len);" (call_expression "hash_string((ssh_hash *)&h->bytes,s,str,len)" identifier (argument_list "((ssh_hash *)&h->bytes,s,str,len)" ( (cast_expression "(ssh_hash *)&h->bytes" ( (type_descriptor "ssh_hash *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&h->bytes" & (field_expression "h->bytes" identifier -> field_identifier))) , identifier , identifier , identifier ))) ;) comment (expression_statement "safefree(str);" (call_expression "safefree(str)" identifier (argument_list "(str)" ( identifier ))) ;) })))
(translation_unit "int FUN_0004a6e0(int param_1,undefined4 param_2,undefined4 param_3)\n\n{\n  undefined *puVar1;\n  int iVar2;\n  int iVar3;\n  int iVar4;\n  undefined4 uVar5;\n  undefined4 uVar6;\n  int iVar7;\n  undefined4 *puVar8;\n  code *pcVar9;\n  undefined1 auStack_24 [4];\n  undefined1 local_18 [4];\n  int local_14;\n  \n  puVar1 = PTR___stack_chk_guard_00112630;\n  local_14 = *(int *)PTR___stack_chk_guard_00112630;\n  iVar2 = FUN_0004807c(param_3,local_18);\n  iVar7 = iVar2;\n  FUN_0004a62c(param_1 + 8,param_2,iVar2);\n  safefree();\n  if (local_14 == *(int *)puVar1) {\n    return *(int *)puVar1;\n  }\n  (*(code *)PTR___stack_chk_fail_001122c8)();\n  puVar8 = *(undefined4 **)(*(int *)(iVar2 + 0x98) + 0xc);\n  iVar3 = puVar8[5];\n  if (iVar3 == 0) {\n    trap(7);\n  }\n  iVar3 = ((iVar3 + 0x1192af) / iVar3) * iVar3;\n  iVar4 = safemalloc(iVar3,1);\n  uVar5 = (*(code *)*puVar8)();\n  if ((*(uint *)(iVar2 + 0x50) & 0x20) == 0) {\n    FUN_0004a6e0(puVar8,uVar5,param_2);\n    pcVar9 = (code *)puVar8[2];\n  }\n  else {\n    pcVar9 = (code *)puVar8[2];\n  }\n  (*pcVar9)(uVar5,iVar7,puVar8[5]);\n  (*(code *)puVar8[2])(uVar5,auStack_24,1);\n  (*(code *)puVar8[2])(uVar5,iVar2 + 0xa4,*(undefined4 *)(iVar2 + 0xe4));\n  (*(code *)puVar8[3])(uVar5,iVar4);\n  if ((int)puVar8[5] < iVar3) {\n    uVar5 = (*(code *)*puVar8)();\n    if ((*(uint *)(iVar2 + 0x50) & 0x20) == 0) {\n      FUN_0004a6e0(puVar8,uVar5,param_2);\n      uVar6 = puVar8[5];\n    }\n    else {\n      uVar6 = puVar8[5];\n    }\n    (*(code *)puVar8[2])(uVar5,iVar7,uVar6);\n    iVar7 = puVar8[5];\n    if (iVar7 < iVar3) {\n      iVar2 = 0;\n      do {\n        (*(code *)puVar8[2])(uVar5,iVar4 + iVar2);\n        uVar6 = (*(code *)puVar8[1])(uVar5);\n        (*(code *)puVar8[3])(uVar6,iVar4 + iVar7);\n        iVar7 = iVar7 + puVar8[5];\n        iVar2 = iVar7 - puVar8[5];\n      } while (iVar7 < iVar3);\n    }\n    (*(code *)puVar8[4])(uVar5);\n  }\n  if (0x1192b0 < iVar3) {\n    smemclr(&_gp_1 + iVar4,iVar3 + -0x1192b0);\n    return iVar4;\n  }\n  return iVar4;\n}\n\n" (function_definition "int FUN_0004a6e0(int param_1,undefined4 param_2,undefined4 param_3)\n\n{\n  undefined *puVar1;\n  int iVar2;\n  int iVar3;\n  int iVar4;\n  undefined4 uVar5;\n  undefined4 uVar6;\n  int iVar7;\n  undefined4 *puVar8;\n  code *pcVar9;\n  undefined1 auStack_24 [4];\n  undefined1 local_18 [4];\n  int local_14;\n  \n  puVar1 = PTR___stack_chk_guard_00112630;\n  local_14 = *(int *)PTR___stack_chk_guard_00112630;\n  iVar2 = FUN_0004807c(param_3,local_18);\n  iVar7 = iVar2;\n  FUN_0004a62c(param_1 + 8,param_2,iVar2);\n  safefree();\n  if (local_14 == *(int *)puVar1) {\n    return *(int *)puVar1;\n  }\n  (*(code *)PTR___stack_chk_fail_001122c8)();\n  puVar8 = *(undefined4 **)(*(int *)(iVar2 + 0x98) + 0xc);\n  iVar3 = puVar8[5];\n  if (iVar3 == 0) {\n    trap(7);\n  }\n  iVar3 = ((iVar3 + 0x1192af) / iVar3) * iVar3;\n  iVar4 = safemalloc(iVar3,1);\n  uVar5 = (*(code *)*puVar8)();\n  if ((*(uint *)(iVar2 + 0x50) & 0x20) == 0) {\n    FUN_0004a6e0(puVar8,uVar5,param_2);\n    pcVar9 = (code *)puVar8[2];\n  }\n  else {\n    pcVar9 = (code *)puVar8[2];\n  }\n  (*pcVar9)(uVar5,iVar7,puVar8[5]);\n  (*(code *)puVar8[2])(uVar5,auStack_24,1);\n  (*(code *)puVar8[2])(uVar5,iVar2 + 0xa4,*(undefined4 *)(iVar2 + 0xe4));\n  (*(code *)puVar8[3])(uVar5,iVar4);\n  if ((int)puVar8[5] < iVar3) {\n    uVar5 = (*(code *)*puVar8)();\n    if ((*(uint *)(iVar2 + 0x50) & 0x20) == 0) {\n      FUN_0004a6e0(puVar8,uVar5,param_2);\n      uVar6 = puVar8[5];\n    }\n    else {\n      uVar6 = puVar8[5];\n    }\n    (*(code *)puVar8[2])(uVar5,iVar7,uVar6);\n    iVar7 = puVar8[5];\n    if (iVar7 < iVar3) {\n      iVar2 = 0;\n      do {\n        (*(code *)puVar8[2])(uVar5,iVar4 + iVar2);\n        uVar6 = (*(code *)puVar8[1])(uVar5);\n        (*(code *)puVar8[3])(uVar6,iVar4 + iVar7);\n        iVar7 = iVar7 + puVar8[5];\n        iVar2 = iVar7 - puVar8[5];\n      } while (iVar7 < iVar3);\n    }\n    (*(code *)puVar8[4])(uVar5);\n  }\n  if (0x1192b0 < iVar3) {\n    smemclr(&_gp_1 + iVar4,iVar3 + -0x1192b0);\n    return iVar4;\n  }\n  return iVar4;\n}" primitive_type (function_declarator "FUN_0004a6e0(int param_1,undefined4 param_2,undefined4 param_3)" identifier (parameter_list "(int param_1,undefined4 param_2,undefined4 param_3)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "undefined4 param_3" type_identifier identifier) ))) (compound_statement "{\n  undefined *puVar1;\n  int iVar2;\n  int iVar3;\n  int iVar4;\n  undefined4 uVar5;\n  undefined4 uVar6;\n  int iVar7;\n  undefined4 *puVar8;\n  code *pcVar9;\n  undefined1 auStack_24 [4];\n  undefined1 local_18 [4];\n  int local_14;\n  \n  puVar1 = PTR___stack_chk_guard_00112630;\n  local_14 = *(int *)PTR___stack_chk_guard_00112630;\n  iVar2 = FUN_0004807c(param_3,local_18);\n  iVar7 = iVar2;\n  FUN_0004a62c(param_1 + 8,param_2,iVar2);\n  safefree();\n  if (local_14 == *(int *)puVar1) {\n    return *(int *)puVar1;\n  }\n  (*(code *)PTR___stack_chk_fail_001122c8)();\n  puVar8 = *(undefined4 **)(*(int *)(iVar2 + 0x98) + 0xc);\n  iVar3 = puVar8[5];\n  if (iVar3 == 0) {\n    trap(7);\n  }\n  iVar3 = ((iVar3 + 0x1192af) / iVar3) * iVar3;\n  iVar4 = safemalloc(iVar3,1);\n  uVar5 = (*(code *)*puVar8)();\n  if ((*(uint *)(iVar2 + 0x50) & 0x20) == 0) {\n    FUN_0004a6e0(puVar8,uVar5,param_2);\n    pcVar9 = (code *)puVar8[2];\n  }\n  else {\n    pcVar9 = (code *)puVar8[2];\n  }\n  (*pcVar9)(uVar5,iVar7,puVar8[5]);\n  (*(code *)puVar8[2])(uVar5,auStack_24,1);\n  (*(code *)puVar8[2])(uVar5,iVar2 + 0xa4,*(undefined4 *)(iVar2 + 0xe4));\n  (*(code *)puVar8[3])(uVar5,iVar4);\n  if ((int)puVar8[5] < iVar3) {\n    uVar5 = (*(code *)*puVar8)();\n    if ((*(uint *)(iVar2 + 0x50) & 0x20) == 0) {\n      FUN_0004a6e0(puVar8,uVar5,param_2);\n      uVar6 = puVar8[5];\n    }\n    else {\n      uVar6 = puVar8[5];\n    }\n    (*(code *)puVar8[2])(uVar5,iVar7,uVar6);\n    iVar7 = puVar8[5];\n    if (iVar7 < iVar3) {\n      iVar2 = 0;\n      do {\n        (*(code *)puVar8[2])(uVar5,iVar4 + iVar2);\n        uVar6 = (*(code *)puVar8[1])(uVar5);\n        (*(code *)puVar8[3])(uVar6,iVar4 + iVar7);\n        iVar7 = iVar7 + puVar8[5];\n        iVar2 = iVar7 - puVar8[5];\n      } while (iVar7 < iVar3);\n    }\n    (*(code *)puVar8[4])(uVar5);\n  }\n  if (0x1192b0 < iVar3) {\n    smemclr(&_gp_1 + iVar4,iVar3 + -0x1192b0);\n    return iVar4;\n  }\n  return iVar4;\n}" { (declaration "undefined *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "undefined4 uVar5;" type_identifier identifier ;) (declaration "undefined4 uVar6;" type_identifier identifier ;) (declaration "int iVar7;" primitive_type identifier ;) (declaration "undefined4 *puVar8;" type_identifier (pointer_declarator "*puVar8" * identifier) ;) (declaration "code *pcVar9;" type_identifier (pointer_declarator "*pcVar9" * identifier) ;) (declaration "undefined1 auStack_24 [4];" type_identifier (array_declarator "auStack_24 [4]" identifier [ number_literal ]) ;) (declaration "undefined1 local_18 [4];" type_identifier (array_declarator "local_18 [4]" identifier [ number_literal ]) ;) (declaration "int local_14;" primitive_type identifier ;) (expression_statement "puVar1 = PTR___stack_chk_guard_00112630;" (assignment_expression "puVar1 = PTR___stack_chk_guard_00112630" identifier = identifier) ;) (expression_statement "local_14 = *(int *)PTR___stack_chk_guard_00112630;" (assignment_expression "local_14 = *(int *)PTR___stack_chk_guard_00112630" identifier = (pointer_expression "*(int *)PTR___stack_chk_guard_00112630" * (cast_expression "(int *)PTR___stack_chk_guard_00112630" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) ;) (expression_statement "iVar2 = FUN_0004807c(param_3,local_18);" (assignment_expression "iVar2 = FUN_0004807c(param_3,local_18)" identifier = (call_expression "FUN_0004807c(param_3,local_18)" identifier (argument_list "(param_3,local_18)" ( identifier , identifier )))) ;) (expression_statement "iVar7 = iVar2;" (assignment_expression "iVar7 = iVar2" identifier = identifier) ;) (expression_statement "FUN_0004a62c(param_1 + 8,param_2,iVar2);" (call_expression "FUN_0004a62c(param_1 + 8,param_2,iVar2)" identifier (argument_list "(param_1 + 8,param_2,iVar2)" ( (binary_expression "param_1 + 8" identifier + number_literal) , identifier , identifier ))) ;) (expression_statement "safefree();" (call_expression "safefree()" identifier (argument_list "()" ( ))) ;) (if_statement "if (local_14 == *(int *)puVar1) {\n    return *(int *)puVar1;\n  }" if (parenthesized_expression "(local_14 == *(int *)puVar1)" ( (binary_expression "local_14 == *(int *)puVar1" identifier == (pointer_expression "*(int *)puVar1" * (cast_expression "(int *)puVar1" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) )) (compound_statement "{\n    return *(int *)puVar1;\n  }" { (return_statement "return *(int *)puVar1;" return (pointer_expression "*(int *)puVar1" * (cast_expression "(int *)puVar1" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) ;) })) (expression_statement "(*(code *)PTR___stack_chk_fail_001122c8)();" (call_expression "(*(code *)PTR___stack_chk_fail_001122c8)()" (parenthesized_expression "(*(code *)PTR___stack_chk_fail_001122c8)" ( (pointer_expression "*(code *)PTR___stack_chk_fail_001122c8" * (cast_expression "(code *)PTR___stack_chk_fail_001122c8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))) ;) (expression_statement "puVar8 = *(undefined4 **)(*(int *)(iVar2 + 0x98) + 0xc);" (assignment_expression "puVar8 = *(undefined4 **)(*(int *)(iVar2 + 0x98) + 0xc)" identifier = (pointer_expression "*(undefined4 **)(*(int *)(iVar2 + 0x98) + 0xc)" * (cast_expression "(undefined4 **)(*(int *)(iVar2 + 0x98) + 0xc)" ( (type_descriptor "undefined4 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*(int *)(iVar2 + 0x98) + 0xc)" ( (binary_expression "*(int *)(iVar2 + 0x98) + 0xc" (pointer_expression "*(int *)(iVar2 + 0x98)" * (cast_expression "(int *)(iVar2 + 0x98)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0x98)" ( (binary_expression "iVar2 + 0x98" identifier + number_literal) )))) + number_literal) ))))) ;) (expression_statement "iVar3 = puVar8[5];" (assignment_expression "iVar3 = puVar8[5]" identifier = (subscript_expression "puVar8[5]" identifier [ number_literal ])) ;) (if_statement "if (iVar3 == 0) {\n    trap(7);\n  }" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (compound_statement "{\n    trap(7);\n  }" { (expression_statement "trap(7);" (call_expression "trap(7)" identifier (argument_list "(7)" ( number_literal ))) ;) })) (expression_statement "iVar3 = ((iVar3 + 0x1192af) / iVar3) * iVar3;" (assignment_expression "iVar3 = ((iVar3 + 0x1192af) / iVar3) * iVar3" identifier = (binary_expression "((iVar3 + 0x1192af) / iVar3) * iVar3" (parenthesized_expression "((iVar3 + 0x1192af) / iVar3)" ( (binary_expression "(iVar3 + 0x1192af) / iVar3" (parenthesized_expression "(iVar3 + 0x1192af)" ( (binary_expression "iVar3 + 0x1192af" identifier + number_literal) )) / identifier) )) * identifier)) ;) (expression_statement "iVar4 = safemalloc(iVar3,1);" (assignment_expression "iVar4 = safemalloc(iVar3,1)" identifier = (call_expression "safemalloc(iVar3,1)" identifier (argument_list "(iVar3,1)" ( identifier , number_literal )))) ;) (expression_statement "uVar5 = (*(code *)*puVar8)();" (assignment_expression "uVar5 = (*(code *)*puVar8)()" identifier = (call_expression "(*(code *)*puVar8)()" (parenthesized_expression "(*(code *)*puVar8)" ( (pointer_expression "*(code *)*puVar8" * (cast_expression "(code *)*puVar8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*puVar8" * identifier))) )) (argument_list "()" ( )))) ;) (if_statement "if ((*(uint *)(iVar2 + 0x50) & 0x20) == 0) {\n    FUN_0004a6e0(puVar8,uVar5,param_2);\n    pcVar9 = (code *)puVar8[2];\n  }\n  else {\n    pcVar9 = (code *)puVar8[2];\n  }" if (parenthesized_expression "((*(uint *)(iVar2 + 0x50) & 0x20) == 0)" ( (binary_expression "(*(uint *)(iVar2 + 0x50) & 0x20) == 0" (parenthesized_expression "(*(uint *)(iVar2 + 0x50) & 0x20)" ( (binary_expression "*(uint *)(iVar2 + 0x50) & 0x20" (pointer_expression "*(uint *)(iVar2 + 0x50)" * (cast_expression "(uint *)(iVar2 + 0x50)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0x50)" ( (binary_expression "iVar2 + 0x50" identifier + number_literal) )))) & number_literal) )) == number_literal) )) (compound_statement "{\n    FUN_0004a6e0(puVar8,uVar5,param_2);\n    pcVar9 = (code *)puVar8[2];\n  }" { (expression_statement "FUN_0004a6e0(puVar8,uVar5,param_2);" (call_expression "FUN_0004a6e0(puVar8,uVar5,param_2)" identifier (argument_list "(puVar8,uVar5,param_2)" ( identifier , identifier , identifier ))) ;) (expression_statement "pcVar9 = (code *)puVar8[2];" (assignment_expression "pcVar9 = (code *)puVar8[2]" identifier = (cast_expression "(code *)puVar8[2]" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "puVar8[2]" identifier [ number_literal ]))) ;) }) (else_clause "else {\n    pcVar9 = (code *)puVar8[2];\n  }" else (compound_statement "{\n    pcVar9 = (code *)puVar8[2];\n  }" { (expression_statement "pcVar9 = (code *)puVar8[2];" (assignment_expression "pcVar9 = (code *)puVar8[2]" identifier = (cast_expression "(code *)puVar8[2]" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "puVar8[2]" identifier [ number_literal ]))) ;) }))) (expression_statement "(*pcVar9)(uVar5,iVar7,puVar8[5]);" (call_expression "(*pcVar9)(uVar5,iVar7,puVar8[5])" (parenthesized_expression "(*pcVar9)" ( (pointer_expression "*pcVar9" * identifier) )) (argument_list "(uVar5,iVar7,puVar8[5])" ( identifier , identifier , (subscript_expression "puVar8[5]" identifier [ number_literal ]) ))) ;) (expression_statement "(*(code *)puVar8[2])(uVar5,auStack_24,1);" (call_expression "(*(code *)puVar8[2])(uVar5,auStack_24,1)" (parenthesized_expression "(*(code *)puVar8[2])" ( (pointer_expression "*(code *)puVar8[2]" * (cast_expression "(code *)puVar8[2]" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "puVar8[2]" identifier [ number_literal ]))) )) (argument_list "(uVar5,auStack_24,1)" ( identifier , identifier , number_literal ))) ;) (expression_statement "(*(code *)puVar8[2])(uVar5,iVar2 + 0xa4,*(undefined4 *)(iVar2 + 0xe4));" (call_expression "(*(code *)puVar8[2])(uVar5,iVar2 + 0xa4,*(undefined4 *)(iVar2 + 0xe4))" (parenthesized_expression "(*(code *)puVar8[2])" ( (pointer_expression "*(code *)puVar8[2]" * (cast_expression "(code *)puVar8[2]" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "puVar8[2]" identifier [ number_literal ]))) )) (argument_list "(uVar5,iVar2 + 0xa4,*(undefined4 *)(iVar2 + 0xe4))" ( identifier , (binary_expression "iVar2 + 0xa4" identifier + number_literal) , (pointer_expression "*(undefined4 *)(iVar2 + 0xe4)" * (cast_expression "(undefined4 *)(iVar2 + 0xe4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0xe4)" ( (binary_expression "iVar2 + 0xe4" identifier + number_literal) )))) ))) ;) (expression_statement "(*(code *)puVar8[3])(uVar5,iVar4);" (call_expression "(*(code *)puVar8[3])(uVar5,iVar4)" (parenthesized_expression "(*(code *)puVar8[3])" ( (pointer_expression "*(code *)puVar8[3]" * (cast_expression "(code *)puVar8[3]" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "puVar8[3]" identifier [ number_literal ]))) )) (argument_list "(uVar5,iVar4)" ( identifier , identifier ))) ;) (if_statement "if ((int)puVar8[5] < iVar3) {\n    uVar5 = (*(code *)*puVar8)();\n    if ((*(uint *)(iVar2 + 0x50) & 0x20) == 0) {\n      FUN_0004a6e0(puVar8,uVar5,param_2);\n      uVar6 = puVar8[5];\n    }\n    else {\n      uVar6 = puVar8[5];\n    }\n    (*(code *)puVar8[2])(uVar5,iVar7,uVar6);\n    iVar7 = puVar8[5];\n    if (iVar7 < iVar3) {\n      iVar2 = 0;\n      do {\n        (*(code *)puVar8[2])(uVar5,iVar4 + iVar2);\n        uVar6 = (*(code *)puVar8[1])(uVar5);\n        (*(code *)puVar8[3])(uVar6,iVar4 + iVar7);\n        iVar7 = iVar7 + puVar8[5];\n        iVar2 = iVar7 - puVar8[5];\n      } while (iVar7 < iVar3);\n    }\n    (*(code *)puVar8[4])(uVar5);\n  }" if (parenthesized_expression "((int)puVar8[5] < iVar3)" ( (binary_expression "(int)puVar8[5] < iVar3" (cast_expression "(int)puVar8[5]" ( (type_descriptor "int" primitive_type) ) (subscript_expression "puVar8[5]" identifier [ number_literal ])) < identifier) )) (compound_statement "{\n    uVar5 = (*(code *)*puVar8)();\n    if ((*(uint *)(iVar2 + 0x50) & 0x20) == 0) {\n      FUN_0004a6e0(puVar8,uVar5,param_2);\n      uVar6 = puVar8[5];\n    }\n    else {\n      uVar6 = puVar8[5];\n    }\n    (*(code *)puVar8[2])(uVar5,iVar7,uVar6);\n    iVar7 = puVar8[5];\n    if (iVar7 < iVar3) {\n      iVar2 = 0;\n      do {\n        (*(code *)puVar8[2])(uVar5,iVar4 + iVar2);\n        uVar6 = (*(code *)puVar8[1])(uVar5);\n        (*(code *)puVar8[3])(uVar6,iVar4 + iVar7);\n        iVar7 = iVar7 + puVar8[5];\n        iVar2 = iVar7 - puVar8[5];\n      } while (iVar7 < iVar3);\n    }\n    (*(code *)puVar8[4])(uVar5);\n  }" { (expression_statement "uVar5 = (*(code *)*puVar8)();" (assignment_expression "uVar5 = (*(code *)*puVar8)()" identifier = (call_expression "(*(code *)*puVar8)()" (parenthesized_expression "(*(code *)*puVar8)" ( (pointer_expression "*(code *)*puVar8" * (cast_expression "(code *)*puVar8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*puVar8" * identifier))) )) (argument_list "()" ( )))) ;) (if_statement "if ((*(uint *)(iVar2 + 0x50) & 0x20) == 0) {\n      FUN_0004a6e0(puVar8,uVar5,param_2);\n      uVar6 = puVar8[5];\n    }\n    else {\n      uVar6 = puVar8[5];\n    }" if (parenthesized_expression "((*(uint *)(iVar2 + 0x50) & 0x20) == 0)" ( (binary_expression "(*(uint *)(iVar2 + 0x50) & 0x20) == 0" (parenthesized_expression "(*(uint *)(iVar2 + 0x50) & 0x20)" ( (binary_expression "*(uint *)(iVar2 + 0x50) & 0x20" (pointer_expression "*(uint *)(iVar2 + 0x50)" * (cast_expression "(uint *)(iVar2 + 0x50)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0x50)" ( (binary_expression "iVar2 + 0x50" identifier + number_literal) )))) & number_literal) )) == number_literal) )) (compound_statement "{\n      FUN_0004a6e0(puVar8,uVar5,param_2);\n      uVar6 = puVar8[5];\n    }" { (expression_statement "FUN_0004a6e0(puVar8,uVar5,param_2);" (call_expression "FUN_0004a6e0(puVar8,uVar5,param_2)" identifier (argument_list "(puVar8,uVar5,param_2)" ( identifier , identifier , identifier ))) ;) (expression_statement "uVar6 = puVar8[5];" (assignment_expression "uVar6 = puVar8[5]" identifier = (subscript_expression "puVar8[5]" identifier [ number_literal ])) ;) }) (else_clause "else {\n      uVar6 = puVar8[5];\n    }" else (compound_statement "{\n      uVar6 = puVar8[5];\n    }" { (expression_statement "uVar6 = puVar8[5];" (assignment_expression "uVar6 = puVar8[5]" identifier = (subscript_expression "puVar8[5]" identifier [ number_literal ])) ;) }))) (expression_statement "(*(code *)puVar8[2])(uVar5,iVar7,uVar6);" (call_expression "(*(code *)puVar8[2])(uVar5,iVar7,uVar6)" (parenthesized_expression "(*(code *)puVar8[2])" ( (pointer_expression "*(code *)puVar8[2]" * (cast_expression "(code *)puVar8[2]" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "puVar8[2]" identifier [ number_literal ]))) )) (argument_list "(uVar5,iVar7,uVar6)" ( identifier , identifier , identifier ))) ;) (expression_statement "iVar7 = puVar8[5];" (assignment_expression "iVar7 = puVar8[5]" identifier = (subscript_expression "puVar8[5]" identifier [ number_literal ])) ;) (if_statement "if (iVar7 < iVar3) {\n      iVar2 = 0;\n      do {\n        (*(code *)puVar8[2])(uVar5,iVar4 + iVar2);\n        uVar6 = (*(code *)puVar8[1])(uVar5);\n        (*(code *)puVar8[3])(uVar6,iVar4 + iVar7);\n        iVar7 = iVar7 + puVar8[5];\n        iVar2 = iVar7 - puVar8[5];\n      } while (iVar7 < iVar3);\n    }" if (parenthesized_expression "(iVar7 < iVar3)" ( (binary_expression "iVar7 < iVar3" identifier < identifier) )) (compound_statement "{\n      iVar2 = 0;\n      do {\n        (*(code *)puVar8[2])(uVar5,iVar4 + iVar2);\n        uVar6 = (*(code *)puVar8[1])(uVar5);\n        (*(code *)puVar8[3])(uVar6,iVar4 + iVar7);\n        iVar7 = iVar7 + puVar8[5];\n        iVar2 = iVar7 - puVar8[5];\n      } while (iVar7 < iVar3);\n    }" { (expression_statement "iVar2 = 0;" (assignment_expression "iVar2 = 0" identifier = number_literal) ;) (do_statement "do {\n        (*(code *)puVar8[2])(uVar5,iVar4 + iVar2);\n        uVar6 = (*(code *)puVar8[1])(uVar5);\n        (*(code *)puVar8[3])(uVar6,iVar4 + iVar7);\n        iVar7 = iVar7 + puVar8[5];\n        iVar2 = iVar7 - puVar8[5];\n      } while (iVar7 < iVar3);" do (compound_statement "{\n        (*(code *)puVar8[2])(uVar5,iVar4 + iVar2);\n        uVar6 = (*(code *)puVar8[1])(uVar5);\n        (*(code *)puVar8[3])(uVar6,iVar4 + iVar7);\n        iVar7 = iVar7 + puVar8[5];\n        iVar2 = iVar7 - puVar8[5];\n      }" { (expression_statement "(*(code *)puVar8[2])(uVar5,iVar4 + iVar2);" (call_expression "(*(code *)puVar8[2])(uVar5,iVar4 + iVar2)" (parenthesized_expression "(*(code *)puVar8[2])" ( (pointer_expression "*(code *)puVar8[2]" * (cast_expression "(code *)puVar8[2]" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "puVar8[2]" identifier [ number_literal ]))) )) (argument_list "(uVar5,iVar4 + iVar2)" ( identifier , (binary_expression "iVar4 + iVar2" identifier + identifier) ))) ;) (expression_statement "uVar6 = (*(code *)puVar8[1])(uVar5);" (assignment_expression "uVar6 = (*(code *)puVar8[1])(uVar5)" identifier = (call_expression "(*(code *)puVar8[1])(uVar5)" (parenthesized_expression "(*(code *)puVar8[1])" ( (pointer_expression "*(code *)puVar8[1]" * (cast_expression "(code *)puVar8[1]" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "puVar8[1]" identifier [ number_literal ]))) )) (argument_list "(uVar5)" ( identifier )))) ;) (expression_statement "(*(code *)puVar8[3])(uVar6,iVar4 + iVar7);" (call_expression "(*(code *)puVar8[3])(uVar6,iVar4 + iVar7)" (parenthesized_expression "(*(code *)puVar8[3])" ( (pointer_expression "*(code *)puVar8[3]" * (cast_expression "(code *)puVar8[3]" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "puVar8[3]" identifier [ number_literal ]))) )) (argument_list "(uVar6,iVar4 + iVar7)" ( identifier , (binary_expression "iVar4 + iVar7" identifier + identifier) ))) ;) (expression_statement "iVar7 = iVar7 + puVar8[5];" (assignment_expression "iVar7 = iVar7 + puVar8[5]" identifier = (binary_expression "iVar7 + puVar8[5]" identifier + (subscript_expression "puVar8[5]" identifier [ number_literal ]))) ;) (expression_statement "iVar2 = iVar7 - puVar8[5];" (assignment_expression "iVar2 = iVar7 - puVar8[5]" identifier = (binary_expression "iVar7 - puVar8[5]" identifier - (subscript_expression "puVar8[5]" identifier [ number_literal ]))) ;) }) while (parenthesized_expression "(iVar7 < iVar3)" ( (binary_expression "iVar7 < iVar3" identifier < identifier) )) ;) })) (expression_statement "(*(code *)puVar8[4])(uVar5);" (call_expression "(*(code *)puVar8[4])(uVar5)" (parenthesized_expression "(*(code *)puVar8[4])" ( (pointer_expression "*(code *)puVar8[4]" * (cast_expression "(code *)puVar8[4]" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "puVar8[4]" identifier [ number_literal ]))) )) (argument_list "(uVar5)" ( identifier ))) ;) })) (if_statement "if (0x1192b0 < iVar3) {\n    smemclr(&_gp_1 + iVar4,iVar3 + -0x1192b0);\n    return iVar4;\n  }" if (parenthesized_expression "(0x1192b0 < iVar3)" ( (binary_expression "0x1192b0 < iVar3" number_literal < identifier) )) (compound_statement "{\n    smemclr(&_gp_1 + iVar4,iVar3 + -0x1192b0);\n    return iVar4;\n  }" { (expression_statement "smemclr(&_gp_1 + iVar4,iVar3 + -0x1192b0);" (call_expression "smemclr(&_gp_1 + iVar4,iVar3 + -0x1192b0)" identifier (argument_list "(&_gp_1 + iVar4,iVar3 + -0x1192b0)" ( (binary_expression "&_gp_1 + iVar4" (pointer_expression "&_gp_1" & identifier) + identifier) , (binary_expression "iVar3 + -0x1192b0" identifier + number_literal) ))) ;) (return_statement "return iVar4;" return identifier ;) })) (return_statement "return iVar4;" return identifier ;) })))
(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 (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (array_declarator IDENT [ LIT ]) ;) (declaration TYPE (array_declarator IDENT [ LIT ]) ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT )))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (call_expression IDENT (argument_list ( (binary_expression IDENT + LIT) , IDENT , IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( ))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT))) )) (compound_statement { (return_statement return (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) ;) })) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( ))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (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 IDENT = (subscript_expression IDENT [ LIT ])) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( LIT ))) ;) })) (expression_statement (assignment_expression IDENT = (binary_expression (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT + LIT) )) / IDENT) )) * IDENT)) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , LIT )))) ;) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT))) )) (argument_list ( )))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) & LIT) )) == LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT ))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (subscript_expression IDENT [ LIT ]))) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (subscript_expression IDENT [ LIT ]))) ;) }))) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * IDENT) )) (argument_list ( IDENT , IDENT , (subscript_expression IDENT [ LIT ]) ))) ;) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (subscript_expression IDENT [ LIT ]))) )) (argument_list ( IDENT , IDENT , LIT ))) ;) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (subscript_expression IDENT [ LIT ]))) )) (argument_list ( IDENT , (binary_expression IDENT + LIT) , (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) ))) ;) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (subscript_expression IDENT [ LIT ]))) )) (argument_list ( IDENT , IDENT ))) ;) (if_statement if (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) (subscript_expression IDENT [ LIT ])) < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT))) )) (argument_list ( )))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) & LIT) )) == LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT ))) ;) (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) }))) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (subscript_expression IDENT [ LIT ]))) )) (argument_list ( IDENT , IDENT , IDENT ))) ;) (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (do_statement do (compound_statement { (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (subscript_expression IDENT [ LIT ]))) )) (argument_list ( IDENT , (binary_expression IDENT + IDENT) ))) ;) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (subscript_expression IDENT [ LIT ]))) )) (argument_list ( IDENT )))) ;) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (subscript_expression IDENT [ LIT ]))) )) (argument_list ( IDENT , (binary_expression IDENT + IDENT) ))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + (subscript_expression IDENT [ LIT ]))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT - (subscript_expression IDENT [ LIT ]))) ;) }) while (parenthesized_expression ( (binary_expression IDENT < IDENT) )) ;) })) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (subscript_expression IDENT [ LIT ]))) )) (argument_list ( IDENT ))) ;) })) (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (binary_expression (pointer_expression & IDENT) + IDENT) , (binary_expression IDENT + LIT) ))) ;) (return_statement return IDENT ;) })) (return_statement return IDENT ;) })))
(function_definition "int FUN_0004a6e0(int param_1,undefined4 param_2,undefined4 param_3)\n\n{\n  undefined *puVar1;\n  int iVar2;\n  int iVar3;\n  int iVar4;\n  undefined4 uVar5;\n  undefined4 uVar6;\n  int iVar7;\n  undefined4 *puVar8;\n  code *pcVar9;\n  undefined1 auStack_24 [4];\n  undefined1 local_18 [4];\n  int local_14;\n  \n  puVar1 = PTR___stack_chk_guard_00112630;\n  local_14 = *(int *)PTR___stack_chk_guard_00112630;\n  iVar2 = FUN_0004807c(param_3,local_18);\n  iVar7 = iVar2;\n  FUN_0004a62c(param_1 + 8,param_2,iVar2);\n  safefree();\n  if (local_14 == *(int *)puVar1) {\n    return *(int *)puVar1;\n  }\n  (*(code *)PTR___stack_chk_fail_001122c8)();\n  puVar8 = *(undefined4 **)(*(int *)(iVar2 + 0x98) + 0xc);\n  iVar3 = puVar8[5];\n  if (iVar3 == 0) {\n    trap(7);\n  }\n  iVar3 = ((iVar3 + 0x1192af) / iVar3) * iVar3;\n  iVar4 = safemalloc(iVar3,1);\n  uVar5 = (*(code *)*puVar8)();\n  if ((*(uint *)(iVar2 + 0x50) & 0x20) == 0) {\n    FUN_0004a6e0(puVar8,uVar5,param_2);\n    pcVar9 = (code *)puVar8[2];\n  }\n  else {\n    pcVar9 = (code *)puVar8[2];\n  }\n  (*pcVar9)(uVar5,iVar7,puVar8[5]);\n  (*(code *)puVar8[2])(uVar5,auStack_24,1);\n  (*(code *)puVar8[2])(uVar5,iVar2 + 0xa4,*(undefined4 *)(iVar2 + 0xe4));\n  (*(code *)puVar8[3])(uVar5,iVar4);\n  if ((int)puVar8[5] < iVar3) {\n    uVar5 = (*(code *)*puVar8)();\n    if ((*(uint *)(iVar2 + 0x50) & 0x20) == 0) {\n      FUN_0004a6e0(puVar8,uVar5,param_2);\n      uVar6 = puVar8[5];\n    }\n    else {\n      uVar6 = puVar8[5];\n    }\n    (*(code *)puVar8[2])(uVar5,iVar7,uVar6);\n    iVar7 = puVar8[5];\n    if (iVar7 < iVar3) {\n      iVar2 = 0;\n      do {\n        (*(code *)puVar8[2])(uVar5,iVar4 + iVar2);\n        uVar6 = (*(code *)puVar8[1])(uVar5);\n        (*(code *)puVar8[3])(uVar6,iVar4 + iVar7);\n        iVar7 = iVar7 + puVar8[5];\n        iVar2 = iVar7 - puVar8[5];\n      } while (iVar7 < iVar3);\n    }\n    (*(code *)puVar8[4])(uVar5);\n  }\n  if (0x1192b0 < iVar3) {\n    smemclr(&_gp_1 + iVar4,iVar3 + -0x1192b0);\n    return iVar4;\n  }\n  return iVar4;\n}" (primitive_type "int") (function_declarator "FUN_0004a6e0(int param_1,undefined4 param_2,undefined4 param_3)" (identifier "FUN_0004a6e0") (parameter_list "(int param_1,undefined4 param_2,undefined4 param_3)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "undefined4 param_2" (type_identifier "undefined4") (identifier "param_2")) (, ",") (parameter_declaration "undefined4 param_3" (type_identifier "undefined4") (identifier "param_3")) () ")"))) (compound_statement "{\n  undefined *puVar1;\n  int iVar2;\n  int iVar3;\n  int iVar4;\n  undefined4 uVar5;\n  undefined4 uVar6;\n  int iVar7;\n  undefined4 *puVar8;\n  code *pcVar9;\n  undefined1 auStack_24 [4];\n  undefined1 local_18 [4];\n  int local_14;\n  \n  puVar1 = PTR___stack_chk_guard_00112630;\n  local_14 = *(int *)PTR___stack_chk_guard_00112630;\n  iVar2 = FUN_0004807c(param_3,local_18);\n  iVar7 = iVar2;\n  FUN_0004a62c(param_1 + 8,param_2,iVar2);\n  safefree();\n  if (local_14 == *(int *)puVar1) {\n    return *(int *)puVar1;\n  }\n  (*(code *)PTR___stack_chk_fail_001122c8)();\n  puVar8 = *(undefined4 **)(*(int *)(iVar2 + 0x98) + 0xc);\n  iVar3 = puVar8[5];\n  if (iVar3 == 0) {\n    trap(7);\n  }\n  iVar3 = ((iVar3 + 0x1192af) / iVar3) * iVar3;\n  iVar4 = safemalloc(iVar3,1);\n  uVar5 = (*(code *)*puVar8)();\n  if ((*(uint *)(iVar2 + 0x50) & 0x20) == 0) {\n    FUN_0004a6e0(puVar8,uVar5,param_2);\n    pcVar9 = (code *)puVar8[2];\n  }\n  else {\n    pcVar9 = (code *)puVar8[2];\n  }\n  (*pcVar9)(uVar5,iVar7,puVar8[5]);\n  (*(code *)puVar8[2])(uVar5,auStack_24,1);\n  (*(code *)puVar8[2])(uVar5,iVar2 + 0xa4,*(undefined4 *)(iVar2 + 0xe4));\n  (*(code *)puVar8[3])(uVar5,iVar4);\n  if ((int)puVar8[5] < iVar3) {\n    uVar5 = (*(code *)*puVar8)();\n    if ((*(uint *)(iVar2 + 0x50) & 0x20) == 0) {\n      FUN_0004a6e0(puVar8,uVar5,param_2);\n      uVar6 = puVar8[5];\n    }\n    else {\n      uVar6 = puVar8[5];\n    }\n    (*(code *)puVar8[2])(uVar5,iVar7,uVar6);\n    iVar7 = puVar8[5];\n    if (iVar7 < iVar3) {\n      iVar2 = 0;\n      do {\n        (*(code *)puVar8[2])(uVar5,iVar4 + iVar2);\n        uVar6 = (*(code *)puVar8[1])(uVar5);\n        (*(code *)puVar8[3])(uVar6,iVar4 + iVar7);\n        iVar7 = iVar7 + puVar8[5];\n        iVar2 = iVar7 - puVar8[5];\n      } while (iVar7 < iVar3);\n    }\n    (*(code *)puVar8[4])(uVar5);\n  }\n  if (0x1192b0 < iVar3) {\n    smemclr(&_gp_1 + iVar4,iVar3 + -0x1192b0);\n    return iVar4;\n  }\n  return iVar4;\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 "int iVar4;" (primitive_type "int") (identifier "iVar4") (; ";")) (declaration "undefined4 uVar5;" (type_identifier "undefined4") (identifier "uVar5") (; ";")) (declaration "undefined4 uVar6;" (type_identifier "undefined4") (identifier "uVar6") (; ";")) (declaration "int iVar7;" (primitive_type "int") (identifier "iVar7") (; ";")) (declaration "undefined4 *puVar8;" (type_identifier "undefined4") (pointer_declarator "*puVar8" (* "*") (identifier "puVar8")) (; ";")) (declaration "code *pcVar9;" (type_identifier "code") (pointer_declarator "*pcVar9" (* "*") (identifier "pcVar9")) (; ";")) (declaration "undefined1 auStack_24 [4];" (type_identifier "undefined1") (array_declarator "auStack_24 [4]" (identifier "auStack_24") ([ "[") (number_literal "4") (] "]")) (; ";")) (declaration "undefined1 local_18 [4];" (type_identifier "undefined1") (array_declarator "local_18 [4]" (identifier "local_18") ([ "[") (number_literal "4") (] "]")) (; ";")) (declaration "int local_14;" (primitive_type "int") (identifier "local_14") (; ";")) (expression_statement "puVar1 = PTR___stack_chk_guard_00112630;" (assignment_expression "puVar1 = PTR___stack_chk_guard_00112630" (identifier "puVar1") (= "=") (identifier "PTR___stack_chk_guard_00112630")) (; ";")) (expression_statement "local_14 = *(int *)PTR___stack_chk_guard_00112630;" (assignment_expression "local_14 = *(int *)PTR___stack_chk_guard_00112630" (identifier "local_14") (= "=") (pointer_expression "*(int *)PTR___stack_chk_guard_00112630" (* "*") (cast_expression "(int *)PTR___stack_chk_guard_00112630" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR___stack_chk_guard_00112630")))) (; ";")) (expression_statement "iVar2 = FUN_0004807c(param_3,local_18);" (assignment_expression "iVar2 = FUN_0004807c(param_3,local_18)" (identifier "iVar2") (= "=") (call_expression "FUN_0004807c(param_3,local_18)" (identifier "FUN_0004807c") (argument_list "(param_3,local_18)" (( "(") (identifier "param_3") (, ",") (identifier "local_18") () ")")))) (; ";")) (expression_statement "iVar7 = iVar2;" (assignment_expression "iVar7 = iVar2" (identifier "iVar7") (= "=") (identifier "iVar2")) (; ";")) (expression_statement "FUN_0004a62c(param_1 + 8,param_2,iVar2);" (call_expression "FUN_0004a62c(param_1 + 8,param_2,iVar2)" (identifier "FUN_0004a62c") (argument_list "(param_1 + 8,param_2,iVar2)" (( "(") (binary_expression "param_1 + 8" (identifier "param_1") (+ "+") (number_literal "8")) (, ",") (identifier "param_2") (, ",") (identifier "iVar2") () ")"))) (; ";")) (expression_statement "safefree();" (call_expression "safefree()" (identifier "safefree") (argument_list "()" (( "(") () ")"))) (; ";")) (if_statement "if (local_14 == *(int *)puVar1) {\n    return *(int *)puVar1;\n  }" (if "if") (parenthesized_expression "(local_14 == *(int *)puVar1)" (( "(") (binary_expression "local_14 == *(int *)puVar1" (identifier "local_14") (== "==") (pointer_expression "*(int *)puVar1" (* "*") (cast_expression "(int *)puVar1" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "puVar1")))) () ")")) (compound_statement "{\n    return *(int *)puVar1;\n  }" ({ "{") (return_statement "return *(int *)puVar1;" (return "return") (pointer_expression "*(int *)puVar1" (* "*") (cast_expression "(int *)puVar1" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "puVar1"))) (; ";")) (} "}"))) (expression_statement "(*(code *)PTR___stack_chk_fail_001122c8)();" (call_expression "(*(code *)PTR___stack_chk_fail_001122c8)()" (parenthesized_expression "(*(code *)PTR___stack_chk_fail_001122c8)" (( "(") (pointer_expression "*(code *)PTR___stack_chk_fail_001122c8" (* "*") (cast_expression "(code *)PTR___stack_chk_fail_001122c8" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR___stack_chk_fail_001122c8"))) () ")")) (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "puVar8 = *(undefined4 **)(*(int *)(iVar2 + 0x98) + 0xc);" (assignment_expression "puVar8 = *(undefined4 **)(*(int *)(iVar2 + 0x98) + 0xc)" (identifier "puVar8") (= "=") (pointer_expression "*(undefined4 **)(*(int *)(iVar2 + 0x98) + 0xc)" (* "*") (cast_expression "(undefined4 **)(*(int *)(iVar2 + 0x98) + 0xc)" (( "(") (type_descriptor "undefined4 **" (type_identifier "undefined4") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(*(int *)(iVar2 + 0x98) + 0xc)" (( "(") (binary_expression "*(int *)(iVar2 + 0x98) + 0xc" (pointer_expression "*(int *)(iVar2 + 0x98)" (* "*") (cast_expression "(int *)(iVar2 + 0x98)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar2 + 0x98)" (( "(") (binary_expression "iVar2 + 0x98" (identifier "iVar2") (+ "+") (number_literal "0x98")) () ")")))) (+ "+") (number_literal "0xc")) () ")"))))) (; ";")) (expression_statement "iVar3 = puVar8[5];" (assignment_expression "iVar3 = puVar8[5]" (identifier "iVar3") (= "=") (subscript_expression "puVar8[5]" (identifier "puVar8") ([ "[") (number_literal "5") (] "]"))) (; ";")) (if_statement "if (iVar3 == 0) {\n    trap(7);\n  }" (if "if") (parenthesized_expression "(iVar3 == 0)" (( "(") (binary_expression "iVar3 == 0" (identifier "iVar3") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    trap(7);\n  }" ({ "{") (expression_statement "trap(7);" (call_expression "trap(7)" (identifier "trap") (argument_list "(7)" (( "(") (number_literal "7") () ")"))) (; ";")) (} "}"))) (expression_statement "iVar3 = ((iVar3 + 0x1192af) / iVar3) * iVar3;" (assignment_expression "iVar3 = ((iVar3 + 0x1192af) / iVar3) * iVar3" (identifier "iVar3") (= "=") (binary_expression "((iVar3 + 0x1192af) / iVar3) * iVar3" (parenthesized_expression "((iVar3 + 0x1192af) / iVar3)" (( "(") (binary_expression "(iVar3 + 0x1192af) / iVar3" (parenthesized_expression "(iVar3 + 0x1192af)" (( "(") (binary_expression "iVar3 + 0x1192af" (identifier "iVar3") (+ "+") (number_literal "0x1192af")) () ")")) (/ "/") (identifier "iVar3")) () ")")) (* "*") (identifier "iVar3"))) (; ";")) (expression_statement "iVar4 = safemalloc(iVar3,1);" (assignment_expression "iVar4 = safemalloc(iVar3,1)" (identifier "iVar4") (= "=") (call_expression "safemalloc(iVar3,1)" (identifier "safemalloc") (argument_list "(iVar3,1)" (( "(") (identifier "iVar3") (, ",") (number_literal "1") () ")")))) (; ";")) (expression_statement "uVar5 = (*(code *)*puVar8)();" (assignment_expression "uVar5 = (*(code *)*puVar8)()" (identifier "uVar5") (= "=") (call_expression "(*(code *)*puVar8)()" (parenthesized_expression "(*(code *)*puVar8)" (( "(") (pointer_expression "*(code *)*puVar8" (* "*") (cast_expression "(code *)*puVar8" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*puVar8" (* "*") (identifier "puVar8")))) () ")")) (argument_list "()" (( "(") () ")")))) (; ";")) (if_statement "if ((*(uint *)(iVar2 + 0x50) & 0x20) == 0) {\n    FUN_0004a6e0(puVar8,uVar5,param_2);\n    pcVar9 = (code *)puVar8[2];\n  }\n  else {\n    pcVar9 = (code *)puVar8[2];\n  }" (if "if") (parenthesized_expression "((*(uint *)(iVar2 + 0x50) & 0x20) == 0)" (( "(") (binary_expression "(*(uint *)(iVar2 + 0x50) & 0x20) == 0" (parenthesized_expression "(*(uint *)(iVar2 + 0x50) & 0x20)" (( "(") (binary_expression "*(uint *)(iVar2 + 0x50) & 0x20" (pointer_expression "*(uint *)(iVar2 + 0x50)" (* "*") (cast_expression "(uint *)(iVar2 + 0x50)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar2 + 0x50)" (( "(") (binary_expression "iVar2 + 0x50" (identifier "iVar2") (+ "+") (number_literal "0x50")) () ")")))) (& "&") (number_literal "0x20")) () ")")) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    FUN_0004a6e0(puVar8,uVar5,param_2);\n    pcVar9 = (code *)puVar8[2];\n  }" ({ "{") (expression_statement "FUN_0004a6e0(puVar8,uVar5,param_2);" (call_expression "FUN_0004a6e0(puVar8,uVar5,param_2)" (identifier "FUN_0004a6e0") (argument_list "(puVar8,uVar5,param_2)" (( "(") (identifier "puVar8") (, ",") (identifier "uVar5") (, ",") (identifier "param_2") () ")"))) (; ";")) (expression_statement "pcVar9 = (code *)puVar8[2];" (assignment_expression "pcVar9 = (code *)puVar8[2]" (identifier "pcVar9") (= "=") (cast_expression "(code *)puVar8[2]" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "puVar8[2]" (identifier "puVar8") ([ "[") (number_literal "2") (] "]")))) (; ";")) (} "}")) (else_clause "else {\n    pcVar9 = (code *)puVar8[2];\n  }" (else "else") (compound_statement "{\n    pcVar9 = (code *)puVar8[2];\n  }" ({ "{") (expression_statement "pcVar9 = (code *)puVar8[2];" (assignment_expression "pcVar9 = (code *)puVar8[2]" (identifier "pcVar9") (= "=") (cast_expression "(code *)puVar8[2]" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "puVar8[2]" (identifier "puVar8") ([ "[") (number_literal "2") (] "]")))) (; ";")) (} "}")))) (expression_statement "(*pcVar9)(uVar5,iVar7,puVar8[5]);" (call_expression "(*pcVar9)(uVar5,iVar7,puVar8[5])" (parenthesized_expression "(*pcVar9)" (( "(") (pointer_expression "*pcVar9" (* "*") (identifier "pcVar9")) () ")")) (argument_list "(uVar5,iVar7,puVar8[5])" (( "(") (identifier "uVar5") (, ",") (identifier "iVar7") (, ",") (subscript_expression "puVar8[5]" (identifier "puVar8") ([ "[") (number_literal "5") (] "]")) () ")"))) (; ";")) (expression_statement "(*(code *)puVar8[2])(uVar5,auStack_24,1);" (call_expression "(*(code *)puVar8[2])(uVar5,auStack_24,1)" (parenthesized_expression "(*(code *)puVar8[2])" (( "(") (pointer_expression "*(code *)puVar8[2]" (* "*") (cast_expression "(code *)puVar8[2]" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "puVar8[2]" (identifier "puVar8") ([ "[") (number_literal "2") (] "]")))) () ")")) (argument_list "(uVar5,auStack_24,1)" (( "(") (identifier "uVar5") (, ",") (identifier "auStack_24") (, ",") (number_literal "1") () ")"))) (; ";")) (expression_statement "(*(code *)puVar8[2])(uVar5,iVar2 + 0xa4,*(undefined4 *)(iVar2 + 0xe4));" (call_expression "(*(code *)puVar8[2])(uVar5,iVar2 + 0xa4,*(undefined4 *)(iVar2 + 0xe4))" (parenthesized_expression "(*(code *)puVar8[2])" (( "(") (pointer_expression "*(code *)puVar8[2]" (* "*") (cast_expression "(code *)puVar8[2]" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "puVar8[2]" (identifier "puVar8") ([ "[") (number_literal "2") (] "]")))) () ")")) (argument_list "(uVar5,iVar2 + 0xa4,*(undefined4 *)(iVar2 + 0xe4))" (( "(") (identifier "uVar5") (, ",") (binary_expression "iVar2 + 0xa4" (identifier "iVar2") (+ "+") (number_literal "0xa4")) (, ",") (pointer_expression "*(undefined4 *)(iVar2 + 0xe4)" (* "*") (cast_expression "(undefined4 *)(iVar2 + 0xe4)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar2 + 0xe4)" (( "(") (binary_expression "iVar2 + 0xe4" (identifier "iVar2") (+ "+") (number_literal "0xe4")) () ")")))) () ")"))) (; ";")) (expression_statement "(*(code *)puVar8[3])(uVar5,iVar4);" (call_expression "(*(code *)puVar8[3])(uVar5,iVar4)" (parenthesized_expression "(*(code *)puVar8[3])" (( "(") (pointer_expression "*(code *)puVar8[3]" (* "*") (cast_expression "(code *)puVar8[3]" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "puVar8[3]" (identifier "puVar8") ([ "[") (number_literal "3") (] "]")))) () ")")) (argument_list "(uVar5,iVar4)" (( "(") (identifier "uVar5") (, ",") (identifier "iVar4") () ")"))) (; ";")) (if_statement "if ((int)puVar8[5] < iVar3) {\n    uVar5 = (*(code *)*puVar8)();\n    if ((*(uint *)(iVar2 + 0x50) & 0x20) == 0) {\n      FUN_0004a6e0(puVar8,uVar5,param_2);\n      uVar6 = puVar8[5];\n    }\n    else {\n      uVar6 = puVar8[5];\n    }\n    (*(code *)puVar8[2])(uVar5,iVar7,uVar6);\n    iVar7 = puVar8[5];\n    if (iVar7 < iVar3) {\n      iVar2 = 0;\n      do {\n        (*(code *)puVar8[2])(uVar5,iVar4 + iVar2);\n        uVar6 = (*(code *)puVar8[1])(uVar5);\n        (*(code *)puVar8[3])(uVar6,iVar4 + iVar7);\n        iVar7 = iVar7 + puVar8[5];\n        iVar2 = iVar7 - puVar8[5];\n      } while (iVar7 < iVar3);\n    }\n    (*(code *)puVar8[4])(uVar5);\n  }" (if "if") (parenthesized_expression "((int)puVar8[5] < iVar3)" (( "(") (binary_expression "(int)puVar8[5] < iVar3" (cast_expression "(int)puVar8[5]" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (subscript_expression "puVar8[5]" (identifier "puVar8") ([ "[") (number_literal "5") (] "]"))) (< "<") (identifier "iVar3")) () ")")) (compound_statement "{\n    uVar5 = (*(code *)*puVar8)();\n    if ((*(uint *)(iVar2 + 0x50) & 0x20) == 0) {\n      FUN_0004a6e0(puVar8,uVar5,param_2);\n      uVar6 = puVar8[5];\n    }\n    else {\n      uVar6 = puVar8[5];\n    }\n    (*(code *)puVar8[2])(uVar5,iVar7,uVar6);\n    iVar7 = puVar8[5];\n    if (iVar7 < iVar3) {\n      iVar2 = 0;\n      do {\n        (*(code *)puVar8[2])(uVar5,iVar4 + iVar2);\n        uVar6 = (*(code *)puVar8[1])(uVar5);\n        (*(code *)puVar8[3])(uVar6,iVar4 + iVar7);\n        iVar7 = iVar7 + puVar8[5];\n        iVar2 = iVar7 - puVar8[5];\n      } while (iVar7 < iVar3);\n    }\n    (*(code *)puVar8[4])(uVar5);\n  }" ({ "{") (expression_statement "uVar5 = (*(code *)*puVar8)();" (assignment_expression "uVar5 = (*(code *)*puVar8)()" (identifier "uVar5") (= "=") (call_expression "(*(code *)*puVar8)()" (parenthesized_expression "(*(code *)*puVar8)" (( "(") (pointer_expression "*(code *)*puVar8" (* "*") (cast_expression "(code *)*puVar8" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*puVar8" (* "*") (identifier "puVar8")))) () ")")) (argument_list "()" (( "(") () ")")))) (; ";")) (if_statement "if ((*(uint *)(iVar2 + 0x50) & 0x20) == 0) {\n      FUN_0004a6e0(puVar8,uVar5,param_2);\n      uVar6 = puVar8[5];\n    }\n    else {\n      uVar6 = puVar8[5];\n    }" (if "if") (parenthesized_expression "((*(uint *)(iVar2 + 0x50) & 0x20) == 0)" (( "(") (binary_expression "(*(uint *)(iVar2 + 0x50) & 0x20) == 0" (parenthesized_expression "(*(uint *)(iVar2 + 0x50) & 0x20)" (( "(") (binary_expression "*(uint *)(iVar2 + 0x50) & 0x20" (pointer_expression "*(uint *)(iVar2 + 0x50)" (* "*") (cast_expression "(uint *)(iVar2 + 0x50)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar2 + 0x50)" (( "(") (binary_expression "iVar2 + 0x50" (identifier "iVar2") (+ "+") (number_literal "0x50")) () ")")))) (& "&") (number_literal "0x20")) () ")")) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      FUN_0004a6e0(puVar8,uVar5,param_2);\n      uVar6 = puVar8[5];\n    }" ({ "{") (expression_statement "FUN_0004a6e0(puVar8,uVar5,param_2);" (call_expression "FUN_0004a6e0(puVar8,uVar5,param_2)" (identifier "FUN_0004a6e0") (argument_list "(puVar8,uVar5,param_2)" (( "(") (identifier "puVar8") (, ",") (identifier "uVar5") (, ",") (identifier "param_2") () ")"))) (; ";")) (expression_statement "uVar6 = puVar8[5];" (assignment_expression "uVar6 = puVar8[5]" (identifier "uVar6") (= "=") (subscript_expression "puVar8[5]" (identifier "puVar8") ([ "[") (number_literal "5") (] "]"))) (; ";")) (} "}")) (else_clause "else {\n      uVar6 = puVar8[5];\n    }" (else "else") (compound_statement "{\n      uVar6 = puVar8[5];\n    }" ({ "{") (expression_statement "uVar6 = puVar8[5];" (assignment_expression "uVar6 = puVar8[5]" (identifier "uVar6") (= "=") (subscript_expression "puVar8[5]" (identifier "puVar8") ([ "[") (number_literal "5") (] "]"))) (; ";")) (} "}")))) (expression_statement "(*(code *)puVar8[2])(uVar5,iVar7,uVar6);" (call_expression "(*(code *)puVar8[2])(uVar5,iVar7,uVar6)" (parenthesized_expression "(*(code *)puVar8[2])" (( "(") (pointer_expression "*(code *)puVar8[2]" (* "*") (cast_expression "(code *)puVar8[2]" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "puVar8[2]" (identifier "puVar8") ([ "[") (number_literal "2") (] "]")))) () ")")) (argument_list "(uVar5,iVar7,uVar6)" (( "(") (identifier "uVar5") (, ",") (identifier "iVar7") (, ",") (identifier "uVar6") () ")"))) (; ";")) (expression_statement "iVar7 = puVar8[5];" (assignment_expression "iVar7 = puVar8[5]" (identifier "iVar7") (= "=") (subscript_expression "puVar8[5]" (identifier "puVar8") ([ "[") (number_literal "5") (] "]"))) (; ";")) (if_statement "if (iVar7 < iVar3) {\n      iVar2 = 0;\n      do {\n        (*(code *)puVar8[2])(uVar5,iVar4 + iVar2);\n        uVar6 = (*(code *)puVar8[1])(uVar5);\n        (*(code *)puVar8[3])(uVar6,iVar4 + iVar7);\n        iVar7 = iVar7 + puVar8[5];\n        iVar2 = iVar7 - puVar8[5];\n      } while (iVar7 < iVar3);\n    }" (if "if") (parenthesized_expression "(iVar7 < iVar3)" (( "(") (binary_expression "iVar7 < iVar3" (identifier "iVar7") (< "<") (identifier "iVar3")) () ")")) (compound_statement "{\n      iVar2 = 0;\n      do {\n        (*(code *)puVar8[2])(uVar5,iVar4 + iVar2);\n        uVar6 = (*(code *)puVar8[1])(uVar5);\n        (*(code *)puVar8[3])(uVar6,iVar4 + iVar7);\n        iVar7 = iVar7 + puVar8[5];\n        iVar2 = iVar7 - puVar8[5];\n      } while (iVar7 < iVar3);\n    }" ({ "{") (expression_statement "iVar2 = 0;" (assignment_expression "iVar2 = 0" (identifier "iVar2") (= "=") (number_literal "0")) (; ";")) (do_statement "do {\n        (*(code *)puVar8[2])(uVar5,iVar4 + iVar2);\n        uVar6 = (*(code *)puVar8[1])(uVar5);\n        (*(code *)puVar8[3])(uVar6,iVar4 + iVar7);\n        iVar7 = iVar7 + puVar8[5];\n        iVar2 = iVar7 - puVar8[5];\n      } while (iVar7 < iVar3);" (do "do") (compound_statement "{\n        (*(code *)puVar8[2])(uVar5,iVar4 + iVar2);\n        uVar6 = (*(code *)puVar8[1])(uVar5);\n        (*(code *)puVar8[3])(uVar6,iVar4 + iVar7);\n        iVar7 = iVar7 + puVar8[5];\n        iVar2 = iVar7 - puVar8[5];\n      }" ({ "{") (expression_statement "(*(code *)puVar8[2])(uVar5,iVar4 + iVar2);" (call_expression "(*(code *)puVar8[2])(uVar5,iVar4 + iVar2)" (parenthesized_expression "(*(code *)puVar8[2])" (( "(") (pointer_expression "*(code *)puVar8[2]" (* "*") (cast_expression "(code *)puVar8[2]" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "puVar8[2]" (identifier "puVar8") ([ "[") (number_literal "2") (] "]")))) () ")")) (argument_list "(uVar5,iVar4 + iVar2)" (( "(") (identifier "uVar5") (, ",") (binary_expression "iVar4 + iVar2" (identifier "iVar4") (+ "+") (identifier "iVar2")) () ")"))) (; ";")) (expression_statement "uVar6 = (*(code *)puVar8[1])(uVar5);" (assignment_expression "uVar6 = (*(code *)puVar8[1])(uVar5)" (identifier "uVar6") (= "=") (call_expression "(*(code *)puVar8[1])(uVar5)" (parenthesized_expression "(*(code *)puVar8[1])" (( "(") (pointer_expression "*(code *)puVar8[1]" (* "*") (cast_expression "(code *)puVar8[1]" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "puVar8[1]" (identifier "puVar8") ([ "[") (number_literal "1") (] "]")))) () ")")) (argument_list "(uVar5)" (( "(") (identifier "uVar5") () ")")))) (; ";")) (expression_statement "(*(code *)puVar8[3])(uVar6,iVar4 + iVar7);" (call_expression "(*(code *)puVar8[3])(uVar6,iVar4 + iVar7)" (parenthesized_expression "(*(code *)puVar8[3])" (( "(") (pointer_expression "*(code *)puVar8[3]" (* "*") (cast_expression "(code *)puVar8[3]" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "puVar8[3]" (identifier "puVar8") ([ "[") (number_literal "3") (] "]")))) () ")")) (argument_list "(uVar6,iVar4 + iVar7)" (( "(") (identifier "uVar6") (, ",") (binary_expression "iVar4 + iVar7" (identifier "iVar4") (+ "+") (identifier "iVar7")) () ")"))) (; ";")) (expression_statement "iVar7 = iVar7 + puVar8[5];" (assignment_expression "iVar7 = iVar7 + puVar8[5]" (identifier "iVar7") (= "=") (binary_expression "iVar7 + puVar8[5]" (identifier "iVar7") (+ "+") (subscript_expression "puVar8[5]" (identifier "puVar8") ([ "[") (number_literal "5") (] "]")))) (; ";")) (expression_statement "iVar2 = iVar7 - puVar8[5];" (assignment_expression "iVar2 = iVar7 - puVar8[5]" (identifier "iVar2") (= "=") (binary_expression "iVar7 - puVar8[5]" (identifier "iVar7") (- "-") (subscript_expression "puVar8[5]" (identifier "puVar8") ([ "[") (number_literal "5") (] "]")))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(iVar7 < iVar3)" (( "(") (binary_expression "iVar7 < iVar3" (identifier "iVar7") (< "<") (identifier "iVar3")) () ")")) (; ";")) (} "}"))) (expression_statement "(*(code *)puVar8[4])(uVar5);" (call_expression "(*(code *)puVar8[4])(uVar5)" (parenthesized_expression "(*(code *)puVar8[4])" (( "(") (pointer_expression "*(code *)puVar8[4]" (* "*") (cast_expression "(code *)puVar8[4]" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "puVar8[4]" (identifier "puVar8") ([ "[") (number_literal "4") (] "]")))) () ")")) (argument_list "(uVar5)" (( "(") (identifier "uVar5") () ")"))) (; ";")) (} "}"))) (if_statement "if (0x1192b0 < iVar3) {\n    smemclr(&_gp_1 + iVar4,iVar3 + -0x1192b0);\n    return iVar4;\n  }" (if "if") (parenthesized_expression "(0x1192b0 < iVar3)" (( "(") (binary_expression "0x1192b0 < iVar3" (number_literal "0x1192b0") (< "<") (identifier "iVar3")) () ")")) (compound_statement "{\n    smemclr(&_gp_1 + iVar4,iVar3 + -0x1192b0);\n    return iVar4;\n  }" ({ "{") (expression_statement "smemclr(&_gp_1 + iVar4,iVar3 + -0x1192b0);" (call_expression "smemclr(&_gp_1 + iVar4,iVar3 + -0x1192b0)" (identifier "smemclr") (argument_list "(&_gp_1 + iVar4,iVar3 + -0x1192b0)" (( "(") (binary_expression "&_gp_1 + iVar4" (pointer_expression "&_gp_1" (& "&") (identifier "_gp_1")) (+ "+") (identifier "iVar4")) (, ",") (binary_expression "iVar3 + -0x1192b0" (identifier "iVar3") (+ "+") (number_literal "-0x1192b0")) () ")"))) (; ";")) (return_statement "return iVar4;" (return "return") (identifier "iVar4") (; ";")) (} "}"))) (return_statement "return iVar4;" (return "return") (identifier "iVar4") (; ";")) (} "}")))

void function_1(type_1 *h,void *s,type_2 b)

{
  type_3 *str;
  int len;
  type_4 local_14;
  
  local_14 = *(type_4 *)PTR___stack_chk_guard_00112630;
  str = var_1(b,&len);
  var_2((type_1 *)&h->bytes,s,str,len);
                    /* WARNING: Subroutine does not return */
  var_3(str);
}


(translation_unit (function_definition type: (primitive_type) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (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: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (array_declarator declarator: (identifier) size: (number_literal))) (declaration type: (type_identifier) declarator: (array_declarator declarator: (identifier) size: (number_literal))) (declaration type: (primitive_type) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (number_literal)) (identifier) (identifier)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (identifier))))) consequence: (compound_statement (return_statement (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (identifier)))))) (expression_statement (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list))) (expression_statement (assignment_expression left: (identifier) right: (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: (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))))))) (expression_statement (assignment_expression left: (identifier) right: (subscript_expression argument: (identifier) index: (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (number_literal)))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (identifier))) right: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (number_literal))))) (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: (pointer_expression argument: (identifier))))) arguments: (argument_list)))) (if_statement condition: (parenthesized_expression (binary_expression left: (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))) right: (number_literal))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier) (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (subscript_expression argument: (identifier) index: (number_literal)))))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (subscript_expression argument: (identifier) index: (number_literal)))))))) (expression_statement (call_expression function: (parenthesized_expression (pointer_expression argument: (identifier))) arguments: (argument_list (identifier) (identifier) (subscript_expression argument: (identifier) index: (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: (subscript_expression argument: (identifier) index: (number_literal))))) arguments: (argument_list (identifier) (identifier) (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: (subscript_expression argument: (identifier) index: (number_literal))))) arguments: (argument_list (identifier) (binary_expression left: (identifier) right: (number_literal)) (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)))))))) (expression_statement (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (subscript_expression argument: (identifier) index: (number_literal))))) arguments: (argument_list (identifier) (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (subscript_expression argument: (identifier) index: (number_literal))) right: (identifier))) 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: (pointer_expression argument: (identifier))))) arguments: (argument_list)))) (if_statement condition: (parenthesized_expression (binary_expression left: (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))) right: (number_literal))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier) (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (subscript_expression argument: (identifier) index: (number_literal))))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (identifier) right: (subscript_expression argument: (identifier) index: (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: (subscript_expression argument: (identifier) index: (number_literal))))) arguments: (argument_list (identifier) (identifier) (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (subscript_expression argument: (identifier) index: (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (do_statement body: (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: (subscript_expression argument: (identifier) index: (number_literal))))) arguments: (argument_list (identifier) (binary_expression left: (identifier) 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: (subscript_expression argument: (identifier) index: (number_literal))))) arguments: (argument_list (identifier))))) (expression_statement (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (subscript_expression argument: (identifier) index: (number_literal))))) arguments: (argument_list (identifier) (binary_expression left: (identifier) right: (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (subscript_expression argument: (identifier) index: (number_literal))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (subscript_expression argument: (identifier) index: (number_literal)))))) condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier)))))) (expression_statement (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (subscript_expression argument: (identifier) index: (number_literal))))) arguments: (argument_list (identifier)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (number_literal) right: (identifier))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (binary_expression left: (pointer_expression argument: (identifier)) right: (identifier)) (binary_expression left: (identifier) right: (number_literal))))) (return_statement (identifier)))) (return_statement (identifier)))))

/* WARNING: Removing unreachable block (ram,0x0004a9c8) */

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

{
  undefined *puVar1;
  int iVar2;
  int iVar3;
  int iVar4;
  undefined4 uVar5;
  undefined4 uVar6;
  int iVar7;
  undefined4 *puVar8;
  code *pcVar9;
  undefined1 auStack_24 [4];
  undefined1 local_18 [4];
  int local_14;
  
  puVar1 = PTR___stack_chk_guard_00112630;
  local_14 = *(int *)PTR___stack_chk_guard_00112630;
  iVar2 = FUN_0004807c(param_3,local_18);
  iVar7 = iVar2;
  FUN_0004a62c(param_1 + 8,param_2,iVar2);
  safefree();
  if (local_14 == *(int *)puVar1) {
    return *(int *)puVar1;
  }
  (*(code *)PTR___stack_chk_fail_001122c8)();
  puVar8 = *(undefined4 **)(*(int *)(iVar2 + 0x98) + 0xc);
  iVar3 = puVar8[5];
  if (iVar3 == 0) {
    trap(7);
  }
  iVar3 = ((iVar3 + 0x1192af) / iVar3) * iVar3;
  iVar4 = safemalloc(iVar3,1);
  uVar5 = (*(code *)*puVar8)();
  if ((*(uint *)(iVar2 + 0x50) & 0x20) == 0) {
    MASKED(puVar8,uVar5,param_2);
    pcVar9 = (code *)puVar8[2];
  }
  else {
    pcVar9 = (code *)puVar8[2];
  }
  (*pcVar9)(uVar5,iVar7,puVar8[5]);
  (*(code *)puVar8[2])(uVar5,auStack_24,1);
  (*(code *)puVar8[2])(uVar5,iVar2 + 0xa4,*(undefined4 *)(iVar2 + 0xe4));
  (*(code *)puVar8[3])(uVar5,iVar4);
  if ((int)puVar8[5] < iVar3) {
    uVar5 = (*(code *)*puVar8)();
    if ((*(uint *)(iVar2 + 0x50) & 0x20) == 0) {
      MASKED(puVar8,uVar5,param_2);
      uVar6 = puVar8[5];
    }
    else {
      uVar6 = puVar8[5];
    }
    (*(code *)puVar8[2])(uVar5,iVar7,uVar6);
    iVar7 = puVar8[5];
    if (iVar7 < iVar3) {
      iVar2 = 0;
      do {
        (*(code *)puVar8[2])(uVar5,iVar4 + iVar2);
        uVar6 = (*(code *)puVar8[1])(uVar5);
        (*(code *)puVar8[3])(uVar6,iVar4 + iVar7);
        iVar7 = iVar7 + puVar8[5];
        iVar2 = iVar7 - puVar8[5];
      } while (iVar7 < iVar3);
    }
    (*(code *)puVar8[4])(uVar5);
  }
  if (0x1192b0 < iVar3) {
    smemclr(&_gp_1 + iVar4,iVar3 + -0x1192b0);
    return iVar4;
  }
  return iVar4;
}

