
void request_set_header(request *req,char *name,char *value,rp release_policy)

{
  int iVar1;
  request_header *prVar2;
  int iVar3;
  int iVar4;
  
  if (value == (char *)0x0) {
    if ((release_policy & ~rel_value) == rel_name) {
      (*(code *)PTR_free_000b7d34)(name);
    }
  }
  else {
    iVar4 = req->hcount;
    if (0 < iVar4) {
      prVar2 = req->headers;
      iVar3 = 0;
      do {
        iVar1 = (*(code *)PTR_c_strcasecmp_000b76fc)(name,prVar2->name);
        iVar3 = iVar3 + 1;
        if (iVar1 == 0) {
          release_header(prVar2);
          prVar2->name = name;
          prVar2->value = value;
          prVar2->release_policy = release_policy;
          return;
        }
        prVar2 = prVar2 + 1;
      } while (iVar3 != iVar4);
    }
    iVar3 = req->hcapacity;
    if (iVar3 <= iVar4) {
      req->hcapacity = iVar3 * 2;
      prVar2 = (request_header *)(*(code *)PTR_xrealloc_000b7740)(req->headers,iVar3 * 0x18);
      req->headers = prVar2;
    }
    iVar4 = req->hcount;
    req->hcount = iVar4 + 1;
    prVar2 = req->headers + iVar4;
    prVar2->name = name;
    prVar2->value = value;
    prVar2->release_policy = release_policy;
  }
  return;
}



void FUN_0003616c(int param_1,undefined4 param_2,int param_3,uint param_4)

{
  int iVar1;
  undefined4 uVar2;
  undefined4 *puVar3;
  int iVar4;
  int iVar5;
  
  if (param_3 == 0) {
    if ((param_4 & 0xfffffffd) == 1) {
      (*(code *)PTR_free_000b7d34)(param_2);
    }
  }
  else {
    iVar5 = *(int *)(param_1 + 0xc);
    if (0 < iVar5) {
      puVar3 = *(undefined4 **)(param_1 + 8);
      iVar4 = 0;
      do {
        iVar1 = (*(code *)PTR_c_strcasecmp_000b76fc)(param_2,*puVar3);
        iVar4 = iVar4 + 1;
        if (iVar1 == 0) {
          FUN_000357b8(puVar3);
          *puVar3 = param_2;
          puVar3[1] = param_3;
          puVar3[2] = param_4;
          return;
        }
        puVar3 = puVar3 + 3;
      } while (iVar4 != iVar5);
    }
    iVar4 = *(int *)(param_1 + 0x10);
    if (iVar4 <= iVar5) {
      *(int *)(param_1 + 0x10) = iVar4 * 2;
      uVar2 = (*(code *)PTR_xrealloc_000b7740)(*(undefined4 *)(param_1 + 8),iVar4 * 0x18);
      *(undefined4 *)(param_1 + 8) = uVar2;
    }
    iVar5 = *(int *)(param_1 + 0xc);
    *(int *)(param_1 + 0xc) = iVar5 + 1;
    puVar3 = (undefined4 *)(*(int *)(param_1 + 8) + iVar5 * 0xc);
    *puVar3 = param_2;
    puVar3[1] = param_3;
    puVar3[2] = param_4;
  }
  return;
}


