
int fd_write(int fd,char *buf,int bufsize,double timeout)

{
  undefined *puVar1;
  undefined3 extraout_var;
  _Bool _Var4;
  int iVar2;
  int *piVar3;
  hash_table *ht;
  undefined8 in_stack_00000010;
  undefined8 uVar5;
  
  puVar1 = PTR_host_name_addresses_map_000af458;
  ht = *(hash_table **)(PTR_host_name_addresses_map_000af458 + -0xb8);
  if (ht != (hash_table *)0x0) {
    if ((*(int *)(PTR_host_name_addresses_map_000af458 + -0x2ff0) == fd) &&
       (*(int *)(PTR_host_name_addresses_map_000af458 + -0xec) ==
        *(int *)(PTR_host_name_addresses_map_000af458 + -0xbc))) {
      ht = *(hash_table **)(PTR_host_name_addresses_map_000af458 + -0xf0);
    }
    else {
      ht = (hash_table *)hash_table_get(ht,(void *)fd);
      *(int *)(puVar1 + -0x2ff0) = fd;
      *(undefined4 *)(puVar1 + -0xec) = *(undefined4 *)(puVar1 + -0xbc);
      *(hash_table **)(PTR_host_name_addresses_map_000af458 + -0xf0) = ht;
    }
  }
  if (bufsize < 1) {
    iVar2 = 0;
  }
  else {
    while (uVar5 = in_stack_00000010, _Var4 = poll_internal(fd,(transport_info *)ht,2,timeout),
          CONCAT31(extraout_var,_Var4) != 0) {
      if ((ht == (hash_table *)0x0) || (*(code **)(ht->hash_function + 4) == (code *)0x0)) {
        while (iVar2 = (*(code *)PTR_write_000afdb0)(fd,buf,bufsize), iVar2 == -1) {
          piVar3 = (int *)(*(code *)PTR___errno_location_000afe90)();
          if (*piVar3 != 4) goto LAB_0001c20c;
        }
      }
      else {
        iVar2 = (**(code **)(ht->hash_function + 4))(fd,buf,bufsize,ht->test_function,uVar5);
      }
      bufsize = bufsize - iVar2;
      if (iVar2 < 1) {
        return iVar2;
      }
      buf = buf + iVar2;
      if (bufsize < 1) {
        return iVar2;
      }
    }
LAB_0001c20c:
    iVar2 = -1;
  }
  return iVar2;
}



int fd_write(int param_1,int param_2,int param_3,undefined4 param_4,undefined8 param_5)

{
  undefined *puVar1;
  int iVar2;
  int *piVar3;
  int *piVar4;
  undefined8 uVar5;
  
  puVar1 = PTR_DAT_000af458;
  piVar4 = *(int **)(PTR_DAT_000af458 + -0xb8);
  if (piVar4 != (int *)0x0) {
    if ((*(int *)(PTR_DAT_000af458 + -0x2ff0) == param_1) &&
       (*(int *)(PTR_DAT_000af458 + -0xec) == *(int *)(PTR_DAT_000af458 + -0xbc))) {
      piVar4 = *(int **)(PTR_DAT_000af458 + -0xf0);
    }
    else {
      piVar4 = (int *)hash_table_get(piVar4,param_1);
      *(int *)(puVar1 + -0x2ff0) = param_1;
      *(undefined4 *)(puVar1 + -0xec) = *(undefined4 *)(puVar1 + -0xbc);
      *(int **)(PTR_DAT_000af458 + -0xf0) = piVar4;
    }
  }
  if (param_3 < 1) {
    iVar2 = 0;
  }
  else {
    while (uVar5 = param_5, iVar2 = FUN_0001ba1c(param_1,piVar4,2), iVar2 != 0) {
      if ((piVar4 == (int *)0x0) || (*(code **)(*piVar4 + 4) == (code *)0x0)) {
        while (iVar2 = (*(code *)PTR_write_000afdb0)(param_1,param_2,param_3), iVar2 == -1) {
          piVar3 = (int *)(*(code *)PTR___errno_location_000afe90)();
          if (*piVar3 != 4) goto LAB_0001c20c;
        }
      }
      else {
        iVar2 = (**(code **)(*piVar4 + 4))(param_1,param_2,param_3,piVar4[1],uVar5);
      }
      param_3 = param_3 - iVar2;
      if (iVar2 < 1) {
        return iVar2;
      }
      param_2 = param_2 + iVar2;
      if (param_3 < 1) {
        return iVar2;
      }
    }
LAB_0001c20c:
    iVar2 = -1;
  }
  return iVar2;
}


