
void hash_string(ssh_hash *h,void *s,void *str,int len)

{
  undefined *puVar1;
  int iVar2;
  uchar *str_00;
  void *pvVar3;
  undefined *puVar4;
  code *pcVar5;
  int iStack_50;
  undefined4 uStack_4c;
  undefined *puStack_48;
  void *pvStack_44;
  ssh_hash *psStack_40;
  code *pcStack_3c;
  uchar lenblk [4];
  
  puVar1 = PTR___stack_chk_guard_000b0c9c;
  iVar2 = *(int *)PTR___stack_chk_guard_000b0c9c;
  lenblk = (uchar  [4])len;
  (*h->init)(s,lenblk,4);
  pvVar3 = s;
  (*h->init)();
  if (iVar2 == *(int *)puVar1) {
    return;
  }
  pcVar5 = hash_mpint;
  puVar4 = PTR___stack_chk_fail_000b0c70;
  (*(code *)PTR___stack_chk_fail_000b0c70)();
  puStack_48 = puVar1;
  uStack_4c = **(undefined4 **)(puVar4 + 0x7748c);
  pvStack_44 = s;
  psStack_40 = h;
  pcStack_3c = pcVar5;
  str_00 = ssh2_mpint_fmt((Bignum)len,&iStack_50);
  hash_string((ssh_hash *)((int)pvVar3 + 8),str,str_00,iStack_50);
                    /* WARNING: Subroutine does not return */
  safefree(str_00);
}



int FUN_0003975c(undefined4 *param_1,int param_2,undefined4 param_3,undefined4 param_4)

{
  undefined *puVar1;
  int iVar2;
  int iVar3;
  int iVar4;
  int iVar5;
  undefined4 uVar6;
  undefined4 uVar7;
  int *piVar8;
  undefined4 *puVar9;
  undefined *puVar10;
  code *pcVar11;
  undefined1 auStack_5c [4];
  undefined *puStack_58;
  undefined1 auStack_50 [4];
  int iStack_4c;
  undefined *puStack_48;
  int iStack_44;
  undefined4 *puStack_40;
  code *pcStack_3c;
  undefined4 local_20;
  int local_1c;
  
  puVar1 = PTR___stack_chk_guard_000b0c9c;
  local_1c = *(int *)PTR___stack_chk_guard_000b0c9c;
  local_20 = param_4;
  (*(code *)*param_1)(param_2,&local_20,4);
  iVar4 = param_2;
  (*(code *)*param_1)(param_2,param_3,param_4);
  iVar2 = *(int *)puVar1;
  if (local_1c == iVar2) {
    return iVar2;
  }
  pcVar11 = FUN_00039810;
  puVar10 = PTR___stack_chk_fail_000b0c70;
  (*(code *)PTR___stack_chk_fail_000b0c70)();
  puStack_58 = puVar10 + 0x7e940;
  puStack_48 = puVar1;
  piVar8 = *(int **)(puVar10 + 0x7748c);
  iStack_4c = *piVar8;
  iStack_44 = param_2;
  puStack_40 = param_1;
  pcStack_3c = pcVar11;
  iVar3 = FUN_000371ac(param_4,auStack_50);
  iVar2 = iVar3;
  FUN_0003975c(iVar4 + 8,param_3,iVar3);
  safefree();
  iVar4 = *piVar8;
  if (iStack_4c == iVar4) {
    return iVar4;
  }
  (**(code **)(puStack_58 + -0x74e0))();
  puVar1 = puStack_58;
  if (puStack_58 == (undefined *)0x0) {
    return 0;
  }
  puVar9 = *(undefined4 **)(*(int *)(iVar3 + 0x98) + 0xc);
  iVar4 = puVar9[5];
  if (iVar4 == 0) {
    trap(7);
  }
  iVar4 = ((int)(puStack_58 + iVar4 + -1) / iVar4) * iVar4;
  iVar5 = safemalloc(iVar4,1);
  uVar6 = (*(code *)*puVar9)();
  if ((*(uint *)(iVar3 + 0x50) & 0x20) == 0) {
    FUN_00039810(puVar9,uVar6,param_3);
    pcVar11 = (code *)puVar9[2];
  }
  else {
    pcVar11 = (code *)puVar9[2];
  }
  (*pcVar11)(uVar6,iVar2,puVar9[5]);
  (*(code *)puVar9[2])(uVar6,auStack_5c,1);
  (*(code *)puVar9[2])(uVar6,iVar3 + 0xa4,*(undefined4 *)(iVar3 + 0xe4));
  (*(code *)puVar9[3])(uVar6,iVar5);
  if ((int)puVar9[5] < iVar4) {
    uVar6 = (*(code *)*puVar9)();
    if ((*(uint *)(iVar3 + 0x50) & 0x20) == 0) {
      FUN_00039810(puVar9,uVar6,param_3);
      uVar7 = puVar9[5];
    }
    else {
      uVar7 = puVar9[5];
    }
    (*(code *)puVar9[2])(uVar6,iVar2,uVar7);
    iVar2 = puVar9[5];
    if (iVar2 < iVar4) {
      iVar3 = 0;
      do {
        (*(code *)puVar9[2])(uVar6,iVar5 + iVar3);
        uVar7 = (*(code *)puVar9[1])(uVar6);
        (*(code *)puVar9[3])(uVar7,iVar5 + iVar2);
        iVar2 = iVar2 + puVar9[5];
        iVar3 = iVar2 - puVar9[5];
      } while (iVar2 < iVar4);
    }
    (*(code *)puVar9[4])(uVar6);
  }
  if (iVar4 <= (int)puVar1) {
    return iVar5;
  }
  smemclr(puVar1 + iVar5,iVar4 - (int)puVar1);
  return iVar5;
}


