
void * rsa2_newkey(ssh_signkey *self,char *data,int len)

{
  void *pvVar1;
  int iVar2;
  Bignum pvVar3;
  void *pvVar4;
  ssh_signkey *self_00;
  int *datalen;
  int *datalen_00;
  char **p_00;
  int local_res8 [2];
  char *local_2c [2];
  char *p;
  int slen;
  ssh_signkey *local_1c;
  
  local_1c = *(ssh_signkey **)PTR___stack_chk_guard_00122654;
  local_res8[0] = len;
  local_2c[0] = data;
  pvVar1 = (void *)(*(code *)PTR_safemalloc_00121314)(1,0x24);
  p_00 = &p;
  datalen = local_res8;
  getstring(local_2c,datalen,p_00,&slen);
  if ((p == (char *)0x0) || (p_00 = (char **)0x7, slen != 7)) {
LAB_0008c92c:
    datalen_00 = datalen;
    (*(code *)PTR_safefree_00121304)(pvVar1);
  }
  else {
    datalen = (int *)(PTR_E0_218__00121388 + -0x5f58);
    iVar2 = (*(code *)PTR_memcmp_00122454)();
    datalen_00 = local_res8;
    if (iVar2 != 0) goto LAB_0008c92c;
    pvVar3 = getmp(local_2c,datalen_00);
    *(Bignum *)((int)pvVar1 + 0xc) = pvVar3;
    pvVar3 = getmp(local_2c,datalen_00);
    *(Bignum *)((int)pvVar1 + 8) = pvVar3;
    *(undefined4 *)((int)pvVar1 + 0x10) = 0;
    *(undefined4 *)((int)pvVar1 + 0x1c) = 0;
    *(undefined4 *)((int)pvVar1 + 0x18) = 0;
    *(undefined4 *)((int)pvVar1 + 0x14) = 0;
    *(undefined4 *)((int)pvVar1 + 0x20) = 0;
    if ((*(int *)((int)pvVar1 + 0xc) != 0) && (pvVar3 != (Bignum)0x0)) goto LAB_0008c948;
    rsa2_freekey(pvVar1);
  }
  pvVar1 = (void *)0x0;
LAB_0008c948:
  if (local_1c != *(ssh_signkey **)PTR___stack_chk_guard_00122654) {
    self_00 = local_1c;
    (*(code *)PTR___stack_chk_fail_001222ec)();
    pvVar1 = rsa2_newkey(self_00,(char *)datalen_00,(int)p_00);
    if (pvVar1 == (void *)0x0) {
      pvVar4 = (void *)0xffffffff;
    }
    else {
      pvVar4 = (void *)bignum_bitcount(*(Bignum_conflict *)((int)pvVar1 + 8));
      rsa2_freekey(pvVar1);
    }
    return pvVar4;
  }
  return pvVar1;
}



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

{
  int iVar1;
  int iVar2;
  undefined4 uVar3;
  undefined4 local_res8 [2];
  undefined4 local_2c [2];
  int local_24;
  int local_20;
  int local_1c;
  
  local_1c = *(int *)PTR___stack_chk_guard_00122654;
  local_res8[0] = param_3;
  local_2c[0] = param_2;
  iVar1 = (*(code *)PTR_safemalloc_00121314)(1,0x24);
  FUN_0008a1b0(local_2c,local_res8,&local_24,&local_20);
  if ((local_24 == 0) || (local_20 != 7)) {
LAB_0008c92c:
    (*(code *)PTR_safefree_00121304)(iVar1);
  }
  else {
    iVar2 = (*(code *)PTR_memcmp_00122454)(local_24,PTR_DAT_00121388 + -0x5f58,7);
    if (iVar2 != 0) goto LAB_0008c92c;
    uVar3 = FUN_0008a2ac(local_2c,local_res8);
    *(undefined4 *)(iVar1 + 0xc) = uVar3;
    iVar2 = FUN_0008a2ac(local_2c,local_res8);
    *(int *)(iVar1 + 8) = iVar2;
    *(undefined4 *)(iVar1 + 0x10) = 0;
    *(undefined4 *)(iVar1 + 0x1c) = 0;
    *(undefined4 *)(iVar1 + 0x18) = 0;
    *(undefined4 *)(iVar1 + 0x14) = 0;
    *(undefined4 *)(iVar1 + 0x20) = 0;
    if ((*(int *)(iVar1 + 0xc) != 0) && (iVar2 != 0)) goto LAB_0008c948;
    FUN_0008c5e8(iVar1);
  }
  iVar1 = 0;
LAB_0008c948:
  if (local_1c != *(int *)PTR___stack_chk_guard_00122654) {
    (*(code *)PTR___stack_chk_fail_001222ec)();
    iVar1 = FUN_0008c7ec();
    if (iVar1 == 0) {
      iVar2 = -1;
    }
    else {
      iVar2 = bignum_bitcount(*(undefined4 *)(iVar1 + 8));
      FUN_0008c5e8(iVar1);
    }
    return iVar2;
  }
  return iVar1;
}