lui gp,0xa
addiu gp,gp,-0x4c94
addu gp,gp,t9
lw v0,-0x7fd8(gp)
addiu sp,sp,-0x48
sdc1 f20,0x40(sp)
sw s1,0x24(sp)
sw gp,0x18(sp)
sw s3,0x2c(sp)
or s3,a0,zero
sw s2,0x28(sp)
or s2,a1,zero
sw s0,0x20(sp)
or s0,a2,zero
sw ra,0x3c(sp)
sw s6,0x38(sp)
sw s5,0x34(sp)
sw s4,0x30(sp)
lw s1,-0xb8(v0)
beq s1,zero,0x0001c168
_ldc1 f20,0x58(sp)
lw s4,-0x7fd8(gp)
lw s5,-0x7fd8(gp)
lw v0,-0x2ff0(s4)
bne v0,a0,0x0001c13c
_lw s6,-0x7fd8(gp)
lw v1,-0xec(s5)
lw v0,-0xbc(s6)
beq v1,v0,0x0001c23c
_lw v0,-0x7fd8(gp)
lw t9,-0x7e60(gp)
or a0,s1,zero
bal 0x0002e824
_or a1,s3,zero
lw gp,0x18(sp)
or s1,v0,zero
lw v0,-0xbc(s6)
sw s3,-0x2ff0(s4)
sw v0,-0xec(s5)
lw v1,-0x7fd8(gp)
sw s1,-0xf0(v1)
blez s0,0x0001c244
_lw s4,-0x7fcc(gp)
li s6,-0x1
li s5,0x4
b 0x0001c1a0
_addiu s4,s4,-0x45e4
lw a3,0x4(s1)
or a1,s2,zero
jalr t9
_or a0,s3,zero
blez v0,0x0001c210
_subu s0,s0,v0
blez s0,0x0001c210
_addu s2,s2,v0
sdc1 f20,0x10(sp)
li a2,0x2
or a1,s1,zero
or t9,s4,zero
bal 0x0001ba1c
_or a0,s3,zero
beq v0,zero,0x0001c20c
_lw gp,0x18(sp)
beq s1,zero,0x0001c1dc
_lw t9,-0x7680(gp)
lw v0,0x0(s1)
lw t9,0x4(v0)
bne t9,zero,0x0001c180
_or a2,s0,zero
lw t9,-0x7680(gp)
or a2,s0,zero
or a1,s2,zero
jalr t9
_or a0,s3,zero
lw gp,0x18(sp)
bne v0,s6,0x0001c190
_lw t9,-0x75a0(gp)
jalr t9
_nop
lw v0,0x0(v0)
beq v0,s5,0x0001c1d8
_lw gp,0x18(sp)
li v0,-0x1
lw ra,0x3c(sp)
lw s6,0x38(sp)
lw s5,0x34(sp)
lw s4,0x30(sp)
lw s3,0x2c(sp)
lw s2,0x28(sp)
lw s1,0x24(sp)
lw s0,0x20(sp)
ldc1 f20,0x40(sp)
jr ra
_addiu sp,sp,0x48
b 0x0001c168
_lw s1,-0xf0(v0)
b 0x0001c210
_or v0,zero,zero
(translation_unit "int fd_write(int param_1,int param_2,int param_3,undefined4 param_4,undefined8 param_5)\n\n{\n  undefined *puVar1;\n  int iVar2;\n  int *piVar3;\n  int *piVar4;\n  undefined8 uVar5;\n  \n  puVar1 = PTR_DAT_000af458;\n  piVar4 = *(int **)(PTR_DAT_000af458 + -0xb8);\n  if (piVar4 != (int *)0x0) {\n    if ((*(int *)(PTR_DAT_000af458 + -0x2ff0) == param_1) &&\n       (*(int *)(PTR_DAT_000af458 + -0xec) == *(int *)(PTR_DAT_000af458 + -0xbc))) {\n      piVar4 = *(int **)(PTR_DAT_000af458 + -0xf0);\n    }\n    else {\n      piVar4 = (int *)hash_table_get(piVar4,param_1);\n      *(int *)(puVar1 + -0x2ff0) = param_1;\n      *(undefined4 *)(puVar1 + -0xec) = *(undefined4 *)(puVar1 + -0xbc);\n      *(int **)(PTR_DAT_000af458 + -0xf0) = piVar4;\n    }\n  }\n  if (param_3 < 1) {\n    iVar2 = 0;\n  }\n  else {\n    while (uVar5 = param_5, iVar2 = FUN_0001ba1c(param_1,piVar4,2), iVar2 != 0) {\n      if ((piVar4 == (int *)0x0) || (*(code **)(*piVar4 + 4) == (code *)0x0)) {\n        while (iVar2 = (*(code *)PTR_write_000afdb0)(param_1,param_2,param_3), iVar2 == -1) {\n          piVar3 = (int *)(*(code *)PTR___errno_location_000afe90)();\n          if (*piVar3 != 4) goto LAB_0001c20c;\n        }\n      }\n      else {\n        iVar2 = (**(code **)(*piVar4 + 4))(param_1,param_2,param_3,piVar4[1],uVar5);\n      }\n      param_3 = param_3 - iVar2;\n      if (iVar2 < 1) {\n        return iVar2;\n      }\n      param_2 = param_2 + iVar2;\n      if (param_3 < 1) {\n        return iVar2;\n      }\n    }\nLAB_0001c20c:\n    iVar2 = -1;\n  }\n  return iVar2;\n}\n\n" (function_definition "int fd_write(int param_1,int param_2,int param_3,undefined4 param_4,undefined8 param_5)\n\n{\n  undefined *puVar1;\n  int iVar2;\n  int *piVar3;\n  int *piVar4;\n  undefined8 uVar5;\n  \n  puVar1 = PTR_DAT_000af458;\n  piVar4 = *(int **)(PTR_DAT_000af458 + -0xb8);\n  if (piVar4 != (int *)0x0) {\n    if ((*(int *)(PTR_DAT_000af458 + -0x2ff0) == param_1) &&\n       (*(int *)(PTR_DAT_000af458 + -0xec) == *(int *)(PTR_DAT_000af458 + -0xbc))) {\n      piVar4 = *(int **)(PTR_DAT_000af458 + -0xf0);\n    }\n    else {\n      piVar4 = (int *)hash_table_get(piVar4,param_1);\n      *(int *)(puVar1 + -0x2ff0) = param_1;\n      *(undefined4 *)(puVar1 + -0xec) = *(undefined4 *)(puVar1 + -0xbc);\n      *(int **)(PTR_DAT_000af458 + -0xf0) = piVar4;\n    }\n  }\n  if (param_3 < 1) {\n    iVar2 = 0;\n  }\n  else {\n    while (uVar5 = param_5, iVar2 = FUN_0001ba1c(param_1,piVar4,2), iVar2 != 0) {\n      if ((piVar4 == (int *)0x0) || (*(code **)(*piVar4 + 4) == (code *)0x0)) {\n        while (iVar2 = (*(code *)PTR_write_000afdb0)(param_1,param_2,param_3), iVar2 == -1) {\n          piVar3 = (int *)(*(code *)PTR___errno_location_000afe90)();\n          if (*piVar3 != 4) goto LAB_0001c20c;\n        }\n      }\n      else {\n        iVar2 = (**(code **)(*piVar4 + 4))(param_1,param_2,param_3,piVar4[1],uVar5);\n      }\n      param_3 = param_3 - iVar2;\n      if (iVar2 < 1) {\n        return iVar2;\n      }\n      param_2 = param_2 + iVar2;\n      if (param_3 < 1) {\n        return iVar2;\n      }\n    }\nLAB_0001c20c:\n    iVar2 = -1;\n  }\n  return iVar2;\n}" primitive_type (function_declarator "fd_write(int param_1,int param_2,int param_3,undefined4 param_4,undefined8 param_5)" identifier (parameter_list "(int param_1,int param_2,int param_3,undefined4 param_4,undefined8 param_5)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "int param_3" primitive_type identifier) , (parameter_declaration "undefined4 param_4" type_identifier identifier) , (parameter_declaration "undefined8 param_5" type_identifier identifier) ))) (compound_statement "{\n  undefined *puVar1;\n  int iVar2;\n  int *piVar3;\n  int *piVar4;\n  undefined8 uVar5;\n  \n  puVar1 = PTR_DAT_000af458;\n  piVar4 = *(int **)(PTR_DAT_000af458 + -0xb8);\n  if (piVar4 != (int *)0x0) {\n    if ((*(int *)(PTR_DAT_000af458 + -0x2ff0) == param_1) &&\n       (*(int *)(PTR_DAT_000af458 + -0xec) == *(int *)(PTR_DAT_000af458 + -0xbc))) {\n      piVar4 = *(int **)(PTR_DAT_000af458 + -0xf0);\n    }\n    else {\n      piVar4 = (int *)hash_table_get(piVar4,param_1);\n      *(int *)(puVar1 + -0x2ff0) = param_1;\n      *(undefined4 *)(puVar1 + -0xec) = *(undefined4 *)(puVar1 + -0xbc);\n      *(int **)(PTR_DAT_000af458 + -0xf0) = piVar4;\n    }\n  }\n  if (param_3 < 1) {\n    iVar2 = 0;\n  }\n  else {\n    while (uVar5 = param_5, iVar2 = FUN_0001ba1c(param_1,piVar4,2), iVar2 != 0) {\n      if ((piVar4 == (int *)0x0) || (*(code **)(*piVar4 + 4) == (code *)0x0)) {\n        while (iVar2 = (*(code *)PTR_write_000afdb0)(param_1,param_2,param_3), iVar2 == -1) {\n          piVar3 = (int *)(*(code *)PTR___errno_location_000afe90)();\n          if (*piVar3 != 4) goto LAB_0001c20c;\n        }\n      }\n      else {\n        iVar2 = (**(code **)(*piVar4 + 4))(param_1,param_2,param_3,piVar4[1],uVar5);\n      }\n      param_3 = param_3 - iVar2;\n      if (iVar2 < 1) {\n        return iVar2;\n      }\n      param_2 = param_2 + iVar2;\n      if (param_3 < 1) {\n        return iVar2;\n      }\n    }\nLAB_0001c20c:\n    iVar2 = -1;\n  }\n  return iVar2;\n}" { (declaration "undefined *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int *piVar3;" primitive_type (pointer_declarator "*piVar3" * identifier) ;) (declaration "int *piVar4;" primitive_type (pointer_declarator "*piVar4" * identifier) ;) (declaration "undefined8 uVar5;" type_identifier identifier ;) (expression_statement "puVar1 = PTR_DAT_000af458;" (assignment_expression "puVar1 = PTR_DAT_000af458" identifier = identifier) ;) (expression_statement "piVar4 = *(int **)(PTR_DAT_000af458 + -0xb8);" (assignment_expression "piVar4 = *(int **)(PTR_DAT_000af458 + -0xb8)" identifier = (pointer_expression "*(int **)(PTR_DAT_000af458 + -0xb8)" * (cast_expression "(int **)(PTR_DAT_000af458 + -0xb8)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(PTR_DAT_000af458 + -0xb8)" ( (binary_expression "PTR_DAT_000af458 + -0xb8" identifier + number_literal) ))))) ;) (if_statement "if (piVar4 != (int *)0x0) {\n    if ((*(int *)(PTR_DAT_000af458 + -0x2ff0) == param_1) &&\n       (*(int *)(PTR_DAT_000af458 + -0xec) == *(int *)(PTR_DAT_000af458 + -0xbc))) {\n      piVar4 = *(int **)(PTR_DAT_000af458 + -0xf0);\n    }\n    else {\n      piVar4 = (int *)hash_table_get(piVar4,param_1);\n      *(int *)(puVar1 + -0x2ff0) = param_1;\n      *(undefined4 *)(puVar1 + -0xec) = *(undefined4 *)(puVar1 + -0xbc);\n      *(int **)(PTR_DAT_000af458 + -0xf0) = piVar4;\n    }\n  }" if (parenthesized_expression "(piVar4 != (int *)0x0)" ( (binary_expression "piVar4 != (int *)0x0" identifier != (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    if ((*(int *)(PTR_DAT_000af458 + -0x2ff0) == param_1) &&\n       (*(int *)(PTR_DAT_000af458 + -0xec) == *(int *)(PTR_DAT_000af458 + -0xbc))) {\n      piVar4 = *(int **)(PTR_DAT_000af458 + -0xf0);\n    }\n    else {\n      piVar4 = (int *)hash_table_get(piVar4,param_1);\n      *(int *)(puVar1 + -0x2ff0) = param_1;\n      *(undefined4 *)(puVar1 + -0xec) = *(undefined4 *)(puVar1 + -0xbc);\n      *(int **)(PTR_DAT_000af458 + -0xf0) = piVar4;\n    }\n  }" { (if_statement "if ((*(int *)(PTR_DAT_000af458 + -0x2ff0) == param_1) &&\n       (*(int *)(PTR_DAT_000af458 + -0xec) == *(int *)(PTR_DAT_000af458 + -0xbc))) {\n      piVar4 = *(int **)(PTR_DAT_000af458 + -0xf0);\n    }\n    else {\n      piVar4 = (int *)hash_table_get(piVar4,param_1);\n      *(int *)(puVar1 + -0x2ff0) = param_1;\n      *(undefined4 *)(puVar1 + -0xec) = *(undefined4 *)(puVar1 + -0xbc);\n      *(int **)(PTR_DAT_000af458 + -0xf0) = piVar4;\n    }" if (parenthesized_expression "((*(int *)(PTR_DAT_000af458 + -0x2ff0) == param_1) &&\n       (*(int *)(PTR_DAT_000af458 + -0xec) == *(int *)(PTR_DAT_000af458 + -0xbc)))" ( (binary_expression "(*(int *)(PTR_DAT_000af458 + -0x2ff0) == param_1) &&\n       (*(int *)(PTR_DAT_000af458 + -0xec) == *(int *)(PTR_DAT_000af458 + -0xbc))" (parenthesized_expression "(*(int *)(PTR_DAT_000af458 + -0x2ff0) == param_1)" ( (binary_expression "*(int *)(PTR_DAT_000af458 + -0x2ff0) == param_1" (pointer_expression "*(int *)(PTR_DAT_000af458 + -0x2ff0)" * (cast_expression "(int *)(PTR_DAT_000af458 + -0x2ff0)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(PTR_DAT_000af458 + -0x2ff0)" ( (binary_expression "PTR_DAT_000af458 + -0x2ff0" identifier + number_literal) )))) == identifier) )) && (parenthesized_expression "(*(int *)(PTR_DAT_000af458 + -0xec) == *(int *)(PTR_DAT_000af458 + -0xbc))" ( (binary_expression "*(int *)(PTR_DAT_000af458 + -0xec) == *(int *)(PTR_DAT_000af458 + -0xbc)" (pointer_expression "*(int *)(PTR_DAT_000af458 + -0xec)" * (cast_expression "(int *)(PTR_DAT_000af458 + -0xec)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(PTR_DAT_000af458 + -0xec)" ( (binary_expression "PTR_DAT_000af458 + -0xec" identifier + number_literal) )))) == (pointer_expression "*(int *)(PTR_DAT_000af458 + -0xbc)" * (cast_expression "(int *)(PTR_DAT_000af458 + -0xbc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(PTR_DAT_000af458 + -0xbc)" ( (binary_expression "PTR_DAT_000af458 + -0xbc" identifier + number_literal) ))))) ))) )) (compound_statement "{\n      piVar4 = *(int **)(PTR_DAT_000af458 + -0xf0);\n    }" { (expression_statement "piVar4 = *(int **)(PTR_DAT_000af458 + -0xf0);" (assignment_expression "piVar4 = *(int **)(PTR_DAT_000af458 + -0xf0)" identifier = (pointer_expression "*(int **)(PTR_DAT_000af458 + -0xf0)" * (cast_expression "(int **)(PTR_DAT_000af458 + -0xf0)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(PTR_DAT_000af458 + -0xf0)" ( (binary_expression "PTR_DAT_000af458 + -0xf0" identifier + number_literal) ))))) ;) }) (else_clause "else {\n      piVar4 = (int *)hash_table_get(piVar4,param_1);\n      *(int *)(puVar1 + -0x2ff0) = param_1;\n      *(undefined4 *)(puVar1 + -0xec) = *(undefined4 *)(puVar1 + -0xbc);\n      *(int **)(PTR_DAT_000af458 + -0xf0) = piVar4;\n    }" else (compound_statement "{\n      piVar4 = (int *)hash_table_get(piVar4,param_1);\n      *(int *)(puVar1 + -0x2ff0) = param_1;\n      *(undefined4 *)(puVar1 + -0xec) = *(undefined4 *)(puVar1 + -0xbc);\n      *(int **)(PTR_DAT_000af458 + -0xf0) = piVar4;\n    }" { (expression_statement "piVar4 = (int *)hash_table_get(piVar4,param_1);" (assignment_expression "piVar4 = (int *)hash_table_get(piVar4,param_1)" identifier = (cast_expression "(int *)hash_table_get(piVar4,param_1)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "hash_table_get(piVar4,param_1)" identifier (argument_list "(piVar4,param_1)" ( identifier , identifier ))))) ;) (expression_statement "*(int *)(puVar1 + -0x2ff0) = param_1;" (assignment_expression "*(int *)(puVar1 + -0x2ff0) = param_1" (pointer_expression "*(int *)(puVar1 + -0x2ff0)" * (cast_expression "(int *)(puVar1 + -0x2ff0)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar1 + -0x2ff0)" ( (binary_expression "puVar1 + -0x2ff0" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(undefined4 *)(puVar1 + -0xec) = *(undefined4 *)(puVar1 + -0xbc);" (assignment_expression "*(undefined4 *)(puVar1 + -0xec) = *(undefined4 *)(puVar1 + -0xbc)" (pointer_expression "*(undefined4 *)(puVar1 + -0xec)" * (cast_expression "(undefined4 *)(puVar1 + -0xec)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar1 + -0xec)" ( (binary_expression "puVar1 + -0xec" identifier + number_literal) )))) = (pointer_expression "*(undefined4 *)(puVar1 + -0xbc)" * (cast_expression "(undefined4 *)(puVar1 + -0xbc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar1 + -0xbc)" ( (binary_expression "puVar1 + -0xbc" identifier + number_literal) ))))) ;) (expression_statement "*(int **)(PTR_DAT_000af458 + -0xf0) = piVar4;" (assignment_expression "*(int **)(PTR_DAT_000af458 + -0xf0) = piVar4" (pointer_expression "*(int **)(PTR_DAT_000af458 + -0xf0)" * (cast_expression "(int **)(PTR_DAT_000af458 + -0xf0)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(PTR_DAT_000af458 + -0xf0)" ( (binary_expression "PTR_DAT_000af458 + -0xf0" identifier + number_literal) )))) = identifier) ;) }))) })) (if_statement "if (param_3 < 1) {\n    iVar2 = 0;\n  }\n  else {\n    while (uVar5 = param_5, iVar2 = FUN_0001ba1c(param_1,piVar4,2), iVar2 != 0) {\n      if ((piVar4 == (int *)0x0) || (*(code **)(*piVar4 + 4) == (code *)0x0)) {\n        while (iVar2 = (*(code *)PTR_write_000afdb0)(param_1,param_2,param_3), iVar2 == -1) {\n          piVar3 = (int *)(*(code *)PTR___errno_location_000afe90)();\n          if (*piVar3 != 4) goto LAB_0001c20c;\n        }\n      }\n      else {\n        iVar2 = (**(code **)(*piVar4 + 4))(param_1,param_2,param_3,piVar4[1],uVar5);\n      }\n      param_3 = param_3 - iVar2;\n      if (iVar2 < 1) {\n        return iVar2;\n      }\n      param_2 = param_2 + iVar2;\n      if (param_3 < 1) {\n        return iVar2;\n      }\n    }\nLAB_0001c20c:\n    iVar2 = -1;\n  }" if (parenthesized_expression "(param_3 < 1)" ( (binary_expression "param_3 < 1" identifier < number_literal) )) (compound_statement "{\n    iVar2 = 0;\n  }" { (expression_statement "iVar2 = 0;" (assignment_expression "iVar2 = 0" identifier = number_literal) ;) }) (else_clause "else {\n    while (uVar5 = param_5, iVar2 = FUN_0001ba1c(param_1,piVar4,2), iVar2 != 0) {\n      if ((piVar4 == (int *)0x0) || (*(code **)(*piVar4 + 4) == (code *)0x0)) {\n        while (iVar2 = (*(code *)PTR_write_000afdb0)(param_1,param_2,param_3), iVar2 == -1) {\n          piVar3 = (int *)(*(code *)PTR___errno_location_000afe90)();\n          if (*piVar3 != 4) goto LAB_0001c20c;\n        }\n      }\n      else {\n        iVar2 = (**(code **)(*piVar4 + 4))(param_1,param_2,param_3,piVar4[1],uVar5);\n      }\n      param_3 = param_3 - iVar2;\n      if (iVar2 < 1) {\n        return iVar2;\n      }\n      param_2 = param_2 + iVar2;\n      if (param_3 < 1) {\n        return iVar2;\n      }\n    }\nLAB_0001c20c:\n    iVar2 = -1;\n  }" else (compound_statement "{\n    while (uVar5 = param_5, iVar2 = FUN_0001ba1c(param_1,piVar4,2), iVar2 != 0) {\n      if ((piVar4 == (int *)0x0) || (*(code **)(*piVar4 + 4) == (code *)0x0)) {\n        while (iVar2 = (*(code *)PTR_write_000afdb0)(param_1,param_2,param_3), iVar2 == -1) {\n          piVar3 = (int *)(*(code *)PTR___errno_location_000afe90)();\n          if (*piVar3 != 4) goto LAB_0001c20c;\n        }\n      }\n      else {\n        iVar2 = (**(code **)(*piVar4 + 4))(param_1,param_2,param_3,piVar4[1],uVar5);\n      }\n      param_3 = param_3 - iVar2;\n      if (iVar2 < 1) {\n        return iVar2;\n      }\n      param_2 = param_2 + iVar2;\n      if (param_3 < 1) {\n        return iVar2;\n      }\n    }\nLAB_0001c20c:\n    iVar2 = -1;\n  }" { (while_statement "while (uVar5 = param_5, iVar2 = FUN_0001ba1c(param_1,piVar4,2), iVar2 != 0) {\n      if ((piVar4 == (int *)0x0) || (*(code **)(*piVar4 + 4) == (code *)0x0)) {\n        while (iVar2 = (*(code *)PTR_write_000afdb0)(param_1,param_2,param_3), iVar2 == -1) {\n          piVar3 = (int *)(*(code *)PTR___errno_location_000afe90)();\n          if (*piVar3 != 4) goto LAB_0001c20c;\n        }\n      }\n      else {\n        iVar2 = (**(code **)(*piVar4 + 4))(param_1,param_2,param_3,piVar4[1],uVar5);\n      }\n      param_3 = param_3 - iVar2;\n      if (iVar2 < 1) {\n        return iVar2;\n      }\n      param_2 = param_2 + iVar2;\n      if (param_3 < 1) {\n        return iVar2;\n      }\n    }" while (parenthesized_expression "(uVar5 = param_5, iVar2 = FUN_0001ba1c(param_1,piVar4,2), iVar2 != 0)" ( (comma_expression "uVar5 = param_5, iVar2 = FUN_0001ba1c(param_1,piVar4,2), iVar2 != 0" (assignment_expression "uVar5 = param_5" identifier = identifier) , (comma_expression "iVar2 = FUN_0001ba1c(param_1,piVar4,2), iVar2 != 0" (assignment_expression "iVar2 = FUN_0001ba1c(param_1,piVar4,2)" identifier = (call_expression "FUN_0001ba1c(param_1,piVar4,2)" identifier (argument_list "(param_1,piVar4,2)" ( identifier , identifier , number_literal )))) , (binary_expression "iVar2 != 0" identifier != number_literal))) )) (compound_statement "{\n      if ((piVar4 == (int *)0x0) || (*(code **)(*piVar4 + 4) == (code *)0x0)) {\n        while (iVar2 = (*(code *)PTR_write_000afdb0)(param_1,param_2,param_3), iVar2 == -1) {\n          piVar3 = (int *)(*(code *)PTR___errno_location_000afe90)();\n          if (*piVar3 != 4) goto LAB_0001c20c;\n        }\n      }\n      else {\n        iVar2 = (**(code **)(*piVar4 + 4))(param_1,param_2,param_3,piVar4[1],uVar5);\n      }\n      param_3 = param_3 - iVar2;\n      if (iVar2 < 1) {\n        return iVar2;\n      }\n      param_2 = param_2 + iVar2;\n      if (param_3 < 1) {\n        return iVar2;\n      }\n    }" { (if_statement "if ((piVar4 == (int *)0x0) || (*(code **)(*piVar4 + 4) == (code *)0x0)) {\n        while (iVar2 = (*(code *)PTR_write_000afdb0)(param_1,param_2,param_3), iVar2 == -1) {\n          piVar3 = (int *)(*(code *)PTR___errno_location_000afe90)();\n          if (*piVar3 != 4) goto LAB_0001c20c;\n        }\n      }\n      else {\n        iVar2 = (**(code **)(*piVar4 + 4))(param_1,param_2,param_3,piVar4[1],uVar5);\n      }" if (parenthesized_expression "((piVar4 == (int *)0x0) || (*(code **)(*piVar4 + 4) == (code *)0x0))" ( (binary_expression "(piVar4 == (int *)0x0) || (*(code **)(*piVar4 + 4) == (code *)0x0)" (parenthesized_expression "(piVar4 == (int *)0x0)" ( (binary_expression "piVar4 == (int *)0x0" identifier == (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) || (parenthesized_expression "(*(code **)(*piVar4 + 4) == (code *)0x0)" ( (binary_expression "*(code **)(*piVar4 + 4) == (code *)0x0" (pointer_expression "*(code **)(*piVar4 + 4)" * (cast_expression "(code **)(*piVar4 + 4)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*piVar4 + 4)" ( (binary_expression "*piVar4 + 4" (pointer_expression "*piVar4" * identifier) + number_literal) )))) == (cast_expression "(code *)0x0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ))) )) (compound_statement "{\n        while (iVar2 = (*(code *)PTR_write_000afdb0)(param_1,param_2,param_3), iVar2 == -1) {\n          piVar3 = (int *)(*(code *)PTR___errno_location_000afe90)();\n          if (*piVar3 != 4) goto LAB_0001c20c;\n        }\n      }" { (while_statement "while (iVar2 = (*(code *)PTR_write_000afdb0)(param_1,param_2,param_3), iVar2 == -1) {\n          piVar3 = (int *)(*(code *)PTR___errno_location_000afe90)();\n          if (*piVar3 != 4) goto LAB_0001c20c;\n        }" while (parenthesized_expression "(iVar2 = (*(code *)PTR_write_000afdb0)(param_1,param_2,param_3), iVar2 == -1)" ( (comma_expression "iVar2 = (*(code *)PTR_write_000afdb0)(param_1,param_2,param_3), iVar2 == -1" (assignment_expression "iVar2 = (*(code *)PTR_write_000afdb0)(param_1,param_2,param_3)" identifier = (call_expression "(*(code *)PTR_write_000afdb0)(param_1,param_2,param_3)" (parenthesized_expression "(*(code *)PTR_write_000afdb0)" ( (pointer_expression "*(code *)PTR_write_000afdb0" * (cast_expression "(code *)PTR_write_000afdb0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_1,param_2,param_3)" ( identifier , identifier , identifier )))) , (binary_expression "iVar2 == -1" identifier == number_literal)) )) (compound_statement "{\n          piVar3 = (int *)(*(code *)PTR___errno_location_000afe90)();\n          if (*piVar3 != 4) goto LAB_0001c20c;\n        }" { (expression_statement "piVar3 = (int *)(*(code *)PTR___errno_location_000afe90)();" (assignment_expression "piVar3 = (int *)(*(code *)PTR___errno_location_000afe90)()" identifier = (cast_expression "(int *)(*(code *)PTR___errno_location_000afe90)()" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR___errno_location_000afe90)()" (parenthesized_expression "(*(code *)PTR___errno_location_000afe90)" ( (pointer_expression "*(code *)PTR___errno_location_000afe90" * (cast_expression "(code *)PTR___errno_location_000afe90" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))))) ;) (if_statement "if (*piVar3 != 4) goto LAB_0001c20c;" if (parenthesized_expression "(*piVar3 != 4)" ( (binary_expression "*piVar3 != 4" (pointer_expression "*piVar3" * identifier) != number_literal) )) (goto_statement "goto LAB_0001c20c;" goto statement_identifier ;)) })) }) (else_clause "else {\n        iVar2 = (**(code **)(*piVar4 + 4))(param_1,param_2,param_3,piVar4[1],uVar5);\n      }" else (compound_statement "{\n        iVar2 = (**(code **)(*piVar4 + 4))(param_1,param_2,param_3,piVar4[1],uVar5);\n      }" { (expression_statement "iVar2 = (**(code **)(*piVar4 + 4))(param_1,param_2,param_3,piVar4[1],uVar5);" (assignment_expression "iVar2 = (**(code **)(*piVar4 + 4))(param_1,param_2,param_3,piVar4[1],uVar5)" identifier = (call_expression "(**(code **)(*piVar4 + 4))(param_1,param_2,param_3,piVar4[1],uVar5)" (parenthesized_expression "(**(code **)(*piVar4 + 4))" ( (pointer_expression "**(code **)(*piVar4 + 4)" * (pointer_expression "*(code **)(*piVar4 + 4)" * (cast_expression "(code **)(*piVar4 + 4)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*piVar4 + 4)" ( (binary_expression "*piVar4 + 4" (pointer_expression "*piVar4" * identifier) + number_literal) ))))) )) (argument_list "(param_1,param_2,param_3,piVar4[1],uVar5)" ( identifier , identifier , identifier , (subscript_expression "piVar4[1]" identifier [ number_literal ]) , identifier )))) ;) }))) (expression_statement "param_3 = param_3 - iVar2;" (assignment_expression "param_3 = param_3 - iVar2" identifier = (binary_expression "param_3 - iVar2" identifier - identifier)) ;) (if_statement "if (iVar2 < 1) {\n        return iVar2;\n      }" if (parenthesized_expression "(iVar2 < 1)" ( (binary_expression "iVar2 < 1" identifier < number_literal) )) (compound_statement "{\n        return iVar2;\n      }" { (return_statement "return iVar2;" return identifier ;) })) (expression_statement "param_2 = param_2 + iVar2;" (assignment_expression "param_2 = param_2 + iVar2" identifier = (binary_expression "param_2 + iVar2" identifier + identifier)) ;) (if_statement "if (param_3 < 1) {\n        return iVar2;\n      }" if (parenthesized_expression "(param_3 < 1)" ( (binary_expression "param_3 < 1" identifier < number_literal) )) (compound_statement "{\n        return iVar2;\n      }" { (return_statement "return iVar2;" return identifier ;) })) })) (labeled_statement "LAB_0001c20c:\n    iVar2 = -1;" statement_identifier : (expression_statement "iVar2 = -1;" (assignment_expression "iVar2 = -1" identifier = number_literal) ;)) }))) (return_statement "return iVar2;" return identifier ;) })))
(translation_unit "int fd_write(int fd,char *buf,int bufsize,double timeout)\n\n{\n  undefined *puVar1;\n  undefined3 extraout_var;\n  _Bool _Var4;\n  int iVar2;\n  int *piVar3;\n  hash_table *ht;\n  undefined8 in_stack_00000010;\n  undefined8 uVar5;\n  \n  puVar1 = PTR_host_name_addresses_map_000af458;\n  ht = *(hash_table **)(PTR_host_name_addresses_map_000af458 + -0xb8);\n  if (ht != (hash_table *)0x0) {\n    if ((*(int *)(PTR_host_name_addresses_map_000af458 + -0x2ff0) == fd) &&\n       (*(int *)(PTR_host_name_addresses_map_000af458 + -0xec) ==\n        *(int *)(PTR_host_name_addresses_map_000af458 + -0xbc))) {\n      ht = *(hash_table **)(PTR_host_name_addresses_map_000af458 + -0xf0);\n    }\n    else {\n      ht = (hash_table *)hash_table_get(ht,(void *)fd);\n      *(int *)(puVar1 + -0x2ff0) = fd;\n      *(undefined4 *)(puVar1 + -0xec) = *(undefined4 *)(puVar1 + -0xbc);\n      *(hash_table **)(PTR_host_name_addresses_map_000af458 + -0xf0) = ht;\n    }\n  }\n  if (bufsize < 1) {\n    iVar2 = 0;\n  }\n  else {\n    while (uVar5 = in_stack_00000010, _Var4 = poll_internal(fd,(transport_info *)ht,2,timeout),\n          CONCAT31(extraout_var,_Var4) != 0) {\n      if ((ht == (hash_table *)0x0) || (*(code **)(ht->hash_function + 4) == (code *)0x0)) {\n        while (iVar2 = (*(code *)PTR_write_000afdb0)(fd,buf,bufsize), iVar2 == -1) {\n          piVar3 = (int *)(*(code *)PTR___errno_location_000afe90)();\n          if (*piVar3 != 4) goto LAB_0001c20c;\n        }\n      }\n      else {\n        iVar2 = (**(code **)(ht->hash_function + 4))(fd,buf,bufsize,ht->test_function,uVar5);\n      }\n      bufsize = bufsize - iVar2;\n      if (iVar2 < 1) {\n        return iVar2;\n      }\n      buf = buf + iVar2;\n      if (bufsize < 1) {\n        return iVar2;\n      }\n    }\nLAB_0001c20c:\n    iVar2 = -1;\n  }\n  return iVar2;\n}\n\n" (function_definition "int fd_write(int fd,char *buf,int bufsize,double timeout)\n\n{\n  undefined *puVar1;\n  undefined3 extraout_var;\n  _Bool _Var4;\n  int iVar2;\n  int *piVar3;\n  hash_table *ht;\n  undefined8 in_stack_00000010;\n  undefined8 uVar5;\n  \n  puVar1 = PTR_host_name_addresses_map_000af458;\n  ht = *(hash_table **)(PTR_host_name_addresses_map_000af458 + -0xb8);\n  if (ht != (hash_table *)0x0) {\n    if ((*(int *)(PTR_host_name_addresses_map_000af458 + -0x2ff0) == fd) &&\n       (*(int *)(PTR_host_name_addresses_map_000af458 + -0xec) ==\n        *(int *)(PTR_host_name_addresses_map_000af458 + -0xbc))) {\n      ht = *(hash_table **)(PTR_host_name_addresses_map_000af458 + -0xf0);\n    }\n    else {\n      ht = (hash_table *)hash_table_get(ht,(void *)fd);\n      *(int *)(puVar1 + -0x2ff0) = fd;\n      *(undefined4 *)(puVar1 + -0xec) = *(undefined4 *)(puVar1 + -0xbc);\n      *(hash_table **)(PTR_host_name_addresses_map_000af458 + -0xf0) = ht;\n    }\n  }\n  if (bufsize < 1) {\n    iVar2 = 0;\n  }\n  else {\n    while (uVar5 = in_stack_00000010, _Var4 = poll_internal(fd,(transport_info *)ht,2,timeout),\n          CONCAT31(extraout_var,_Var4) != 0) {\n      if ((ht == (hash_table *)0x0) || (*(code **)(ht->hash_function + 4) == (code *)0x0)) {\n        while (iVar2 = (*(code *)PTR_write_000afdb0)(fd,buf,bufsize), iVar2 == -1) {\n          piVar3 = (int *)(*(code *)PTR___errno_location_000afe90)();\n          if (*piVar3 != 4) goto LAB_0001c20c;\n        }\n      }\n      else {\n        iVar2 = (**(code **)(ht->hash_function + 4))(fd,buf,bufsize,ht->test_function,uVar5);\n      }\n      bufsize = bufsize - iVar2;\n      if (iVar2 < 1) {\n        return iVar2;\n      }\n      buf = buf + iVar2;\n      if (bufsize < 1) {\n        return iVar2;\n      }\n    }\nLAB_0001c20c:\n    iVar2 = -1;\n  }\n  return iVar2;\n}" primitive_type (function_declarator "fd_write(int fd,char *buf,int bufsize,double timeout)" identifier (parameter_list "(int fd,char *buf,int bufsize,double timeout)" ( (parameter_declaration "int fd" primitive_type identifier) , (parameter_declaration "char *buf" primitive_type (pointer_declarator "*buf" * identifier)) , (parameter_declaration "int bufsize" primitive_type identifier) , (parameter_declaration "double timeout" primitive_type identifier) ))) (compound_statement "{\n  undefined *puVar1;\n  undefined3 extraout_var;\n  _Bool _Var4;\n  int iVar2;\n  int *piVar3;\n  hash_table *ht;\n  undefined8 in_stack_00000010;\n  undefined8 uVar5;\n  \n  puVar1 = PTR_host_name_addresses_map_000af458;\n  ht = *(hash_table **)(PTR_host_name_addresses_map_000af458 + -0xb8);\n  if (ht != (hash_table *)0x0) {\n    if ((*(int *)(PTR_host_name_addresses_map_000af458 + -0x2ff0) == fd) &&\n       (*(int *)(PTR_host_name_addresses_map_000af458 + -0xec) ==\n        *(int *)(PTR_host_name_addresses_map_000af458 + -0xbc))) {\n      ht = *(hash_table **)(PTR_host_name_addresses_map_000af458 + -0xf0);\n    }\n    else {\n      ht = (hash_table *)hash_table_get(ht,(void *)fd);\n      *(int *)(puVar1 + -0x2ff0) = fd;\n      *(undefined4 *)(puVar1 + -0xec) = *(undefined4 *)(puVar1 + -0xbc);\n      *(hash_table **)(PTR_host_name_addresses_map_000af458 + -0xf0) = ht;\n    }\n  }\n  if (bufsize < 1) {\n    iVar2 = 0;\n  }\n  else {\n    while (uVar5 = in_stack_00000010, _Var4 = poll_internal(fd,(transport_info *)ht,2,timeout),\n          CONCAT31(extraout_var,_Var4) != 0) {\n      if ((ht == (hash_table *)0x0) || (*(code **)(ht->hash_function + 4) == (code *)0x0)) {\n        while (iVar2 = (*(code *)PTR_write_000afdb0)(fd,buf,bufsize), iVar2 == -1) {\n          piVar3 = (int *)(*(code *)PTR___errno_location_000afe90)();\n          if (*piVar3 != 4) goto LAB_0001c20c;\n        }\n      }\n      else {\n        iVar2 = (**(code **)(ht->hash_function + 4))(fd,buf,bufsize,ht->test_function,uVar5);\n      }\n      bufsize = bufsize - iVar2;\n      if (iVar2 < 1) {\n        return iVar2;\n      }\n      buf = buf + iVar2;\n      if (bufsize < 1) {\n        return iVar2;\n      }\n    }\nLAB_0001c20c:\n    iVar2 = -1;\n  }\n  return iVar2;\n}" { (declaration "undefined *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "undefined3 extraout_var;" type_identifier identifier ;) (declaration "_Bool _Var4;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int *piVar3;" primitive_type (pointer_declarator "*piVar3" * identifier) ;) (declaration "hash_table *ht;" type_identifier (pointer_declarator "*ht" * identifier) ;) (declaration "undefined8 in_stack_00000010;" type_identifier identifier ;) (declaration "undefined8 uVar5;" type_identifier identifier ;) (expression_statement "puVar1 = PTR_host_name_addresses_map_000af458;" (assignment_expression "puVar1 = PTR_host_name_addresses_map_000af458" identifier = identifier) ;) (expression_statement "ht = *(hash_table **)(PTR_host_name_addresses_map_000af458 + -0xb8);" (assignment_expression "ht = *(hash_table **)(PTR_host_name_addresses_map_000af458 + -0xb8)" identifier = (pointer_expression "*(hash_table **)(PTR_host_name_addresses_map_000af458 + -0xb8)" * (cast_expression "(hash_table **)(PTR_host_name_addresses_map_000af458 + -0xb8)" ( (type_descriptor "hash_table **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(PTR_host_name_addresses_map_000af458 + -0xb8)" ( (binary_expression "PTR_host_name_addresses_map_000af458 + -0xb8" identifier + number_literal) ))))) ;) (if_statement "if (ht != (hash_table *)0x0) {\n    if ((*(int *)(PTR_host_name_addresses_map_000af458 + -0x2ff0) == fd) &&\n       (*(int *)(PTR_host_name_addresses_map_000af458 + -0xec) ==\n        *(int *)(PTR_host_name_addresses_map_000af458 + -0xbc))) {\n      ht = *(hash_table **)(PTR_host_name_addresses_map_000af458 + -0xf0);\n    }\n    else {\n      ht = (hash_table *)hash_table_get(ht,(void *)fd);\n      *(int *)(puVar1 + -0x2ff0) = fd;\n      *(undefined4 *)(puVar1 + -0xec) = *(undefined4 *)(puVar1 + -0xbc);\n      *(hash_table **)(PTR_host_name_addresses_map_000af458 + -0xf0) = ht;\n    }\n  }" if (parenthesized_expression "(ht != (hash_table *)0x0)" ( (binary_expression "ht != (hash_table *)0x0" identifier != (cast_expression "(hash_table *)0x0" ( (type_descriptor "hash_table *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    if ((*(int *)(PTR_host_name_addresses_map_000af458 + -0x2ff0) == fd) &&\n       (*(int *)(PTR_host_name_addresses_map_000af458 + -0xec) ==\n        *(int *)(PTR_host_name_addresses_map_000af458 + -0xbc))) {\n      ht = *(hash_table **)(PTR_host_name_addresses_map_000af458 + -0xf0);\n    }\n    else {\n      ht = (hash_table *)hash_table_get(ht,(void *)fd);\n      *(int *)(puVar1 + -0x2ff0) = fd;\n      *(undefined4 *)(puVar1 + -0xec) = *(undefined4 *)(puVar1 + -0xbc);\n      *(hash_table **)(PTR_host_name_addresses_map_000af458 + -0xf0) = ht;\n    }\n  }" { (if_statement "if ((*(int *)(PTR_host_name_addresses_map_000af458 + -0x2ff0) == fd) &&\n       (*(int *)(PTR_host_name_addresses_map_000af458 + -0xec) ==\n        *(int *)(PTR_host_name_addresses_map_000af458 + -0xbc))) {\n      ht = *(hash_table **)(PTR_host_name_addresses_map_000af458 + -0xf0);\n    }\n    else {\n      ht = (hash_table *)hash_table_get(ht,(void *)fd);\n      *(int *)(puVar1 + -0x2ff0) = fd;\n      *(undefined4 *)(puVar1 + -0xec) = *(undefined4 *)(puVar1 + -0xbc);\n      *(hash_table **)(PTR_host_name_addresses_map_000af458 + -0xf0) = ht;\n    }" if (parenthesized_expression "((*(int *)(PTR_host_name_addresses_map_000af458 + -0x2ff0) == fd) &&\n       (*(int *)(PTR_host_name_addresses_map_000af458 + -0xec) ==\n        *(int *)(PTR_host_name_addresses_map_000af458 + -0xbc)))" ( (binary_expression "(*(int *)(PTR_host_name_addresses_map_000af458 + -0x2ff0) == fd) &&\n       (*(int *)(PTR_host_name_addresses_map_000af458 + -0xec) ==\n        *(int *)(PTR_host_name_addresses_map_000af458 + -0xbc))" (parenthesized_expression "(*(int *)(PTR_host_name_addresses_map_000af458 + -0x2ff0) == fd)" ( (binary_expression "*(int *)(PTR_host_name_addresses_map_000af458 + -0x2ff0) == fd" (pointer_expression "*(int *)(PTR_host_name_addresses_map_000af458 + -0x2ff0)" * (cast_expression "(int *)(PTR_host_name_addresses_map_000af458 + -0x2ff0)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(PTR_host_name_addresses_map_000af458 + -0x2ff0)" ( (binary_expression "PTR_host_name_addresses_map_000af458 + -0x2ff0" identifier + number_literal) )))) == identifier) )) && (parenthesized_expression "(*(int *)(PTR_host_name_addresses_map_000af458 + -0xec) ==\n        *(int *)(PTR_host_name_addresses_map_000af458 + -0xbc))" ( (binary_expression "*(int *)(PTR_host_name_addresses_map_000af458 + -0xec) ==\n        *(int *)(PTR_host_name_addresses_map_000af458 + -0xbc)" (pointer_expression "*(int *)(PTR_host_name_addresses_map_000af458 + -0xec)" * (cast_expression "(int *)(PTR_host_name_addresses_map_000af458 + -0xec)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(PTR_host_name_addresses_map_000af458 + -0xec)" ( (binary_expression "PTR_host_name_addresses_map_000af458 + -0xec" identifier + number_literal) )))) == (pointer_expression "*(int *)(PTR_host_name_addresses_map_000af458 + -0xbc)" * (cast_expression "(int *)(PTR_host_name_addresses_map_000af458 + -0xbc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(PTR_host_name_addresses_map_000af458 + -0xbc)" ( (binary_expression "PTR_host_name_addresses_map_000af458 + -0xbc" identifier + number_literal) ))))) ))) )) (compound_statement "{\n      ht = *(hash_table **)(PTR_host_name_addresses_map_000af458 + -0xf0);\n    }" { (expression_statement "ht = *(hash_table **)(PTR_host_name_addresses_map_000af458 + -0xf0);" (assignment_expression "ht = *(hash_table **)(PTR_host_name_addresses_map_000af458 + -0xf0)" identifier = (pointer_expression "*(hash_table **)(PTR_host_name_addresses_map_000af458 + -0xf0)" * (cast_expression "(hash_table **)(PTR_host_name_addresses_map_000af458 + -0xf0)" ( (type_descriptor "hash_table **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(PTR_host_name_addresses_map_000af458 + -0xf0)" ( (binary_expression "PTR_host_name_addresses_map_000af458 + -0xf0" identifier + number_literal) ))))) ;) }) (else_clause "else {\n      ht = (hash_table *)hash_table_get(ht,(void *)fd);\n      *(int *)(puVar1 + -0x2ff0) = fd;\n      *(undefined4 *)(puVar1 + -0xec) = *(undefined4 *)(puVar1 + -0xbc);\n      *(hash_table **)(PTR_host_name_addresses_map_000af458 + -0xf0) = ht;\n    }" else (compound_statement "{\n      ht = (hash_table *)hash_table_get(ht,(void *)fd);\n      *(int *)(puVar1 + -0x2ff0) = fd;\n      *(undefined4 *)(puVar1 + -0xec) = *(undefined4 *)(puVar1 + -0xbc);\n      *(hash_table **)(PTR_host_name_addresses_map_000af458 + -0xf0) = ht;\n    }" { (expression_statement "ht = (hash_table *)hash_table_get(ht,(void *)fd);" (assignment_expression "ht = (hash_table *)hash_table_get(ht,(void *)fd)" identifier = (cast_expression "(hash_table *)hash_table_get(ht,(void *)fd)" ( (type_descriptor "hash_table *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "hash_table_get(ht,(void *)fd)" identifier (argument_list "(ht,(void *)fd)" ( identifier , (cast_expression "(void *)fd" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier) ))))) ;) (expression_statement "*(int *)(puVar1 + -0x2ff0) = fd;" (assignment_expression "*(int *)(puVar1 + -0x2ff0) = fd" (pointer_expression "*(int *)(puVar1 + -0x2ff0)" * (cast_expression "(int *)(puVar1 + -0x2ff0)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar1 + -0x2ff0)" ( (binary_expression "puVar1 + -0x2ff0" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(undefined4 *)(puVar1 + -0xec) = *(undefined4 *)(puVar1 + -0xbc);" (assignment_expression "*(undefined4 *)(puVar1 + -0xec) = *(undefined4 *)(puVar1 + -0xbc)" (pointer_expression "*(undefined4 *)(puVar1 + -0xec)" * (cast_expression "(undefined4 *)(puVar1 + -0xec)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar1 + -0xec)" ( (binary_expression "puVar1 + -0xec" identifier + number_literal) )))) = (pointer_expression "*(undefined4 *)(puVar1 + -0xbc)" * (cast_expression "(undefined4 *)(puVar1 + -0xbc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar1 + -0xbc)" ( (binary_expression "puVar1 + -0xbc" identifier + number_literal) ))))) ;) (expression_statement "*(hash_table **)(PTR_host_name_addresses_map_000af458 + -0xf0) = ht;" (assignment_expression "*(hash_table **)(PTR_host_name_addresses_map_000af458 + -0xf0) = ht" (pointer_expression "*(hash_table **)(PTR_host_name_addresses_map_000af458 + -0xf0)" * (cast_expression "(hash_table **)(PTR_host_name_addresses_map_000af458 + -0xf0)" ( (type_descriptor "hash_table **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(PTR_host_name_addresses_map_000af458 + -0xf0)" ( (binary_expression "PTR_host_name_addresses_map_000af458 + -0xf0" identifier + number_literal) )))) = identifier) ;) }))) })) (if_statement "if (bufsize < 1) {\n    iVar2 = 0;\n  }\n  else {\n    while (uVar5 = in_stack_00000010, _Var4 = poll_internal(fd,(transport_info *)ht,2,timeout),\n          CONCAT31(extraout_var,_Var4) != 0) {\n      if ((ht == (hash_table *)0x0) || (*(code **)(ht->hash_function + 4) == (code *)0x0)) {\n        while (iVar2 = (*(code *)PTR_write_000afdb0)(fd,buf,bufsize), iVar2 == -1) {\n          piVar3 = (int *)(*(code *)PTR___errno_location_000afe90)();\n          if (*piVar3 != 4) goto LAB_0001c20c;\n        }\n      }\n      else {\n        iVar2 = (**(code **)(ht->hash_function + 4))(fd,buf,bufsize,ht->test_function,uVar5);\n      }\n      bufsize = bufsize - iVar2;\n      if (iVar2 < 1) {\n        return iVar2;\n      }\n      buf = buf + iVar2;\n      if (bufsize < 1) {\n        return iVar2;\n      }\n    }\nLAB_0001c20c:\n    iVar2 = -1;\n  }" if (parenthesized_expression "(bufsize < 1)" ( (binary_expression "bufsize < 1" identifier < number_literal) )) (compound_statement "{\n    iVar2 = 0;\n  }" { (expression_statement "iVar2 = 0;" (assignment_expression "iVar2 = 0" identifier = number_literal) ;) }) (else_clause "else {\n    while (uVar5 = in_stack_00000010, _Var4 = poll_internal(fd,(transport_info *)ht,2,timeout),\n          CONCAT31(extraout_var,_Var4) != 0) {\n      if ((ht == (hash_table *)0x0) || (*(code **)(ht->hash_function + 4) == (code *)0x0)) {\n        while (iVar2 = (*(code *)PTR_write_000afdb0)(fd,buf,bufsize), iVar2 == -1) {\n          piVar3 = (int *)(*(code *)PTR___errno_location_000afe90)();\n          if (*piVar3 != 4) goto LAB_0001c20c;\n        }\n      }\n      else {\n        iVar2 = (**(code **)(ht->hash_function + 4))(fd,buf,bufsize,ht->test_function,uVar5);\n      }\n      bufsize = bufsize - iVar2;\n      if (iVar2 < 1) {\n        return iVar2;\n      }\n      buf = buf + iVar2;\n      if (bufsize < 1) {\n        return iVar2;\n      }\n    }\nLAB_0001c20c:\n    iVar2 = -1;\n  }" else (compound_statement "{\n    while (uVar5 = in_stack_00000010, _Var4 = poll_internal(fd,(transport_info *)ht,2,timeout),\n          CONCAT31(extraout_var,_Var4) != 0) {\n      if ((ht == (hash_table *)0x0) || (*(code **)(ht->hash_function + 4) == (code *)0x0)) {\n        while (iVar2 = (*(code *)PTR_write_000afdb0)(fd,buf,bufsize), iVar2 == -1) {\n          piVar3 = (int *)(*(code *)PTR___errno_location_000afe90)();\n          if (*piVar3 != 4) goto LAB_0001c20c;\n        }\n      }\n      else {\n        iVar2 = (**(code **)(ht->hash_function + 4))(fd,buf,bufsize,ht->test_function,uVar5);\n      }\n      bufsize = bufsize - iVar2;\n      if (iVar2 < 1) {\n        return iVar2;\n      }\n      buf = buf + iVar2;\n      if (bufsize < 1) {\n        return iVar2;\n      }\n    }\nLAB_0001c20c:\n    iVar2 = -1;\n  }" { (while_statement "while (uVar5 = in_stack_00000010, _Var4 = poll_internal(fd,(transport_info *)ht,2,timeout),\n          CONCAT31(extraout_var,_Var4) != 0) {\n      if ((ht == (hash_table *)0x0) || (*(code **)(ht->hash_function + 4) == (code *)0x0)) {\n        while (iVar2 = (*(code *)PTR_write_000afdb0)(fd,buf,bufsize), iVar2 == -1) {\n          piVar3 = (int *)(*(code *)PTR___errno_location_000afe90)();\n          if (*piVar3 != 4) goto LAB_0001c20c;\n        }\n      }\n      else {\n        iVar2 = (**(code **)(ht->hash_function + 4))(fd,buf,bufsize,ht->test_function,uVar5);\n      }\n      bufsize = bufsize - iVar2;\n      if (iVar2 < 1) {\n        return iVar2;\n      }\n      buf = buf + iVar2;\n      if (bufsize < 1) {\n        return iVar2;\n      }\n    }" while (parenthesized_expression "(uVar5 = in_stack_00000010, _Var4 = poll_internal(fd,(transport_info *)ht,2,timeout),\n          CONCAT31(extraout_var,_Var4) != 0)" ( (comma_expression "uVar5 = in_stack_00000010, _Var4 = poll_internal(fd,(transport_info *)ht,2,timeout),\n          CONCAT31(extraout_var,_Var4) != 0" (assignment_expression "uVar5 = in_stack_00000010" identifier = identifier) , (comma_expression "_Var4 = poll_internal(fd,(transport_info *)ht,2,timeout),\n          CONCAT31(extraout_var,_Var4) != 0" (assignment_expression "_Var4 = poll_internal(fd,(transport_info *)ht,2,timeout)" identifier = (call_expression "poll_internal(fd,(transport_info *)ht,2,timeout)" identifier (argument_list "(fd,(transport_info *)ht,2,timeout)" ( identifier , (cast_expression "(transport_info *)ht" ( (type_descriptor "transport_info *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) , number_literal , identifier )))) , (binary_expression "CONCAT31(extraout_var,_Var4) != 0" (call_expression "CONCAT31(extraout_var,_Var4)" identifier (argument_list "(extraout_var,_Var4)" ( identifier , identifier ))) != number_literal))) )) (compound_statement "{\n      if ((ht == (hash_table *)0x0) || (*(code **)(ht->hash_function + 4) == (code *)0x0)) {\n        while (iVar2 = (*(code *)PTR_write_000afdb0)(fd,buf,bufsize), iVar2 == -1) {\n          piVar3 = (int *)(*(code *)PTR___errno_location_000afe90)();\n          if (*piVar3 != 4) goto LAB_0001c20c;\n        }\n      }\n      else {\n        iVar2 = (**(code **)(ht->hash_function + 4))(fd,buf,bufsize,ht->test_function,uVar5);\n      }\n      bufsize = bufsize - iVar2;\n      if (iVar2 < 1) {\n        return iVar2;\n      }\n      buf = buf + iVar2;\n      if (bufsize < 1) {\n        return iVar2;\n      }\n    }" { (if_statement "if ((ht == (hash_table *)0x0) || (*(code **)(ht->hash_function + 4) == (code *)0x0)) {\n        while (iVar2 = (*(code *)PTR_write_000afdb0)(fd,buf,bufsize), iVar2 == -1) {\n          piVar3 = (int *)(*(code *)PTR___errno_location_000afe90)();\n          if (*piVar3 != 4) goto LAB_0001c20c;\n        }\n      }\n      else {\n        iVar2 = (**(code **)(ht->hash_function + 4))(fd,buf,bufsize,ht->test_function,uVar5);\n      }" if (parenthesized_expression "((ht == (hash_table *)0x0) || (*(code **)(ht->hash_function + 4) == (code *)0x0))" ( (binary_expression "(ht == (hash_table *)0x0) || (*(code **)(ht->hash_function + 4) == (code *)0x0)" (parenthesized_expression "(ht == (hash_table *)0x0)" ( (binary_expression "ht == (hash_table *)0x0" identifier == (cast_expression "(hash_table *)0x0" ( (type_descriptor "hash_table *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) || (parenthesized_expression "(*(code **)(ht->hash_function + 4) == (code *)0x0)" ( (binary_expression "*(code **)(ht->hash_function + 4) == (code *)0x0" (pointer_expression "*(code **)(ht->hash_function + 4)" * (cast_expression "(code **)(ht->hash_function + 4)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(ht->hash_function + 4)" ( (binary_expression "ht->hash_function + 4" (field_expression "ht->hash_function" identifier -> field_identifier) + number_literal) )))) == (cast_expression "(code *)0x0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ))) )) (compound_statement "{\n        while (iVar2 = (*(code *)PTR_write_000afdb0)(fd,buf,bufsize), iVar2 == -1) {\n          piVar3 = (int *)(*(code *)PTR___errno_location_000afe90)();\n          if (*piVar3 != 4) goto LAB_0001c20c;\n        }\n      }" { (while_statement "while (iVar2 = (*(code *)PTR_write_000afdb0)(fd,buf,bufsize), iVar2 == -1) {\n          piVar3 = (int *)(*(code *)PTR___errno_location_000afe90)();\n          if (*piVar3 != 4) goto LAB_0001c20c;\n        }" while (parenthesized_expression "(iVar2 = (*(code *)PTR_write_000afdb0)(fd,buf,bufsize), iVar2 == -1)" ( (comma_expression "iVar2 = (*(code *)PTR_write_000afdb0)(fd,buf,bufsize), iVar2 == -1" (assignment_expression "iVar2 = (*(code *)PTR_write_000afdb0)(fd,buf,bufsize)" identifier = (call_expression "(*(code *)PTR_write_000afdb0)(fd,buf,bufsize)" (parenthesized_expression "(*(code *)PTR_write_000afdb0)" ( (pointer_expression "*(code *)PTR_write_000afdb0" * (cast_expression "(code *)PTR_write_000afdb0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(fd,buf,bufsize)" ( identifier , identifier , identifier )))) , (binary_expression "iVar2 == -1" identifier == number_literal)) )) (compound_statement "{\n          piVar3 = (int *)(*(code *)PTR___errno_location_000afe90)();\n          if (*piVar3 != 4) goto LAB_0001c20c;\n        }" { (expression_statement "piVar3 = (int *)(*(code *)PTR___errno_location_000afe90)();" (assignment_expression "piVar3 = (int *)(*(code *)PTR___errno_location_000afe90)()" identifier = (cast_expression "(int *)(*(code *)PTR___errno_location_000afe90)()" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR___errno_location_000afe90)()" (parenthesized_expression "(*(code *)PTR___errno_location_000afe90)" ( (pointer_expression "*(code *)PTR___errno_location_000afe90" * (cast_expression "(code *)PTR___errno_location_000afe90" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))))) ;) (if_statement "if (*piVar3 != 4) goto LAB_0001c20c;" if (parenthesized_expression "(*piVar3 != 4)" ( (binary_expression "*piVar3 != 4" (pointer_expression "*piVar3" * identifier) != number_literal) )) (goto_statement "goto LAB_0001c20c;" goto statement_identifier ;)) })) }) (else_clause "else {\n        iVar2 = (**(code **)(ht->hash_function + 4))(fd,buf,bufsize,ht->test_function,uVar5);\n      }" else (compound_statement "{\n        iVar2 = (**(code **)(ht->hash_function + 4))(fd,buf,bufsize,ht->test_function,uVar5);\n      }" { (expression_statement "iVar2 = (**(code **)(ht->hash_function + 4))(fd,buf,bufsize,ht->test_function,uVar5);" (assignment_expression "iVar2 = (**(code **)(ht->hash_function + 4))(fd,buf,bufsize,ht->test_function,uVar5)" identifier = (call_expression "(**(code **)(ht->hash_function + 4))(fd,buf,bufsize,ht->test_function,uVar5)" (parenthesized_expression "(**(code **)(ht->hash_function + 4))" ( (pointer_expression "**(code **)(ht->hash_function + 4)" * (pointer_expression "*(code **)(ht->hash_function + 4)" * (cast_expression "(code **)(ht->hash_function + 4)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(ht->hash_function + 4)" ( (binary_expression "ht->hash_function + 4" (field_expression "ht->hash_function" identifier -> field_identifier) + number_literal) ))))) )) (argument_list "(fd,buf,bufsize,ht->test_function,uVar5)" ( identifier , identifier , identifier , (field_expression "ht->test_function" identifier -> field_identifier) , identifier )))) ;) }))) (expression_statement "bufsize = bufsize - iVar2;" (assignment_expression "bufsize = bufsize - iVar2" identifier = (binary_expression "bufsize - iVar2" identifier - identifier)) ;) (if_statement "if (iVar2 < 1) {\n        return iVar2;\n      }" if (parenthesized_expression "(iVar2 < 1)" ( (binary_expression "iVar2 < 1" identifier < number_literal) )) (compound_statement "{\n        return iVar2;\n      }" { (return_statement "return iVar2;" return identifier ;) })) (expression_statement "buf = buf + iVar2;" (assignment_expression "buf = buf + iVar2" identifier = (binary_expression "buf + iVar2" identifier + identifier)) ;) (if_statement "if (bufsize < 1) {\n        return iVar2;\n      }" if (parenthesized_expression "(bufsize < 1)" ( (binary_expression "bufsize < 1" identifier < number_literal) )) (compound_statement "{\n        return iVar2;\n      }" { (return_statement "return iVar2;" return identifier ;) })) })) (labeled_statement "LAB_0001c20c:\n    iVar2 = -1;" statement_identifier : (expression_statement "iVar2 = -1;" (assignment_expression "iVar2 = -1" identifier = number_literal) ;)) }))) (return_statement "return iVar2;" return identifier ;) })))
(translation_unit "int fd_write(int param_1,int param_2,int param_3,undefined4 param_4,undefined8 param_5)\n\n{\n  undefined *puVar1;\n  int iVar2;\n  int *piVar3;\n  int *piVar4;\n  undefined8 uVar5;\n  \n  puVar1 = PTR_DAT_000af458;\n  piVar4 = *(int **)(PTR_DAT_000af458 + -0xb8);\n  if (piVar4 != (int *)0x0) {\n    if ((*(int *)(PTR_DAT_000af458 + -0x2ff0) == param_1) &&\n       (*(int *)(PTR_DAT_000af458 + -0xec) == *(int *)(PTR_DAT_000af458 + -0xbc))) {\n      piVar4 = *(int **)(PTR_DAT_000af458 + -0xf0);\n    }\n    else {\n      piVar4 = (int *)hash_table_get(piVar4,param_1);\n      *(int *)(puVar1 + -0x2ff0) = param_1;\n      *(undefined4 *)(puVar1 + -0xec) = *(undefined4 *)(puVar1 + -0xbc);\n      *(int **)(PTR_DAT_000af458 + -0xf0) = piVar4;\n    }\n  }\n  if (param_3 < 1) {\n    iVar2 = 0;\n  }\n  else {\n    while (uVar5 = param_5, iVar2 = FUN_0001ba1c(param_1,piVar4,2), iVar2 != 0) {\n      if ((piVar4 == (int *)0x0) || (*(code **)(*piVar4 + 4) == (code *)0x0)) {\n        while (iVar2 = (*(code *)PTR_write_000afdb0)(param_1,param_2,param_3), iVar2 == -1) {\n          piVar3 = (int *)(*(code *)PTR___errno_location_000afe90)();\n          if (*piVar3 != 4) goto LAB_0001c20c;\n        }\n      }\n      else {\n        iVar2 = (**(code **)(*piVar4 + 4))(param_1,param_2,param_3,piVar4[1],uVar5);\n      }\n      param_3 = param_3 - iVar2;\n      if (iVar2 < 1) {\n        return iVar2;\n      }\n      param_2 = param_2 + iVar2;\n      if (param_3 < 1) {\n        return iVar2;\n      }\n    }\nLAB_0001c20c:\n    iVar2 = -1;\n  }\n  return iVar2;\n}\n\n" (function_definition "int fd_write(int param_1,int param_2,int param_3,undefined4 param_4,undefined8 param_5)\n\n{\n  undefined *puVar1;\n  int iVar2;\n  int *piVar3;\n  int *piVar4;\n  undefined8 uVar5;\n  \n  puVar1 = PTR_DAT_000af458;\n  piVar4 = *(int **)(PTR_DAT_000af458 + -0xb8);\n  if (piVar4 != (int *)0x0) {\n    if ((*(int *)(PTR_DAT_000af458 + -0x2ff0) == param_1) &&\n       (*(int *)(PTR_DAT_000af458 + -0xec) == *(int *)(PTR_DAT_000af458 + -0xbc))) {\n      piVar4 = *(int **)(PTR_DAT_000af458 + -0xf0);\n    }\n    else {\n      piVar4 = (int *)hash_table_get(piVar4,param_1);\n      *(int *)(puVar1 + -0x2ff0) = param_1;\n      *(undefined4 *)(puVar1 + -0xec) = *(undefined4 *)(puVar1 + -0xbc);\n      *(int **)(PTR_DAT_000af458 + -0xf0) = piVar4;\n    }\n  }\n  if (param_3 < 1) {\n    iVar2 = 0;\n  }\n  else {\n    while (uVar5 = param_5, iVar2 = FUN_0001ba1c(param_1,piVar4,2), iVar2 != 0) {\n      if ((piVar4 == (int *)0x0) || (*(code **)(*piVar4 + 4) == (code *)0x0)) {\n        while (iVar2 = (*(code *)PTR_write_000afdb0)(param_1,param_2,param_3), iVar2 == -1) {\n          piVar3 = (int *)(*(code *)PTR___errno_location_000afe90)();\n          if (*piVar3 != 4) goto LAB_0001c20c;\n        }\n      }\n      else {\n        iVar2 = (**(code **)(*piVar4 + 4))(param_1,param_2,param_3,piVar4[1],uVar5);\n      }\n      param_3 = param_3 - iVar2;\n      if (iVar2 < 1) {\n        return iVar2;\n      }\n      param_2 = param_2 + iVar2;\n      if (param_3 < 1) {\n        return iVar2;\n      }\n    }\nLAB_0001c20c:\n    iVar2 = -1;\n  }\n  return iVar2;\n}" primitive_type (function_declarator "fd_write(int param_1,int param_2,int param_3,undefined4 param_4,undefined8 param_5)" identifier (parameter_list "(int param_1,int param_2,int param_3,undefined4 param_4,undefined8 param_5)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "int param_3" primitive_type identifier) , (parameter_declaration "undefined4 param_4" type_identifier identifier) , (parameter_declaration "undefined8 param_5" type_identifier identifier) ))) (compound_statement "{\n  undefined *puVar1;\n  int iVar2;\n  int *piVar3;\n  int *piVar4;\n  undefined8 uVar5;\n  \n  puVar1 = PTR_DAT_000af458;\n  piVar4 = *(int **)(PTR_DAT_000af458 + -0xb8);\n  if (piVar4 != (int *)0x0) {\n    if ((*(int *)(PTR_DAT_000af458 + -0x2ff0) == param_1) &&\n       (*(int *)(PTR_DAT_000af458 + -0xec) == *(int *)(PTR_DAT_000af458 + -0xbc))) {\n      piVar4 = *(int **)(PTR_DAT_000af458 + -0xf0);\n    }\n    else {\n      piVar4 = (int *)hash_table_get(piVar4,param_1);\n      *(int *)(puVar1 + -0x2ff0) = param_1;\n      *(undefined4 *)(puVar1 + -0xec) = *(undefined4 *)(puVar1 + -0xbc);\n      *(int **)(PTR_DAT_000af458 + -0xf0) = piVar4;\n    }\n  }\n  if (param_3 < 1) {\n    iVar2 = 0;\n  }\n  else {\n    while (uVar5 = param_5, iVar2 = FUN_0001ba1c(param_1,piVar4,2), iVar2 != 0) {\n      if ((piVar4 == (int *)0x0) || (*(code **)(*piVar4 + 4) == (code *)0x0)) {\n        while (iVar2 = (*(code *)PTR_write_000afdb0)(param_1,param_2,param_3), iVar2 == -1) {\n          piVar3 = (int *)(*(code *)PTR___errno_location_000afe90)();\n          if (*piVar3 != 4) goto LAB_0001c20c;\n        }\n      }\n      else {\n        iVar2 = (**(code **)(*piVar4 + 4))(param_1,param_2,param_3,piVar4[1],uVar5);\n      }\n      param_3 = param_3 - iVar2;\n      if (iVar2 < 1) {\n        return iVar2;\n      }\n      param_2 = param_2 + iVar2;\n      if (param_3 < 1) {\n        return iVar2;\n      }\n    }\nLAB_0001c20c:\n    iVar2 = -1;\n  }\n  return iVar2;\n}" { (declaration "undefined *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int *piVar3;" primitive_type (pointer_declarator "*piVar3" * identifier) ;) (declaration "int *piVar4;" primitive_type (pointer_declarator "*piVar4" * identifier) ;) (declaration "undefined8 uVar5;" type_identifier identifier ;) (expression_statement "puVar1 = PTR_DAT_000af458;" (assignment_expression "puVar1 = PTR_DAT_000af458" identifier = identifier) ;) (expression_statement "piVar4 = *(int **)(PTR_DAT_000af458 + -0xb8);" (assignment_expression "piVar4 = *(int **)(PTR_DAT_000af458 + -0xb8)" identifier = (pointer_expression "*(int **)(PTR_DAT_000af458 + -0xb8)" * (cast_expression "(int **)(PTR_DAT_000af458 + -0xb8)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(PTR_DAT_000af458 + -0xb8)" ( (binary_expression "PTR_DAT_000af458 + -0xb8" identifier + number_literal) ))))) ;) (if_statement "if (piVar4 != (int *)0x0) {\n    if ((*(int *)(PTR_DAT_000af458 + -0x2ff0) == param_1) &&\n       (*(int *)(PTR_DAT_000af458 + -0xec) == *(int *)(PTR_DAT_000af458 + -0xbc))) {\n      piVar4 = *(int **)(PTR_DAT_000af458 + -0xf0);\n    }\n    else {\n      piVar4 = (int *)hash_table_get(piVar4,param_1);\n      *(int *)(puVar1 + -0x2ff0) = param_1;\n      *(undefined4 *)(puVar1 + -0xec) = *(undefined4 *)(puVar1 + -0xbc);\n      *(int **)(PTR_DAT_000af458 + -0xf0) = piVar4;\n    }\n  }" if (parenthesized_expression "(piVar4 != (int *)0x0)" ( (binary_expression "piVar4 != (int *)0x0" identifier != (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    if ((*(int *)(PTR_DAT_000af458 + -0x2ff0) == param_1) &&\n       (*(int *)(PTR_DAT_000af458 + -0xec) == *(int *)(PTR_DAT_000af458 + -0xbc))) {\n      piVar4 = *(int **)(PTR_DAT_000af458 + -0xf0);\n    }\n    else {\n      piVar4 = (int *)hash_table_get(piVar4,param_1);\n      *(int *)(puVar1 + -0x2ff0) = param_1;\n      *(undefined4 *)(puVar1 + -0xec) = *(undefined4 *)(puVar1 + -0xbc);\n      *(int **)(PTR_DAT_000af458 + -0xf0) = piVar4;\n    }\n  }" { (if_statement "if ((*(int *)(PTR_DAT_000af458 + -0x2ff0) == param_1) &&\n       (*(int *)(PTR_DAT_000af458 + -0xec) == *(int *)(PTR_DAT_000af458 + -0xbc))) {\n      piVar4 = *(int **)(PTR_DAT_000af458 + -0xf0);\n    }\n    else {\n      piVar4 = (int *)hash_table_get(piVar4,param_1);\n      *(int *)(puVar1 + -0x2ff0) = param_1;\n      *(undefined4 *)(puVar1 + -0xec) = *(undefined4 *)(puVar1 + -0xbc);\n      *(int **)(PTR_DAT_000af458 + -0xf0) = piVar4;\n    }" if (parenthesized_expression "((*(int *)(PTR_DAT_000af458 + -0x2ff0) == param_1) &&\n       (*(int *)(PTR_DAT_000af458 + -0xec) == *(int *)(PTR_DAT_000af458 + -0xbc)))" ( (binary_expression "(*(int *)(PTR_DAT_000af458 + -0x2ff0) == param_1) &&\n       (*(int *)(PTR_DAT_000af458 + -0xec) == *(int *)(PTR_DAT_000af458 + -0xbc))" (parenthesized_expression "(*(int *)(PTR_DAT_000af458 + -0x2ff0) == param_1)" ( (binary_expression "*(int *)(PTR_DAT_000af458 + -0x2ff0) == param_1" (pointer_expression "*(int *)(PTR_DAT_000af458 + -0x2ff0)" * (cast_expression "(int *)(PTR_DAT_000af458 + -0x2ff0)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(PTR_DAT_000af458 + -0x2ff0)" ( (binary_expression "PTR_DAT_000af458 + -0x2ff0" identifier + number_literal) )))) == identifier) )) && (parenthesized_expression "(*(int *)(PTR_DAT_000af458 + -0xec) == *(int *)(PTR_DAT_000af458 + -0xbc))" ( (binary_expression "*(int *)(PTR_DAT_000af458 + -0xec) == *(int *)(PTR_DAT_000af458 + -0xbc)" (pointer_expression "*(int *)(PTR_DAT_000af458 + -0xec)" * (cast_expression "(int *)(PTR_DAT_000af458 + -0xec)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(PTR_DAT_000af458 + -0xec)" ( (binary_expression "PTR_DAT_000af458 + -0xec" identifier + number_literal) )))) == (pointer_expression "*(int *)(PTR_DAT_000af458 + -0xbc)" * (cast_expression "(int *)(PTR_DAT_000af458 + -0xbc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(PTR_DAT_000af458 + -0xbc)" ( (binary_expression "PTR_DAT_000af458 + -0xbc" identifier + number_literal) ))))) ))) )) (compound_statement "{\n      piVar4 = *(int **)(PTR_DAT_000af458 + -0xf0);\n    }" { (expression_statement "piVar4 = *(int **)(PTR_DAT_000af458 + -0xf0);" (assignment_expression "piVar4 = *(int **)(PTR_DAT_000af458 + -0xf0)" identifier = (pointer_expression "*(int **)(PTR_DAT_000af458 + -0xf0)" * (cast_expression "(int **)(PTR_DAT_000af458 + -0xf0)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(PTR_DAT_000af458 + -0xf0)" ( (binary_expression "PTR_DAT_000af458 + -0xf0" identifier + number_literal) ))))) ;) }) (else_clause "else {\n      piVar4 = (int *)hash_table_get(piVar4,param_1);\n      *(int *)(puVar1 + -0x2ff0) = param_1;\n      *(undefined4 *)(puVar1 + -0xec) = *(undefined4 *)(puVar1 + -0xbc);\n      *(int **)(PTR_DAT_000af458 + -0xf0) = piVar4;\n    }" else (compound_statement "{\n      piVar4 = (int *)hash_table_get(piVar4,param_1);\n      *(int *)(puVar1 + -0x2ff0) = param_1;\n      *(undefined4 *)(puVar1 + -0xec) = *(undefined4 *)(puVar1 + -0xbc);\n      *(int **)(PTR_DAT_000af458 + -0xf0) = piVar4;\n    }" { (expression_statement "piVar4 = (int *)hash_table_get(piVar4,param_1);" (assignment_expression "piVar4 = (int *)hash_table_get(piVar4,param_1)" identifier = (cast_expression "(int *)hash_table_get(piVar4,param_1)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "hash_table_get(piVar4,param_1)" identifier (argument_list "(piVar4,param_1)" ( identifier , identifier ))))) ;) (expression_statement "*(int *)(puVar1 + -0x2ff0) = param_1;" (assignment_expression "*(int *)(puVar1 + -0x2ff0) = param_1" (pointer_expression "*(int *)(puVar1 + -0x2ff0)" * (cast_expression "(int *)(puVar1 + -0x2ff0)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar1 + -0x2ff0)" ( (binary_expression "puVar1 + -0x2ff0" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(undefined4 *)(puVar1 + -0xec) = *(undefined4 *)(puVar1 + -0xbc);" (assignment_expression "*(undefined4 *)(puVar1 + -0xec) = *(undefined4 *)(puVar1 + -0xbc)" (pointer_expression "*(undefined4 *)(puVar1 + -0xec)" * (cast_expression "(undefined4 *)(puVar1 + -0xec)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar1 + -0xec)" ( (binary_expression "puVar1 + -0xec" identifier + number_literal) )))) = (pointer_expression "*(undefined4 *)(puVar1 + -0xbc)" * (cast_expression "(undefined4 *)(puVar1 + -0xbc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar1 + -0xbc)" ( (binary_expression "puVar1 + -0xbc" identifier + number_literal) ))))) ;) (expression_statement "*(int **)(PTR_DAT_000af458 + -0xf0) = piVar4;" (assignment_expression "*(int **)(PTR_DAT_000af458 + -0xf0) = piVar4" (pointer_expression "*(int **)(PTR_DAT_000af458 + -0xf0)" * (cast_expression "(int **)(PTR_DAT_000af458 + -0xf0)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(PTR_DAT_000af458 + -0xf0)" ( (binary_expression "PTR_DAT_000af458 + -0xf0" identifier + number_literal) )))) = identifier) ;) }))) })) (if_statement "if (param_3 < 1) {\n    iVar2 = 0;\n  }\n  else {\n    while (uVar5 = param_5, iVar2 = FUN_0001ba1c(param_1,piVar4,2), iVar2 != 0) {\n      if ((piVar4 == (int *)0x0) || (*(code **)(*piVar4 + 4) == (code *)0x0)) {\n        while (iVar2 = (*(code *)PTR_write_000afdb0)(param_1,param_2,param_3), iVar2 == -1) {\n          piVar3 = (int *)(*(code *)PTR___errno_location_000afe90)();\n          if (*piVar3 != 4) goto LAB_0001c20c;\n        }\n      }\n      else {\n        iVar2 = (**(code **)(*piVar4 + 4))(param_1,param_2,param_3,piVar4[1],uVar5);\n      }\n      param_3 = param_3 - iVar2;\n      if (iVar2 < 1) {\n        return iVar2;\n      }\n      param_2 = param_2 + iVar2;\n      if (param_3 < 1) {\n        return iVar2;\n      }\n    }\nLAB_0001c20c:\n    iVar2 = -1;\n  }" if (parenthesized_expression "(param_3 < 1)" ( (binary_expression "param_3 < 1" identifier < number_literal) )) (compound_statement "{\n    iVar2 = 0;\n  }" { (expression_statement "iVar2 = 0;" (assignment_expression "iVar2 = 0" identifier = number_literal) ;) }) (else_clause "else {\n    while (uVar5 = param_5, iVar2 = FUN_0001ba1c(param_1,piVar4,2), iVar2 != 0) {\n      if ((piVar4 == (int *)0x0) || (*(code **)(*piVar4 + 4) == (code *)0x0)) {\n        while (iVar2 = (*(code *)PTR_write_000afdb0)(param_1,param_2,param_3), iVar2 == -1) {\n          piVar3 = (int *)(*(code *)PTR___errno_location_000afe90)();\n          if (*piVar3 != 4) goto LAB_0001c20c;\n        }\n      }\n      else {\n        iVar2 = (**(code **)(*piVar4 + 4))(param_1,param_2,param_3,piVar4[1],uVar5);\n      }\n      param_3 = param_3 - iVar2;\n      if (iVar2 < 1) {\n        return iVar2;\n      }\n      param_2 = param_2 + iVar2;\n      if (param_3 < 1) {\n        return iVar2;\n      }\n    }\nLAB_0001c20c:\n    iVar2 = -1;\n  }" else (compound_statement "{\n    while (uVar5 = param_5, iVar2 = FUN_0001ba1c(param_1,piVar4,2), iVar2 != 0) {\n      if ((piVar4 == (int *)0x0) || (*(code **)(*piVar4 + 4) == (code *)0x0)) {\n        while (iVar2 = (*(code *)PTR_write_000afdb0)(param_1,param_2,param_3), iVar2 == -1) {\n          piVar3 = (int *)(*(code *)PTR___errno_location_000afe90)();\n          if (*piVar3 != 4) goto LAB_0001c20c;\n        }\n      }\n      else {\n        iVar2 = (**(code **)(*piVar4 + 4))(param_1,param_2,param_3,piVar4[1],uVar5);\n      }\n      param_3 = param_3 - iVar2;\n      if (iVar2 < 1) {\n        return iVar2;\n      }\n      param_2 = param_2 + iVar2;\n      if (param_3 < 1) {\n        return iVar2;\n      }\n    }\nLAB_0001c20c:\n    iVar2 = -1;\n  }" { (while_statement "while (uVar5 = param_5, iVar2 = FUN_0001ba1c(param_1,piVar4,2), iVar2 != 0) {\n      if ((piVar4 == (int *)0x0) || (*(code **)(*piVar4 + 4) == (code *)0x0)) {\n        while (iVar2 = (*(code *)PTR_write_000afdb0)(param_1,param_2,param_3), iVar2 == -1) {\n          piVar3 = (int *)(*(code *)PTR___errno_location_000afe90)();\n          if (*piVar3 != 4) goto LAB_0001c20c;\n        }\n      }\n      else {\n        iVar2 = (**(code **)(*piVar4 + 4))(param_1,param_2,param_3,piVar4[1],uVar5);\n      }\n      param_3 = param_3 - iVar2;\n      if (iVar2 < 1) {\n        return iVar2;\n      }\n      param_2 = param_2 + iVar2;\n      if (param_3 < 1) {\n        return iVar2;\n      }\n    }" while (parenthesized_expression "(uVar5 = param_5, iVar2 = FUN_0001ba1c(param_1,piVar4,2), iVar2 != 0)" ( (comma_expression "uVar5 = param_5, iVar2 = FUN_0001ba1c(param_1,piVar4,2), iVar2 != 0" (assignment_expression "uVar5 = param_5" identifier = identifier) , (comma_expression "iVar2 = FUN_0001ba1c(param_1,piVar4,2), iVar2 != 0" (assignment_expression "iVar2 = FUN_0001ba1c(param_1,piVar4,2)" identifier = (call_expression "FUN_0001ba1c(param_1,piVar4,2)" identifier (argument_list "(param_1,piVar4,2)" ( identifier , identifier , number_literal )))) , (binary_expression "iVar2 != 0" identifier != number_literal))) )) (compound_statement "{\n      if ((piVar4 == (int *)0x0) || (*(code **)(*piVar4 + 4) == (code *)0x0)) {\n        while (iVar2 = (*(code *)PTR_write_000afdb0)(param_1,param_2,param_3), iVar2 == -1) {\n          piVar3 = (int *)(*(code *)PTR___errno_location_000afe90)();\n          if (*piVar3 != 4) goto LAB_0001c20c;\n        }\n      }\n      else {\n        iVar2 = (**(code **)(*piVar4 + 4))(param_1,param_2,param_3,piVar4[1],uVar5);\n      }\n      param_3 = param_3 - iVar2;\n      if (iVar2 < 1) {\n        return iVar2;\n      }\n      param_2 = param_2 + iVar2;\n      if (param_3 < 1) {\n        return iVar2;\n      }\n    }" { (if_statement "if ((piVar4 == (int *)0x0) || (*(code **)(*piVar4 + 4) == (code *)0x0)) {\n        while (iVar2 = (*(code *)PTR_write_000afdb0)(param_1,param_2,param_3), iVar2 == -1) {\n          piVar3 = (int *)(*(code *)PTR___errno_location_000afe90)();\n          if (*piVar3 != 4) goto LAB_0001c20c;\n        }\n      }\n      else {\n        iVar2 = (**(code **)(*piVar4 + 4))(param_1,param_2,param_3,piVar4[1],uVar5);\n      }" if (parenthesized_expression "((piVar4 == (int *)0x0) || (*(code **)(*piVar4 + 4) == (code *)0x0))" ( (binary_expression "(piVar4 == (int *)0x0) || (*(code **)(*piVar4 + 4) == (code *)0x0)" (parenthesized_expression "(piVar4 == (int *)0x0)" ( (binary_expression "piVar4 == (int *)0x0" identifier == (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) || (parenthesized_expression "(*(code **)(*piVar4 + 4) == (code *)0x0)" ( (binary_expression "*(code **)(*piVar4 + 4) == (code *)0x0" (pointer_expression "*(code **)(*piVar4 + 4)" * (cast_expression "(code **)(*piVar4 + 4)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*piVar4 + 4)" ( (binary_expression "*piVar4 + 4" (pointer_expression "*piVar4" * identifier) + number_literal) )))) == (cast_expression "(code *)0x0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ))) )) (compound_statement "{\n        while (iVar2 = (*(code *)PTR_write_000afdb0)(param_1,param_2,param_3), iVar2 == -1) {\n          piVar3 = (int *)(*(code *)PTR___errno_location_000afe90)();\n          if (*piVar3 != 4) goto LAB_0001c20c;\n        }\n      }" { (while_statement "while (iVar2 = (*(code *)PTR_write_000afdb0)(param_1,param_2,param_3), iVar2 == -1) {\n          piVar3 = (int *)(*(code *)PTR___errno_location_000afe90)();\n          if (*piVar3 != 4) goto LAB_0001c20c;\n        }" while (parenthesized_expression "(iVar2 = (*(code *)PTR_write_000afdb0)(param_1,param_2,param_3), iVar2 == -1)" ( (comma_expression "iVar2 = (*(code *)PTR_write_000afdb0)(param_1,param_2,param_3), iVar2 == -1" (assignment_expression "iVar2 = (*(code *)PTR_write_000afdb0)(param_1,param_2,param_3)" identifier = (call_expression "(*(code *)PTR_write_000afdb0)(param_1,param_2,param_3)" (parenthesized_expression "(*(code *)PTR_write_000afdb0)" ( (pointer_expression "*(code *)PTR_write_000afdb0" * (cast_expression "(code *)PTR_write_000afdb0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_1,param_2,param_3)" ( identifier , identifier , identifier )))) , (binary_expression "iVar2 == -1" identifier == number_literal)) )) (compound_statement "{\n          piVar3 = (int *)(*(code *)PTR___errno_location_000afe90)();\n          if (*piVar3 != 4) goto LAB_0001c20c;\n        }" { (expression_statement "piVar3 = (int *)(*(code *)PTR___errno_location_000afe90)();" (assignment_expression "piVar3 = (int *)(*(code *)PTR___errno_location_000afe90)()" identifier = (cast_expression "(int *)(*(code *)PTR___errno_location_000afe90)()" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR___errno_location_000afe90)()" (parenthesized_expression "(*(code *)PTR___errno_location_000afe90)" ( (pointer_expression "*(code *)PTR___errno_location_000afe90" * (cast_expression "(code *)PTR___errno_location_000afe90" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))))) ;) (if_statement "if (*piVar3 != 4) goto LAB_0001c20c;" if (parenthesized_expression "(*piVar3 != 4)" ( (binary_expression "*piVar3 != 4" (pointer_expression "*piVar3" * identifier) != number_literal) )) (goto_statement "goto LAB_0001c20c;" goto statement_identifier ;)) })) }) (else_clause "else {\n        iVar2 = (**(code **)(*piVar4 + 4))(param_1,param_2,param_3,piVar4[1],uVar5);\n      }" else (compound_statement "{\n        iVar2 = (**(code **)(*piVar4 + 4))(param_1,param_2,param_3,piVar4[1],uVar5);\n      }" { (expression_statement "iVar2 = (**(code **)(*piVar4 + 4))(param_1,param_2,param_3,piVar4[1],uVar5);" (assignment_expression "iVar2 = (**(code **)(*piVar4 + 4))(param_1,param_2,param_3,piVar4[1],uVar5)" identifier = (call_expression "(**(code **)(*piVar4 + 4))(param_1,param_2,param_3,piVar4[1],uVar5)" (parenthesized_expression "(**(code **)(*piVar4 + 4))" ( (pointer_expression "**(code **)(*piVar4 + 4)" * (pointer_expression "*(code **)(*piVar4 + 4)" * (cast_expression "(code **)(*piVar4 + 4)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*piVar4 + 4)" ( (binary_expression "*piVar4 + 4" (pointer_expression "*piVar4" * identifier) + number_literal) ))))) )) (argument_list "(param_1,param_2,param_3,piVar4[1],uVar5)" ( identifier , identifier , identifier , (subscript_expression "piVar4[1]" identifier [ number_literal ]) , identifier )))) ;) }))) (expression_statement "param_3 = param_3 - iVar2;" (assignment_expression "param_3 = param_3 - iVar2" identifier = (binary_expression "param_3 - iVar2" identifier - identifier)) ;) (if_statement "if (iVar2 < 1) {\n        return iVar2;\n      }" if (parenthesized_expression "(iVar2 < 1)" ( (binary_expression "iVar2 < 1" identifier < number_literal) )) (compound_statement "{\n        return iVar2;\n      }" { (return_statement "return iVar2;" return identifier ;) })) (expression_statement "param_2 = param_2 + iVar2;" (assignment_expression "param_2 = param_2 + iVar2" identifier = (binary_expression "param_2 + iVar2" identifier + identifier)) ;) (if_statement "if (param_3 < 1) {\n        return iVar2;\n      }" if (parenthesized_expression "(param_3 < 1)" ( (binary_expression "param_3 < 1" identifier < number_literal) )) (compound_statement "{\n        return iVar2;\n      }" { (return_statement "return iVar2;" return identifier ;) })) })) (labeled_statement "LAB_0001c20c:\n    iVar2 = -1;" statement_identifier : (expression_statement "iVar2 = -1;" (assignment_expression "iVar2 = -1" identifier = number_literal) ;)) }))) (return_statement "return iVar2;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) == IDENT) )) && (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) == (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( IDENT , IDENT ))))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) }))) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) }) (else_clause else (compound_statement { (while_statement while (parenthesized_expression ( (comma_expression (assignment_expression IDENT = IDENT) , (comma_expression (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , LIT )))) , (binary_expression IDENT != LIT))) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) || (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) + LIT) )))) == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) ))) )) (compound_statement { (while_statement while (parenthesized_expression ( (comma_expression (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT , IDENT , IDENT )))) , (binary_expression IDENT == LIT)) )) (compound_statement { (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 ( ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) != LIT) )) (goto_statement goto statement_identifier ;)) })) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) + LIT) ))))) )) (argument_list ( IDENT , IDENT , IDENT , (subscript_expression IDENT [ LIT ]) , IDENT )))) ;) }))) (expression_statement (assignment_expression IDENT = (binary_expression IDENT - IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (return_statement return IDENT ;) })) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (return_statement return IDENT ;) })) })) (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = LIT) ;)) }))) (return_statement return IDENT ;) })))
(function_definition "int fd_write(int param_1,int param_2,int param_3,undefined4 param_4,undefined8 param_5)\n\n{\n  undefined *puVar1;\n  int iVar2;\n  int *piVar3;\n  int *piVar4;\n  undefined8 uVar5;\n  \n  puVar1 = PTR_DAT_000af458;\n  piVar4 = *(int **)(PTR_DAT_000af458 + -0xb8);\n  if (piVar4 != (int *)0x0) {\n    if ((*(int *)(PTR_DAT_000af458 + -0x2ff0) == param_1) &&\n       (*(int *)(PTR_DAT_000af458 + -0xec) == *(int *)(PTR_DAT_000af458 + -0xbc))) {\n      piVar4 = *(int **)(PTR_DAT_000af458 + -0xf0);\n    }\n    else {\n      piVar4 = (int *)hash_table_get(piVar4,param_1);\n      *(int *)(puVar1 + -0x2ff0) = param_1;\n      *(undefined4 *)(puVar1 + -0xec) = *(undefined4 *)(puVar1 + -0xbc);\n      *(int **)(PTR_DAT_000af458 + -0xf0) = piVar4;\n    }\n  }\n  if (param_3 < 1) {\n    iVar2 = 0;\n  }\n  else {\n    while (uVar5 = param_5, iVar2 = FUN_0001ba1c(param_1,piVar4,2), iVar2 != 0) {\n      if ((piVar4 == (int *)0x0) || (*(code **)(*piVar4 + 4) == (code *)0x0)) {\n        while (iVar2 = (*(code *)PTR_write_000afdb0)(param_1,param_2,param_3), iVar2 == -1) {\n          piVar3 = (int *)(*(code *)PTR___errno_location_000afe90)();\n          if (*piVar3 != 4) goto LAB_0001c20c;\n        }\n      }\n      else {\n        iVar2 = (**(code **)(*piVar4 + 4))(param_1,param_2,param_3,piVar4[1],uVar5);\n      }\n      param_3 = param_3 - iVar2;\n      if (iVar2 < 1) {\n        return iVar2;\n      }\n      param_2 = param_2 + iVar2;\n      if (param_3 < 1) {\n        return iVar2;\n      }\n    }\nLAB_0001c20c:\n    iVar2 = -1;\n  }\n  return iVar2;\n}" (primitive_type "int") (function_declarator "fd_write(int param_1,int param_2,int param_3,undefined4 param_4,undefined8 param_5)" (identifier "fd_write") (parameter_list "(int param_1,int param_2,int param_3,undefined4 param_4,undefined8 param_5)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) (, ",") (parameter_declaration "int param_3" (primitive_type "int") (identifier "param_3")) (, ",") (parameter_declaration "undefined4 param_4" (type_identifier "undefined4") (identifier "param_4")) (, ",") (parameter_declaration "undefined8 param_5" (type_identifier "undefined8") (identifier "param_5")) () ")"))) (compound_statement "{\n  undefined *puVar1;\n  int iVar2;\n  int *piVar3;\n  int *piVar4;\n  undefined8 uVar5;\n  \n  puVar1 = PTR_DAT_000af458;\n  piVar4 = *(int **)(PTR_DAT_000af458 + -0xb8);\n  if (piVar4 != (int *)0x0) {\n    if ((*(int *)(PTR_DAT_000af458 + -0x2ff0) == param_1) &&\n       (*(int *)(PTR_DAT_000af458 + -0xec) == *(int *)(PTR_DAT_000af458 + -0xbc))) {\n      piVar4 = *(int **)(PTR_DAT_000af458 + -0xf0);\n    }\n    else {\n      piVar4 = (int *)hash_table_get(piVar4,param_1);\n      *(int *)(puVar1 + -0x2ff0) = param_1;\n      *(undefined4 *)(puVar1 + -0xec) = *(undefined4 *)(puVar1 + -0xbc);\n      *(int **)(PTR_DAT_000af458 + -0xf0) = piVar4;\n    }\n  }\n  if (param_3 < 1) {\n    iVar2 = 0;\n  }\n  else {\n    while (uVar5 = param_5, iVar2 = FUN_0001ba1c(param_1,piVar4,2), iVar2 != 0) {\n      if ((piVar4 == (int *)0x0) || (*(code **)(*piVar4 + 4) == (code *)0x0)) {\n        while (iVar2 = (*(code *)PTR_write_000afdb0)(param_1,param_2,param_3), iVar2 == -1) {\n          piVar3 = (int *)(*(code *)PTR___errno_location_000afe90)();\n          if (*piVar3 != 4) goto LAB_0001c20c;\n        }\n      }\n      else {\n        iVar2 = (**(code **)(*piVar4 + 4))(param_1,param_2,param_3,piVar4[1],uVar5);\n      }\n      param_3 = param_3 - iVar2;\n      if (iVar2 < 1) {\n        return iVar2;\n      }\n      param_2 = param_2 + iVar2;\n      if (param_3 < 1) {\n        return iVar2;\n      }\n    }\nLAB_0001c20c:\n    iVar2 = -1;\n  }\n  return iVar2;\n}" ({ "{") (declaration "undefined *puVar1;" (type_identifier "undefined") (pointer_declarator "*puVar1" (* "*") (identifier "puVar1")) (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "int *piVar3;" (primitive_type "int") (pointer_declarator "*piVar3" (* "*") (identifier "piVar3")) (; ";")) (declaration "int *piVar4;" (primitive_type "int") (pointer_declarator "*piVar4" (* "*") (identifier "piVar4")) (; ";")) (declaration "undefined8 uVar5;" (type_identifier "undefined8") (identifier "uVar5") (; ";")) (expression_statement "puVar1 = PTR_DAT_000af458;" (assignment_expression "puVar1 = PTR_DAT_000af458" (identifier "puVar1") (= "=") (identifier "PTR_DAT_000af458")) (; ";")) (expression_statement "piVar4 = *(int **)(PTR_DAT_000af458 + -0xb8);" (assignment_expression "piVar4 = *(int **)(PTR_DAT_000af458 + -0xb8)" (identifier "piVar4") (= "=") (pointer_expression "*(int **)(PTR_DAT_000af458 + -0xb8)" (* "*") (cast_expression "(int **)(PTR_DAT_000af458 + -0xb8)" (( "(") (type_descriptor "int **" (primitive_type "int") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(PTR_DAT_000af458 + -0xb8)" (( "(") (binary_expression "PTR_DAT_000af458 + -0xb8" (identifier "PTR_DAT_000af458") (+ "+") (number_literal "-0xb8")) () ")"))))) (; ";")) (if_statement "if (piVar4 != (int *)0x0) {\n    if ((*(int *)(PTR_DAT_000af458 + -0x2ff0) == param_1) &&\n       (*(int *)(PTR_DAT_000af458 + -0xec) == *(int *)(PTR_DAT_000af458 + -0xbc))) {\n      piVar4 = *(int **)(PTR_DAT_000af458 + -0xf0);\n    }\n    else {\n      piVar4 = (int *)hash_table_get(piVar4,param_1);\n      *(int *)(puVar1 + -0x2ff0) = param_1;\n      *(undefined4 *)(puVar1 + -0xec) = *(undefined4 *)(puVar1 + -0xbc);\n      *(int **)(PTR_DAT_000af458 + -0xf0) = piVar4;\n    }\n  }" (if "if") (parenthesized_expression "(piVar4 != (int *)0x0)" (( "(") (binary_expression "piVar4 != (int *)0x0" (identifier "piVar4") (!= "!=") (cast_expression "(int *)0x0" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    if ((*(int *)(PTR_DAT_000af458 + -0x2ff0) == param_1) &&\n       (*(int *)(PTR_DAT_000af458 + -0xec) == *(int *)(PTR_DAT_000af458 + -0xbc))) {\n      piVar4 = *(int **)(PTR_DAT_000af458 + -0xf0);\n    }\n    else {\n      piVar4 = (int *)hash_table_get(piVar4,param_1);\n      *(int *)(puVar1 + -0x2ff0) = param_1;\n      *(undefined4 *)(puVar1 + -0xec) = *(undefined4 *)(puVar1 + -0xbc);\n      *(int **)(PTR_DAT_000af458 + -0xf0) = piVar4;\n    }\n  }" ({ "{") (if_statement "if ((*(int *)(PTR_DAT_000af458 + -0x2ff0) == param_1) &&\n       (*(int *)(PTR_DAT_000af458 + -0xec) == *(int *)(PTR_DAT_000af458 + -0xbc))) {\n      piVar4 = *(int **)(PTR_DAT_000af458 + -0xf0);\n    }\n    else {\n      piVar4 = (int *)hash_table_get(piVar4,param_1);\n      *(int *)(puVar1 + -0x2ff0) = param_1;\n      *(undefined4 *)(puVar1 + -0xec) = *(undefined4 *)(puVar1 + -0xbc);\n      *(int **)(PTR_DAT_000af458 + -0xf0) = piVar4;\n    }" (if "if") (parenthesized_expression "((*(int *)(PTR_DAT_000af458 + -0x2ff0) == param_1) &&\n       (*(int *)(PTR_DAT_000af458 + -0xec) == *(int *)(PTR_DAT_000af458 + -0xbc)))" (( "(") (binary_expression "(*(int *)(PTR_DAT_000af458 + -0x2ff0) == param_1) &&\n       (*(int *)(PTR_DAT_000af458 + -0xec) == *(int *)(PTR_DAT_000af458 + -0xbc))" (parenthesized_expression "(*(int *)(PTR_DAT_000af458 + -0x2ff0) == param_1)" (( "(") (binary_expression "*(int *)(PTR_DAT_000af458 + -0x2ff0) == param_1" (pointer_expression "*(int *)(PTR_DAT_000af458 + -0x2ff0)" (* "*") (cast_expression "(int *)(PTR_DAT_000af458 + -0x2ff0)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(PTR_DAT_000af458 + -0x2ff0)" (( "(") (binary_expression "PTR_DAT_000af458 + -0x2ff0" (identifier "PTR_DAT_000af458") (+ "+") (number_literal "-0x2ff0")) () ")")))) (== "==") (identifier "param_1")) () ")")) (&& "&&") (parenthesized_expression "(*(int *)(PTR_DAT_000af458 + -0xec) == *(int *)(PTR_DAT_000af458 + -0xbc))" (( "(") (binary_expression "*(int *)(PTR_DAT_000af458 + -0xec) == *(int *)(PTR_DAT_000af458 + -0xbc)" (pointer_expression "*(int *)(PTR_DAT_000af458 + -0xec)" (* "*") (cast_expression "(int *)(PTR_DAT_000af458 + -0xec)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(PTR_DAT_000af458 + -0xec)" (( "(") (binary_expression "PTR_DAT_000af458 + -0xec" (identifier "PTR_DAT_000af458") (+ "+") (number_literal "-0xec")) () ")")))) (== "==") (pointer_expression "*(int *)(PTR_DAT_000af458 + -0xbc)" (* "*") (cast_expression "(int *)(PTR_DAT_000af458 + -0xbc)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(PTR_DAT_000af458 + -0xbc)" (( "(") (binary_expression "PTR_DAT_000af458 + -0xbc" (identifier "PTR_DAT_000af458") (+ "+") (number_literal "-0xbc")) () ")"))))) () ")"))) () ")")) (compound_statement "{\n      piVar4 = *(int **)(PTR_DAT_000af458 + -0xf0);\n    }" ({ "{") (expression_statement "piVar4 = *(int **)(PTR_DAT_000af458 + -0xf0);" (assignment_expression "piVar4 = *(int **)(PTR_DAT_000af458 + -0xf0)" (identifier "piVar4") (= "=") (pointer_expression "*(int **)(PTR_DAT_000af458 + -0xf0)" (* "*") (cast_expression "(int **)(PTR_DAT_000af458 + -0xf0)" (( "(") (type_descriptor "int **" (primitive_type "int") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(PTR_DAT_000af458 + -0xf0)" (( "(") (binary_expression "PTR_DAT_000af458 + -0xf0" (identifier "PTR_DAT_000af458") (+ "+") (number_literal "-0xf0")) () ")"))))) (; ";")) (} "}")) (else_clause "else {\n      piVar4 = (int *)hash_table_get(piVar4,param_1);\n      *(int *)(puVar1 + -0x2ff0) = param_1;\n      *(undefined4 *)(puVar1 + -0xec) = *(undefined4 *)(puVar1 + -0xbc);\n      *(int **)(PTR_DAT_000af458 + -0xf0) = piVar4;\n    }" (else "else") (compound_statement "{\n      piVar4 = (int *)hash_table_get(piVar4,param_1);\n      *(int *)(puVar1 + -0x2ff0) = param_1;\n      *(undefined4 *)(puVar1 + -0xec) = *(undefined4 *)(puVar1 + -0xbc);\n      *(int **)(PTR_DAT_000af458 + -0xf0) = piVar4;\n    }" ({ "{") (expression_statement "piVar4 = (int *)hash_table_get(piVar4,param_1);" (assignment_expression "piVar4 = (int *)hash_table_get(piVar4,param_1)" (identifier "piVar4") (= "=") (cast_expression "(int *)hash_table_get(piVar4,param_1)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "hash_table_get(piVar4,param_1)" (identifier "hash_table_get") (argument_list "(piVar4,param_1)" (( "(") (identifier "piVar4") (, ",") (identifier "param_1") () ")"))))) (; ";")) (expression_statement "*(int *)(puVar1 + -0x2ff0) = param_1;" (assignment_expression "*(int *)(puVar1 + -0x2ff0) = param_1" (pointer_expression "*(int *)(puVar1 + -0x2ff0)" (* "*") (cast_expression "(int *)(puVar1 + -0x2ff0)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(puVar1 + -0x2ff0)" (( "(") (binary_expression "puVar1 + -0x2ff0" (identifier "puVar1") (+ "+") (number_literal "-0x2ff0")) () ")")))) (= "=") (identifier "param_1")) (; ";")) (expression_statement "*(undefined4 *)(puVar1 + -0xec) = *(undefined4 *)(puVar1 + -0xbc);" (assignment_expression "*(undefined4 *)(puVar1 + -0xec) = *(undefined4 *)(puVar1 + -0xbc)" (pointer_expression "*(undefined4 *)(puVar1 + -0xec)" (* "*") (cast_expression "(undefined4 *)(puVar1 + -0xec)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(puVar1 + -0xec)" (( "(") (binary_expression "puVar1 + -0xec" (identifier "puVar1") (+ "+") (number_literal "-0xec")) () ")")))) (= "=") (pointer_expression "*(undefined4 *)(puVar1 + -0xbc)" (* "*") (cast_expression "(undefined4 *)(puVar1 + -0xbc)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(puVar1 + -0xbc)" (( "(") (binary_expression "puVar1 + -0xbc" (identifier "puVar1") (+ "+") (number_literal "-0xbc")) () ")"))))) (; ";")) (expression_statement "*(int **)(PTR_DAT_000af458 + -0xf0) = piVar4;" (assignment_expression "*(int **)(PTR_DAT_000af458 + -0xf0) = piVar4" (pointer_expression "*(int **)(PTR_DAT_000af458 + -0xf0)" (* "*") (cast_expression "(int **)(PTR_DAT_000af458 + -0xf0)" (( "(") (type_descriptor "int **" (primitive_type "int") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(PTR_DAT_000af458 + -0xf0)" (( "(") (binary_expression "PTR_DAT_000af458 + -0xf0" (identifier "PTR_DAT_000af458") (+ "+") (number_literal "-0xf0")) () ")")))) (= "=") (identifier "piVar4")) (; ";")) (} "}")))) (} "}"))) (if_statement "if (param_3 < 1) {\n    iVar2 = 0;\n  }\n  else {\n    while (uVar5 = param_5, iVar2 = FUN_0001ba1c(param_1,piVar4,2), iVar2 != 0) {\n      if ((piVar4 == (int *)0x0) || (*(code **)(*piVar4 + 4) == (code *)0x0)) {\n        while (iVar2 = (*(code *)PTR_write_000afdb0)(param_1,param_2,param_3), iVar2 == -1) {\n          piVar3 = (int *)(*(code *)PTR___errno_location_000afe90)();\n          if (*piVar3 != 4) goto LAB_0001c20c;\n        }\n      }\n      else {\n        iVar2 = (**(code **)(*piVar4 + 4))(param_1,param_2,param_3,piVar4[1],uVar5);\n      }\n      param_3 = param_3 - iVar2;\n      if (iVar2 < 1) {\n        return iVar2;\n      }\n      param_2 = param_2 + iVar2;\n      if (param_3 < 1) {\n        return iVar2;\n      }\n    }\nLAB_0001c20c:\n    iVar2 = -1;\n  }" (if "if") (parenthesized_expression "(param_3 < 1)" (( "(") (binary_expression "param_3 < 1" (identifier "param_3") (< "<") (number_literal "1")) () ")")) (compound_statement "{\n    iVar2 = 0;\n  }" ({ "{") (expression_statement "iVar2 = 0;" (assignment_expression "iVar2 = 0" (identifier "iVar2") (= "=") (number_literal "0")) (; ";")) (} "}")) (else_clause "else {\n    while (uVar5 = param_5, iVar2 = FUN_0001ba1c(param_1,piVar4,2), iVar2 != 0) {\n      if ((piVar4 == (int *)0x0) || (*(code **)(*piVar4 + 4) == (code *)0x0)) {\n        while (iVar2 = (*(code *)PTR_write_000afdb0)(param_1,param_2,param_3), iVar2 == -1) {\n          piVar3 = (int *)(*(code *)PTR___errno_location_000afe90)();\n          if (*piVar3 != 4) goto LAB_0001c20c;\n        }\n      }\n      else {\n        iVar2 = (**(code **)(*piVar4 + 4))(param_1,param_2,param_3,piVar4[1],uVar5);\n      }\n      param_3 = param_3 - iVar2;\n      if (iVar2 < 1) {\n        return iVar2;\n      }\n      param_2 = param_2 + iVar2;\n      if (param_3 < 1) {\n        return iVar2;\n      }\n    }\nLAB_0001c20c:\n    iVar2 = -1;\n  }" (else "else") (compound_statement "{\n    while (uVar5 = param_5, iVar2 = FUN_0001ba1c(param_1,piVar4,2), iVar2 != 0) {\n      if ((piVar4 == (int *)0x0) || (*(code **)(*piVar4 + 4) == (code *)0x0)) {\n        while (iVar2 = (*(code *)PTR_write_000afdb0)(param_1,param_2,param_3), iVar2 == -1) {\n          piVar3 = (int *)(*(code *)PTR___errno_location_000afe90)();\n          if (*piVar3 != 4) goto LAB_0001c20c;\n        }\n      }\n      else {\n        iVar2 = (**(code **)(*piVar4 + 4))(param_1,param_2,param_3,piVar4[1],uVar5);\n      }\n      param_3 = param_3 - iVar2;\n      if (iVar2 < 1) {\n        return iVar2;\n      }\n      param_2 = param_2 + iVar2;\n      if (param_3 < 1) {\n        return iVar2;\n      }\n    }\nLAB_0001c20c:\n    iVar2 = -1;\n  }" ({ "{") (while_statement "while (uVar5 = param_5, iVar2 = FUN_0001ba1c(param_1,piVar4,2), iVar2 != 0) {\n      if ((piVar4 == (int *)0x0) || (*(code **)(*piVar4 + 4) == (code *)0x0)) {\n        while (iVar2 = (*(code *)PTR_write_000afdb0)(param_1,param_2,param_3), iVar2 == -1) {\n          piVar3 = (int *)(*(code *)PTR___errno_location_000afe90)();\n          if (*piVar3 != 4) goto LAB_0001c20c;\n        }\n      }\n      else {\n        iVar2 = (**(code **)(*piVar4 + 4))(param_1,param_2,param_3,piVar4[1],uVar5);\n      }\n      param_3 = param_3 - iVar2;\n      if (iVar2 < 1) {\n        return iVar2;\n      }\n      param_2 = param_2 + iVar2;\n      if (param_3 < 1) {\n        return iVar2;\n      }\n    }" (while "while") (parenthesized_expression "(uVar5 = param_5, iVar2 = FUN_0001ba1c(param_1,piVar4,2), iVar2 != 0)" (( "(") (comma_expression "uVar5 = param_5, iVar2 = FUN_0001ba1c(param_1,piVar4,2), iVar2 != 0" (assignment_expression "uVar5 = param_5" (identifier "uVar5") (= "=") (identifier "param_5")) (, ",") (comma_expression "iVar2 = FUN_0001ba1c(param_1,piVar4,2), iVar2 != 0" (assignment_expression "iVar2 = FUN_0001ba1c(param_1,piVar4,2)" (identifier "iVar2") (= "=") (call_expression "FUN_0001ba1c(param_1,piVar4,2)" (identifier "FUN_0001ba1c") (argument_list "(param_1,piVar4,2)" (( "(") (identifier "param_1") (, ",") (identifier "piVar4") (, ",") (number_literal "2") () ")")))) (, ",") (binary_expression "iVar2 != 0" (identifier "iVar2") (!= "!=") (number_literal "0")))) () ")")) (compound_statement "{\n      if ((piVar4 == (int *)0x0) || (*(code **)(*piVar4 + 4) == (code *)0x0)) {\n        while (iVar2 = (*(code *)PTR_write_000afdb0)(param_1,param_2,param_3), iVar2 == -1) {\n          piVar3 = (int *)(*(code *)PTR___errno_location_000afe90)();\n          if (*piVar3 != 4) goto LAB_0001c20c;\n        }\n      }\n      else {\n        iVar2 = (**(code **)(*piVar4 + 4))(param_1,param_2,param_3,piVar4[1],uVar5);\n      }\n      param_3 = param_3 - iVar2;\n      if (iVar2 < 1) {\n        return iVar2;\n      }\n      param_2 = param_2 + iVar2;\n      if (param_3 < 1) {\n        return iVar2;\n      }\n    }" ({ "{") (if_statement "if ((piVar4 == (int *)0x0) || (*(code **)(*piVar4 + 4) == (code *)0x0)) {\n        while (iVar2 = (*(code *)PTR_write_000afdb0)(param_1,param_2,param_3), iVar2 == -1) {\n          piVar3 = (int *)(*(code *)PTR___errno_location_000afe90)();\n          if (*piVar3 != 4) goto LAB_0001c20c;\n        }\n      }\n      else {\n        iVar2 = (**(code **)(*piVar4 + 4))(param_1,param_2,param_3,piVar4[1],uVar5);\n      }" (if "if") (parenthesized_expression "((piVar4 == (int *)0x0) || (*(code **)(*piVar4 + 4) == (code *)0x0))" (( "(") (binary_expression "(piVar4 == (int *)0x0) || (*(code **)(*piVar4 + 4) == (code *)0x0)" (parenthesized_expression "(piVar4 == (int *)0x0)" (( "(") (binary_expression "piVar4 == (int *)0x0" (identifier "piVar4") (== "==") (cast_expression "(int *)0x0" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (|| "||") (parenthesized_expression "(*(code **)(*piVar4 + 4) == (code *)0x0)" (( "(") (binary_expression "*(code **)(*piVar4 + 4) == (code *)0x0" (pointer_expression "*(code **)(*piVar4 + 4)" (* "*") (cast_expression "(code **)(*piVar4 + 4)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(*piVar4 + 4)" (( "(") (binary_expression "*piVar4 + 4" (pointer_expression "*piVar4" (* "*") (identifier "piVar4")) (+ "+") (number_literal "4")) () ")")))) (== "==") (cast_expression "(code *)0x0" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")"))) () ")")) (compound_statement "{\n        while (iVar2 = (*(code *)PTR_write_000afdb0)(param_1,param_2,param_3), iVar2 == -1) {\n          piVar3 = (int *)(*(code *)PTR___errno_location_000afe90)();\n          if (*piVar3 != 4) goto LAB_0001c20c;\n        }\n      }" ({ "{") (while_statement "while (iVar2 = (*(code *)PTR_write_000afdb0)(param_1,param_2,param_3), iVar2 == -1) {\n          piVar3 = (int *)(*(code *)PTR___errno_location_000afe90)();\n          if (*piVar3 != 4) goto LAB_0001c20c;\n        }" (while "while") (parenthesized_expression "(iVar2 = (*(code *)PTR_write_000afdb0)(param_1,param_2,param_3), iVar2 == -1)" (( "(") (comma_expression "iVar2 = (*(code *)PTR_write_000afdb0)(param_1,param_2,param_3), iVar2 == -1" (assignment_expression "iVar2 = (*(code *)PTR_write_000afdb0)(param_1,param_2,param_3)" (identifier "iVar2") (= "=") (call_expression "(*(code *)PTR_write_000afdb0)(param_1,param_2,param_3)" (parenthesized_expression "(*(code *)PTR_write_000afdb0)" (( "(") (pointer_expression "*(code *)PTR_write_000afdb0" (* "*") (cast_expression "(code *)PTR_write_000afdb0" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_write_000afdb0"))) () ")")) (argument_list "(param_1,param_2,param_3)" (( "(") (identifier "param_1") (, ",") (identifier "param_2") (, ",") (identifier "param_3") () ")")))) (, ",") (binary_expression "iVar2 == -1" (identifier "iVar2") (== "==") (number_literal "-1"))) () ")")) (compound_statement "{\n          piVar3 = (int *)(*(code *)PTR___errno_location_000afe90)();\n          if (*piVar3 != 4) goto LAB_0001c20c;\n        }" ({ "{") (expression_statement "piVar3 = (int *)(*(code *)PTR___errno_location_000afe90)();" (assignment_expression "piVar3 = (int *)(*(code *)PTR___errno_location_000afe90)()" (identifier "piVar3") (= "=") (cast_expression "(int *)(*(code *)PTR___errno_location_000afe90)()" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "(*(code *)PTR___errno_location_000afe90)()" (parenthesized_expression "(*(code *)PTR___errno_location_000afe90)" (( "(") (pointer_expression "*(code *)PTR___errno_location_000afe90" (* "*") (cast_expression "(code *)PTR___errno_location_000afe90" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR___errno_location_000afe90"))) () ")")) (argument_list "()" (( "(") () ")"))))) (; ";")) (if_statement "if (*piVar3 != 4) goto LAB_0001c20c;" (if "if") (parenthesized_expression "(*piVar3 != 4)" (( "(") (binary_expression "*piVar3 != 4" (pointer_expression "*piVar3" (* "*") (identifier "piVar3")) (!= "!=") (number_literal "4")) () ")")) (goto_statement "goto LAB_0001c20c;" (goto "goto") (statement_identifier "LAB_0001c20c") (; ";"))) (} "}"))) (} "}")) (else_clause "else {\n        iVar2 = (**(code **)(*piVar4 + 4))(param_1,param_2,param_3,piVar4[1],uVar5);\n      }" (else "else") (compound_statement "{\n        iVar2 = (**(code **)(*piVar4 + 4))(param_1,param_2,param_3,piVar4[1],uVar5);\n      }" ({ "{") (expression_statement "iVar2 = (**(code **)(*piVar4 + 4))(param_1,param_2,param_3,piVar4[1],uVar5);" (assignment_expression "iVar2 = (**(code **)(*piVar4 + 4))(param_1,param_2,param_3,piVar4[1],uVar5)" (identifier "iVar2") (= "=") (call_expression "(**(code **)(*piVar4 + 4))(param_1,param_2,param_3,piVar4[1],uVar5)" (parenthesized_expression "(**(code **)(*piVar4 + 4))" (( "(") (pointer_expression "**(code **)(*piVar4 + 4)" (* "*") (pointer_expression "*(code **)(*piVar4 + 4)" (* "*") (cast_expression "(code **)(*piVar4 + 4)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(*piVar4 + 4)" (( "(") (binary_expression "*piVar4 + 4" (pointer_expression "*piVar4" (* "*") (identifier "piVar4")) (+ "+") (number_literal "4")) () ")"))))) () ")")) (argument_list "(param_1,param_2,param_3,piVar4[1],uVar5)" (( "(") (identifier "param_1") (, ",") (identifier "param_2") (, ",") (identifier "param_3") (, ",") (subscript_expression "piVar4[1]" (identifier "piVar4") ([ "[") (number_literal "1") (] "]")) (, ",") (identifier "uVar5") () ")")))) (; ";")) (} "}")))) (expression_statement "param_3 = param_3 - iVar2;" (assignment_expression "param_3 = param_3 - iVar2" (identifier "param_3") (= "=") (binary_expression "param_3 - iVar2" (identifier "param_3") (- "-") (identifier "iVar2"))) (; ";")) (if_statement "if (iVar2 < 1) {\n        return iVar2;\n      }" (if "if") (parenthesized_expression "(iVar2 < 1)" (( "(") (binary_expression "iVar2 < 1" (identifier "iVar2") (< "<") (number_literal "1")) () ")")) (compound_statement "{\n        return iVar2;\n      }" ({ "{") (return_statement "return iVar2;" (return "return") (identifier "iVar2") (; ";")) (} "}"))) (expression_statement "param_2 = param_2 + iVar2;" (assignment_expression "param_2 = param_2 + iVar2" (identifier "param_2") (= "=") (binary_expression "param_2 + iVar2" (identifier "param_2") (+ "+") (identifier "iVar2"))) (; ";")) (if_statement "if (param_3 < 1) {\n        return iVar2;\n      }" (if "if") (parenthesized_expression "(param_3 < 1)" (( "(") (binary_expression "param_3 < 1" (identifier "param_3") (< "<") (number_literal "1")) () ")")) (compound_statement "{\n        return iVar2;\n      }" ({ "{") (return_statement "return iVar2;" (return "return") (identifier "iVar2") (; ";")) (} "}"))) (} "}"))) (labeled_statement "LAB_0001c20c:\n    iVar2 = -1;" (statement_identifier "LAB_0001c20c") (: ":") (expression_statement "iVar2 = -1;" (assignment_expression "iVar2 = -1" (identifier "iVar2") (= "=") (number_literal "-1")) (; ";"))) (} "}")))) (return_statement "return iVar2;" (return "return") (identifier "iVar2") (; ";")) (} "}")))

int function_1(int var_3,char *var_10,int var_6,double timeout)

{
  type_1 *var_5;
  type_2 extraout_var;
  type_3 _Var4;
  int var_9;
  int *piVar3;
  type_4 *var_2;
  type_5 in_stack_00000010;
  type_5 uVar5;
  
  var_5 = var_1;
  var_2 = *(type_4 **)(var_1 + -0xb8);
  if (var_2 != (type_4 *)0x0) {
    if ((*(int *)(var_1 + -0x2ff0) == var_3) &&
       (*(int *)(var_1 + -0xec) ==
        *(int *)(var_1 + -0xbc))) {
      var_2 = *(type_4 **)(var_1 + -0xf0);
    }
    else {
      var_2 = (type_4 *)var_4(var_2,(void *)var_3);
      *(int *)(var_5 + -0x2ff0) = var_3;
      *(type_6 *)(var_5 + -0xec) = *(type_6 *)(var_5 + -0xbc);
      *(type_4 **)(var_1 + -0xf0) = var_2;
    }
  }
  if (var_6 < 1) {
    var_9 = 0;
  }
  else {
    while (uVar5 = in_stack_00000010, _Var4 = var_7(var_3,(type_7 *)var_2,2,timeout),
          var_8(extraout_var,_Var4) != 0) {
      if ((var_2 == (type_4 *)0x0) || (*(type_8 **)(var_2->hash_function + 4) == (type_8 *)0x0)) {
        while (var_9 = (*(type_8 *)PTR_write_000afdb0)(var_3,var_10,var_6), var_9 == -1) {
          piVar3 = (int *)(*(type_8 *)PTR___errno_location_000afe90)();
          if (*piVar3 != 4) goto LAB_0001c20c;
        }
      }
      else {
        var_9 = (**(type_8 **)(var_2->hash_function + 4))(var_3,var_10,var_6,var_2->test_function,uVar5);
      }
      var_6 = var_6 - var_9;
      if (var_9 < 1) {
        return var_9;
      }
      var_10 = var_10 + var_9;
      if (var_6 < 1) {
        return var_9;
      }
    }
LAB_0001c20c:
    var_9 = -1;
  }
  return var_9;
}


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

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

{
  undefined *puVar1;
  int iVar2;
  int *piVar3;
  int *piVar4;
  undefined8 uVar5;
  
  puVar1 = PTR_DAT_000af458;
  piVar4 = *(int **)(PTR_DAT_000af458 + -0xb8);
  if (piVar4 != (int *)0x0) {
    if ((*(int *)(PTR_DAT_000af458 + -0x2ff0) == param_1) &&
       (*(int *)(PTR_DAT_000af458 + -0xec) == *(int *)(PTR_DAT_000af458 + -0xbc))) {
      piVar4 = *(int **)(PTR_DAT_000af458 + -0xf0);
    }
    else {
      piVar4 = (int *)hash_table_get(piVar4,param_1);
      *(int *)(puVar1 + -0x2ff0) = param_1;
      *(undefined4 *)(puVar1 + -0xec) = *(undefined4 *)(puVar1 + -0xbc);
      *(int **)(PTR_DAT_000af458 + -0xf0) = piVar4;
    }
  }
  if (param_3 < 1) {
    iVar2 = 0;
  }
  else {
    while (uVar5 = param_5, iVar2 = FUN_0001ba1c(param_1,piVar4,2), iVar2 != 0) {
      if ((piVar4 == (int *)0x0) || (*(code **)(*piVar4 + 4) == (code *)0x0)) {
        while (iVar2 = (*(code *)PTR_write_000afdb0)(param_1,param_2,param_3), iVar2 == -1) {
          piVar3 = (int *)(*(code *)PTR___errno_location_000afe90)();
          if (*piVar3 != 4) goto LAB_0001c20c;
        }
      }
      else {
        iVar2 = (**(code **)(*piVar4 + 4))(param_1,param_2,param_3,piVar4[1],uVar5);
      }
      param_3 = param_3 - iVar2;
      if (iVar2 < 1) {
        return iVar2;
      }
      param_2 = param_2 + iVar2;
      if (param_3 < 1) {
        return iVar2;
      }
    }
LAB_0001c20c:
    iVar2 = -1;
  }
  return iVar2;
}