lui gp,0x8
addiu gp,gp,-0x160c
addu gp,gp,t9
addiu sp,sp,-0x38
lw t9,0x0(a0)
sw s0,0x20(sp)
lw s0,-0x74b4(gp)
sw s4,0x30(sp)
or s4,a2,zero
sw s2,0x28(sp)
li a2,0x4
sw s1,0x24(sp)
or s2,a0,zero
sw gp,0x10(sp)
or s1,a1,zero
sw ra,0x34(sp)
addiu a1,sp,0x18
sw s3,0x2c(sp)
or a0,s1,zero
sw a3,0x18(sp)
or s3,a3,zero
lw v0,0x0(s0)
sw v0,0x1c(sp)
jalr t9
_nop
or a2,s3,zero
lw t9,0x0(s2)
or a1,s4,zero
jalr t9
_or a0,s1,zero
lw v1,0x1c(sp)
lw v0,0x0(s0)
bne v1,v0,0x00039804
_lw gp,0x10(sp)
lw ra,0x34(sp)
lw s4,0x30(sp)
lw s3,0x2c(sp)
lw s2,0x28(sp)
lw s1,0x24(sp)
lw s0,0x20(sp)
jr ra
_addiu sp,sp,0x38
lw t9,-0x74e0(gp)
jalr t9
_nop
(translation_unit "int FUN_0003975c(undefined4 *param_1,int param_2,undefined4 param_3,undefined4 param_4)\n\n{\n  undefined *puVar1;\n  int iVar2;\n  int iVar3;\n  int iVar4;\n  int iVar5;\n  undefined4 uVar6;\n  undefined4 uVar7;\n  int *piVar8;\n  undefined4 *puVar9;\n  undefined *puVar10;\n  code *pcVar11;\n  undefined1 auStack_5c [4];\n  undefined *puStack_58;\n  undefined1 auStack_50 [4];\n  int iStack_4c;\n  undefined *puStack_48;\n  int iStack_44;\n  undefined4 *puStack_40;\n  code *pcStack_3c;\n  undefined4 local_20;\n  int local_1c;\n  \n  puVar1 = PTR___stack_chk_guard_000b0c9c;\n  local_1c = *(int *)PTR___stack_chk_guard_000b0c9c;\n  local_20 = param_4;\n  (*(code *)*param_1)(param_2,&local_20,4);\n  iVar4 = param_2;\n  (*(code *)*param_1)(param_2,param_3,param_4);\n  iVar2 = *(int *)puVar1;\n  if (local_1c == iVar2) {\n    return iVar2;\n  }\n  pcVar11 = FUN_00039810;\n  puVar10 = PTR___stack_chk_fail_000b0c70;\n  (*(code *)PTR___stack_chk_fail_000b0c70)();\n  puStack_58 = puVar10 + 0x7e940;\n  puStack_48 = puVar1;\n  piVar8 = *(int **)(puVar10 + 0x7748c);\n  iStack_4c = *piVar8;\n  iStack_44 = param_2;\n  puStack_40 = param_1;\n  pcStack_3c = pcVar11;\n  iVar3 = FUN_000371ac(param_4,auStack_50);\n  iVar2 = iVar3;\n  FUN_0003975c(iVar4 + 8,param_3,iVar3);\n  safefree();\n  iVar4 = *piVar8;\n  if (iStack_4c == iVar4) {\n    return iVar4;\n  }\n  (**(code **)(puStack_58 + -0x74e0))();\n  puVar1 = puStack_58;\n  if (puStack_58 == (undefined *)0x0) {\n    return 0;\n  }\n  puVar9 = *(undefined4 **)(*(int *)(iVar3 + 0x98) + 0xc);\n  iVar4 = puVar9[5];\n  if (iVar4 == 0) {\n    trap(7);\n  }\n  iVar4 = ((int)(puStack_58 + iVar4 + -1) / iVar4) * iVar4;\n  iVar5 = safemalloc(iVar4,1);\n  uVar6 = (*(code *)*puVar9)();\n  if ((*(uint *)(iVar3 + 0x50) & 0x20) == 0) {\n    FUN_00039810(puVar9,uVar6,param_3);\n    pcVar11 = (code *)puVar9[2];\n  }\n  else {\n    pcVar11 = (code *)puVar9[2];\n  }\n  (*pcVar11)(uVar6,iVar2,puVar9[5]);\n  (*(code *)puVar9[2])(uVar6,auStack_5c,1);\n  (*(code *)puVar9[2])(uVar6,iVar3 + 0xa4,*(undefined4 *)(iVar3 + 0xe4));\n  (*(code *)puVar9[3])(uVar6,iVar5);\n  if ((int)puVar9[5] < iVar4) {\n    uVar6 = (*(code *)*puVar9)();\n    if ((*(uint *)(iVar3 + 0x50) & 0x20) == 0) {\n      FUN_00039810(puVar9,uVar6,param_3);\n      uVar7 = puVar9[5];\n    }\n    else {\n      uVar7 = puVar9[5];\n    }\n    (*(code *)puVar9[2])(uVar6,iVar2,uVar7);\n    iVar2 = puVar9[5];\n    if (iVar2 < iVar4) {\n      iVar3 = 0;\n      do {\n        (*(code *)puVar9[2])(uVar6,iVar5 + iVar3);\n        uVar7 = (*(code *)puVar9[1])(uVar6);\n        (*(code *)puVar9[3])(uVar7,iVar5 + iVar2);\n        iVar2 = iVar2 + puVar9[5];\n        iVar3 = iVar2 - puVar9[5];\n      } while (iVar2 < iVar4);\n    }\n    (*(code *)puVar9[4])(uVar6);\n  }\n  if (iVar4 <= (int)puVar1) {\n    return iVar5;\n  }\n  smemclr(puVar1 + iVar5,iVar4 - (int)puVar1);\n  return iVar5;\n}\n\n" (function_definition "int FUN_0003975c(undefined4 *param_1,int param_2,undefined4 param_3,undefined4 param_4)\n\n{\n  undefined *puVar1;\n  int iVar2;\n  int iVar3;\n  int iVar4;\n  int iVar5;\n  undefined4 uVar6;\n  undefined4 uVar7;\n  int *piVar8;\n  undefined4 *puVar9;\n  undefined *puVar10;\n  code *pcVar11;\n  undefined1 auStack_5c [4];\n  undefined *puStack_58;\n  undefined1 auStack_50 [4];\n  int iStack_4c;\n  undefined *puStack_48;\n  int iStack_44;\n  undefined4 *puStack_40;\n  code *pcStack_3c;\n  undefined4 local_20;\n  int local_1c;\n  \n  puVar1 = PTR___stack_chk_guard_000b0c9c;\n  local_1c = *(int *)PTR___stack_chk_guard_000b0c9c;\n  local_20 = param_4;\n  (*(code *)*param_1)(param_2,&local_20,4);\n  iVar4 = param_2;\n  (*(code *)*param_1)(param_2,param_3,param_4);\n  iVar2 = *(int *)puVar1;\n  if (local_1c == iVar2) {\n    return iVar2;\n  }\n  pcVar11 = FUN_00039810;\n  puVar10 = PTR___stack_chk_fail_000b0c70;\n  (*(code *)PTR___stack_chk_fail_000b0c70)();\n  puStack_58 = puVar10 + 0x7e940;\n  puStack_48 = puVar1;\n  piVar8 = *(int **)(puVar10 + 0x7748c);\n  iStack_4c = *piVar8;\n  iStack_44 = param_2;\n  puStack_40 = param_1;\n  pcStack_3c = pcVar11;\n  iVar3 = FUN_000371ac(param_4,auStack_50);\n  iVar2 = iVar3;\n  FUN_0003975c(iVar4 + 8,param_3,iVar3);\n  safefree();\n  iVar4 = *piVar8;\n  if (iStack_4c == iVar4) {\n    return iVar4;\n  }\n  (**(code **)(puStack_58 + -0x74e0))();\n  puVar1 = puStack_58;\n  if (puStack_58 == (undefined *)0x0) {\n    return 0;\n  }\n  puVar9 = *(undefined4 **)(*(int *)(iVar3 + 0x98) + 0xc);\n  iVar4 = puVar9[5];\n  if (iVar4 == 0) {\n    trap(7);\n  }\n  iVar4 = ((int)(puStack_58 + iVar4 + -1) / iVar4) * iVar4;\n  iVar5 = safemalloc(iVar4,1);\n  uVar6 = (*(code *)*puVar9)();\n  if ((*(uint *)(iVar3 + 0x50) & 0x20) == 0) {\n    FUN_00039810(puVar9,uVar6,param_3);\n    pcVar11 = (code *)puVar9[2];\n  }\n  else {\n    pcVar11 = (code *)puVar9[2];\n  }\n  (*pcVar11)(uVar6,iVar2,puVar9[5]);\n  (*(code *)puVar9[2])(uVar6,auStack_5c,1);\n  (*(code *)puVar9[2])(uVar6,iVar3 + 0xa4,*(undefined4 *)(iVar3 + 0xe4));\n  (*(code *)puVar9[3])(uVar6,iVar5);\n  if ((int)puVar9[5] < iVar4) {\n    uVar6 = (*(code *)*puVar9)();\n    if ((*(uint *)(iVar3 + 0x50) & 0x20) == 0) {\n      FUN_00039810(puVar9,uVar6,param_3);\n      uVar7 = puVar9[5];\n    }\n    else {\n      uVar7 = puVar9[5];\n    }\n    (*(code *)puVar9[2])(uVar6,iVar2,uVar7);\n    iVar2 = puVar9[5];\n    if (iVar2 < iVar4) {\n      iVar3 = 0;\n      do {\n        (*(code *)puVar9[2])(uVar6,iVar5 + iVar3);\n        uVar7 = (*(code *)puVar9[1])(uVar6);\n        (*(code *)puVar9[3])(uVar7,iVar5 + iVar2);\n        iVar2 = iVar2 + puVar9[5];\n        iVar3 = iVar2 - puVar9[5];\n      } while (iVar2 < iVar4);\n    }\n    (*(code *)puVar9[4])(uVar6);\n  }\n  if (iVar4 <= (int)puVar1) {\n    return iVar5;\n  }\n  smemclr(puVar1 + iVar5,iVar4 - (int)puVar1);\n  return iVar5;\n}" primitive_type (function_declarator "FUN_0003975c(undefined4 *param_1,int param_2,undefined4 param_3,undefined4 param_4)" identifier (parameter_list "(undefined4 *param_1,int param_2,undefined4 param_3,undefined4 param_4)" ( (parameter_declaration "undefined4 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "undefined4 param_3" type_identifier identifier) , (parameter_declaration "undefined4 param_4" type_identifier identifier) ))) (compound_statement "{\n  undefined *puVar1;\n  int iVar2;\n  int iVar3;\n  int iVar4;\n  int iVar5;\n  undefined4 uVar6;\n  undefined4 uVar7;\n  int *piVar8;\n  undefined4 *puVar9;\n  undefined *puVar10;\n  code *pcVar11;\n  undefined1 auStack_5c [4];\n  undefined *puStack_58;\n  undefined1 auStack_50 [4];\n  int iStack_4c;\n  undefined *puStack_48;\n  int iStack_44;\n  undefined4 *puStack_40;\n  code *pcStack_3c;\n  undefined4 local_20;\n  int local_1c;\n  \n  puVar1 = PTR___stack_chk_guard_000b0c9c;\n  local_1c = *(int *)PTR___stack_chk_guard_000b0c9c;\n  local_20 = param_4;\n  (*(code *)*param_1)(param_2,&local_20,4);\n  iVar4 = param_2;\n  (*(code *)*param_1)(param_2,param_3,param_4);\n  iVar2 = *(int *)puVar1;\n  if (local_1c == iVar2) {\n    return iVar2;\n  }\n  pcVar11 = FUN_00039810;\n  puVar10 = PTR___stack_chk_fail_000b0c70;\n  (*(code *)PTR___stack_chk_fail_000b0c70)();\n  puStack_58 = puVar10 + 0x7e940;\n  puStack_48 = puVar1;\n  piVar8 = *(int **)(puVar10 + 0x7748c);\n  iStack_4c = *piVar8;\n  iStack_44 = param_2;\n  puStack_40 = param_1;\n  pcStack_3c = pcVar11;\n  iVar3 = FUN_000371ac(param_4,auStack_50);\n  iVar2 = iVar3;\n  FUN_0003975c(iVar4 + 8,param_3,iVar3);\n  safefree();\n  iVar4 = *piVar8;\n  if (iStack_4c == iVar4) {\n    return iVar4;\n  }\n  (**(code **)(puStack_58 + -0x74e0))();\n  puVar1 = puStack_58;\n  if (puStack_58 == (undefined *)0x0) {\n    return 0;\n  }\n  puVar9 = *(undefined4 **)(*(int *)(iVar3 + 0x98) + 0xc);\n  iVar4 = puVar9[5];\n  if (iVar4 == 0) {\n    trap(7);\n  }\n  iVar4 = ((int)(puStack_58 + iVar4 + -1) / iVar4) * iVar4;\n  iVar5 = safemalloc(iVar4,1);\n  uVar6 = (*(code *)*puVar9)();\n  if ((*(uint *)(iVar3 + 0x50) & 0x20) == 0) {\n    FUN_00039810(puVar9,uVar6,param_3);\n    pcVar11 = (code *)puVar9[2];\n  }\n  else {\n    pcVar11 = (code *)puVar9[2];\n  }\n  (*pcVar11)(uVar6,iVar2,puVar9[5]);\n  (*(code *)puVar9[2])(uVar6,auStack_5c,1);\n  (*(code *)puVar9[2])(uVar6,iVar3 + 0xa4,*(undefined4 *)(iVar3 + 0xe4));\n  (*(code *)puVar9[3])(uVar6,iVar5);\n  if ((int)puVar9[5] < iVar4) {\n    uVar6 = (*(code *)*puVar9)();\n    if ((*(uint *)(iVar3 + 0x50) & 0x20) == 0) {\n      FUN_00039810(puVar9,uVar6,param_3);\n      uVar7 = puVar9[5];\n    }\n    else {\n      uVar7 = puVar9[5];\n    }\n    (*(code *)puVar9[2])(uVar6,iVar2,uVar7);\n    iVar2 = puVar9[5];\n    if (iVar2 < iVar4) {\n      iVar3 = 0;\n      do {\n        (*(code *)puVar9[2])(uVar6,iVar5 + iVar3);\n        uVar7 = (*(code *)puVar9[1])(uVar6);\n        (*(code *)puVar9[3])(uVar7,iVar5 + iVar2);\n        iVar2 = iVar2 + puVar9[5];\n        iVar3 = iVar2 - puVar9[5];\n      } while (iVar2 < iVar4);\n    }\n    (*(code *)puVar9[4])(uVar6);\n  }\n  if (iVar4 <= (int)puVar1) {\n    return iVar5;\n  }\n  smemclr(puVar1 + iVar5,iVar4 - (int)puVar1);\n  return iVar5;\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 "int iVar5;" primitive_type identifier ;) (declaration "undefined4 uVar6;" type_identifier identifier ;) (declaration "undefined4 uVar7;" type_identifier identifier ;) (declaration "int *piVar8;" primitive_type (pointer_declarator "*piVar8" * identifier) ;) (declaration "undefined4 *puVar9;" type_identifier (pointer_declarator "*puVar9" * identifier) ;) (declaration "undefined *puVar10;" type_identifier (pointer_declarator "*puVar10" * identifier) ;) (declaration "code *pcVar11;" type_identifier (pointer_declarator "*pcVar11" * identifier) ;) (declaration "undefined1 auStack_5c [4];" type_identifier (array_declarator "auStack_5c [4]" identifier [ number_literal ]) ;) (declaration "undefined *puStack_58;" type_identifier (pointer_declarator "*puStack_58" * identifier) ;) (declaration "undefined1 auStack_50 [4];" type_identifier (array_declarator "auStack_50 [4]" identifier [ number_literal ]) ;) (declaration "int iStack_4c;" primitive_type identifier ;) (declaration "undefined *puStack_48;" type_identifier (pointer_declarator "*puStack_48" * identifier) ;) (declaration "int iStack_44;" primitive_type identifier ;) (declaration "undefined4 *puStack_40;" type_identifier (pointer_declarator "*puStack_40" * identifier) ;) (declaration "code *pcStack_3c;" type_identifier (pointer_declarator "*pcStack_3c" * identifier) ;) (declaration "undefined4 local_20;" type_identifier identifier ;) (declaration "int local_1c;" primitive_type identifier ;) (expression_statement "puVar1 = PTR___stack_chk_guard_000b0c9c;" (assignment_expression "puVar1 = PTR___stack_chk_guard_000b0c9c" identifier = identifier) ;) (expression_statement "local_1c = *(int *)PTR___stack_chk_guard_000b0c9c;" (assignment_expression "local_1c = *(int *)PTR___stack_chk_guard_000b0c9c" identifier = (pointer_expression "*(int *)PTR___stack_chk_guard_000b0c9c" * (cast_expression "(int *)PTR___stack_chk_guard_000b0c9c" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) ;) (expression_statement "local_20 = param_4;" (assignment_expression "local_20 = param_4" identifier = identifier) ;) (expression_statement "(*(code *)*param_1)(param_2,&local_20,4);" (call_expression "(*(code *)*param_1)(param_2,&local_20,4)" (parenthesized_expression "(*(code *)*param_1)" ( (pointer_expression "*(code *)*param_1" * (cast_expression "(code *)*param_1" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier))) )) (argument_list "(param_2,&local_20,4)" ( identifier , (pointer_expression "&local_20" & identifier) , number_literal ))) ;) (expression_statement "iVar4 = param_2;" (assignment_expression "iVar4 = param_2" identifier = identifier) ;) (expression_statement "(*(code *)*param_1)(param_2,param_3,param_4);" (call_expression "(*(code *)*param_1)(param_2,param_3,param_4)" (parenthesized_expression "(*(code *)*param_1)" ( (pointer_expression "*(code *)*param_1" * (cast_expression "(code *)*param_1" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier))) )) (argument_list "(param_2,param_3,param_4)" ( identifier , identifier , identifier ))) ;) (expression_statement "iVar2 = *(int *)puVar1;" (assignment_expression "iVar2 = *(int *)puVar1" identifier = (pointer_expression "*(int *)puVar1" * (cast_expression "(int *)puVar1" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) ;) (if_statement "if (local_1c == iVar2) {\n    return iVar2;\n  }" if (parenthesized_expression "(local_1c == iVar2)" ( (binary_expression "local_1c == iVar2" identifier == identifier) )) (compound_statement "{\n    return iVar2;\n  }" { (return_statement "return iVar2;" return identifier ;) })) (expression_statement "pcVar11 = FUN_00039810;" (assignment_expression "pcVar11 = FUN_00039810" identifier = identifier) ;) (expression_statement "puVar10 = PTR___stack_chk_fail_000b0c70;" (assignment_expression "puVar10 = PTR___stack_chk_fail_000b0c70" identifier = identifier) ;) (expression_statement "(*(code *)PTR___stack_chk_fail_000b0c70)();" (call_expression "(*(code *)PTR___stack_chk_fail_000b0c70)()" (parenthesized_expression "(*(code *)PTR___stack_chk_fail_000b0c70)" ( (pointer_expression "*(code *)PTR___stack_chk_fail_000b0c70" * (cast_expression "(code *)PTR___stack_chk_fail_000b0c70" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))) ;) (expression_statement "puStack_58 = puVar10 + 0x7e940;" (assignment_expression "puStack_58 = puVar10 + 0x7e940" identifier = (binary_expression "puVar10 + 0x7e940" identifier + number_literal)) ;) (expression_statement "puStack_48 = puVar1;" (assignment_expression "puStack_48 = puVar1" identifier = identifier) ;) (expression_statement "piVar8 = *(int **)(puVar10 + 0x7748c);" (assignment_expression "piVar8 = *(int **)(puVar10 + 0x7748c)" identifier = (pointer_expression "*(int **)(puVar10 + 0x7748c)" * (cast_expression "(int **)(puVar10 + 0x7748c)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(puVar10 + 0x7748c)" ( (binary_expression "puVar10 + 0x7748c" identifier + number_literal) ))))) ;) (expression_statement "iStack_4c = *piVar8;" (assignment_expression "iStack_4c = *piVar8" identifier = (pointer_expression "*piVar8" * identifier)) ;) (expression_statement "iStack_44 = param_2;" (assignment_expression "iStack_44 = param_2" identifier = identifier) ;) (expression_statement "puStack_40 = param_1;" (assignment_expression "puStack_40 = param_1" identifier = identifier) ;) (expression_statement "pcStack_3c = pcVar11;" (assignment_expression "pcStack_3c = pcVar11" identifier = identifier) ;) (expression_statement "iVar3 = FUN_000371ac(param_4,auStack_50);" (assignment_expression "iVar3 = FUN_000371ac(param_4,auStack_50)" identifier = (call_expression "FUN_000371ac(param_4,auStack_50)" identifier (argument_list "(param_4,auStack_50)" ( identifier , identifier )))) ;) (expression_statement "iVar2 = iVar3;" (assignment_expression "iVar2 = iVar3" identifier = identifier) ;) (expression_statement "FUN_0003975c(iVar4 + 8,param_3,iVar3);" (call_expression "FUN_0003975c(iVar4 + 8,param_3,iVar3)" identifier (argument_list "(iVar4 + 8,param_3,iVar3)" ( (binary_expression "iVar4 + 8" identifier + number_literal) , identifier , identifier ))) ;) (expression_statement "safefree();" (call_expression "safefree()" identifier (argument_list "()" ( ))) ;) (expression_statement "iVar4 = *piVar8;" (assignment_expression "iVar4 = *piVar8" identifier = (pointer_expression "*piVar8" * identifier)) ;) (if_statement "if (iStack_4c == iVar4) {\n    return iVar4;\n  }" if (parenthesized_expression "(iStack_4c == iVar4)" ( (binary_expression "iStack_4c == iVar4" identifier == identifier) )) (compound_statement "{\n    return iVar4;\n  }" { (return_statement "return iVar4;" return identifier ;) })) (expression_statement "(**(code **)(puStack_58 + -0x74e0))();" (call_expression "(**(code **)(puStack_58 + -0x74e0))()" (parenthesized_expression "(**(code **)(puStack_58 + -0x74e0))" ( (pointer_expression "**(code **)(puStack_58 + -0x74e0)" * (pointer_expression "*(code **)(puStack_58 + -0x74e0)" * (cast_expression "(code **)(puStack_58 + -0x74e0)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(puStack_58 + -0x74e0)" ( (binary_expression "puStack_58 + -0x74e0" identifier + number_literal) ))))) )) (argument_list "()" ( ))) ;) (expression_statement "puVar1 = puStack_58;" (assignment_expression "puVar1 = puStack_58" identifier = identifier) ;) (if_statement "if (puStack_58 == (undefined *)0x0) {\n    return 0;\n  }" if (parenthesized_expression "(puStack_58 == (undefined *)0x0)" ( (binary_expression "puStack_58 == (undefined *)0x0" identifier == (cast_expression "(undefined *)0x0" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    return 0;\n  }" { (return_statement "return 0;" return number_literal ;) })) (expression_statement "puVar9 = *(undefined4 **)(*(int *)(iVar3 + 0x98) + 0xc);" (assignment_expression "puVar9 = *(undefined4 **)(*(int *)(iVar3 + 0x98) + 0xc)" identifier = (pointer_expression "*(undefined4 **)(*(int *)(iVar3 + 0x98) + 0xc)" * (cast_expression "(undefined4 **)(*(int *)(iVar3 + 0x98) + 0xc)" ( (type_descriptor "undefined4 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*(int *)(iVar3 + 0x98) + 0xc)" ( (binary_expression "*(int *)(iVar3 + 0x98) + 0xc" (pointer_expression "*(int *)(iVar3 + 0x98)" * (cast_expression "(int *)(iVar3 + 0x98)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 0x98)" ( (binary_expression "iVar3 + 0x98" identifier + number_literal) )))) + number_literal) ))))) ;) (expression_statement "iVar4 = puVar9[5];" (assignment_expression "iVar4 = puVar9[5]" identifier = (subscript_expression "puVar9[5]" identifier [ number_literal ])) ;) (if_statement "if (iVar4 == 0) {\n    trap(7);\n  }" if (parenthesized_expression "(iVar4 == 0)" ( (binary_expression "iVar4 == 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 "iVar4 = ((int)(puStack_58 + iVar4 + -1) / iVar4) * iVar4;" (assignment_expression "iVar4 = ((int)(puStack_58 + iVar4 + -1) / iVar4) * iVar4" identifier = (binary_expression "((int)(puStack_58 + iVar4 + -1) / iVar4) * iVar4" (parenthesized_expression "((int)(puStack_58 + iVar4 + -1) / iVar4)" ( (binary_expression "(int)(puStack_58 + iVar4 + -1) / iVar4" (cast_expression "(int)(puStack_58 + iVar4 + -1)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(puStack_58 + iVar4 + -1)" ( (binary_expression "puStack_58 + iVar4 + -1" (binary_expression "puStack_58 + iVar4" identifier + identifier) + number_literal) ))) / identifier) )) * identifier)) ;) (expression_statement "iVar5 = safemalloc(iVar4,1);" (assignment_expression "iVar5 = safemalloc(iVar4,1)" identifier = (call_expression "safemalloc(iVar4,1)" identifier (argument_list "(iVar4,1)" ( identifier , number_literal )))) ;) (expression_statement "uVar6 = (*(code *)*puVar9)();" (assignment_expression "uVar6 = (*(code *)*puVar9)()" identifier = (call_expression "(*(code *)*puVar9)()" (parenthesized_expression "(*(code *)*puVar9)" ( (pointer_expression "*(code *)*puVar9" * (cast_expression "(code *)*puVar9" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*puVar9" * identifier))) )) (argument_list "()" ( )))) ;) (if_statement "if ((*(uint *)(iVar3 + 0x50) & 0x20) == 0) {\n    FUN_00039810(puVar9,uVar6,param_3);\n    pcVar11 = (code *)puVar9[2];\n  }\n  else {\n    pcVar11 = (code *)puVar9[2];\n  }" if (parenthesized_expression "((*(uint *)(iVar3 + 0x50) & 0x20) == 0)" ( (binary_expression "(*(uint *)(iVar3 + 0x50) & 0x20) == 0" (parenthesized_expression "(*(uint *)(iVar3 + 0x50) & 0x20)" ( (binary_expression "*(uint *)(iVar3 + 0x50) & 0x20" (pointer_expression "*(uint *)(iVar3 + 0x50)" * (cast_expression "(uint *)(iVar3 + 0x50)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 0x50)" ( (binary_expression "iVar3 + 0x50" identifier + number_literal) )))) & number_literal) )) == number_literal) )) (compound_statement "{\n    FUN_00039810(puVar9,uVar6,param_3);\n    pcVar11 = (code *)puVar9[2];\n  }" { (expression_statement "FUN_00039810(puVar9,uVar6,param_3);" (call_expression "FUN_00039810(puVar9,uVar6,param_3)" identifier (argument_list "(puVar9,uVar6,param_3)" ( identifier , identifier , identifier ))) ;) (expression_statement "pcVar11 = (code *)puVar9[2];" (assignment_expression "pcVar11 = (code *)puVar9[2]" identifier = (cast_expression "(code *)puVar9[2]" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "puVar9[2]" identifier [ number_literal ]))) ;) }) (else_clause "else {\n    pcVar11 = (code *)puVar9[2];\n  }" else (compound_statement "{\n    pcVar11 = (code *)puVar9[2];\n  }" { (expression_statement "pcVar11 = (code *)puVar9[2];" (assignment_expression "pcVar11 = (code *)puVar9[2]" identifier = (cast_expression "(code *)puVar9[2]" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "puVar9[2]" identifier [ number_literal ]))) ;) }))) (expression_statement "(*pcVar11)(uVar6,iVar2,puVar9[5]);" (call_expression "(*pcVar11)(uVar6,iVar2,puVar9[5])" (parenthesized_expression "(*pcVar11)" ( (pointer_expression "*pcVar11" * identifier) )) (argument_list "(uVar6,iVar2,puVar9[5])" ( identifier , identifier , (subscript_expression "puVar9[5]" identifier [ number_literal ]) ))) ;) (expression_statement "(*(code *)puVar9[2])(uVar6,auStack_5c,1);" (call_expression "(*(code *)puVar9[2])(uVar6,auStack_5c,1)" (parenthesized_expression "(*(code *)puVar9[2])" ( (pointer_expression "*(code *)puVar9[2]" * (cast_expression "(code *)puVar9[2]" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "puVar9[2]" identifier [ number_literal ]))) )) (argument_list "(uVar6,auStack_5c,1)" ( identifier , identifier , number_literal ))) ;) (expression_statement "(*(code *)puVar9[2])(uVar6,iVar3 + 0xa4,*(undefined4 *)(iVar3 + 0xe4));" (call_expression "(*(code *)puVar9[2])(uVar6,iVar3 + 0xa4,*(undefined4 *)(iVar3 + 0xe4))" (parenthesized_expression "(*(code *)puVar9[2])" ( (pointer_expression "*(code *)puVar9[2]" * (cast_expression "(code *)puVar9[2]" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "puVar9[2]" identifier [ number_literal ]))) )) (argument_list "(uVar6,iVar3 + 0xa4,*(undefined4 *)(iVar3 + 0xe4))" ( identifier , (binary_expression "iVar3 + 0xa4" identifier + number_literal) , (pointer_expression "*(undefined4 *)(iVar3 + 0xe4)" * (cast_expression "(undefined4 *)(iVar3 + 0xe4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 0xe4)" ( (binary_expression "iVar3 + 0xe4" identifier + number_literal) )))) ))) ;) (expression_statement "(*(code *)puVar9[3])(uVar6,iVar5);" (call_expression "(*(code *)puVar9[3])(uVar6,iVar5)" (parenthesized_expression "(*(code *)puVar9[3])" ( (pointer_expression "*(code *)puVar9[3]" * (cast_expression "(code *)puVar9[3]" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "puVar9[3]" identifier [ number_literal ]))) )) (argument_list "(uVar6,iVar5)" ( identifier , identifier ))) ;) (if_statement "if ((int)puVar9[5] < iVar4) {\n    uVar6 = (*(code *)*puVar9)();\n    if ((*(uint *)(iVar3 + 0x50) & 0x20) == 0) {\n      FUN_00039810(puVar9,uVar6,param_3);\n      uVar7 = puVar9[5];\n    }\n    else {\n      uVar7 = puVar9[5];\n    }\n    (*(code *)puVar9[2])(uVar6,iVar2,uVar7);\n    iVar2 = puVar9[5];\n    if (iVar2 < iVar4) {\n      iVar3 = 0;\n      do {\n        (*(code *)puVar9[2])(uVar6,iVar5 + iVar3);\n        uVar7 = (*(code *)puVar9[1])(uVar6);\n        (*(code *)puVar9[3])(uVar7,iVar5 + iVar2);\n        iVar2 = iVar2 + puVar9[5];\n        iVar3 = iVar2 - puVar9[5];\n      } while (iVar2 < iVar4);\n    }\n    (*(code *)puVar9[4])(uVar6);\n  }" if (parenthesized_expression "((int)puVar9[5] < iVar4)" ( (binary_expression "(int)puVar9[5] < iVar4" (cast_expression "(int)puVar9[5]" ( (type_descriptor "int" primitive_type) ) (subscript_expression "puVar9[5]" identifier [ number_literal ])) < identifier) )) (compound_statement "{\n    uVar6 = (*(code *)*puVar9)();\n    if ((*(uint *)(iVar3 + 0x50) & 0x20) == 0) {\n      FUN_00039810(puVar9,uVar6,param_3);\n      uVar7 = puVar9[5];\n    }\n    else {\n      uVar7 = puVar9[5];\n    }\n    (*(code *)puVar9[2])(uVar6,iVar2,uVar7);\n    iVar2 = puVar9[5];\n    if (iVar2 < iVar4) {\n      iVar3 = 0;\n      do {\n        (*(code *)puVar9[2])(uVar6,iVar5 + iVar3);\n        uVar7 = (*(code *)puVar9[1])(uVar6);\n        (*(code *)puVar9[3])(uVar7,iVar5 + iVar2);\n        iVar2 = iVar2 + puVar9[5];\n        iVar3 = iVar2 - puVar9[5];\n      } while (iVar2 < iVar4);\n    }\n    (*(code *)puVar9[4])(uVar6);\n  }" { (expression_statement "uVar6 = (*(code *)*puVar9)();" (assignment_expression "uVar6 = (*(code *)*puVar9)()" identifier = (call_expression "(*(code *)*puVar9)()" (parenthesized_expression "(*(code *)*puVar9)" ( (pointer_expression "*(code *)*puVar9" * (cast_expression "(code *)*puVar9" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*puVar9" * identifier))) )) (argument_list "()" ( )))) ;) (if_statement "if ((*(uint *)(iVar3 + 0x50) & 0x20) == 0) {\n      FUN_00039810(puVar9,uVar6,param_3);\n      uVar7 = puVar9[5];\n    }\n    else {\n      uVar7 = puVar9[5];\n    }" if (parenthesized_expression "((*(uint *)(iVar3 + 0x50) & 0x20) == 0)" ( (binary_expression "(*(uint *)(iVar3 + 0x50) & 0x20) == 0" (parenthesized_expression "(*(uint *)(iVar3 + 0x50) & 0x20)" ( (binary_expression "*(uint *)(iVar3 + 0x50) & 0x20" (pointer_expression "*(uint *)(iVar3 + 0x50)" * (cast_expression "(uint *)(iVar3 + 0x50)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 0x50)" ( (binary_expression "iVar3 + 0x50" identifier + number_literal) )))) & number_literal) )) == number_literal) )) (compound_statement "{\n      FUN_00039810(puVar9,uVar6,param_3);\n      uVar7 = puVar9[5];\n    }" { (expression_statement "FUN_00039810(puVar9,uVar6,param_3);" (call_expression "FUN_00039810(puVar9,uVar6,param_3)" identifier (argument_list "(puVar9,uVar6,param_3)" ( identifier , identifier , identifier ))) ;) (expression_statement "uVar7 = puVar9[5];" (assignment_expression "uVar7 = puVar9[5]" identifier = (subscript_expression "puVar9[5]" identifier [ number_literal ])) ;) }) (else_clause "else {\n      uVar7 = puVar9[5];\n    }" else (compound_statement "{\n      uVar7 = puVar9[5];\n    }" { (expression_statement "uVar7 = puVar9[5];" (assignment_expression "uVar7 = puVar9[5]" identifier = (subscript_expression "puVar9[5]" identifier [ number_literal ])) ;) }))) (expression_statement "(*(code *)puVar9[2])(uVar6,iVar2,uVar7);" (call_expression "(*(code *)puVar9[2])(uVar6,iVar2,uVar7)" (parenthesized_expression "(*(code *)puVar9[2])" ( (pointer_expression "*(code *)puVar9[2]" * (cast_expression "(code *)puVar9[2]" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "puVar9[2]" identifier [ number_literal ]))) )) (argument_list "(uVar6,iVar2,uVar7)" ( identifier , identifier , identifier ))) ;) (expression_statement "iVar2 = puVar9[5];" (assignment_expression "iVar2 = puVar9[5]" identifier = (subscript_expression "puVar9[5]" identifier [ number_literal ])) ;) (if_statement "if (iVar2 < iVar4) {\n      iVar3 = 0;\n      do {\n        (*(code *)puVar9[2])(uVar6,iVar5 + iVar3);\n        uVar7 = (*(code *)puVar9[1])(uVar6);\n        (*(code *)puVar9[3])(uVar7,iVar5 + iVar2);\n        iVar2 = iVar2 + puVar9[5];\n        iVar3 = iVar2 - puVar9[5];\n      } while (iVar2 < iVar4);\n    }" if (parenthesized_expression "(iVar2 < iVar4)" ( (binary_expression "iVar2 < iVar4" identifier < identifier) )) (compound_statement "{\n      iVar3 = 0;\n      do {\n        (*(code *)puVar9[2])(uVar6,iVar5 + iVar3);\n        uVar7 = (*(code *)puVar9[1])(uVar6);\n        (*(code *)puVar9[3])(uVar7,iVar5 + iVar2);\n        iVar2 = iVar2 + puVar9[5];\n        iVar3 = iVar2 - puVar9[5];\n      } while (iVar2 < iVar4);\n    }" { (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" identifier = number_literal) ;) (do_statement "do {\n        (*(code *)puVar9[2])(uVar6,iVar5 + iVar3);\n        uVar7 = (*(code *)puVar9[1])(uVar6);\n        (*(code *)puVar9[3])(uVar7,iVar5 + iVar2);\n        iVar2 = iVar2 + puVar9[5];\n        iVar3 = iVar2 - puVar9[5];\n      } while (iVar2 < iVar4);" do (compound_statement "{\n        (*(code *)puVar9[2])(uVar6,iVar5 + iVar3);\n        uVar7 = (*(code *)puVar9[1])(uVar6);\n        (*(code *)puVar9[3])(uVar7,iVar5 + iVar2);\n        iVar2 = iVar2 + puVar9[5];\n        iVar3 = iVar2 - puVar9[5];\n      }" { (expression_statement "(*(code *)puVar9[2])(uVar6,iVar5 + iVar3);" (call_expression "(*(code *)puVar9[2])(uVar6,iVar5 + iVar3)" (parenthesized_expression "(*(code *)puVar9[2])" ( (pointer_expression "*(code *)puVar9[2]" * (cast_expression "(code *)puVar9[2]" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "puVar9[2]" identifier [ number_literal ]))) )) (argument_list "(uVar6,iVar5 + iVar3)" ( identifier , (binary_expression "iVar5 + iVar3" identifier + identifier) ))) ;) (expression_statement "uVar7 = (*(code *)puVar9[1])(uVar6);" (assignment_expression "uVar7 = (*(code *)puVar9[1])(uVar6)" identifier = (call_expression "(*(code *)puVar9[1])(uVar6)" (parenthesized_expression "(*(code *)puVar9[1])" ( (pointer_expression "*(code *)puVar9[1]" * (cast_expression "(code *)puVar9[1]" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "puVar9[1]" identifier [ number_literal ]))) )) (argument_list "(uVar6)" ( identifier )))) ;) (expression_statement "(*(code *)puVar9[3])(uVar7,iVar5 + iVar2);" (call_expression "(*(code *)puVar9[3])(uVar7,iVar5 + iVar2)" (parenthesized_expression "(*(code *)puVar9[3])" ( (pointer_expression "*(code *)puVar9[3]" * (cast_expression "(code *)puVar9[3]" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "puVar9[3]" identifier [ number_literal ]))) )) (argument_list "(uVar7,iVar5 + iVar2)" ( identifier , (binary_expression "iVar5 + iVar2" identifier + identifier) ))) ;) (expression_statement "iVar2 = iVar2 + puVar9[5];" (assignment_expression "iVar2 = iVar2 + puVar9[5]" identifier = (binary_expression "iVar2 + puVar9[5]" identifier + (subscript_expression "puVar9[5]" identifier [ number_literal ]))) ;) (expression_statement "iVar3 = iVar2 - puVar9[5];" (assignment_expression "iVar3 = iVar2 - puVar9[5]" identifier = (binary_expression "iVar2 - puVar9[5]" identifier - (subscript_expression "puVar9[5]" identifier [ number_literal ]))) ;) }) while (parenthesized_expression "(iVar2 < iVar4)" ( (binary_expression "iVar2 < iVar4" identifier < identifier) )) ;) })) (expression_statement "(*(code *)puVar9[4])(uVar6);" (call_expression "(*(code *)puVar9[4])(uVar6)" (parenthesized_expression "(*(code *)puVar9[4])" ( (pointer_expression "*(code *)puVar9[4]" * (cast_expression "(code *)puVar9[4]" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "puVar9[4]" identifier [ number_literal ]))) )) (argument_list "(uVar6)" ( identifier ))) ;) })) (if_statement "if (iVar4 <= (int)puVar1) {\n    return iVar5;\n  }" if (parenthesized_expression "(iVar4 <= (int)puVar1)" ( (binary_expression "iVar4 <= (int)puVar1" identifier <= (cast_expression "(int)puVar1" ( (type_descriptor "int" primitive_type) ) identifier)) )) (compound_statement "{\n    return iVar5;\n  }" { (return_statement "return iVar5;" return identifier ;) })) (expression_statement "smemclr(puVar1 + iVar5,iVar4 - (int)puVar1);" (call_expression "smemclr(puVar1 + iVar5,iVar4 - (int)puVar1)" identifier (argument_list "(puVar1 + iVar5,iVar4 - (int)puVar1)" ( (binary_expression "puVar1 + iVar5" identifier + identifier) , (binary_expression "iVar4 - (int)puVar1" identifier - (cast_expression "(int)puVar1" ( (type_descriptor "int" primitive_type) ) identifier)) ))) ;) (return_statement "return iVar5;" return identifier ;) })))
(translation_unit "void hash_string(ssh_hash *h,void *s,void *str,int len)\n\n{\n  undefined *puVar1;\n  int iVar2;\n  uchar *str_00;\n  void *pvVar3;\n  undefined *puVar4;\n  code *pcVar5;\n  int iStack_50;\n  undefined4 uStack_4c;\n  undefined *puStack_48;\n  void *pvStack_44;\n  ssh_hash *psStack_40;\n  code *pcStack_3c;\n  uchar lenblk [4];\n  \n  puVar1 = PTR___stack_chk_guard_000b0c9c;\n  iVar2 = *(int *)PTR___stack_chk_guard_000b0c9c;\n  lenblk = (uchar  [4])len;\n  (*h->init)(s,lenblk,4);\n  pvVar3 = s;\n  (*h->init)();\n  if (iVar2 == *(int *)puVar1) {\n    return;\n  }\n  pcVar5 = hash_mpint;\n  puVar4 = PTR___stack_chk_fail_000b0c70;\n  (*(code *)PTR___stack_chk_fail_000b0c70)();\n  puStack_48 = puVar1;\n  uStack_4c = **(undefined4 **)(puVar4 + 0x7748c);\n  pvStack_44 = s;\n  psStack_40 = h;\n  pcStack_3c = pcVar5;\n  str_00 = ssh2_mpint_fmt((Bignum)len,&iStack_50);\n  hash_string((ssh_hash *)((int)pvVar3 + 8),str,str_00,iStack_50);\n                    /* WARNING: Subroutine does not return */\n  safefree(str_00);\n}\n\n" (function_definition "void hash_string(ssh_hash *h,void *s,void *str,int len)\n\n{\n  undefined *puVar1;\n  int iVar2;\n  uchar *str_00;\n  void *pvVar3;\n  undefined *puVar4;\n  code *pcVar5;\n  int iStack_50;\n  undefined4 uStack_4c;\n  undefined *puStack_48;\n  void *pvStack_44;\n  ssh_hash *psStack_40;\n  code *pcStack_3c;\n  uchar lenblk [4];\n  \n  puVar1 = PTR___stack_chk_guard_000b0c9c;\n  iVar2 = *(int *)PTR___stack_chk_guard_000b0c9c;\n  lenblk = (uchar  [4])len;\n  (*h->init)(s,lenblk,4);\n  pvVar3 = s;\n  (*h->init)();\n  if (iVar2 == *(int *)puVar1) {\n    return;\n  }\n  pcVar5 = hash_mpint;\n  puVar4 = PTR___stack_chk_fail_000b0c70;\n  (*(code *)PTR___stack_chk_fail_000b0c70)();\n  puStack_48 = puVar1;\n  uStack_4c = **(undefined4 **)(puVar4 + 0x7748c);\n  pvStack_44 = s;\n  psStack_40 = h;\n  pcStack_3c = pcVar5;\n  str_00 = ssh2_mpint_fmt((Bignum)len,&iStack_50);\n  hash_string((ssh_hash *)((int)pvVar3 + 8),str,str_00,iStack_50);\n                    /* WARNING: Subroutine does not return */\n  safefree(str_00);\n}" primitive_type (function_declarator "hash_string(ssh_hash *h,void *s,void *str,int len)" identifier (parameter_list "(ssh_hash *h,void *s,void *str,int len)" ( (parameter_declaration "ssh_hash *h" type_identifier (pointer_declarator "*h" * identifier)) , (parameter_declaration "void *s" primitive_type (pointer_declarator "*s" * identifier)) , (parameter_declaration "void *str" primitive_type (pointer_declarator "*str" * identifier)) , (parameter_declaration "int len" primitive_type identifier) ))) (compound_statement "{\n  undefined *puVar1;\n  int iVar2;\n  uchar *str_00;\n  void *pvVar3;\n  undefined *puVar4;\n  code *pcVar5;\n  int iStack_50;\n  undefined4 uStack_4c;\n  undefined *puStack_48;\n  void *pvStack_44;\n  ssh_hash *psStack_40;\n  code *pcStack_3c;\n  uchar lenblk [4];\n  \n  puVar1 = PTR___stack_chk_guard_000b0c9c;\n  iVar2 = *(int *)PTR___stack_chk_guard_000b0c9c;\n  lenblk = (uchar  [4])len;\n  (*h->init)(s,lenblk,4);\n  pvVar3 = s;\n  (*h->init)();\n  if (iVar2 == *(int *)puVar1) {\n    return;\n  }\n  pcVar5 = hash_mpint;\n  puVar4 = PTR___stack_chk_fail_000b0c70;\n  (*(code *)PTR___stack_chk_fail_000b0c70)();\n  puStack_48 = puVar1;\n  uStack_4c = **(undefined4 **)(puVar4 + 0x7748c);\n  pvStack_44 = s;\n  psStack_40 = h;\n  pcStack_3c = pcVar5;\n  str_00 = ssh2_mpint_fmt((Bignum)len,&iStack_50);\n  hash_string((ssh_hash *)((int)pvVar3 + 8),str,str_00,iStack_50);\n                    /* WARNING: Subroutine does not return */\n  safefree(str_00);\n}" { (declaration "undefined *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "uchar *str_00;" type_identifier (pointer_declarator "*str_00" * identifier) ;) (declaration "void *pvVar3;" primitive_type (pointer_declarator "*pvVar3" * identifier) ;) (declaration "undefined *puVar4;" type_identifier (pointer_declarator "*puVar4" * identifier) ;) (declaration "code *pcVar5;" type_identifier (pointer_declarator "*pcVar5" * identifier) ;) (declaration "int iStack_50;" primitive_type identifier ;) (declaration "undefined4 uStack_4c;" type_identifier identifier ;) (declaration "undefined *puStack_48;" type_identifier (pointer_declarator "*puStack_48" * identifier) ;) (declaration "void *pvStack_44;" primitive_type (pointer_declarator "*pvStack_44" * identifier) ;) (declaration "ssh_hash *psStack_40;" type_identifier (pointer_declarator "*psStack_40" * identifier) ;) (declaration "code *pcStack_3c;" type_identifier (pointer_declarator "*pcStack_3c" * identifier) ;) (declaration "uchar lenblk [4];" type_identifier (array_declarator "lenblk [4]" identifier [ number_literal ]) ;) (expression_statement "puVar1 = PTR___stack_chk_guard_000b0c9c;" (assignment_expression "puVar1 = PTR___stack_chk_guard_000b0c9c" identifier = identifier) ;) (expression_statement "iVar2 = *(int *)PTR___stack_chk_guard_000b0c9c;" (assignment_expression "iVar2 = *(int *)PTR___stack_chk_guard_000b0c9c" identifier = (pointer_expression "*(int *)PTR___stack_chk_guard_000b0c9c" * (cast_expression "(int *)PTR___stack_chk_guard_000b0c9c" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) ;) (expression_statement "lenblk = (uchar  [4])len;" (assignment_expression "lenblk = (uchar  [4])len" identifier = (cast_expression "(uchar  [4])len" ( (type_descriptor "uchar  [4]" type_identifier (abstract_array_declarator "[4]" [ number_literal ])) ) identifier)) ;) (expression_statement "(*h->init)(s,lenblk,4);" (call_expression "(*h->init)(s,lenblk,4)" (parenthesized_expression "(*h->init)" ( (pointer_expression "*h->init" * (field_expression "h->init" identifier -> field_identifier)) )) (argument_list "(s,lenblk,4)" ( identifier , identifier , number_literal ))) ;) (expression_statement "pvVar3 = s;" (assignment_expression "pvVar3 = s" identifier = identifier) ;) (expression_statement "(*h->init)();" (call_expression "(*h->init)()" (parenthesized_expression "(*h->init)" ( (pointer_expression "*h->init" * (field_expression "h->init" identifier -> field_identifier)) )) (argument_list "()" ( ))) ;) (if_statement "if (iVar2 == *(int *)puVar1) {\n    return;\n  }" if (parenthesized_expression "(iVar2 == *(int *)puVar1)" ( (binary_expression "iVar2 == *(int *)puVar1" identifier == (pointer_expression "*(int *)puVar1" * (cast_expression "(int *)puVar1" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) (expression_statement "pcVar5 = hash_mpint;" (assignment_expression "pcVar5 = hash_mpint" identifier = identifier) ;) (expression_statement "puVar4 = PTR___stack_chk_fail_000b0c70;" (assignment_expression "puVar4 = PTR___stack_chk_fail_000b0c70" identifier = identifier) ;) (expression_statement "(*(code *)PTR___stack_chk_fail_000b0c70)();" (call_expression "(*(code *)PTR___stack_chk_fail_000b0c70)()" (parenthesized_expression "(*(code *)PTR___stack_chk_fail_000b0c70)" ( (pointer_expression "*(code *)PTR___stack_chk_fail_000b0c70" * (cast_expression "(code *)PTR___stack_chk_fail_000b0c70" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))) ;) (expression_statement "puStack_48 = puVar1;" (assignment_expression "puStack_48 = puVar1" identifier = identifier) ;) (expression_statement "uStack_4c = **(undefined4 **)(puVar4 + 0x7748c);" (assignment_expression "uStack_4c = **(undefined4 **)(puVar4 + 0x7748c)" identifier = (pointer_expression "**(undefined4 **)(puVar4 + 0x7748c)" * (pointer_expression "*(undefined4 **)(puVar4 + 0x7748c)" * (cast_expression "(undefined4 **)(puVar4 + 0x7748c)" ( (type_descriptor "undefined4 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(puVar4 + 0x7748c)" ( (binary_expression "puVar4 + 0x7748c" identifier + number_literal) )))))) ;) (expression_statement "pvStack_44 = s;" (assignment_expression "pvStack_44 = s" identifier = identifier) ;) (expression_statement "psStack_40 = h;" (assignment_expression "psStack_40 = h" identifier = identifier) ;) (expression_statement "pcStack_3c = pcVar5;" (assignment_expression "pcStack_3c = pcVar5" identifier = identifier) ;) (expression_statement "str_00 = ssh2_mpint_fmt((Bignum)len,&iStack_50);" (assignment_expression "str_00 = ssh2_mpint_fmt((Bignum)len,&iStack_50)" identifier = (call_expression "ssh2_mpint_fmt((Bignum)len,&iStack_50)" identifier (argument_list "((Bignum)len,&iStack_50)" ( (cast_expression "(Bignum)len" ( (type_descriptor "Bignum" type_identifier) ) identifier) , (pointer_expression "&iStack_50" & identifier) )))) ;) (expression_statement "hash_string((ssh_hash *)((int)pvVar3 + 8),str,str_00,iStack_50);" (call_expression "hash_string((ssh_hash *)((int)pvVar3 + 8),str,str_00,iStack_50)" identifier (argument_list "((ssh_hash *)((int)pvVar3 + 8),str,str_00,iStack_50)" ( (cast_expression "(ssh_hash *)((int)pvVar3 + 8)" ( (type_descriptor "ssh_hash *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)pvVar3 + 8)" ( (binary_expression "(int)pvVar3 + 8" (cast_expression "(int)pvVar3" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) ))) , identifier , identifier , identifier ))) ;) comment (expression_statement "safefree(str_00);" (call_expression "safefree(str_00)" identifier (argument_list "(str_00)" ( identifier ))) ;) })))
(translation_unit "int FUN_0003975c(undefined4 *param_1,int param_2,undefined4 param_3,undefined4 param_4)\n\n{\n  undefined *puVar1;\n  int iVar2;\n  int iVar3;\n  int iVar4;\n  int iVar5;\n  undefined4 uVar6;\n  undefined4 uVar7;\n  int *piVar8;\n  undefined4 *puVar9;\n  undefined *puVar10;\n  code *pcVar11;\n  undefined1 auStack_5c [4];\n  undefined *puStack_58;\n  undefined1 auStack_50 [4];\n  int iStack_4c;\n  undefined *puStack_48;\n  int iStack_44;\n  undefined4 *puStack_40;\n  code *pcStack_3c;\n  undefined4 local_20;\n  int local_1c;\n  \n  puVar1 = PTR___stack_chk_guard_000b0c9c;\n  local_1c = *(int *)PTR___stack_chk_guard_000b0c9c;\n  local_20 = param_4;\n  (*(code *)*param_1)(param_2,&local_20,4);\n  iVar4 = param_2;\n  (*(code *)*param_1)(param_2,param_3,param_4);\n  iVar2 = *(int *)puVar1;\n  if (local_1c == iVar2) {\n    return iVar2;\n  }\n  pcVar11 = FUN_00039810;\n  puVar10 = PTR___stack_chk_fail_000b0c70;\n  (*(code *)PTR___stack_chk_fail_000b0c70)();\n  puStack_58 = puVar10 + 0x7e940;\n  puStack_48 = puVar1;\n  piVar8 = *(int **)(puVar10 + 0x7748c);\n  iStack_4c = *piVar8;\n  iStack_44 = param_2;\n  puStack_40 = param_1;\n  pcStack_3c = pcVar11;\n  iVar3 = FUN_000371ac(param_4,auStack_50);\n  iVar2 = iVar3;\n  FUN_0003975c(iVar4 + 8,param_3,iVar3);\n  safefree();\n  iVar4 = *piVar8;\n  if (iStack_4c == iVar4) {\n    return iVar4;\n  }\n  (**(code **)(puStack_58 + -0x74e0))();\n  puVar1 = puStack_58;\n  if (puStack_58 == (undefined *)0x0) {\n    return 0;\n  }\n  puVar9 = *(undefined4 **)(*(int *)(iVar3 + 0x98) + 0xc);\n  iVar4 = puVar9[5];\n  if (iVar4 == 0) {\n    trap(7);\n  }\n  iVar4 = ((int)(puStack_58 + iVar4 + -1) / iVar4) * iVar4;\n  iVar5 = safemalloc(iVar4,1);\n  uVar6 = (*(code *)*puVar9)();\n  if ((*(uint *)(iVar3 + 0x50) & 0x20) == 0) {\n    FUN_00039810(puVar9,uVar6,param_3);\n    pcVar11 = (code *)puVar9[2];\n  }\n  else {\n    pcVar11 = (code *)puVar9[2];\n  }\n  (*pcVar11)(uVar6,iVar2,puVar9[5]);\n  (*(code *)puVar9[2])(uVar6,auStack_5c,1);\n  (*(code *)puVar9[2])(uVar6,iVar3 + 0xa4,*(undefined4 *)(iVar3 + 0xe4));\n  (*(code *)puVar9[3])(uVar6,iVar5);\n  if ((int)puVar9[5] < iVar4) {\n    uVar6 = (*(code *)*puVar9)();\n    if ((*(uint *)(iVar3 + 0x50) & 0x20) == 0) {\n      FUN_00039810(puVar9,uVar6,param_3);\n      uVar7 = puVar9[5];\n    }\n    else {\n      uVar7 = puVar9[5];\n    }\n    (*(code *)puVar9[2])(uVar6,iVar2,uVar7);\n    iVar2 = puVar9[5];\n    if (iVar2 < iVar4) {\n      iVar3 = 0;\n      do {\n        (*(code *)puVar9[2])(uVar6,iVar5 + iVar3);\n        uVar7 = (*(code *)puVar9[1])(uVar6);\n        (*(code *)puVar9[3])(uVar7,iVar5 + iVar2);\n        iVar2 = iVar2 + puVar9[5];\n        iVar3 = iVar2 - puVar9[5];\n      } while (iVar2 < iVar4);\n    }\n    (*(code *)puVar9[4])(uVar6);\n  }\n  if (iVar4 <= (int)puVar1) {\n    return iVar5;\n  }\n  smemclr(puVar1 + iVar5,iVar4 - (int)puVar1);\n  return iVar5;\n}\n\n" (function_definition "int FUN_0003975c(undefined4 *param_1,int param_2,undefined4 param_3,undefined4 param_4)\n\n{\n  undefined *puVar1;\n  int iVar2;\n  int iVar3;\n  int iVar4;\n  int iVar5;\n  undefined4 uVar6;\n  undefined4 uVar7;\n  int *piVar8;\n  undefined4 *puVar9;\n  undefined *puVar10;\n  code *pcVar11;\n  undefined1 auStack_5c [4];\n  undefined *puStack_58;\n  undefined1 auStack_50 [4];\n  int iStack_4c;\n  undefined *puStack_48;\n  int iStack_44;\n  undefined4 *puStack_40;\n  code *pcStack_3c;\n  undefined4 local_20;\n  int local_1c;\n  \n  puVar1 = PTR___stack_chk_guard_000b0c9c;\n  local_1c = *(int *)PTR___stack_chk_guard_000b0c9c;\n  local_20 = param_4;\n  (*(code *)*param_1)(param_2,&local_20,4);\n  iVar4 = param_2;\n  (*(code *)*param_1)(param_2,param_3,param_4);\n  iVar2 = *(int *)puVar1;\n  if (local_1c == iVar2) {\n    return iVar2;\n  }\n  pcVar11 = FUN_00039810;\n  puVar10 = PTR___stack_chk_fail_000b0c70;\n  (*(code *)PTR___stack_chk_fail_000b0c70)();\n  puStack_58 = puVar10 + 0x7e940;\n  puStack_48 = puVar1;\n  piVar8 = *(int **)(puVar10 + 0x7748c);\n  iStack_4c = *piVar8;\n  iStack_44 = param_2;\n  puStack_40 = param_1;\n  pcStack_3c = pcVar11;\n  iVar3 = FUN_000371ac(param_4,auStack_50);\n  iVar2 = iVar3;\n  FUN_0003975c(iVar4 + 8,param_3,iVar3);\n  safefree();\n  iVar4 = *piVar8;\n  if (iStack_4c == iVar4) {\n    return iVar4;\n  }\n  (**(code **)(puStack_58 + -0x74e0))();\n  puVar1 = puStack_58;\n  if (puStack_58 == (undefined *)0x0) {\n    return 0;\n  }\n  puVar9 = *(undefined4 **)(*(int *)(iVar3 + 0x98) + 0xc);\n  iVar4 = puVar9[5];\n  if (iVar4 == 0) {\n    trap(7);\n  }\n  iVar4 = ((int)(puStack_58 + iVar4 + -1) / iVar4) * iVar4;\n  iVar5 = safemalloc(iVar4,1);\n  uVar6 = (*(code *)*puVar9)();\n  if ((*(uint *)(iVar3 + 0x50) & 0x20) == 0) {\n    FUN_00039810(puVar9,uVar6,param_3);\n    pcVar11 = (code *)puVar9[2];\n  }\n  else {\n    pcVar11 = (code *)puVar9[2];\n  }\n  (*pcVar11)(uVar6,iVar2,puVar9[5]);\n  (*(code *)puVar9[2])(uVar6,auStack_5c,1);\n  (*(code *)puVar9[2])(uVar6,iVar3 + 0xa4,*(undefined4 *)(iVar3 + 0xe4));\n  (*(code *)puVar9[3])(uVar6,iVar5);\n  if ((int)puVar9[5] < iVar4) {\n    uVar6 = (*(code *)*puVar9)();\n    if ((*(uint *)(iVar3 + 0x50) & 0x20) == 0) {\n      FUN_00039810(puVar9,uVar6,param_3);\n      uVar7 = puVar9[5];\n    }\n    else {\n      uVar7 = puVar9[5];\n    }\n    (*(code *)puVar9[2])(uVar6,iVar2,uVar7);\n    iVar2 = puVar9[5];\n    if (iVar2 < iVar4) {\n      iVar3 = 0;\n      do {\n        (*(code *)puVar9[2])(uVar6,iVar5 + iVar3);\n        uVar7 = (*(code *)puVar9[1])(uVar6);\n        (*(code *)puVar9[3])(uVar7,iVar5 + iVar2);\n        iVar2 = iVar2 + puVar9[5];\n        iVar3 = iVar2 - puVar9[5];\n      } while (iVar2 < iVar4);\n    }\n    (*(code *)puVar9[4])(uVar6);\n  }\n  if (iVar4 <= (int)puVar1) {\n    return iVar5;\n  }\n  smemclr(puVar1 + iVar5,iVar4 - (int)puVar1);\n  return iVar5;\n}" primitive_type (function_declarator "FUN_0003975c(undefined4 *param_1,int param_2,undefined4 param_3,undefined4 param_4)" identifier (parameter_list "(undefined4 *param_1,int param_2,undefined4 param_3,undefined4 param_4)" ( (parameter_declaration "undefined4 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "undefined4 param_3" type_identifier identifier) , (parameter_declaration "undefined4 param_4" type_identifier identifier) ))) (compound_statement "{\n  undefined *puVar1;\n  int iVar2;\n  int iVar3;\n  int iVar4;\n  int iVar5;\n  undefined4 uVar6;\n  undefined4 uVar7;\n  int *piVar8;\n  undefined4 *puVar9;\n  undefined *puVar10;\n  code *pcVar11;\n  undefined1 auStack_5c [4];\n  undefined *puStack_58;\n  undefined1 auStack_50 [4];\n  int iStack_4c;\n  undefined *puStack_48;\n  int iStack_44;\n  undefined4 *puStack_40;\n  code *pcStack_3c;\n  undefined4 local_20;\n  int local_1c;\n  \n  puVar1 = PTR___stack_chk_guard_000b0c9c;\n  local_1c = *(int *)PTR___stack_chk_guard_000b0c9c;\n  local_20 = param_4;\n  (*(code *)*param_1)(param_2,&local_20,4);\n  iVar4 = param_2;\n  (*(code *)*param_1)(param_2,param_3,param_4);\n  iVar2 = *(int *)puVar1;\n  if (local_1c == iVar2) {\n    return iVar2;\n  }\n  pcVar11 = FUN_00039810;\n  puVar10 = PTR___stack_chk_fail_000b0c70;\n  (*(code *)PTR___stack_chk_fail_000b0c70)();\n  puStack_58 = puVar10 + 0x7e940;\n  puStack_48 = puVar1;\n  piVar8 = *(int **)(puVar10 + 0x7748c);\n  iStack_4c = *piVar8;\n  iStack_44 = param_2;\n  puStack_40 = param_1;\n  pcStack_3c = pcVar11;\n  iVar3 = FUN_000371ac(param_4,auStack_50);\n  iVar2 = iVar3;\n  FUN_0003975c(iVar4 + 8,param_3,iVar3);\n  safefree();\n  iVar4 = *piVar8;\n  if (iStack_4c == iVar4) {\n    return iVar4;\n  }\n  (**(code **)(puStack_58 + -0x74e0))();\n  puVar1 = puStack_58;\n  if (puStack_58 == (undefined *)0x0) {\n    return 0;\n  }\n  puVar9 = *(undefined4 **)(*(int *)(iVar3 + 0x98) + 0xc);\n  iVar4 = puVar9[5];\n  if (iVar4 == 0) {\n    trap(7);\n  }\n  iVar4 = ((int)(puStack_58 + iVar4 + -1) / iVar4) * iVar4;\n  iVar5 = safemalloc(iVar4,1);\n  uVar6 = (*(code *)*puVar9)();\n  if ((*(uint *)(iVar3 + 0x50) & 0x20) == 0) {\n    FUN_00039810(puVar9,uVar6,param_3);\n    pcVar11 = (code *)puVar9[2];\n  }\n  else {\n    pcVar11 = (code *)puVar9[2];\n  }\n  (*pcVar11)(uVar6,iVar2,puVar9[5]);\n  (*(code *)puVar9[2])(uVar6,auStack_5c,1);\n  (*(code *)puVar9[2])(uVar6,iVar3 + 0xa4,*(undefined4 *)(iVar3 + 0xe4));\n  (*(code *)puVar9[3])(uVar6,iVar5);\n  if ((int)puVar9[5] < iVar4) {\n    uVar6 = (*(code *)*puVar9)();\n    if ((*(uint *)(iVar3 + 0x50) & 0x20) == 0) {\n      FUN_00039810(puVar9,uVar6,param_3);\n      uVar7 = puVar9[5];\n    }\n    else {\n      uVar7 = puVar9[5];\n    }\n    (*(code *)puVar9[2])(uVar6,iVar2,uVar7);\n    iVar2 = puVar9[5];\n    if (iVar2 < iVar4) {\n      iVar3 = 0;\n      do {\n        (*(code *)puVar9[2])(uVar6,iVar5 + iVar3);\n        uVar7 = (*(code *)puVar9[1])(uVar6);\n        (*(code *)puVar9[3])(uVar7,iVar5 + iVar2);\n        iVar2 = iVar2 + puVar9[5];\n        iVar3 = iVar2 - puVar9[5];\n      } while (iVar2 < iVar4);\n    }\n    (*(code *)puVar9[4])(uVar6);\n  }\n  if (iVar4 <= (int)puVar1) {\n    return iVar5;\n  }\n  smemclr(puVar1 + iVar5,iVar4 - (int)puVar1);\n  return iVar5;\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 "int iVar5;" primitive_type identifier ;) (declaration "undefined4 uVar6;" type_identifier identifier ;) (declaration "undefined4 uVar7;" type_identifier identifier ;) (declaration "int *piVar8;" primitive_type (pointer_declarator "*piVar8" * identifier) ;) (declaration "undefined4 *puVar9;" type_identifier (pointer_declarator "*puVar9" * identifier) ;) (declaration "undefined *puVar10;" type_identifier (pointer_declarator "*puVar10" * identifier) ;) (declaration "code *pcVar11;" type_identifier (pointer_declarator "*pcVar11" * identifier) ;) (declaration "undefined1 auStack_5c [4];" type_identifier (array_declarator "auStack_5c [4]" identifier [ number_literal ]) ;) (declaration "undefined *puStack_58;" type_identifier (pointer_declarator "*puStack_58" * identifier) ;) (declaration "undefined1 auStack_50 [4];" type_identifier (array_declarator "auStack_50 [4]" identifier [ number_literal ]) ;) (declaration "int iStack_4c;" primitive_type identifier ;) (declaration "undefined *puStack_48;" type_identifier (pointer_declarator "*puStack_48" * identifier) ;) (declaration "int iStack_44;" primitive_type identifier ;) (declaration "undefined4 *puStack_40;" type_identifier (pointer_declarator "*puStack_40" * identifier) ;) (declaration "code *pcStack_3c;" type_identifier (pointer_declarator "*pcStack_3c" * identifier) ;) (declaration "undefined4 local_20;" type_identifier identifier ;) (declaration "int local_1c;" primitive_type identifier ;) (expression_statement "puVar1 = PTR___stack_chk_guard_000b0c9c;" (assignment_expression "puVar1 = PTR___stack_chk_guard_000b0c9c" identifier = identifier) ;) (expression_statement "local_1c = *(int *)PTR___stack_chk_guard_000b0c9c;" (assignment_expression "local_1c = *(int *)PTR___stack_chk_guard_000b0c9c" identifier = (pointer_expression "*(int *)PTR___stack_chk_guard_000b0c9c" * (cast_expression "(int *)PTR___stack_chk_guard_000b0c9c" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) ;) (expression_statement "local_20 = param_4;" (assignment_expression "local_20 = param_4" identifier = identifier) ;) (expression_statement "(*(code *)*param_1)(param_2,&local_20,4);" (call_expression "(*(code *)*param_1)(param_2,&local_20,4)" (parenthesized_expression "(*(code *)*param_1)" ( (pointer_expression "*(code *)*param_1" * (cast_expression "(code *)*param_1" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier))) )) (argument_list "(param_2,&local_20,4)" ( identifier , (pointer_expression "&local_20" & identifier) , number_literal ))) ;) (expression_statement "iVar4 = param_2;" (assignment_expression "iVar4 = param_2" identifier = identifier) ;) (expression_statement "(*(code *)*param_1)(param_2,param_3,param_4);" (call_expression "(*(code *)*param_1)(param_2,param_3,param_4)" (parenthesized_expression "(*(code *)*param_1)" ( (pointer_expression "*(code *)*param_1" * (cast_expression "(code *)*param_1" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier))) )) (argument_list "(param_2,param_3,param_4)" ( identifier , identifier , identifier ))) ;) (expression_statement "iVar2 = *(int *)puVar1;" (assignment_expression "iVar2 = *(int *)puVar1" identifier = (pointer_expression "*(int *)puVar1" * (cast_expression "(int *)puVar1" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) ;) (if_statement "if (local_1c == iVar2) {\n    return iVar2;\n  }" if (parenthesized_expression "(local_1c == iVar2)" ( (binary_expression "local_1c == iVar2" identifier == identifier) )) (compound_statement "{\n    return iVar2;\n  }" { (return_statement "return iVar2;" return identifier ;) })) (expression_statement "pcVar11 = FUN_00039810;" (assignment_expression "pcVar11 = FUN_00039810" identifier = identifier) ;) (expression_statement "puVar10 = PTR___stack_chk_fail_000b0c70;" (assignment_expression "puVar10 = PTR___stack_chk_fail_000b0c70" identifier = identifier) ;) (expression_statement "(*(code *)PTR___stack_chk_fail_000b0c70)();" (call_expression "(*(code *)PTR___stack_chk_fail_000b0c70)()" (parenthesized_expression "(*(code *)PTR___stack_chk_fail_000b0c70)" ( (pointer_expression "*(code *)PTR___stack_chk_fail_000b0c70" * (cast_expression "(code *)PTR___stack_chk_fail_000b0c70" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))) ;) (expression_statement "puStack_58 = puVar10 + 0x7e940;" (assignment_expression "puStack_58 = puVar10 + 0x7e940" identifier = (binary_expression "puVar10 + 0x7e940" identifier + number_literal)) ;) (expression_statement "puStack_48 = puVar1;" (assignment_expression "puStack_48 = puVar1" identifier = identifier) ;) (expression_statement "piVar8 = *(int **)(puVar10 + 0x7748c);" (assignment_expression "piVar8 = *(int **)(puVar10 + 0x7748c)" identifier = (pointer_expression "*(int **)(puVar10 + 0x7748c)" * (cast_expression "(int **)(puVar10 + 0x7748c)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(puVar10 + 0x7748c)" ( (binary_expression "puVar10 + 0x7748c" identifier + number_literal) ))))) ;) (expression_statement "iStack_4c = *piVar8;" (assignment_expression "iStack_4c = *piVar8" identifier = (pointer_expression "*piVar8" * identifier)) ;) (expression_statement "iStack_44 = param_2;" (assignment_expression "iStack_44 = param_2" identifier = identifier) ;) (expression_statement "puStack_40 = param_1;" (assignment_expression "puStack_40 = param_1" identifier = identifier) ;) (expression_statement "pcStack_3c = pcVar11;" (assignment_expression "pcStack_3c = pcVar11" identifier = identifier) ;) (expression_statement "iVar3 = FUN_000371ac(param_4,auStack_50);" (assignment_expression "iVar3 = FUN_000371ac(param_4,auStack_50)" identifier = (call_expression "FUN_000371ac(param_4,auStack_50)" identifier (argument_list "(param_4,auStack_50)" ( identifier , identifier )))) ;) (expression_statement "iVar2 = iVar3;" (assignment_expression "iVar2 = iVar3" identifier = identifier) ;) (expression_statement "FUN_0003975c(iVar4 + 8,param_3,iVar3);" (call_expression "FUN_0003975c(iVar4 + 8,param_3,iVar3)" identifier (argument_list "(iVar4 + 8,param_3,iVar3)" ( (binary_expression "iVar4 + 8" identifier + number_literal) , identifier , identifier ))) ;) (expression_statement "safefree();" (call_expression "safefree()" identifier (argument_list "()" ( ))) ;) (expression_statement "iVar4 = *piVar8;" (assignment_expression "iVar4 = *piVar8" identifier = (pointer_expression "*piVar8" * identifier)) ;) (if_statement "if (iStack_4c == iVar4) {\n    return iVar4;\n  }" if (parenthesized_expression "(iStack_4c == iVar4)" ( (binary_expression "iStack_4c == iVar4" identifier == identifier) )) (compound_statement "{\n    return iVar4;\n  }" { (return_statement "return iVar4;" return identifier ;) })) (expression_statement "(**(code **)(puStack_58 + -0x74e0))();" (call_expression "(**(code **)(puStack_58 + -0x74e0))()" (parenthesized_expression "(**(code **)(puStack_58 + -0x74e0))" ( (pointer_expression "**(code **)(puStack_58 + -0x74e0)" * (pointer_expression "*(code **)(puStack_58 + -0x74e0)" * (cast_expression "(code **)(puStack_58 + -0x74e0)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(puStack_58 + -0x74e0)" ( (binary_expression "puStack_58 + -0x74e0" identifier + number_literal) ))))) )) (argument_list "()" ( ))) ;) (expression_statement "puVar1 = puStack_58;" (assignment_expression "puVar1 = puStack_58" identifier = identifier) ;) (if_statement "if (puStack_58 == (undefined *)0x0) {\n    return 0;\n  }" if (parenthesized_expression "(puStack_58 == (undefined *)0x0)" ( (binary_expression "puStack_58 == (undefined *)0x0" identifier == (cast_expression "(undefined *)0x0" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    return 0;\n  }" { (return_statement "return 0;" return number_literal ;) })) (expression_statement "puVar9 = *(undefined4 **)(*(int *)(iVar3 + 0x98) + 0xc);" (assignment_expression "puVar9 = *(undefined4 **)(*(int *)(iVar3 + 0x98) + 0xc)" identifier = (pointer_expression "*(undefined4 **)(*(int *)(iVar3 + 0x98) + 0xc)" * (cast_expression "(undefined4 **)(*(int *)(iVar3 + 0x98) + 0xc)" ( (type_descriptor "undefined4 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*(int *)(iVar3 + 0x98) + 0xc)" ( (binary_expression "*(int *)(iVar3 + 0x98) + 0xc" (pointer_expression "*(int *)(iVar3 + 0x98)" * (cast_expression "(int *)(iVar3 + 0x98)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 0x98)" ( (binary_expression "iVar3 + 0x98" identifier + number_literal) )))) + number_literal) ))))) ;) (expression_statement "iVar4 = puVar9[5];" (assignment_expression "iVar4 = puVar9[5]" identifier = (subscript_expression "puVar9[5]" identifier [ number_literal ])) ;) (if_statement "if (iVar4 == 0) {\n    trap(7);\n  }" if (parenthesized_expression "(iVar4 == 0)" ( (binary_expression "iVar4 == 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 "iVar4 = ((int)(puStack_58 + iVar4 + -1) / iVar4) * iVar4;" (assignment_expression "iVar4 = ((int)(puStack_58 + iVar4 + -1) / iVar4) * iVar4" identifier = (binary_expression "((int)(puStack_58 + iVar4 + -1) / iVar4) * iVar4" (parenthesized_expression "((int)(puStack_58 + iVar4 + -1) / iVar4)" ( (binary_expression "(int)(puStack_58 + iVar4 + -1) / iVar4" (cast_expression "(int)(puStack_58 + iVar4 + -1)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(puStack_58 + iVar4 + -1)" ( (binary_expression "puStack_58 + iVar4 + -1" (binary_expression "puStack_58 + iVar4" identifier + identifier) + number_literal) ))) / identifier) )) * identifier)) ;) (expression_statement "iVar5 = safemalloc(iVar4,1);" (assignment_expression "iVar5 = safemalloc(iVar4,1)" identifier = (call_expression "safemalloc(iVar4,1)" identifier (argument_list "(iVar4,1)" ( identifier , number_literal )))) ;) (expression_statement "uVar6 = (*(code *)*puVar9)();" (assignment_expression "uVar6 = (*(code *)*puVar9)()" identifier = (call_expression "(*(code *)*puVar9)()" (parenthesized_expression "(*(code *)*puVar9)" ( (pointer_expression "*(code *)*puVar9" * (cast_expression "(code *)*puVar9" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*puVar9" * identifier))) )) (argument_list "()" ( )))) ;) (if_statement "if ((*(uint *)(iVar3 + 0x50) & 0x20) == 0) {\n    FUN_00039810(puVar9,uVar6,param_3);\n    pcVar11 = (code *)puVar9[2];\n  }\n  else {\n    pcVar11 = (code *)puVar9[2];\n  }" if (parenthesized_expression "((*(uint *)(iVar3 + 0x50) & 0x20) == 0)" ( (binary_expression "(*(uint *)(iVar3 + 0x50) & 0x20) == 0" (parenthesized_expression "(*(uint *)(iVar3 + 0x50) & 0x20)" ( (binary_expression "*(uint *)(iVar3 + 0x50) & 0x20" (pointer_expression "*(uint *)(iVar3 + 0x50)" * (cast_expression "(uint *)(iVar3 + 0x50)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 0x50)" ( (binary_expression "iVar3 + 0x50" identifier + number_literal) )))) & number_literal) )) == number_literal) )) (compound_statement "{\n    FUN_00039810(puVar9,uVar6,param_3);\n    pcVar11 = (code *)puVar9[2];\n  }" { (expression_statement "FUN_00039810(puVar9,uVar6,param_3);" (call_expression "FUN_00039810(puVar9,uVar6,param_3)" identifier (argument_list "(puVar9,uVar6,param_3)" ( identifier , identifier , identifier ))) ;) (expression_statement "pcVar11 = (code *)puVar9[2];" (assignment_expression "pcVar11 = (code *)puVar9[2]" identifier = (cast_expression "(code *)puVar9[2]" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "puVar9[2]" identifier [ number_literal ]))) ;) }) (else_clause "else {\n    pcVar11 = (code *)puVar9[2];\n  }" else (compound_statement "{\n    pcVar11 = (code *)puVar9[2];\n  }" { (expression_statement "pcVar11 = (code *)puVar9[2];" (assignment_expression "pcVar11 = (code *)puVar9[2]" identifier = (cast_expression "(code *)puVar9[2]" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "puVar9[2]" identifier [ number_literal ]))) ;) }))) (expression_statement "(*pcVar11)(uVar6,iVar2,puVar9[5]);" (call_expression "(*pcVar11)(uVar6,iVar2,puVar9[5])" (parenthesized_expression "(*pcVar11)" ( (pointer_expression "*pcVar11" * identifier) )) (argument_list "(uVar6,iVar2,puVar9[5])" ( identifier , identifier , (subscript_expression "puVar9[5]" identifier [ number_literal ]) ))) ;) (expression_statement "(*(code *)puVar9[2])(uVar6,auStack_5c,1);" (call_expression "(*(code *)puVar9[2])(uVar6,auStack_5c,1)" (parenthesized_expression "(*(code *)puVar9[2])" ( (pointer_expression "*(code *)puVar9[2]" * (cast_expression "(code *)puVar9[2]" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "puVar9[2]" identifier [ number_literal ]))) )) (argument_list "(uVar6,auStack_5c,1)" ( identifier , identifier , number_literal ))) ;) (expression_statement "(*(code *)puVar9[2])(uVar6,iVar3 + 0xa4,*(undefined4 *)(iVar3 + 0xe4));" (call_expression "(*(code *)puVar9[2])(uVar6,iVar3 + 0xa4,*(undefined4 *)(iVar3 + 0xe4))" (parenthesized_expression "(*(code *)puVar9[2])" ( (pointer_expression "*(code *)puVar9[2]" * (cast_expression "(code *)puVar9[2]" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "puVar9[2]" identifier [ number_literal ]))) )) (argument_list "(uVar6,iVar3 + 0xa4,*(undefined4 *)(iVar3 + 0xe4))" ( identifier , (binary_expression "iVar3 + 0xa4" identifier + number_literal) , (pointer_expression "*(undefined4 *)(iVar3 + 0xe4)" * (cast_expression "(undefined4 *)(iVar3 + 0xe4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 0xe4)" ( (binary_expression "iVar3 + 0xe4" identifier + number_literal) )))) ))) ;) (expression_statement "(*(code *)puVar9[3])(uVar6,iVar5);" (call_expression "(*(code *)puVar9[3])(uVar6,iVar5)" (parenthesized_expression "(*(code *)puVar9[3])" ( (pointer_expression "*(code *)puVar9[3]" * (cast_expression "(code *)puVar9[3]" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "puVar9[3]" identifier [ number_literal ]))) )) (argument_list "(uVar6,iVar5)" ( identifier , identifier ))) ;) (if_statement "if ((int)puVar9[5] < iVar4) {\n    uVar6 = (*(code *)*puVar9)();\n    if ((*(uint *)(iVar3 + 0x50) & 0x20) == 0) {\n      FUN_00039810(puVar9,uVar6,param_3);\n      uVar7 = puVar9[5];\n    }\n    else {\n      uVar7 = puVar9[5];\n    }\n    (*(code *)puVar9[2])(uVar6,iVar2,uVar7);\n    iVar2 = puVar9[5];\n    if (iVar2 < iVar4) {\n      iVar3 = 0;\n      do {\n        (*(code *)puVar9[2])(uVar6,iVar5 + iVar3);\n        uVar7 = (*(code *)puVar9[1])(uVar6);\n        (*(code *)puVar9[3])(uVar7,iVar5 + iVar2);\n        iVar2 = iVar2 + puVar9[5];\n        iVar3 = iVar2 - puVar9[5];\n      } while (iVar2 < iVar4);\n    }\n    (*(code *)puVar9[4])(uVar6);\n  }" if (parenthesized_expression "((int)puVar9[5] < iVar4)" ( (binary_expression "(int)puVar9[5] < iVar4" (cast_expression "(int)puVar9[5]" ( (type_descriptor "int" primitive_type) ) (subscript_expression "puVar9[5]" identifier [ number_literal ])) < identifier) )) (compound_statement "{\n    uVar6 = (*(code *)*puVar9)();\n    if ((*(uint *)(iVar3 + 0x50) & 0x20) == 0) {\n      FUN_00039810(puVar9,uVar6,param_3);\n      uVar7 = puVar9[5];\n    }\n    else {\n      uVar7 = puVar9[5];\n    }\n    (*(code *)puVar9[2])(uVar6,iVar2,uVar7);\n    iVar2 = puVar9[5];\n    if (iVar2 < iVar4) {\n      iVar3 = 0;\n      do {\n        (*(code *)puVar9[2])(uVar6,iVar5 + iVar3);\n        uVar7 = (*(code *)puVar9[1])(uVar6);\n        (*(code *)puVar9[3])(uVar7,iVar5 + iVar2);\n        iVar2 = iVar2 + puVar9[5];\n        iVar3 = iVar2 - puVar9[5];\n      } while (iVar2 < iVar4);\n    }\n    (*(code *)puVar9[4])(uVar6);\n  }" { (expression_statement "uVar6 = (*(code *)*puVar9)();" (assignment_expression "uVar6 = (*(code *)*puVar9)()" identifier = (call_expression "(*(code *)*puVar9)()" (parenthesized_expression "(*(code *)*puVar9)" ( (pointer_expression "*(code *)*puVar9" * (cast_expression "(code *)*puVar9" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*puVar9" * identifier))) )) (argument_list "()" ( )))) ;) (if_statement "if ((*(uint *)(iVar3 + 0x50) & 0x20) == 0) {\n      FUN_00039810(puVar9,uVar6,param_3);\n      uVar7 = puVar9[5];\n    }\n    else {\n      uVar7 = puVar9[5];\n    }" if (parenthesized_expression "((*(uint *)(iVar3 + 0x50) & 0x20) == 0)" ( (binary_expression "(*(uint *)(iVar3 + 0x50) & 0x20) == 0" (parenthesized_expression "(*(uint *)(iVar3 + 0x50) & 0x20)" ( (binary_expression "*(uint *)(iVar3 + 0x50) & 0x20" (pointer_expression "*(uint *)(iVar3 + 0x50)" * (cast_expression "(uint *)(iVar3 + 0x50)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 0x50)" ( (binary_expression "iVar3 + 0x50" identifier + number_literal) )))) & number_literal) )) == number_literal) )) (compound_statement "{\n      FUN_00039810(puVar9,uVar6,param_3);\n      uVar7 = puVar9[5];\n    }" { (expression_statement "FUN_00039810(puVar9,uVar6,param_3);" (call_expression "FUN_00039810(puVar9,uVar6,param_3)" identifier (argument_list "(puVar9,uVar6,param_3)" ( identifier , identifier , identifier ))) ;) (expression_statement "uVar7 = puVar9[5];" (assignment_expression "uVar7 = puVar9[5]" identifier = (subscript_expression "puVar9[5]" identifier [ number_literal ])) ;) }) (else_clause "else {\n      uVar7 = puVar9[5];\n    }" else (compound_statement "{\n      uVar7 = puVar9[5];\n    }" { (expression_statement "uVar7 = puVar9[5];" (assignment_expression "uVar7 = puVar9[5]" identifier = (subscript_expression "puVar9[5]" identifier [ number_literal ])) ;) }))) (expression_statement "(*(code *)puVar9[2])(uVar6,iVar2,uVar7);" (call_expression "(*(code *)puVar9[2])(uVar6,iVar2,uVar7)" (parenthesized_expression "(*(code *)puVar9[2])" ( (pointer_expression "*(code *)puVar9[2]" * (cast_expression "(code *)puVar9[2]" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "puVar9[2]" identifier [ number_literal ]))) )) (argument_list "(uVar6,iVar2,uVar7)" ( identifier , identifier , identifier ))) ;) (expression_statement "iVar2 = puVar9[5];" (assignment_expression "iVar2 = puVar9[5]" identifier = (subscript_expression "puVar9[5]" identifier [ number_literal ])) ;) (if_statement "if (iVar2 < iVar4) {\n      iVar3 = 0;\n      do {\n        (*(code *)puVar9[2])(uVar6,iVar5 + iVar3);\n        uVar7 = (*(code *)puVar9[1])(uVar6);\n        (*(code *)puVar9[3])(uVar7,iVar5 + iVar2);\n        iVar2 = iVar2 + puVar9[5];\n        iVar3 = iVar2 - puVar9[5];\n      } while (iVar2 < iVar4);\n    }" if (parenthesized_expression "(iVar2 < iVar4)" ( (binary_expression "iVar2 < iVar4" identifier < identifier) )) (compound_statement "{\n      iVar3 = 0;\n      do {\n        (*(code *)puVar9[2])(uVar6,iVar5 + iVar3);\n        uVar7 = (*(code *)puVar9[1])(uVar6);\n        (*(code *)puVar9[3])(uVar7,iVar5 + iVar2);\n        iVar2 = iVar2 + puVar9[5];\n        iVar3 = iVar2 - puVar9[5];\n      } while (iVar2 < iVar4);\n    }" { (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" identifier = number_literal) ;) (do_statement "do {\n        (*(code *)puVar9[2])(uVar6,iVar5 + iVar3);\n        uVar7 = (*(code *)puVar9[1])(uVar6);\n        (*(code *)puVar9[3])(uVar7,iVar5 + iVar2);\n        iVar2 = iVar2 + puVar9[5];\n        iVar3 = iVar2 - puVar9[5];\n      } while (iVar2 < iVar4);" do (compound_statement "{\n        (*(code *)puVar9[2])(uVar6,iVar5 + iVar3);\n        uVar7 = (*(code *)puVar9[1])(uVar6);\n        (*(code *)puVar9[3])(uVar7,iVar5 + iVar2);\n        iVar2 = iVar2 + puVar9[5];\n        iVar3 = iVar2 - puVar9[5];\n      }" { (expression_statement "(*(code *)puVar9[2])(uVar6,iVar5 + iVar3);" (call_expression "(*(code *)puVar9[2])(uVar6,iVar5 + iVar3)" (parenthesized_expression "(*(code *)puVar9[2])" ( (pointer_expression "*(code *)puVar9[2]" * (cast_expression "(code *)puVar9[2]" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "puVar9[2]" identifier [ number_literal ]))) )) (argument_list "(uVar6,iVar5 + iVar3)" ( identifier , (binary_expression "iVar5 + iVar3" identifier + identifier) ))) ;) (expression_statement "uVar7 = (*(code *)puVar9[1])(uVar6);" (assignment_expression "uVar7 = (*(code *)puVar9[1])(uVar6)" identifier = (call_expression "(*(code *)puVar9[1])(uVar6)" (parenthesized_expression "(*(code *)puVar9[1])" ( (pointer_expression "*(code *)puVar9[1]" * (cast_expression "(code *)puVar9[1]" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "puVar9[1]" identifier [ number_literal ]))) )) (argument_list "(uVar6)" ( identifier )))) ;) (expression_statement "(*(code *)puVar9[3])(uVar7,iVar5 + iVar2);" (call_expression "(*(code *)puVar9[3])(uVar7,iVar5 + iVar2)" (parenthesized_expression "(*(code *)puVar9[3])" ( (pointer_expression "*(code *)puVar9[3]" * (cast_expression "(code *)puVar9[3]" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "puVar9[3]" identifier [ number_literal ]))) )) (argument_list "(uVar7,iVar5 + iVar2)" ( identifier , (binary_expression "iVar5 + iVar2" identifier + identifier) ))) ;) (expression_statement "iVar2 = iVar2 + puVar9[5];" (assignment_expression "iVar2 = iVar2 + puVar9[5]" identifier = (binary_expression "iVar2 + puVar9[5]" identifier + (subscript_expression "puVar9[5]" identifier [ number_literal ]))) ;) (expression_statement "iVar3 = iVar2 - puVar9[5];" (assignment_expression "iVar3 = iVar2 - puVar9[5]" identifier = (binary_expression "iVar2 - puVar9[5]" identifier - (subscript_expression "puVar9[5]" identifier [ number_literal ]))) ;) }) while (parenthesized_expression "(iVar2 < iVar4)" ( (binary_expression "iVar2 < iVar4" identifier < identifier) )) ;) })) (expression_statement "(*(code *)puVar9[4])(uVar6);" (call_expression "(*(code *)puVar9[4])(uVar6)" (parenthesized_expression "(*(code *)puVar9[4])" ( (pointer_expression "*(code *)puVar9[4]" * (cast_expression "(code *)puVar9[4]" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "puVar9[4]" identifier [ number_literal ]))) )) (argument_list "(uVar6)" ( identifier ))) ;) })) (if_statement "if (iVar4 <= (int)puVar1) {\n    return iVar5;\n  }" if (parenthesized_expression "(iVar4 <= (int)puVar1)" ( (binary_expression "iVar4 <= (int)puVar1" identifier <= (cast_expression "(int)puVar1" ( (type_descriptor "int" primitive_type) ) identifier)) )) (compound_statement "{\n    return iVar5;\n  }" { (return_statement "return iVar5;" return identifier ;) })) (expression_statement "smemclr(puVar1 + iVar5,iVar4 - (int)puVar1);" (call_expression "smemclr(puVar1 + iVar5,iVar4 - (int)puVar1)" identifier (argument_list "(puVar1 + iVar5,iVar4 - (int)puVar1)" ( (binary_expression "puVar1 + iVar5" identifier + identifier) , (binary_expression "iVar4 - (int)puVar1" identifier - (cast_expression "(int)puVar1" ( (type_descriptor "int" primitive_type) ) identifier)) ))) ;) (return_statement "return iVar5;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (array_declarator IDENT [ LIT ]) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (array_declarator IDENT [ LIT ]) ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (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 = IDENT) ;) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT))) )) (argument_list ( IDENT , (pointer_expression & IDENT) , LIT ))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT))) )) (argument_list ( IDENT , IDENT , IDENT ))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == IDENT) )) (compound_statement { (return_statement return IDENT ;) })) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( ))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = 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 ( ))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == IDENT) )) (compound_statement { (return_statement return IDENT ;) })) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (argument_list ( ))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (return_statement return LIT ;) })) (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 (cast_expression ( (type_descriptor TYPE) ) (parenthesized_expression ( (binary_expression (binary_expression IDENT + 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 IDENT <= (cast_expression ( (type_descriptor TYPE) ) IDENT)) )) (compound_statement { (return_statement return IDENT ;) })) (expression_statement (call_expression IDENT (argument_list ( (binary_expression IDENT + IDENT) , (binary_expression IDENT - (cast_expression ( (type_descriptor TYPE) ) IDENT)) ))) ;) (return_statement return IDENT ;) })))
(function_definition "int FUN_0003975c(undefined4 *param_1,int param_2,undefined4 param_3,undefined4 param_4)\n\n{\n  undefined *puVar1;\n  int iVar2;\n  int iVar3;\n  int iVar4;\n  int iVar5;\n  undefined4 uVar6;\n  undefined4 uVar7;\n  int *piVar8;\n  undefined4 *puVar9;\n  undefined *puVar10;\n  code *pcVar11;\n  undefined1 auStack_5c [4];\n  undefined *puStack_58;\n  undefined1 auStack_50 [4];\n  int iStack_4c;\n  undefined *puStack_48;\n  int iStack_44;\n  undefined4 *puStack_40;\n  code *pcStack_3c;\n  undefined4 local_20;\n  int local_1c;\n  \n  puVar1 = PTR___stack_chk_guard_000b0c9c;\n  local_1c = *(int *)PTR___stack_chk_guard_000b0c9c;\n  local_20 = param_4;\n  (*(code *)*param_1)(param_2,&local_20,4);\n  iVar4 = param_2;\n  (*(code *)*param_1)(param_2,param_3,param_4);\n  iVar2 = *(int *)puVar1;\n  if (local_1c == iVar2) {\n    return iVar2;\n  }\n  pcVar11 = FUN_00039810;\n  puVar10 = PTR___stack_chk_fail_000b0c70;\n  (*(code *)PTR___stack_chk_fail_000b0c70)();\n  puStack_58 = puVar10 + 0x7e940;\n  puStack_48 = puVar1;\n  piVar8 = *(int **)(puVar10 + 0x7748c);\n  iStack_4c = *piVar8;\n  iStack_44 = param_2;\n  puStack_40 = param_1;\n  pcStack_3c = pcVar11;\n  iVar3 = FUN_000371ac(param_4,auStack_50);\n  iVar2 = iVar3;\n  FUN_0003975c(iVar4 + 8,param_3,iVar3);\n  safefree();\n  iVar4 = *piVar8;\n  if (iStack_4c == iVar4) {\n    return iVar4;\n  }\n  (**(code **)(puStack_58 + -0x74e0))();\n  puVar1 = puStack_58;\n  if (puStack_58 == (undefined *)0x0) {\n    return 0;\n  }\n  puVar9 = *(undefined4 **)(*(int *)(iVar3 + 0x98) + 0xc);\n  iVar4 = puVar9[5];\n  if (iVar4 == 0) {\n    trap(7);\n  }\n  iVar4 = ((int)(puStack_58 + iVar4 + -1) / iVar4) * iVar4;\n  iVar5 = safemalloc(iVar4,1);\n  uVar6 = (*(code *)*puVar9)();\n  if ((*(uint *)(iVar3 + 0x50) & 0x20) == 0) {\n    FUN_00039810(puVar9,uVar6,param_3);\n    pcVar11 = (code *)puVar9[2];\n  }\n  else {\n    pcVar11 = (code *)puVar9[2];\n  }\n  (*pcVar11)(uVar6,iVar2,puVar9[5]);\n  (*(code *)puVar9[2])(uVar6,auStack_5c,1);\n  (*(code *)puVar9[2])(uVar6,iVar3 + 0xa4,*(undefined4 *)(iVar3 + 0xe4));\n  (*(code *)puVar9[3])(uVar6,iVar5);\n  if ((int)puVar9[5] < iVar4) {\n    uVar6 = (*(code *)*puVar9)();\n    if ((*(uint *)(iVar3 + 0x50) & 0x20) == 0) {\n      FUN_00039810(puVar9,uVar6,param_3);\n      uVar7 = puVar9[5];\n    }\n    else {\n      uVar7 = puVar9[5];\n    }\n    (*(code *)puVar9[2])(uVar6,iVar2,uVar7);\n    iVar2 = puVar9[5];\n    if (iVar2 < iVar4) {\n      iVar3 = 0;\n      do {\n        (*(code *)puVar9[2])(uVar6,iVar5 + iVar3);\n        uVar7 = (*(code *)puVar9[1])(uVar6);\n        (*(code *)puVar9[3])(uVar7,iVar5 + iVar2);\n        iVar2 = iVar2 + puVar9[5];\n        iVar3 = iVar2 - puVar9[5];\n      } while (iVar2 < iVar4);\n    }\n    (*(code *)puVar9[4])(uVar6);\n  }\n  if (iVar4 <= (int)puVar1) {\n    return iVar5;\n  }\n  smemclr(puVar1 + iVar5,iVar4 - (int)puVar1);\n  return iVar5;\n}" (primitive_type "int") (function_declarator "FUN_0003975c(undefined4 *param_1,int param_2,undefined4 param_3,undefined4 param_4)" (identifier "FUN_0003975c") (parameter_list "(undefined4 *param_1,int param_2,undefined4 param_3,undefined4 param_4)" (( "(") (parameter_declaration "undefined4 *param_1" (type_identifier "undefined4") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) (, ",") (parameter_declaration "undefined4 param_3" (type_identifier "undefined4") (identifier "param_3")) (, ",") (parameter_declaration "undefined4 param_4" (type_identifier "undefined4") (identifier "param_4")) () ")"))) (compound_statement "{\n  undefined *puVar1;\n  int iVar2;\n  int iVar3;\n  int iVar4;\n  int iVar5;\n  undefined4 uVar6;\n  undefined4 uVar7;\n  int *piVar8;\n  undefined4 *puVar9;\n  undefined *puVar10;\n  code *pcVar11;\n  undefined1 auStack_5c [4];\n  undefined *puStack_58;\n  undefined1 auStack_50 [4];\n  int iStack_4c;\n  undefined *puStack_48;\n  int iStack_44;\n  undefined4 *puStack_40;\n  code *pcStack_3c;\n  undefined4 local_20;\n  int local_1c;\n  \n  puVar1 = PTR___stack_chk_guard_000b0c9c;\n  local_1c = *(int *)PTR___stack_chk_guard_000b0c9c;\n  local_20 = param_4;\n  (*(code *)*param_1)(param_2,&local_20,4);\n  iVar4 = param_2;\n  (*(code *)*param_1)(param_2,param_3,param_4);\n  iVar2 = *(int *)puVar1;\n  if (local_1c == iVar2) {\n    return iVar2;\n  }\n  pcVar11 = FUN_00039810;\n  puVar10 = PTR___stack_chk_fail_000b0c70;\n  (*(code *)PTR___stack_chk_fail_000b0c70)();\n  puStack_58 = puVar10 + 0x7e940;\n  puStack_48 = puVar1;\n  piVar8 = *(int **)(puVar10 + 0x7748c);\n  iStack_4c = *piVar8;\n  iStack_44 = param_2;\n  puStack_40 = param_1;\n  pcStack_3c = pcVar11;\n  iVar3 = FUN_000371ac(param_4,auStack_50);\n  iVar2 = iVar3;\n  FUN_0003975c(iVar4 + 8,param_3,iVar3);\n  safefree();\n  iVar4 = *piVar8;\n  if (iStack_4c == iVar4) {\n    return iVar4;\n  }\n  (**(code **)(puStack_58 + -0x74e0))();\n  puVar1 = puStack_58;\n  if (puStack_58 == (undefined *)0x0) {\n    return 0;\n  }\n  puVar9 = *(undefined4 **)(*(int *)(iVar3 + 0x98) + 0xc);\n  iVar4 = puVar9[5];\n  if (iVar4 == 0) {\n    trap(7);\n  }\n  iVar4 = ((int)(puStack_58 + iVar4 + -1) / iVar4) * iVar4;\n  iVar5 = safemalloc(iVar4,1);\n  uVar6 = (*(code *)*puVar9)();\n  if ((*(uint *)(iVar3 + 0x50) & 0x20) == 0) {\n    FUN_00039810(puVar9,uVar6,param_3);\n    pcVar11 = (code *)puVar9[2];\n  }\n  else {\n    pcVar11 = (code *)puVar9[2];\n  }\n  (*pcVar11)(uVar6,iVar2,puVar9[5]);\n  (*(code *)puVar9[2])(uVar6,auStack_5c,1);\n  (*(code *)puVar9[2])(uVar6,iVar3 + 0xa4,*(undefined4 *)(iVar3 + 0xe4));\n  (*(code *)puVar9[3])(uVar6,iVar5);\n  if ((int)puVar9[5] < iVar4) {\n    uVar6 = (*(code *)*puVar9)();\n    if ((*(uint *)(iVar3 + 0x50) & 0x20) == 0) {\n      FUN_00039810(puVar9,uVar6,param_3);\n      uVar7 = puVar9[5];\n    }\n    else {\n      uVar7 = puVar9[5];\n    }\n    (*(code *)puVar9[2])(uVar6,iVar2,uVar7);\n    iVar2 = puVar9[5];\n    if (iVar2 < iVar4) {\n      iVar3 = 0;\n      do {\n        (*(code *)puVar9[2])(uVar6,iVar5 + iVar3);\n        uVar7 = (*(code *)puVar9[1])(uVar6);\n        (*(code *)puVar9[3])(uVar7,iVar5 + iVar2);\n        iVar2 = iVar2 + puVar9[5];\n        iVar3 = iVar2 - puVar9[5];\n      } while (iVar2 < iVar4);\n    }\n    (*(code *)puVar9[4])(uVar6);\n  }\n  if (iVar4 <= (int)puVar1) {\n    return iVar5;\n  }\n  smemclr(puVar1 + iVar5,iVar4 - (int)puVar1);\n  return iVar5;\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 "int iVar5;" (primitive_type "int") (identifier "iVar5") (; ";")) (declaration "undefined4 uVar6;" (type_identifier "undefined4") (identifier "uVar6") (; ";")) (declaration "undefined4 uVar7;" (type_identifier "undefined4") (identifier "uVar7") (; ";")) (declaration "int *piVar8;" (primitive_type "int") (pointer_declarator "*piVar8" (* "*") (identifier "piVar8")) (; ";")) (declaration "undefined4 *puVar9;" (type_identifier "undefined4") (pointer_declarator "*puVar9" (* "*") (identifier "puVar9")) (; ";")) (declaration "undefined *puVar10;" (type_identifier "undefined") (pointer_declarator "*puVar10" (* "*") (identifier "puVar10")) (; ";")) (declaration "code *pcVar11;" (type_identifier "code") (pointer_declarator "*pcVar11" (* "*") (identifier "pcVar11")) (; ";")) (declaration "undefined1 auStack_5c [4];" (type_identifier "undefined1") (array_declarator "auStack_5c [4]" (identifier "auStack_5c") ([ "[") (number_literal "4") (] "]")) (; ";")) (declaration "undefined *puStack_58;" (type_identifier "undefined") (pointer_declarator "*puStack_58" (* "*") (identifier "puStack_58")) (; ";")) (declaration "undefined1 auStack_50 [4];" (type_identifier "undefined1") (array_declarator "auStack_50 [4]" (identifier "auStack_50") ([ "[") (number_literal "4") (] "]")) (; ";")) (declaration "int iStack_4c;" (primitive_type "int") (identifier "iStack_4c") (; ";")) (declaration "undefined *puStack_48;" (type_identifier "undefined") (pointer_declarator "*puStack_48" (* "*") (identifier "puStack_48")) (; ";")) (declaration "int iStack_44;" (primitive_type "int") (identifier "iStack_44") (; ";")) (declaration "undefined4 *puStack_40;" (type_identifier "undefined4") (pointer_declarator "*puStack_40" (* "*") (identifier "puStack_40")) (; ";")) (declaration "code *pcStack_3c;" (type_identifier "code") (pointer_declarator "*pcStack_3c" (* "*") (identifier "pcStack_3c")) (; ";")) (declaration "undefined4 local_20;" (type_identifier "undefined4") (identifier "local_20") (; ";")) (declaration "int local_1c;" (primitive_type "int") (identifier "local_1c") (; ";")) (expression_statement "puVar1 = PTR___stack_chk_guard_000b0c9c;" (assignment_expression "puVar1 = PTR___stack_chk_guard_000b0c9c" (identifier "puVar1") (= "=") (identifier "PTR___stack_chk_guard_000b0c9c")) (; ";")) (expression_statement "local_1c = *(int *)PTR___stack_chk_guard_000b0c9c;" (assignment_expression "local_1c = *(int *)PTR___stack_chk_guard_000b0c9c" (identifier "local_1c") (= "=") (pointer_expression "*(int *)PTR___stack_chk_guard_000b0c9c" (* "*") (cast_expression "(int *)PTR___stack_chk_guard_000b0c9c" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR___stack_chk_guard_000b0c9c")))) (; ";")) (expression_statement "local_20 = param_4;" (assignment_expression "local_20 = param_4" (identifier "local_20") (= "=") (identifier "param_4")) (; ";")) (expression_statement "(*(code *)*param_1)(param_2,&local_20,4);" (call_expression "(*(code *)*param_1)(param_2,&local_20,4)" (parenthesized_expression "(*(code *)*param_1)" (( "(") (pointer_expression "*(code *)*param_1" (* "*") (cast_expression "(code *)*param_1" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*param_1" (* "*") (identifier "param_1")))) () ")")) (argument_list "(param_2,&local_20,4)" (( "(") (identifier "param_2") (, ",") (pointer_expression "&local_20" (& "&") (identifier "local_20")) (, ",") (number_literal "4") () ")"))) (; ";")) (expression_statement "iVar4 = param_2;" (assignment_expression "iVar4 = param_2" (identifier "iVar4") (= "=") (identifier "param_2")) (; ";")) (expression_statement "(*(code *)*param_1)(param_2,param_3,param_4);" (call_expression "(*(code *)*param_1)(param_2,param_3,param_4)" (parenthesized_expression "(*(code *)*param_1)" (( "(") (pointer_expression "*(code *)*param_1" (* "*") (cast_expression "(code *)*param_1" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*param_1" (* "*") (identifier "param_1")))) () ")")) (argument_list "(param_2,param_3,param_4)" (( "(") (identifier "param_2") (, ",") (identifier "param_3") (, ",") (identifier "param_4") () ")"))) (; ";")) (expression_statement "iVar2 = *(int *)puVar1;" (assignment_expression "iVar2 = *(int *)puVar1" (identifier "iVar2") (= "=") (pointer_expression "*(int *)puVar1" (* "*") (cast_expression "(int *)puVar1" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "puVar1")))) (; ";")) (if_statement "if (local_1c == iVar2) {\n    return iVar2;\n  }" (if "if") (parenthesized_expression "(local_1c == iVar2)" (( "(") (binary_expression "local_1c == iVar2" (identifier "local_1c") (== "==") (identifier "iVar2")) () ")")) (compound_statement "{\n    return iVar2;\n  }" ({ "{") (return_statement "return iVar2;" (return "return") (identifier "iVar2") (; ";")) (} "}"))) (expression_statement "pcVar11 = FUN_00039810;" (assignment_expression "pcVar11 = FUN_00039810" (identifier "pcVar11") (= "=") (identifier "FUN_00039810")) (; ";")) (expression_statement "puVar10 = PTR___stack_chk_fail_000b0c70;" (assignment_expression "puVar10 = PTR___stack_chk_fail_000b0c70" (identifier "puVar10") (= "=") (identifier "PTR___stack_chk_fail_000b0c70")) (; ";")) (expression_statement "(*(code *)PTR___stack_chk_fail_000b0c70)();" (call_expression "(*(code *)PTR___stack_chk_fail_000b0c70)()" (parenthesized_expression "(*(code *)PTR___stack_chk_fail_000b0c70)" (( "(") (pointer_expression "*(code *)PTR___stack_chk_fail_000b0c70" (* "*") (cast_expression "(code *)PTR___stack_chk_fail_000b0c70" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR___stack_chk_fail_000b0c70"))) () ")")) (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "puStack_58 = puVar10 + 0x7e940;" (assignment_expression "puStack_58 = puVar10 + 0x7e940" (identifier "puStack_58") (= "=") (binary_expression "puVar10 + 0x7e940" (identifier "puVar10") (+ "+") (number_literal "0x7e940"))) (; ";")) (expression_statement "puStack_48 = puVar1;" (assignment_expression "puStack_48 = puVar1" (identifier "puStack_48") (= "=") (identifier "puVar1")) (; ";")) (expression_statement "piVar8 = *(int **)(puVar10 + 0x7748c);" (assignment_expression "piVar8 = *(int **)(puVar10 + 0x7748c)" (identifier "piVar8") (= "=") (pointer_expression "*(int **)(puVar10 + 0x7748c)" (* "*") (cast_expression "(int **)(puVar10 + 0x7748c)" (( "(") (type_descriptor "int **" (primitive_type "int") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(puVar10 + 0x7748c)" (( "(") (binary_expression "puVar10 + 0x7748c" (identifier "puVar10") (+ "+") (number_literal "0x7748c")) () ")"))))) (; ";")) (expression_statement "iStack_4c = *piVar8;" (assignment_expression "iStack_4c = *piVar8" (identifier "iStack_4c") (= "=") (pointer_expression "*piVar8" (* "*") (identifier "piVar8"))) (; ";")) (expression_statement "iStack_44 = param_2;" (assignment_expression "iStack_44 = param_2" (identifier "iStack_44") (= "=") (identifier "param_2")) (; ";")) (expression_statement "puStack_40 = param_1;" (assignment_expression "puStack_40 = param_1" (identifier "puStack_40") (= "=") (identifier "param_1")) (; ";")) (expression_statement "pcStack_3c = pcVar11;" (assignment_expression "pcStack_3c = pcVar11" (identifier "pcStack_3c") (= "=") (identifier "pcVar11")) (; ";")) (expression_statement "iVar3 = FUN_000371ac(param_4,auStack_50);" (assignment_expression "iVar3 = FUN_000371ac(param_4,auStack_50)" (identifier "iVar3") (= "=") (call_expression "FUN_000371ac(param_4,auStack_50)" (identifier "FUN_000371ac") (argument_list "(param_4,auStack_50)" (( "(") (identifier "param_4") (, ",") (identifier "auStack_50") () ")")))) (; ";")) (expression_statement "iVar2 = iVar3;" (assignment_expression "iVar2 = iVar3" (identifier "iVar2") (= "=") (identifier "iVar3")) (; ";")) (expression_statement "FUN_0003975c(iVar4 + 8,param_3,iVar3);" (call_expression "FUN_0003975c(iVar4 + 8,param_3,iVar3)" (identifier "FUN_0003975c") (argument_list "(iVar4 + 8,param_3,iVar3)" (( "(") (binary_expression "iVar4 + 8" (identifier "iVar4") (+ "+") (number_literal "8")) (, ",") (identifier "param_3") (, ",") (identifier "iVar3") () ")"))) (; ";")) (expression_statement "safefree();" (call_expression "safefree()" (identifier "safefree") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "iVar4 = *piVar8;" (assignment_expression "iVar4 = *piVar8" (identifier "iVar4") (= "=") (pointer_expression "*piVar8" (* "*") (identifier "piVar8"))) (; ";")) (if_statement "if (iStack_4c == iVar4) {\n    return iVar4;\n  }" (if "if") (parenthesized_expression "(iStack_4c == iVar4)" (( "(") (binary_expression "iStack_4c == iVar4" (identifier "iStack_4c") (== "==") (identifier "iVar4")) () ")")) (compound_statement "{\n    return iVar4;\n  }" ({ "{") (return_statement "return iVar4;" (return "return") (identifier "iVar4") (; ";")) (} "}"))) (expression_statement "(**(code **)(puStack_58 + -0x74e0))();" (call_expression "(**(code **)(puStack_58 + -0x74e0))()" (parenthesized_expression "(**(code **)(puStack_58 + -0x74e0))" (( "(") (pointer_expression "**(code **)(puStack_58 + -0x74e0)" (* "*") (pointer_expression "*(code **)(puStack_58 + -0x74e0)" (* "*") (cast_expression "(code **)(puStack_58 + -0x74e0)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(puStack_58 + -0x74e0)" (( "(") (binary_expression "puStack_58 + -0x74e0" (identifier "puStack_58") (+ "+") (number_literal "-0x74e0")) () ")"))))) () ")")) (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "puVar1 = puStack_58;" (assignment_expression "puVar1 = puStack_58" (identifier "puVar1") (= "=") (identifier "puStack_58")) (; ";")) (if_statement "if (puStack_58 == (undefined *)0x0) {\n    return 0;\n  }" (if "if") (parenthesized_expression "(puStack_58 == (undefined *)0x0)" (( "(") (binary_expression "puStack_58 == (undefined *)0x0" (identifier "puStack_58") (== "==") (cast_expression "(undefined *)0x0" (( "(") (type_descriptor "undefined *" (type_identifier "undefined") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    return 0;\n  }" ({ "{") (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (expression_statement "puVar9 = *(undefined4 **)(*(int *)(iVar3 + 0x98) + 0xc);" (assignment_expression "puVar9 = *(undefined4 **)(*(int *)(iVar3 + 0x98) + 0xc)" (identifier "puVar9") (= "=") (pointer_expression "*(undefined4 **)(*(int *)(iVar3 + 0x98) + 0xc)" (* "*") (cast_expression "(undefined4 **)(*(int *)(iVar3 + 0x98) + 0xc)" (( "(") (type_descriptor "undefined4 **" (type_identifier "undefined4") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(*(int *)(iVar3 + 0x98) + 0xc)" (( "(") (binary_expression "*(int *)(iVar3 + 0x98) + 0xc" (pointer_expression "*(int *)(iVar3 + 0x98)" (* "*") (cast_expression "(int *)(iVar3 + 0x98)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar3 + 0x98)" (( "(") (binary_expression "iVar3 + 0x98" (identifier "iVar3") (+ "+") (number_literal "0x98")) () ")")))) (+ "+") (number_literal "0xc")) () ")"))))) (; ";")) (expression_statement "iVar4 = puVar9[5];" (assignment_expression "iVar4 = puVar9[5]" (identifier "iVar4") (= "=") (subscript_expression "puVar9[5]" (identifier "puVar9") ([ "[") (number_literal "5") (] "]"))) (; ";")) (if_statement "if (iVar4 == 0) {\n    trap(7);\n  }" (if "if") (parenthesized_expression "(iVar4 == 0)" (( "(") (binary_expression "iVar4 == 0" (identifier "iVar4") (== "==") (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 "iVar4 = ((int)(puStack_58 + iVar4 + -1) / iVar4) * iVar4;" (assignment_expression "iVar4 = ((int)(puStack_58 + iVar4 + -1) / iVar4) * iVar4" (identifier "iVar4") (= "=") (binary_expression "((int)(puStack_58 + iVar4 + -1) / iVar4) * iVar4" (parenthesized_expression "((int)(puStack_58 + iVar4 + -1) / iVar4)" (( "(") (binary_expression "(int)(puStack_58 + iVar4 + -1) / iVar4" (cast_expression "(int)(puStack_58 + iVar4 + -1)" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (parenthesized_expression "(puStack_58 + iVar4 + -1)" (( "(") (binary_expression "puStack_58 + iVar4 + -1" (binary_expression "puStack_58 + iVar4" (identifier "puStack_58") (+ "+") (identifier "iVar4")) (+ "+") (number_literal "-1")) () ")"))) (/ "/") (identifier "iVar4")) () ")")) (* "*") (identifier "iVar4"))) (; ";")) (expression_statement "iVar5 = safemalloc(iVar4,1);" (assignment_expression "iVar5 = safemalloc(iVar4,1)" (identifier "iVar5") (= "=") (call_expression "safemalloc(iVar4,1)" (identifier "safemalloc") (argument_list "(iVar4,1)" (( "(") (identifier "iVar4") (, ",") (number_literal "1") () ")")))) (; ";")) (expression_statement "uVar6 = (*(code *)*puVar9)();" (assignment_expression "uVar6 = (*(code *)*puVar9)()" (identifier "uVar6") (= "=") (call_expression "(*(code *)*puVar9)()" (parenthesized_expression "(*(code *)*puVar9)" (( "(") (pointer_expression "*(code *)*puVar9" (* "*") (cast_expression "(code *)*puVar9" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*puVar9" (* "*") (identifier "puVar9")))) () ")")) (argument_list "()" (( "(") () ")")))) (; ";")) (if_statement "if ((*(uint *)(iVar3 + 0x50) & 0x20) == 0) {\n    FUN_00039810(puVar9,uVar6,param_3);\n    pcVar11 = (code *)puVar9[2];\n  }\n  else {\n    pcVar11 = (code *)puVar9[2];\n  }" (if "if") (parenthesized_expression "((*(uint *)(iVar3 + 0x50) & 0x20) == 0)" (( "(") (binary_expression "(*(uint *)(iVar3 + 0x50) & 0x20) == 0" (parenthesized_expression "(*(uint *)(iVar3 + 0x50) & 0x20)" (( "(") (binary_expression "*(uint *)(iVar3 + 0x50) & 0x20" (pointer_expression "*(uint *)(iVar3 + 0x50)" (* "*") (cast_expression "(uint *)(iVar3 + 0x50)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar3 + 0x50)" (( "(") (binary_expression "iVar3 + 0x50" (identifier "iVar3") (+ "+") (number_literal "0x50")) () ")")))) (& "&") (number_literal "0x20")) () ")")) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    FUN_00039810(puVar9,uVar6,param_3);\n    pcVar11 = (code *)puVar9[2];\n  }" ({ "{") (expression_statement "FUN_00039810(puVar9,uVar6,param_3);" (call_expression "FUN_00039810(puVar9,uVar6,param_3)" (identifier "FUN_00039810") (argument_list "(puVar9,uVar6,param_3)" (( "(") (identifier "puVar9") (, ",") (identifier "uVar6") (, ",") (identifier "param_3") () ")"))) (; ";")) (expression_statement "pcVar11 = (code *)puVar9[2];" (assignment_expression "pcVar11 = (code *)puVar9[2]" (identifier "pcVar11") (= "=") (cast_expression "(code *)puVar9[2]" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "puVar9[2]" (identifier "puVar9") ([ "[") (number_literal "2") (] "]")))) (; ";")) (} "}")) (else_clause "else {\n    pcVar11 = (code *)puVar9[2];\n  }" (else "else") (compound_statement "{\n    pcVar11 = (code *)puVar9[2];\n  }" ({ "{") (expression_statement "pcVar11 = (code *)puVar9[2];" (assignment_expression "pcVar11 = (code *)puVar9[2]" (identifier "pcVar11") (= "=") (cast_expression "(code *)puVar9[2]" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "puVar9[2]" (identifier "puVar9") ([ "[") (number_literal "2") (] "]")))) (; ";")) (} "}")))) (expression_statement "(*pcVar11)(uVar6,iVar2,puVar9[5]);" (call_expression "(*pcVar11)(uVar6,iVar2,puVar9[5])" (parenthesized_expression "(*pcVar11)" (( "(") (pointer_expression "*pcVar11" (* "*") (identifier "pcVar11")) () ")")) (argument_list "(uVar6,iVar2,puVar9[5])" (( "(") (identifier "uVar6") (, ",") (identifier "iVar2") (, ",") (subscript_expression "puVar9[5]" (identifier "puVar9") ([ "[") (number_literal "5") (] "]")) () ")"))) (; ";")) (expression_statement "(*(code *)puVar9[2])(uVar6,auStack_5c,1);" (call_expression "(*(code *)puVar9[2])(uVar6,auStack_5c,1)" (parenthesized_expression "(*(code *)puVar9[2])" (( "(") (pointer_expression "*(code *)puVar9[2]" (* "*") (cast_expression "(code *)puVar9[2]" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "puVar9[2]" (identifier "puVar9") ([ "[") (number_literal "2") (] "]")))) () ")")) (argument_list "(uVar6,auStack_5c,1)" (( "(") (identifier "uVar6") (, ",") (identifier "auStack_5c") (, ",") (number_literal "1") () ")"))) (; ";")) (expression_statement "(*(code *)puVar9[2])(uVar6,iVar3 + 0xa4,*(undefined4 *)(iVar3 + 0xe4));" (call_expression "(*(code *)puVar9[2])(uVar6,iVar3 + 0xa4,*(undefined4 *)(iVar3 + 0xe4))" (parenthesized_expression "(*(code *)puVar9[2])" (( "(") (pointer_expression "*(code *)puVar9[2]" (* "*") (cast_expression "(code *)puVar9[2]" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "puVar9[2]" (identifier "puVar9") ([ "[") (number_literal "2") (] "]")))) () ")")) (argument_list "(uVar6,iVar3 + 0xa4,*(undefined4 *)(iVar3 + 0xe4))" (( "(") (identifier "uVar6") (, ",") (binary_expression "iVar3 + 0xa4" (identifier "iVar3") (+ "+") (number_literal "0xa4")) (, ",") (pointer_expression "*(undefined4 *)(iVar3 + 0xe4)" (* "*") (cast_expression "(undefined4 *)(iVar3 + 0xe4)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar3 + 0xe4)" (( "(") (binary_expression "iVar3 + 0xe4" (identifier "iVar3") (+ "+") (number_literal "0xe4")) () ")")))) () ")"))) (; ";")) (expression_statement "(*(code *)puVar9[3])(uVar6,iVar5);" (call_expression "(*(code *)puVar9[3])(uVar6,iVar5)" (parenthesized_expression "(*(code *)puVar9[3])" (( "(") (pointer_expression "*(code *)puVar9[3]" (* "*") (cast_expression "(code *)puVar9[3]" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "puVar9[3]" (identifier "puVar9") ([ "[") (number_literal "3") (] "]")))) () ")")) (argument_list "(uVar6,iVar5)" (( "(") (identifier "uVar6") (, ",") (identifier "iVar5") () ")"))) (; ";")) (if_statement "if ((int)puVar9[5] < iVar4) {\n    uVar6 = (*(code *)*puVar9)();\n    if ((*(uint *)(iVar3 + 0x50) & 0x20) == 0) {\n      FUN_00039810(puVar9,uVar6,param_3);\n      uVar7 = puVar9[5];\n    }\n    else {\n      uVar7 = puVar9[5];\n    }\n    (*(code *)puVar9[2])(uVar6,iVar2,uVar7);\n    iVar2 = puVar9[5];\n    if (iVar2 < iVar4) {\n      iVar3 = 0;\n      do {\n        (*(code *)puVar9[2])(uVar6,iVar5 + iVar3);\n        uVar7 = (*(code *)puVar9[1])(uVar6);\n        (*(code *)puVar9[3])(uVar7,iVar5 + iVar2);\n        iVar2 = iVar2 + puVar9[5];\n        iVar3 = iVar2 - puVar9[5];\n      } while (iVar2 < iVar4);\n    }\n    (*(code *)puVar9[4])(uVar6);\n  }" (if "if") (parenthesized_expression "((int)puVar9[5] < iVar4)" (( "(") (binary_expression "(int)puVar9[5] < iVar4" (cast_expression "(int)puVar9[5]" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (subscript_expression "puVar9[5]" (identifier "puVar9") ([ "[") (number_literal "5") (] "]"))) (< "<") (identifier "iVar4")) () ")")) (compound_statement "{\n    uVar6 = (*(code *)*puVar9)();\n    if ((*(uint *)(iVar3 + 0x50) & 0x20) == 0) {\n      FUN_00039810(puVar9,uVar6,param_3);\n      uVar7 = puVar9[5];\n    }\n    else {\n      uVar7 = puVar9[5];\n    }\n    (*(code *)puVar9[2])(uVar6,iVar2,uVar7);\n    iVar2 = puVar9[5];\n    if (iVar2 < iVar4) {\n      iVar3 = 0;\n      do {\n        (*(code *)puVar9[2])(uVar6,iVar5 + iVar3);\n        uVar7 = (*(code *)puVar9[1])(uVar6);\n        (*(code *)puVar9[3])(uVar7,iVar5 + iVar2);\n        iVar2 = iVar2 + puVar9[5];\n        iVar3 = iVar2 - puVar9[5];\n      } while (iVar2 < iVar4);\n    }\n    (*(code *)puVar9[4])(uVar6);\n  }" ({ "{") (expression_statement "uVar6 = (*(code *)*puVar9)();" (assignment_expression "uVar6 = (*(code *)*puVar9)()" (identifier "uVar6") (= "=") (call_expression "(*(code *)*puVar9)()" (parenthesized_expression "(*(code *)*puVar9)" (( "(") (pointer_expression "*(code *)*puVar9" (* "*") (cast_expression "(code *)*puVar9" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*puVar9" (* "*") (identifier "puVar9")))) () ")")) (argument_list "()" (( "(") () ")")))) (; ";")) (if_statement "if ((*(uint *)(iVar3 + 0x50) & 0x20) == 0) {\n      FUN_00039810(puVar9,uVar6,param_3);\n      uVar7 = puVar9[5];\n    }\n    else {\n      uVar7 = puVar9[5];\n    }" (if "if") (parenthesized_expression "((*(uint *)(iVar3 + 0x50) & 0x20) == 0)" (( "(") (binary_expression "(*(uint *)(iVar3 + 0x50) & 0x20) == 0" (parenthesized_expression "(*(uint *)(iVar3 + 0x50) & 0x20)" (( "(") (binary_expression "*(uint *)(iVar3 + 0x50) & 0x20" (pointer_expression "*(uint *)(iVar3 + 0x50)" (* "*") (cast_expression "(uint *)(iVar3 + 0x50)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar3 + 0x50)" (( "(") (binary_expression "iVar3 + 0x50" (identifier "iVar3") (+ "+") (number_literal "0x50")) () ")")))) (& "&") (number_literal "0x20")) () ")")) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      FUN_00039810(puVar9,uVar6,param_3);\n      uVar7 = puVar9[5];\n    }" ({ "{") (expression_statement "FUN_00039810(puVar9,uVar6,param_3);" (call_expression "FUN_00039810(puVar9,uVar6,param_3)" (identifier "FUN_00039810") (argument_list "(puVar9,uVar6,param_3)" (( "(") (identifier "puVar9") (, ",") (identifier "uVar6") (, ",") (identifier "param_3") () ")"))) (; ";")) (expression_statement "uVar7 = puVar9[5];" (assignment_expression "uVar7 = puVar9[5]" (identifier "uVar7") (= "=") (subscript_expression "puVar9[5]" (identifier "puVar9") ([ "[") (number_literal "5") (] "]"))) (; ";")) (} "}")) (else_clause "else {\n      uVar7 = puVar9[5];\n    }" (else "else") (compound_statement "{\n      uVar7 = puVar9[5];\n    }" ({ "{") (expression_statement "uVar7 = puVar9[5];" (assignment_expression "uVar7 = puVar9[5]" (identifier "uVar7") (= "=") (subscript_expression "puVar9[5]" (identifier "puVar9") ([ "[") (number_literal "5") (] "]"))) (; ";")) (} "}")))) (expression_statement "(*(code *)puVar9[2])(uVar6,iVar2,uVar7);" (call_expression "(*(code *)puVar9[2])(uVar6,iVar2,uVar7)" (parenthesized_expression "(*(code *)puVar9[2])" (( "(") (pointer_expression "*(code *)puVar9[2]" (* "*") (cast_expression "(code *)puVar9[2]" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "puVar9[2]" (identifier "puVar9") ([ "[") (number_literal "2") (] "]")))) () ")")) (argument_list "(uVar6,iVar2,uVar7)" (( "(") (identifier "uVar6") (, ",") (identifier "iVar2") (, ",") (identifier "uVar7") () ")"))) (; ";")) (expression_statement "iVar2 = puVar9[5];" (assignment_expression "iVar2 = puVar9[5]" (identifier "iVar2") (= "=") (subscript_expression "puVar9[5]" (identifier "puVar9") ([ "[") (number_literal "5") (] "]"))) (; ";")) (if_statement "if (iVar2 < iVar4) {\n      iVar3 = 0;\n      do {\n        (*(code *)puVar9[2])(uVar6,iVar5 + iVar3);\n        uVar7 = (*(code *)puVar9[1])(uVar6);\n        (*(code *)puVar9[3])(uVar7,iVar5 + iVar2);\n        iVar2 = iVar2 + puVar9[5];\n        iVar3 = iVar2 - puVar9[5];\n      } while (iVar2 < iVar4);\n    }" (if "if") (parenthesized_expression "(iVar2 < iVar4)" (( "(") (binary_expression "iVar2 < iVar4" (identifier "iVar2") (< "<") (identifier "iVar4")) () ")")) (compound_statement "{\n      iVar3 = 0;\n      do {\n        (*(code *)puVar9[2])(uVar6,iVar5 + iVar3);\n        uVar7 = (*(code *)puVar9[1])(uVar6);\n        (*(code *)puVar9[3])(uVar7,iVar5 + iVar2);\n        iVar2 = iVar2 + puVar9[5];\n        iVar3 = iVar2 - puVar9[5];\n      } while (iVar2 < iVar4);\n    }" ({ "{") (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" (identifier "iVar3") (= "=") (number_literal "0")) (; ";")) (do_statement "do {\n        (*(code *)puVar9[2])(uVar6,iVar5 + iVar3);\n        uVar7 = (*(code *)puVar9[1])(uVar6);\n        (*(code *)puVar9[3])(uVar7,iVar5 + iVar2);\n        iVar2 = iVar2 + puVar9[5];\n        iVar3 = iVar2 - puVar9[5];\n      } while (iVar2 < iVar4);" (do "do") (compound_statement "{\n        (*(code *)puVar9[2])(uVar6,iVar5 + iVar3);\n        uVar7 = (*(code *)puVar9[1])(uVar6);\n        (*(code *)puVar9[3])(uVar7,iVar5 + iVar2);\n        iVar2 = iVar2 + puVar9[5];\n        iVar3 = iVar2 - puVar9[5];\n      }" ({ "{") (expression_statement "(*(code *)puVar9[2])(uVar6,iVar5 + iVar3);" (call_expression "(*(code *)puVar9[2])(uVar6,iVar5 + iVar3)" (parenthesized_expression "(*(code *)puVar9[2])" (( "(") (pointer_expression "*(code *)puVar9[2]" (* "*") (cast_expression "(code *)puVar9[2]" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "puVar9[2]" (identifier "puVar9") ([ "[") (number_literal "2") (] "]")))) () ")")) (argument_list "(uVar6,iVar5 + iVar3)" (( "(") (identifier "uVar6") (, ",") (binary_expression "iVar5 + iVar3" (identifier "iVar5") (+ "+") (identifier "iVar3")) () ")"))) (; ";")) (expression_statement "uVar7 = (*(code *)puVar9[1])(uVar6);" (assignment_expression "uVar7 = (*(code *)puVar9[1])(uVar6)" (identifier "uVar7") (= "=") (call_expression "(*(code *)puVar9[1])(uVar6)" (parenthesized_expression "(*(code *)puVar9[1])" (( "(") (pointer_expression "*(code *)puVar9[1]" (* "*") (cast_expression "(code *)puVar9[1]" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "puVar9[1]" (identifier "puVar9") ([ "[") (number_literal "1") (] "]")))) () ")")) (argument_list "(uVar6)" (( "(") (identifier "uVar6") () ")")))) (; ";")) (expression_statement "(*(code *)puVar9[3])(uVar7,iVar5 + iVar2);" (call_expression "(*(code *)puVar9[3])(uVar7,iVar5 + iVar2)" (parenthesized_expression "(*(code *)puVar9[3])" (( "(") (pointer_expression "*(code *)puVar9[3]" (* "*") (cast_expression "(code *)puVar9[3]" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "puVar9[3]" (identifier "puVar9") ([ "[") (number_literal "3") (] "]")))) () ")")) (argument_list "(uVar7,iVar5 + iVar2)" (( "(") (identifier "uVar7") (, ",") (binary_expression "iVar5 + iVar2" (identifier "iVar5") (+ "+") (identifier "iVar2")) () ")"))) (; ";")) (expression_statement "iVar2 = iVar2 + puVar9[5];" (assignment_expression "iVar2 = iVar2 + puVar9[5]" (identifier "iVar2") (= "=") (binary_expression "iVar2 + puVar9[5]" (identifier "iVar2") (+ "+") (subscript_expression "puVar9[5]" (identifier "puVar9") ([ "[") (number_literal "5") (] "]")))) (; ";")) (expression_statement "iVar3 = iVar2 - puVar9[5];" (assignment_expression "iVar3 = iVar2 - puVar9[5]" (identifier "iVar3") (= "=") (binary_expression "iVar2 - puVar9[5]" (identifier "iVar2") (- "-") (subscript_expression "puVar9[5]" (identifier "puVar9") ([ "[") (number_literal "5") (] "]")))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(iVar2 < iVar4)" (( "(") (binary_expression "iVar2 < iVar4" (identifier "iVar2") (< "<") (identifier "iVar4")) () ")")) (; ";")) (} "}"))) (expression_statement "(*(code *)puVar9[4])(uVar6);" (call_expression "(*(code *)puVar9[4])(uVar6)" (parenthesized_expression "(*(code *)puVar9[4])" (( "(") (pointer_expression "*(code *)puVar9[4]" (* "*") (cast_expression "(code *)puVar9[4]" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "puVar9[4]" (identifier "puVar9") ([ "[") (number_literal "4") (] "]")))) () ")")) (argument_list "(uVar6)" (( "(") (identifier "uVar6") () ")"))) (; ";")) (} "}"))) (if_statement "if (iVar4 <= (int)puVar1) {\n    return iVar5;\n  }" (if "if") (parenthesized_expression "(iVar4 <= (int)puVar1)" (( "(") (binary_expression "iVar4 <= (int)puVar1" (identifier "iVar4") (<= "<=") (cast_expression "(int)puVar1" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "puVar1"))) () ")")) (compound_statement "{\n    return iVar5;\n  }" ({ "{") (return_statement "return iVar5;" (return "return") (identifier "iVar5") (; ";")) (} "}"))) (expression_statement "smemclr(puVar1 + iVar5,iVar4 - (int)puVar1);" (call_expression "smemclr(puVar1 + iVar5,iVar4 - (int)puVar1)" (identifier "smemclr") (argument_list "(puVar1 + iVar5,iVar4 - (int)puVar1)" (( "(") (binary_expression "puVar1 + iVar5" (identifier "puVar1") (+ "+") (identifier "iVar5")) (, ",") (binary_expression "iVar4 - (int)puVar1" (identifier "iVar4") (- "-") (cast_expression "(int)puVar1" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "puVar1"))) () ")"))) (; ";")) (return_statement "return iVar5;" (return "return") (identifier "iVar5") (; ";")) (} "}")))
(translation_unit (function_definition type: (primitive_type) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (parameter_declaration type: (primitive_type) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (identifier)))) body: (compound_statement (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (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: (pointer_declarator 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: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (array_declarator declarator: (identifier) size: (number_literal))) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (array_declarator declarator: (identifier) size: (number_literal))) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (pointer_declarator 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: (identifier)) (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: (identifier))) (expression_statement (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 (identifier) (pointer_expression argument: (identifier)) (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (pointer_expression argument: (identifier))))) arguments: (argument_list (identifier) (identifier) (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))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (compound_statement (return_statement (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (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 declarator: (abstract_pointer_declarator))) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (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))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (compound_statement (return_statement (identifier)))) (expression_statement (call_expression function: (parenthesized_expression (pointer_expression argument: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) arguments: (argument_list))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (number_literal)))) consequence: (compound_statement (return_statement (number_literal)))) (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: (cast_expression type: (type_descriptor type: (primitive_type)) value: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (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: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)))) consequence: (compound_statement (return_statement (identifier)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (identifier)) (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)))))) (return_statement (identifier)))))

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

