
int agent_try_read(agent_pending_query *conn)

{
  int iVar1;
  uint uVar2;
  byte *pbVar3;
  char *pcVar4;
  
  iVar1 = (*(code *)PTR_read_000b8d18)
                    (conn->fd,conn->retbuf + conn->retlen,conn->retsize - conn->retlen);
  if (iVar1 < 1) {
    if (conn->retbuf != conn->sizebuf) {
      (*(code *)PTR_safefree_000b82e8)();
    }
    conn->retbuf = (char *)0x0;
    conn->retlen = 0;
    uVar2 = 1;
  }
  else {
    iVar1 = iVar1 + conn->retlen;
    conn->retlen = iVar1;
    if ((conn->retsize == 4) && (iVar1 == 4)) {
      pbVar3 = (byte *)conn->retbuf;
      iVar1 = (*(code *)PTR_toint_000b83b8)
                        (((uint)*pbVar3 << 0x18 | (uint)pbVar3[1] << 0x10 | (uint)pbVar3[3] |
                         (uint)pbVar3[2] << 8) + 4);
      conn->retsize = iVar1;
      if (iVar1 < 1) {
        conn->retbuf = (char *)0x0;
        conn->retlen = 0;
        return -1;
      }
      if (conn->retbuf != conn->sizebuf) {
        iVar1 = (*(code *)PTR___assert_fail_000b8b18)
                          (PTR_PC2_1357_27__000b8348 + 0x3850,PTR_PC2_1357_27__000b8348 + 0x3840,
                           0x52,PTR_PC2_1357_27__000b8348 + 0x38b0);
        return iVar1;
      }
      pcVar4 = (char *)(*(code *)PTR_safemalloc_000b82f8)(iVar1,1);
      conn->retbuf = pcVar4;
      *(undefined4 *)pcVar4 = *(undefined4 *)conn->sizebuf;
    }
    uVar2 = conn->retlen < conn->retsize ^ 1;
  }
  return uVar2;
}



uint FUN_00081548(undefined4 *param_1)

{
  int iVar1;
  uint uVar2;
  byte *pbVar3;
  undefined4 *puVar4;
  int iVar5;
  
  iVar1 = (*(code *)PTR_read_000b8d18)(*param_1,param_1[1] + param_1[4],param_1[3] - param_1[4]);
  if (iVar1 < 1) {
    if ((undefined4 *)param_1[1] != param_1 + 2) {
      (*(code *)PTR_safefree_000b82e8)();
    }
    param_1[1] = 0;
    param_1[4] = 0;
    uVar2 = 1;
  }
  else {
    iVar5 = param_1[4];
    param_1[4] = iVar1 + iVar5;
    if ((param_1[3] == 4) && (iVar1 + iVar5 == 4)) {
      pbVar3 = (byte *)param_1[1];
      iVar1 = (*(code *)PTR_toint_000b83b8)
                        (((uint)*pbVar3 << 0x18 | (uint)pbVar3[1] << 0x10 | (uint)pbVar3[3] |
                         (uint)pbVar3[2] << 8) + 4);
      param_1[3] = iVar1;
      if (iVar1 < 1) {
        param_1[1] = 0;
        param_1[4] = 0;
        return 0xffffffff;
      }
      if ((undefined4 *)param_1[1] != param_1 + 2) {
        uVar2 = (*(code *)PTR___assert_fail_000b8b18)
                          (PTR_DAT_000b8348 + 0x3850,PTR_DAT_000b8348 + 0x3840,0x52,
                           PTR_DAT_000b8348 + 0x38b0);
        return uVar2;
      }
      puVar4 = (undefined4 *)(*(code *)PTR_safemalloc_000b82f8)(iVar1,1);
      param_1[1] = puVar4;
      *puVar4 = param_1[2];
    }
    uVar2 = (int)param_1[4] < (int)param_1[3] ^ 1;
  }
  return uVar2;
}