lui gp,0x9
addiu gp,gp,-0x6d3c
addu gp,gp,t9
addiu sp,sp,-0x40
sw ra,0x3c(sp)
sw s7,0x38(sp)
sw s6,0x34(sp)
sw s5,0x30(sp)
sw s4,0x2c(sp)
sw s3,0x28(sp)
sw s2,0x24(sp)
sw s1,0x20(sp)
sw s0,0x1c(sp)
sw gp,0x10(sp)
or s3,a1,zero
beq a2,zero,0x00036258
_or s6,a3,zero
or s4,a0,zero
lw s2,0xc(a0)
blez s2,0x000361f0
_or s5,a2,zero
lw s0,0x8(a0)
or s1,zero,zero
lw a1,0x0(s0)
or a0,s3,zero
lw t9,-0x7d34(gp)
jalr t9
_nop
lw gp,0x10(sp)
beq v0,zero,0x00036284
_addiu s1,s1,0x1
bne s1,s2,0x000361c8
_addiu s0,s0,0xc
lw v0,0x10(s4)
slt s2,s2,v0
beq s2,zero,0x000362ac
_sll a1,v0,0x1
lw v0,0x8(s4)
lw a0,0xc(s4)
addiu v1,a0,0x1
sw v1,0xc(s4)
sll v1,a0,0x1
addu v1,v1,a0
sll v1,v1,0x2
addu v0,v0,v1
sw s3,0x0(v0)
sw s5,0x4(v0)
sw s6,0x8(v0)
lw ra,0x3c(sp)
lw s7,0x38(sp)
lw s6,0x34(sp)
lw s5,0x30(sp)
lw s4,0x2c(sp)
lw s3,0x28(sp)
lw s2,0x24(sp)
lw s1,0x20(sp)
lw s0,0x1c(sp)
jr ra
_addiu sp,sp,0x40
li v0,-0x3
and s6,a3,v0
li v0,0x1
bne s6,v0,0x0003622c
_or a0,a1,zero
lw t9,-0x76fc(gp)
jalr t9
_nop
lw gp,0x10(sp)
b 0x00036230
_lw ra,0x3c(sp)
or a0,s0,zero
lw t9,-0x7d58(gp)
addiu t9,t9,0x57b8
bal 0x000357b8
_nop
lw gp,0x10(sp)
sw s3,0x0(s0)
sw s5,0x4(s0)
b 0x0003622c
_sw s6,0x8(s0)
sw a1,0x10(s4)
sll v0,v0,0x2
addu a1,v0,a1
sll a1,a1,0x2
lw a0,0x8(s4)
lw t9,-0x7cf0(gp)
jalr t9
_nop
lw gp,0x10(sp)
b 0x00036200
_sw v0,0x8(s4)
(translation_unit "void FUN_0003616c(int param_1,undefined4 param_2,int param_3,uint param_4)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  undefined4 *puVar3;\n  int iVar4;\n  int iVar5;\n  \n  if (param_3 == 0) {\n    if ((param_4 & 0xfffffffd) == 1) {\n      (*(code *)PTR_free_000b7d34)(param_2);\n    }\n  }\n  else {\n    iVar5 = *(int *)(param_1 + 0xc);\n    if (0 < iVar5) {\n      puVar3 = *(undefined4 **)(param_1 + 8);\n      iVar4 = 0;\n      do {\n        iVar1 = (*(code *)PTR_c_strcasecmp_000b76fc)(param_2,*puVar3);\n        iVar4 = iVar4 + 1;\n        if (iVar1 == 0) {\n          FUN_000357b8(puVar3);\n          *puVar3 = param_2;\n          puVar3[1] = param_3;\n          puVar3[2] = param_4;\n          return;\n        }\n        puVar3 = puVar3 + 3;\n      } while (iVar4 != iVar5);\n    }\n    iVar4 = *(int *)(param_1 + 0x10);\n    if (iVar4 <= iVar5) {\n      *(int *)(param_1 + 0x10) = iVar4 * 2;\n      uVar2 = (*(code *)PTR_xrealloc_000b7740)(*(undefined4 *)(param_1 + 8),iVar4 * 0x18);\n      *(undefined4 *)(param_1 + 8) = uVar2;\n    }\n    iVar5 = *(int *)(param_1 + 0xc);\n    *(int *)(param_1 + 0xc) = iVar5 + 1;\n    puVar3 = (undefined4 *)(*(int *)(param_1 + 8) + iVar5 * 0xc);\n    *puVar3 = param_2;\n    puVar3[1] = param_3;\n    puVar3[2] = param_4;\n  }\n  return;\n}\n\n" (function_definition "void FUN_0003616c(int param_1,undefined4 param_2,int param_3,uint param_4)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  undefined4 *puVar3;\n  int iVar4;\n  int iVar5;\n  \n  if (param_3 == 0) {\n    if ((param_4 & 0xfffffffd) == 1) {\n      (*(code *)PTR_free_000b7d34)(param_2);\n    }\n  }\n  else {\n    iVar5 = *(int *)(param_1 + 0xc);\n    if (0 < iVar5) {\n      puVar3 = *(undefined4 **)(param_1 + 8);\n      iVar4 = 0;\n      do {\n        iVar1 = (*(code *)PTR_c_strcasecmp_000b76fc)(param_2,*puVar3);\n        iVar4 = iVar4 + 1;\n        if (iVar1 == 0) {\n          FUN_000357b8(puVar3);\n          *puVar3 = param_2;\n          puVar3[1] = param_3;\n          puVar3[2] = param_4;\n          return;\n        }\n        puVar3 = puVar3 + 3;\n      } while (iVar4 != iVar5);\n    }\n    iVar4 = *(int *)(param_1 + 0x10);\n    if (iVar4 <= iVar5) {\n      *(int *)(param_1 + 0x10) = iVar4 * 2;\n      uVar2 = (*(code *)PTR_xrealloc_000b7740)(*(undefined4 *)(param_1 + 8),iVar4 * 0x18);\n      *(undefined4 *)(param_1 + 8) = uVar2;\n    }\n    iVar5 = *(int *)(param_1 + 0xc);\n    *(int *)(param_1 + 0xc) = iVar5 + 1;\n    puVar3 = (undefined4 *)(*(int *)(param_1 + 8) + iVar5 * 0xc);\n    *puVar3 = param_2;\n    puVar3[1] = param_3;\n    puVar3[2] = param_4;\n  }\n  return;\n}" primitive_type (function_declarator "FUN_0003616c(int param_1,undefined4 param_2,int param_3,uint param_4)" identifier (parameter_list "(int param_1,undefined4 param_2,int param_3,uint param_4)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "int param_3" primitive_type identifier) , (parameter_declaration "uint param_4" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  undefined4 uVar2;\n  undefined4 *puVar3;\n  int iVar4;\n  int iVar5;\n  \n  if (param_3 == 0) {\n    if ((param_4 & 0xfffffffd) == 1) {\n      (*(code *)PTR_free_000b7d34)(param_2);\n    }\n  }\n  else {\n    iVar5 = *(int *)(param_1 + 0xc);\n    if (0 < iVar5) {\n      puVar3 = *(undefined4 **)(param_1 + 8);\n      iVar4 = 0;\n      do {\n        iVar1 = (*(code *)PTR_c_strcasecmp_000b76fc)(param_2,*puVar3);\n        iVar4 = iVar4 + 1;\n        if (iVar1 == 0) {\n          FUN_000357b8(puVar3);\n          *puVar3 = param_2;\n          puVar3[1] = param_3;\n          puVar3[2] = param_4;\n          return;\n        }\n        puVar3 = puVar3 + 3;\n      } while (iVar4 != iVar5);\n    }\n    iVar4 = *(int *)(param_1 + 0x10);\n    if (iVar4 <= iVar5) {\n      *(int *)(param_1 + 0x10) = iVar4 * 2;\n      uVar2 = (*(code *)PTR_xrealloc_000b7740)(*(undefined4 *)(param_1 + 8),iVar4 * 0x18);\n      *(undefined4 *)(param_1 + 8) = uVar2;\n    }\n    iVar5 = *(int *)(param_1 + 0xc);\n    *(int *)(param_1 + 0xc) = iVar5 + 1;\n    puVar3 = (undefined4 *)(*(int *)(param_1 + 8) + iVar5 * 0xc);\n    *puVar3 = param_2;\n    puVar3[1] = param_3;\n    puVar3[2] = param_4;\n  }\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (declaration "undefined4 *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "int iVar5;" primitive_type identifier ;) (if_statement "if (param_3 == 0) {\n    if ((param_4 & 0xfffffffd) == 1) {\n      (*(code *)PTR_free_000b7d34)(param_2);\n    }\n  }\n  else {\n    iVar5 = *(int *)(param_1 + 0xc);\n    if (0 < iVar5) {\n      puVar3 = *(undefined4 **)(param_1 + 8);\n      iVar4 = 0;\n      do {\n        iVar1 = (*(code *)PTR_c_strcasecmp_000b76fc)(param_2,*puVar3);\n        iVar4 = iVar4 + 1;\n        if (iVar1 == 0) {\n          FUN_000357b8(puVar3);\n          *puVar3 = param_2;\n          puVar3[1] = param_3;\n          puVar3[2] = param_4;\n          return;\n        }\n        puVar3 = puVar3 + 3;\n      } while (iVar4 != iVar5);\n    }\n    iVar4 = *(int *)(param_1 + 0x10);\n    if (iVar4 <= iVar5) {\n      *(int *)(param_1 + 0x10) = iVar4 * 2;\n      uVar2 = (*(code *)PTR_xrealloc_000b7740)(*(undefined4 *)(param_1 + 8),iVar4 * 0x18);\n      *(undefined4 *)(param_1 + 8) = uVar2;\n    }\n    iVar5 = *(int *)(param_1 + 0xc);\n    *(int *)(param_1 + 0xc) = iVar5 + 1;\n    puVar3 = (undefined4 *)(*(int *)(param_1 + 8) + iVar5 * 0xc);\n    *puVar3 = param_2;\n    puVar3[1] = param_3;\n    puVar3[2] = param_4;\n  }" if (parenthesized_expression "(param_3 == 0)" ( (binary_expression "param_3 == 0" identifier == number_literal) )) (compound_statement "{\n    if ((param_4 & 0xfffffffd) == 1) {\n      (*(code *)PTR_free_000b7d34)(param_2);\n    }\n  }" { (if_statement "if ((param_4 & 0xfffffffd) == 1) {\n      (*(code *)PTR_free_000b7d34)(param_2);\n    }" if (parenthesized_expression "((param_4 & 0xfffffffd) == 1)" ( (binary_expression "(param_4 & 0xfffffffd) == 1" (parenthesized_expression "(param_4 & 0xfffffffd)" ( (binary_expression "param_4 & 0xfffffffd" identifier & number_literal) )) == number_literal) )) (compound_statement "{\n      (*(code *)PTR_free_000b7d34)(param_2);\n    }" { (expression_statement "(*(code *)PTR_free_000b7d34)(param_2);" (call_expression "(*(code *)PTR_free_000b7d34)(param_2)" (parenthesized_expression "(*(code *)PTR_free_000b7d34)" ( (pointer_expression "*(code *)PTR_free_000b7d34" * (cast_expression "(code *)PTR_free_000b7d34" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_2)" ( identifier ))) ;) })) }) (else_clause "else {\n    iVar5 = *(int *)(param_1 + 0xc);\n    if (0 < iVar5) {\n      puVar3 = *(undefined4 **)(param_1 + 8);\n      iVar4 = 0;\n      do {\n        iVar1 = (*(code *)PTR_c_strcasecmp_000b76fc)(param_2,*puVar3);\n        iVar4 = iVar4 + 1;\n        if (iVar1 == 0) {\n          FUN_000357b8(puVar3);\n          *puVar3 = param_2;\n          puVar3[1] = param_3;\n          puVar3[2] = param_4;\n          return;\n        }\n        puVar3 = puVar3 + 3;\n      } while (iVar4 != iVar5);\n    }\n    iVar4 = *(int *)(param_1 + 0x10);\n    if (iVar4 <= iVar5) {\n      *(int *)(param_1 + 0x10) = iVar4 * 2;\n      uVar2 = (*(code *)PTR_xrealloc_000b7740)(*(undefined4 *)(param_1 + 8),iVar4 * 0x18);\n      *(undefined4 *)(param_1 + 8) = uVar2;\n    }\n    iVar5 = *(int *)(param_1 + 0xc);\n    *(int *)(param_1 + 0xc) = iVar5 + 1;\n    puVar3 = (undefined4 *)(*(int *)(param_1 + 8) + iVar5 * 0xc);\n    *puVar3 = param_2;\n    puVar3[1] = param_3;\n    puVar3[2] = param_4;\n  }" else (compound_statement "{\n    iVar5 = *(int *)(param_1 + 0xc);\n    if (0 < iVar5) {\n      puVar3 = *(undefined4 **)(param_1 + 8);\n      iVar4 = 0;\n      do {\n        iVar1 = (*(code *)PTR_c_strcasecmp_000b76fc)(param_2,*puVar3);\n        iVar4 = iVar4 + 1;\n        if (iVar1 == 0) {\n          FUN_000357b8(puVar3);\n          *puVar3 = param_2;\n          puVar3[1] = param_3;\n          puVar3[2] = param_4;\n          return;\n        }\n        puVar3 = puVar3 + 3;\n      } while (iVar4 != iVar5);\n    }\n    iVar4 = *(int *)(param_1 + 0x10);\n    if (iVar4 <= iVar5) {\n      *(int *)(param_1 + 0x10) = iVar4 * 2;\n      uVar2 = (*(code *)PTR_xrealloc_000b7740)(*(undefined4 *)(param_1 + 8),iVar4 * 0x18);\n      *(undefined4 *)(param_1 + 8) = uVar2;\n    }\n    iVar5 = *(int *)(param_1 + 0xc);\n    *(int *)(param_1 + 0xc) = iVar5 + 1;\n    puVar3 = (undefined4 *)(*(int *)(param_1 + 8) + iVar5 * 0xc);\n    *puVar3 = param_2;\n    puVar3[1] = param_3;\n    puVar3[2] = param_4;\n  }" { (expression_statement "iVar5 = *(int *)(param_1 + 0xc);" (assignment_expression "iVar5 = *(int *)(param_1 + 0xc)" identifier = (pointer_expression "*(int *)(param_1 + 0xc)" * (cast_expression "(int *)(param_1 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) ))))) ;) (if_statement "if (0 < iVar5) {\n      puVar3 = *(undefined4 **)(param_1 + 8);\n      iVar4 = 0;\n      do {\n        iVar1 = (*(code *)PTR_c_strcasecmp_000b76fc)(param_2,*puVar3);\n        iVar4 = iVar4 + 1;\n        if (iVar1 == 0) {\n          FUN_000357b8(puVar3);\n          *puVar3 = param_2;\n          puVar3[1] = param_3;\n          puVar3[2] = param_4;\n          return;\n        }\n        puVar3 = puVar3 + 3;\n      } while (iVar4 != iVar5);\n    }" if (parenthesized_expression "(0 < iVar5)" ( (binary_expression "0 < iVar5" number_literal < identifier) )) (compound_statement "{\n      puVar3 = *(undefined4 **)(param_1 + 8);\n      iVar4 = 0;\n      do {\n        iVar1 = (*(code *)PTR_c_strcasecmp_000b76fc)(param_2,*puVar3);\n        iVar4 = iVar4 + 1;\n        if (iVar1 == 0) {\n          FUN_000357b8(puVar3);\n          *puVar3 = param_2;\n          puVar3[1] = param_3;\n          puVar3[2] = param_4;\n          return;\n        }\n        puVar3 = puVar3 + 3;\n      } while (iVar4 != iVar5);\n    }" { (expression_statement "puVar3 = *(undefined4 **)(param_1 + 8);" (assignment_expression "puVar3 = *(undefined4 **)(param_1 + 8)" identifier = (pointer_expression "*(undefined4 **)(param_1 + 8)" * (cast_expression "(undefined4 **)(param_1 + 8)" ( (type_descriptor "undefined4 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 8)" ( (binary_expression "param_1 + 8" identifier + number_literal) ))))) ;) (expression_statement "iVar4 = 0;" (assignment_expression "iVar4 = 0" identifier = number_literal) ;) (do_statement "do {\n        iVar1 = (*(code *)PTR_c_strcasecmp_000b76fc)(param_2,*puVar3);\n        iVar4 = iVar4 + 1;\n        if (iVar1 == 0) {\n          FUN_000357b8(puVar3);\n          *puVar3 = param_2;\n          puVar3[1] = param_3;\n          puVar3[2] = param_4;\n          return;\n        }\n        puVar3 = puVar3 + 3;\n      } while (iVar4 != iVar5);" do (compound_statement "{\n        iVar1 = (*(code *)PTR_c_strcasecmp_000b76fc)(param_2,*puVar3);\n        iVar4 = iVar4 + 1;\n        if (iVar1 == 0) {\n          FUN_000357b8(puVar3);\n          *puVar3 = param_2;\n          puVar3[1] = param_3;\n          puVar3[2] = param_4;\n          return;\n        }\n        puVar3 = puVar3 + 3;\n      }" { (expression_statement "iVar1 = (*(code *)PTR_c_strcasecmp_000b76fc)(param_2,*puVar3);" (assignment_expression "iVar1 = (*(code *)PTR_c_strcasecmp_000b76fc)(param_2,*puVar3)" identifier = (call_expression "(*(code *)PTR_c_strcasecmp_000b76fc)(param_2,*puVar3)" (parenthesized_expression "(*(code *)PTR_c_strcasecmp_000b76fc)" ( (pointer_expression "*(code *)PTR_c_strcasecmp_000b76fc" * (cast_expression "(code *)PTR_c_strcasecmp_000b76fc" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_2,*puVar3)" ( identifier , (pointer_expression "*puVar3" * identifier) )))) ;) (expression_statement "iVar4 = iVar4 + 1;" (assignment_expression "iVar4 = iVar4 + 1" identifier = (binary_expression "iVar4 + 1" identifier + number_literal)) ;) (if_statement "if (iVar1 == 0) {\n          FUN_000357b8(puVar3);\n          *puVar3 = param_2;\n          puVar3[1] = param_3;\n          puVar3[2] = param_4;\n          return;\n        }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n          FUN_000357b8(puVar3);\n          *puVar3 = param_2;\n          puVar3[1] = param_3;\n          puVar3[2] = param_4;\n          return;\n        }" { (expression_statement "FUN_000357b8(puVar3);" (call_expression "FUN_000357b8(puVar3)" identifier (argument_list "(puVar3)" ( identifier ))) ;) (expression_statement "*puVar3 = param_2;" (assignment_expression "*puVar3 = param_2" (pointer_expression "*puVar3" * identifier) = identifier) ;) (expression_statement "puVar3[1] = param_3;" (assignment_expression "puVar3[1] = param_3" (subscript_expression "puVar3[1]" identifier [ number_literal ]) = identifier) ;) (expression_statement "puVar3[2] = param_4;" (assignment_expression "puVar3[2] = param_4" (subscript_expression "puVar3[2]" identifier [ number_literal ]) = identifier) ;) (return_statement "return;" return ;) })) (expression_statement "puVar3 = puVar3 + 3;" (assignment_expression "puVar3 = puVar3 + 3" identifier = (binary_expression "puVar3 + 3" identifier + number_literal)) ;) }) while (parenthesized_expression "(iVar4 != iVar5)" ( (binary_expression "iVar4 != iVar5" identifier != identifier) )) ;) })) (expression_statement "iVar4 = *(int *)(param_1 + 0x10);" (assignment_expression "iVar4 = *(int *)(param_1 + 0x10)" identifier = (pointer_expression "*(int *)(param_1 + 0x10)" * (cast_expression "(int *)(param_1 + 0x10)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) ))))) ;) (if_statement "if (iVar4 <= iVar5) {\n      *(int *)(param_1 + 0x10) = iVar4 * 2;\n      uVar2 = (*(code *)PTR_xrealloc_000b7740)(*(undefined4 *)(param_1 + 8),iVar4 * 0x18);\n      *(undefined4 *)(param_1 + 8) = uVar2;\n    }" if (parenthesized_expression "(iVar4 <= iVar5)" ( (binary_expression "iVar4 <= iVar5" identifier <= identifier) )) (compound_statement "{\n      *(int *)(param_1 + 0x10) = iVar4 * 2;\n      uVar2 = (*(code *)PTR_xrealloc_000b7740)(*(undefined4 *)(param_1 + 8),iVar4 * 0x18);\n      *(undefined4 *)(param_1 + 8) = uVar2;\n    }" { (expression_statement "*(int *)(param_1 + 0x10) = iVar4 * 2;" (assignment_expression "*(int *)(param_1 + 0x10) = iVar4 * 2" (pointer_expression "*(int *)(param_1 + 0x10)" * (cast_expression "(int *)(param_1 + 0x10)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) )))) = (binary_expression "iVar4 * 2" identifier * number_literal)) ;) (expression_statement "uVar2 = (*(code *)PTR_xrealloc_000b7740)(*(undefined4 *)(param_1 + 8),iVar4 * 0x18);" (assignment_expression "uVar2 = (*(code *)PTR_xrealloc_000b7740)(*(undefined4 *)(param_1 + 8),iVar4 * 0x18)" identifier = (call_expression "(*(code *)PTR_xrealloc_000b7740)(*(undefined4 *)(param_1 + 8),iVar4 * 0x18)" (parenthesized_expression "(*(code *)PTR_xrealloc_000b7740)" ( (pointer_expression "*(code *)PTR_xrealloc_000b7740" * (cast_expression "(code *)PTR_xrealloc_000b7740" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(*(undefined4 *)(param_1 + 8),iVar4 * 0x18)" ( (pointer_expression "*(undefined4 *)(param_1 + 8)" * (cast_expression "(undefined4 *)(param_1 + 8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 8)" ( (binary_expression "param_1 + 8" identifier + number_literal) )))) , (binary_expression "iVar4 * 0x18" identifier * number_literal) )))) ;) (expression_statement "*(undefined4 *)(param_1 + 8) = uVar2;" (assignment_expression "*(undefined4 *)(param_1 + 8) = uVar2" (pointer_expression "*(undefined4 *)(param_1 + 8)" * (cast_expression "(undefined4 *)(param_1 + 8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 8)" ( (binary_expression "param_1 + 8" identifier + number_literal) )))) = identifier) ;) })) (expression_statement "iVar5 = *(int *)(param_1 + 0xc);" (assignment_expression "iVar5 = *(int *)(param_1 + 0xc)" identifier = (pointer_expression "*(int *)(param_1 + 0xc)" * (cast_expression "(int *)(param_1 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) ))))) ;) (expression_statement "*(int *)(param_1 + 0xc) = iVar5 + 1;" (assignment_expression "*(int *)(param_1 + 0xc) = iVar5 + 1" (pointer_expression "*(int *)(param_1 + 0xc)" * (cast_expression "(int *)(param_1 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) )))) = (binary_expression "iVar5 + 1" identifier + number_literal)) ;) (expression_statement "puVar3 = (undefined4 *)(*(int *)(param_1 + 8) + iVar5 * 0xc);" (assignment_expression "puVar3 = (undefined4 *)(*(int *)(param_1 + 8) + iVar5 * 0xc)" identifier = (cast_expression "(undefined4 *)(*(int *)(param_1 + 8) + iVar5 * 0xc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(param_1 + 8) + iVar5 * 0xc)" ( (binary_expression "*(int *)(param_1 + 8) + iVar5 * 0xc" (pointer_expression "*(int *)(param_1 + 8)" * (cast_expression "(int *)(param_1 + 8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 8)" ( (binary_expression "param_1 + 8" identifier + number_literal) )))) + (binary_expression "iVar5 * 0xc" identifier * number_literal)) )))) ;) (expression_statement "*puVar3 = param_2;" (assignment_expression "*puVar3 = param_2" (pointer_expression "*puVar3" * identifier) = identifier) ;) (expression_statement "puVar3[1] = param_3;" (assignment_expression "puVar3[1] = param_3" (subscript_expression "puVar3[1]" identifier [ number_literal ]) = identifier) ;) (expression_statement "puVar3[2] = param_4;" (assignment_expression "puVar3[2] = param_4" (subscript_expression "puVar3[2]" identifier [ number_literal ]) = identifier) ;) }))) (return_statement "return;" return ;) })))
(translation_unit "void request_set_header(request *req,char *name,char *value,rp release_policy)\n\n{\n  int iVar1;\n  request_header *prVar2;\n  int iVar3;\n  int iVar4;\n  \n  if (value == (char *)0x0) {\n    if ((release_policy & ~rel_value) == rel_name) {\n      (*(code *)PTR_free_000b7d34)(name);\n    }\n  }\n  else {\n    iVar4 = req->hcount;\n    if (0 < iVar4) {\n      prVar2 = req->headers;\n      iVar3 = 0;\n      do {\n        iVar1 = (*(code *)PTR_c_strcasecmp_000b76fc)(name,prVar2->name);\n        iVar3 = iVar3 + 1;\n        if (iVar1 == 0) {\n          release_header(prVar2);\n          prVar2->name = name;\n          prVar2->value = value;\n          prVar2->release_policy = release_policy;\n          return;\n        }\n        prVar2 = prVar2 + 1;\n      } while (iVar3 != iVar4);\n    }\n    iVar3 = req->hcapacity;\n    if (iVar3 <= iVar4) {\n      req->hcapacity = iVar3 * 2;\n      prVar2 = (request_header *)(*(code *)PTR_xrealloc_000b7740)(req->headers,iVar3 * 0x18);\n      req->headers = prVar2;\n    }\n    iVar4 = req->hcount;\n    req->hcount = iVar4 + 1;\n    prVar2 = req->headers + iVar4;\n    prVar2->name = name;\n    prVar2->value = value;\n    prVar2->release_policy = release_policy;\n  }\n  return;\n}\n\n" (function_definition "void request_set_header(request *req,char *name,char *value,rp release_policy)\n\n{\n  int iVar1;\n  request_header *prVar2;\n  int iVar3;\n  int iVar4;\n  \n  if (value == (char *)0x0) {\n    if ((release_policy & ~rel_value) == rel_name) {\n      (*(code *)PTR_free_000b7d34)(name);\n    }\n  }\n  else {\n    iVar4 = req->hcount;\n    if (0 < iVar4) {\n      prVar2 = req->headers;\n      iVar3 = 0;\n      do {\n        iVar1 = (*(code *)PTR_c_strcasecmp_000b76fc)(name,prVar2->name);\n        iVar3 = iVar3 + 1;\n        if (iVar1 == 0) {\n          release_header(prVar2);\n          prVar2->name = name;\n          prVar2->value = value;\n          prVar2->release_policy = release_policy;\n          return;\n        }\n        prVar2 = prVar2 + 1;\n      } while (iVar3 != iVar4);\n    }\n    iVar3 = req->hcapacity;\n    if (iVar3 <= iVar4) {\n      req->hcapacity = iVar3 * 2;\n      prVar2 = (request_header *)(*(code *)PTR_xrealloc_000b7740)(req->headers,iVar3 * 0x18);\n      req->headers = prVar2;\n    }\n    iVar4 = req->hcount;\n    req->hcount = iVar4 + 1;\n    prVar2 = req->headers + iVar4;\n    prVar2->name = name;\n    prVar2->value = value;\n    prVar2->release_policy = release_policy;\n  }\n  return;\n}" primitive_type (function_declarator "request_set_header(request *req,char *name,char *value,rp release_policy)" identifier (parameter_list "(request *req,char *name,char *value,rp release_policy)" ( (parameter_declaration "request *req" type_identifier (pointer_declarator "*req" * identifier)) , (parameter_declaration "char *name" primitive_type (pointer_declarator "*name" * identifier)) , (parameter_declaration "char *value" primitive_type (pointer_declarator "*value" * identifier)) , (parameter_declaration "rp release_policy" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  request_header *prVar2;\n  int iVar3;\n  int iVar4;\n  \n  if (value == (char *)0x0) {\n    if ((release_policy & ~rel_value) == rel_name) {\n      (*(code *)PTR_free_000b7d34)(name);\n    }\n  }\n  else {\n    iVar4 = req->hcount;\n    if (0 < iVar4) {\n      prVar2 = req->headers;\n      iVar3 = 0;\n      do {\n        iVar1 = (*(code *)PTR_c_strcasecmp_000b76fc)(name,prVar2->name);\n        iVar3 = iVar3 + 1;\n        if (iVar1 == 0) {\n          release_header(prVar2);\n          prVar2->name = name;\n          prVar2->value = value;\n          prVar2->release_policy = release_policy;\n          return;\n        }\n        prVar2 = prVar2 + 1;\n      } while (iVar3 != iVar4);\n    }\n    iVar3 = req->hcapacity;\n    if (iVar3 <= iVar4) {\n      req->hcapacity = iVar3 * 2;\n      prVar2 = (request_header *)(*(code *)PTR_xrealloc_000b7740)(req->headers,iVar3 * 0x18);\n      req->headers = prVar2;\n    }\n    iVar4 = req->hcount;\n    req->hcount = iVar4 + 1;\n    prVar2 = req->headers + iVar4;\n    prVar2->name = name;\n    prVar2->value = value;\n    prVar2->release_policy = release_policy;\n  }\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "request_header *prVar2;" type_identifier (pointer_declarator "*prVar2" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (if_statement "if (value == (char *)0x0) {\n    if ((release_policy & ~rel_value) == rel_name) {\n      (*(code *)PTR_free_000b7d34)(name);\n    }\n  }\n  else {\n    iVar4 = req->hcount;\n    if (0 < iVar4) {\n      prVar2 = req->headers;\n      iVar3 = 0;\n      do {\n        iVar1 = (*(code *)PTR_c_strcasecmp_000b76fc)(name,prVar2->name);\n        iVar3 = iVar3 + 1;\n        if (iVar1 == 0) {\n          release_header(prVar2);\n          prVar2->name = name;\n          prVar2->value = value;\n          prVar2->release_policy = release_policy;\n          return;\n        }\n        prVar2 = prVar2 + 1;\n      } while (iVar3 != iVar4);\n    }\n    iVar3 = req->hcapacity;\n    if (iVar3 <= iVar4) {\n      req->hcapacity = iVar3 * 2;\n      prVar2 = (request_header *)(*(code *)PTR_xrealloc_000b7740)(req->headers,iVar3 * 0x18);\n      req->headers = prVar2;\n    }\n    iVar4 = req->hcount;\n    req->hcount = iVar4 + 1;\n    prVar2 = req->headers + iVar4;\n    prVar2->name = name;\n    prVar2->value = value;\n    prVar2->release_policy = release_policy;\n  }" if (parenthesized_expression "(value == (char *)0x0)" ( (binary_expression "value == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    if ((release_policy & ~rel_value) == rel_name) {\n      (*(code *)PTR_free_000b7d34)(name);\n    }\n  }" { (if_statement "if ((release_policy & ~rel_value) == rel_name) {\n      (*(code *)PTR_free_000b7d34)(name);\n    }" if (parenthesized_expression "((release_policy & ~rel_value) == rel_name)" ( (binary_expression "(release_policy & ~rel_value) == rel_name" (parenthesized_expression "(release_policy & ~rel_value)" ( (binary_expression "release_policy & ~rel_value" identifier & (unary_expression "~rel_value" ~ identifier)) )) == identifier) )) (compound_statement "{\n      (*(code *)PTR_free_000b7d34)(name);\n    }" { (expression_statement "(*(code *)PTR_free_000b7d34)(name);" (call_expression "(*(code *)PTR_free_000b7d34)(name)" (parenthesized_expression "(*(code *)PTR_free_000b7d34)" ( (pointer_expression "*(code *)PTR_free_000b7d34" * (cast_expression "(code *)PTR_free_000b7d34" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(name)" ( identifier ))) ;) })) }) (else_clause "else {\n    iVar4 = req->hcount;\n    if (0 < iVar4) {\n      prVar2 = req->headers;\n      iVar3 = 0;\n      do {\n        iVar1 = (*(code *)PTR_c_strcasecmp_000b76fc)(name,prVar2->name);\n        iVar3 = iVar3 + 1;\n        if (iVar1 == 0) {\n          release_header(prVar2);\n          prVar2->name = name;\n          prVar2->value = value;\n          prVar2->release_policy = release_policy;\n          return;\n        }\n        prVar2 = prVar2 + 1;\n      } while (iVar3 != iVar4);\n    }\n    iVar3 = req->hcapacity;\n    if (iVar3 <= iVar4) {\n      req->hcapacity = iVar3 * 2;\n      prVar2 = (request_header *)(*(code *)PTR_xrealloc_000b7740)(req->headers,iVar3 * 0x18);\n      req->headers = prVar2;\n    }\n    iVar4 = req->hcount;\n    req->hcount = iVar4 + 1;\n    prVar2 = req->headers + iVar4;\n    prVar2->name = name;\n    prVar2->value = value;\n    prVar2->release_policy = release_policy;\n  }" else (compound_statement "{\n    iVar4 = req->hcount;\n    if (0 < iVar4) {\n      prVar2 = req->headers;\n      iVar3 = 0;\n      do {\n        iVar1 = (*(code *)PTR_c_strcasecmp_000b76fc)(name,prVar2->name);\n        iVar3 = iVar3 + 1;\n        if (iVar1 == 0) {\n          release_header(prVar2);\n          prVar2->name = name;\n          prVar2->value = value;\n          prVar2->release_policy = release_policy;\n          return;\n        }\n        prVar2 = prVar2 + 1;\n      } while (iVar3 != iVar4);\n    }\n    iVar3 = req->hcapacity;\n    if (iVar3 <= iVar4) {\n      req->hcapacity = iVar3 * 2;\n      prVar2 = (request_header *)(*(code *)PTR_xrealloc_000b7740)(req->headers,iVar3 * 0x18);\n      req->headers = prVar2;\n    }\n    iVar4 = req->hcount;\n    req->hcount = iVar4 + 1;\n    prVar2 = req->headers + iVar4;\n    prVar2->name = name;\n    prVar2->value = value;\n    prVar2->release_policy = release_policy;\n  }" { (expression_statement "iVar4 = req->hcount;" (assignment_expression "iVar4 = req->hcount" identifier = (field_expression "req->hcount" identifier -> field_identifier)) ;) (if_statement "if (0 < iVar4) {\n      prVar2 = req->headers;\n      iVar3 = 0;\n      do {\n        iVar1 = (*(code *)PTR_c_strcasecmp_000b76fc)(name,prVar2->name);\n        iVar3 = iVar3 + 1;\n        if (iVar1 == 0) {\n          release_header(prVar2);\n          prVar2->name = name;\n          prVar2->value = value;\n          prVar2->release_policy = release_policy;\n          return;\n        }\n        prVar2 = prVar2 + 1;\n      } while (iVar3 != iVar4);\n    }" if (parenthesized_expression "(0 < iVar4)" ( (binary_expression "0 < iVar4" number_literal < identifier) )) (compound_statement "{\n      prVar2 = req->headers;\n      iVar3 = 0;\n      do {\n        iVar1 = (*(code *)PTR_c_strcasecmp_000b76fc)(name,prVar2->name);\n        iVar3 = iVar3 + 1;\n        if (iVar1 == 0) {\n          release_header(prVar2);\n          prVar2->name = name;\n          prVar2->value = value;\n          prVar2->release_policy = release_policy;\n          return;\n        }\n        prVar2 = prVar2 + 1;\n      } while (iVar3 != iVar4);\n    }" { (expression_statement "prVar2 = req->headers;" (assignment_expression "prVar2 = req->headers" identifier = (field_expression "req->headers" identifier -> field_identifier)) ;) (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" identifier = number_literal) ;) (do_statement "do {\n        iVar1 = (*(code *)PTR_c_strcasecmp_000b76fc)(name,prVar2->name);\n        iVar3 = iVar3 + 1;\n        if (iVar1 == 0) {\n          release_header(prVar2);\n          prVar2->name = name;\n          prVar2->value = value;\n          prVar2->release_policy = release_policy;\n          return;\n        }\n        prVar2 = prVar2 + 1;\n      } while (iVar3 != iVar4);" do (compound_statement "{\n        iVar1 = (*(code *)PTR_c_strcasecmp_000b76fc)(name,prVar2->name);\n        iVar3 = iVar3 + 1;\n        if (iVar1 == 0) {\n          release_header(prVar2);\n          prVar2->name = name;\n          prVar2->value = value;\n          prVar2->release_policy = release_policy;\n          return;\n        }\n        prVar2 = prVar2 + 1;\n      }" { (expression_statement "iVar1 = (*(code *)PTR_c_strcasecmp_000b76fc)(name,prVar2->name);" (assignment_expression "iVar1 = (*(code *)PTR_c_strcasecmp_000b76fc)(name,prVar2->name)" identifier = (call_expression "(*(code *)PTR_c_strcasecmp_000b76fc)(name,prVar2->name)" (parenthesized_expression "(*(code *)PTR_c_strcasecmp_000b76fc)" ( (pointer_expression "*(code *)PTR_c_strcasecmp_000b76fc" * (cast_expression "(code *)PTR_c_strcasecmp_000b76fc" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(name,prVar2->name)" ( identifier , (field_expression "prVar2->name" identifier -> field_identifier) )))) ;) (expression_statement "iVar3 = iVar3 + 1;" (assignment_expression "iVar3 = iVar3 + 1" identifier = (binary_expression "iVar3 + 1" identifier + number_literal)) ;) (if_statement "if (iVar1 == 0) {\n          release_header(prVar2);\n          prVar2->name = name;\n          prVar2->value = value;\n          prVar2->release_policy = release_policy;\n          return;\n        }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n          release_header(prVar2);\n          prVar2->name = name;\n          prVar2->value = value;\n          prVar2->release_policy = release_policy;\n          return;\n        }" { (expression_statement "release_header(prVar2);" (call_expression "release_header(prVar2)" identifier (argument_list "(prVar2)" ( identifier ))) ;) (expression_statement "prVar2->name = name;" (assignment_expression "prVar2->name = name" (field_expression "prVar2->name" identifier -> field_identifier) = identifier) ;) (expression_statement "prVar2->value = value;" (assignment_expression "prVar2->value = value" (field_expression "prVar2->value" identifier -> field_identifier) = identifier) ;) (expression_statement "prVar2->release_policy = release_policy;" (assignment_expression "prVar2->release_policy = release_policy" (field_expression "prVar2->release_policy" identifier -> field_identifier) = identifier) ;) (return_statement "return;" return ;) })) (expression_statement "prVar2 = prVar2 + 1;" (assignment_expression "prVar2 = prVar2 + 1" identifier = (binary_expression "prVar2 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(iVar3 != iVar4)" ( (binary_expression "iVar3 != iVar4" identifier != identifier) )) ;) })) (expression_statement "iVar3 = req->hcapacity;" (assignment_expression "iVar3 = req->hcapacity" identifier = (field_expression "req->hcapacity" identifier -> field_identifier)) ;) (if_statement "if (iVar3 <= iVar4) {\n      req->hcapacity = iVar3 * 2;\n      prVar2 = (request_header *)(*(code *)PTR_xrealloc_000b7740)(req->headers,iVar3 * 0x18);\n      req->headers = prVar2;\n    }" if (parenthesized_expression "(iVar3 <= iVar4)" ( (binary_expression "iVar3 <= iVar4" identifier <= identifier) )) (compound_statement "{\n      req->hcapacity = iVar3 * 2;\n      prVar2 = (request_header *)(*(code *)PTR_xrealloc_000b7740)(req->headers,iVar3 * 0x18);\n      req->headers = prVar2;\n    }" { (expression_statement "req->hcapacity = iVar3 * 2;" (assignment_expression "req->hcapacity = iVar3 * 2" (field_expression "req->hcapacity" identifier -> field_identifier) = (binary_expression "iVar3 * 2" identifier * number_literal)) ;) (expression_statement "prVar2 = (request_header *)(*(code *)PTR_xrealloc_000b7740)(req->headers,iVar3 * 0x18);" (assignment_expression "prVar2 = (request_header *)(*(code *)PTR_xrealloc_000b7740)(req->headers,iVar3 * 0x18)" identifier = (cast_expression "(request_header *)(*(code *)PTR_xrealloc_000b7740)(req->headers,iVar3 * 0x18)" ( (type_descriptor "request_header *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR_xrealloc_000b7740)(req->headers,iVar3 * 0x18)" (parenthesized_expression "(*(code *)PTR_xrealloc_000b7740)" ( (pointer_expression "*(code *)PTR_xrealloc_000b7740" * (cast_expression "(code *)PTR_xrealloc_000b7740" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(req->headers,iVar3 * 0x18)" ( (field_expression "req->headers" identifier -> field_identifier) , (binary_expression "iVar3 * 0x18" identifier * number_literal) ))))) ;) (expression_statement "req->headers = prVar2;" (assignment_expression "req->headers = prVar2" (field_expression "req->headers" identifier -> field_identifier) = identifier) ;) })) (expression_statement "iVar4 = req->hcount;" (assignment_expression "iVar4 = req->hcount" identifier = (field_expression "req->hcount" identifier -> field_identifier)) ;) (expression_statement "req->hcount = iVar4 + 1;" (assignment_expression "req->hcount = iVar4 + 1" (field_expression "req->hcount" identifier -> field_identifier) = (binary_expression "iVar4 + 1" identifier + number_literal)) ;) (expression_statement "prVar2 = req->headers + iVar4;" (assignment_expression "prVar2 = req->headers + iVar4" identifier = (binary_expression "req->headers + iVar4" (field_expression "req->headers" identifier -> field_identifier) + identifier)) ;) (expression_statement "prVar2->name = name;" (assignment_expression "prVar2->name = name" (field_expression "prVar2->name" identifier -> field_identifier) = identifier) ;) (expression_statement "prVar2->value = value;" (assignment_expression "prVar2->value = value" (field_expression "prVar2->value" identifier -> field_identifier) = identifier) ;) (expression_statement "prVar2->release_policy = release_policy;" (assignment_expression "prVar2->release_policy = release_policy" (field_expression "prVar2->release_policy" identifier -> field_identifier) = identifier) ;) }))) (return_statement "return;" return ;) })))
(translation_unit "void FUN_0003616c(int param_1,undefined4 param_2,int param_3,uint param_4)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  undefined4 *puVar3;\n  int iVar4;\n  int iVar5;\n  \n  if (param_3 == 0) {\n    if ((param_4 & 0xfffffffd) == 1) {\n      (*(code *)PTR_free_000b7d34)(param_2);\n    }\n  }\n  else {\n    iVar5 = *(int *)(param_1 + 0xc);\n    if (0 < iVar5) {\n      puVar3 = *(undefined4 **)(param_1 + 8);\n      iVar4 = 0;\n      do {\n        iVar1 = (*(code *)PTR_c_strcasecmp_000b76fc)(param_2,*puVar3);\n        iVar4 = iVar4 + 1;\n        if (iVar1 == 0) {\n          FUN_000357b8(puVar3);\n          *puVar3 = param_2;\n          puVar3[1] = param_3;\n          puVar3[2] = param_4;\n          return;\n        }\n        puVar3 = puVar3 + 3;\n      } while (iVar4 != iVar5);\n    }\n    iVar4 = *(int *)(param_1 + 0x10);\n    if (iVar4 <= iVar5) {\n      *(int *)(param_1 + 0x10) = iVar4 * 2;\n      uVar2 = (*(code *)PTR_xrealloc_000b7740)(*(undefined4 *)(param_1 + 8),iVar4 * 0x18);\n      *(undefined4 *)(param_1 + 8) = uVar2;\n    }\n    iVar5 = *(int *)(param_1 + 0xc);\n    *(int *)(param_1 + 0xc) = iVar5 + 1;\n    puVar3 = (undefined4 *)(*(int *)(param_1 + 8) + iVar5 * 0xc);\n    *puVar3 = param_2;\n    puVar3[1] = param_3;\n    puVar3[2] = param_4;\n  }\n  return;\n}\n\n" (function_definition "void FUN_0003616c(int param_1,undefined4 param_2,int param_3,uint param_4)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  undefined4 *puVar3;\n  int iVar4;\n  int iVar5;\n  \n  if (param_3 == 0) {\n    if ((param_4 & 0xfffffffd) == 1) {\n      (*(code *)PTR_free_000b7d34)(param_2);\n    }\n  }\n  else {\n    iVar5 = *(int *)(param_1 + 0xc);\n    if (0 < iVar5) {\n      puVar3 = *(undefined4 **)(param_1 + 8);\n      iVar4 = 0;\n      do {\n        iVar1 = (*(code *)PTR_c_strcasecmp_000b76fc)(param_2,*puVar3);\n        iVar4 = iVar4 + 1;\n        if (iVar1 == 0) {\n          FUN_000357b8(puVar3);\n          *puVar3 = param_2;\n          puVar3[1] = param_3;\n          puVar3[2] = param_4;\n          return;\n        }\n        puVar3 = puVar3 + 3;\n      } while (iVar4 != iVar5);\n    }\n    iVar4 = *(int *)(param_1 + 0x10);\n    if (iVar4 <= iVar5) {\n      *(int *)(param_1 + 0x10) = iVar4 * 2;\n      uVar2 = (*(code *)PTR_xrealloc_000b7740)(*(undefined4 *)(param_1 + 8),iVar4 * 0x18);\n      *(undefined4 *)(param_1 + 8) = uVar2;\n    }\n    iVar5 = *(int *)(param_1 + 0xc);\n    *(int *)(param_1 + 0xc) = iVar5 + 1;\n    puVar3 = (undefined4 *)(*(int *)(param_1 + 8) + iVar5 * 0xc);\n    *puVar3 = param_2;\n    puVar3[1] = param_3;\n    puVar3[2] = param_4;\n  }\n  return;\n}" primitive_type (function_declarator "FUN_0003616c(int param_1,undefined4 param_2,int param_3,uint param_4)" identifier (parameter_list "(int param_1,undefined4 param_2,int param_3,uint param_4)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "int param_3" primitive_type identifier) , (parameter_declaration "uint param_4" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  undefined4 uVar2;\n  undefined4 *puVar3;\n  int iVar4;\n  int iVar5;\n  \n  if (param_3 == 0) {\n    if ((param_4 & 0xfffffffd) == 1) {\n      (*(code *)PTR_free_000b7d34)(param_2);\n    }\n  }\n  else {\n    iVar5 = *(int *)(param_1 + 0xc);\n    if (0 < iVar5) {\n      puVar3 = *(undefined4 **)(param_1 + 8);\n      iVar4 = 0;\n      do {\n        iVar1 = (*(code *)PTR_c_strcasecmp_000b76fc)(param_2,*puVar3);\n        iVar4 = iVar4 + 1;\n        if (iVar1 == 0) {\n          FUN_000357b8(puVar3);\n          *puVar3 = param_2;\n          puVar3[1] = param_3;\n          puVar3[2] = param_4;\n          return;\n        }\n        puVar3 = puVar3 + 3;\n      } while (iVar4 != iVar5);\n    }\n    iVar4 = *(int *)(param_1 + 0x10);\n    if (iVar4 <= iVar5) {\n      *(int *)(param_1 + 0x10) = iVar4 * 2;\n      uVar2 = (*(code *)PTR_xrealloc_000b7740)(*(undefined4 *)(param_1 + 8),iVar4 * 0x18);\n      *(undefined4 *)(param_1 + 8) = uVar2;\n    }\n    iVar5 = *(int *)(param_1 + 0xc);\n    *(int *)(param_1 + 0xc) = iVar5 + 1;\n    puVar3 = (undefined4 *)(*(int *)(param_1 + 8) + iVar5 * 0xc);\n    *puVar3 = param_2;\n    puVar3[1] = param_3;\n    puVar3[2] = param_4;\n  }\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (declaration "undefined4 *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "int iVar5;" primitive_type identifier ;) (if_statement "if (param_3 == 0) {\n    if ((param_4 & 0xfffffffd) == 1) {\n      (*(code *)PTR_free_000b7d34)(param_2);\n    }\n  }\n  else {\n    iVar5 = *(int *)(param_1 + 0xc);\n    if (0 < iVar5) {\n      puVar3 = *(undefined4 **)(param_1 + 8);\n      iVar4 = 0;\n      do {\n        iVar1 = (*(code *)PTR_c_strcasecmp_000b76fc)(param_2,*puVar3);\n        iVar4 = iVar4 + 1;\n        if (iVar1 == 0) {\n          FUN_000357b8(puVar3);\n          *puVar3 = param_2;\n          puVar3[1] = param_3;\n          puVar3[2] = param_4;\n          return;\n        }\n        puVar3 = puVar3 + 3;\n      } while (iVar4 != iVar5);\n    }\n    iVar4 = *(int *)(param_1 + 0x10);\n    if (iVar4 <= iVar5) {\n      *(int *)(param_1 + 0x10) = iVar4 * 2;\n      uVar2 = (*(code *)PTR_xrealloc_000b7740)(*(undefined4 *)(param_1 + 8),iVar4 * 0x18);\n      *(undefined4 *)(param_1 + 8) = uVar2;\n    }\n    iVar5 = *(int *)(param_1 + 0xc);\n    *(int *)(param_1 + 0xc) = iVar5 + 1;\n    puVar3 = (undefined4 *)(*(int *)(param_1 + 8) + iVar5 * 0xc);\n    *puVar3 = param_2;\n    puVar3[1] = param_3;\n    puVar3[2] = param_4;\n  }" if (parenthesized_expression "(param_3 == 0)" ( (binary_expression "param_3 == 0" identifier == number_literal) )) (compound_statement "{\n    if ((param_4 & 0xfffffffd) == 1) {\n      (*(code *)PTR_free_000b7d34)(param_2);\n    }\n  }" { (if_statement "if ((param_4 & 0xfffffffd) == 1) {\n      (*(code *)PTR_free_000b7d34)(param_2);\n    }" if (parenthesized_expression "((param_4 & 0xfffffffd) == 1)" ( (binary_expression "(param_4 & 0xfffffffd) == 1" (parenthesized_expression "(param_4 & 0xfffffffd)" ( (binary_expression "param_4 & 0xfffffffd" identifier & number_literal) )) == number_literal) )) (compound_statement "{\n      (*(code *)PTR_free_000b7d34)(param_2);\n    }" { (expression_statement "(*(code *)PTR_free_000b7d34)(param_2);" (call_expression "(*(code *)PTR_free_000b7d34)(param_2)" (parenthesized_expression "(*(code *)PTR_free_000b7d34)" ( (pointer_expression "*(code *)PTR_free_000b7d34" * (cast_expression "(code *)PTR_free_000b7d34" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_2)" ( identifier ))) ;) })) }) (else_clause "else {\n    iVar5 = *(int *)(param_1 + 0xc);\n    if (0 < iVar5) {\n      puVar3 = *(undefined4 **)(param_1 + 8);\n      iVar4 = 0;\n      do {\n        iVar1 = (*(code *)PTR_c_strcasecmp_000b76fc)(param_2,*puVar3);\n        iVar4 = iVar4 + 1;\n        if (iVar1 == 0) {\n          FUN_000357b8(puVar3);\n          *puVar3 = param_2;\n          puVar3[1] = param_3;\n          puVar3[2] = param_4;\n          return;\n        }\n        puVar3 = puVar3 + 3;\n      } while (iVar4 != iVar5);\n    }\n    iVar4 = *(int *)(param_1 + 0x10);\n    if (iVar4 <= iVar5) {\n      *(int *)(param_1 + 0x10) = iVar4 * 2;\n      uVar2 = (*(code *)PTR_xrealloc_000b7740)(*(undefined4 *)(param_1 + 8),iVar4 * 0x18);\n      *(undefined4 *)(param_1 + 8) = uVar2;\n    }\n    iVar5 = *(int *)(param_1 + 0xc);\n    *(int *)(param_1 + 0xc) = iVar5 + 1;\n    puVar3 = (undefined4 *)(*(int *)(param_1 + 8) + iVar5 * 0xc);\n    *puVar3 = param_2;\n    puVar3[1] = param_3;\n    puVar3[2] = param_4;\n  }" else (compound_statement "{\n    iVar5 = *(int *)(param_1 + 0xc);\n    if (0 < iVar5) {\n      puVar3 = *(undefined4 **)(param_1 + 8);\n      iVar4 = 0;\n      do {\n        iVar1 = (*(code *)PTR_c_strcasecmp_000b76fc)(param_2,*puVar3);\n        iVar4 = iVar4 + 1;\n        if (iVar1 == 0) {\n          FUN_000357b8(puVar3);\n          *puVar3 = param_2;\n          puVar3[1] = param_3;\n          puVar3[2] = param_4;\n          return;\n        }\n        puVar3 = puVar3 + 3;\n      } while (iVar4 != iVar5);\n    }\n    iVar4 = *(int *)(param_1 + 0x10);\n    if (iVar4 <= iVar5) {\n      *(int *)(param_1 + 0x10) = iVar4 * 2;\n      uVar2 = (*(code *)PTR_xrealloc_000b7740)(*(undefined4 *)(param_1 + 8),iVar4 * 0x18);\n      *(undefined4 *)(param_1 + 8) = uVar2;\n    }\n    iVar5 = *(int *)(param_1 + 0xc);\n    *(int *)(param_1 + 0xc) = iVar5 + 1;\n    puVar3 = (undefined4 *)(*(int *)(param_1 + 8) + iVar5 * 0xc);\n    *puVar3 = param_2;\n    puVar3[1] = param_3;\n    puVar3[2] = param_4;\n  }" { (expression_statement "iVar5 = *(int *)(param_1 + 0xc);" (assignment_expression "iVar5 = *(int *)(param_1 + 0xc)" identifier = (pointer_expression "*(int *)(param_1 + 0xc)" * (cast_expression "(int *)(param_1 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) ))))) ;) (if_statement "if (0 < iVar5) {\n      puVar3 = *(undefined4 **)(param_1 + 8);\n      iVar4 = 0;\n      do {\n        iVar1 = (*(code *)PTR_c_strcasecmp_000b76fc)(param_2,*puVar3);\n        iVar4 = iVar4 + 1;\n        if (iVar1 == 0) {\n          FUN_000357b8(puVar3);\n          *puVar3 = param_2;\n          puVar3[1] = param_3;\n          puVar3[2] = param_4;\n          return;\n        }\n        puVar3 = puVar3 + 3;\n      } while (iVar4 != iVar5);\n    }" if (parenthesized_expression "(0 < iVar5)" ( (binary_expression "0 < iVar5" number_literal < identifier) )) (compound_statement "{\n      puVar3 = *(undefined4 **)(param_1 + 8);\n      iVar4 = 0;\n      do {\n        iVar1 = (*(code *)PTR_c_strcasecmp_000b76fc)(param_2,*puVar3);\n        iVar4 = iVar4 + 1;\n        if (iVar1 == 0) {\n          FUN_000357b8(puVar3);\n          *puVar3 = param_2;\n          puVar3[1] = param_3;\n          puVar3[2] = param_4;\n          return;\n        }\n        puVar3 = puVar3 + 3;\n      } while (iVar4 != iVar5);\n    }" { (expression_statement "puVar3 = *(undefined4 **)(param_1 + 8);" (assignment_expression "puVar3 = *(undefined4 **)(param_1 + 8)" identifier = (pointer_expression "*(undefined4 **)(param_1 + 8)" * (cast_expression "(undefined4 **)(param_1 + 8)" ( (type_descriptor "undefined4 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 8)" ( (binary_expression "param_1 + 8" identifier + number_literal) ))))) ;) (expression_statement "iVar4 = 0;" (assignment_expression "iVar4 = 0" identifier = number_literal) ;) (do_statement "do {\n        iVar1 = (*(code *)PTR_c_strcasecmp_000b76fc)(param_2,*puVar3);\n        iVar4 = iVar4 + 1;\n        if (iVar1 == 0) {\n          FUN_000357b8(puVar3);\n          *puVar3 = param_2;\n          puVar3[1] = param_3;\n          puVar3[2] = param_4;\n          return;\n        }\n        puVar3 = puVar3 + 3;\n      } while (iVar4 != iVar5);" do (compound_statement "{\n        iVar1 = (*(code *)PTR_c_strcasecmp_000b76fc)(param_2,*puVar3);\n        iVar4 = iVar4 + 1;\n        if (iVar1 == 0) {\n          FUN_000357b8(puVar3);\n          *puVar3 = param_2;\n          puVar3[1] = param_3;\n          puVar3[2] = param_4;\n          return;\n        }\n        puVar3 = puVar3 + 3;\n      }" { (expression_statement "iVar1 = (*(code *)PTR_c_strcasecmp_000b76fc)(param_2,*puVar3);" (assignment_expression "iVar1 = (*(code *)PTR_c_strcasecmp_000b76fc)(param_2,*puVar3)" identifier = (call_expression "(*(code *)PTR_c_strcasecmp_000b76fc)(param_2,*puVar3)" (parenthesized_expression "(*(code *)PTR_c_strcasecmp_000b76fc)" ( (pointer_expression "*(code *)PTR_c_strcasecmp_000b76fc" * (cast_expression "(code *)PTR_c_strcasecmp_000b76fc" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_2,*puVar3)" ( identifier , (pointer_expression "*puVar3" * identifier) )))) ;) (expression_statement "iVar4 = iVar4 + 1;" (assignment_expression "iVar4 = iVar4 + 1" identifier = (binary_expression "iVar4 + 1" identifier + number_literal)) ;) (if_statement "if (iVar1 == 0) {\n          FUN_000357b8(puVar3);\n          *puVar3 = param_2;\n          puVar3[1] = param_3;\n          puVar3[2] = param_4;\n          return;\n        }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n          FUN_000357b8(puVar3);\n          *puVar3 = param_2;\n          puVar3[1] = param_3;\n          puVar3[2] = param_4;\n          return;\n        }" { (expression_statement "FUN_000357b8(puVar3);" (call_expression "FUN_000357b8(puVar3)" identifier (argument_list "(puVar3)" ( identifier ))) ;) (expression_statement "*puVar3 = param_2;" (assignment_expression "*puVar3 = param_2" (pointer_expression "*puVar3" * identifier) = identifier) ;) (expression_statement "puVar3[1] = param_3;" (assignment_expression "puVar3[1] = param_3" (subscript_expression "puVar3[1]" identifier [ number_literal ]) = identifier) ;) (expression_statement "puVar3[2] = param_4;" (assignment_expression "puVar3[2] = param_4" (subscript_expression "puVar3[2]" identifier [ number_literal ]) = identifier) ;) (return_statement "return;" return ;) })) (expression_statement "puVar3 = puVar3 + 3;" (assignment_expression "puVar3 = puVar3 + 3" identifier = (binary_expression "puVar3 + 3" identifier + number_literal)) ;) }) while (parenthesized_expression "(iVar4 != iVar5)" ( (binary_expression "iVar4 != iVar5" identifier != identifier) )) ;) })) (expression_statement "iVar4 = *(int *)(param_1 + 0x10);" (assignment_expression "iVar4 = *(int *)(param_1 + 0x10)" identifier = (pointer_expression "*(int *)(param_1 + 0x10)" * (cast_expression "(int *)(param_1 + 0x10)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) ))))) ;) (if_statement "if (iVar4 <= iVar5) {\n      *(int *)(param_1 + 0x10) = iVar4 * 2;\n      uVar2 = (*(code *)PTR_xrealloc_000b7740)(*(undefined4 *)(param_1 + 8),iVar4 * 0x18);\n      *(undefined4 *)(param_1 + 8) = uVar2;\n    }" if (parenthesized_expression "(iVar4 <= iVar5)" ( (binary_expression "iVar4 <= iVar5" identifier <= identifier) )) (compound_statement "{\n      *(int *)(param_1 + 0x10) = iVar4 * 2;\n      uVar2 = (*(code *)PTR_xrealloc_000b7740)(*(undefined4 *)(param_1 + 8),iVar4 * 0x18);\n      *(undefined4 *)(param_1 + 8) = uVar2;\n    }" { (expression_statement "*(int *)(param_1 + 0x10) = iVar4 * 2;" (assignment_expression "*(int *)(param_1 + 0x10) = iVar4 * 2" (pointer_expression "*(int *)(param_1 + 0x10)" * (cast_expression "(int *)(param_1 + 0x10)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) )))) = (binary_expression "iVar4 * 2" identifier * number_literal)) ;) (expression_statement "uVar2 = (*(code *)PTR_xrealloc_000b7740)(*(undefined4 *)(param_1 + 8),iVar4 * 0x18);" (assignment_expression "uVar2 = (*(code *)PTR_xrealloc_000b7740)(*(undefined4 *)(param_1 + 8),iVar4 * 0x18)" identifier = (call_expression "(*(code *)PTR_xrealloc_000b7740)(*(undefined4 *)(param_1 + 8),iVar4 * 0x18)" (parenthesized_expression "(*(code *)PTR_xrealloc_000b7740)" ( (pointer_expression "*(code *)PTR_xrealloc_000b7740" * (cast_expression "(code *)PTR_xrealloc_000b7740" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(*(undefined4 *)(param_1 + 8),iVar4 * 0x18)" ( (pointer_expression "*(undefined4 *)(param_1 + 8)" * (cast_expression "(undefined4 *)(param_1 + 8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 8)" ( (binary_expression "param_1 + 8" identifier + number_literal) )))) , (binary_expression "iVar4 * 0x18" identifier * number_literal) )))) ;) (expression_statement "*(undefined4 *)(param_1 + 8) = uVar2;" (assignment_expression "*(undefined4 *)(param_1 + 8) = uVar2" (pointer_expression "*(undefined4 *)(param_1 + 8)" * (cast_expression "(undefined4 *)(param_1 + 8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 8)" ( (binary_expression "param_1 + 8" identifier + number_literal) )))) = identifier) ;) })) (expression_statement "iVar5 = *(int *)(param_1 + 0xc);" (assignment_expression "iVar5 = *(int *)(param_1 + 0xc)" identifier = (pointer_expression "*(int *)(param_1 + 0xc)" * (cast_expression "(int *)(param_1 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) ))))) ;) (expression_statement "*(int *)(param_1 + 0xc) = iVar5 + 1;" (assignment_expression "*(int *)(param_1 + 0xc) = iVar5 + 1" (pointer_expression "*(int *)(param_1 + 0xc)" * (cast_expression "(int *)(param_1 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) )))) = (binary_expression "iVar5 + 1" identifier + number_literal)) ;) (expression_statement "puVar3 = (undefined4 *)(*(int *)(param_1 + 8) + iVar5 * 0xc);" (assignment_expression "puVar3 = (undefined4 *)(*(int *)(param_1 + 8) + iVar5 * 0xc)" identifier = (cast_expression "(undefined4 *)(*(int *)(param_1 + 8) + iVar5 * 0xc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(param_1 + 8) + iVar5 * 0xc)" ( (binary_expression "*(int *)(param_1 + 8) + iVar5 * 0xc" (pointer_expression "*(int *)(param_1 + 8)" * (cast_expression "(int *)(param_1 + 8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 8)" ( (binary_expression "param_1 + 8" identifier + number_literal) )))) + (binary_expression "iVar5 * 0xc" identifier * number_literal)) )))) ;) (expression_statement "*puVar3 = param_2;" (assignment_expression "*puVar3 = param_2" (pointer_expression "*puVar3" * identifier) = identifier) ;) (expression_statement "puVar3[1] = param_3;" (assignment_expression "puVar3[1] = param_3" (subscript_expression "puVar3[1]" identifier [ number_literal ]) = identifier) ;) (expression_statement "puVar3[2] = param_4;" (assignment_expression "puVar3[2] = param_4" (subscript_expression "puVar3[2]" identifier [ number_literal ]) = identifier) ;) }))) (return_statement "return;" return ;) })))
(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) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) == LIT) )) (compound_statement { (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT ))) ;) })) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (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) ))))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT , (pointer_expression * IDENT) )))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (return_statement return ;) })) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) while (parenthesized_expression ( (binary_expression IDENT != IDENT) )) ;) })) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT <= IDENT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (binary_expression IDENT * LIT)) ;) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) , (binary_expression IDENT * LIT) )))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) })) (expression_statement (assignment_expression IDENT = (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 *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + (binary_expression IDENT * LIT)) )))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) }))) (return_statement return ;) })))
(function_definition "void FUN_0003616c(int param_1,undefined4 param_2,int param_3,uint param_4)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  undefined4 *puVar3;\n  int iVar4;\n  int iVar5;\n  \n  if (param_3 == 0) {\n    if ((param_4 & 0xfffffffd) == 1) {\n      (*(code *)PTR_free_000b7d34)(param_2);\n    }\n  }\n  else {\n    iVar5 = *(int *)(param_1 + 0xc);\n    if (0 < iVar5) {\n      puVar3 = *(undefined4 **)(param_1 + 8);\n      iVar4 = 0;\n      do {\n        iVar1 = (*(code *)PTR_c_strcasecmp_000b76fc)(param_2,*puVar3);\n        iVar4 = iVar4 + 1;\n        if (iVar1 == 0) {\n          FUN_000357b8(puVar3);\n          *puVar3 = param_2;\n          puVar3[1] = param_3;\n          puVar3[2] = param_4;\n          return;\n        }\n        puVar3 = puVar3 + 3;\n      } while (iVar4 != iVar5);\n    }\n    iVar4 = *(int *)(param_1 + 0x10);\n    if (iVar4 <= iVar5) {\n      *(int *)(param_1 + 0x10) = iVar4 * 2;\n      uVar2 = (*(code *)PTR_xrealloc_000b7740)(*(undefined4 *)(param_1 + 8),iVar4 * 0x18);\n      *(undefined4 *)(param_1 + 8) = uVar2;\n    }\n    iVar5 = *(int *)(param_1 + 0xc);\n    *(int *)(param_1 + 0xc) = iVar5 + 1;\n    puVar3 = (undefined4 *)(*(int *)(param_1 + 8) + iVar5 * 0xc);\n    *puVar3 = param_2;\n    puVar3[1] = param_3;\n    puVar3[2] = param_4;\n  }\n  return;\n}" (primitive_type "void") (function_declarator "FUN_0003616c(int param_1,undefined4 param_2,int param_3,uint param_4)" (identifier "FUN_0003616c") (parameter_list "(int param_1,undefined4 param_2,int param_3,uint param_4)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "undefined4 param_2" (type_identifier "undefined4") (identifier "param_2")) (, ",") (parameter_declaration "int param_3" (primitive_type "int") (identifier "param_3")) (, ",") (parameter_declaration "uint param_4" (type_identifier "uint") (identifier "param_4")) () ")"))) (compound_statement "{\n  int iVar1;\n  undefined4 uVar2;\n  undefined4 *puVar3;\n  int iVar4;\n  int iVar5;\n  \n  if (param_3 == 0) {\n    if ((param_4 & 0xfffffffd) == 1) {\n      (*(code *)PTR_free_000b7d34)(param_2);\n    }\n  }\n  else {\n    iVar5 = *(int *)(param_1 + 0xc);\n    if (0 < iVar5) {\n      puVar3 = *(undefined4 **)(param_1 + 8);\n      iVar4 = 0;\n      do {\n        iVar1 = (*(code *)PTR_c_strcasecmp_000b76fc)(param_2,*puVar3);\n        iVar4 = iVar4 + 1;\n        if (iVar1 == 0) {\n          FUN_000357b8(puVar3);\n          *puVar3 = param_2;\n          puVar3[1] = param_3;\n          puVar3[2] = param_4;\n          return;\n        }\n        puVar3 = puVar3 + 3;\n      } while (iVar4 != iVar5);\n    }\n    iVar4 = *(int *)(param_1 + 0x10);\n    if (iVar4 <= iVar5) {\n      *(int *)(param_1 + 0x10) = iVar4 * 2;\n      uVar2 = (*(code *)PTR_xrealloc_000b7740)(*(undefined4 *)(param_1 + 8),iVar4 * 0x18);\n      *(undefined4 *)(param_1 + 8) = uVar2;\n    }\n    iVar5 = *(int *)(param_1 + 0xc);\n    *(int *)(param_1 + 0xc) = iVar5 + 1;\n    puVar3 = (undefined4 *)(*(int *)(param_1 + 8) + iVar5 * 0xc);\n    *puVar3 = param_2;\n    puVar3[1] = param_3;\n    puVar3[2] = param_4;\n  }\n  return;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "undefined4 uVar2;" (type_identifier "undefined4") (identifier "uVar2") (; ";")) (declaration "undefined4 *puVar3;" (type_identifier "undefined4") (pointer_declarator "*puVar3" (* "*") (identifier "puVar3")) (; ";")) (declaration "int iVar4;" (primitive_type "int") (identifier "iVar4") (; ";")) (declaration "int iVar5;" (primitive_type "int") (identifier "iVar5") (; ";")) (if_statement "if (param_3 == 0) {\n    if ((param_4 & 0xfffffffd) == 1) {\n      (*(code *)PTR_free_000b7d34)(param_2);\n    }\n  }\n  else {\n    iVar5 = *(int *)(param_1 + 0xc);\n    if (0 < iVar5) {\n      puVar3 = *(undefined4 **)(param_1 + 8);\n      iVar4 = 0;\n      do {\n        iVar1 = (*(code *)PTR_c_strcasecmp_000b76fc)(param_2,*puVar3);\n        iVar4 = iVar4 + 1;\n        if (iVar1 == 0) {\n          FUN_000357b8(puVar3);\n          *puVar3 = param_2;\n          puVar3[1] = param_3;\n          puVar3[2] = param_4;\n          return;\n        }\n        puVar3 = puVar3 + 3;\n      } while (iVar4 != iVar5);\n    }\n    iVar4 = *(int *)(param_1 + 0x10);\n    if (iVar4 <= iVar5) {\n      *(int *)(param_1 + 0x10) = iVar4 * 2;\n      uVar2 = (*(code *)PTR_xrealloc_000b7740)(*(undefined4 *)(param_1 + 8),iVar4 * 0x18);\n      *(undefined4 *)(param_1 + 8) = uVar2;\n    }\n    iVar5 = *(int *)(param_1 + 0xc);\n    *(int *)(param_1 + 0xc) = iVar5 + 1;\n    puVar3 = (undefined4 *)(*(int *)(param_1 + 8) + iVar5 * 0xc);\n    *puVar3 = param_2;\n    puVar3[1] = param_3;\n    puVar3[2] = param_4;\n  }" (if "if") (parenthesized_expression "(param_3 == 0)" (( "(") (binary_expression "param_3 == 0" (identifier "param_3") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    if ((param_4 & 0xfffffffd) == 1) {\n      (*(code *)PTR_free_000b7d34)(param_2);\n    }\n  }" ({ "{") (if_statement "if ((param_4 & 0xfffffffd) == 1) {\n      (*(code *)PTR_free_000b7d34)(param_2);\n    }" (if "if") (parenthesized_expression "((param_4 & 0xfffffffd) == 1)" (( "(") (binary_expression "(param_4 & 0xfffffffd) == 1" (parenthesized_expression "(param_4 & 0xfffffffd)" (( "(") (binary_expression "param_4 & 0xfffffffd" (identifier "param_4") (& "&") (number_literal "0xfffffffd")) () ")")) (== "==") (number_literal "1")) () ")")) (compound_statement "{\n      (*(code *)PTR_free_000b7d34)(param_2);\n    }" ({ "{") (expression_statement "(*(code *)PTR_free_000b7d34)(param_2);" (call_expression "(*(code *)PTR_free_000b7d34)(param_2)" (parenthesized_expression "(*(code *)PTR_free_000b7d34)" (( "(") (pointer_expression "*(code *)PTR_free_000b7d34" (* "*") (cast_expression "(code *)PTR_free_000b7d34" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_free_000b7d34"))) () ")")) (argument_list "(param_2)" (( "(") (identifier "param_2") () ")"))) (; ";")) (} "}"))) (} "}")) (else_clause "else {\n    iVar5 = *(int *)(param_1 + 0xc);\n    if (0 < iVar5) {\n      puVar3 = *(undefined4 **)(param_1 + 8);\n      iVar4 = 0;\n      do {\n        iVar1 = (*(code *)PTR_c_strcasecmp_000b76fc)(param_2,*puVar3);\n        iVar4 = iVar4 + 1;\n        if (iVar1 == 0) {\n          FUN_000357b8(puVar3);\n          *puVar3 = param_2;\n          puVar3[1] = param_3;\n          puVar3[2] = param_4;\n          return;\n        }\n        puVar3 = puVar3 + 3;\n      } while (iVar4 != iVar5);\n    }\n    iVar4 = *(int *)(param_1 + 0x10);\n    if (iVar4 <= iVar5) {\n      *(int *)(param_1 + 0x10) = iVar4 * 2;\n      uVar2 = (*(code *)PTR_xrealloc_000b7740)(*(undefined4 *)(param_1 + 8),iVar4 * 0x18);\n      *(undefined4 *)(param_1 + 8) = uVar2;\n    }\n    iVar5 = *(int *)(param_1 + 0xc);\n    *(int *)(param_1 + 0xc) = iVar5 + 1;\n    puVar3 = (undefined4 *)(*(int *)(param_1 + 8) + iVar5 * 0xc);\n    *puVar3 = param_2;\n    puVar3[1] = param_3;\n    puVar3[2] = param_4;\n  }" (else "else") (compound_statement "{\n    iVar5 = *(int *)(param_1 + 0xc);\n    if (0 < iVar5) {\n      puVar3 = *(undefined4 **)(param_1 + 8);\n      iVar4 = 0;\n      do {\n        iVar1 = (*(code *)PTR_c_strcasecmp_000b76fc)(param_2,*puVar3);\n        iVar4 = iVar4 + 1;\n        if (iVar1 == 0) {\n          FUN_000357b8(puVar3);\n          *puVar3 = param_2;\n          puVar3[1] = param_3;\n          puVar3[2] = param_4;\n          return;\n        }\n        puVar3 = puVar3 + 3;\n      } while (iVar4 != iVar5);\n    }\n    iVar4 = *(int *)(param_1 + 0x10);\n    if (iVar4 <= iVar5) {\n      *(int *)(param_1 + 0x10) = iVar4 * 2;\n      uVar2 = (*(code *)PTR_xrealloc_000b7740)(*(undefined4 *)(param_1 + 8),iVar4 * 0x18);\n      *(undefined4 *)(param_1 + 8) = uVar2;\n    }\n    iVar5 = *(int *)(param_1 + 0xc);\n    *(int *)(param_1 + 0xc) = iVar5 + 1;\n    puVar3 = (undefined4 *)(*(int *)(param_1 + 8) + iVar5 * 0xc);\n    *puVar3 = param_2;\n    puVar3[1] = param_3;\n    puVar3[2] = param_4;\n  }" ({ "{") (expression_statement "iVar5 = *(int *)(param_1 + 0xc);" (assignment_expression "iVar5 = *(int *)(param_1 + 0xc)" (identifier "iVar5") (= "=") (pointer_expression "*(int *)(param_1 + 0xc)" (* "*") (cast_expression "(int *)(param_1 + 0xc)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xc)" (( "(") (binary_expression "param_1 + 0xc" (identifier "param_1") (+ "+") (number_literal "0xc")) () ")"))))) (; ";")) (if_statement "if (0 < iVar5) {\n      puVar3 = *(undefined4 **)(param_1 + 8);\n      iVar4 = 0;\n      do {\n        iVar1 = (*(code *)PTR_c_strcasecmp_000b76fc)(param_2,*puVar3);\n        iVar4 = iVar4 + 1;\n        if (iVar1 == 0) {\n          FUN_000357b8(puVar3);\n          *puVar3 = param_2;\n          puVar3[1] = param_3;\n          puVar3[2] = param_4;\n          return;\n        }\n        puVar3 = puVar3 + 3;\n      } while (iVar4 != iVar5);\n    }" (if "if") (parenthesized_expression "(0 < iVar5)" (( "(") (binary_expression "0 < iVar5" (number_literal "0") (< "<") (identifier "iVar5")) () ")")) (compound_statement "{\n      puVar3 = *(undefined4 **)(param_1 + 8);\n      iVar4 = 0;\n      do {\n        iVar1 = (*(code *)PTR_c_strcasecmp_000b76fc)(param_2,*puVar3);\n        iVar4 = iVar4 + 1;\n        if (iVar1 == 0) {\n          FUN_000357b8(puVar3);\n          *puVar3 = param_2;\n          puVar3[1] = param_3;\n          puVar3[2] = param_4;\n          return;\n        }\n        puVar3 = puVar3 + 3;\n      } while (iVar4 != iVar5);\n    }" ({ "{") (expression_statement "puVar3 = *(undefined4 **)(param_1 + 8);" (assignment_expression "puVar3 = *(undefined4 **)(param_1 + 8)" (identifier "puVar3") (= "=") (pointer_expression "*(undefined4 **)(param_1 + 8)" (* "*") (cast_expression "(undefined4 **)(param_1 + 8)" (( "(") (type_descriptor "undefined4 **" (type_identifier "undefined4") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 8)" (( "(") (binary_expression "param_1 + 8" (identifier "param_1") (+ "+") (number_literal "8")) () ")"))))) (; ";")) (expression_statement "iVar4 = 0;" (assignment_expression "iVar4 = 0" (identifier "iVar4") (= "=") (number_literal "0")) (; ";")) (do_statement "do {\n        iVar1 = (*(code *)PTR_c_strcasecmp_000b76fc)(param_2,*puVar3);\n        iVar4 = iVar4 + 1;\n        if (iVar1 == 0) {\n          FUN_000357b8(puVar3);\n          *puVar3 = param_2;\n          puVar3[1] = param_3;\n          puVar3[2] = param_4;\n          return;\n        }\n        puVar3 = puVar3 + 3;\n      } while (iVar4 != iVar5);" (do "do") (compound_statement "{\n        iVar1 = (*(code *)PTR_c_strcasecmp_000b76fc)(param_2,*puVar3);\n        iVar4 = iVar4 + 1;\n        if (iVar1 == 0) {\n          FUN_000357b8(puVar3);\n          *puVar3 = param_2;\n          puVar3[1] = param_3;\n          puVar3[2] = param_4;\n          return;\n        }\n        puVar3 = puVar3 + 3;\n      }" ({ "{") (expression_statement "iVar1 = (*(code *)PTR_c_strcasecmp_000b76fc)(param_2,*puVar3);" (assignment_expression "iVar1 = (*(code *)PTR_c_strcasecmp_000b76fc)(param_2,*puVar3)" (identifier "iVar1") (= "=") (call_expression "(*(code *)PTR_c_strcasecmp_000b76fc)(param_2,*puVar3)" (parenthesized_expression "(*(code *)PTR_c_strcasecmp_000b76fc)" (( "(") (pointer_expression "*(code *)PTR_c_strcasecmp_000b76fc" (* "*") (cast_expression "(code *)PTR_c_strcasecmp_000b76fc" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_c_strcasecmp_000b76fc"))) () ")")) (argument_list "(param_2,*puVar3)" (( "(") (identifier "param_2") (, ",") (pointer_expression "*puVar3" (* "*") (identifier "puVar3")) () ")")))) (; ";")) (expression_statement "iVar4 = iVar4 + 1;" (assignment_expression "iVar4 = iVar4 + 1" (identifier "iVar4") (= "=") (binary_expression "iVar4 + 1" (identifier "iVar4") (+ "+") (number_literal "1"))) (; ";")) (if_statement "if (iVar1 == 0) {\n          FUN_000357b8(puVar3);\n          *puVar3 = param_2;\n          puVar3[1] = param_3;\n          puVar3[2] = param_4;\n          return;\n        }" (if "if") (parenthesized_expression "(iVar1 == 0)" (( "(") (binary_expression "iVar1 == 0" (identifier "iVar1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n          FUN_000357b8(puVar3);\n          *puVar3 = param_2;\n          puVar3[1] = param_3;\n          puVar3[2] = param_4;\n          return;\n        }" ({ "{") (expression_statement "FUN_000357b8(puVar3);" (call_expression "FUN_000357b8(puVar3)" (identifier "FUN_000357b8") (argument_list "(puVar3)" (( "(") (identifier "puVar3") () ")"))) (; ";")) (expression_statement "*puVar3 = param_2;" (assignment_expression "*puVar3 = param_2" (pointer_expression "*puVar3" (* "*") (identifier "puVar3")) (= "=") (identifier "param_2")) (; ";")) (expression_statement "puVar3[1] = param_3;" (assignment_expression "puVar3[1] = param_3" (subscript_expression "puVar3[1]" (identifier "puVar3") ([ "[") (number_literal "1") (] "]")) (= "=") (identifier "param_3")) (; ";")) (expression_statement "puVar3[2] = param_4;" (assignment_expression "puVar3[2] = param_4" (subscript_expression "puVar3[2]" (identifier "puVar3") ([ "[") (number_literal "2") (] "]")) (= "=") (identifier "param_4")) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "puVar3 = puVar3 + 3;" (assignment_expression "puVar3 = puVar3 + 3" (identifier "puVar3") (= "=") (binary_expression "puVar3 + 3" (identifier "puVar3") (+ "+") (number_literal "3"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(iVar4 != iVar5)" (( "(") (binary_expression "iVar4 != iVar5" (identifier "iVar4") (!= "!=") (identifier "iVar5")) () ")")) (; ";")) (} "}"))) (expression_statement "iVar4 = *(int *)(param_1 + 0x10);" (assignment_expression "iVar4 = *(int *)(param_1 + 0x10)" (identifier "iVar4") (= "=") (pointer_expression "*(int *)(param_1 + 0x10)" (* "*") (cast_expression "(int *)(param_1 + 0x10)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x10)" (( "(") (binary_expression "param_1 + 0x10" (identifier "param_1") (+ "+") (number_literal "0x10")) () ")"))))) (; ";")) (if_statement "if (iVar4 <= iVar5) {\n      *(int *)(param_1 + 0x10) = iVar4 * 2;\n      uVar2 = (*(code *)PTR_xrealloc_000b7740)(*(undefined4 *)(param_1 + 8),iVar4 * 0x18);\n      *(undefined4 *)(param_1 + 8) = uVar2;\n    }" (if "if") (parenthesized_expression "(iVar4 <= iVar5)" (( "(") (binary_expression "iVar4 <= iVar5" (identifier "iVar4") (<= "<=") (identifier "iVar5")) () ")")) (compound_statement "{\n      *(int *)(param_1 + 0x10) = iVar4 * 2;\n      uVar2 = (*(code *)PTR_xrealloc_000b7740)(*(undefined4 *)(param_1 + 8),iVar4 * 0x18);\n      *(undefined4 *)(param_1 + 8) = uVar2;\n    }" ({ "{") (expression_statement "*(int *)(param_1 + 0x10) = iVar4 * 2;" (assignment_expression "*(int *)(param_1 + 0x10) = iVar4 * 2" (pointer_expression "*(int *)(param_1 + 0x10)" (* "*") (cast_expression "(int *)(param_1 + 0x10)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x10)" (( "(") (binary_expression "param_1 + 0x10" (identifier "param_1") (+ "+") (number_literal "0x10")) () ")")))) (= "=") (binary_expression "iVar4 * 2" (identifier "iVar4") (* "*") (number_literal "2"))) (; ";")) (expression_statement "uVar2 = (*(code *)PTR_xrealloc_000b7740)(*(undefined4 *)(param_1 + 8),iVar4 * 0x18);" (assignment_expression "uVar2 = (*(code *)PTR_xrealloc_000b7740)(*(undefined4 *)(param_1 + 8),iVar4 * 0x18)" (identifier "uVar2") (= "=") (call_expression "(*(code *)PTR_xrealloc_000b7740)(*(undefined4 *)(param_1 + 8),iVar4 * 0x18)" (parenthesized_expression "(*(code *)PTR_xrealloc_000b7740)" (( "(") (pointer_expression "*(code *)PTR_xrealloc_000b7740" (* "*") (cast_expression "(code *)PTR_xrealloc_000b7740" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_xrealloc_000b7740"))) () ")")) (argument_list "(*(undefined4 *)(param_1 + 8),iVar4 * 0x18)" (( "(") (pointer_expression "*(undefined4 *)(param_1 + 8)" (* "*") (cast_expression "(undefined4 *)(param_1 + 8)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 8)" (( "(") (binary_expression "param_1 + 8" (identifier "param_1") (+ "+") (number_literal "8")) () ")")))) (, ",") (binary_expression "iVar4 * 0x18" (identifier "iVar4") (* "*") (number_literal "0x18")) () ")")))) (; ";")) (expression_statement "*(undefined4 *)(param_1 + 8) = uVar2;" (assignment_expression "*(undefined4 *)(param_1 + 8) = uVar2" (pointer_expression "*(undefined4 *)(param_1 + 8)" (* "*") (cast_expression "(undefined4 *)(param_1 + 8)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 8)" (( "(") (binary_expression "param_1 + 8" (identifier "param_1") (+ "+") (number_literal "8")) () ")")))) (= "=") (identifier "uVar2")) (; ";")) (} "}"))) (expression_statement "iVar5 = *(int *)(param_1 + 0xc);" (assignment_expression "iVar5 = *(int *)(param_1 + 0xc)" (identifier "iVar5") (= "=") (pointer_expression "*(int *)(param_1 + 0xc)" (* "*") (cast_expression "(int *)(param_1 + 0xc)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xc)" (( "(") (binary_expression "param_1 + 0xc" (identifier "param_1") (+ "+") (number_literal "0xc")) () ")"))))) (; ";")) (expression_statement "*(int *)(param_1 + 0xc) = iVar5 + 1;" (assignment_expression "*(int *)(param_1 + 0xc) = iVar5 + 1" (pointer_expression "*(int *)(param_1 + 0xc)" (* "*") (cast_expression "(int *)(param_1 + 0xc)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xc)" (( "(") (binary_expression "param_1 + 0xc" (identifier "param_1") (+ "+") (number_literal "0xc")) () ")")))) (= "=") (binary_expression "iVar5 + 1" (identifier "iVar5") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "puVar3 = (undefined4 *)(*(int *)(param_1 + 8) + iVar5 * 0xc);" (assignment_expression "puVar3 = (undefined4 *)(*(int *)(param_1 + 8) + iVar5 * 0xc)" (identifier "puVar3") (= "=") (cast_expression "(undefined4 *)(*(int *)(param_1 + 8) + iVar5 * 0xc)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*(int *)(param_1 + 8) + iVar5 * 0xc)" (( "(") (binary_expression "*(int *)(param_1 + 8) + iVar5 * 0xc" (pointer_expression "*(int *)(param_1 + 8)" (* "*") (cast_expression "(int *)(param_1 + 8)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 8)" (( "(") (binary_expression "param_1 + 8" (identifier "param_1") (+ "+") (number_literal "8")) () ")")))) (+ "+") (binary_expression "iVar5 * 0xc" (identifier "iVar5") (* "*") (number_literal "0xc"))) () ")")))) (; ";")) (expression_statement "*puVar3 = param_2;" (assignment_expression "*puVar3 = param_2" (pointer_expression "*puVar3" (* "*") (identifier "puVar3")) (= "=") (identifier "param_2")) (; ";")) (expression_statement "puVar3[1] = param_3;" (assignment_expression "puVar3[1] = param_3" (subscript_expression "puVar3[1]" (identifier "puVar3") ([ "[") (number_literal "1") (] "]")) (= "=") (identifier "param_3")) (; ";")) (expression_statement "puVar3[2] = param_4;" (assignment_expression "puVar3[2] = param_4" (subscript_expression "puVar3[2]" (identifier "puVar3") ([ "[") (number_literal "2") (] "]")) (= "=") (identifier "param_4")) (; ";")) (} "}")))) (return_statement "return;" (return "return") (; ";")) (} "}")))
(translation_unit (function_definition type: (primitive_type) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (primitive_type) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (primitive_type) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (identifier)))) body: (compound_statement (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (number_literal))) consequence: (compound_statement (expression_statement (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list (identifier))))))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (identifier) 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))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (number_literal) right: (identifier))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (do_statement body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list (identifier) (pointer_expression argument: (identifier)))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (identifier))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (identifier))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (identifier))) (return_statement))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal))))) condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier)))))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (compound_statement (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: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list (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))))) (binary_expression left: (identifier) right: (number_literal)))))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (identifier))))) (expression_statement (assignment_expression left: (identifier) 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))))))) (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: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (binary_expression left: (identifier) right: (number_literal))))))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (identifier))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (identifier))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (identifier)))))) (return_statement))))