{
  undefined *puVar1;
  int iVar2;
  int iVar3;
  int iVar4;
  int iVar5;
  undefined4 uVar6;
  undefined4 uVar7;
  int *piVar8;
  undefined4 *puVar9;
  undefined *puVar10;
  code *pcVar11;
  undefined1 auStack_5c [4];
  undefined *puStack_58;
  undefined1 auStack_50 [4];
  int iStack_4c;
  undefined *puStack_48;
  int iStack_44;
  undefined4 *puStack_40;
  code *pcStack_3c;
  undefined4 local_20;
  int local_1c;
  
  puVar1 = PTR___stack_chk_guard_000b0c9c;
  local_1c = *(int *)PTR___stack_chk_guard_000b0c9c;
  local_20 = param_4;
  (*(code *)*param_1)(param_2,&local_20,4);
  iVar4 = param_2;
  (*(code *)*param_1)(param_2,param_3,param_4);
  iVar2 = *(int *)puVar1;
  if (local_1c == iVar2) {
    return iVar2;
  }
  pcVar11 = FUN_00039810;
  puVar10 = PTR___stack_chk_fail_000b0c70;
  (*(code *)PTR___stack_chk_fail_000b0c70)();
  puStack_58 = puVar10 + 0x7e940;
  puStack_48 = puVar1;
  piVar8 = *(int **)(puVar10 + 0x7748c);
  iStack_4c = *piVar8;
  iStack_44 = param_2;
  puStack_40 = param_1;
  pcStack_3c = pcVar11;
  iVar3 = FUN_000371ac(param_4,auStack_50);
  iVar2 = iVar3;
  MASKED(iVar4 + 8,param_3,iVar3);
  safefree();
  iVar4 = *piVar8;
  if (iStack_4c == iVar4) {
    return iVar4;
  }
  (**(code **)(puStack_58 + -0x74e0))();
  puVar1 = puStack_58;
  if (puStack_58 == (undefined *)0x0) {
    return 0;
  }
  puVar9 = *(undefined4 **)(*(int *)(iVar3 + 0x98) + 0xc);
  iVar4 = puVar9[5];
  if (iVar4 == 0) {
    trap(7);
  }
  iVar4 = ((int)(puStack_58 + iVar4 + -1) / iVar4) * iVar4;
  iVar5 = safemalloc(iVar4,1);
  uVar6 = (*(code *)*puVar9)();
  if ((*(uint *)(iVar3 + 0x50) & 0x20) == 0) {
    FUN_00039810(puVar9,uVar6,param_3);
    pcVar11 = (code *)puVar9[2];
  }
  else {
    pcVar11 = (code *)puVar9[2];
  }
  (*pcVar11)(uVar6,iVar2,puVar9[5]);
  (*(code *)puVar9[2])(uVar6,auStack_5c,1);
  (*(code *)puVar9[2])(uVar6,iVar3 + 0xa4,*(undefined4 *)(iVar3 + 0xe4));
  (*(code *)puVar9[3])(uVar6,iVar5);
  if ((int)puVar9[5] < iVar4) {
    uVar6 = (*(code *)*puVar9)();
    if ((*(uint *)(iVar3 + 0x50) & 0x20) == 0) {
      FUN_00039810(puVar9,uVar6,param_3);
      uVar7 = puVar9[5];
    }
    else {
      uVar7 = puVar9[5];
    }
    (*(code *)puVar9[2])(uVar6,iVar2,uVar7);
    iVar2 = puVar9[5];
    if (iVar2 < iVar4) {
      iVar3 = 0;
      do {
        (*(code *)puVar9[2])(uVar6,iVar5 + iVar3);
        uVar7 = (*(code *)puVar9[1])(uVar6);
        (*(code *)puVar9[3])(uVar7,iVar5 + iVar2);
        iVar2 = iVar2 + puVar9[5];
        iVar3 = iVar2 - puVar9[5];
      } while (iVar2 < iVar4);
    }
    (*(code *)puVar9[4])(uVar6);
  }
  if (iVar4 <= (int)puVar1) {
    return iVar5;
  }
  smemclr(puVar1 + iVar5,iVar4 - (int)puVar1);
  return iVar5;
}