lui gp,0x4
addiu gp,gp,-0x12b8
addu gp,gp,t9
addiu sp,sp,-0x28
sw ra,0x24(sp)
sw s1,0x20(sp)
sw s0,0x1c(sp)
sw gp,0x10(sp)
or s0,a0,zero
lw v0,0x10(a0)
lw a2,0xc(a0)
lw a1,0x4(a0)
subu a2,a2,v0
addu a1,a1,v0
lw a0,0x0(a0)
lw t9,-0x7578(gp)
jalr t9
_nop
lw gp,0x10(sp)
blez v0,0x000815dc
_nop
lw v1,0x10(s0)
addu v0,v0,v1
sw v0,0x10(s0)
lw a0,0xc(s0)
li v1,0x4
beq a0,v1,0x00081608
_nop
lw v0,0x10(s0)
lw v1,0xc(s0)
slt v0,v0,v1
xori v0,v0,0x1
lw ra,0x24(sp)
lw s1,0x20(sp)
lw s0,0x1c(sp)
jr ra
_addiu sp,sp,0x28
lw a0,0x4(s0)
addiu v0,s0,0x8
beq a0,v0,0x000815f8
_lw t9,-0x7fa8(gp)
jalr t9
_nop
lw gp,0x10(sp)
sw zero,0x4(s0)
sw zero,0x10(s0)
b 0x000815c8
_li v0,0x1
bne v0,v1,0x000815b8
_lw t9,-0x7ed8(gp)
lw v0,0x4(s0)
lbu a0,0x0(v0)
sll a0,a0,0x18
lbu v1,0x1(v0)
sll v1,v1,0x10
or a0,a0,v1
lbu v1,0x3(v0)
or a0,a0,v1
lbu v0,0x2(v0)
sll v0,v0,0x8
or a0,a0,v0
addiu a0,a0,0x4
jalr t9
_nop
lw gp,0x10(sp)
blez v0,0x00081690
_sw v0,0xc(s0)
addiu s1,s0,0x8
lw v1,0x4(s0)
bne v1,s1,0x000816a0
_li a1,0x1
or a0,v0,zero
lw t9,-0x7f98(gp)
jalr t9
_nop
lw gp,0x10(sp)
sw v0,0x4(s0)
lwl v1,0x0(s1)
lwr v1,0x3(s1)
swl v1,0x0(v0)
b 0x000815b8
_swr v1,0x3(v0)
sw zero,0x4(s0)
sw zero,0x10(s0)
b 0x000815c8
_li v0,-0x1
lw a3,-0x7f48(gp)
addiu a3,a3,0x38b0
li a2,0x52
lw a1,-0x7f48(gp)
addiu a1,a1,0x3840
lw a0,-0x7f48(gp)
addiu a0,a0,0x3850
lw t9,-0x7778(gp)
jalr t9
_nop
(translation_unit "uint FUN_00081548(undefined4 *param_1)\n\n{\n  int iVar1;\n  uint uVar2;\n  byte *pbVar3;\n  undefined4 *puVar4;\n  int iVar5;\n  \n  iVar1 = (*(code *)PTR_read_000b8d18)(*param_1,param_1[1] + param_1[4],param_1[3] - param_1[4]);\n  if (iVar1 < 1) {\n    if ((undefined4 *)param_1[1] != param_1 + 2) {\n      (*(code *)PTR_safefree_000b82e8)();\n    }\n    param_1[1] = 0;\n    param_1[4] = 0;\n    uVar2 = 1;\n  }\n  else {\n    iVar5 = param_1[4];\n    param_1[4] = iVar1 + iVar5;\n    if ((param_1[3] == 4) && (iVar1 + iVar5 == 4)) {\n      pbVar3 = (byte *)param_1[1];\n      iVar1 = (*(code *)PTR_toint_000b83b8)\n                        (((uint)*pbVar3 << 0x18 | (uint)pbVar3[1] << 0x10 | (uint)pbVar3[3] |\n                         (uint)pbVar3[2] << 8) + 4);\n      param_1[3] = iVar1;\n      if (iVar1 < 1) {\n        param_1[1] = 0;\n        param_1[4] = 0;\n        return 0xffffffff;\n      }\n      if ((undefined4 *)param_1[1] != param_1 + 2) {\n        uVar2 = (*(code *)PTR___assert_fail_000b8b18)\n                          (PTR_DAT_000b8348 + 0x3850,PTR_DAT_000b8348 + 0x3840,0x52,\n                           PTR_DAT_000b8348 + 0x38b0);\n        return uVar2;\n      }\n      puVar4 = (undefined4 *)(*(code *)PTR_safemalloc_000b82f8)(iVar1,1);\n      param_1[1] = puVar4;\n      *puVar4 = param_1[2];\n    }\n    uVar2 = (int)param_1[4] < (int)param_1[3] ^ 1;\n  }\n  return uVar2;\n}\n\n" (function_definition "uint FUN_00081548(undefined4 *param_1)\n\n{\n  int iVar1;\n  uint uVar2;\n  byte *pbVar3;\n  undefined4 *puVar4;\n  int iVar5;\n  \n  iVar1 = (*(code *)PTR_read_000b8d18)(*param_1,param_1[1] + param_1[4],param_1[3] - param_1[4]);\n  if (iVar1 < 1) {\n    if ((undefined4 *)param_1[1] != param_1 + 2) {\n      (*(code *)PTR_safefree_000b82e8)();\n    }\n    param_1[1] = 0;\n    param_1[4] = 0;\n    uVar2 = 1;\n  }\n  else {\n    iVar5 = param_1[4];\n    param_1[4] = iVar1 + iVar5;\n    if ((param_1[3] == 4) && (iVar1 + iVar5 == 4)) {\n      pbVar3 = (byte *)param_1[1];\n      iVar1 = (*(code *)PTR_toint_000b83b8)\n                        (((uint)*pbVar3 << 0x18 | (uint)pbVar3[1] << 0x10 | (uint)pbVar3[3] |\n                         (uint)pbVar3[2] << 8) + 4);\n      param_1[3] = iVar1;\n      if (iVar1 < 1) {\n        param_1[1] = 0;\n        param_1[4] = 0;\n        return 0xffffffff;\n      }\n      if ((undefined4 *)param_1[1] != param_1 + 2) {\n        uVar2 = (*(code *)PTR___assert_fail_000b8b18)\n                          (PTR_DAT_000b8348 + 0x3850,PTR_DAT_000b8348 + 0x3840,0x52,\n                           PTR_DAT_000b8348 + 0x38b0);\n        return uVar2;\n      }\n      puVar4 = (undefined4 *)(*(code *)PTR_safemalloc_000b82f8)(iVar1,1);\n      param_1[1] = puVar4;\n      *puVar4 = param_1[2];\n    }\n    uVar2 = (int)param_1[4] < (int)param_1[3] ^ 1;\n  }\n  return uVar2;\n}" type_identifier (function_declarator "FUN_00081548(undefined4 *param_1)" identifier (parameter_list "(undefined4 *param_1)" ( (parameter_declaration "undefined4 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  uint uVar2;\n  byte *pbVar3;\n  undefined4 *puVar4;\n  int iVar5;\n  \n  iVar1 = (*(code *)PTR_read_000b8d18)(*param_1,param_1[1] + param_1[4],param_1[3] - param_1[4]);\n  if (iVar1 < 1) {\n    if ((undefined4 *)param_1[1] != param_1 + 2) {\n      (*(code *)PTR_safefree_000b82e8)();\n    }\n    param_1[1] = 0;\n    param_1[4] = 0;\n    uVar2 = 1;\n  }\n  else {\n    iVar5 = param_1[4];\n    param_1[4] = iVar1 + iVar5;\n    if ((param_1[3] == 4) && (iVar1 + iVar5 == 4)) {\n      pbVar3 = (byte *)param_1[1];\n      iVar1 = (*(code *)PTR_toint_000b83b8)\n                        (((uint)*pbVar3 << 0x18 | (uint)pbVar3[1] << 0x10 | (uint)pbVar3[3] |\n                         (uint)pbVar3[2] << 8) + 4);\n      param_1[3] = iVar1;\n      if (iVar1 < 1) {\n        param_1[1] = 0;\n        param_1[4] = 0;\n        return 0xffffffff;\n      }\n      if ((undefined4 *)param_1[1] != param_1 + 2) {\n        uVar2 = (*(code *)PTR___assert_fail_000b8b18)\n                          (PTR_DAT_000b8348 + 0x3850,PTR_DAT_000b8348 + 0x3840,0x52,\n                           PTR_DAT_000b8348 + 0x38b0);\n        return uVar2;\n      }\n      puVar4 = (undefined4 *)(*(code *)PTR_safemalloc_000b82f8)(iVar1,1);\n      param_1[1] = puVar4;\n      *puVar4 = param_1[2];\n    }\n    uVar2 = (int)param_1[4] < (int)param_1[3] ^ 1;\n  }\n  return uVar2;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "byte *pbVar3;" type_identifier (pointer_declarator "*pbVar3" * identifier) ;) (declaration "undefined4 *puVar4;" type_identifier (pointer_declarator "*puVar4" * identifier) ;) (declaration "int iVar5;" primitive_type identifier ;) (expression_statement "iVar1 = (*(code *)PTR_read_000b8d18)(*param_1,param_1[1] + param_1[4],param_1[3] - param_1[4]);" (assignment_expression "iVar1 = (*(code *)PTR_read_000b8d18)(*param_1,param_1[1] + param_1[4],param_1[3] - param_1[4])" identifier = (call_expression "(*(code *)PTR_read_000b8d18)(*param_1,param_1[1] + param_1[4],param_1[3] - param_1[4])" (parenthesized_expression "(*(code *)PTR_read_000b8d18)" ( (pointer_expression "*(code *)PTR_read_000b8d18" * (cast_expression "(code *)PTR_read_000b8d18" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(*param_1,param_1[1] + param_1[4],param_1[3] - param_1[4])" ( (pointer_expression "*param_1" * identifier) , (binary_expression "param_1[1] + param_1[4]" (subscript_expression "param_1[1]" identifier [ number_literal ]) + (subscript_expression "param_1[4]" identifier [ number_literal ])) , (binary_expression "param_1[3] - param_1[4]" (subscript_expression "param_1[3]" identifier [ number_literal ]) - (subscript_expression "param_1[4]" identifier [ number_literal ])) )))) ;) (if_statement "if (iVar1 < 1) {\n    if ((undefined4 *)param_1[1] != param_1 + 2) {\n      (*(code *)PTR_safefree_000b82e8)();\n    }\n    param_1[1] = 0;\n    param_1[4] = 0;\n    uVar2 = 1;\n  }\n  else {\n    iVar5 = param_1[4];\n    param_1[4] = iVar1 + iVar5;\n    if ((param_1[3] == 4) && (iVar1 + iVar5 == 4)) {\n      pbVar3 = (byte *)param_1[1];\n      iVar1 = (*(code *)PTR_toint_000b83b8)\n                        (((uint)*pbVar3 << 0x18 | (uint)pbVar3[1] << 0x10 | (uint)pbVar3[3] |\n                         (uint)pbVar3[2] << 8) + 4);\n      param_1[3] = iVar1;\n      if (iVar1 < 1) {\n        param_1[1] = 0;\n        param_1[4] = 0;\n        return 0xffffffff;\n      }\n      if ((undefined4 *)param_1[1] != param_1 + 2) {\n        uVar2 = (*(code *)PTR___assert_fail_000b8b18)\n                          (PTR_DAT_000b8348 + 0x3850,PTR_DAT_000b8348 + 0x3840,0x52,\n                           PTR_DAT_000b8348 + 0x38b0);\n        return uVar2;\n      }\n      puVar4 = (undefined4 *)(*(code *)PTR_safemalloc_000b82f8)(iVar1,1);\n      param_1[1] = puVar4;\n      *puVar4 = param_1[2];\n    }\n    uVar2 = (int)param_1[4] < (int)param_1[3] ^ 1;\n  }" if (parenthesized_expression "(iVar1 < 1)" ( (binary_expression "iVar1 < 1" identifier < number_literal) )) (compound_statement "{\n    if ((undefined4 *)param_1[1] != param_1 + 2) {\n      (*(code *)PTR_safefree_000b82e8)();\n    }\n    param_1[1] = 0;\n    param_1[4] = 0;\n    uVar2 = 1;\n  }" { (if_statement "if ((undefined4 *)param_1[1] != param_1 + 2) {\n      (*(code *)PTR_safefree_000b82e8)();\n    }" if (parenthesized_expression "((undefined4 *)param_1[1] != param_1 + 2)" ( (binary_expression "(undefined4 *)param_1[1] != param_1 + 2" (cast_expression "(undefined4 *)param_1[1]" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "param_1[1]" identifier [ number_literal ])) != (binary_expression "param_1 + 2" identifier + number_literal)) )) (compound_statement "{\n      (*(code *)PTR_safefree_000b82e8)();\n    }" { (expression_statement "(*(code *)PTR_safefree_000b82e8)();" (call_expression "(*(code *)PTR_safefree_000b82e8)()" (parenthesized_expression "(*(code *)PTR_safefree_000b82e8)" ( (pointer_expression "*(code *)PTR_safefree_000b82e8" * (cast_expression "(code *)PTR_safefree_000b82e8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))) ;) })) (expression_statement "param_1[1] = 0;" (assignment_expression "param_1[1] = 0" (subscript_expression "param_1[1]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "param_1[4] = 0;" (assignment_expression "param_1[4] = 0" (subscript_expression "param_1[4]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "uVar2 = 1;" (assignment_expression "uVar2 = 1" identifier = number_literal) ;) }) (else_clause "else {\n    iVar5 = param_1[4];\n    param_1[4] = iVar1 + iVar5;\n    if ((param_1[3] == 4) && (iVar1 + iVar5 == 4)) {\n      pbVar3 = (byte *)param_1[1];\n      iVar1 = (*(code *)PTR_toint_000b83b8)\n                        (((uint)*pbVar3 << 0x18 | (uint)pbVar3[1] << 0x10 | (uint)pbVar3[3] |\n                         (uint)pbVar3[2] << 8) + 4);\n      param_1[3] = iVar1;\n      if (iVar1 < 1) {\n        param_1[1] = 0;\n        param_1[4] = 0;\n        return 0xffffffff;\n      }\n      if ((undefined4 *)param_1[1] != param_1 + 2) {\n        uVar2 = (*(code *)PTR___assert_fail_000b8b18)\n                          (PTR_DAT_000b8348 + 0x3850,PTR_DAT_000b8348 + 0x3840,0x52,\n                           PTR_DAT_000b8348 + 0x38b0);\n        return uVar2;\n      }\n      puVar4 = (undefined4 *)(*(code *)PTR_safemalloc_000b82f8)(iVar1,1);\n      param_1[1] = puVar4;\n      *puVar4 = param_1[2];\n    }\n    uVar2 = (int)param_1[4] < (int)param_1[3] ^ 1;\n  }" else (compound_statement "{\n    iVar5 = param_1[4];\n    param_1[4] = iVar1 + iVar5;\n    if ((param_1[3] == 4) && (iVar1 + iVar5 == 4)) {\n      pbVar3 = (byte *)param_1[1];\n      iVar1 = (*(code *)PTR_toint_000b83b8)\n                        (((uint)*pbVar3 << 0x18 | (uint)pbVar3[1] << 0x10 | (uint)pbVar3[3] |\n                         (uint)pbVar3[2] << 8) + 4);\n      param_1[3] = iVar1;\n      if (iVar1 < 1) {\n        param_1[1] = 0;\n        param_1[4] = 0;\n        return 0xffffffff;\n      }\n      if ((undefined4 *)param_1[1] != param_1 + 2) {\n        uVar2 = (*(code *)PTR___assert_fail_000b8b18)\n                          (PTR_DAT_000b8348 + 0x3850,PTR_DAT_000b8348 + 0x3840,0x52,\n                           PTR_DAT_000b8348 + 0x38b0);\n        return uVar2;\n      }\n      puVar4 = (undefined4 *)(*(code *)PTR_safemalloc_000b82f8)(iVar1,1);\n      param_1[1] = puVar4;\n      *puVar4 = param_1[2];\n    }\n    uVar2 = (int)param_1[4] < (int)param_1[3] ^ 1;\n  }" { (expression_statement "iVar5 = param_1[4];" (assignment_expression "iVar5 = param_1[4]" identifier = (subscript_expression "param_1[4]" identifier [ number_literal ])) ;) (expression_statement "param_1[4] = iVar1 + iVar5;" (assignment_expression "param_1[4] = iVar1 + iVar5" (subscript_expression "param_1[4]" identifier [ number_literal ]) = (binary_expression "iVar1 + iVar5" identifier + identifier)) ;) (if_statement "if ((param_1[3] == 4) && (iVar1 + iVar5 == 4)) {\n      pbVar3 = (byte *)param_1[1];\n      iVar1 = (*(code *)PTR_toint_000b83b8)\n                        (((uint)*pbVar3 << 0x18 | (uint)pbVar3[1] << 0x10 | (uint)pbVar3[3] |\n                         (uint)pbVar3[2] << 8) + 4);\n      param_1[3] = iVar1;\n      if (iVar1 < 1) {\n        param_1[1] = 0;\n        param_1[4] = 0;\n        return 0xffffffff;\n      }\n      if ((undefined4 *)param_1[1] != param_1 + 2) {\n        uVar2 = (*(code *)PTR___assert_fail_000b8b18)\n                          (PTR_DAT_000b8348 + 0x3850,PTR_DAT_000b8348 + 0x3840,0x52,\n                           PTR_DAT_000b8348 + 0x38b0);\n        return uVar2;\n      }\n      puVar4 = (undefined4 *)(*(code *)PTR_safemalloc_000b82f8)(iVar1,1);\n      param_1[1] = puVar4;\n      *puVar4 = param_1[2];\n    }" if (parenthesized_expression "((param_1[3] == 4) && (iVar1 + iVar5 == 4))" ( (binary_expression "(param_1[3] == 4) && (iVar1 + iVar5 == 4)" (parenthesized_expression "(param_1[3] == 4)" ( (binary_expression "param_1[3] == 4" (subscript_expression "param_1[3]" identifier [ number_literal ]) == number_literal) )) && (parenthesized_expression "(iVar1 + iVar5 == 4)" ( (binary_expression "iVar1 + iVar5 == 4" (binary_expression "iVar1 + iVar5" identifier + identifier) == number_literal) ))) )) (compound_statement "{\n      pbVar3 = (byte *)param_1[1];\n      iVar1 = (*(code *)PTR_toint_000b83b8)\n                        (((uint)*pbVar3 << 0x18 | (uint)pbVar3[1] << 0x10 | (uint)pbVar3[3] |\n                         (uint)pbVar3[2] << 8) + 4);\n      param_1[3] = iVar1;\n      if (iVar1 < 1) {\n        param_1[1] = 0;\n        param_1[4] = 0;\n        return 0xffffffff;\n      }\n      if ((undefined4 *)param_1[1] != param_1 + 2) {\n        uVar2 = (*(code *)PTR___assert_fail_000b8b18)\n                          (PTR_DAT_000b8348 + 0x3850,PTR_DAT_000b8348 + 0x3840,0x52,\n                           PTR_DAT_000b8348 + 0x38b0);\n        return uVar2;\n      }\n      puVar4 = (undefined4 *)(*(code *)PTR_safemalloc_000b82f8)(iVar1,1);\n      param_1[1] = puVar4;\n      *puVar4 = param_1[2];\n    }" { (expression_statement "pbVar3 = (byte *)param_1[1];" (assignment_expression "pbVar3 = (byte *)param_1[1]" identifier = (cast_expression "(byte *)param_1[1]" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "param_1[1]" identifier [ number_literal ]))) ;) (expression_statement "iVar1 = (*(code *)PTR_toint_000b83b8)\n                        (((uint)*pbVar3 << 0x18 | (uint)pbVar3[1] << 0x10 | (uint)pbVar3[3] |\n                         (uint)pbVar3[2] << 8) + 4);" (assignment_expression "iVar1 = (*(code *)PTR_toint_000b83b8)\n                        (((uint)*pbVar3 << 0x18 | (uint)pbVar3[1] << 0x10 | (uint)pbVar3[3] |\n                         (uint)pbVar3[2] << 8) + 4)" identifier = (call_expression "(*(code *)PTR_toint_000b83b8)\n                        (((uint)*pbVar3 << 0x18 | (uint)pbVar3[1] << 0x10 | (uint)pbVar3[3] |\n                         (uint)pbVar3[2] << 8) + 4)" (parenthesized_expression "(*(code *)PTR_toint_000b83b8)" ( (pointer_expression "*(code *)PTR_toint_000b83b8" * (cast_expression "(code *)PTR_toint_000b83b8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(((uint)*pbVar3 << 0x18 | (uint)pbVar3[1] << 0x10 | (uint)pbVar3[3] |\n                         (uint)pbVar3[2] << 8) + 4)" ( (binary_expression "((uint)*pbVar3 << 0x18 | (uint)pbVar3[1] << 0x10 | (uint)pbVar3[3] |\n                         (uint)pbVar3[2] << 8) + 4" (parenthesized_expression "((uint)*pbVar3 << 0x18 | (uint)pbVar3[1] << 0x10 | (uint)pbVar3[3] |\n                         (uint)pbVar3[2] << 8)" ( (binary_expression "(uint)*pbVar3 << 0x18 | (uint)pbVar3[1] << 0x10 | (uint)pbVar3[3] |\n                         (uint)pbVar3[2] << 8" (binary_expression "(uint)*pbVar3 << 0x18 | (uint)pbVar3[1] << 0x10 | (uint)pbVar3[3]" (binary_expression "(uint)*pbVar3 << 0x18 | (uint)pbVar3[1] << 0x10" (binary_expression "(uint)*pbVar3 << 0x18" (binary_expression "(uint)*pbVar3" (parenthesized_expression "(uint)" ( identifier )) * identifier) << number_literal) | (binary_expression "(uint)pbVar3[1] << 0x10" (cast_expression "(uint)pbVar3[1]" ( (type_descriptor "uint" type_identifier) ) (subscript_expression "pbVar3[1]" identifier [ number_literal ])) << number_literal)) | (cast_expression "(uint)pbVar3[3]" ( (type_descriptor "uint" type_identifier) ) (subscript_expression "pbVar3[3]" identifier [ number_literal ]))) | (binary_expression "(uint)pbVar3[2] << 8" (cast_expression "(uint)pbVar3[2]" ( (type_descriptor "uint" type_identifier) ) (subscript_expression "pbVar3[2]" identifier [ number_literal ])) << number_literal)) )) + number_literal) )))) ;) (expression_statement "param_1[3] = iVar1;" (assignment_expression "param_1[3] = iVar1" (subscript_expression "param_1[3]" identifier [ number_literal ]) = identifier) ;) (if_statement "if (iVar1 < 1) {\n        param_1[1] = 0;\n        param_1[4] = 0;\n        return 0xffffffff;\n      }" if (parenthesized_expression "(iVar1 < 1)" ( (binary_expression "iVar1 < 1" identifier < number_literal) )) (compound_statement "{\n        param_1[1] = 0;\n        param_1[4] = 0;\n        return 0xffffffff;\n      }" { (expression_statement "param_1[1] = 0;" (assignment_expression "param_1[1] = 0" (subscript_expression "param_1[1]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "param_1[4] = 0;" (assignment_expression "param_1[4] = 0" (subscript_expression "param_1[4]" identifier [ number_literal ]) = number_literal) ;) (return_statement "return 0xffffffff;" return number_literal ;) })) (if_statement "if ((undefined4 *)param_1[1] != param_1 + 2) {\n        uVar2 = (*(code *)PTR___assert_fail_000b8b18)\n                          (PTR_DAT_000b8348 + 0x3850,PTR_DAT_000b8348 + 0x3840,0x52,\n                           PTR_DAT_000b8348 + 0x38b0);\n        return uVar2;\n      }" if (parenthesized_expression "((undefined4 *)param_1[1] != param_1 + 2)" ( (binary_expression "(undefined4 *)param_1[1] != param_1 + 2" (cast_expression "(undefined4 *)param_1[1]" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "param_1[1]" identifier [ number_literal ])) != (binary_expression "param_1 + 2" identifier + number_literal)) )) (compound_statement "{\n        uVar2 = (*(code *)PTR___assert_fail_000b8b18)\n                          (PTR_DAT_000b8348 + 0x3850,PTR_DAT_000b8348 + 0x3840,0x52,\n                           PTR_DAT_000b8348 + 0x38b0);\n        return uVar2;\n      }" { (expression_statement "uVar2 = (*(code *)PTR___assert_fail_000b8b18)\n                          (PTR_DAT_000b8348 + 0x3850,PTR_DAT_000b8348 + 0x3840,0x52,\n                           PTR_DAT_000b8348 + 0x38b0);" (assignment_expression "uVar2 = (*(code *)PTR___assert_fail_000b8b18)\n                          (PTR_DAT_000b8348 + 0x3850,PTR_DAT_000b8348 + 0x3840,0x52,\n                           PTR_DAT_000b8348 + 0x38b0)" identifier = (call_expression "(*(code *)PTR___assert_fail_000b8b18)\n                          (PTR_DAT_000b8348 + 0x3850,PTR_DAT_000b8348 + 0x3840,0x52,\n                           PTR_DAT_000b8348 + 0x38b0)" (parenthesized_expression "(*(code *)PTR___assert_fail_000b8b18)" ( (pointer_expression "*(code *)PTR___assert_fail_000b8b18" * (cast_expression "(code *)PTR___assert_fail_000b8b18" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(PTR_DAT_000b8348 + 0x3850,PTR_DAT_000b8348 + 0x3840,0x52,\n                           PTR_DAT_000b8348 + 0x38b0)" ( (binary_expression "PTR_DAT_000b8348 + 0x3850" identifier + number_literal) , (binary_expression "PTR_DAT_000b8348 + 0x3840" identifier + number_literal) , number_literal , (binary_expression "PTR_DAT_000b8348 + 0x38b0" identifier + number_literal) )))) ;) (return_statement "return uVar2;" return identifier ;) })) (expression_statement "puVar4 = (undefined4 *)(*(code *)PTR_safemalloc_000b82f8)(iVar1,1);" (assignment_expression "puVar4 = (undefined4 *)(*(code *)PTR_safemalloc_000b82f8)(iVar1,1)" identifier = (cast_expression "(undefined4 *)(*(code *)PTR_safemalloc_000b82f8)(iVar1,1)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR_safemalloc_000b82f8)(iVar1,1)" (parenthesized_expression "(*(code *)PTR_safemalloc_000b82f8)" ( (pointer_expression "*(code *)PTR_safemalloc_000b82f8" * (cast_expression "(code *)PTR_safemalloc_000b82f8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar1,1)" ( identifier , number_literal ))))) ;) (expression_statement "param_1[1] = puVar4;" (assignment_expression "param_1[1] = puVar4" (subscript_expression "param_1[1]" identifier [ number_literal ]) = identifier) ;) (expression_statement "*puVar4 = param_1[2];" (assignment_expression "*puVar4 = param_1[2]" (pointer_expression "*puVar4" * identifier) = (subscript_expression "param_1[2]" identifier [ number_literal ])) ;) })) (expression_statement "uVar2 = (int)param_1[4] < (int)param_1[3] ^ 1;" (assignment_expression "uVar2 = (int)param_1[4] < (int)param_1[3] ^ 1" identifier = (binary_expression "(int)param_1[4] < (int)param_1[3] ^ 1" (binary_expression "(int)param_1[4] < (int)param_1[3]" (cast_expression "(int)param_1[4]" ( (type_descriptor "int" primitive_type) ) (subscript_expression "param_1[4]" identifier [ number_literal ])) < (cast_expression "(int)param_1[3]" ( (type_descriptor "int" primitive_type) ) (subscript_expression "param_1[3]" identifier [ number_literal ]))) ^ number_literal)) ;) }))) (return_statement "return uVar2;" return identifier ;) })))
(translation_unit "int agent_try_read(agent_pending_query *conn)\n\n{\n  int iVar1;\n  uint uVar2;\n  byte *pbVar3;\n  char *pcVar4;\n  \n  iVar1 = (*(code *)PTR_read_000b8d18)\n                    (conn->fd,conn->retbuf + conn->retlen,conn->retsize - conn->retlen);\n  if (iVar1 < 1) {\n    if (conn->retbuf != conn->sizebuf) {\n      (*(code *)PTR_safefree_000b82e8)();\n    }\n    conn->retbuf = (char *)0x0;\n    conn->retlen = 0;\n    uVar2 = 1;\n  }\n  else {\n    iVar1 = iVar1 + conn->retlen;\n    conn->retlen = iVar1;\n    if ((conn->retsize == 4) && (iVar1 == 4)) {\n      pbVar3 = (byte *)conn->retbuf;\n      iVar1 = (*(code *)PTR_toint_000b83b8)\n                        (((uint)*pbVar3 << 0x18 | (uint)pbVar3[1] << 0x10 | (uint)pbVar3[3] |\n                         (uint)pbVar3[2] << 8) + 4);\n      conn->retsize = iVar1;\n      if (iVar1 < 1) {\n        conn->retbuf = (char *)0x0;\n        conn->retlen = 0;\n        return -1;\n      }\n      if (conn->retbuf != conn->sizebuf) {\n        iVar1 = (*(code *)PTR___assert_fail_000b8b18)\n                          (PTR_PC2_1357_27__000b8348 + 0x3850,PTR_PC2_1357_27__000b8348 + 0x3840,\n                           0x52,PTR_PC2_1357_27__000b8348 + 0x38b0);\n        return iVar1;\n      }\n      pcVar4 = (char *)(*(code *)PTR_safemalloc_000b82f8)(iVar1,1);\n      conn->retbuf = pcVar4;\n      *(undefined4 *)pcVar4 = *(undefined4 *)conn->sizebuf;\n    }\n    uVar2 = conn->retlen < conn->retsize ^ 1;\n  }\n  return uVar2;\n}\n\n" (function_definition "int agent_try_read(agent_pending_query *conn)\n\n{\n  int iVar1;\n  uint uVar2;\n  byte *pbVar3;\n  char *pcVar4;\n  \n  iVar1 = (*(code *)PTR_read_000b8d18)\n                    (conn->fd,conn->retbuf + conn->retlen,conn->retsize - conn->retlen);\n  if (iVar1 < 1) {\n    if (conn->retbuf != conn->sizebuf) {\n      (*(code *)PTR_safefree_000b82e8)();\n    }\n    conn->retbuf = (char *)0x0;\n    conn->retlen = 0;\n    uVar2 = 1;\n  }\n  else {\n    iVar1 = iVar1 + conn->retlen;\n    conn->retlen = iVar1;\n    if ((conn->retsize == 4) && (iVar1 == 4)) {\n      pbVar3 = (byte *)conn->retbuf;\n      iVar1 = (*(code *)PTR_toint_000b83b8)\n                        (((uint)*pbVar3 << 0x18 | (uint)pbVar3[1] << 0x10 | (uint)pbVar3[3] |\n                         (uint)pbVar3[2] << 8) + 4);\n      conn->retsize = iVar1;\n      if (iVar1 < 1) {\n        conn->retbuf = (char *)0x0;\n        conn->retlen = 0;\n        return -1;\n      }\n      if (conn->retbuf != conn->sizebuf) {\n        iVar1 = (*(code *)PTR___assert_fail_000b8b18)\n                          (PTR_PC2_1357_27__000b8348 + 0x3850,PTR_PC2_1357_27__000b8348 + 0x3840,\n                           0x52,PTR_PC2_1357_27__000b8348 + 0x38b0);\n        return iVar1;\n      }\n      pcVar4 = (char *)(*(code *)PTR_safemalloc_000b82f8)(iVar1,1);\n      conn->retbuf = pcVar4;\n      *(undefined4 *)pcVar4 = *(undefined4 *)conn->sizebuf;\n    }\n    uVar2 = conn->retlen < conn->retsize ^ 1;\n  }\n  return uVar2;\n}" primitive_type (function_declarator "agent_try_read(agent_pending_query *conn)" identifier (parameter_list "(agent_pending_query *conn)" ( (parameter_declaration "agent_pending_query *conn" type_identifier (pointer_declarator "*conn" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  uint uVar2;\n  byte *pbVar3;\n  char *pcVar4;\n  \n  iVar1 = (*(code *)PTR_read_000b8d18)\n                    (conn->fd,conn->retbuf + conn->retlen,conn->retsize - conn->retlen);\n  if (iVar1 < 1) {\n    if (conn->retbuf != conn->sizebuf) {\n      (*(code *)PTR_safefree_000b82e8)();\n    }\n    conn->retbuf = (char *)0x0;\n    conn->retlen = 0;\n    uVar2 = 1;\n  }\n  else {\n    iVar1 = iVar1 + conn->retlen;\n    conn->retlen = iVar1;\n    if ((conn->retsize == 4) && (iVar1 == 4)) {\n      pbVar3 = (byte *)conn->retbuf;\n      iVar1 = (*(code *)PTR_toint_000b83b8)\n                        (((uint)*pbVar3 << 0x18 | (uint)pbVar3[1] << 0x10 | (uint)pbVar3[3] |\n                         (uint)pbVar3[2] << 8) + 4);\n      conn->retsize = iVar1;\n      if (iVar1 < 1) {\n        conn->retbuf = (char *)0x0;\n        conn->retlen = 0;\n        return -1;\n      }\n      if (conn->retbuf != conn->sizebuf) {\n        iVar1 = (*(code *)PTR___assert_fail_000b8b18)\n                          (PTR_PC2_1357_27__000b8348 + 0x3850,PTR_PC2_1357_27__000b8348 + 0x3840,\n                           0x52,PTR_PC2_1357_27__000b8348 + 0x38b0);\n        return iVar1;\n      }\n      pcVar4 = (char *)(*(code *)PTR_safemalloc_000b82f8)(iVar1,1);\n      conn->retbuf = pcVar4;\n      *(undefined4 *)pcVar4 = *(undefined4 *)conn->sizebuf;\n    }\n    uVar2 = conn->retlen < conn->retsize ^ 1;\n  }\n  return uVar2;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "byte *pbVar3;" type_identifier (pointer_declarator "*pbVar3" * identifier) ;) (declaration "char *pcVar4;" primitive_type (pointer_declarator "*pcVar4" * identifier) ;) (expression_statement "iVar1 = (*(code *)PTR_read_000b8d18)\n                    (conn->fd,conn->retbuf + conn->retlen,conn->retsize - conn->retlen);" (assignment_expression "iVar1 = (*(code *)PTR_read_000b8d18)\n                    (conn->fd,conn->retbuf + conn->retlen,conn->retsize - conn->retlen)" identifier = (call_expression "(*(code *)PTR_read_000b8d18)\n                    (conn->fd,conn->retbuf + conn->retlen,conn->retsize - conn->retlen)" (parenthesized_expression "(*(code *)PTR_read_000b8d18)" ( (pointer_expression "*(code *)PTR_read_000b8d18" * (cast_expression "(code *)PTR_read_000b8d18" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(conn->fd,conn->retbuf + conn->retlen,conn->retsize - conn->retlen)" ( (field_expression "conn->fd" identifier -> field_identifier) , (binary_expression "conn->retbuf + conn->retlen" (field_expression "conn->retbuf" identifier -> field_identifier) + (field_expression "conn->retlen" identifier -> field_identifier)) , (binary_expression "conn->retsize - conn->retlen" (field_expression "conn->retsize" identifier -> field_identifier) - (field_expression "conn->retlen" identifier -> field_identifier)) )))) ;) (if_statement "if (iVar1 < 1) {\n    if (conn->retbuf != conn->sizebuf) {\n      (*(code *)PTR_safefree_000b82e8)();\n    }\n    conn->retbuf = (char *)0x0;\n    conn->retlen = 0;\n    uVar2 = 1;\n  }\n  else {\n    iVar1 = iVar1 + conn->retlen;\n    conn->retlen = iVar1;\n    if ((conn->retsize == 4) && (iVar1 == 4)) {\n      pbVar3 = (byte *)conn->retbuf;\n      iVar1 = (*(code *)PTR_toint_000b83b8)\n                        (((uint)*pbVar3 << 0x18 | (uint)pbVar3[1] << 0x10 | (uint)pbVar3[3] |\n                         (uint)pbVar3[2] << 8) + 4);\n      conn->retsize = iVar1;\n      if (iVar1 < 1) {\n        conn->retbuf = (char *)0x0;\n        conn->retlen = 0;\n        return -1;\n      }\n      if (conn->retbuf != conn->sizebuf) {\n        iVar1 = (*(code *)PTR___assert_fail_000b8b18)\n                          (PTR_PC2_1357_27__000b8348 + 0x3850,PTR_PC2_1357_27__000b8348 + 0x3840,\n                           0x52,PTR_PC2_1357_27__000b8348 + 0x38b0);\n        return iVar1;\n      }\n      pcVar4 = (char *)(*(code *)PTR_safemalloc_000b82f8)(iVar1,1);\n      conn->retbuf = pcVar4;\n      *(undefined4 *)pcVar4 = *(undefined4 *)conn->sizebuf;\n    }\n    uVar2 = conn->retlen < conn->retsize ^ 1;\n  }" if (parenthesized_expression "(iVar1 < 1)" ( (binary_expression "iVar1 < 1" identifier < number_literal) )) (compound_statement "{\n    if (conn->retbuf != conn->sizebuf) {\n      (*(code *)PTR_safefree_000b82e8)();\n    }\n    conn->retbuf = (char *)0x0;\n    conn->retlen = 0;\n    uVar2 = 1;\n  }" { (if_statement "if (conn->retbuf != conn->sizebuf) {\n      (*(code *)PTR_safefree_000b82e8)();\n    }" if (parenthesized_expression "(conn->retbuf != conn->sizebuf)" ( (binary_expression "conn->retbuf != conn->sizebuf" (field_expression "conn->retbuf" identifier -> field_identifier) != (field_expression "conn->sizebuf" identifier -> field_identifier)) )) (compound_statement "{\n      (*(code *)PTR_safefree_000b82e8)();\n    }" { (expression_statement "(*(code *)PTR_safefree_000b82e8)();" (call_expression "(*(code *)PTR_safefree_000b82e8)()" (parenthesized_expression "(*(code *)PTR_safefree_000b82e8)" ( (pointer_expression "*(code *)PTR_safefree_000b82e8" * (cast_expression "(code *)PTR_safefree_000b82e8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))) ;) })) (expression_statement "conn->retbuf = (char *)0x0;" (assignment_expression "conn->retbuf = (char *)0x0" (field_expression "conn->retbuf" identifier -> field_identifier) = (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "conn->retlen = 0;" (assignment_expression "conn->retlen = 0" (field_expression "conn->retlen" identifier -> field_identifier) = number_literal) ;) (expression_statement "uVar2 = 1;" (assignment_expression "uVar2 = 1" identifier = number_literal) ;) }) (else_clause "else {\n    iVar1 = iVar1 + conn->retlen;\n    conn->retlen = iVar1;\n    if ((conn->retsize == 4) && (iVar1 == 4)) {\n      pbVar3 = (byte *)conn->retbuf;\n      iVar1 = (*(code *)PTR_toint_000b83b8)\n                        (((uint)*pbVar3 << 0x18 | (uint)pbVar3[1] << 0x10 | (uint)pbVar3[3] |\n                         (uint)pbVar3[2] << 8) + 4);\n      conn->retsize = iVar1;\n      if (iVar1 < 1) {\n        conn->retbuf = (char *)0x0;\n        conn->retlen = 0;\n        return -1;\n      }\n      if (conn->retbuf != conn->sizebuf) {\n        iVar1 = (*(code *)PTR___assert_fail_000b8b18)\n                          (PTR_PC2_1357_27__000b8348 + 0x3850,PTR_PC2_1357_27__000b8348 + 0x3840,\n                           0x52,PTR_PC2_1357_27__000b8348 + 0x38b0);\n        return iVar1;\n      }\n      pcVar4 = (char *)(*(code *)PTR_safemalloc_000b82f8)(iVar1,1);\n      conn->retbuf = pcVar4;\n      *(undefined4 *)pcVar4 = *(undefined4 *)conn->sizebuf;\n    }\n    uVar2 = conn->retlen < conn->retsize ^ 1;\n  }" else (compound_statement "{\n    iVar1 = iVar1 + conn->retlen;\n    conn->retlen = iVar1;\n    if ((conn->retsize == 4) && (iVar1 == 4)) {\n      pbVar3 = (byte *)conn->retbuf;\n      iVar1 = (*(code *)PTR_toint_000b83b8)\n                        (((uint)*pbVar3 << 0x18 | (uint)pbVar3[1] << 0x10 | (uint)pbVar3[3] |\n                         (uint)pbVar3[2] << 8) + 4);\n      conn->retsize = iVar1;\n      if (iVar1 < 1) {\n        conn->retbuf = (char *)0x0;\n        conn->retlen = 0;\n        return -1;\n      }\n      if (conn->retbuf != conn->sizebuf) {\n        iVar1 = (*(code *)PTR___assert_fail_000b8b18)\n                          (PTR_PC2_1357_27__000b8348 + 0x3850,PTR_PC2_1357_27__000b8348 + 0x3840,\n                           0x52,PTR_PC2_1357_27__000b8348 + 0x38b0);\n        return iVar1;\n      }\n      pcVar4 = (char *)(*(code *)PTR_safemalloc_000b82f8)(iVar1,1);\n      conn->retbuf = pcVar4;\n      *(undefined4 *)pcVar4 = *(undefined4 *)conn->sizebuf;\n    }\n    uVar2 = conn->retlen < conn->retsize ^ 1;\n  }" { (expression_statement "iVar1 = iVar1 + conn->retlen;" (assignment_expression "iVar1 = iVar1 + conn->retlen" identifier = (binary_expression "iVar1 + conn->retlen" identifier + (field_expression "conn->retlen" identifier -> field_identifier))) ;) (expression_statement "conn->retlen = iVar1;" (assignment_expression "conn->retlen = iVar1" (field_expression "conn->retlen" identifier -> field_identifier) = identifier) ;) (if_statement "if ((conn->retsize == 4) && (iVar1 == 4)) {\n      pbVar3 = (byte *)conn->retbuf;\n      iVar1 = (*(code *)PTR_toint_000b83b8)\n                        (((uint)*pbVar3 << 0x18 | (uint)pbVar3[1] << 0x10 | (uint)pbVar3[3] |\n                         (uint)pbVar3[2] << 8) + 4);\n      conn->retsize = iVar1;\n      if (iVar1 < 1) {\n        conn->retbuf = (char *)0x0;\n        conn->retlen = 0;\n        return -1;\n      }\n      if (conn->retbuf != conn->sizebuf) {\n        iVar1 = (*(code *)PTR___assert_fail_000b8b18)\n                          (PTR_PC2_1357_27__000b8348 + 0x3850,PTR_PC2_1357_27__000b8348 + 0x3840,\n                           0x52,PTR_PC2_1357_27__000b8348 + 0x38b0);\n        return iVar1;\n      }\n      pcVar4 = (char *)(*(code *)PTR_safemalloc_000b82f8)(iVar1,1);\n      conn->retbuf = pcVar4;\n      *(undefined4 *)pcVar4 = *(undefined4 *)conn->sizebuf;\n    }" if (parenthesized_expression "((conn->retsize == 4) && (iVar1 == 4))" ( (binary_expression "(conn->retsize == 4) && (iVar1 == 4)" (parenthesized_expression "(conn->retsize == 4)" ( (binary_expression "conn->retsize == 4" (field_expression "conn->retsize" identifier -> field_identifier) == number_literal) )) && (parenthesized_expression "(iVar1 == 4)" ( (binary_expression "iVar1 == 4" identifier == number_literal) ))) )) (compound_statement "{\n      pbVar3 = (byte *)conn->retbuf;\n      iVar1 = (*(code *)PTR_toint_000b83b8)\n                        (((uint)*pbVar3 << 0x18 | (uint)pbVar3[1] << 0x10 | (uint)pbVar3[3] |\n                         (uint)pbVar3[2] << 8) + 4);\n      conn->retsize = iVar1;\n      if (iVar1 < 1) {\n        conn->retbuf = (char *)0x0;\n        conn->retlen = 0;\n        return -1;\n      }\n      if (conn->retbuf != conn->sizebuf) {\n        iVar1 = (*(code *)PTR___assert_fail_000b8b18)\n                          (PTR_PC2_1357_27__000b8348 + 0x3850,PTR_PC2_1357_27__000b8348 + 0x3840,\n                           0x52,PTR_PC2_1357_27__000b8348 + 0x38b0);\n        return iVar1;\n      }\n      pcVar4 = (char *)(*(code *)PTR_safemalloc_000b82f8)(iVar1,1);\n      conn->retbuf = pcVar4;\n      *(undefined4 *)pcVar4 = *(undefined4 *)conn->sizebuf;\n    }" { (expression_statement "pbVar3 = (byte *)conn->retbuf;" (assignment_expression "pbVar3 = (byte *)conn->retbuf" identifier = (cast_expression "(byte *)conn->retbuf" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (field_expression "conn->retbuf" identifier -> field_identifier))) ;) (expression_statement "iVar1 = (*(code *)PTR_toint_000b83b8)\n                        (((uint)*pbVar3 << 0x18 | (uint)pbVar3[1] << 0x10 | (uint)pbVar3[3] |\n                         (uint)pbVar3[2] << 8) + 4);" (assignment_expression "iVar1 = (*(code *)PTR_toint_000b83b8)\n                        (((uint)*pbVar3 << 0x18 | (uint)pbVar3[1] << 0x10 | (uint)pbVar3[3] |\n                         (uint)pbVar3[2] << 8) + 4)" identifier = (call_expression "(*(code *)PTR_toint_000b83b8)\n                        (((uint)*pbVar3 << 0x18 | (uint)pbVar3[1] << 0x10 | (uint)pbVar3[3] |\n                         (uint)pbVar3[2] << 8) + 4)" (parenthesized_expression "(*(code *)PTR_toint_000b83b8)" ( (pointer_expression "*(code *)PTR_toint_000b83b8" * (cast_expression "(code *)PTR_toint_000b83b8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(((uint)*pbVar3 << 0x18 | (uint)pbVar3[1] << 0x10 | (uint)pbVar3[3] |\n                         (uint)pbVar3[2] << 8) + 4)" ( (binary_expression "((uint)*pbVar3 << 0x18 | (uint)pbVar3[1] << 0x10 | (uint)pbVar3[3] |\n                         (uint)pbVar3[2] << 8) + 4" (parenthesized_expression "((uint)*pbVar3 << 0x18 | (uint)pbVar3[1] << 0x10 | (uint)pbVar3[3] |\n                         (uint)pbVar3[2] << 8)" ( (binary_expression "(uint)*pbVar3 << 0x18 | (uint)pbVar3[1] << 0x10 | (uint)pbVar3[3] |\n                         (uint)pbVar3[2] << 8" (binary_expression "(uint)*pbVar3 << 0x18 | (uint)pbVar3[1] << 0x10 | (uint)pbVar3[3]" (binary_expression "(uint)*pbVar3 << 0x18 | (uint)pbVar3[1] << 0x10" (binary_expression "(uint)*pbVar3 << 0x18" (binary_expression "(uint)*pbVar3" (parenthesized_expression "(uint)" ( identifier )) * identifier) << number_literal) | (binary_expression "(uint)pbVar3[1] << 0x10" (cast_expression "(uint)pbVar3[1]" ( (type_descriptor "uint" type_identifier) ) (subscript_expression "pbVar3[1]" identifier [ number_literal ])) << number_literal)) | (cast_expression "(uint)pbVar3[3]" ( (type_descriptor "uint" type_identifier) ) (subscript_expression "pbVar3[3]" identifier [ number_literal ]))) | (binary_expression "(uint)pbVar3[2] << 8" (cast_expression "(uint)pbVar3[2]" ( (type_descriptor "uint" type_identifier) ) (subscript_expression "pbVar3[2]" identifier [ number_literal ])) << number_literal)) )) + number_literal) )))) ;) (expression_statement "conn->retsize = iVar1;" (assignment_expression "conn->retsize = iVar1" (field_expression "conn->retsize" identifier -> field_identifier) = identifier) ;) (if_statement "if (iVar1 < 1) {\n        conn->retbuf = (char *)0x0;\n        conn->retlen = 0;\n        return -1;\n      }" if (parenthesized_expression "(iVar1 < 1)" ( (binary_expression "iVar1 < 1" identifier < number_literal) )) (compound_statement "{\n        conn->retbuf = (char *)0x0;\n        conn->retlen = 0;\n        return -1;\n      }" { (expression_statement "conn->retbuf = (char *)0x0;" (assignment_expression "conn->retbuf = (char *)0x0" (field_expression "conn->retbuf" identifier -> field_identifier) = (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "conn->retlen = 0;" (assignment_expression "conn->retlen = 0" (field_expression "conn->retlen" identifier -> field_identifier) = number_literal) ;) (return_statement "return -1;" return number_literal ;) })) (if_statement "if (conn->retbuf != conn->sizebuf) {\n        iVar1 = (*(code *)PTR___assert_fail_000b8b18)\n                          (PTR_PC2_1357_27__000b8348 + 0x3850,PTR_PC2_1357_27__000b8348 + 0x3840,\n                           0x52,PTR_PC2_1357_27__000b8348 + 0x38b0);\n        return iVar1;\n      }" if (parenthesized_expression "(conn->retbuf != conn->sizebuf)" ( (binary_expression "conn->retbuf != conn->sizebuf" (field_expression "conn->retbuf" identifier -> field_identifier) != (field_expression "conn->sizebuf" identifier -> field_identifier)) )) (compound_statement "{\n        iVar1 = (*(code *)PTR___assert_fail_000b8b18)\n                          (PTR_PC2_1357_27__000b8348 + 0x3850,PTR_PC2_1357_27__000b8348 + 0x3840,\n                           0x52,PTR_PC2_1357_27__000b8348 + 0x38b0);\n        return iVar1;\n      }" { (expression_statement "iVar1 = (*(code *)PTR___assert_fail_000b8b18)\n                          (PTR_PC2_1357_27__000b8348 + 0x3850,PTR_PC2_1357_27__000b8348 + 0x3840,\n                           0x52,PTR_PC2_1357_27__000b8348 + 0x38b0);" (assignment_expression "iVar1 = (*(code *)PTR___assert_fail_000b8b18)\n                          (PTR_PC2_1357_27__000b8348 + 0x3850,PTR_PC2_1357_27__000b8348 + 0x3840,\n                           0x52,PTR_PC2_1357_27__000b8348 + 0x38b0)" identifier = (call_expression "(*(code *)PTR___assert_fail_000b8b18)\n                          (PTR_PC2_1357_27__000b8348 + 0x3850,PTR_PC2_1357_27__000b8348 + 0x3840,\n                           0x52,PTR_PC2_1357_27__000b8348 + 0x38b0)" (parenthesized_expression "(*(code *)PTR___assert_fail_000b8b18)" ( (pointer_expression "*(code *)PTR___assert_fail_000b8b18" * (cast_expression "(code *)PTR___assert_fail_000b8b18" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(PTR_PC2_1357_27__000b8348 + 0x3850,PTR_PC2_1357_27__000b8348 + 0x3840,\n                           0x52,PTR_PC2_1357_27__000b8348 + 0x38b0)" ( (binary_expression "PTR_PC2_1357_27__000b8348 + 0x3850" identifier + number_literal) , (binary_expression "PTR_PC2_1357_27__000b8348 + 0x3840" identifier + number_literal) , number_literal , (binary_expression "PTR_PC2_1357_27__000b8348 + 0x38b0" identifier + number_literal) )))) ;) (return_statement "return iVar1;" return identifier ;) })) (expression_statement "pcVar4 = (char *)(*(code *)PTR_safemalloc_000b82f8)(iVar1,1);" (assignment_expression "pcVar4 = (char *)(*(code *)PTR_safemalloc_000b82f8)(iVar1,1)" identifier = (cast_expression "(char *)(*(code *)PTR_safemalloc_000b82f8)(iVar1,1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR_safemalloc_000b82f8)(iVar1,1)" (parenthesized_expression "(*(code *)PTR_safemalloc_000b82f8)" ( (pointer_expression "*(code *)PTR_safemalloc_000b82f8" * (cast_expression "(code *)PTR_safemalloc_000b82f8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar1,1)" ( identifier , number_literal ))))) ;) (expression_statement "conn->retbuf = pcVar4;" (assignment_expression "conn->retbuf = pcVar4" (field_expression "conn->retbuf" identifier -> field_identifier) = identifier) ;) (expression_statement "*(undefined4 *)pcVar4 = *(undefined4 *)conn->sizebuf;" (assignment_expression "*(undefined4 *)pcVar4 = *(undefined4 *)conn->sizebuf" (pointer_expression "*(undefined4 *)pcVar4" * (cast_expression "(undefined4 *)pcVar4" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) = (pointer_expression "*(undefined4 *)conn->sizebuf" * (cast_expression "(undefined4 *)conn->sizebuf" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (field_expression "conn->sizebuf" identifier -> field_identifier)))) ;) })) (expression_statement "uVar2 = conn->retlen < conn->retsize ^ 1;" (assignment_expression "uVar2 = conn->retlen < conn->retsize ^ 1" identifier = (binary_expression "conn->retlen < conn->retsize ^ 1" (binary_expression "conn->retlen < conn->retsize" (field_expression "conn->retlen" identifier -> field_identifier) < (field_expression "conn->retsize" identifier -> field_identifier)) ^ number_literal)) ;) }))) (return_statement "return uVar2;" return identifier ;) })))
(translation_unit "uint FUN_00081548(undefined4 *param_1)\n\n{\n  int iVar1;\n  uint uVar2;\n  byte *pbVar3;\n  undefined4 *puVar4;\n  int iVar5;\n  \n  iVar1 = (*(code *)PTR_read_000b8d18)(*param_1,param_1[1] + param_1[4],param_1[3] - param_1[4]);\n  if (iVar1 < 1) {\n    if ((undefined4 *)param_1[1] != param_1 + 2) {\n      (*(code *)PTR_safefree_000b82e8)();\n    }\n    param_1[1] = 0;\n    param_1[4] = 0;\n    uVar2 = 1;\n  }\n  else {\n    iVar5 = param_1[4];\n    param_1[4] = iVar1 + iVar5;\n    if ((param_1[3] == 4) && (iVar1 + iVar5 == 4)) {\n      pbVar3 = (byte *)param_1[1];\n      iVar1 = (*(code *)PTR_toint_000b83b8)\n                        (((uint)*pbVar3 << 0x18 | (uint)pbVar3[1] << 0x10 | (uint)pbVar3[3] |\n                         (uint)pbVar3[2] << 8) + 4);\n      param_1[3] = iVar1;\n      if (iVar1 < 1) {\n        param_1[1] = 0;\n        param_1[4] = 0;\n        return 0xffffffff;\n      }\n      if ((undefined4 *)param_1[1] != param_1 + 2) {\n        uVar2 = (*(code *)PTR___assert_fail_000b8b18)\n                          (PTR_DAT_000b8348 + 0x3850,PTR_DAT_000b8348 + 0x3840,0x52,\n                           PTR_DAT_000b8348 + 0x38b0);\n        return uVar2;\n      }\n      puVar4 = (undefined4 *)(*(code *)PTR_safemalloc_000b82f8)(iVar1,1);\n      param_1[1] = puVar4;\n      *puVar4 = param_1[2];\n    }\n    uVar2 = (int)param_1[4] < (int)param_1[3] ^ 1;\n  }\n  return uVar2;\n}\n\n" (function_definition "uint FUN_00081548(undefined4 *param_1)\n\n{\n  int iVar1;\n  uint uVar2;\n  byte *pbVar3;\n  undefined4 *puVar4;\n  int iVar5;\n  \n  iVar1 = (*(code *)PTR_read_000b8d18)(*param_1,param_1[1] + param_1[4],param_1[3] - param_1[4]);\n  if (iVar1 < 1) {\n    if ((undefined4 *)param_1[1] != param_1 + 2) {\n      (*(code *)PTR_safefree_000b82e8)();\n    }\n    param_1[1] = 0;\n    param_1[4] = 0;\n    uVar2 = 1;\n  }\n  else {\n    iVar5 = param_1[4];\n    param_1[4] = iVar1 + iVar5;\n    if ((param_1[3] == 4) && (iVar1 + iVar5 == 4)) {\n      pbVar3 = (byte *)param_1[1];\n      iVar1 = (*(code *)PTR_toint_000b83b8)\n                        (((uint)*pbVar3 << 0x18 | (uint)pbVar3[1] << 0x10 | (uint)pbVar3[3] |\n                         (uint)pbVar3[2] << 8) + 4);\n      param_1[3] = iVar1;\n      if (iVar1 < 1) {\n        param_1[1] = 0;\n        param_1[4] = 0;\n        return 0xffffffff;\n      }\n      if ((undefined4 *)param_1[1] != param_1 + 2) {\n        uVar2 = (*(code *)PTR___assert_fail_000b8b18)\n                          (PTR_DAT_000b8348 + 0x3850,PTR_DAT_000b8348 + 0x3840,0x52,\n                           PTR_DAT_000b8348 + 0x38b0);\n        return uVar2;\n      }\n      puVar4 = (undefined4 *)(*(code *)PTR_safemalloc_000b82f8)(iVar1,1);\n      param_1[1] = puVar4;\n      *puVar4 = param_1[2];\n    }\n    uVar2 = (int)param_1[4] < (int)param_1[3] ^ 1;\n  }\n  return uVar2;\n}" type_identifier (function_declarator "FUN_00081548(undefined4 *param_1)" identifier (parameter_list "(undefined4 *param_1)" ( (parameter_declaration "undefined4 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  uint uVar2;\n  byte *pbVar3;\n  undefined4 *puVar4;\n  int iVar5;\n  \n  iVar1 = (*(code *)PTR_read_000b8d18)(*param_1,param_1[1] + param_1[4],param_1[3] - param_1[4]);\n  if (iVar1 < 1) {\n    if ((undefined4 *)param_1[1] != param_1 + 2) {\n      (*(code *)PTR_safefree_000b82e8)();\n    }\n    param_1[1] = 0;\n    param_1[4] = 0;\n    uVar2 = 1;\n  }\n  else {\n    iVar5 = param_1[4];\n    param_1[4] = iVar1 + iVar5;\n    if ((param_1[3] == 4) && (iVar1 + iVar5 == 4)) {\n      pbVar3 = (byte *)param_1[1];\n      iVar1 = (*(code *)PTR_toint_000b83b8)\n                        (((uint)*pbVar3 << 0x18 | (uint)pbVar3[1] << 0x10 | (uint)pbVar3[3] |\n                         (uint)pbVar3[2] << 8) + 4);\n      param_1[3] = iVar1;\n      if (iVar1 < 1) {\n        param_1[1] = 0;\n        param_1[4] = 0;\n        return 0xffffffff;\n      }\n      if ((undefined4 *)param_1[1] != param_1 + 2) {\n        uVar2 = (*(code *)PTR___assert_fail_000b8b18)\n                          (PTR_DAT_000b8348 + 0x3850,PTR_DAT_000b8348 + 0x3840,0x52,\n                           PTR_DAT_000b8348 + 0x38b0);\n        return uVar2;\n      }\n      puVar4 = (undefined4 *)(*(code *)PTR_safemalloc_000b82f8)(iVar1,1);\n      param_1[1] = puVar4;\n      *puVar4 = param_1[2];\n    }\n    uVar2 = (int)param_1[4] < (int)param_1[3] ^ 1;\n  }\n  return uVar2;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "byte *pbVar3;" type_identifier (pointer_declarator "*pbVar3" * identifier) ;) (declaration "undefined4 *puVar4;" type_identifier (pointer_declarator "*puVar4" * identifier) ;) (declaration "int iVar5;" primitive_type identifier ;) (expression_statement "iVar1 = (*(code *)PTR_read_000b8d18)(*param_1,param_1[1] + param_1[4],param_1[3] - param_1[4]);" (assignment_expression "iVar1 = (*(code *)PTR_read_000b8d18)(*param_1,param_1[1] + param_1[4],param_1[3] - param_1[4])" identifier = (call_expression "(*(code *)PTR_read_000b8d18)(*param_1,param_1[1] + param_1[4],param_1[3] - param_1[4])" (parenthesized_expression "(*(code *)PTR_read_000b8d18)" ( (pointer_expression "*(code *)PTR_read_000b8d18" * (cast_expression "(code *)PTR_read_000b8d18" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(*param_1,param_1[1] + param_1[4],param_1[3] - param_1[4])" ( (pointer_expression "*param_1" * identifier) , (binary_expression "param_1[1] + param_1[4]" (subscript_expression "param_1[1]" identifier [ number_literal ]) + (subscript_expression "param_1[4]" identifier [ number_literal ])) , (binary_expression "param_1[3] - param_1[4]" (subscript_expression "param_1[3]" identifier [ number_literal ]) - (subscript_expression "param_1[4]" identifier [ number_literal ])) )))) ;) (if_statement "if (iVar1 < 1) {\n    if ((undefined4 *)param_1[1] != param_1 + 2) {\n      (*(code *)PTR_safefree_000b82e8)();\n    }\n    param_1[1] = 0;\n    param_1[4] = 0;\n    uVar2 = 1;\n  }\n  else {\n    iVar5 = param_1[4];\n    param_1[4] = iVar1 + iVar5;\n    if ((param_1[3] == 4) && (iVar1 + iVar5 == 4)) {\n      pbVar3 = (byte *)param_1[1];\n      iVar1 = (*(code *)PTR_toint_000b83b8)\n                        (((uint)*pbVar3 << 0x18 | (uint)pbVar3[1] << 0x10 | (uint)pbVar3[3] |\n                         (uint)pbVar3[2] << 8) + 4);\n      param_1[3] = iVar1;\n      if (iVar1 < 1) {\n        param_1[1] = 0;\n        param_1[4] = 0;\n        return 0xffffffff;\n      }\n      if ((undefined4 *)param_1[1] != param_1 + 2) {\n        uVar2 = (*(code *)PTR___assert_fail_000b8b18)\n                          (PTR_DAT_000b8348 + 0x3850,PTR_DAT_000b8348 + 0x3840,0x52,\n                           PTR_DAT_000b8348 + 0x38b0);\n        return uVar2;\n      }\n      puVar4 = (undefined4 *)(*(code *)PTR_safemalloc_000b82f8)(iVar1,1);\n      param_1[1] = puVar4;\n      *puVar4 = param_1[2];\n    }\n    uVar2 = (int)param_1[4] < (int)param_1[3] ^ 1;\n  }" if (parenthesized_expression "(iVar1 < 1)" ( (binary_expression "iVar1 < 1" identifier < number_literal) )) (compound_statement "{\n    if ((undefined4 *)param_1[1] != param_1 + 2) {\n      (*(code *)PTR_safefree_000b82e8)();\n    }\n    param_1[1] = 0;\n    param_1[4] = 0;\n    uVar2 = 1;\n  }" { (if_statement "if ((undefined4 *)param_1[1] != param_1 + 2) {\n      (*(code *)PTR_safefree_000b82e8)();\n    }" if (parenthesized_expression "((undefined4 *)param_1[1] != param_1 + 2)" ( (binary_expression "(undefined4 *)param_1[1] != param_1 + 2" (cast_expression "(undefined4 *)param_1[1]" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "param_1[1]" identifier [ number_literal ])) != (binary_expression "param_1 + 2" identifier + number_literal)) )) (compound_statement "{\n      (*(code *)PTR_safefree_000b82e8)();\n    }" { (expression_statement "(*(code *)PTR_safefree_000b82e8)();" (call_expression "(*(code *)PTR_safefree_000b82e8)()" (parenthesized_expression "(*(code *)PTR_safefree_000b82e8)" ( (pointer_expression "*(code *)PTR_safefree_000b82e8" * (cast_expression "(code *)PTR_safefree_000b82e8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))) ;) })) (expression_statement "param_1[1] = 0;" (assignment_expression "param_1[1] = 0" (subscript_expression "param_1[1]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "param_1[4] = 0;" (assignment_expression "param_1[4] = 0" (subscript_expression "param_1[4]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "uVar2 = 1;" (assignment_expression "uVar2 = 1" identifier = number_literal) ;) }) (else_clause "else {\n    iVar5 = param_1[4];\n    param_1[4] = iVar1 + iVar5;\n    if ((param_1[3] == 4) && (iVar1 + iVar5 == 4)) {\n      pbVar3 = (byte *)param_1[1];\n      iVar1 = (*(code *)PTR_toint_000b83b8)\n                        (((uint)*pbVar3 << 0x18 | (uint)pbVar3[1] << 0x10 | (uint)pbVar3[3] |\n                         (uint)pbVar3[2] << 8) + 4);\n      param_1[3] = iVar1;\n      if (iVar1 < 1) {\n        param_1[1] = 0;\n        param_1[4] = 0;\n        return 0xffffffff;\n      }\n      if ((undefined4 *)param_1[1] != param_1 + 2) {\n        uVar2 = (*(code *)PTR___assert_fail_000b8b18)\n                          (PTR_DAT_000b8348 + 0x3850,PTR_DAT_000b8348 + 0x3840,0x52,\n                           PTR_DAT_000b8348 + 0x38b0);\n        return uVar2;\n      }\n      puVar4 = (undefined4 *)(*(code *)PTR_safemalloc_000b82f8)(iVar1,1);\n      param_1[1] = puVar4;\n      *puVar4 = param_1[2];\n    }\n    uVar2 = (int)param_1[4] < (int)param_1[3] ^ 1;\n  }" else (compound_statement "{\n    iVar5 = param_1[4];\n    param_1[4] = iVar1 + iVar5;\n    if ((param_1[3] == 4) && (iVar1 + iVar5 == 4)) {\n      pbVar3 = (byte *)param_1[1];\n      iVar1 = (*(code *)PTR_toint_000b83b8)\n                        (((uint)*pbVar3 << 0x18 | (uint)pbVar3[1] << 0x10 | (uint)pbVar3[3] |\n                         (uint)pbVar3[2] << 8) + 4);\n      param_1[3] = iVar1;\n      if (iVar1 < 1) {\n        param_1[1] = 0;\n        param_1[4] = 0;\n        return 0xffffffff;\n      }\n      if ((undefined4 *)param_1[1] != param_1 + 2) {\n        uVar2 = (*(code *)PTR___assert_fail_000b8b18)\n                          (PTR_DAT_000b8348 + 0x3850,PTR_DAT_000b8348 + 0x3840,0x52,\n                           PTR_DAT_000b8348 + 0x38b0);\n        return uVar2;\n      }\n      puVar4 = (undefined4 *)(*(code *)PTR_safemalloc_000b82f8)(iVar1,1);\n      param_1[1] = puVar4;\n      *puVar4 = param_1[2];\n    }\n    uVar2 = (int)param_1[4] < (int)param_1[3] ^ 1;\n  }" { (expression_statement "iVar5 = param_1[4];" (assignment_expression "iVar5 = param_1[4]" identifier = (subscript_expression "param_1[4]" identifier [ number_literal ])) ;) (expression_statement "param_1[4] = iVar1 + iVar5;" (assignment_expression "param_1[4] = iVar1 + iVar5" (subscript_expression "param_1[4]" identifier [ number_literal ]) = (binary_expression "iVar1 + iVar5" identifier + identifier)) ;) (if_statement "if ((param_1[3] == 4) && (iVar1 + iVar5 == 4)) {\n      pbVar3 = (byte *)param_1[1];\n      iVar1 = (*(code *)PTR_toint_000b83b8)\n                        (((uint)*pbVar3 << 0x18 | (uint)pbVar3[1] << 0x10 | (uint)pbVar3[3] |\n                         (uint)pbVar3[2] << 8) + 4);\n      param_1[3] = iVar1;\n      if (iVar1 < 1) {\n        param_1[1] = 0;\n        param_1[4] = 0;\n        return 0xffffffff;\n      }\n      if ((undefined4 *)param_1[1] != param_1 + 2) {\n        uVar2 = (*(code *)PTR___assert_fail_000b8b18)\n                          (PTR_DAT_000b8348 + 0x3850,PTR_DAT_000b8348 + 0x3840,0x52,\n                           PTR_DAT_000b8348 + 0x38b0);\n        return uVar2;\n      }\n      puVar4 = (undefined4 *)(*(code *)PTR_safemalloc_000b82f8)(iVar1,1);\n      param_1[1] = puVar4;\n      *puVar4 = param_1[2];\n    }" if (parenthesized_expression "((param_1[3] == 4) && (iVar1 + iVar5 == 4))" ( (binary_expression "(param_1[3] == 4) && (iVar1 + iVar5 == 4)" (parenthesized_expression "(param_1[3] == 4)" ( (binary_expression "param_1[3] == 4" (subscript_expression "param_1[3]" identifier [ number_literal ]) == number_literal) )) && (parenthesized_expression "(iVar1 + iVar5 == 4)" ( (binary_expression "iVar1 + iVar5 == 4" (binary_expression "iVar1 + iVar5" identifier + identifier) == number_literal) ))) )) (compound_statement "{\n      pbVar3 = (byte *)param_1[1];\n      iVar1 = (*(code *)PTR_toint_000b83b8)\n                        (((uint)*pbVar3 << 0x18 | (uint)pbVar3[1] << 0x10 | (uint)pbVar3[3] |\n                         (uint)pbVar3[2] << 8) + 4);\n      param_1[3] = iVar1;\n      if (iVar1 < 1) {\n        param_1[1] = 0;\n        param_1[4] = 0;\n        return 0xffffffff;\n      }\n      if ((undefined4 *)param_1[1] != param_1 + 2) {\n        uVar2 = (*(code *)PTR___assert_fail_000b8b18)\n                          (PTR_DAT_000b8348 + 0x3850,PTR_DAT_000b8348 + 0x3840,0x52,\n                           PTR_DAT_000b8348 + 0x38b0);\n        return uVar2;\n      }\n      puVar4 = (undefined4 *)(*(code *)PTR_safemalloc_000b82f8)(iVar1,1);\n      param_1[1] = puVar4;\n      *puVar4 = param_1[2];\n    }" { (expression_statement "pbVar3 = (byte *)param_1[1];" (assignment_expression "pbVar3 = (byte *)param_1[1]" identifier = (cast_expression "(byte *)param_1[1]" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "param_1[1]" identifier [ number_literal ]))) ;) (expression_statement "iVar1 = (*(code *)PTR_toint_000b83b8)\n                        (((uint)*pbVar3 << 0x18 | (uint)pbVar3[1] << 0x10 | (uint)pbVar3[3] |\n                         (uint)pbVar3[2] << 8) + 4);" (assignment_expression "iVar1 = (*(code *)PTR_toint_000b83b8)\n                        (((uint)*pbVar3 << 0x18 | (uint)pbVar3[1] << 0x10 | (uint)pbVar3[3] |\n                         (uint)pbVar3[2] << 8) + 4)" identifier = (call_expression "(*(code *)PTR_toint_000b83b8)\n                        (((uint)*pbVar3 << 0x18 | (uint)pbVar3[1] << 0x10 | (uint)pbVar3[3] |\n                         (uint)pbVar3[2] << 8) + 4)" (parenthesized_expression "(*(code *)PTR_toint_000b83b8)" ( (pointer_expression "*(code *)PTR_toint_000b83b8" * (cast_expression "(code *)PTR_toint_000b83b8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(((uint)*pbVar3 << 0x18 | (uint)pbVar3[1] << 0x10 | (uint)pbVar3[3] |\n                         (uint)pbVar3[2] << 8) + 4)" ( (binary_expression "((uint)*pbVar3 << 0x18 | (uint)pbVar3[1] << 0x10 | (uint)pbVar3[3] |\n                         (uint)pbVar3[2] << 8) + 4" (parenthesized_expression "((uint)*pbVar3 << 0x18 | (uint)pbVar3[1] << 0x10 | (uint)pbVar3[3] |\n                         (uint)pbVar3[2] << 8)" ( (binary_expression "(uint)*pbVar3 << 0x18 | (uint)pbVar3[1] << 0x10 | (uint)pbVar3[3] |\n                         (uint)pbVar3[2] << 8" (binary_expression "(uint)*pbVar3 << 0x18 | (uint)pbVar3[1] << 0x10 | (uint)pbVar3[3]" (binary_expression "(uint)*pbVar3 << 0x18 | (uint)pbVar3[1] << 0x10" (binary_expression "(uint)*pbVar3 << 0x18" (binary_expression "(uint)*pbVar3" (parenthesized_expression "(uint)" ( identifier )) * identifier) << number_literal) | (binary_expression "(uint)pbVar3[1] << 0x10" (cast_expression "(uint)pbVar3[1]" ( (type_descriptor "uint" type_identifier) ) (subscript_expression "pbVar3[1]" identifier [ number_literal ])) << number_literal)) | (cast_expression "(uint)pbVar3[3]" ( (type_descriptor "uint" type_identifier) ) (subscript_expression "pbVar3[3]" identifier [ number_literal ]))) | (binary_expression "(uint)pbVar3[2] << 8" (cast_expression "(uint)pbVar3[2]" ( (type_descriptor "uint" type_identifier) ) (subscript_expression "pbVar3[2]" identifier [ number_literal ])) << number_literal)) )) + number_literal) )))) ;) (expression_statement "param_1[3] = iVar1;" (assignment_expression "param_1[3] = iVar1" (subscript_expression "param_1[3]" identifier [ number_literal ]) = identifier) ;) (if_statement "if (iVar1 < 1) {\n        param_1[1] = 0;\n        param_1[4] = 0;\n        return 0xffffffff;\n      }" if (parenthesized_expression "(iVar1 < 1)" ( (binary_expression "iVar1 < 1" identifier < number_literal) )) (compound_statement "{\n        param_1[1] = 0;\n        param_1[4] = 0;\n        return 0xffffffff;\n      }" { (expression_statement "param_1[1] = 0;" (assignment_expression "param_1[1] = 0" (subscript_expression "param_1[1]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "param_1[4] = 0;" (assignment_expression "param_1[4] = 0" (subscript_expression "param_1[4]" identifier [ number_literal ]) = number_literal) ;) (return_statement "return 0xffffffff;" return number_literal ;) })) (if_statement "if ((undefined4 *)param_1[1] != param_1 + 2) {\n        uVar2 = (*(code *)PTR___assert_fail_000b8b18)\n                          (PTR_DAT_000b8348 + 0x3850,PTR_DAT_000b8348 + 0x3840,0x52,\n                           PTR_DAT_000b8348 + 0x38b0);\n        return uVar2;\n      }" if (parenthesized_expression "((undefined4 *)param_1[1] != param_1 + 2)" ( (binary_expression "(undefined4 *)param_1[1] != param_1 + 2" (cast_expression "(undefined4 *)param_1[1]" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "param_1[1]" identifier [ number_literal ])) != (binary_expression "param_1 + 2" identifier + number_literal)) )) (compound_statement "{\n        uVar2 = (*(code *)PTR___assert_fail_000b8b18)\n                          (PTR_DAT_000b8348 + 0x3850,PTR_DAT_000b8348 + 0x3840,0x52,\n                           PTR_DAT_000b8348 + 0x38b0);\n        return uVar2;\n      }" { (expression_statement "uVar2 = (*(code *)PTR___assert_fail_000b8b18)\n                          (PTR_DAT_000b8348 + 0x3850,PTR_DAT_000b8348 + 0x3840,0x52,\n                           PTR_DAT_000b8348 + 0x38b0);" (assignment_expression "uVar2 = (*(code *)PTR___assert_fail_000b8b18)\n                          (PTR_DAT_000b8348 + 0x3850,PTR_DAT_000b8348 + 0x3840,0x52,\n                           PTR_DAT_000b8348 + 0x38b0)" identifier = (call_expression "(*(code *)PTR___assert_fail_000b8b18)\n                          (PTR_DAT_000b8348 + 0x3850,PTR_DAT_000b8348 + 0x3840,0x52,\n                           PTR_DAT_000b8348 + 0x38b0)" (parenthesized_expression "(*(code *)PTR___assert_fail_000b8b18)" ( (pointer_expression "*(code *)PTR___assert_fail_000b8b18" * (cast_expression "(code *)PTR___assert_fail_000b8b18" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(PTR_DAT_000b8348 + 0x3850,PTR_DAT_000b8348 + 0x3840,0x52,\n                           PTR_DAT_000b8348 + 0x38b0)" ( (binary_expression "PTR_DAT_000b8348 + 0x3850" identifier + number_literal) , (binary_expression "PTR_DAT_000b8348 + 0x3840" identifier + number_literal) , number_literal , (binary_expression "PTR_DAT_000b8348 + 0x38b0" identifier + number_literal) )))) ;) (return_statement "return uVar2;" return identifier ;) })) (expression_statement "puVar4 = (undefined4 *)(*(code *)PTR_safemalloc_000b82f8)(iVar1,1);" (assignment_expression "puVar4 = (undefined4 *)(*(code *)PTR_safemalloc_000b82f8)(iVar1,1)" identifier = (cast_expression "(undefined4 *)(*(code *)PTR_safemalloc_000b82f8)(iVar1,1)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR_safemalloc_000b82f8)(iVar1,1)" (parenthesized_expression "(*(code *)PTR_safemalloc_000b82f8)" ( (pointer_expression "*(code *)PTR_safemalloc_000b82f8" * (cast_expression "(code *)PTR_safemalloc_000b82f8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar1,1)" ( identifier , number_literal ))))) ;) (expression_statement "param_1[1] = puVar4;" (assignment_expression "param_1[1] = puVar4" (subscript_expression "param_1[1]" identifier [ number_literal ]) = identifier) ;) (expression_statement "*puVar4 = param_1[2];" (assignment_expression "*puVar4 = param_1[2]" (pointer_expression "*puVar4" * identifier) = (subscript_expression "param_1[2]" identifier [ number_literal ])) ;) })) (expression_statement "uVar2 = (int)param_1[4] < (int)param_1[3] ^ 1;" (assignment_expression "uVar2 = (int)param_1[4] < (int)param_1[3] ^ 1" identifier = (binary_expression "(int)param_1[4] < (int)param_1[3] ^ 1" (binary_expression "(int)param_1[4] < (int)param_1[3]" (cast_expression "(int)param_1[4]" ( (type_descriptor "int" primitive_type) ) (subscript_expression "param_1[4]" identifier [ number_literal ])) < (cast_expression "(int)param_1[3]" ( (type_descriptor "int" primitive_type) ) (subscript_expression "param_1[3]" identifier [ number_literal ]))) ^ number_literal)) ;) }))) (return_statement "return uVar2;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( (pointer_expression * IDENT) , (binary_expression (subscript_expression IDENT [ LIT ]) + (subscript_expression IDENT [ LIT ])) , (binary_expression (subscript_expression IDENT [ LIT ]) - (subscript_expression IDENT [ LIT ])) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (subscript_expression IDENT [ LIT ])) != (binary_expression IDENT + LIT)) )) (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 (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (binary_expression IDENT + IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) == LIT) )) && (parenthesized_expression ( (binary_expression (binary_expression IDENT + IDENT) == LIT) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (subscript_expression IDENT [ LIT ]))) ;) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( (binary_expression (parenthesized_expression ( (binary_expression (binary_expression (binary_expression (binary_expression (binary_expression (parenthesized_expression ( IDENT )) * IDENT) << LIT) | (binary_expression (cast_expression ( (type_descriptor TYPE) ) (subscript_expression IDENT [ LIT ])) << LIT)) | (cast_expression ( (type_descriptor TYPE) ) (subscript_expression IDENT [ LIT ]))) | (binary_expression (cast_expression ( (type_descriptor TYPE) ) (subscript_expression IDENT [ LIT ])) << LIT)) )) + LIT) )))) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (return_statement return LIT ;) })) (if_statement if (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (subscript_expression IDENT [ LIT ])) != (binary_expression IDENT + LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( (binary_expression IDENT + LIT) , (binary_expression IDENT + LIT) , LIT , (binary_expression IDENT + LIT) )))) ;) (return_statement return IDENT ;) })) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT , LIT ))))) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (subscript_expression IDENT [ LIT ])) ;) })) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression (cast_expression ( (type_descriptor TYPE) ) (subscript_expression IDENT [ LIT ])) < (cast_expression ( (type_descriptor TYPE) ) (subscript_expression IDENT [ LIT ]))) ^ LIT)) ;) }))) (return_statement return IDENT ;) })))
(function_definition "uint FUN_00081548(undefined4 *param_1)\n\n{\n  int iVar1;\n  uint uVar2;\n  byte *pbVar3;\n  undefined4 *puVar4;\n  int iVar5;\n  \n  iVar1 = (*(code *)PTR_read_000b8d18)(*param_1,param_1[1] + param_1[4],param_1[3] - param_1[4]);\n  if (iVar1 < 1) {\n    if ((undefined4 *)param_1[1] != param_1 + 2) {\n      (*(code *)PTR_safefree_000b82e8)();\n    }\n    param_1[1] = 0;\n    param_1[4] = 0;\n    uVar2 = 1;\n  }\n  else {\n    iVar5 = param_1[4];\n    param_1[4] = iVar1 + iVar5;\n    if ((param_1[3] == 4) && (iVar1 + iVar5 == 4)) {\n      pbVar3 = (byte *)param_1[1];\n      iVar1 = (*(code *)PTR_toint_000b83b8)\n                        (((uint)*pbVar3 << 0x18 | (uint)pbVar3[1] << 0x10 | (uint)pbVar3[3] |\n                         (uint)pbVar3[2] << 8) + 4);\n      param_1[3] = iVar1;\n      if (iVar1 < 1) {\n        param_1[1] = 0;\n        param_1[4] = 0;\n        return 0xffffffff;\n      }\n      if ((undefined4 *)param_1[1] != param_1 + 2) {\n        uVar2 = (*(code *)PTR___assert_fail_000b8b18)\n                          (PTR_DAT_000b8348 + 0x3850,PTR_DAT_000b8348 + 0x3840,0x52,\n                           PTR_DAT_000b8348 + 0x38b0);\n        return uVar2;\n      }\n      puVar4 = (undefined4 *)(*(code *)PTR_safemalloc_000b82f8)(iVar1,1);\n      param_1[1] = puVar4;\n      *puVar4 = param_1[2];\n    }\n    uVar2 = (int)param_1[4] < (int)param_1[3] ^ 1;\n  }\n  return uVar2;\n}" (type_identifier "uint") (function_declarator "FUN_00081548(undefined4 *param_1)" (identifier "FUN_00081548") (parameter_list "(undefined4 *param_1)" (( "(") (parameter_declaration "undefined4 *param_1" (type_identifier "undefined4") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) () ")"))) (compound_statement "{\n  int iVar1;\n  uint uVar2;\n  byte *pbVar3;\n  undefined4 *puVar4;\n  int iVar5;\n  \n  iVar1 = (*(code *)PTR_read_000b8d18)(*param_1,param_1[1] + param_1[4],param_1[3] - param_1[4]);\n  if (iVar1 < 1) {\n    if ((undefined4 *)param_1[1] != param_1 + 2) {\n      (*(code *)PTR_safefree_000b82e8)();\n    }\n    param_1[1] = 0;\n    param_1[4] = 0;\n    uVar2 = 1;\n  }\n  else {\n    iVar5 = param_1[4];\n    param_1[4] = iVar1 + iVar5;\n    if ((param_1[3] == 4) && (iVar1 + iVar5 == 4)) {\n      pbVar3 = (byte *)param_1[1];\n      iVar1 = (*(code *)PTR_toint_000b83b8)\n                        (((uint)*pbVar3 << 0x18 | (uint)pbVar3[1] << 0x10 | (uint)pbVar3[3] |\n                         (uint)pbVar3[2] << 8) + 4);\n      param_1[3] = iVar1;\n      if (iVar1 < 1) {\n        param_1[1] = 0;\n        param_1[4] = 0;\n        return 0xffffffff;\n      }\n      if ((undefined4 *)param_1[1] != param_1 + 2) {\n        uVar2 = (*(code *)PTR___assert_fail_000b8b18)\n                          (PTR_DAT_000b8348 + 0x3850,PTR_DAT_000b8348 + 0x3840,0x52,\n                           PTR_DAT_000b8348 + 0x38b0);\n        return uVar2;\n      }\n      puVar4 = (undefined4 *)(*(code *)PTR_safemalloc_000b82f8)(iVar1,1);\n      param_1[1] = puVar4;\n      *puVar4 = param_1[2];\n    }\n    uVar2 = (int)param_1[4] < (int)param_1[3] ^ 1;\n  }\n  return uVar2;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "uint uVar2;" (type_identifier "uint") (identifier "uVar2") (; ";")) (declaration "byte *pbVar3;" (type_identifier "byte") (pointer_declarator "*pbVar3" (* "*") (identifier "pbVar3")) (; ";")) (declaration "undefined4 *puVar4;" (type_identifier "undefined4") (pointer_declarator "*puVar4" (* "*") (identifier "puVar4")) (; ";")) (declaration "int iVar5;" (primitive_type "int") (identifier "iVar5") (; ";")) (expression_statement "iVar1 = (*(code *)PTR_read_000b8d18)(*param_1,param_1[1] + param_1[4],param_1[3] - param_1[4]);" (assignment_expression "iVar1 = (*(code *)PTR_read_000b8d18)(*param_1,param_1[1] + param_1[4],param_1[3] - param_1[4])" (identifier "iVar1") (= "=") (call_expression "(*(code *)PTR_read_000b8d18)(*param_1,param_1[1] + param_1[4],param_1[3] - param_1[4])" (parenthesized_expression "(*(code *)PTR_read_000b8d18)" (( "(") (pointer_expression "*(code *)PTR_read_000b8d18" (* "*") (cast_expression "(code *)PTR_read_000b8d18" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_read_000b8d18"))) () ")")) (argument_list "(*param_1,param_1[1] + param_1[4],param_1[3] - param_1[4])" (( "(") (pointer_expression "*param_1" (* "*") (identifier "param_1")) (, ",") (binary_expression "param_1[1] + param_1[4]" (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]")) (+ "+") (subscript_expression "param_1[4]" (identifier "param_1") ([ "[") (number_literal "4") (] "]"))) (, ",") (binary_expression "param_1[3] - param_1[4]" (subscript_expression "param_1[3]" (identifier "param_1") ([ "[") (number_literal "3") (] "]")) (- "-") (subscript_expression "param_1[4]" (identifier "param_1") ([ "[") (number_literal "4") (] "]"))) () ")")))) (; ";")) (if_statement "if (iVar1 < 1) {\n    if ((undefined4 *)param_1[1] != param_1 + 2) {\n      (*(code *)PTR_safefree_000b82e8)();\n    }\n    param_1[1] = 0;\n    param_1[4] = 0;\n    uVar2 = 1;\n  }\n  else {\n    iVar5 = param_1[4];\n    param_1[4] = iVar1 + iVar5;\n    if ((param_1[3] == 4) && (iVar1 + iVar5 == 4)) {\n      pbVar3 = (byte *)param_1[1];\n      iVar1 = (*(code *)PTR_toint_000b83b8)\n                        (((uint)*pbVar3 << 0x18 | (uint)pbVar3[1] << 0x10 | (uint)pbVar3[3] |\n                         (uint)pbVar3[2] << 8) + 4);\n      param_1[3] = iVar1;\n      if (iVar1 < 1) {\n        param_1[1] = 0;\n        param_1[4] = 0;\n        return 0xffffffff;\n      }\n      if ((undefined4 *)param_1[1] != param_1 + 2) {\n        uVar2 = (*(code *)PTR___assert_fail_000b8b18)\n                          (PTR_DAT_000b8348 + 0x3850,PTR_DAT_000b8348 + 0x3840,0x52,\n                           PTR_DAT_000b8348 + 0x38b0);\n        return uVar2;\n      }\n      puVar4 = (undefined4 *)(*(code *)PTR_safemalloc_000b82f8)(iVar1,1);\n      param_1[1] = puVar4;\n      *puVar4 = param_1[2];\n    }\n    uVar2 = (int)param_1[4] < (int)param_1[3] ^ 1;\n  }" (if "if") (parenthesized_expression "(iVar1 < 1)" (( "(") (binary_expression "iVar1 < 1" (identifier "iVar1") (< "<") (number_literal "1")) () ")")) (compound_statement "{\n    if ((undefined4 *)param_1[1] != param_1 + 2) {\n      (*(code *)PTR_safefree_000b82e8)();\n    }\n    param_1[1] = 0;\n    param_1[4] = 0;\n    uVar2 = 1;\n  }" ({ "{") (if_statement "if ((undefined4 *)param_1[1] != param_1 + 2) {\n      (*(code *)PTR_safefree_000b82e8)();\n    }" (if "if") (parenthesized_expression "((undefined4 *)param_1[1] != param_1 + 2)" (( "(") (binary_expression "(undefined4 *)param_1[1] != param_1 + 2" (cast_expression "(undefined4 *)param_1[1]" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]"))) (!= "!=") (binary_expression "param_1 + 2" (identifier "param_1") (+ "+") (number_literal "2"))) () ")")) (compound_statement "{\n      (*(code *)PTR_safefree_000b82e8)();\n    }" ({ "{") (expression_statement "(*(code *)PTR_safefree_000b82e8)();" (call_expression "(*(code *)PTR_safefree_000b82e8)()" (parenthesized_expression "(*(code *)PTR_safefree_000b82e8)" (( "(") (pointer_expression "*(code *)PTR_safefree_000b82e8" (* "*") (cast_expression "(code *)PTR_safefree_000b82e8" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_safefree_000b82e8"))) () ")")) (argument_list "()" (( "(") () ")"))) (; ";")) (} "}"))) (expression_statement "param_1[1] = 0;" (assignment_expression "param_1[1] = 0" (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "param_1[4] = 0;" (assignment_expression "param_1[4] = 0" (subscript_expression "param_1[4]" (identifier "param_1") ([ "[") (number_literal "4") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "uVar2 = 1;" (assignment_expression "uVar2 = 1" (identifier "uVar2") (= "=") (number_literal "1")) (; ";")) (} "}")) (else_clause "else {\n    iVar5 = param_1[4];\n    param_1[4] = iVar1 + iVar5;\n    if ((param_1[3] == 4) && (iVar1 + iVar5 == 4)) {\n      pbVar3 = (byte *)param_1[1];\n      iVar1 = (*(code *)PTR_toint_000b83b8)\n                        (((uint)*pbVar3 << 0x18 | (uint)pbVar3[1] << 0x10 | (uint)pbVar3[3] |\n                         (uint)pbVar3[2] << 8) + 4);\n      param_1[3] = iVar1;\n      if (iVar1 < 1) {\n        param_1[1] = 0;\n        param_1[4] = 0;\n        return 0xffffffff;\n      }\n      if ((undefined4 *)param_1[1] != param_1 + 2) {\n        uVar2 = (*(code *)PTR___assert_fail_000b8b18)\n                          (PTR_DAT_000b8348 + 0x3850,PTR_DAT_000b8348 + 0x3840,0x52,\n                           PTR_DAT_000b8348 + 0x38b0);\n        return uVar2;\n      }\n      puVar4 = (undefined4 *)(*(code *)PTR_safemalloc_000b82f8)(iVar1,1);\n      param_1[1] = puVar4;\n      *puVar4 = param_1[2];\n    }\n    uVar2 = (int)param_1[4] < (int)param_1[3] ^ 1;\n  }" (else "else") (compound_statement "{\n    iVar5 = param_1[4];\n    param_1[4] = iVar1 + iVar5;\n    if ((param_1[3] == 4) && (iVar1 + iVar5 == 4)) {\n      pbVar3 = (byte *)param_1[1];\n      iVar1 = (*(code *)PTR_toint_000b83b8)\n                        (((uint)*pbVar3 << 0x18 | (uint)pbVar3[1] << 0x10 | (uint)pbVar3[3] |\n                         (uint)pbVar3[2] << 8) + 4);\n      param_1[3] = iVar1;\n      if (iVar1 < 1) {\n        param_1[1] = 0;\n        param_1[4] = 0;\n        return 0xffffffff;\n      }\n      if ((undefined4 *)param_1[1] != param_1 + 2) {\n        uVar2 = (*(code *)PTR___assert_fail_000b8b18)\n                          (PTR_DAT_000b8348 + 0x3850,PTR_DAT_000b8348 + 0x3840,0x52,\n                           PTR_DAT_000b8348 + 0x38b0);\n        return uVar2;\n      }\n      puVar4 = (undefined4 *)(*(code *)PTR_safemalloc_000b82f8)(iVar1,1);\n      param_1[1] = puVar4;\n      *puVar4 = param_1[2];\n    }\n    uVar2 = (int)param_1[4] < (int)param_1[3] ^ 1;\n  }" ({ "{") (expression_statement "iVar5 = param_1[4];" (assignment_expression "iVar5 = param_1[4]" (identifier "iVar5") (= "=") (subscript_expression "param_1[4]" (identifier "param_1") ([ "[") (number_literal "4") (] "]"))) (; ";")) (expression_statement "param_1[4] = iVar1 + iVar5;" (assignment_expression "param_1[4] = iVar1 + iVar5" (subscript_expression "param_1[4]" (identifier "param_1") ([ "[") (number_literal "4") (] "]")) (= "=") (binary_expression "iVar1 + iVar5" (identifier "iVar1") (+ "+") (identifier "iVar5"))) (; ";")) (if_statement "if ((param_1[3] == 4) && (iVar1 + iVar5 == 4)) {\n      pbVar3 = (byte *)param_1[1];\n      iVar1 = (*(code *)PTR_toint_000b83b8)\n                        (((uint)*pbVar3 << 0x18 | (uint)pbVar3[1] << 0x10 | (uint)pbVar3[3] |\n                         (uint)pbVar3[2] << 8) + 4);\n      param_1[3] = iVar1;\n      if (iVar1 < 1) {\n        param_1[1] = 0;\n        param_1[4] = 0;\n        return 0xffffffff;\n      }\n      if ((undefined4 *)param_1[1] != param_1 + 2) {\n        uVar2 = (*(code *)PTR___assert_fail_000b8b18)\n                          (PTR_DAT_000b8348 + 0x3850,PTR_DAT_000b8348 + 0x3840,0x52,\n                           PTR_DAT_000b8348 + 0x38b0);\n        return uVar2;\n      }\n      puVar4 = (undefined4 *)(*(code *)PTR_safemalloc_000b82f8)(iVar1,1);\n      param_1[1] = puVar4;\n      *puVar4 = param_1[2];\n    }" (if "if") (parenthesized_expression "((param_1[3] == 4) && (iVar1 + iVar5 == 4))" (( "(") (binary_expression "(param_1[3] == 4) && (iVar1 + iVar5 == 4)" (parenthesized_expression "(param_1[3] == 4)" (( "(") (binary_expression "param_1[3] == 4" (subscript_expression "param_1[3]" (identifier "param_1") ([ "[") (number_literal "3") (] "]")) (== "==") (number_literal "4")) () ")")) (&& "&&") (parenthesized_expression "(iVar1 + iVar5 == 4)" (( "(") (binary_expression "iVar1 + iVar5 == 4" (binary_expression "iVar1 + iVar5" (identifier "iVar1") (+ "+") (identifier "iVar5")) (== "==") (number_literal "4")) () ")"))) () ")")) (compound_statement "{\n      pbVar3 = (byte *)param_1[1];\n      iVar1 = (*(code *)PTR_toint_000b83b8)\n                        (((uint)*pbVar3 << 0x18 | (uint)pbVar3[1] << 0x10 | (uint)pbVar3[3] |\n                         (uint)pbVar3[2] << 8) + 4);\n      param_1[3] = iVar1;\n      if (iVar1 < 1) {\n        param_1[1] = 0;\n        param_1[4] = 0;\n        return 0xffffffff;\n      }\n      if ((undefined4 *)param_1[1] != param_1 + 2) {\n        uVar2 = (*(code *)PTR___assert_fail_000b8b18)\n                          (PTR_DAT_000b8348 + 0x3850,PTR_DAT_000b8348 + 0x3840,0x52,\n                           PTR_DAT_000b8348 + 0x38b0);\n        return uVar2;\n      }\n      puVar4 = (undefined4 *)(*(code *)PTR_safemalloc_000b82f8)(iVar1,1);\n      param_1[1] = puVar4;\n      *puVar4 = param_1[2];\n    }" ({ "{") (expression_statement "pbVar3 = (byte *)param_1[1];" (assignment_expression "pbVar3 = (byte *)param_1[1]" (identifier "pbVar3") (= "=") (cast_expression "(byte *)param_1[1]" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]")))) (; ";")) (expression_statement "iVar1 = (*(code *)PTR_toint_000b83b8)\n                        (((uint)*pbVar3 << 0x18 | (uint)pbVar3[1] << 0x10 | (uint)pbVar3[3] |\n                         (uint)pbVar3[2] << 8) + 4);" (assignment_expression "iVar1 = (*(code *)PTR_toint_000b83b8)\n                        (((uint)*pbVar3 << 0x18 | (uint)pbVar3[1] << 0x10 | (uint)pbVar3[3] |\n                         (uint)pbVar3[2] << 8) + 4)" (identifier "iVar1") (= "=") (call_expression "(*(code *)PTR_toint_000b83b8)\n                        (((uint)*pbVar3 << 0x18 | (uint)pbVar3[1] << 0x10 | (uint)pbVar3[3] |\n                         (uint)pbVar3[2] << 8) + 4)" (parenthesized_expression "(*(code *)PTR_toint_000b83b8)" (( "(") (pointer_expression "*(code *)PTR_toint_000b83b8" (* "*") (cast_expression "(code *)PTR_toint_000b83b8" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_toint_000b83b8"))) () ")")) (argument_list "(((uint)*pbVar3 << 0x18 | (uint)pbVar3[1] << 0x10 | (uint)pbVar3[3] |\n                         (uint)pbVar3[2] << 8) + 4)" (( "(") (binary_expression "((uint)*pbVar3 << 0x18 | (uint)pbVar3[1] << 0x10 | (uint)pbVar3[3] |\n                         (uint)pbVar3[2] << 8) + 4" (parenthesized_expression "((uint)*pbVar3 << 0x18 | (uint)pbVar3[1] << 0x10 | (uint)pbVar3[3] |\n                         (uint)pbVar3[2] << 8)" (( "(") (binary_expression "(uint)*pbVar3 << 0x18 | (uint)pbVar3[1] << 0x10 | (uint)pbVar3[3] |\n                         (uint)pbVar3[2] << 8" (binary_expression "(uint)*pbVar3 << 0x18 | (uint)pbVar3[1] << 0x10 | (uint)pbVar3[3]" (binary_expression "(uint)*pbVar3 << 0x18 | (uint)pbVar3[1] << 0x10" (binary_expression "(uint)*pbVar3 << 0x18" (binary_expression "(uint)*pbVar3" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (* "*") (identifier "pbVar3")) (<< "<<") (number_literal "0x18")) (| "|") (binary_expression "(uint)pbVar3[1] << 0x10" (cast_expression "(uint)pbVar3[1]" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (subscript_expression "pbVar3[1]" (identifier "pbVar3") ([ "[") (number_literal "1") (] "]"))) (<< "<<") (number_literal "0x10"))) (| "|") (cast_expression "(uint)pbVar3[3]" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (subscript_expression "pbVar3[3]" (identifier "pbVar3") ([ "[") (number_literal "3") (] "]")))) (| "|") (binary_expression "(uint)pbVar3[2] << 8" (cast_expression "(uint)pbVar3[2]" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (subscript_expression "pbVar3[2]" (identifier "pbVar3") ([ "[") (number_literal "2") (] "]"))) (<< "<<") (number_literal "8"))) () ")")) (+ "+") (number_literal "4")) () ")")))) (; ";")) (expression_statement "param_1[3] = iVar1;" (assignment_expression "param_1[3] = iVar1" (subscript_expression "param_1[3]" (identifier "param_1") ([ "[") (number_literal "3") (] "]")) (= "=") (identifier "iVar1")) (; ";")) (if_statement "if (iVar1 < 1) {\n        param_1[1] = 0;\n        param_1[4] = 0;\n        return 0xffffffff;\n      }" (if "if") (parenthesized_expression "(iVar1 < 1)" (( "(") (binary_expression "iVar1 < 1" (identifier "iVar1") (< "<") (number_literal "1")) () ")")) (compound_statement "{\n        param_1[1] = 0;\n        param_1[4] = 0;\n        return 0xffffffff;\n      }" ({ "{") (expression_statement "param_1[1] = 0;" (assignment_expression "param_1[1] = 0" (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "param_1[4] = 0;" (assignment_expression "param_1[4] = 0" (subscript_expression "param_1[4]" (identifier "param_1") ([ "[") (number_literal "4") (] "]")) (= "=") (number_literal "0")) (; ";")) (return_statement "return 0xffffffff;" (return "return") (number_literal "0xffffffff") (; ";")) (} "}"))) (if_statement "if ((undefined4 *)param_1[1] != param_1 + 2) {\n        uVar2 = (*(code *)PTR___assert_fail_000b8b18)\n                          (PTR_DAT_000b8348 + 0x3850,PTR_DAT_000b8348 + 0x3840,0x52,\n                           PTR_DAT_000b8348 + 0x38b0);\n        return uVar2;\n      }" (if "if") (parenthesized_expression "((undefined4 *)param_1[1] != param_1 + 2)" (( "(") (binary_expression "(undefined4 *)param_1[1] != param_1 + 2" (cast_expression "(undefined4 *)param_1[1]" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]"))) (!= "!=") (binary_expression "param_1 + 2" (identifier "param_1") (+ "+") (number_literal "2"))) () ")")) (compound_statement "{\n        uVar2 = (*(code *)PTR___assert_fail_000b8b18)\n                          (PTR_DAT_000b8348 + 0x3850,PTR_DAT_000b8348 + 0x3840,0x52,\n                           PTR_DAT_000b8348 + 0x38b0);\n        return uVar2;\n      }" ({ "{") (expression_statement "uVar2 = (*(code *)PTR___assert_fail_000b8b18)\n                          (PTR_DAT_000b8348 + 0x3850,PTR_DAT_000b8348 + 0x3840,0x52,\n                           PTR_DAT_000b8348 + 0x38b0);" (assignment_expression "uVar2 = (*(code *)PTR___assert_fail_000b8b18)\n                          (PTR_DAT_000b8348 + 0x3850,PTR_DAT_000b8348 + 0x3840,0x52,\n                           PTR_DAT_000b8348 + 0x38b0)" (identifier "uVar2") (= "=") (call_expression "(*(code *)PTR___assert_fail_000b8b18)\n                          (PTR_DAT_000b8348 + 0x3850,PTR_DAT_000b8348 + 0x3840,0x52,\n                           PTR_DAT_000b8348 + 0x38b0)" (parenthesized_expression "(*(code *)PTR___assert_fail_000b8b18)" (( "(") (pointer_expression "*(code *)PTR___assert_fail_000b8b18" (* "*") (cast_expression "(code *)PTR___assert_fail_000b8b18" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR___assert_fail_000b8b18"))) () ")")) (argument_list "(PTR_DAT_000b8348 + 0x3850,PTR_DAT_000b8348 + 0x3840,0x52,\n                           PTR_DAT_000b8348 + 0x38b0)" (( "(") (binary_expression "PTR_DAT_000b8348 + 0x3850" (identifier "PTR_DAT_000b8348") (+ "+") (number_literal "0x3850")) (, ",") (binary_expression "PTR_DAT_000b8348 + 0x3840" (identifier "PTR_DAT_000b8348") (+ "+") (number_literal "0x3840")) (, ",") (number_literal "0x52") (, ",") (binary_expression "PTR_DAT_000b8348 + 0x38b0" (identifier "PTR_DAT_000b8348") (+ "+") (number_literal "0x38b0")) () ")")))) (; ";")) (return_statement "return uVar2;" (return "return") (identifier "uVar2") (; ";")) (} "}"))) (expression_statement "puVar4 = (undefined4 *)(*(code *)PTR_safemalloc_000b82f8)(iVar1,1);" (assignment_expression "puVar4 = (undefined4 *)(*(code *)PTR_safemalloc_000b82f8)(iVar1,1)" (identifier "puVar4") (= "=") (cast_expression "(undefined4 *)(*(code *)PTR_safemalloc_000b82f8)(iVar1,1)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "(*(code *)PTR_safemalloc_000b82f8)(iVar1,1)" (parenthesized_expression "(*(code *)PTR_safemalloc_000b82f8)" (( "(") (pointer_expression "*(code *)PTR_safemalloc_000b82f8" (* "*") (cast_expression "(code *)PTR_safemalloc_000b82f8" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_safemalloc_000b82f8"))) () ")")) (argument_list "(iVar1,1)" (( "(") (identifier "iVar1") (, ",") (number_literal "1") () ")"))))) (; ";")) (expression_statement "param_1[1] = puVar4;" (assignment_expression "param_1[1] = puVar4" (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]")) (= "=") (identifier "puVar4")) (; ";")) (expression_statement "*puVar4 = param_1[2];" (assignment_expression "*puVar4 = param_1[2]" (pointer_expression "*puVar4" (* "*") (identifier "puVar4")) (= "=") (subscript_expression "param_1[2]" (identifier "param_1") ([ "[") (number_literal "2") (] "]"))) (; ";")) (} "}"))) (expression_statement "uVar2 = (int)param_1[4] < (int)param_1[3] ^ 1;" (assignment_expression "uVar2 = (int)param_1[4] < (int)param_1[3] ^ 1" (identifier "uVar2") (= "=") (binary_expression "(int)param_1[4] < (int)param_1[3] ^ 1" (binary_expression "(int)param_1[4] < (int)param_1[3]" (cast_expression "(int)param_1[4]" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (subscript_expression "param_1[4]" (identifier "param_1") ([ "[") (number_literal "4") (] "]"))) (< "<") (cast_expression "(int)param_1[3]" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (subscript_expression "param_1[3]" (identifier "param_1") ([ "[") (number_literal "3") (] "]")))) (^ "^") (number_literal "1"))) (; ";")) (} "}")))) (return_statement "return uVar2;" (return "return") (identifier "uVar2") (; ";")) (} "}")))

int function_1(type_1 *conn)

{
  int var_1;
  type_2 uVar2;
  type_3 *var_2;
  char *pcVar4;
  
  var_1 = (*(type_4 *)PTR_read_000b8d18)
                    (conn->fd,conn->retbuf + conn->retlen,conn->retsize - conn->retlen);
  if (var_1 < 1) {
    if (conn->retbuf != conn->sizebuf) {
      (*(type_4 *)PTR_safefree_000b82e8)();
    }
    conn->retbuf = (char *)0x0;
    conn->retlen = 0;
    uVar2 = 1;
  }
  else {
    var_1 = var_1 + conn->retlen;
    conn->retlen = var_1;
    if ((conn->retsize == 4) && (var_1 == 4)) {
      var_2 = (type_3 *)conn->retbuf;
      var_1 = (*(type_4 *)PTR_toint_000b83b8)
                        (((type_2)*var_2 << 0x18 | (type_2)var_2[1] << 0x10 | (type_2)var_2[3] |
                         (type_2)var_2[2] << 8) + 4);
      conn->retsize = var_1;
      if (var_1 < 1) {
        conn->retbuf = (char *)0x0;
        conn->retlen = 0;
        return -1;
      }
      if (conn->retbuf != conn->sizebuf) {
        var_1 = (*(type_4 *)PTR___assert_fail_000b8b18)
                          (var_3 + 0x3850,var_3 + 0x3840,
                           0x52,var_3 + 0x38b0);
        return var_1;
      }
      pcVar4 = (char *)(*(type_4 *)PTR_safemalloc_000b82f8)(var_1,1);
      conn->retbuf = pcVar4;
      *(type_5 *)pcVar4 = *(type_5 *)conn->sizebuf;
    }
    uVar2 = conn->retlen < conn->retsize ^ 1;
  }
  return uVar2;
}


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

uint MASKED(undefined4 *param_1)

{
  int iVar1;
  uint uVar2;
  byte *pbVar3;
  undefined4 *puVar4;
  int iVar5;
  
  iVar1 = (*(code *)PTR_read_000b8d18)(*param_1,param_1[1] + param_1[4],param_1[3] - param_1[4]);
  if (iVar1 < 1) {
    if ((undefined4 *)param_1[1] != param_1 + 2) {
      (*(code *)PTR_safefree_000b82e8)();
    }
    param_1[1] = 0;
    param_1[4] = 0;
    uVar2 = 1;
  }
  else {
    iVar5 = param_1[4];
    param_1[4] = iVar1 + iVar5;
    if ((param_1[3] == 4) && (iVar1 + iVar5 == 4)) {
      pbVar3 = (byte *)param_1[1];
      iVar1 = (*(code *)PTR_toint_000b83b8)
                        (((uint)*pbVar3 << 0x18 | (uint)pbVar3[1] << 0x10 | (uint)pbVar3[3] |
                         (uint)pbVar3[2] << 8) + 4);
      param_1[3] = iVar1;
      if (iVar1 < 1) {
        param_1[1] = 0;
        param_1[4] = 0;
        return 0xffffffff;
      }
      if ((undefined4 *)param_1[1] != param_1 + 2) {
        uVar2 = (*(code *)PTR___assert_fail_000b8b18)
                          (PTR_DAT_000b8348 + 0x3850,PTR_DAT_000b8348 + 0x3840,0x52,
                           PTR_DAT_000b8348 + 0x38b0);
        return uVar2;
      }
      puVar4 = (undefined4 *)(*(code *)PTR_safemalloc_000b82f8)(iVar1,1);
      param_1[1] = puVar4;
      *puVar4 = param_1[2];
    }
    uVar2 = (int)param_1[4] < (int)param_1[3] ^ 1;
  }
  return uVar2;
}