void MASKED(int param_1,undefined4 param_2,int param_3,uint param_4)

{
  int iVar1;
  undefined4 uVar2;
  undefined4 *puVar3;
  int iVar4;
  int iVar5;
  
  if (param_3 == 0) {
    if ((param_4 & 0xfffffffd) == 1) {
      (*(code *)PTR_free_000b7d34)(param_2);
    }
  }
  else {
    iVar5 = *(int *)(param_1 + 0xc);
    if (0 < iVar5) {
      puVar3 = *(undefined4 **)(param_1 + 8);
      iVar4 = 0;
      do {
        iVar1 = (*(code *)PTR_c_strcasecmp_000b76fc)(param_2,*puVar3);
        iVar4 = iVar4 + 1;
        if (iVar1 == 0) {
          FUN_000357b8(puVar3);
          *puVar3 = param_2;
          puVar3[1] = param_3;
          puVar3[2] = param_4;
          return;
        }
        puVar3 = puVar3 + 3;
      } while (iVar4 != iVar5);
    }
    iVar4 = *(int *)(param_1 + 0x10);
    if (iVar4 <= iVar5) {
      *(int *)(param_1 + 0x10) = iVar4 * 2;
      uVar2 = (*(code *)PTR_xrealloc_000b7740)(*(undefined4 *)(param_1 + 8),iVar4 * 0x18);
      *(undefined4 *)(param_1 + 8) = uVar2;
    }
    iVar5 = *(int *)(param_1 + 0xc);
    *(int *)(param_1 + 0xc) = iVar5 + 1;
    puVar3 = (undefined4 *)(*(int *)(param_1 + 8) + iVar5 * 0xc);
    *puVar3 = param_2;
    puVar3[1] = param_3;
    puVar3[2] = param_4;
  }
  return;
}