lui gp,0xa
addiu gp,gp,-0x353c
addu gp,gp,t9
addiu sp,sp,-0x48
sw ra,0x44(sp)
sw s3,0x40(sp)
sw s2,0x3c(sp)
sw s1,0x38(sp)
sw s0,0x34(sp)
sw gp,0x10(sp)
sw a1,0x1c(sp)
sw a2,0x50(sp)
lw v0,-0x6c5c(gp)
lw v0,0x0(v0)
sw v0,0x2c(sp)
li a1,0x24
li a0,0x1
lw t9,-0x7f9c(gp)
jalr t9
_nop
lw gp,0x10(sp)
or s0,v0,zero
addiu a3,sp,0x28
addiu a2,sp,0x24
addiu a1,sp,0x50
addiu a0,sp,0x1c
lw t9,-0x7854(gp)
addiu t9,t9,-0x5e50
bal 0x0008a1b0
_nop
lw gp,0x10(sp)
lw a0,0x24(sp)
beq a0,zero,0x0008c92c
_lw v1,0x28(sp)
li v0,0x7
bne v1,v0,0x0008c92c
_li a2,0x7
lw a1,-0x7f28(gp)
addiu a1,a1,-0x5f58
lw t9,-0x6e5c(gp)
jalr t9
_nop
lw gp,0x10(sp)
bne v0,zero,0x0008c92c
_addiu s3,sp,0x50
or a1,s3,zero
addiu s2,sp,0x1c
or a0,s2,zero
lw s1,-0x7854(gp)
addiu s1,s1,-0x5d54
or t9,s1,zero
bal 0x0008a2ac
_nop
lw gp,0x10(sp)
sw v0,0xc(s0)
or a1,s3,zero
or a0,s2,zero
or t9,s1,zero
bal 0x0008a2ac
_nop
lw gp,0x10(sp)
sw v0,0x8(s0)
sw zero,0x10(s0)
sw zero,0x1c(s0)
sw zero,0x18(s0)
sw zero,0x14(s0)
sw zero,0x20(s0)
lw v1,0xc(s0)
beq v1,zero,0x0008c910
_or a0,s0,zero
bne v0,zero,0x0008c948
_or v0,s0,zero
or a0,s0,zero
lw t9,-0x7854(gp)
addiu t9,t9,-0x3a18
bal 0x0008c5e8
_nop
lw gp,0x10(sp)
b 0x0008c944
_or s0,zero,zero
or a0,s0,zero
lw t9,-0x7fac(gp)
jalr t9
_nop
lw gp,0x10(sp)
or s0,zero,zero
or v0,s0,zero
lw a0,0x2c(sp)
lw v1,-0x6c5c(gp)
lw v1,0x0(v1)
bne a0,v1,0x0008c974
_lw ra,0x44(sp)
lw s3,0x40(sp)
lw s2,0x3c(sp)
lw s1,0x38(sp)
lw s0,0x34(sp)
jr ra
_addiu sp,sp,0x48
lw t9,-0x6fc4(gp)
jalr t9
_nop
lui gp,0xa
addiu gp,gp,-0x36d0
addu gp,gp,t9
addiu sp,sp,-0x28
sw ra,0x24(sp)
sw s1,0x20(sp)
sw s0,0x1c(sp)
sw gp,0x10(sp)
lw t9,-0x7854(gp)
addiu t9,t9,-0x3814
bal 0x0008c7ec
_nop
lw gp,0x10(sp)
beq v0,zero,0x0008ca04
_or s0,v0,zero
lw a0,0x8(v0)
lw t9,-0x7b6c(gp)
bal 0x0006f154
_nop
lw gp,0x10(sp)
or s1,v0,zero
or a0,s0,zero
lw t9,-0x7854(gp)
addiu t9,t9,-0x3a18
bal 0x0008c5e8
_nop
lw gp,0x10(sp)
or v0,s1,zero
lw ra,0x24(sp)
lw s1,0x20(sp)
lw s0,0x1c(sp)
jr ra
_addiu sp,sp,0x28
b 0x0008c9ec
_li s1,-0x1
(translation_unit "int FUN_0008c7ec(undefined4 param_1,undefined4 param_2,undefined4 param_3)\n\n{\n  int iVar1;\n  int iVar2;\n  undefined4 uVar3;\n  undefined4 local_res8 [2];\n  undefined4 local_2c [2];\n  int local_24;\n  int local_20;\n  int local_1c;\n  \n  local_1c = *(int *)PTR___stack_chk_guard_00122654;\n  local_res8[0] = param_3;\n  local_2c[0] = param_2;\n  iVar1 = (*(code *)PTR_safemalloc_00121314)(1,0x24);\n  FUN_0008a1b0(local_2c,local_res8,&local_24,&local_20);\n  if ((local_24 == 0) || (local_20 != 7)) {\nLAB_0008c92c:\n    (*(code *)PTR_safefree_00121304)(iVar1);\n  }\n  else {\n    iVar2 = (*(code *)PTR_memcmp_00122454)(local_24,PTR_DAT_00121388 + -0x5f58,7);\n    if (iVar2 != 0) goto LAB_0008c92c;\n    uVar3 = FUN_0008a2ac(local_2c,local_res8);\n    *(undefined4 *)(iVar1 + 0xc) = uVar3;\n    iVar2 = FUN_0008a2ac(local_2c,local_res8);\n    *(int *)(iVar1 + 8) = iVar2;\n    *(undefined4 *)(iVar1 + 0x10) = 0;\n    *(undefined4 *)(iVar1 + 0x1c) = 0;\n    *(undefined4 *)(iVar1 + 0x18) = 0;\n    *(undefined4 *)(iVar1 + 0x14) = 0;\n    *(undefined4 *)(iVar1 + 0x20) = 0;\n    if ((*(int *)(iVar1 + 0xc) != 0) && (iVar2 != 0)) goto LAB_0008c948;\n    FUN_0008c5e8(iVar1);\n  }\n  iVar1 = 0;\nLAB_0008c948:\n  if (local_1c != *(int *)PTR___stack_chk_guard_00122654) {\n    (*(code *)PTR___stack_chk_fail_001222ec)();\n    iVar1 = FUN_0008c7ec();\n    if (iVar1 == 0) {\n      iVar2 = -1;\n    }\n    else {\n      iVar2 = bignum_bitcount(*(undefined4 *)(iVar1 + 8));\n      FUN_0008c5e8(iVar1);\n    }\n    return iVar2;\n  }\n  return iVar1;\n}\n\n" (function_definition "int FUN_0008c7ec(undefined4 param_1,undefined4 param_2,undefined4 param_3)\n\n{\n  int iVar1;\n  int iVar2;\n  undefined4 uVar3;\n  undefined4 local_res8 [2];\n  undefined4 local_2c [2];\n  int local_24;\n  int local_20;\n  int local_1c;\n  \n  local_1c = *(int *)PTR___stack_chk_guard_00122654;\n  local_res8[0] = param_3;\n  local_2c[0] = param_2;\n  iVar1 = (*(code *)PTR_safemalloc_00121314)(1,0x24);\n  FUN_0008a1b0(local_2c,local_res8,&local_24,&local_20);\n  if ((local_24 == 0) || (local_20 != 7)) {\nLAB_0008c92c:\n    (*(code *)PTR_safefree_00121304)(iVar1);\n  }\n  else {\n    iVar2 = (*(code *)PTR_memcmp_00122454)(local_24,PTR_DAT_00121388 + -0x5f58,7);\n    if (iVar2 != 0) goto LAB_0008c92c;\n    uVar3 = FUN_0008a2ac(local_2c,local_res8);\n    *(undefined4 *)(iVar1 + 0xc) = uVar3;\n    iVar2 = FUN_0008a2ac(local_2c,local_res8);\n    *(int *)(iVar1 + 8) = iVar2;\n    *(undefined4 *)(iVar1 + 0x10) = 0;\n    *(undefined4 *)(iVar1 + 0x1c) = 0;\n    *(undefined4 *)(iVar1 + 0x18) = 0;\n    *(undefined4 *)(iVar1 + 0x14) = 0;\n    *(undefined4 *)(iVar1 + 0x20) = 0;\n    if ((*(int *)(iVar1 + 0xc) != 0) && (iVar2 != 0)) goto LAB_0008c948;\n    FUN_0008c5e8(iVar1);\n  }\n  iVar1 = 0;\nLAB_0008c948:\n  if (local_1c != *(int *)PTR___stack_chk_guard_00122654) {\n    (*(code *)PTR___stack_chk_fail_001222ec)();\n    iVar1 = FUN_0008c7ec();\n    if (iVar1 == 0) {\n      iVar2 = -1;\n    }\n    else {\n      iVar2 = bignum_bitcount(*(undefined4 *)(iVar1 + 8));\n      FUN_0008c5e8(iVar1);\n    }\n    return iVar2;\n  }\n  return iVar1;\n}" primitive_type (function_declarator "FUN_0008c7ec(undefined4 param_1,undefined4 param_2,undefined4 param_3)" identifier (parameter_list "(undefined4 param_1,undefined4 param_2,undefined4 param_3)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "undefined4 param_3" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  undefined4 uVar3;\n  undefined4 local_res8 [2];\n  undefined4 local_2c [2];\n  int local_24;\n  int local_20;\n  int local_1c;\n  \n  local_1c = *(int *)PTR___stack_chk_guard_00122654;\n  local_res8[0] = param_3;\n  local_2c[0] = param_2;\n  iVar1 = (*(code *)PTR_safemalloc_00121314)(1,0x24);\n  FUN_0008a1b0(local_2c,local_res8,&local_24,&local_20);\n  if ((local_24 == 0) || (local_20 != 7)) {\nLAB_0008c92c:\n    (*(code *)PTR_safefree_00121304)(iVar1);\n  }\n  else {\n    iVar2 = (*(code *)PTR_memcmp_00122454)(local_24,PTR_DAT_00121388 + -0x5f58,7);\n    if (iVar2 != 0) goto LAB_0008c92c;\n    uVar3 = FUN_0008a2ac(local_2c,local_res8);\n    *(undefined4 *)(iVar1 + 0xc) = uVar3;\n    iVar2 = FUN_0008a2ac(local_2c,local_res8);\n    *(int *)(iVar1 + 8) = iVar2;\n    *(undefined4 *)(iVar1 + 0x10) = 0;\n    *(undefined4 *)(iVar1 + 0x1c) = 0;\n    *(undefined4 *)(iVar1 + 0x18) = 0;\n    *(undefined4 *)(iVar1 + 0x14) = 0;\n    *(undefined4 *)(iVar1 + 0x20) = 0;\n    if ((*(int *)(iVar1 + 0xc) != 0) && (iVar2 != 0)) goto LAB_0008c948;\n    FUN_0008c5e8(iVar1);\n  }\n  iVar1 = 0;\nLAB_0008c948:\n  if (local_1c != *(int *)PTR___stack_chk_guard_00122654) {\n    (*(code *)PTR___stack_chk_fail_001222ec)();\n    iVar1 = FUN_0008c7ec();\n    if (iVar1 == 0) {\n      iVar2 = -1;\n    }\n    else {\n      iVar2 = bignum_bitcount(*(undefined4 *)(iVar1 + 8));\n      FUN_0008c5e8(iVar1);\n    }\n    return iVar2;\n  }\n  return iVar1;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "undefined4 uVar3;" type_identifier identifier ;) (declaration "undefined4 local_res8 [2];" type_identifier (array_declarator "local_res8 [2]" identifier [ number_literal ]) ;) (declaration "undefined4 local_2c [2];" type_identifier (array_declarator "local_2c [2]" identifier [ number_literal ]) ;) (declaration "int local_24;" primitive_type identifier ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "int local_1c;" primitive_type identifier ;) (expression_statement "local_1c = *(int *)PTR___stack_chk_guard_00122654;" (assignment_expression "local_1c = *(int *)PTR___stack_chk_guard_00122654" identifier = (pointer_expression "*(int *)PTR___stack_chk_guard_00122654" * (cast_expression "(int *)PTR___stack_chk_guard_00122654" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) ;) (expression_statement "local_res8[0] = param_3;" (assignment_expression "local_res8[0] = param_3" (subscript_expression "local_res8[0]" identifier [ number_literal ]) = identifier) ;) (expression_statement "local_2c[0] = param_2;" (assignment_expression "local_2c[0] = param_2" (subscript_expression "local_2c[0]" identifier [ number_literal ]) = identifier) ;) (expression_statement "iVar1 = (*(code *)PTR_safemalloc_00121314)(1,0x24);" (assignment_expression "iVar1 = (*(code *)PTR_safemalloc_00121314)(1,0x24)" identifier = (call_expression "(*(code *)PTR_safemalloc_00121314)(1,0x24)" (parenthesized_expression "(*(code *)PTR_safemalloc_00121314)" ( (pointer_expression "*(code *)PTR_safemalloc_00121314" * (cast_expression "(code *)PTR_safemalloc_00121314" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(1,0x24)" ( number_literal , number_literal )))) ;) (expression_statement "FUN_0008a1b0(local_2c,local_res8,&local_24,&local_20);" (call_expression "FUN_0008a1b0(local_2c,local_res8,&local_24,&local_20)" identifier (argument_list "(local_2c,local_res8,&local_24,&local_20)" ( identifier , identifier , (pointer_expression "&local_24" & identifier) , (pointer_expression "&local_20" & identifier) ))) ;) (if_statement "if ((local_24 == 0) || (local_20 != 7)) {\nLAB_0008c92c:\n    (*(code *)PTR_safefree_00121304)(iVar1);\n  }\n  else {\n    iVar2 = (*(code *)PTR_memcmp_00122454)(local_24,PTR_DAT_00121388 + -0x5f58,7);\n    if (iVar2 != 0) goto LAB_0008c92c;\n    uVar3 = FUN_0008a2ac(local_2c,local_res8);\n    *(undefined4 *)(iVar1 + 0xc) = uVar3;\n    iVar2 = FUN_0008a2ac(local_2c,local_res8);\n    *(int *)(iVar1 + 8) = iVar2;\n    *(undefined4 *)(iVar1 + 0x10) = 0;\n    *(undefined4 *)(iVar1 + 0x1c) = 0;\n    *(undefined4 *)(iVar1 + 0x18) = 0;\n    *(undefined4 *)(iVar1 + 0x14) = 0;\n    *(undefined4 *)(iVar1 + 0x20) = 0;\n    if ((*(int *)(iVar1 + 0xc) != 0) && (iVar2 != 0)) goto LAB_0008c948;\n    FUN_0008c5e8(iVar1);\n  }" if (parenthesized_expression "((local_24 == 0) || (local_20 != 7))" ( (binary_expression "(local_24 == 0) || (local_20 != 7)" (parenthesized_expression "(local_24 == 0)" ( (binary_expression "local_24 == 0" identifier == number_literal) )) || (parenthesized_expression "(local_20 != 7)" ( (binary_expression "local_20 != 7" identifier != number_literal) ))) )) (compound_statement "{\nLAB_0008c92c:\n    (*(code *)PTR_safefree_00121304)(iVar1);\n  }" { (labeled_statement "LAB_0008c92c:\n    (*(code *)PTR_safefree_00121304)(iVar1);" statement_identifier : (expression_statement "(*(code *)PTR_safefree_00121304)(iVar1);" (call_expression "(*(code *)PTR_safefree_00121304)(iVar1)" (parenthesized_expression "(*(code *)PTR_safefree_00121304)" ( (pointer_expression "*(code *)PTR_safefree_00121304" * (cast_expression "(code *)PTR_safefree_00121304" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar1)" ( identifier ))) ;)) }) (else_clause "else {\n    iVar2 = (*(code *)PTR_memcmp_00122454)(local_24,PTR_DAT_00121388 + -0x5f58,7);\n    if (iVar2 != 0) goto LAB_0008c92c;\n    uVar3 = FUN_0008a2ac(local_2c,local_res8);\n    *(undefined4 *)(iVar1 + 0xc) = uVar3;\n    iVar2 = FUN_0008a2ac(local_2c,local_res8);\n    *(int *)(iVar1 + 8) = iVar2;\n    *(undefined4 *)(iVar1 + 0x10) = 0;\n    *(undefined4 *)(iVar1 + 0x1c) = 0;\n    *(undefined4 *)(iVar1 + 0x18) = 0;\n    *(undefined4 *)(iVar1 + 0x14) = 0;\n    *(undefined4 *)(iVar1 + 0x20) = 0;\n    if ((*(int *)(iVar1 + 0xc) != 0) && (iVar2 != 0)) goto LAB_0008c948;\n    FUN_0008c5e8(iVar1);\n  }" else (compound_statement "{\n    iVar2 = (*(code *)PTR_memcmp_00122454)(local_24,PTR_DAT_00121388 + -0x5f58,7);\n    if (iVar2 != 0) goto LAB_0008c92c;\n    uVar3 = FUN_0008a2ac(local_2c,local_res8);\n    *(undefined4 *)(iVar1 + 0xc) = uVar3;\n    iVar2 = FUN_0008a2ac(local_2c,local_res8);\n    *(int *)(iVar1 + 8) = iVar2;\n    *(undefined4 *)(iVar1 + 0x10) = 0;\n    *(undefined4 *)(iVar1 + 0x1c) = 0;\n    *(undefined4 *)(iVar1 + 0x18) = 0;\n    *(undefined4 *)(iVar1 + 0x14) = 0;\n    *(undefined4 *)(iVar1 + 0x20) = 0;\n    if ((*(int *)(iVar1 + 0xc) != 0) && (iVar2 != 0)) goto LAB_0008c948;\n    FUN_0008c5e8(iVar1);\n  }" { (expression_statement "iVar2 = (*(code *)PTR_memcmp_00122454)(local_24,PTR_DAT_00121388 + -0x5f58,7);" (assignment_expression "iVar2 = (*(code *)PTR_memcmp_00122454)(local_24,PTR_DAT_00121388 + -0x5f58,7)" identifier = (call_expression "(*(code *)PTR_memcmp_00122454)(local_24,PTR_DAT_00121388 + -0x5f58,7)" (parenthesized_expression "(*(code *)PTR_memcmp_00122454)" ( (pointer_expression "*(code *)PTR_memcmp_00122454" * (cast_expression "(code *)PTR_memcmp_00122454" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(local_24,PTR_DAT_00121388 + -0x5f58,7)" ( identifier , (binary_expression "PTR_DAT_00121388 + -0x5f58" identifier + number_literal) , number_literal )))) ;) (if_statement "if (iVar2 != 0) goto LAB_0008c92c;" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (goto_statement "goto LAB_0008c92c;" goto statement_identifier ;)) (expression_statement "uVar3 = FUN_0008a2ac(local_2c,local_res8);" (assignment_expression "uVar3 = FUN_0008a2ac(local_2c,local_res8)" identifier = (call_expression "FUN_0008a2ac(local_2c,local_res8)" identifier (argument_list "(local_2c,local_res8)" ( identifier , identifier )))) ;) (expression_statement "*(undefined4 *)(iVar1 + 0xc) = uVar3;" (assignment_expression "*(undefined4 *)(iVar1 + 0xc) = uVar3" (pointer_expression "*(undefined4 *)(iVar1 + 0xc)" * (cast_expression "(undefined4 *)(iVar1 + 0xc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0xc)" ( (binary_expression "iVar1 + 0xc" identifier + number_literal) )))) = identifier) ;) (expression_statement "iVar2 = FUN_0008a2ac(local_2c,local_res8);" (assignment_expression "iVar2 = FUN_0008a2ac(local_2c,local_res8)" identifier = (call_expression "FUN_0008a2ac(local_2c,local_res8)" identifier (argument_list "(local_2c,local_res8)" ( identifier , identifier )))) ;) (expression_statement "*(int *)(iVar1 + 8) = iVar2;" (assignment_expression "*(int *)(iVar1 + 8) = iVar2" (pointer_expression "*(int *)(iVar1 + 8)" * (cast_expression "(int *)(iVar1 + 8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 8)" ( (binary_expression "iVar1 + 8" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(undefined4 *)(iVar1 + 0x10) = 0;" (assignment_expression "*(undefined4 *)(iVar1 + 0x10) = 0" (pointer_expression "*(undefined4 *)(iVar1 + 0x10)" * (cast_expression "(undefined4 *)(iVar1 + 0x10)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x10)" ( (binary_expression "iVar1 + 0x10" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined4 *)(iVar1 + 0x1c) = 0;" (assignment_expression "*(undefined4 *)(iVar1 + 0x1c) = 0" (pointer_expression "*(undefined4 *)(iVar1 + 0x1c)" * (cast_expression "(undefined4 *)(iVar1 + 0x1c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x1c)" ( (binary_expression "iVar1 + 0x1c" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined4 *)(iVar1 + 0x18) = 0;" (assignment_expression "*(undefined4 *)(iVar1 + 0x18) = 0" (pointer_expression "*(undefined4 *)(iVar1 + 0x18)" * (cast_expression "(undefined4 *)(iVar1 + 0x18)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x18)" ( (binary_expression "iVar1 + 0x18" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined4 *)(iVar1 + 0x14) = 0;" (assignment_expression "*(undefined4 *)(iVar1 + 0x14) = 0" (pointer_expression "*(undefined4 *)(iVar1 + 0x14)" * (cast_expression "(undefined4 *)(iVar1 + 0x14)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x14)" ( (binary_expression "iVar1 + 0x14" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined4 *)(iVar1 + 0x20) = 0;" (assignment_expression "*(undefined4 *)(iVar1 + 0x20) = 0" (pointer_expression "*(undefined4 *)(iVar1 + 0x20)" * (cast_expression "(undefined4 *)(iVar1 + 0x20)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x20)" ( (binary_expression "iVar1 + 0x20" identifier + number_literal) )))) = number_literal) ;) (if_statement "if ((*(int *)(iVar1 + 0xc) != 0) && (iVar2 != 0)) goto LAB_0008c948;" if (parenthesized_expression "((*(int *)(iVar1 + 0xc) != 0) && (iVar2 != 0))" ( (binary_expression "(*(int *)(iVar1 + 0xc) != 0) && (iVar2 != 0)" (parenthesized_expression "(*(int *)(iVar1 + 0xc) != 0)" ( (binary_expression "*(int *)(iVar1 + 0xc) != 0" (pointer_expression "*(int *)(iVar1 + 0xc)" * (cast_expression "(int *)(iVar1 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0xc)" ( (binary_expression "iVar1 + 0xc" identifier + number_literal) )))) != number_literal) )) && (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) ))) )) (goto_statement "goto LAB_0008c948;" goto statement_identifier ;)) (expression_statement "FUN_0008c5e8(iVar1);" (call_expression "FUN_0008c5e8(iVar1)" identifier (argument_list "(iVar1)" ( identifier ))) ;) }))) (expression_statement "iVar1 = 0;" (assignment_expression "iVar1 = 0" identifier = number_literal) ;) (labeled_statement "LAB_0008c948:\n  if (local_1c != *(int *)PTR___stack_chk_guard_00122654) {\n    (*(code *)PTR___stack_chk_fail_001222ec)();\n    iVar1 = FUN_0008c7ec();\n    if (iVar1 == 0) {\n      iVar2 = -1;\n    }\n    else {\n      iVar2 = bignum_bitcount(*(undefined4 *)(iVar1 + 8));\n      FUN_0008c5e8(iVar1);\n    }\n    return iVar2;\n  }" statement_identifier : (if_statement "if (local_1c != *(int *)PTR___stack_chk_guard_00122654) {\n    (*(code *)PTR___stack_chk_fail_001222ec)();\n    iVar1 = FUN_0008c7ec();\n    if (iVar1 == 0) {\n      iVar2 = -1;\n    }\n    else {\n      iVar2 = bignum_bitcount(*(undefined4 *)(iVar1 + 8));\n      FUN_0008c5e8(iVar1);\n    }\n    return iVar2;\n  }" if (parenthesized_expression "(local_1c != *(int *)PTR___stack_chk_guard_00122654)" ( (binary_expression "local_1c != *(int *)PTR___stack_chk_guard_00122654" identifier != (pointer_expression "*(int *)PTR___stack_chk_guard_00122654" * (cast_expression "(int *)PTR___stack_chk_guard_00122654" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) )) (compound_statement "{\n    (*(code *)PTR___stack_chk_fail_001222ec)();\n    iVar1 = FUN_0008c7ec();\n    if (iVar1 == 0) {\n      iVar2 = -1;\n    }\n    else {\n      iVar2 = bignum_bitcount(*(undefined4 *)(iVar1 + 8));\n      FUN_0008c5e8(iVar1);\n    }\n    return iVar2;\n  }" { (expression_statement "(*(code *)PTR___stack_chk_fail_001222ec)();" (call_expression "(*(code *)PTR___stack_chk_fail_001222ec)()" (parenthesized_expression "(*(code *)PTR___stack_chk_fail_001222ec)" ( (pointer_expression "*(code *)PTR___stack_chk_fail_001222ec" * (cast_expression "(code *)PTR___stack_chk_fail_001222ec" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))) ;) (expression_statement "iVar1 = FUN_0008c7ec();" (assignment_expression "iVar1 = FUN_0008c7ec()" identifier = (call_expression "FUN_0008c7ec()" identifier (argument_list "()" ( )))) ;) (if_statement "if (iVar1 == 0) {\n      iVar2 = -1;\n    }\n    else {\n      iVar2 = bignum_bitcount(*(undefined4 *)(iVar1 + 8));\n      FUN_0008c5e8(iVar1);\n    }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n      iVar2 = -1;\n    }" { (expression_statement "iVar2 = -1;" (assignment_expression "iVar2 = -1" identifier = number_literal) ;) }) (else_clause "else {\n      iVar2 = bignum_bitcount(*(undefined4 *)(iVar1 + 8));\n      FUN_0008c5e8(iVar1);\n    }" else (compound_statement "{\n      iVar2 = bignum_bitcount(*(undefined4 *)(iVar1 + 8));\n      FUN_0008c5e8(iVar1);\n    }" { (expression_statement "iVar2 = bignum_bitcount(*(undefined4 *)(iVar1 + 8));" (assignment_expression "iVar2 = bignum_bitcount(*(undefined4 *)(iVar1 + 8))" identifier = (call_expression "bignum_bitcount(*(undefined4 *)(iVar1 + 8))" identifier (argument_list "(*(undefined4 *)(iVar1 + 8))" ( (pointer_expression "*(undefined4 *)(iVar1 + 8)" * (cast_expression "(undefined4 *)(iVar1 + 8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 8)" ( (binary_expression "iVar1 + 8" identifier + number_literal) )))) )))) ;) (expression_statement "FUN_0008c5e8(iVar1);" (call_expression "FUN_0008c5e8(iVar1)" identifier (argument_list "(iVar1)" ( identifier ))) ;) }))) (return_statement "return iVar2;" return identifier ;) }))) (return_statement "return iVar1;" return identifier ;) })))
(translation_unit "void * rsa2_newkey(ssh_signkey *self,char *data,int len)\n\n{\n  void *pvVar1;\n  int iVar2;\n  Bignum pvVar3;\n  void *pvVar4;\n  ssh_signkey *self_00;\n  int *datalen;\n  int *datalen_00;\n  char **p_00;\n  int local_res8 [2];\n  char *local_2c [2];\n  char *p;\n  int slen;\n  ssh_signkey *local_1c;\n  \n  local_1c = *(ssh_signkey **)PTR___stack_chk_guard_00122654;\n  local_res8[0] = len;\n  local_2c[0] = data;\n  pvVar1 = (void *)(*(code *)PTR_safemalloc_00121314)(1,0x24);\n  p_00 = &p;\n  datalen = local_res8;\n  getstring(local_2c,datalen,p_00,&slen);\n  if ((p == (char *)0x0) || (p_00 = (char **)0x7, slen != 7)) {\nLAB_0008c92c:\n    datalen_00 = datalen;\n    (*(code *)PTR_safefree_00121304)(pvVar1);\n  }\n  else {\n    datalen = (int *)(PTR_E0_218__00121388 + -0x5f58);\n    iVar2 = (*(code *)PTR_memcmp_00122454)();\n    datalen_00 = local_res8;\n    if (iVar2 != 0) goto LAB_0008c92c;\n    pvVar3 = getmp(local_2c,datalen_00);\n    *(Bignum *)((int)pvVar1 + 0xc) = pvVar3;\n    pvVar3 = getmp(local_2c,datalen_00);\n    *(Bignum *)((int)pvVar1 + 8) = pvVar3;\n    *(undefined4 *)((int)pvVar1 + 0x10) = 0;\n    *(undefined4 *)((int)pvVar1 + 0x1c) = 0;\n    *(undefined4 *)((int)pvVar1 + 0x18) = 0;\n    *(undefined4 *)((int)pvVar1 + 0x14) = 0;\n    *(undefined4 *)((int)pvVar1 + 0x20) = 0;\n    if ((*(int *)((int)pvVar1 + 0xc) != 0) && (pvVar3 != (Bignum)0x0)) goto LAB_0008c948;\n    rsa2_freekey(pvVar1);\n  }\n  pvVar1 = (void *)0x0;\nLAB_0008c948:\n  if (local_1c != *(ssh_signkey **)PTR___stack_chk_guard_00122654) {\n    self_00 = local_1c;\n    (*(code *)PTR___stack_chk_fail_001222ec)();\n    pvVar1 = rsa2_newkey(self_00,(char *)datalen_00,(int)p_00);\n    if (pvVar1 == (void *)0x0) {\n      pvVar4 = (void *)0xffffffff;\n    }\n    else {\n      pvVar4 = (void *)bignum_bitcount(*(Bignum_conflict *)((int)pvVar1 + 8));\n      rsa2_freekey(pvVar1);\n    }\n    return pvVar4;\n  }\n  return pvVar1;\n}\n\n" (function_definition "void * rsa2_newkey(ssh_signkey *self,char *data,int len)\n\n{\n  void *pvVar1;\n  int iVar2;\n  Bignum pvVar3;\n  void *pvVar4;\n  ssh_signkey *self_00;\n  int *datalen;\n  int *datalen_00;\n  char **p_00;\n  int local_res8 [2];\n  char *local_2c [2];\n  char *p;\n  int slen;\n  ssh_signkey *local_1c;\n  \n  local_1c = *(ssh_signkey **)PTR___stack_chk_guard_00122654;\n  local_res8[0] = len;\n  local_2c[0] = data;\n  pvVar1 = (void *)(*(code *)PTR_safemalloc_00121314)(1,0x24);\n  p_00 = &p;\n  datalen = local_res8;\n  getstring(local_2c,datalen,p_00,&slen);\n  if ((p == (char *)0x0) || (p_00 = (char **)0x7, slen != 7)) {\nLAB_0008c92c:\n    datalen_00 = datalen;\n    (*(code *)PTR_safefree_00121304)(pvVar1);\n  }\n  else {\n    datalen = (int *)(PTR_E0_218__00121388 + -0x5f58);\n    iVar2 = (*(code *)PTR_memcmp_00122454)();\n    datalen_00 = local_res8;\n    if (iVar2 != 0) goto LAB_0008c92c;\n    pvVar3 = getmp(local_2c,datalen_00);\n    *(Bignum *)((int)pvVar1 + 0xc) = pvVar3;\n    pvVar3 = getmp(local_2c,datalen_00);\n    *(Bignum *)((int)pvVar1 + 8) = pvVar3;\n    *(undefined4 *)((int)pvVar1 + 0x10) = 0;\n    *(undefined4 *)((int)pvVar1 + 0x1c) = 0;\n    *(undefined4 *)((int)pvVar1 + 0x18) = 0;\n    *(undefined4 *)((int)pvVar1 + 0x14) = 0;\n    *(undefined4 *)((int)pvVar1 + 0x20) = 0;\n    if ((*(int *)((int)pvVar1 + 0xc) != 0) && (pvVar3 != (Bignum)0x0)) goto LAB_0008c948;\n    rsa2_freekey(pvVar1);\n  }\n  pvVar1 = (void *)0x0;\nLAB_0008c948:\n  if (local_1c != *(ssh_signkey **)PTR___stack_chk_guard_00122654) {\n    self_00 = local_1c;\n    (*(code *)PTR___stack_chk_fail_001222ec)();\n    pvVar1 = rsa2_newkey(self_00,(char *)datalen_00,(int)p_00);\n    if (pvVar1 == (void *)0x0) {\n      pvVar4 = (void *)0xffffffff;\n    }\n    else {\n      pvVar4 = (void *)bignum_bitcount(*(Bignum_conflict *)((int)pvVar1 + 8));\n      rsa2_freekey(pvVar1);\n    }\n    return pvVar4;\n  }\n  return pvVar1;\n}" primitive_type (pointer_declarator "* rsa2_newkey(ssh_signkey *self,char *data,int len)" * (function_declarator "rsa2_newkey(ssh_signkey *self,char *data,int len)" identifier (parameter_list "(ssh_signkey *self,char *data,int len)" ( (parameter_declaration "ssh_signkey *self" type_identifier (pointer_declarator "*self" * identifier)) , (parameter_declaration "char *data" primitive_type (pointer_declarator "*data" * identifier)) , (parameter_declaration "int len" primitive_type identifier) )))) (compound_statement "{\n  void *pvVar1;\n  int iVar2;\n  Bignum pvVar3;\n  void *pvVar4;\n  ssh_signkey *self_00;\n  int *datalen;\n  int *datalen_00;\n  char **p_00;\n  int local_res8 [2];\n  char *local_2c [2];\n  char *p;\n  int slen;\n  ssh_signkey *local_1c;\n  \n  local_1c = *(ssh_signkey **)PTR___stack_chk_guard_00122654;\n  local_res8[0] = len;\n  local_2c[0] = data;\n  pvVar1 = (void *)(*(code *)PTR_safemalloc_00121314)(1,0x24);\n  p_00 = &p;\n  datalen = local_res8;\n  getstring(local_2c,datalen,p_00,&slen);\n  if ((p == (char *)0x0) || (p_00 = (char **)0x7, slen != 7)) {\nLAB_0008c92c:\n    datalen_00 = datalen;\n    (*(code *)PTR_safefree_00121304)(pvVar1);\n  }\n  else {\n    datalen = (int *)(PTR_E0_218__00121388 + -0x5f58);\n    iVar2 = (*(code *)PTR_memcmp_00122454)();\n    datalen_00 = local_res8;\n    if (iVar2 != 0) goto LAB_0008c92c;\n    pvVar3 = getmp(local_2c,datalen_00);\n    *(Bignum *)((int)pvVar1 + 0xc) = pvVar3;\n    pvVar3 = getmp(local_2c,datalen_00);\n    *(Bignum *)((int)pvVar1 + 8) = pvVar3;\n    *(undefined4 *)((int)pvVar1 + 0x10) = 0;\n    *(undefined4 *)((int)pvVar1 + 0x1c) = 0;\n    *(undefined4 *)((int)pvVar1 + 0x18) = 0;\n    *(undefined4 *)((int)pvVar1 + 0x14) = 0;\n    *(undefined4 *)((int)pvVar1 + 0x20) = 0;\n    if ((*(int *)((int)pvVar1 + 0xc) != 0) && (pvVar3 != (Bignum)0x0)) goto LAB_0008c948;\n    rsa2_freekey(pvVar1);\n  }\n  pvVar1 = (void *)0x0;\nLAB_0008c948:\n  if (local_1c != *(ssh_signkey **)PTR___stack_chk_guard_00122654) {\n    self_00 = local_1c;\n    (*(code *)PTR___stack_chk_fail_001222ec)();\n    pvVar1 = rsa2_newkey(self_00,(char *)datalen_00,(int)p_00);\n    if (pvVar1 == (void *)0x0) {\n      pvVar4 = (void *)0xffffffff;\n    }\n    else {\n      pvVar4 = (void *)bignum_bitcount(*(Bignum_conflict *)((int)pvVar1 + 8));\n      rsa2_freekey(pvVar1);\n    }\n    return pvVar4;\n  }\n  return pvVar1;\n}" { (declaration "void *pvVar1;" primitive_type (pointer_declarator "*pvVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "Bignum pvVar3;" type_identifier identifier ;) (declaration "void *pvVar4;" primitive_type (pointer_declarator "*pvVar4" * identifier) ;) (declaration "ssh_signkey *self_00;" type_identifier (pointer_declarator "*self_00" * identifier) ;) (declaration "int *datalen;" primitive_type (pointer_declarator "*datalen" * identifier) ;) (declaration "int *datalen_00;" primitive_type (pointer_declarator "*datalen_00" * identifier) ;) (declaration "char **p_00;" primitive_type (pointer_declarator "**p_00" * (pointer_declarator "*p_00" * identifier)) ;) (declaration "int local_res8 [2];" primitive_type (array_declarator "local_res8 [2]" identifier [ number_literal ]) ;) (declaration "char *local_2c [2];" primitive_type (pointer_declarator "*local_2c [2]" * (array_declarator "local_2c [2]" identifier [ number_literal ])) ;) (declaration "char *p;" primitive_type (pointer_declarator "*p" * identifier) ;) (declaration "int slen;" primitive_type identifier ;) (declaration "ssh_signkey *local_1c;" type_identifier (pointer_declarator "*local_1c" * identifier) ;) (expression_statement "local_1c = *(ssh_signkey **)PTR___stack_chk_guard_00122654;" (assignment_expression "local_1c = *(ssh_signkey **)PTR___stack_chk_guard_00122654" identifier = (pointer_expression "*(ssh_signkey **)PTR___stack_chk_guard_00122654" * (cast_expression "(ssh_signkey **)PTR___stack_chk_guard_00122654" ( (type_descriptor "ssh_signkey **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier))) ;) (expression_statement "local_res8[0] = len;" (assignment_expression "local_res8[0] = len" (subscript_expression "local_res8[0]" identifier [ number_literal ]) = identifier) ;) (expression_statement "local_2c[0] = data;" (assignment_expression "local_2c[0] = data" (subscript_expression "local_2c[0]" identifier [ number_literal ]) = identifier) ;) (expression_statement "pvVar1 = (void *)(*(code *)PTR_safemalloc_00121314)(1,0x24);" (assignment_expression "pvVar1 = (void *)(*(code *)PTR_safemalloc_00121314)(1,0x24)" identifier = (cast_expression "(void *)(*(code *)PTR_safemalloc_00121314)(1,0x24)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR_safemalloc_00121314)(1,0x24)" (parenthesized_expression "(*(code *)PTR_safemalloc_00121314)" ( (pointer_expression "*(code *)PTR_safemalloc_00121314" * (cast_expression "(code *)PTR_safemalloc_00121314" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(1,0x24)" ( number_literal , number_literal ))))) ;) (expression_statement "p_00 = &p;" (assignment_expression "p_00 = &p" identifier = (pointer_expression "&p" & identifier)) ;) (expression_statement "datalen = local_res8;" (assignment_expression "datalen = local_res8" identifier = identifier) ;) (expression_statement "getstring(local_2c,datalen,p_00,&slen);" (call_expression "getstring(local_2c,datalen,p_00,&slen)" identifier (argument_list "(local_2c,datalen,p_00,&slen)" ( identifier , identifier , identifier , (pointer_expression "&slen" & identifier) ))) ;) (if_statement "if ((p == (char *)0x0) || (p_00 = (char **)0x7, slen != 7)) {\nLAB_0008c92c:\n    datalen_00 = datalen;\n    (*(code *)PTR_safefree_00121304)(pvVar1);\n  }\n  else {\n    datalen = (int *)(PTR_E0_218__00121388 + -0x5f58);\n    iVar2 = (*(code *)PTR_memcmp_00122454)();\n    datalen_00 = local_res8;\n    if (iVar2 != 0) goto LAB_0008c92c;\n    pvVar3 = getmp(local_2c,datalen_00);\n    *(Bignum *)((int)pvVar1 + 0xc) = pvVar3;\n    pvVar3 = getmp(local_2c,datalen_00);\n    *(Bignum *)((int)pvVar1 + 8) = pvVar3;\n    *(undefined4 *)((int)pvVar1 + 0x10) = 0;\n    *(undefined4 *)((int)pvVar1 + 0x1c) = 0;\n    *(undefined4 *)((int)pvVar1 + 0x18) = 0;\n    *(undefined4 *)((int)pvVar1 + 0x14) = 0;\n    *(undefined4 *)((int)pvVar1 + 0x20) = 0;\n    if ((*(int *)((int)pvVar1 + 0xc) != 0) && (pvVar3 != (Bignum)0x0)) goto LAB_0008c948;\n    rsa2_freekey(pvVar1);\n  }" if (parenthesized_expression "((p == (char *)0x0) || (p_00 = (char **)0x7, slen != 7))" ( (binary_expression "(p == (char *)0x0) || (p_00 = (char **)0x7, slen != 7)" (parenthesized_expression "(p == (char *)0x0)" ( (binary_expression "p == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) || (parenthesized_expression "(p_00 = (char **)0x7, slen != 7)" ( (comma_expression "p_00 = (char **)0x7, slen != 7" (assignment_expression "p_00 = (char **)0x7" identifier = (cast_expression "(char **)0x7" ( (type_descriptor "char **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) number_literal)) , (binary_expression "slen != 7" identifier != number_literal)) ))) )) (compound_statement "{\nLAB_0008c92c:\n    datalen_00 = datalen;\n    (*(code *)PTR_safefree_00121304)(pvVar1);\n  }" { (labeled_statement "LAB_0008c92c:\n    datalen_00 = datalen;" statement_identifier : (expression_statement "datalen_00 = datalen;" (assignment_expression "datalen_00 = datalen" identifier = identifier) ;)) (expression_statement "(*(code *)PTR_safefree_00121304)(pvVar1);" (call_expression "(*(code *)PTR_safefree_00121304)(pvVar1)" (parenthesized_expression "(*(code *)PTR_safefree_00121304)" ( (pointer_expression "*(code *)PTR_safefree_00121304" * (cast_expression "(code *)PTR_safefree_00121304" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(pvVar1)" ( identifier ))) ;) }) (else_clause "else {\n    datalen = (int *)(PTR_E0_218__00121388 + -0x5f58);\n    iVar2 = (*(code *)PTR_memcmp_00122454)();\n    datalen_00 = local_res8;\n    if (iVar2 != 0) goto LAB_0008c92c;\n    pvVar3 = getmp(local_2c,datalen_00);\n    *(Bignum *)((int)pvVar1 + 0xc) = pvVar3;\n    pvVar3 = getmp(local_2c,datalen_00);\n    *(Bignum *)((int)pvVar1 + 8) = pvVar3;\n    *(undefined4 *)((int)pvVar1 + 0x10) = 0;\n    *(undefined4 *)((int)pvVar1 + 0x1c) = 0;\n    *(undefined4 *)((int)pvVar1 + 0x18) = 0;\n    *(undefined4 *)((int)pvVar1 + 0x14) = 0;\n    *(undefined4 *)((int)pvVar1 + 0x20) = 0;\n    if ((*(int *)((int)pvVar1 + 0xc) != 0) && (pvVar3 != (Bignum)0x0)) goto LAB_0008c948;\n    rsa2_freekey(pvVar1);\n  }" else (compound_statement "{\n    datalen = (int *)(PTR_E0_218__00121388 + -0x5f58);\n    iVar2 = (*(code *)PTR_memcmp_00122454)();\n    datalen_00 = local_res8;\n    if (iVar2 != 0) goto LAB_0008c92c;\n    pvVar3 = getmp(local_2c,datalen_00);\n    *(Bignum *)((int)pvVar1 + 0xc) = pvVar3;\n    pvVar3 = getmp(local_2c,datalen_00);\n    *(Bignum *)((int)pvVar1 + 8) = pvVar3;\n    *(undefined4 *)((int)pvVar1 + 0x10) = 0;\n    *(undefined4 *)((int)pvVar1 + 0x1c) = 0;\n    *(undefined4 *)((int)pvVar1 + 0x18) = 0;\n    *(undefined4 *)((int)pvVar1 + 0x14) = 0;\n    *(undefined4 *)((int)pvVar1 + 0x20) = 0;\n    if ((*(int *)((int)pvVar1 + 0xc) != 0) && (pvVar3 != (Bignum)0x0)) goto LAB_0008c948;\n    rsa2_freekey(pvVar1);\n  }" { (expression_statement "datalen = (int *)(PTR_E0_218__00121388 + -0x5f58);" (assignment_expression "datalen = (int *)(PTR_E0_218__00121388 + -0x5f58)" identifier = (cast_expression "(int *)(PTR_E0_218__00121388 + -0x5f58)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(PTR_E0_218__00121388 + -0x5f58)" ( (binary_expression "PTR_E0_218__00121388 + -0x5f58" identifier + number_literal) )))) ;) (expression_statement "iVar2 = (*(code *)PTR_memcmp_00122454)();" (assignment_expression "iVar2 = (*(code *)PTR_memcmp_00122454)()" identifier = (call_expression "(*(code *)PTR_memcmp_00122454)()" (parenthesized_expression "(*(code *)PTR_memcmp_00122454)" ( (pointer_expression "*(code *)PTR_memcmp_00122454" * (cast_expression "(code *)PTR_memcmp_00122454" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( )))) ;) (expression_statement "datalen_00 = local_res8;" (assignment_expression "datalen_00 = local_res8" identifier = identifier) ;) (if_statement "if (iVar2 != 0) goto LAB_0008c92c;" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (goto_statement "goto LAB_0008c92c;" goto statement_identifier ;)) (expression_statement "pvVar3 = getmp(local_2c,datalen_00);" (assignment_expression "pvVar3 = getmp(local_2c,datalen_00)" identifier = (call_expression "getmp(local_2c,datalen_00)" identifier (argument_list "(local_2c,datalen_00)" ( identifier , identifier )))) ;) (expression_statement "*(Bignum *)((int)pvVar1 + 0xc) = pvVar3;" (assignment_expression "*(Bignum *)((int)pvVar1 + 0xc) = pvVar3" (pointer_expression "*(Bignum *)((int)pvVar1 + 0xc)" * (cast_expression "(Bignum *)((int)pvVar1 + 0xc)" ( (type_descriptor "Bignum *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)pvVar1 + 0xc)" ( (binary_expression "(int)pvVar1 + 0xc" (cast_expression "(int)pvVar1" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) = identifier) ;) (expression_statement "pvVar3 = getmp(local_2c,datalen_00);" (assignment_expression "pvVar3 = getmp(local_2c,datalen_00)" identifier = (call_expression "getmp(local_2c,datalen_00)" identifier (argument_list "(local_2c,datalen_00)" ( identifier , identifier )))) ;) (expression_statement "*(Bignum *)((int)pvVar1 + 8) = pvVar3;" (assignment_expression "*(Bignum *)((int)pvVar1 + 8) = pvVar3" (pointer_expression "*(Bignum *)((int)pvVar1 + 8)" * (cast_expression "(Bignum *)((int)pvVar1 + 8)" ( (type_descriptor "Bignum *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)pvVar1 + 8)" ( (binary_expression "(int)pvVar1 + 8" (cast_expression "(int)pvVar1" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) = identifier) ;) (expression_statement "*(undefined4 *)((int)pvVar1 + 0x10) = 0;" (assignment_expression "*(undefined4 *)((int)pvVar1 + 0x10) = 0" (pointer_expression "*(undefined4 *)((int)pvVar1 + 0x10)" * (cast_expression "(undefined4 *)((int)pvVar1 + 0x10)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)pvVar1 + 0x10)" ( (binary_expression "(int)pvVar1 + 0x10" (cast_expression "(int)pvVar1" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined4 *)((int)pvVar1 + 0x1c) = 0;" (assignment_expression "*(undefined4 *)((int)pvVar1 + 0x1c) = 0" (pointer_expression "*(undefined4 *)((int)pvVar1 + 0x1c)" * (cast_expression "(undefined4 *)((int)pvVar1 + 0x1c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)pvVar1 + 0x1c)" ( (binary_expression "(int)pvVar1 + 0x1c" (cast_expression "(int)pvVar1" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined4 *)((int)pvVar1 + 0x18) = 0;" (assignment_expression "*(undefined4 *)((int)pvVar1 + 0x18) = 0" (pointer_expression "*(undefined4 *)((int)pvVar1 + 0x18)" * (cast_expression "(undefined4 *)((int)pvVar1 + 0x18)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)pvVar1 + 0x18)" ( (binary_expression "(int)pvVar1 + 0x18" (cast_expression "(int)pvVar1" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined4 *)((int)pvVar1 + 0x14) = 0;" (assignment_expression "*(undefined4 *)((int)pvVar1 + 0x14) = 0" (pointer_expression "*(undefined4 *)((int)pvVar1 + 0x14)" * (cast_expression "(undefined4 *)((int)pvVar1 + 0x14)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)pvVar1 + 0x14)" ( (binary_expression "(int)pvVar1 + 0x14" (cast_expression "(int)pvVar1" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined4 *)((int)pvVar1 + 0x20) = 0;" (assignment_expression "*(undefined4 *)((int)pvVar1 + 0x20) = 0" (pointer_expression "*(undefined4 *)((int)pvVar1 + 0x20)" * (cast_expression "(undefined4 *)((int)pvVar1 + 0x20)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)pvVar1 + 0x20)" ( (binary_expression "(int)pvVar1 + 0x20" (cast_expression "(int)pvVar1" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) = number_literal) ;) (if_statement "if ((*(int *)((int)pvVar1 + 0xc) != 0) && (pvVar3 != (Bignum)0x0)) goto LAB_0008c948;" if (parenthesized_expression "((*(int *)((int)pvVar1 + 0xc) != 0) && (pvVar3 != (Bignum)0x0))" ( (binary_expression "(*(int *)((int)pvVar1 + 0xc) != 0) && (pvVar3 != (Bignum)0x0)" (parenthesized_expression "(*(int *)((int)pvVar1 + 0xc) != 0)" ( (binary_expression "*(int *)((int)pvVar1 + 0xc) != 0" (pointer_expression "*(int *)((int)pvVar1 + 0xc)" * (cast_expression "(int *)((int)pvVar1 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)pvVar1 + 0xc)" ( (binary_expression "(int)pvVar1 + 0xc" (cast_expression "(int)pvVar1" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) != number_literal) )) && (parenthesized_expression "(pvVar3 != (Bignum)0x0)" ( (binary_expression "pvVar3 != (Bignum)0x0" identifier != (cast_expression "(Bignum)0x0" ( (type_descriptor "Bignum" type_identifier) ) number_literal)) ))) )) (goto_statement "goto LAB_0008c948;" goto statement_identifier ;)) (expression_statement "rsa2_freekey(pvVar1);" (call_expression "rsa2_freekey(pvVar1)" identifier (argument_list "(pvVar1)" ( identifier ))) ;) }))) (expression_statement "pvVar1 = (void *)0x0;" (assignment_expression "pvVar1 = (void *)0x0" identifier = (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (labeled_statement "LAB_0008c948:\n  if (local_1c != *(ssh_signkey **)PTR___stack_chk_guard_00122654) {\n    self_00 = local_1c;\n    (*(code *)PTR___stack_chk_fail_001222ec)();\n    pvVar1 = rsa2_newkey(self_00,(char *)datalen_00,(int)p_00);\n    if (pvVar1 == (void *)0x0) {\n      pvVar4 = (void *)0xffffffff;\n    }\n    else {\n      pvVar4 = (void *)bignum_bitcount(*(Bignum_conflict *)((int)pvVar1 + 8));\n      rsa2_freekey(pvVar1);\n    }\n    return pvVar4;\n  }" statement_identifier : (if_statement "if (local_1c != *(ssh_signkey **)PTR___stack_chk_guard_00122654) {\n    self_00 = local_1c;\n    (*(code *)PTR___stack_chk_fail_001222ec)();\n    pvVar1 = rsa2_newkey(self_00,(char *)datalen_00,(int)p_00);\n    if (pvVar1 == (void *)0x0) {\n      pvVar4 = (void *)0xffffffff;\n    }\n    else {\n      pvVar4 = (void *)bignum_bitcount(*(Bignum_conflict *)((int)pvVar1 + 8));\n      rsa2_freekey(pvVar1);\n    }\n    return pvVar4;\n  }" if (parenthesized_expression "(local_1c != *(ssh_signkey **)PTR___stack_chk_guard_00122654)" ( (binary_expression "local_1c != *(ssh_signkey **)PTR___stack_chk_guard_00122654" identifier != (pointer_expression "*(ssh_signkey **)PTR___stack_chk_guard_00122654" * (cast_expression "(ssh_signkey **)PTR___stack_chk_guard_00122654" ( (type_descriptor "ssh_signkey **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier))) )) (compound_statement "{\n    self_00 = local_1c;\n    (*(code *)PTR___stack_chk_fail_001222ec)();\n    pvVar1 = rsa2_newkey(self_00,(char *)datalen_00,(int)p_00);\n    if (pvVar1 == (void *)0x0) {\n      pvVar4 = (void *)0xffffffff;\n    }\n    else {\n      pvVar4 = (void *)bignum_bitcount(*(Bignum_conflict *)((int)pvVar1 + 8));\n      rsa2_freekey(pvVar1);\n    }\n    return pvVar4;\n  }" { (expression_statement "self_00 = local_1c;" (assignment_expression "self_00 = local_1c" identifier = identifier) ;) (expression_statement "(*(code *)PTR___stack_chk_fail_001222ec)();" (call_expression "(*(code *)PTR___stack_chk_fail_001222ec)()" (parenthesized_expression "(*(code *)PTR___stack_chk_fail_001222ec)" ( (pointer_expression "*(code *)PTR___stack_chk_fail_001222ec" * (cast_expression "(code *)PTR___stack_chk_fail_001222ec" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))) ;) (expression_statement "pvVar1 = rsa2_newkey(self_00,(char *)datalen_00,(int)p_00);" (assignment_expression "pvVar1 = rsa2_newkey(self_00,(char *)datalen_00,(int)p_00)" identifier = (call_expression "rsa2_newkey(self_00,(char *)datalen_00,(int)p_00)" identifier (argument_list "(self_00,(char *)datalen_00,(int)p_00)" ( identifier , (cast_expression "(char *)datalen_00" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier) , (cast_expression "(int)p_00" ( (type_descriptor "int" primitive_type) ) identifier) )))) ;) (if_statement "if (pvVar1 == (void *)0x0) {\n      pvVar4 = (void *)0xffffffff;\n    }\n    else {\n      pvVar4 = (void *)bignum_bitcount(*(Bignum_conflict *)((int)pvVar1 + 8));\n      rsa2_freekey(pvVar1);\n    }" if (parenthesized_expression "(pvVar1 == (void *)0x0)" ( (binary_expression "pvVar1 == (void *)0x0" identifier == (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      pvVar4 = (void *)0xffffffff;\n    }" { (expression_statement "pvVar4 = (void *)0xffffffff;" (assignment_expression "pvVar4 = (void *)0xffffffff" identifier = (cast_expression "(void *)0xffffffff" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) }) (else_clause "else {\n      pvVar4 = (void *)bignum_bitcount(*(Bignum_conflict *)((int)pvVar1 + 8));\n      rsa2_freekey(pvVar1);\n    }" else (compound_statement "{\n      pvVar4 = (void *)bignum_bitcount(*(Bignum_conflict *)((int)pvVar1 + 8));\n      rsa2_freekey(pvVar1);\n    }" { (expression_statement "pvVar4 = (void *)bignum_bitcount(*(Bignum_conflict *)((int)pvVar1 + 8));" (assignment_expression "pvVar4 = (void *)bignum_bitcount(*(Bignum_conflict *)((int)pvVar1 + 8))" identifier = (cast_expression "(void *)bignum_bitcount(*(Bignum_conflict *)((int)pvVar1 + 8))" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "bignum_bitcount(*(Bignum_conflict *)((int)pvVar1 + 8))" identifier (argument_list "(*(Bignum_conflict *)((int)pvVar1 + 8))" ( (pointer_expression "*(Bignum_conflict *)((int)pvVar1 + 8)" * (cast_expression "(Bignum_conflict *)((int)pvVar1 + 8)" ( (type_descriptor "Bignum_conflict *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)pvVar1 + 8)" ( (binary_expression "(int)pvVar1 + 8" (cast_expression "(int)pvVar1" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) ))))) ;) (expression_statement "rsa2_freekey(pvVar1);" (call_expression "rsa2_freekey(pvVar1)" identifier (argument_list "(pvVar1)" ( identifier ))) ;) }))) (return_statement "return pvVar4;" return identifier ;) }))) (return_statement "return pvVar1;" return identifier ;) })))
(translation_unit "int FUN_0008c7ec(undefined4 param_1,undefined4 param_2,undefined4 param_3)\n\n{\n  int iVar1;\n  int iVar2;\n  undefined4 uVar3;\n  undefined4 local_res8 [2];\n  undefined4 local_2c [2];\n  int local_24;\n  int local_20;\n  int local_1c;\n  \n  local_1c = *(int *)PTR___stack_chk_guard_00122654;\n  local_res8[0] = param_3;\n  local_2c[0] = param_2;\n  iVar1 = (*(code *)PTR_safemalloc_00121314)(1,0x24);\n  FUN_0008a1b0(local_2c,local_res8,&local_24,&local_20);\n  if ((local_24 == 0) || (local_20 != 7)) {\nLAB_0008c92c:\n    (*(code *)PTR_safefree_00121304)(iVar1);\n  }\n  else {\n    iVar2 = (*(code *)PTR_memcmp_00122454)(local_24,PTR_DAT_00121388 + -0x5f58,7);\n    if (iVar2 != 0) goto LAB_0008c92c;\n    uVar3 = FUN_0008a2ac(local_2c,local_res8);\n    *(undefined4 *)(iVar1 + 0xc) = uVar3;\n    iVar2 = FUN_0008a2ac(local_2c,local_res8);\n    *(int *)(iVar1 + 8) = iVar2;\n    *(undefined4 *)(iVar1 + 0x10) = 0;\n    *(undefined4 *)(iVar1 + 0x1c) = 0;\n    *(undefined4 *)(iVar1 + 0x18) = 0;\n    *(undefined4 *)(iVar1 + 0x14) = 0;\n    *(undefined4 *)(iVar1 + 0x20) = 0;\n    if ((*(int *)(iVar1 + 0xc) != 0) && (iVar2 != 0)) goto LAB_0008c948;\n    FUN_0008c5e8(iVar1);\n  }\n  iVar1 = 0;\nLAB_0008c948:\n  if (local_1c != *(int *)PTR___stack_chk_guard_00122654) {\n    (*(code *)PTR___stack_chk_fail_001222ec)();\n    iVar1 = FUN_0008c7ec();\n    if (iVar1 == 0) {\n      iVar2 = -1;\n    }\n    else {\n      iVar2 = bignum_bitcount(*(undefined4 *)(iVar1 + 8));\n      FUN_0008c5e8(iVar1);\n    }\n    return iVar2;\n  }\n  return iVar1;\n}\n\n" (function_definition "int FUN_0008c7ec(undefined4 param_1,undefined4 param_2,undefined4 param_3)\n\n{\n  int iVar1;\n  int iVar2;\n  undefined4 uVar3;\n  undefined4 local_res8 [2];\n  undefined4 local_2c [2];\n  int local_24;\n  int local_20;\n  int local_1c;\n  \n  local_1c = *(int *)PTR___stack_chk_guard_00122654;\n  local_res8[0] = param_3;\n  local_2c[0] = param_2;\n  iVar1 = (*(code *)PTR_safemalloc_00121314)(1,0x24);\n  FUN_0008a1b0(local_2c,local_res8,&local_24,&local_20);\n  if ((local_24 == 0) || (local_20 != 7)) {\nLAB_0008c92c:\n    (*(code *)PTR_safefree_00121304)(iVar1);\n  }\n  else {\n    iVar2 = (*(code *)PTR_memcmp_00122454)(local_24,PTR_DAT_00121388 + -0x5f58,7);\n    if (iVar2 != 0) goto LAB_0008c92c;\n    uVar3 = FUN_0008a2ac(local_2c,local_res8);\n    *(undefined4 *)(iVar1 + 0xc) = uVar3;\n    iVar2 = FUN_0008a2ac(local_2c,local_res8);\n    *(int *)(iVar1 + 8) = iVar2;\n    *(undefined4 *)(iVar1 + 0x10) = 0;\n    *(undefined4 *)(iVar1 + 0x1c) = 0;\n    *(undefined4 *)(iVar1 + 0x18) = 0;\n    *(undefined4 *)(iVar1 + 0x14) = 0;\n    *(undefined4 *)(iVar1 + 0x20) = 0;\n    if ((*(int *)(iVar1 + 0xc) != 0) && (iVar2 != 0)) goto LAB_0008c948;\n    FUN_0008c5e8(iVar1);\n  }\n  iVar1 = 0;\nLAB_0008c948:\n  if (local_1c != *(int *)PTR___stack_chk_guard_00122654) {\n    (*(code *)PTR___stack_chk_fail_001222ec)();\n    iVar1 = FUN_0008c7ec();\n    if (iVar1 == 0) {\n      iVar2 = -1;\n    }\n    else {\n      iVar2 = bignum_bitcount(*(undefined4 *)(iVar1 + 8));\n      FUN_0008c5e8(iVar1);\n    }\n    return iVar2;\n  }\n  return iVar1;\n}" primitive_type (function_declarator "FUN_0008c7ec(undefined4 param_1,undefined4 param_2,undefined4 param_3)" identifier (parameter_list "(undefined4 param_1,undefined4 param_2,undefined4 param_3)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "undefined4 param_3" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  undefined4 uVar3;\n  undefined4 local_res8 [2];\n  undefined4 local_2c [2];\n  int local_24;\n  int local_20;\n  int local_1c;\n  \n  local_1c = *(int *)PTR___stack_chk_guard_00122654;\n  local_res8[0] = param_3;\n  local_2c[0] = param_2;\n  iVar1 = (*(code *)PTR_safemalloc_00121314)(1,0x24);\n  FUN_0008a1b0(local_2c,local_res8,&local_24,&local_20);\n  if ((local_24 == 0) || (local_20 != 7)) {\nLAB_0008c92c:\n    (*(code *)PTR_safefree_00121304)(iVar1);\n  }\n  else {\n    iVar2 = (*(code *)PTR_memcmp_00122454)(local_24,PTR_DAT_00121388 + -0x5f58,7);\n    if (iVar2 != 0) goto LAB_0008c92c;\n    uVar3 = FUN_0008a2ac(local_2c,local_res8);\n    *(undefined4 *)(iVar1 + 0xc) = uVar3;\n    iVar2 = FUN_0008a2ac(local_2c,local_res8);\n    *(int *)(iVar1 + 8) = iVar2;\n    *(undefined4 *)(iVar1 + 0x10) = 0;\n    *(undefined4 *)(iVar1 + 0x1c) = 0;\n    *(undefined4 *)(iVar1 + 0x18) = 0;\n    *(undefined4 *)(iVar1 + 0x14) = 0;\n    *(undefined4 *)(iVar1 + 0x20) = 0;\n    if ((*(int *)(iVar1 + 0xc) != 0) && (iVar2 != 0)) goto LAB_0008c948;\n    FUN_0008c5e8(iVar1);\n  }\n  iVar1 = 0;\nLAB_0008c948:\n  if (local_1c != *(int *)PTR___stack_chk_guard_00122654) {\n    (*(code *)PTR___stack_chk_fail_001222ec)();\n    iVar1 = FUN_0008c7ec();\n    if (iVar1 == 0) {\n      iVar2 = -1;\n    }\n    else {\n      iVar2 = bignum_bitcount(*(undefined4 *)(iVar1 + 8));\n      FUN_0008c5e8(iVar1);\n    }\n    return iVar2;\n  }\n  return iVar1;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "undefined4 uVar3;" type_identifier identifier ;) (declaration "undefined4 local_res8 [2];" type_identifier (array_declarator "local_res8 [2]" identifier [ number_literal ]) ;) (declaration "undefined4 local_2c [2];" type_identifier (array_declarator "local_2c [2]" identifier [ number_literal ]) ;) (declaration "int local_24;" primitive_type identifier ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "int local_1c;" primitive_type identifier ;) (expression_statement "local_1c = *(int *)PTR___stack_chk_guard_00122654;" (assignment_expression "local_1c = *(int *)PTR___stack_chk_guard_00122654" identifier = (pointer_expression "*(int *)PTR___stack_chk_guard_00122654" * (cast_expression "(int *)PTR___stack_chk_guard_00122654" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) ;) (expression_statement "local_res8[0] = param_3;" (assignment_expression "local_res8[0] = param_3" (subscript_expression "local_res8[0]" identifier [ number_literal ]) = identifier) ;) (expression_statement "local_2c[0] = param_2;" (assignment_expression "local_2c[0] = param_2" (subscript_expression "local_2c[0]" identifier [ number_literal ]) = identifier) ;) (expression_statement "iVar1 = (*(code *)PTR_safemalloc_00121314)(1,0x24);" (assignment_expression "iVar1 = (*(code *)PTR_safemalloc_00121314)(1,0x24)" identifier = (call_expression "(*(code *)PTR_safemalloc_00121314)(1,0x24)" (parenthesized_expression "(*(code *)PTR_safemalloc_00121314)" ( (pointer_expression "*(code *)PTR_safemalloc_00121314" * (cast_expression "(code *)PTR_safemalloc_00121314" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(1,0x24)" ( number_literal , number_literal )))) ;) (expression_statement "FUN_0008a1b0(local_2c,local_res8,&local_24,&local_20);" (call_expression "FUN_0008a1b0(local_2c,local_res8,&local_24,&local_20)" identifier (argument_list "(local_2c,local_res8,&local_24,&local_20)" ( identifier , identifier , (pointer_expression "&local_24" & identifier) , (pointer_expression "&local_20" & identifier) ))) ;) (if_statement "if ((local_24 == 0) || (local_20 != 7)) {\nLAB_0008c92c:\n    (*(code *)PTR_safefree_00121304)(iVar1);\n  }\n  else {\n    iVar2 = (*(code *)PTR_memcmp_00122454)(local_24,PTR_DAT_00121388 + -0x5f58,7);\n    if (iVar2 != 0) goto LAB_0008c92c;\n    uVar3 = FUN_0008a2ac(local_2c,local_res8);\n    *(undefined4 *)(iVar1 + 0xc) = uVar3;\n    iVar2 = FUN_0008a2ac(local_2c,local_res8);\n    *(int *)(iVar1 + 8) = iVar2;\n    *(undefined4 *)(iVar1 + 0x10) = 0;\n    *(undefined4 *)(iVar1 + 0x1c) = 0;\n    *(undefined4 *)(iVar1 + 0x18) = 0;\n    *(undefined4 *)(iVar1 + 0x14) = 0;\n    *(undefined4 *)(iVar1 + 0x20) = 0;\n    if ((*(int *)(iVar1 + 0xc) != 0) && (iVar2 != 0)) goto LAB_0008c948;\n    FUN_0008c5e8(iVar1);\n  }" if (parenthesized_expression "((local_24 == 0) || (local_20 != 7))" ( (binary_expression "(local_24 == 0) || (local_20 != 7)" (parenthesized_expression "(local_24 == 0)" ( (binary_expression "local_24 == 0" identifier == number_literal) )) || (parenthesized_expression "(local_20 != 7)" ( (binary_expression "local_20 != 7" identifier != number_literal) ))) )) (compound_statement "{\nLAB_0008c92c:\n    (*(code *)PTR_safefree_00121304)(iVar1);\n  }" { (labeled_statement "LAB_0008c92c:\n    (*(code *)PTR_safefree_00121304)(iVar1);" statement_identifier : (expression_statement "(*(code *)PTR_safefree_00121304)(iVar1);" (call_expression "(*(code *)PTR_safefree_00121304)(iVar1)" (parenthesized_expression "(*(code *)PTR_safefree_00121304)" ( (pointer_expression "*(code *)PTR_safefree_00121304" * (cast_expression "(code *)PTR_safefree_00121304" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar1)" ( identifier ))) ;)) }) (else_clause "else {\n    iVar2 = (*(code *)PTR_memcmp_00122454)(local_24,PTR_DAT_00121388 + -0x5f58,7);\n    if (iVar2 != 0) goto LAB_0008c92c;\n    uVar3 = FUN_0008a2ac(local_2c,local_res8);\n    *(undefined4 *)(iVar1 + 0xc) = uVar3;\n    iVar2 = FUN_0008a2ac(local_2c,local_res8);\n    *(int *)(iVar1 + 8) = iVar2;\n    *(undefined4 *)(iVar1 + 0x10) = 0;\n    *(undefined4 *)(iVar1 + 0x1c) = 0;\n    *(undefined4 *)(iVar1 + 0x18) = 0;\n    *(undefined4 *)(iVar1 + 0x14) = 0;\n    *(undefined4 *)(iVar1 + 0x20) = 0;\n    if ((*(int *)(iVar1 + 0xc) != 0) && (iVar2 != 0)) goto LAB_0008c948;\n    FUN_0008c5e8(iVar1);\n  }" else (compound_statement "{\n    iVar2 = (*(code *)PTR_memcmp_00122454)(local_24,PTR_DAT_00121388 + -0x5f58,7);\n    if (iVar2 != 0) goto LAB_0008c92c;\n    uVar3 = FUN_0008a2ac(local_2c,local_res8);\n    *(undefined4 *)(iVar1 + 0xc) = uVar3;\n    iVar2 = FUN_0008a2ac(local_2c,local_res8);\n    *(int *)(iVar1 + 8) = iVar2;\n    *(undefined4 *)(iVar1 + 0x10) = 0;\n    *(undefined4 *)(iVar1 + 0x1c) = 0;\n    *(undefined4 *)(iVar1 + 0x18) = 0;\n    *(undefined4 *)(iVar1 + 0x14) = 0;\n    *(undefined4 *)(iVar1 + 0x20) = 0;\n    if ((*(int *)(iVar1 + 0xc) != 0) && (iVar2 != 0)) goto LAB_0008c948;\n    FUN_0008c5e8(iVar1);\n  }" { (expression_statement "iVar2 = (*(code *)PTR_memcmp_00122454)(local_24,PTR_DAT_00121388 + -0x5f58,7);" (assignment_expression "iVar2 = (*(code *)PTR_memcmp_00122454)(local_24,PTR_DAT_00121388 + -0x5f58,7)" identifier = (call_expression "(*(code *)PTR_memcmp_00122454)(local_24,PTR_DAT_00121388 + -0x5f58,7)" (parenthesized_expression "(*(code *)PTR_memcmp_00122454)" ( (pointer_expression "*(code *)PTR_memcmp_00122454" * (cast_expression "(code *)PTR_memcmp_00122454" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(local_24,PTR_DAT_00121388 + -0x5f58,7)" ( identifier , (binary_expression "PTR_DAT_00121388 + -0x5f58" identifier + number_literal) , number_literal )))) ;) (if_statement "if (iVar2 != 0) goto LAB_0008c92c;" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (goto_statement "goto LAB_0008c92c;" goto statement_identifier ;)) (expression_statement "uVar3 = FUN_0008a2ac(local_2c,local_res8);" (assignment_expression "uVar3 = FUN_0008a2ac(local_2c,local_res8)" identifier = (call_expression "FUN_0008a2ac(local_2c,local_res8)" identifier (argument_list "(local_2c,local_res8)" ( identifier , identifier )))) ;) (expression_statement "*(undefined4 *)(iVar1 + 0xc) = uVar3;" (assignment_expression "*(undefined4 *)(iVar1 + 0xc) = uVar3" (pointer_expression "*(undefined4 *)(iVar1 + 0xc)" * (cast_expression "(undefined4 *)(iVar1 + 0xc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0xc)" ( (binary_expression "iVar1 + 0xc" identifier + number_literal) )))) = identifier) ;) (expression_statement "iVar2 = FUN_0008a2ac(local_2c,local_res8);" (assignment_expression "iVar2 = FUN_0008a2ac(local_2c,local_res8)" identifier = (call_expression "FUN_0008a2ac(local_2c,local_res8)" identifier (argument_list "(local_2c,local_res8)" ( identifier , identifier )))) ;) (expression_statement "*(int *)(iVar1 + 8) = iVar2;" (assignment_expression "*(int *)(iVar1 + 8) = iVar2" (pointer_expression "*(int *)(iVar1 + 8)" * (cast_expression "(int *)(iVar1 + 8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 8)" ( (binary_expression "iVar1 + 8" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(undefined4 *)(iVar1 + 0x10) = 0;" (assignment_expression "*(undefined4 *)(iVar1 + 0x10) = 0" (pointer_expression "*(undefined4 *)(iVar1 + 0x10)" * (cast_expression "(undefined4 *)(iVar1 + 0x10)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x10)" ( (binary_expression "iVar1 + 0x10" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined4 *)(iVar1 + 0x1c) = 0;" (assignment_expression "*(undefined4 *)(iVar1 + 0x1c) = 0" (pointer_expression "*(undefined4 *)(iVar1 + 0x1c)" * (cast_expression "(undefined4 *)(iVar1 + 0x1c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x1c)" ( (binary_expression "iVar1 + 0x1c" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined4 *)(iVar1 + 0x18) = 0;" (assignment_expression "*(undefined4 *)(iVar1 + 0x18) = 0" (pointer_expression "*(undefined4 *)(iVar1 + 0x18)" * (cast_expression "(undefined4 *)(iVar1 + 0x18)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x18)" ( (binary_expression "iVar1 + 0x18" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined4 *)(iVar1 + 0x14) = 0;" (assignment_expression "*(undefined4 *)(iVar1 + 0x14) = 0" (pointer_expression "*(undefined4 *)(iVar1 + 0x14)" * (cast_expression "(undefined4 *)(iVar1 + 0x14)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x14)" ( (binary_expression "iVar1 + 0x14" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined4 *)(iVar1 + 0x20) = 0;" (assignment_expression "*(undefined4 *)(iVar1 + 0x20) = 0" (pointer_expression "*(undefined4 *)(iVar1 + 0x20)" * (cast_expression "(undefined4 *)(iVar1 + 0x20)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x20)" ( (binary_expression "iVar1 + 0x20" identifier + number_literal) )))) = number_literal) ;) (if_statement "if ((*(int *)(iVar1 + 0xc) != 0) && (iVar2 != 0)) goto LAB_0008c948;" if (parenthesized_expression "((*(int *)(iVar1 + 0xc) != 0) && (iVar2 != 0))" ( (binary_expression "(*(int *)(iVar1 + 0xc) != 0) && (iVar2 != 0)" (parenthesized_expression "(*(int *)(iVar1 + 0xc) != 0)" ( (binary_expression "*(int *)(iVar1 + 0xc) != 0" (pointer_expression "*(int *)(iVar1 + 0xc)" * (cast_expression "(int *)(iVar1 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0xc)" ( (binary_expression "iVar1 + 0xc" identifier + number_literal) )))) != number_literal) )) && (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) ))) )) (goto_statement "goto LAB_0008c948;" goto statement_identifier ;)) (expression_statement "FUN_0008c5e8(iVar1);" (call_expression "FUN_0008c5e8(iVar1)" identifier (argument_list "(iVar1)" ( identifier ))) ;) }))) (expression_statement "iVar1 = 0;" (assignment_expression "iVar1 = 0" identifier = number_literal) ;) (labeled_statement "LAB_0008c948:\n  if (local_1c != *(int *)PTR___stack_chk_guard_00122654) {\n    (*(code *)PTR___stack_chk_fail_001222ec)();\n    iVar1 = FUN_0008c7ec();\n    if (iVar1 == 0) {\n      iVar2 = -1;\n    }\n    else {\n      iVar2 = bignum_bitcount(*(undefined4 *)(iVar1 + 8));\n      FUN_0008c5e8(iVar1);\n    }\n    return iVar2;\n  }" statement_identifier : (if_statement "if (local_1c != *(int *)PTR___stack_chk_guard_00122654) {\n    (*(code *)PTR___stack_chk_fail_001222ec)();\n    iVar1 = FUN_0008c7ec();\n    if (iVar1 == 0) {\n      iVar2 = -1;\n    }\n    else {\n      iVar2 = bignum_bitcount(*(undefined4 *)(iVar1 + 8));\n      FUN_0008c5e8(iVar1);\n    }\n    return iVar2;\n  }" if (parenthesized_expression "(local_1c != *(int *)PTR___stack_chk_guard_00122654)" ( (binary_expression "local_1c != *(int *)PTR___stack_chk_guard_00122654" identifier != (pointer_expression "*(int *)PTR___stack_chk_guard_00122654" * (cast_expression "(int *)PTR___stack_chk_guard_00122654" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) )) (compound_statement "{\n    (*(code *)PTR___stack_chk_fail_001222ec)();\n    iVar1 = FUN_0008c7ec();\n    if (iVar1 == 0) {\n      iVar2 = -1;\n    }\n    else {\n      iVar2 = bignum_bitcount(*(undefined4 *)(iVar1 + 8));\n      FUN_0008c5e8(iVar1);\n    }\n    return iVar2;\n  }" { (expression_statement "(*(code *)PTR___stack_chk_fail_001222ec)();" (call_expression "(*(code *)PTR___stack_chk_fail_001222ec)()" (parenthesized_expression "(*(code *)PTR___stack_chk_fail_001222ec)" ( (pointer_expression "*(code *)PTR___stack_chk_fail_001222ec" * (cast_expression "(code *)PTR___stack_chk_fail_001222ec" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))) ;) (expression_statement "iVar1 = FUN_0008c7ec();" (assignment_expression "iVar1 = FUN_0008c7ec()" identifier = (call_expression "FUN_0008c7ec()" identifier (argument_list "()" ( )))) ;) (if_statement "if (iVar1 == 0) {\n      iVar2 = -1;\n    }\n    else {\n      iVar2 = bignum_bitcount(*(undefined4 *)(iVar1 + 8));\n      FUN_0008c5e8(iVar1);\n    }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n      iVar2 = -1;\n    }" { (expression_statement "iVar2 = -1;" (assignment_expression "iVar2 = -1" identifier = number_literal) ;) }) (else_clause "else {\n      iVar2 = bignum_bitcount(*(undefined4 *)(iVar1 + 8));\n      FUN_0008c5e8(iVar1);\n    }" else (compound_statement "{\n      iVar2 = bignum_bitcount(*(undefined4 *)(iVar1 + 8));\n      FUN_0008c5e8(iVar1);\n    }" { (expression_statement "iVar2 = bignum_bitcount(*(undefined4 *)(iVar1 + 8));" (assignment_expression "iVar2 = bignum_bitcount(*(undefined4 *)(iVar1 + 8))" identifier = (call_expression "bignum_bitcount(*(undefined4 *)(iVar1 + 8))" identifier (argument_list "(*(undefined4 *)(iVar1 + 8))" ( (pointer_expression "*(undefined4 *)(iVar1 + 8)" * (cast_expression "(undefined4 *)(iVar1 + 8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 8)" ( (binary_expression "iVar1 + 8" identifier + number_literal) )))) )))) ;) (expression_statement "FUN_0008c5e8(iVar1);" (call_expression "FUN_0008c5e8(iVar1)" identifier (argument_list "(iVar1)" ( identifier ))) ;) }))) (return_statement "return iVar2;" return identifier ;) }))) (return_statement "return iVar1;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (array_declarator IDENT [ LIT ]) ;) (declaration TYPE (array_declarator IDENT [ LIT ]) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT))) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( LIT , LIT )))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , (pointer_expression & IDENT) , (pointer_expression & IDENT) ))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT == LIT) )) || (parenthesized_expression ( (binary_expression IDENT != LIT) ))) )) (compound_statement { (labeled_statement statement_identifier : (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT ))) ;)) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT , (binary_expression IDENT + LIT) , LIT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (goto_statement goto statement_identifier ;)) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT )))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT )))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (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) )) && (parenthesized_expression ( (binary_expression IDENT != LIT) ))) )) (goto_statement goto statement_identifier ;)) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) }))) (expression_statement (assignment_expression IDENT = LIT) ;) (labeled_statement statement_identifier : (if_statement if (parenthesized_expression ( (binary_expression IDENT != (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT))) )) (compound_statement { (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( ))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) )))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) }))) (return_statement return IDENT ;) }))) (return_statement return IDENT ;) })))
(function_definition "int FUN_0008c7ec(undefined4 param_1,undefined4 param_2,undefined4 param_3)\n\n{\n  int iVar1;\n  int iVar2;\n  undefined4 uVar3;\n  undefined4 local_res8 [2];\n  undefined4 local_2c [2];\n  int local_24;\n  int local_20;\n  int local_1c;\n  \n  local_1c = *(int *)PTR___stack_chk_guard_00122654;\n  local_res8[0] = param_3;\n  local_2c[0] = param_2;\n  iVar1 = (*(code *)PTR_safemalloc_00121314)(1,0x24);\n  FUN_0008a1b0(local_2c,local_res8,&local_24,&local_20);\n  if ((local_24 == 0) || (local_20 != 7)) {\nLAB_0008c92c:\n    (*(code *)PTR_safefree_00121304)(iVar1);\n  }\n  else {\n    iVar2 = (*(code *)PTR_memcmp_00122454)(local_24,PTR_DAT_00121388 + -0x5f58,7);\n    if (iVar2 != 0) goto LAB_0008c92c;\n    uVar3 = FUN_0008a2ac(local_2c,local_res8);\n    *(undefined4 *)(iVar1 + 0xc) = uVar3;\n    iVar2 = FUN_0008a2ac(local_2c,local_res8);\n    *(int *)(iVar1 + 8) = iVar2;\n    *(undefined4 *)(iVar1 + 0x10) = 0;\n    *(undefined4 *)(iVar1 + 0x1c) = 0;\n    *(undefined4 *)(iVar1 + 0x18) = 0;\n    *(undefined4 *)(iVar1 + 0x14) = 0;\n    *(undefined4 *)(iVar1 + 0x20) = 0;\n    if ((*(int *)(iVar1 + 0xc) != 0) && (iVar2 != 0)) goto LAB_0008c948;\n    FUN_0008c5e8(iVar1);\n  }\n  iVar1 = 0;\nLAB_0008c948:\n  if (local_1c != *(int *)PTR___stack_chk_guard_00122654) {\n    (*(code *)PTR___stack_chk_fail_001222ec)();\n    iVar1 = FUN_0008c7ec();\n    if (iVar1 == 0) {\n      iVar2 = -1;\n    }\n    else {\n      iVar2 = bignum_bitcount(*(undefined4 *)(iVar1 + 8));\n      FUN_0008c5e8(iVar1);\n    }\n    return iVar2;\n  }\n  return iVar1;\n}" (primitive_type "int") (function_declarator "FUN_0008c7ec(undefined4 param_1,undefined4 param_2,undefined4 param_3)" (identifier "FUN_0008c7ec") (parameter_list "(undefined4 param_1,undefined4 param_2,undefined4 param_3)" (( "(") (parameter_declaration "undefined4 param_1" (type_identifier "undefined4") (identifier "param_1")) (, ",") (parameter_declaration "undefined4 param_2" (type_identifier "undefined4") (identifier "param_2")) (, ",") (parameter_declaration "undefined4 param_3" (type_identifier "undefined4") (identifier "param_3")) () ")"))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  undefined4 uVar3;\n  undefined4 local_res8 [2];\n  undefined4 local_2c [2];\n  int local_24;\n  int local_20;\n  int local_1c;\n  \n  local_1c = *(int *)PTR___stack_chk_guard_00122654;\n  local_res8[0] = param_3;\n  local_2c[0] = param_2;\n  iVar1 = (*(code *)PTR_safemalloc_00121314)(1,0x24);\n  FUN_0008a1b0(local_2c,local_res8,&local_24,&local_20);\n  if ((local_24 == 0) || (local_20 != 7)) {\nLAB_0008c92c:\n    (*(code *)PTR_safefree_00121304)(iVar1);\n  }\n  else {\n    iVar2 = (*(code *)PTR_memcmp_00122454)(local_24,PTR_DAT_00121388 + -0x5f58,7);\n    if (iVar2 != 0) goto LAB_0008c92c;\n    uVar3 = FUN_0008a2ac(local_2c,local_res8);\n    *(undefined4 *)(iVar1 + 0xc) = uVar3;\n    iVar2 = FUN_0008a2ac(local_2c,local_res8);\n    *(int *)(iVar1 + 8) = iVar2;\n    *(undefined4 *)(iVar1 + 0x10) = 0;\n    *(undefined4 *)(iVar1 + 0x1c) = 0;\n    *(undefined4 *)(iVar1 + 0x18) = 0;\n    *(undefined4 *)(iVar1 + 0x14) = 0;\n    *(undefined4 *)(iVar1 + 0x20) = 0;\n    if ((*(int *)(iVar1 + 0xc) != 0) && (iVar2 != 0)) goto LAB_0008c948;\n    FUN_0008c5e8(iVar1);\n  }\n  iVar1 = 0;\nLAB_0008c948:\n  if (local_1c != *(int *)PTR___stack_chk_guard_00122654) {\n    (*(code *)PTR___stack_chk_fail_001222ec)();\n    iVar1 = FUN_0008c7ec();\n    if (iVar1 == 0) {\n      iVar2 = -1;\n    }\n    else {\n      iVar2 = bignum_bitcount(*(undefined4 *)(iVar1 + 8));\n      FUN_0008c5e8(iVar1);\n    }\n    return iVar2;\n  }\n  return iVar1;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "undefined4 uVar3;" (type_identifier "undefined4") (identifier "uVar3") (; ";")) (declaration "undefined4 local_res8 [2];" (type_identifier "undefined4") (array_declarator "local_res8 [2]" (identifier "local_res8") ([ "[") (number_literal "2") (] "]")) (; ";")) (declaration "undefined4 local_2c [2];" (type_identifier "undefined4") (array_declarator "local_2c [2]" (identifier "local_2c") ([ "[") (number_literal "2") (] "]")) (; ";")) (declaration "int local_24;" (primitive_type "int") (identifier "local_24") (; ";")) (declaration "int local_20;" (primitive_type "int") (identifier "local_20") (; ";")) (declaration "int local_1c;" (primitive_type "int") (identifier "local_1c") (; ";")) (expression_statement "local_1c = *(int *)PTR___stack_chk_guard_00122654;" (assignment_expression "local_1c = *(int *)PTR___stack_chk_guard_00122654" (identifier "local_1c") (= "=") (pointer_expression "*(int *)PTR___stack_chk_guard_00122654" (* "*") (cast_expression "(int *)PTR___stack_chk_guard_00122654" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR___stack_chk_guard_00122654")))) (; ";")) (expression_statement "local_res8[0] = param_3;" (assignment_expression "local_res8[0] = param_3" (subscript_expression "local_res8[0]" (identifier "local_res8") ([ "[") (number_literal "0") (] "]")) (= "=") (identifier "param_3")) (; ";")) (expression_statement "local_2c[0] = param_2;" (assignment_expression "local_2c[0] = param_2" (subscript_expression "local_2c[0]" (identifier "local_2c") ([ "[") (number_literal "0") (] "]")) (= "=") (identifier "param_2")) (; ";")) (expression_statement "iVar1 = (*(code *)PTR_safemalloc_00121314)(1,0x24);" (assignment_expression "iVar1 = (*(code *)PTR_safemalloc_00121314)(1,0x24)" (identifier "iVar1") (= "=") (call_expression "(*(code *)PTR_safemalloc_00121314)(1,0x24)" (parenthesized_expression "(*(code *)PTR_safemalloc_00121314)" (( "(") (pointer_expression "*(code *)PTR_safemalloc_00121314" (* "*") (cast_expression "(code *)PTR_safemalloc_00121314" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_safemalloc_00121314"))) () ")")) (argument_list "(1,0x24)" (( "(") (number_literal "1") (, ",") (number_literal "0x24") () ")")))) (; ";")) (expression_statement "FUN_0008a1b0(local_2c,local_res8,&local_24,&local_20);" (call_expression "FUN_0008a1b0(local_2c,local_res8,&local_24,&local_20)" (identifier "FUN_0008a1b0") (argument_list "(local_2c,local_res8,&local_24,&local_20)" (( "(") (identifier "local_2c") (, ",") (identifier "local_res8") (, ",") (pointer_expression "&local_24" (& "&") (identifier "local_24")) (, ",") (pointer_expression "&local_20" (& "&") (identifier "local_20")) () ")"))) (; ";")) (if_statement "if ((local_24 == 0) || (local_20 != 7)) {\nLAB_0008c92c:\n    (*(code *)PTR_safefree_00121304)(iVar1);\n  }\n  else {\n    iVar2 = (*(code *)PTR_memcmp_00122454)(local_24,PTR_DAT_00121388 + -0x5f58,7);\n    if (iVar2 != 0) goto LAB_0008c92c;\n    uVar3 = FUN_0008a2ac(local_2c,local_res8);\n    *(undefined4 *)(iVar1 + 0xc) = uVar3;\n    iVar2 = FUN_0008a2ac(local_2c,local_res8);\n    *(int *)(iVar1 + 8) = iVar2;\n    *(undefined4 *)(iVar1 + 0x10) = 0;\n    *(undefined4 *)(iVar1 + 0x1c) = 0;\n    *(undefined4 *)(iVar1 + 0x18) = 0;\n    *(undefined4 *)(iVar1 + 0x14) = 0;\n    *(undefined4 *)(iVar1 + 0x20) = 0;\n    if ((*(int *)(iVar1 + 0xc) != 0) && (iVar2 != 0)) goto LAB_0008c948;\n    FUN_0008c5e8(iVar1);\n  }" (if "if") (parenthesized_expression "((local_24 == 0) || (local_20 != 7))" (( "(") (binary_expression "(local_24 == 0) || (local_20 != 7)" (parenthesized_expression "(local_24 == 0)" (( "(") (binary_expression "local_24 == 0" (identifier "local_24") (== "==") (number_literal "0")) () ")")) (|| "||") (parenthesized_expression "(local_20 != 7)" (( "(") (binary_expression "local_20 != 7" (identifier "local_20") (!= "!=") (number_literal "7")) () ")"))) () ")")) (compound_statement "{\nLAB_0008c92c:\n    (*(code *)PTR_safefree_00121304)(iVar1);\n  }" ({ "{") (labeled_statement "LAB_0008c92c:\n    (*(code *)PTR_safefree_00121304)(iVar1);" (statement_identifier "LAB_0008c92c") (: ":") (expression_statement "(*(code *)PTR_safefree_00121304)(iVar1);" (call_expression "(*(code *)PTR_safefree_00121304)(iVar1)" (parenthesized_expression "(*(code *)PTR_safefree_00121304)" (( "(") (pointer_expression "*(code *)PTR_safefree_00121304" (* "*") (cast_expression "(code *)PTR_safefree_00121304" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_safefree_00121304"))) () ")")) (argument_list "(iVar1)" (( "(") (identifier "iVar1") () ")"))) (; ";"))) (} "}")) (else_clause "else {\n    iVar2 = (*(code *)PTR_memcmp_00122454)(local_24,PTR_DAT_00121388 + -0x5f58,7);\n    if (iVar2 != 0) goto LAB_0008c92c;\n    uVar3 = FUN_0008a2ac(local_2c,local_res8);\n    *(undefined4 *)(iVar1 + 0xc) = uVar3;\n    iVar2 = FUN_0008a2ac(local_2c,local_res8);\n    *(int *)(iVar1 + 8) = iVar2;\n    *(undefined4 *)(iVar1 + 0x10) = 0;\n    *(undefined4 *)(iVar1 + 0x1c) = 0;\n    *(undefined4 *)(iVar1 + 0x18) = 0;\n    *(undefined4 *)(iVar1 + 0x14) = 0;\n    *(undefined4 *)(iVar1 + 0x20) = 0;\n    if ((*(int *)(iVar1 + 0xc) != 0) && (iVar2 != 0)) goto LAB_0008c948;\n    FUN_0008c5e8(iVar1);\n  }" (else "else") (compound_statement "{\n    iVar2 = (*(code *)PTR_memcmp_00122454)(local_24,PTR_DAT_00121388 + -0x5f58,7);\n    if (iVar2 != 0) goto LAB_0008c92c;\n    uVar3 = FUN_0008a2ac(local_2c,local_res8);\n    *(undefined4 *)(iVar1 + 0xc) = uVar3;\n    iVar2 = FUN_0008a2ac(local_2c,local_res8);\n    *(int *)(iVar1 + 8) = iVar2;\n    *(undefined4 *)(iVar1 + 0x10) = 0;\n    *(undefined4 *)(iVar1 + 0x1c) = 0;\n    *(undefined4 *)(iVar1 + 0x18) = 0;\n    *(undefined4 *)(iVar1 + 0x14) = 0;\n    *(undefined4 *)(iVar1 + 0x20) = 0;\n    if ((*(int *)(iVar1 + 0xc) != 0) && (iVar2 != 0)) goto LAB_0008c948;\n    FUN_0008c5e8(iVar1);\n  }" ({ "{") (expression_statement "iVar2 = (*(code *)PTR_memcmp_00122454)(local_24,PTR_DAT_00121388 + -0x5f58,7);" (assignment_expression "iVar2 = (*(code *)PTR_memcmp_00122454)(local_24,PTR_DAT_00121388 + -0x5f58,7)" (identifier "iVar2") (= "=") (call_expression "(*(code *)PTR_memcmp_00122454)(local_24,PTR_DAT_00121388 + -0x5f58,7)" (parenthesized_expression "(*(code *)PTR_memcmp_00122454)" (( "(") (pointer_expression "*(code *)PTR_memcmp_00122454" (* "*") (cast_expression "(code *)PTR_memcmp_00122454" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_memcmp_00122454"))) () ")")) (argument_list "(local_24,PTR_DAT_00121388 + -0x5f58,7)" (( "(") (identifier "local_24") (, ",") (binary_expression "PTR_DAT_00121388 + -0x5f58" (identifier "PTR_DAT_00121388") (+ "+") (number_literal "-0x5f58")) (, ",") (number_literal "7") () ")")))) (; ";")) (if_statement "if (iVar2 != 0) goto LAB_0008c92c;" (if "if") (parenthesized_expression "(iVar2 != 0)" (( "(") (binary_expression "iVar2 != 0" (identifier "iVar2") (!= "!=") (number_literal "0")) () ")")) (goto_statement "goto LAB_0008c92c;" (goto "goto") (statement_identifier "LAB_0008c92c") (; ";"))) (expression_statement "uVar3 = FUN_0008a2ac(local_2c,local_res8);" (assignment_expression "uVar3 = FUN_0008a2ac(local_2c,local_res8)" (identifier "uVar3") (= "=") (call_expression "FUN_0008a2ac(local_2c,local_res8)" (identifier "FUN_0008a2ac") (argument_list "(local_2c,local_res8)" (( "(") (identifier "local_2c") (, ",") (identifier "local_res8") () ")")))) (; ";")) (expression_statement "*(undefined4 *)(iVar1 + 0xc) = uVar3;" (assignment_expression "*(undefined4 *)(iVar1 + 0xc) = uVar3" (pointer_expression "*(undefined4 *)(iVar1 + 0xc)" (* "*") (cast_expression "(undefined4 *)(iVar1 + 0xc)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0xc)" (( "(") (binary_expression "iVar1 + 0xc" (identifier "iVar1") (+ "+") (number_literal "0xc")) () ")")))) (= "=") (identifier "uVar3")) (; ";")) (expression_statement "iVar2 = FUN_0008a2ac(local_2c,local_res8);" (assignment_expression "iVar2 = FUN_0008a2ac(local_2c,local_res8)" (identifier "iVar2") (= "=") (call_expression "FUN_0008a2ac(local_2c,local_res8)" (identifier "FUN_0008a2ac") (argument_list "(local_2c,local_res8)" (( "(") (identifier "local_2c") (, ",") (identifier "local_res8") () ")")))) (; ";")) (expression_statement "*(int *)(iVar1 + 8) = iVar2;" (assignment_expression "*(int *)(iVar1 + 8) = iVar2" (pointer_expression "*(int *)(iVar1 + 8)" (* "*") (cast_expression "(int *)(iVar1 + 8)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 8)" (( "(") (binary_expression "iVar1 + 8" (identifier "iVar1") (+ "+") (number_literal "8")) () ")")))) (= "=") (identifier "iVar2")) (; ";")) (expression_statement "*(undefined4 *)(iVar1 + 0x10) = 0;" (assignment_expression "*(undefined4 *)(iVar1 + 0x10) = 0" (pointer_expression "*(undefined4 *)(iVar1 + 0x10)" (* "*") (cast_expression "(undefined4 *)(iVar1 + 0x10)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0x10)" (( "(") (binary_expression "iVar1 + 0x10" (identifier "iVar1") (+ "+") (number_literal "0x10")) () ")")))) (= "=") (number_literal "0")) (; ";")) (expression_statement "*(undefined4 *)(iVar1 + 0x1c) = 0;" (assignment_expression "*(undefined4 *)(iVar1 + 0x1c) = 0" (pointer_expression "*(undefined4 *)(iVar1 + 0x1c)" (* "*") (cast_expression "(undefined4 *)(iVar1 + 0x1c)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0x1c)" (( "(") (binary_expression "iVar1 + 0x1c" (identifier "iVar1") (+ "+") (number_literal "0x1c")) () ")")))) (= "=") (number_literal "0")) (; ";")) (expression_statement "*(undefined4 *)(iVar1 + 0x18) = 0;" (assignment_expression "*(undefined4 *)(iVar1 + 0x18) = 0" (pointer_expression "*(undefined4 *)(iVar1 + 0x18)" (* "*") (cast_expression "(undefined4 *)(iVar1 + 0x18)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0x18)" (( "(") (binary_expression "iVar1 + 0x18" (identifier "iVar1") (+ "+") (number_literal "0x18")) () ")")))) (= "=") (number_literal "0")) (; ";")) (expression_statement "*(undefined4 *)(iVar1 + 0x14) = 0;" (assignment_expression "*(undefined4 *)(iVar1 + 0x14) = 0" (pointer_expression "*(undefined4 *)(iVar1 + 0x14)" (* "*") (cast_expression "(undefined4 *)(iVar1 + 0x14)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0x14)" (( "(") (binary_expression "iVar1 + 0x14" (identifier "iVar1") (+ "+") (number_literal "0x14")) () ")")))) (= "=") (number_literal "0")) (; ";")) (expression_statement "*(undefined4 *)(iVar1 + 0x20) = 0;" (assignment_expression "*(undefined4 *)(iVar1 + 0x20) = 0" (pointer_expression "*(undefined4 *)(iVar1 + 0x20)" (* "*") (cast_expression "(undefined4 *)(iVar1 + 0x20)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0x20)" (( "(") (binary_expression "iVar1 + 0x20" (identifier "iVar1") (+ "+") (number_literal "0x20")) () ")")))) (= "=") (number_literal "0")) (; ";")) (if_statement "if ((*(int *)(iVar1 + 0xc) != 0) && (iVar2 != 0)) goto LAB_0008c948;" (if "if") (parenthesized_expression "((*(int *)(iVar1 + 0xc) != 0) && (iVar2 != 0))" (( "(") (binary_expression "(*(int *)(iVar1 + 0xc) != 0) && (iVar2 != 0)" (parenthesized_expression "(*(int *)(iVar1 + 0xc) != 0)" (( "(") (binary_expression "*(int *)(iVar1 + 0xc) != 0" (pointer_expression "*(int *)(iVar1 + 0xc)" (* "*") (cast_expression "(int *)(iVar1 + 0xc)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0xc)" (( "(") (binary_expression "iVar1 + 0xc" (identifier "iVar1") (+ "+") (number_literal "0xc")) () ")")))) (!= "!=") (number_literal "0")) () ")")) (&& "&&") (parenthesized_expression "(iVar2 != 0)" (( "(") (binary_expression "iVar2 != 0" (identifier "iVar2") (!= "!=") (number_literal "0")) () ")"))) () ")")) (goto_statement "goto LAB_0008c948;" (goto "goto") (statement_identifier "LAB_0008c948") (; ";"))) (expression_statement "FUN_0008c5e8(iVar1);" (call_expression "FUN_0008c5e8(iVar1)" (identifier "FUN_0008c5e8") (argument_list "(iVar1)" (( "(") (identifier "iVar1") () ")"))) (; ";")) (} "}")))) (expression_statement "iVar1 = 0;" (assignment_expression "iVar1 = 0" (identifier "iVar1") (= "=") (number_literal "0")) (; ";")) (labeled_statement "LAB_0008c948:\n  if (local_1c != *(int *)PTR___stack_chk_guard_00122654) {\n    (*(code *)PTR___stack_chk_fail_001222ec)();\n    iVar1 = FUN_0008c7ec();\n    if (iVar1 == 0) {\n      iVar2 = -1;\n    }\n    else {\n      iVar2 = bignum_bitcount(*(undefined4 *)(iVar1 + 8));\n      FUN_0008c5e8(iVar1);\n    }\n    return iVar2;\n  }" (statement_identifier "LAB_0008c948") (: ":") (if_statement "if (local_1c != *(int *)PTR___stack_chk_guard_00122654) {\n    (*(code *)PTR___stack_chk_fail_001222ec)();\n    iVar1 = FUN_0008c7ec();\n    if (iVar1 == 0) {\n      iVar2 = -1;\n    }\n    else {\n      iVar2 = bignum_bitcount(*(undefined4 *)(iVar1 + 8));\n      FUN_0008c5e8(iVar1);\n    }\n    return iVar2;\n  }" (if "if") (parenthesized_expression "(local_1c != *(int *)PTR___stack_chk_guard_00122654)" (( "(") (binary_expression "local_1c != *(int *)PTR___stack_chk_guard_00122654" (identifier "local_1c") (!= "!=") (pointer_expression "*(int *)PTR___stack_chk_guard_00122654" (* "*") (cast_expression "(int *)PTR___stack_chk_guard_00122654" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR___stack_chk_guard_00122654")))) () ")")) (compound_statement "{\n    (*(code *)PTR___stack_chk_fail_001222ec)();\n    iVar1 = FUN_0008c7ec();\n    if (iVar1 == 0) {\n      iVar2 = -1;\n    }\n    else {\n      iVar2 = bignum_bitcount(*(undefined4 *)(iVar1 + 8));\n      FUN_0008c5e8(iVar1);\n    }\n    return iVar2;\n  }" ({ "{") (expression_statement "(*(code *)PTR___stack_chk_fail_001222ec)();" (call_expression "(*(code *)PTR___stack_chk_fail_001222ec)()" (parenthesized_expression "(*(code *)PTR___stack_chk_fail_001222ec)" (( "(") (pointer_expression "*(code *)PTR___stack_chk_fail_001222ec" (* "*") (cast_expression "(code *)PTR___stack_chk_fail_001222ec" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR___stack_chk_fail_001222ec"))) () ")")) (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "iVar1 = FUN_0008c7ec();" (assignment_expression "iVar1 = FUN_0008c7ec()" (identifier "iVar1") (= "=") (call_expression "FUN_0008c7ec()" (identifier "FUN_0008c7ec") (argument_list "()" (( "(") () ")")))) (; ";")) (if_statement "if (iVar1 == 0) {\n      iVar2 = -1;\n    }\n    else {\n      iVar2 = bignum_bitcount(*(undefined4 *)(iVar1 + 8));\n      FUN_0008c5e8(iVar1);\n    }" (if "if") (parenthesized_expression "(iVar1 == 0)" (( "(") (binary_expression "iVar1 == 0" (identifier "iVar1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      iVar2 = -1;\n    }" ({ "{") (expression_statement "iVar2 = -1;" (assignment_expression "iVar2 = -1" (identifier "iVar2") (= "=") (number_literal "-1")) (; ";")) (} "}")) (else_clause "else {\n      iVar2 = bignum_bitcount(*(undefined4 *)(iVar1 + 8));\n      FUN_0008c5e8(iVar1);\n    }" (else "else") (compound_statement "{\n      iVar2 = bignum_bitcount(*(undefined4 *)(iVar1 + 8));\n      FUN_0008c5e8(iVar1);\n    }" ({ "{") (expression_statement "iVar2 = bignum_bitcount(*(undefined4 *)(iVar1 + 8));" (assignment_expression "iVar2 = bignum_bitcount(*(undefined4 *)(iVar1 + 8))" (identifier "iVar2") (= "=") (call_expression "bignum_bitcount(*(undefined4 *)(iVar1 + 8))" (identifier "bignum_bitcount") (argument_list "(*(undefined4 *)(iVar1 + 8))" (( "(") (pointer_expression "*(undefined4 *)(iVar1 + 8)" (* "*") (cast_expression "(undefined4 *)(iVar1 + 8)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 8)" (( "(") (binary_expression "iVar1 + 8" (identifier "iVar1") (+ "+") (number_literal "8")) () ")")))) () ")")))) (; ";")) (expression_statement "FUN_0008c5e8(iVar1);" (call_expression "FUN_0008c5e8(iVar1)" (identifier "FUN_0008c5e8") (argument_list "(iVar1)" (( "(") (identifier "iVar1") () ")"))) (; ";")) (} "}")))) (return_statement "return iVar2;" (return "return") (identifier "iVar2") (; ";")) (} "}")))) (return_statement "return iVar1;" (return "return") (identifier "iVar1") (; ";")) (} "}")))

void * function_1(type_1 *self,char *data,int len)

{
  void *var_10;
  int var_5;
  type_2 var_7;
  void *pvVar4;
  type_1 *self_00;
  int *datalen;
  int *datalen_00;
  char **p_00;
  int local_res8 [2];
  char *local_2c [2];
  char *var_2;
  int var_3;
  type_1 *var_9;
  
  var_9 = *(type_1 **)PTR___stack_chk_guard_00122654;
  local_res8[0] = len;
  local_2c[0] = data;
  var_10 = (void *)(*(type_3 *)PTR_safemalloc_00121314)(1,0x24);
  p_00 = &var_2;
  datalen = local_res8;
  var_1(local_2c,datalen,p_00,&var_3);
  if ((var_2 == (char *)0x0) || (p_00 = (char **)0x7, var_3 != 7)) {
LAB_0008c92c:
    datalen_00 = datalen;
    (*(type_3 *)PTR_safefree_00121304)(var_10);
  }
  else {
    datalen = (int *)(var_4 + -0x5f58);
    var_5 = (*(type_3 *)PTR_memcmp_00122454)();
    datalen_00 = local_res8;
    if (var_5 != 0) goto LAB_0008c92c;
    var_7 = var_6(local_2c,datalen_00);
    *(type_2 *)((int)var_10 + 0xc) = var_7;
    var_7 = var_6(local_2c,datalen_00);
    *(type_2 *)((int)var_10 + 8) = var_7;
    *(type_4 *)((int)var_10 + 0x10) = 0;
    *(type_4 *)((int)var_10 + 0x1c) = 0;
    *(type_4 *)((int)var_10 + 0x18) = 0;
    *(type_4 *)((int)var_10 + 0x14) = 0;
    *(type_4 *)((int)var_10 + 0x20) = 0;
    if ((*(int *)((int)var_10 + 0xc) != 0) && (var_7 != (type_2)0x0)) goto LAB_0008c948;
    var_8(var_10);
  }
  var_10 = (void *)0x0;
LAB_0008c948:
  if (var_9 != *(type_1 **)PTR___stack_chk_guard_00122654) {
    self_00 = var_9;
    (*(type_3 *)PTR___stack_chk_fail_001222ec)();
    var_10 = function_1(self_00,(char *)datalen_00,(int)p_00);
    if (var_10 == (void *)0x0) {
      pvVar4 = (void *)0xffffffff;
    }
    else {
      pvVar4 = (void *)var_11(*(type_5 *)((int)var_10 + 8));
      var_8(var_10);
    }
    return pvVar4;
  }
  return var_10;
}


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

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

{
  int iVar1;
  int iVar2;
  undefined4 uVar3;
  undefined4 local_res8 [2];
  undefined4 local_2c [2];
  int local_24;
  int local_20;
  int local_1c;
  
  local_1c = *(int *)PTR___stack_chk_guard_00122654;
  local_res8[0] = param_3;
  local_2c[0] = param_2;
  iVar1 = (*(code *)PTR_safemalloc_00121314)(1,0x24);
  FUN_0008a1b0(local_2c,local_res8,&local_24,&local_20);
  if ((local_24 == 0) || (local_20 != 7)) {
LAB_0008c92c:
    (*(code *)PTR_safefree_00121304)(iVar1);
  }
  else {
    iVar2 = (*(code *)PTR_memcmp_00122454)(local_24,PTR_DAT_00121388 + -0x5f58,7);
    if (iVar2 != 0) goto LAB_0008c92c;
    uVar3 = FUN_0008a2ac(local_2c,local_res8);
    *(undefined4 *)(iVar1 + 0xc) = uVar3;
    iVar2 = FUN_0008a2ac(local_2c,local_res8);
    *(int *)(iVar1 + 8) = iVar2;
    *(undefined4 *)(iVar1 + 0x10) = 0;
    *(undefined4 *)(iVar1 + 0x1c) = 0;
    *(undefined4 *)(iVar1 + 0x18) = 0;
    *(undefined4 *)(iVar1 + 0x14) = 0;
    *(undefined4 *)(iVar1 + 0x20) = 0;
    if ((*(int *)(iVar1 + 0xc) != 0) && (iVar2 != 0)) goto LAB_0008c948;
    FUN_0008c5e8(iVar1);
  }
  iVar1 = 0;
LAB_0008c948:
  if (local_1c != *(int *)PTR___stack_chk_guard_00122654) {
    (*(code *)PTR___stack_chk_fail_001222ec)();
    iVar1 = MASKED();
    if (iVar1 == 0) {
      iVar2 = -1;
    }
    else {
      iVar2 = bignum_bitcount(*(undefined4 *)(iVar1 + 8));
      FUN_0008c5e8(iVar1);
    }
    return iVar2;
  }
  return iVar1;
}

