
reg_errcode_t extend_buffers(re_match_context_t *mctx,int min_len)

{
  bool bVar1;
  reg_errcode_t rVar2;
  re_dfastate_t **pprVar3;
  uint uVar4;
  int iVar5;
  re_string_t *pstr;
  uchar *puVar6;
  int iVar7;
  uchar *puVar8;
  int iVar9;
  
  uVar4 = (mctx->input).bufs_len;
  if (0x1ffffffe < uVar4) {
    return _REG_ESPACE;
  }
  iVar9 = (mctx->input).len;
  iVar5 = uVar4 << 1;
  if (iVar9 < iVar5) {
    iVar5 = iVar9;
  }
  if (min_len <= iVar5) {
    min_len = iVar5;
  }
  rVar2 = re_string_realloc_buffers(&mctx->input,min_len);
  if (rVar2 == _REG_NOERROR) {
    if (mctx->state_log != (re_dfastate_t **)0x0) {
      pprVar3 = (re_dfastate_t **)
                (*(code *)PTR_realloc_00078038)(mctx->state_log,((mctx->input).bufs_len + 1) * 4);
      if (pprVar3 == (re_dfastate_t **)0x0) {
        return _REG_ESPACE;
      }
      mctx->state_log = pprVar3;
    }
    bVar1 = 1 < (mctx->input).mb_cur_max;
    if ((mctx->input).icase != '\0') {
      if (bVar1) {
        rVar2 = build_wcs_upper_buffer(&mctx->input);
        return rVar2;
      }
      build_upper_buffer(&mctx->input);
      return _REG_NOERROR;
    }
    if (bVar1) {
      build_wcs_buffer(&mctx->input);
      return _REG_NOERROR;
    }
    puVar6 = (mctx->input).trans;
    if (puVar6 != (uchar *)0x0) {
      iVar5 = (mctx->input).len;
      iVar7 = (mctx->input).bufs_len;
      iVar9 = (mctx->input).valid_len;
      if (iVar7 <= iVar5) {
        iVar5 = iVar7;
      }
      if (iVar5 <= iVar9) {
        rVar2 = FUN_0004d78c();
        return rVar2;
      }
      while( true ) {
        iVar7 = (mctx->input).raw_mbs_idx + iVar9;
        puVar8 = (mctx->input).mbs + iVar9;
        iVar9 = iVar9 + 1;
        *puVar8 = puVar6[(mctx->input).raw_mbs[iVar7]];
        if (iVar5 == iVar9) break;
        puVar6 = (mctx->input).trans;
      }
      (mctx->input).valid_len = iVar5;
      (mctx->input).valid_raw_len = iVar5;
    }
  }
  return rVar2;
}



int FUN_0004d6c8(int *param_1,int param_2)

{
  int iVar1;
  int iVar2;
  int iVar3;
  int iVar4;
  int iVar5;
  undefined1 *puVar6;
  
  if (0x1ffffffe < (uint)param_1[9]) {
    return 0xc;
  }
  iVar4 = param_1[9] << 1;
  if (param_1[0xc] < iVar4) {
    iVar4 = param_1[0xc];
  }
  if (param_2 <= iVar4) {
    param_2 = iVar4;
  }
  iVar4 = FUN_0004c4d8(param_1,param_2);
  if (iVar4 == 0) {
    if (param_1[0x19] != 0) {
      iVar1 = (*(code *)PTR_realloc_00078038)(param_1[0x19],(param_1[9] + 1) * 4);
      if (iVar1 == 0) {
        return 0xc;
      }
      param_1[0x19] = iVar1;
    }
    if (*(char *)(param_1 + 0x12) != '\0') {
      if (1 < param_1[0x14]) {
        iVar4 = FUN_0004cf50();
        return iVar4;
      }
      FUN_0004cbe4(param_1);
      return 0;
    }
    if (1 < param_1[0x14]) {
      FUN_0004ccc8(param_1);
      return 0;
    }
    iVar1 = param_1[0x10];
    if (iVar1 != 0) {
      iVar5 = param_1[7];
      iVar2 = param_1[0xc];
      if (param_1[9] <= param_1[0xc]) {
        iVar2 = param_1[9];
      }
      if (iVar5 < iVar2) {
        while( true ) {
          iVar3 = *param_1 + iVar5;
          puVar6 = (undefined1 *)(param_1[1] + iVar5);
          iVar5 = iVar5 + 1;
          *puVar6 = *(undefined1 *)(iVar1 + (uint)*(byte *)(iVar3 + param_1[6]));
          if (iVar2 == iVar5) break;
          iVar1 = param_1[0x10];
        }
        param_1[7] = iVar2;
        param_1[8] = iVar2;
      }
      else {
        param_1[7] = iVar5;
        param_1[8] = iVar5;
      }
    }
  }
  return iVar4;
}


lui gp,0x3
addiu gp,gp,0x1e58
addu gp,gp,t9
addiu sp,sp,-0x28
lw v1,0x24(a0)
lui v0,0x1fff
ori v0,v0,0xffff
sw gp,0x10(sp)
sltu v0,v1,v0
sw ra,0x24(sp)
sw s1,0x20(sp)
beq v0,zero,0x0004d878
_sw s0,0x1c(sp)
lw a2,0x30(a0)
sll v1,v1,0x1
lw t9,-0x76dc(gp)
or s0,a0,zero
slt v0,a2,v1
movn v1,a2,v0
addiu t9,t9,-0x3b28
slt v0,v1,a1
bal 0x0004c4d8
_movz a1,v1,v0
lw gp,0x10(sp)
bne v0,zero,0x0004d794
_or s1,v0,zero
lw a0,0x64(s0)
beq a0,zero,0x0004d758
_lw t9,-0x74e8(gp)
lw a1,0x24(s0)
addiu a1,a1,0x1
jalr t9
_sll a1,a1,0x2
beq v0,zero,0x0004d878
_lw gp,0x10(sp)
sw v0,0x64(s0)
lw v0,0x50(s0)
lbu v1,0x48(s0)
beq v1,zero,0x0004d7ac
_slti v0,v0,0x2
bne v0,zero,0x0004d850
_or a0,s0,zero
lw t9,-0x76dc(gp)
lw ra,0x24(sp)
lw s1,0x20(sp)
lw s0,0x1c(sp)
addiu t9,t9,-0x30b0
b 0x0004cf50
_addiu sp,sp,0x28
sw a3,0x1c(s0)
sw a3,0x20(s0)
lw ra,0x24(sp)
or v0,s1,zero
lw s1,0x20(sp)
lw s0,0x1c(sp)
jr ra
_addiu sp,sp,0x28
beq v0,zero,0x0004d82c
_lw t9,-0x76dc(gp)
lw a0,0x40(s0)
beq a0,zero,0x0004d798
_lw ra,0x24(sp)
lw v0,0x30(s0)
lw a1,0x24(s0)
lw v1,0x1c(s0)
slt a3,v0,a1
movz v0,a1,a3
or a3,v0,zero
slt v0,v1,v0
bne v0,zero,0x0004d7f0
_nop
b 0x0004d78c
_or a3,v1,zero
lw a0,0x40(s0)
lw v0,0x0(s0)
lw a2,0x18(s0)
lw a1,0x4(s0)
addu v0,v0,v1
addu v0,v0,a2
addu a1,a1,v1
addiu v1,v1,0x1
lbu v0,0x0(v0)
addu a0,a0,v0
lbu v0,0x0(a0)
bne a3,v1,0x0004d7ec
_sb v0,0x0(a1)
sw a3,0x1c(s0)
b 0x0004d794
_sw a3,0x20(s0)
addiu t9,t9,-0x3338
bal 0x0004ccc8
_or a0,s0,zero
or v0,s1,zero
lw ra,0x24(sp)
lw s1,0x20(sp)
lw s0,0x1c(sp)
jr ra
_addiu sp,sp,0x28
lw t9,-0x76dc(gp)
addiu t9,t9,-0x341c
bal 0x0004cbe4
_nop
or v0,s1,zero
lw ra,0x24(sp)
lw s1,0x20(sp)
lw s0,0x1c(sp)
jr ra
_addiu sp,sp,0x28
lw ra,0x24(sp)
li s1,0xc
lw s0,0x1c(sp)
or v0,s1,zero
lw s1,0x20(sp)
jr ra
_addiu sp,sp,0x28
(translation_unit "int FUN_0004d6c8(int *param_1,int param_2)\n\n{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  int iVar4;\n  int iVar5;\n  undefined1 *puVar6;\n  \n  if (0x1ffffffe < (uint)param_1[9]) {\n    return 0xc;\n  }\n  iVar4 = param_1[9] << 1;\n  if (param_1[0xc] < iVar4) {\n    iVar4 = param_1[0xc];\n  }\n  if (param_2 <= iVar4) {\n    param_2 = iVar4;\n  }\n  iVar4 = FUN_0004c4d8(param_1,param_2);\n  if (iVar4 == 0) {\n    if (param_1[0x19] != 0) {\n      iVar1 = (*(code *)PTR_realloc_00078038)(param_1[0x19],(param_1[9] + 1) * 4);\n      if (iVar1 == 0) {\n        return 0xc;\n      }\n      param_1[0x19] = iVar1;\n    }\n    if (*(char *)(param_1 + 0x12) != '\0') {\n      if (1 < param_1[0x14]) {\n        iVar4 = FUN_0004cf50();\n        return iVar4;\n      }\n      FUN_0004cbe4(param_1);\n      return 0;\n    }\n    if (1 < param_1[0x14]) {\n      FUN_0004ccc8(param_1);\n      return 0;\n    }\n    iVar1 = param_1[0x10];\n    if (iVar1 != 0) {\n      iVar5 = param_1[7];\n      iVar2 = param_1[0xc];\n      if (param_1[9] <= param_1[0xc]) {\n        iVar2 = param_1[9];\n      }\n      if (iVar5 < iVar2) {\n        while( true ) {\n          iVar3 = *param_1 + iVar5;\n          puVar6 = (undefined1 *)(param_1[1] + iVar5);\n          iVar5 = iVar5 + 1;\n          *puVar6 = *(undefined1 *)(iVar1 + (uint)*(byte *)(iVar3 + param_1[6]));\n          if (iVar2 == iVar5) break;\n          iVar1 = param_1[0x10];\n        }\n        param_1[7] = iVar2;\n        param_1[8] = iVar2;\n      }\n      else {\n        param_1[7] = iVar5;\n        param_1[8] = iVar5;\n      }\n    }\n  }\n  return iVar4;\n}\n\n" (function_definition "int FUN_0004d6c8(int *param_1,int param_2)\n\n{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  int iVar4;\n  int iVar5;\n  undefined1 *puVar6;\n  \n  if (0x1ffffffe < (uint)param_1[9]) {\n    return 0xc;\n  }\n  iVar4 = param_1[9] << 1;\n  if (param_1[0xc] < iVar4) {\n    iVar4 = param_1[0xc];\n  }\n  if (param_2 <= iVar4) {\n    param_2 = iVar4;\n  }\n  iVar4 = FUN_0004c4d8(param_1,param_2);\n  if (iVar4 == 0) {\n    if (param_1[0x19] != 0) {\n      iVar1 = (*(code *)PTR_realloc_00078038)(param_1[0x19],(param_1[9] + 1) * 4);\n      if (iVar1 == 0) {\n        return 0xc;\n      }\n      param_1[0x19] = iVar1;\n    }\n    if (*(char *)(param_1 + 0x12) != '\0') {\n      if (1 < param_1[0x14]) {\n        iVar4 = FUN_0004cf50();\n        return iVar4;\n      }\n      FUN_0004cbe4(param_1);\n      return 0;\n    }\n    if (1 < param_1[0x14]) {\n      FUN_0004ccc8(param_1);\n      return 0;\n    }\n    iVar1 = param_1[0x10];\n    if (iVar1 != 0) {\n      iVar5 = param_1[7];\n      iVar2 = param_1[0xc];\n      if (param_1[9] <= param_1[0xc]) {\n        iVar2 = param_1[9];\n      }\n      if (iVar5 < iVar2) {\n        while( true ) {\n          iVar3 = *param_1 + iVar5;\n          puVar6 = (undefined1 *)(param_1[1] + iVar5);\n          iVar5 = iVar5 + 1;\n          *puVar6 = *(undefined1 *)(iVar1 + (uint)*(byte *)(iVar3 + param_1[6]));\n          if (iVar2 == iVar5) break;\n          iVar1 = param_1[0x10];\n        }\n        param_1[7] = iVar2;\n        param_1[8] = iVar2;\n      }\n      else {\n        param_1[7] = iVar5;\n        param_1[8] = iVar5;\n      }\n    }\n  }\n  return iVar4;\n}" primitive_type (function_declarator "FUN_0004d6c8(int *param_1,int param_2)" identifier (parameter_list "(int *param_1,int param_2)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int param_2" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  int iVar4;\n  int iVar5;\n  undefined1 *puVar6;\n  \n  if (0x1ffffffe < (uint)param_1[9]) {\n    return 0xc;\n  }\n  iVar4 = param_1[9] << 1;\n  if (param_1[0xc] < iVar4) {\n    iVar4 = param_1[0xc];\n  }\n  if (param_2 <= iVar4) {\n    param_2 = iVar4;\n  }\n  iVar4 = FUN_0004c4d8(param_1,param_2);\n  if (iVar4 == 0) {\n    if (param_1[0x19] != 0) {\n      iVar1 = (*(code *)PTR_realloc_00078038)(param_1[0x19],(param_1[9] + 1) * 4);\n      if (iVar1 == 0) {\n        return 0xc;\n      }\n      param_1[0x19] = iVar1;\n    }\n    if (*(char *)(param_1 + 0x12) != '\0') {\n      if (1 < param_1[0x14]) {\n        iVar4 = FUN_0004cf50();\n        return iVar4;\n      }\n      FUN_0004cbe4(param_1);\n      return 0;\n    }\n    if (1 < param_1[0x14]) {\n      FUN_0004ccc8(param_1);\n      return 0;\n    }\n    iVar1 = param_1[0x10];\n    if (iVar1 != 0) {\n      iVar5 = param_1[7];\n      iVar2 = param_1[0xc];\n      if (param_1[9] <= param_1[0xc]) {\n        iVar2 = param_1[9];\n      }\n      if (iVar5 < iVar2) {\n        while( true ) {\n          iVar3 = *param_1 + iVar5;\n          puVar6 = (undefined1 *)(param_1[1] + iVar5);\n          iVar5 = iVar5 + 1;\n          *puVar6 = *(undefined1 *)(iVar1 + (uint)*(byte *)(iVar3 + param_1[6]));\n          if (iVar2 == iVar5) break;\n          iVar1 = param_1[0x10];\n        }\n        param_1[7] = iVar2;\n        param_1[8] = iVar2;\n      }\n      else {\n        param_1[7] = iVar5;\n        param_1[8] = iVar5;\n      }\n    }\n  }\n  return iVar4;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "undefined1 *puVar6;" type_identifier (pointer_declarator "*puVar6" * identifier) ;) (if_statement "if (0x1ffffffe < (uint)param_1[9]) {\n    return 0xc;\n  }" if (parenthesized_expression "(0x1ffffffe < (uint)param_1[9])" ( (binary_expression "0x1ffffffe < (uint)param_1[9]" number_literal < (cast_expression "(uint)param_1[9]" ( (type_descriptor "uint" type_identifier) ) (subscript_expression "param_1[9]" identifier [ number_literal ]))) )) (compound_statement "{\n    return 0xc;\n  }" { (return_statement "return 0xc;" return number_literal ;) })) (expression_statement "iVar4 = param_1[9] << 1;" (assignment_expression "iVar4 = param_1[9] << 1" identifier = (binary_expression "param_1[9] << 1" (subscript_expression "param_1[9]" identifier [ number_literal ]) << number_literal)) ;) (if_statement "if (param_1[0xc] < iVar4) {\n    iVar4 = param_1[0xc];\n  }" if (parenthesized_expression "(param_1[0xc] < iVar4)" ( (binary_expression "param_1[0xc] < iVar4" (subscript_expression "param_1[0xc]" identifier [ number_literal ]) < identifier) )) (compound_statement "{\n    iVar4 = param_1[0xc];\n  }" { (expression_statement "iVar4 = param_1[0xc];" (assignment_expression "iVar4 = param_1[0xc]" identifier = (subscript_expression "param_1[0xc]" identifier [ number_literal ])) ;) })) (if_statement "if (param_2 <= iVar4) {\n    param_2 = iVar4;\n  }" if (parenthesized_expression "(param_2 <= iVar4)" ( (binary_expression "param_2 <= iVar4" identifier <= identifier) )) (compound_statement "{\n    param_2 = iVar4;\n  }" { (expression_statement "param_2 = iVar4;" (assignment_expression "param_2 = iVar4" identifier = identifier) ;) })) (expression_statement "iVar4 = FUN_0004c4d8(param_1,param_2);" (assignment_expression "iVar4 = FUN_0004c4d8(param_1,param_2)" identifier = (call_expression "FUN_0004c4d8(param_1,param_2)" identifier (argument_list "(param_1,param_2)" ( identifier , identifier )))) ;) (if_statement "if (iVar4 == 0) {\n    if (param_1[0x19] != 0) {\n      iVar1 = (*(code *)PTR_realloc_00078038)(param_1[0x19],(param_1[9] + 1) * 4);\n      if (iVar1 == 0) {\n        return 0xc;\n      }\n      param_1[0x19] = iVar1;\n    }\n    if (*(char *)(param_1 + 0x12) != '\0') {\n      if (1 < param_1[0x14]) {\n        iVar4 = FUN_0004cf50();\n        return iVar4;\n      }\n      FUN_0004cbe4(param_1);\n      return 0;\n    }\n    if (1 < param_1[0x14]) {\n      FUN_0004ccc8(param_1);\n      return 0;\n    }\n    iVar1 = param_1[0x10];\n    if (iVar1 != 0) {\n      iVar5 = param_1[7];\n      iVar2 = param_1[0xc];\n      if (param_1[9] <= param_1[0xc]) {\n        iVar2 = param_1[9];\n      }\n      if (iVar5 < iVar2) {\n        while( true ) {\n          iVar3 = *param_1 + iVar5;\n          puVar6 = (undefined1 *)(param_1[1] + iVar5);\n          iVar5 = iVar5 + 1;\n          *puVar6 = *(undefined1 *)(iVar1 + (uint)*(byte *)(iVar3 + param_1[6]));\n          if (iVar2 == iVar5) break;\n          iVar1 = param_1[0x10];\n        }\n        param_1[7] = iVar2;\n        param_1[8] = iVar2;\n      }\n      else {\n        param_1[7] = iVar5;\n        param_1[8] = iVar5;\n      }\n    }\n  }" if (parenthesized_expression "(iVar4 == 0)" ( (binary_expression "iVar4 == 0" identifier == number_literal) )) (compound_statement "{\n    if (param_1[0x19] != 0) {\n      iVar1 = (*(code *)PTR_realloc_00078038)(param_1[0x19],(param_1[9] + 1) * 4);\n      if (iVar1 == 0) {\n        return 0xc;\n      }\n      param_1[0x19] = iVar1;\n    }\n    if (*(char *)(param_1 + 0x12) != '\0') {\n      if (1 < param_1[0x14]) {\n        iVar4 = FUN_0004cf50();\n        return iVar4;\n      }\n      FUN_0004cbe4(param_1);\n      return 0;\n    }\n    if (1 < param_1[0x14]) {\n      FUN_0004ccc8(param_1);\n      return 0;\n    }\n    iVar1 = param_1[0x10];\n    if (iVar1 != 0) {\n      iVar5 = param_1[7];\n      iVar2 = param_1[0xc];\n      if (param_1[9] <= param_1[0xc]) {\n        iVar2 = param_1[9];\n      }\n      if (iVar5 < iVar2) {\n        while( true ) {\n          iVar3 = *param_1 + iVar5;\n          puVar6 = (undefined1 *)(param_1[1] + iVar5);\n          iVar5 = iVar5 + 1;\n          *puVar6 = *(undefined1 *)(iVar1 + (uint)*(byte *)(iVar3 + param_1[6]));\n          if (iVar2 == iVar5) break;\n          iVar1 = param_1[0x10];\n        }\n        param_1[7] = iVar2;\n        param_1[8] = iVar2;\n      }\n      else {\n        param_1[7] = iVar5;\n        param_1[8] = iVar5;\n      }\n    }\n  }" { (if_statement "if (param_1[0x19] != 0) {\n      iVar1 = (*(code *)PTR_realloc_00078038)(param_1[0x19],(param_1[9] + 1) * 4);\n      if (iVar1 == 0) {\n        return 0xc;\n      }\n      param_1[0x19] = iVar1;\n    }" if (parenthesized_expression "(param_1[0x19] != 0)" ( (binary_expression "param_1[0x19] != 0" (subscript_expression "param_1[0x19]" identifier [ number_literal ]) != number_literal) )) (compound_statement "{\n      iVar1 = (*(code *)PTR_realloc_00078038)(param_1[0x19],(param_1[9] + 1) * 4);\n      if (iVar1 == 0) {\n        return 0xc;\n      }\n      param_1[0x19] = iVar1;\n    }" { (expression_statement "iVar1 = (*(code *)PTR_realloc_00078038)(param_1[0x19],(param_1[9] + 1) * 4);" (assignment_expression "iVar1 = (*(code *)PTR_realloc_00078038)(param_1[0x19],(param_1[9] + 1) * 4)" identifier = (call_expression "(*(code *)PTR_realloc_00078038)(param_1[0x19],(param_1[9] + 1) * 4)" (parenthesized_expression "(*(code *)PTR_realloc_00078038)" ( (pointer_expression "*(code *)PTR_realloc_00078038" * (cast_expression "(code *)PTR_realloc_00078038" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_1[0x19],(param_1[9] + 1) * 4)" ( (subscript_expression "param_1[0x19]" identifier [ number_literal ]) , (binary_expression "(param_1[9] + 1) * 4" (parenthesized_expression "(param_1[9] + 1)" ( (binary_expression "param_1[9] + 1" (subscript_expression "param_1[9]" identifier [ number_literal ]) + number_literal) )) * number_literal) )))) ;) (if_statement "if (iVar1 == 0) {\n        return 0xc;\n      }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n        return 0xc;\n      }" { (return_statement "return 0xc;" return number_literal ;) })) (expression_statement "param_1[0x19] = iVar1;" (assignment_expression "param_1[0x19] = iVar1" (subscript_expression "param_1[0x19]" identifier [ number_literal ]) = identifier) ;) })) (if_statement "if (*(char *)(param_1 + 0x12) != '\0') {\n      if (1 < param_1[0x14]) {\n        iVar4 = FUN_0004cf50();\n        return iVar4;\n      }\n      FUN_0004cbe4(param_1);\n      return 0;\n    }" if (parenthesized_expression "(*(char *)(param_1 + 0x12) != '\0')" ( (binary_expression "*(char *)(param_1 + 0x12) != '\0'" (pointer_expression "*(char *)(param_1 + 0x12)" * (cast_expression "(char *)(param_1 + 0x12)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x12)" ( (binary_expression "param_1 + 0x12" identifier + number_literal) )))) != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n      if (1 < param_1[0x14]) {\n        iVar4 = FUN_0004cf50();\n        return iVar4;\n      }\n      FUN_0004cbe4(param_1);\n      return 0;\n    }" { (if_statement "if (1 < param_1[0x14]) {\n        iVar4 = FUN_0004cf50();\n        return iVar4;\n      }" if (parenthesized_expression "(1 < param_1[0x14])" ( (binary_expression "1 < param_1[0x14]" number_literal < (subscript_expression "param_1[0x14]" identifier [ number_literal ])) )) (compound_statement "{\n        iVar4 = FUN_0004cf50();\n        return iVar4;\n      }" { (expression_statement "iVar4 = FUN_0004cf50();" (assignment_expression "iVar4 = FUN_0004cf50()" identifier = (call_expression "FUN_0004cf50()" identifier (argument_list "()" ( )))) ;) (return_statement "return iVar4;" return identifier ;) })) (expression_statement "FUN_0004cbe4(param_1);" (call_expression "FUN_0004cbe4(param_1)" identifier (argument_list "(param_1)" ( identifier ))) ;) (return_statement "return 0;" return number_literal ;) })) (if_statement "if (1 < param_1[0x14]) {\n      FUN_0004ccc8(param_1);\n      return 0;\n    }" if (parenthesized_expression "(1 < param_1[0x14])" ( (binary_expression "1 < param_1[0x14]" number_literal < (subscript_expression "param_1[0x14]" identifier [ number_literal ])) )) (compound_statement "{\n      FUN_0004ccc8(param_1);\n      return 0;\n    }" { (expression_statement "FUN_0004ccc8(param_1);" (call_expression "FUN_0004ccc8(param_1)" identifier (argument_list "(param_1)" ( identifier ))) ;) (return_statement "return 0;" return number_literal ;) })) (expression_statement "iVar1 = param_1[0x10];" (assignment_expression "iVar1 = param_1[0x10]" identifier = (subscript_expression "param_1[0x10]" identifier [ number_literal ])) ;) (if_statement "if (iVar1 != 0) {\n      iVar5 = param_1[7];\n      iVar2 = param_1[0xc];\n      if (param_1[9] <= param_1[0xc]) {\n        iVar2 = param_1[9];\n      }\n      if (iVar5 < iVar2) {\n        while( true ) {\n          iVar3 = *param_1 + iVar5;\n          puVar6 = (undefined1 *)(param_1[1] + iVar5);\n          iVar5 = iVar5 + 1;\n          *puVar6 = *(undefined1 *)(iVar1 + (uint)*(byte *)(iVar3 + param_1[6]));\n          if (iVar2 == iVar5) break;\n          iVar1 = param_1[0x10];\n        }\n        param_1[7] = iVar2;\n        param_1[8] = iVar2;\n      }\n      else {\n        param_1[7] = iVar5;\n        param_1[8] = iVar5;\n      }\n    }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n      iVar5 = param_1[7];\n      iVar2 = param_1[0xc];\n      if (param_1[9] <= param_1[0xc]) {\n        iVar2 = param_1[9];\n      }\n      if (iVar5 < iVar2) {\n        while( true ) {\n          iVar3 = *param_1 + iVar5;\n          puVar6 = (undefined1 *)(param_1[1] + iVar5);\n          iVar5 = iVar5 + 1;\n          *puVar6 = *(undefined1 *)(iVar1 + (uint)*(byte *)(iVar3 + param_1[6]));\n          if (iVar2 == iVar5) break;\n          iVar1 = param_1[0x10];\n        }\n        param_1[7] = iVar2;\n        param_1[8] = iVar2;\n      }\n      else {\n        param_1[7] = iVar5;\n        param_1[8] = iVar5;\n      }\n    }" { (expression_statement "iVar5 = param_1[7];" (assignment_expression "iVar5 = param_1[7]" identifier = (subscript_expression "param_1[7]" identifier [ number_literal ])) ;) (expression_statement "iVar2 = param_1[0xc];" (assignment_expression "iVar2 = param_1[0xc]" identifier = (subscript_expression "param_1[0xc]" identifier [ number_literal ])) ;) (if_statement "if (param_1[9] <= param_1[0xc]) {\n        iVar2 = param_1[9];\n      }" if (parenthesized_expression "(param_1[9] <= param_1[0xc])" ( (binary_expression "param_1[9] <= param_1[0xc]" (subscript_expression "param_1[9]" identifier [ number_literal ]) <= (subscript_expression "param_1[0xc]" identifier [ number_literal ])) )) (compound_statement "{\n        iVar2 = param_1[9];\n      }" { (expression_statement "iVar2 = param_1[9];" (assignment_expression "iVar2 = param_1[9]" identifier = (subscript_expression "param_1[9]" identifier [ number_literal ])) ;) })) (if_statement "if (iVar5 < iVar2) {\n        while( true ) {\n          iVar3 = *param_1 + iVar5;\n          puVar6 = (undefined1 *)(param_1[1] + iVar5);\n          iVar5 = iVar5 + 1;\n          *puVar6 = *(undefined1 *)(iVar1 + (uint)*(byte *)(iVar3 + param_1[6]));\n          if (iVar2 == iVar5) break;\n          iVar1 = param_1[0x10];\n        }\n        param_1[7] = iVar2;\n        param_1[8] = iVar2;\n      }\n      else {\n        param_1[7] = iVar5;\n        param_1[8] = iVar5;\n      }" if (parenthesized_expression "(iVar5 < iVar2)" ( (binary_expression "iVar5 < iVar2" identifier < identifier) )) (compound_statement "{\n        while( true ) {\n          iVar3 = *param_1 + iVar5;\n          puVar6 = (undefined1 *)(param_1[1] + iVar5);\n          iVar5 = iVar5 + 1;\n          *puVar6 = *(undefined1 *)(iVar1 + (uint)*(byte *)(iVar3 + param_1[6]));\n          if (iVar2 == iVar5) break;\n          iVar1 = param_1[0x10];\n        }\n        param_1[7] = iVar2;\n        param_1[8] = iVar2;\n      }" { (while_statement "while( true ) {\n          iVar3 = *param_1 + iVar5;\n          puVar6 = (undefined1 *)(param_1[1] + iVar5);\n          iVar5 = iVar5 + 1;\n          *puVar6 = *(undefined1 *)(iVar1 + (uint)*(byte *)(iVar3 + param_1[6]));\n          if (iVar2 == iVar5) break;\n          iVar1 = param_1[0x10];\n        }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n          iVar3 = *param_1 + iVar5;\n          puVar6 = (undefined1 *)(param_1[1] + iVar5);\n          iVar5 = iVar5 + 1;\n          *puVar6 = *(undefined1 *)(iVar1 + (uint)*(byte *)(iVar3 + param_1[6]));\n          if (iVar2 == iVar5) break;\n          iVar1 = param_1[0x10];\n        }" { (expression_statement "iVar3 = *param_1 + iVar5;" (assignment_expression "iVar3 = *param_1 + iVar5" identifier = (binary_expression "*param_1 + iVar5" (pointer_expression "*param_1" * identifier) + identifier)) ;) (expression_statement "puVar6 = (undefined1 *)(param_1[1] + iVar5);" (assignment_expression "puVar6 = (undefined1 *)(param_1[1] + iVar5)" identifier = (cast_expression "(undefined1 *)(param_1[1] + iVar5)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1[1] + iVar5)" ( (binary_expression "param_1[1] + iVar5" (subscript_expression "param_1[1]" identifier [ number_literal ]) + identifier) )))) ;) (expression_statement "iVar5 = iVar5 + 1;" (assignment_expression "iVar5 = iVar5 + 1" identifier = (binary_expression "iVar5 + 1" identifier + number_literal)) ;) (expression_statement "*puVar6 = *(undefined1 *)(iVar1 + (uint)*(byte *)(iVar3 + param_1[6]));" (assignment_expression "*puVar6 = *(undefined1 *)(iVar1 + (uint)*(byte *)(iVar3 + param_1[6]))" (pointer_expression "*puVar6" * identifier) = (pointer_expression "*(undefined1 *)(iVar1 + (uint)*(byte *)(iVar3 + param_1[6]))" * (cast_expression "(undefined1 *)(iVar1 + (uint)*(byte *)(iVar3 + param_1[6]))" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + (uint)*(byte *)(iVar3 + param_1[6]))" ( (binary_expression "iVar1 + (uint)*(byte *)(iVar3 + param_1[6])" identifier + (binary_expression "(uint)*(byte *)(iVar3 + param_1[6])" (parenthesized_expression "(uint)" ( identifier )) * (cast_expression "(byte *)(iVar3 + param_1[6])" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + param_1[6])" ( (binary_expression "iVar3 + param_1[6]" identifier + (subscript_expression "param_1[6]" identifier [ number_literal ])) ))))) ))))) ;) (if_statement "if (iVar2 == iVar5) break;" if (parenthesized_expression "(iVar2 == iVar5)" ( (binary_expression "iVar2 == iVar5" identifier == identifier) )) (break_statement "break;" break ;)) (expression_statement "iVar1 = param_1[0x10];" (assignment_expression "iVar1 = param_1[0x10]" identifier = (subscript_expression "param_1[0x10]" identifier [ number_literal ])) ;) })) (expression_statement "param_1[7] = iVar2;" (assignment_expression "param_1[7] = iVar2" (subscript_expression "param_1[7]" identifier [ number_literal ]) = identifier) ;) (expression_statement "param_1[8] = iVar2;" (assignment_expression "param_1[8] = iVar2" (subscript_expression "param_1[8]" identifier [ number_literal ]) = identifier) ;) }) (else_clause "else {\n        param_1[7] = iVar5;\n        param_1[8] = iVar5;\n      }" else (compound_statement "{\n        param_1[7] = iVar5;\n        param_1[8] = iVar5;\n      }" { (expression_statement "param_1[7] = iVar5;" (assignment_expression "param_1[7] = iVar5" (subscript_expression "param_1[7]" identifier [ number_literal ]) = identifier) ;) (expression_statement "param_1[8] = iVar5;" (assignment_expression "param_1[8] = iVar5" (subscript_expression "param_1[8]" identifier [ number_literal ]) = identifier) ;) }))) })) })) (return_statement "return iVar4;" return identifier ;) })))
(translation_unit "reg_errcode_t extend_buffers(re_match_context_t *mctx,int min_len)\n\n{\n  bool bVar1;\n  reg_errcode_t rVar2;\n  re_dfastate_t **pprVar3;\n  uint uVar4;\n  int iVar5;\n  re_string_t *pstr;\n  uchar *puVar6;\n  int iVar7;\n  uchar *puVar8;\n  int iVar9;\n  \n  uVar4 = (mctx->input).bufs_len;\n  if (0x1ffffffe < uVar4) {\n    return _REG_ESPACE;\n  }\n  iVar9 = (mctx->input).len;\n  iVar5 = uVar4 << 1;\n  if (iVar9 < iVar5) {\n    iVar5 = iVar9;\n  }\n  if (min_len <= iVar5) {\n    min_len = iVar5;\n  }\n  rVar2 = re_string_realloc_buffers(&mctx->input,min_len);\n  if (rVar2 == _REG_NOERROR) {\n    if (mctx->state_log != (re_dfastate_t **)0x0) {\n      pprVar3 = (re_dfastate_t **)\n                (*(code *)PTR_realloc_00078038)(mctx->state_log,((mctx->input).bufs_len + 1) * 4);\n      if (pprVar3 == (re_dfastate_t **)0x0) {\n        return _REG_ESPACE;\n      }\n      mctx->state_log = pprVar3;\n    }\n    bVar1 = 1 < (mctx->input).mb_cur_max;\n    if ((mctx->input).icase != '\0') {\n      if (bVar1) {\n        rVar2 = build_wcs_upper_buffer(&mctx->input);\n        return rVar2;\n      }\n      build_upper_buffer(&mctx->input);\n      return _REG_NOERROR;\n    }\n    if (bVar1) {\n      build_wcs_buffer(&mctx->input);\n      return _REG_NOERROR;\n    }\n    puVar6 = (mctx->input).trans;\n    if (puVar6 != (uchar *)0x0) {\n      iVar5 = (mctx->input).len;\n      iVar7 = (mctx->input).bufs_len;\n      iVar9 = (mctx->input).valid_len;\n      if (iVar7 <= iVar5) {\n        iVar5 = iVar7;\n      }\n      if (iVar5 <= iVar9) {\n        rVar2 = FUN_0004d78c();\n        return rVar2;\n      }\n      while( true ) {\n        iVar7 = (mctx->input).raw_mbs_idx + iVar9;\n        puVar8 = (mctx->input).mbs + iVar9;\n        iVar9 = iVar9 + 1;\n        *puVar8 = puVar6[(mctx->input).raw_mbs[iVar7]];\n        if (iVar5 == iVar9) break;\n        puVar6 = (mctx->input).trans;\n      }\n      (mctx->input).valid_len = iVar5;\n      (mctx->input).valid_raw_len = iVar5;\n    }\n  }\n  return rVar2;\n}\n\n" (function_definition "reg_errcode_t extend_buffers(re_match_context_t *mctx,int min_len)\n\n{\n  bool bVar1;\n  reg_errcode_t rVar2;\n  re_dfastate_t **pprVar3;\n  uint uVar4;\n  int iVar5;\n  re_string_t *pstr;\n  uchar *puVar6;\n  int iVar7;\n  uchar *puVar8;\n  int iVar9;\n  \n  uVar4 = (mctx->input).bufs_len;\n  if (0x1ffffffe < uVar4) {\n    return _REG_ESPACE;\n  }\n  iVar9 = (mctx->input).len;\n  iVar5 = uVar4 << 1;\n  if (iVar9 < iVar5) {\n    iVar5 = iVar9;\n  }\n  if (min_len <= iVar5) {\n    min_len = iVar5;\n  }\n  rVar2 = re_string_realloc_buffers(&mctx->input,min_len);\n  if (rVar2 == _REG_NOERROR) {\n    if (mctx->state_log != (re_dfastate_t **)0x0) {\n      pprVar3 = (re_dfastate_t **)\n                (*(code *)PTR_realloc_00078038)(mctx->state_log,((mctx->input).bufs_len + 1) * 4);\n      if (pprVar3 == (re_dfastate_t **)0x0) {\n        return _REG_ESPACE;\n      }\n      mctx->state_log = pprVar3;\n    }\n    bVar1 = 1 < (mctx->input).mb_cur_max;\n    if ((mctx->input).icase != '\0') {\n      if (bVar1) {\n        rVar2 = build_wcs_upper_buffer(&mctx->input);\n        return rVar2;\n      }\n      build_upper_buffer(&mctx->input);\n      return _REG_NOERROR;\n    }\n    if (bVar1) {\n      build_wcs_buffer(&mctx->input);\n      return _REG_NOERROR;\n    }\n    puVar6 = (mctx->input).trans;\n    if (puVar6 != (uchar *)0x0) {\n      iVar5 = (mctx->input).len;\n      iVar7 = (mctx->input).bufs_len;\n      iVar9 = (mctx->input).valid_len;\n      if (iVar7 <= iVar5) {\n        iVar5 = iVar7;\n      }\n      if (iVar5 <= iVar9) {\n        rVar2 = FUN_0004d78c();\n        return rVar2;\n      }\n      while( true ) {\n        iVar7 = (mctx->input).raw_mbs_idx + iVar9;\n        puVar8 = (mctx->input).mbs + iVar9;\n        iVar9 = iVar9 + 1;\n        *puVar8 = puVar6[(mctx->input).raw_mbs[iVar7]];\n        if (iVar5 == iVar9) break;\n        puVar6 = (mctx->input).trans;\n      }\n      (mctx->input).valid_len = iVar5;\n      (mctx->input).valid_raw_len = iVar5;\n    }\n  }\n  return rVar2;\n}" type_identifier (function_declarator "extend_buffers(re_match_context_t *mctx,int min_len)" identifier (parameter_list "(re_match_context_t *mctx,int min_len)" ( (parameter_declaration "re_match_context_t *mctx" type_identifier (pointer_declarator "*mctx" * identifier)) , (parameter_declaration "int min_len" primitive_type identifier) ))) (compound_statement "{\n  bool bVar1;\n  reg_errcode_t rVar2;\n  re_dfastate_t **pprVar3;\n  uint uVar4;\n  int iVar5;\n  re_string_t *pstr;\n  uchar *puVar6;\n  int iVar7;\n  uchar *puVar8;\n  int iVar9;\n  \n  uVar4 = (mctx->input).bufs_len;\n  if (0x1ffffffe < uVar4) {\n    return _REG_ESPACE;\n  }\n  iVar9 = (mctx->input).len;\n  iVar5 = uVar4 << 1;\n  if (iVar9 < iVar5) {\n    iVar5 = iVar9;\n  }\n  if (min_len <= iVar5) {\n    min_len = iVar5;\n  }\n  rVar2 = re_string_realloc_buffers(&mctx->input,min_len);\n  if (rVar2 == _REG_NOERROR) {\n    if (mctx->state_log != (re_dfastate_t **)0x0) {\n      pprVar3 = (re_dfastate_t **)\n                (*(code *)PTR_realloc_00078038)(mctx->state_log,((mctx->input).bufs_len + 1) * 4);\n      if (pprVar3 == (re_dfastate_t **)0x0) {\n        return _REG_ESPACE;\n      }\n      mctx->state_log = pprVar3;\n    }\n    bVar1 = 1 < (mctx->input).mb_cur_max;\n    if ((mctx->input).icase != '\0') {\n      if (bVar1) {\n        rVar2 = build_wcs_upper_buffer(&mctx->input);\n        return rVar2;\n      }\n      build_upper_buffer(&mctx->input);\n      return _REG_NOERROR;\n    }\n    if (bVar1) {\n      build_wcs_buffer(&mctx->input);\n      return _REG_NOERROR;\n    }\n    puVar6 = (mctx->input).trans;\n    if (puVar6 != (uchar *)0x0) {\n      iVar5 = (mctx->input).len;\n      iVar7 = (mctx->input).bufs_len;\n      iVar9 = (mctx->input).valid_len;\n      if (iVar7 <= iVar5) {\n        iVar5 = iVar7;\n      }\n      if (iVar5 <= iVar9) {\n        rVar2 = FUN_0004d78c();\n        return rVar2;\n      }\n      while( true ) {\n        iVar7 = (mctx->input).raw_mbs_idx + iVar9;\n        puVar8 = (mctx->input).mbs + iVar9;\n        iVar9 = iVar9 + 1;\n        *puVar8 = puVar6[(mctx->input).raw_mbs[iVar7]];\n        if (iVar5 == iVar9) break;\n        puVar6 = (mctx->input).trans;\n      }\n      (mctx->input).valid_len = iVar5;\n      (mctx->input).valid_raw_len = iVar5;\n    }\n  }\n  return rVar2;\n}" { (declaration "bool bVar1;" primitive_type identifier ;) (declaration "reg_errcode_t rVar2;" type_identifier identifier ;) (declaration "re_dfastate_t **pprVar3;" type_identifier (pointer_declarator "**pprVar3" * (pointer_declarator "*pprVar3" * identifier)) ;) (declaration "uint uVar4;" type_identifier identifier ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "re_string_t *pstr;" type_identifier (pointer_declarator "*pstr" * identifier) ;) (declaration "uchar *puVar6;" type_identifier (pointer_declarator "*puVar6" * identifier) ;) (declaration "int iVar7;" primitive_type identifier ;) (declaration "uchar *puVar8;" type_identifier (pointer_declarator "*puVar8" * identifier) ;) (declaration "int iVar9;" primitive_type identifier ;) (expression_statement "uVar4 = (mctx->input).bufs_len;" (assignment_expression "uVar4 = (mctx->input).bufs_len" identifier = (field_expression "(mctx->input).bufs_len" (parenthesized_expression "(mctx->input)" ( (field_expression "mctx->input" identifier -> field_identifier) )) . field_identifier)) ;) (if_statement "if (0x1ffffffe < uVar4) {\n    return _REG_ESPACE;\n  }" if (parenthesized_expression "(0x1ffffffe < uVar4)" ( (binary_expression "0x1ffffffe < uVar4" number_literal < identifier) )) (compound_statement "{\n    return _REG_ESPACE;\n  }" { (return_statement "return _REG_ESPACE;" return identifier ;) })) (expression_statement "iVar9 = (mctx->input).len;" (assignment_expression "iVar9 = (mctx->input).len" identifier = (field_expression "(mctx->input).len" (parenthesized_expression "(mctx->input)" ( (field_expression "mctx->input" identifier -> field_identifier) )) . field_identifier)) ;) (expression_statement "iVar5 = uVar4 << 1;" (assignment_expression "iVar5 = uVar4 << 1" identifier = (binary_expression "uVar4 << 1" identifier << number_literal)) ;) (if_statement "if (iVar9 < iVar5) {\n    iVar5 = iVar9;\n  }" if (parenthesized_expression "(iVar9 < iVar5)" ( (binary_expression "iVar9 < iVar5" identifier < identifier) )) (compound_statement "{\n    iVar5 = iVar9;\n  }" { (expression_statement "iVar5 = iVar9;" (assignment_expression "iVar5 = iVar9" identifier = identifier) ;) })) (if_statement "if (min_len <= iVar5) {\n    min_len = iVar5;\n  }" if (parenthesized_expression "(min_len <= iVar5)" ( (binary_expression "min_len <= iVar5" identifier <= identifier) )) (compound_statement "{\n    min_len = iVar5;\n  }" { (expression_statement "min_len = iVar5;" (assignment_expression "min_len = iVar5" identifier = identifier) ;) })) (expression_statement "rVar2 = re_string_realloc_buffers(&mctx->input,min_len);" (assignment_expression "rVar2 = re_string_realloc_buffers(&mctx->input,min_len)" identifier = (call_expression "re_string_realloc_buffers(&mctx->input,min_len)" identifier (argument_list "(&mctx->input,min_len)" ( (pointer_expression "&mctx->input" & (field_expression "mctx->input" identifier -> field_identifier)) , identifier )))) ;) (if_statement "if (rVar2 == _REG_NOERROR) {\n    if (mctx->state_log != (re_dfastate_t **)0x0) {\n      pprVar3 = (re_dfastate_t **)\n                (*(code *)PTR_realloc_00078038)(mctx->state_log,((mctx->input).bufs_len + 1) * 4);\n      if (pprVar3 == (re_dfastate_t **)0x0) {\n        return _REG_ESPACE;\n      }\n      mctx->state_log = pprVar3;\n    }\n    bVar1 = 1 < (mctx->input).mb_cur_max;\n    if ((mctx->input).icase != '\0') {\n      if (bVar1) {\n        rVar2 = build_wcs_upper_buffer(&mctx->input);\n        return rVar2;\n      }\n      build_upper_buffer(&mctx->input);\n      return _REG_NOERROR;\n    }\n    if (bVar1) {\n      build_wcs_buffer(&mctx->input);\n      return _REG_NOERROR;\n    }\n    puVar6 = (mctx->input).trans;\n    if (puVar6 != (uchar *)0x0) {\n      iVar5 = (mctx->input).len;\n      iVar7 = (mctx->input).bufs_len;\n      iVar9 = (mctx->input).valid_len;\n      if (iVar7 <= iVar5) {\n        iVar5 = iVar7;\n      }\n      if (iVar5 <= iVar9) {\n        rVar2 = FUN_0004d78c();\n        return rVar2;\n      }\n      while( true ) {\n        iVar7 = (mctx->input).raw_mbs_idx + iVar9;\n        puVar8 = (mctx->input).mbs + iVar9;\n        iVar9 = iVar9 + 1;\n        *puVar8 = puVar6[(mctx->input).raw_mbs[iVar7]];\n        if (iVar5 == iVar9) break;\n        puVar6 = (mctx->input).trans;\n      }\n      (mctx->input).valid_len = iVar5;\n      (mctx->input).valid_raw_len = iVar5;\n    }\n  }" if (parenthesized_expression "(rVar2 == _REG_NOERROR)" ( (binary_expression "rVar2 == _REG_NOERROR" identifier == identifier) )) (compound_statement "{\n    if (mctx->state_log != (re_dfastate_t **)0x0) {\n      pprVar3 = (re_dfastate_t **)\n                (*(code *)PTR_realloc_00078038)(mctx->state_log,((mctx->input).bufs_len + 1) * 4);\n      if (pprVar3 == (re_dfastate_t **)0x0) {\n        return _REG_ESPACE;\n      }\n      mctx->state_log = pprVar3;\n    }\n    bVar1 = 1 < (mctx->input).mb_cur_max;\n    if ((mctx->input).icase != '\0') {\n      if (bVar1) {\n        rVar2 = build_wcs_upper_buffer(&mctx->input);\n        return rVar2;\n      }\n      build_upper_buffer(&mctx->input);\n      return _REG_NOERROR;\n    }\n    if (bVar1) {\n      build_wcs_buffer(&mctx->input);\n      return _REG_NOERROR;\n    }\n    puVar6 = (mctx->input).trans;\n    if (puVar6 != (uchar *)0x0) {\n      iVar5 = (mctx->input).len;\n      iVar7 = (mctx->input).bufs_len;\n      iVar9 = (mctx->input).valid_len;\n      if (iVar7 <= iVar5) {\n        iVar5 = iVar7;\n      }\n      if (iVar5 <= iVar9) {\n        rVar2 = FUN_0004d78c();\n        return rVar2;\n      }\n      while( true ) {\n        iVar7 = (mctx->input).raw_mbs_idx + iVar9;\n        puVar8 = (mctx->input).mbs + iVar9;\n        iVar9 = iVar9 + 1;\n        *puVar8 = puVar6[(mctx->input).raw_mbs[iVar7]];\n        if (iVar5 == iVar9) break;\n        puVar6 = (mctx->input).trans;\n      }\n      (mctx->input).valid_len = iVar5;\n      (mctx->input).valid_raw_len = iVar5;\n    }\n  }" { (if_statement "if (mctx->state_log != (re_dfastate_t **)0x0) {\n      pprVar3 = (re_dfastate_t **)\n                (*(code *)PTR_realloc_00078038)(mctx->state_log,((mctx->input).bufs_len + 1) * 4);\n      if (pprVar3 == (re_dfastate_t **)0x0) {\n        return _REG_ESPACE;\n      }\n      mctx->state_log = pprVar3;\n    }" if (parenthesized_expression "(mctx->state_log != (re_dfastate_t **)0x0)" ( (binary_expression "mctx->state_log != (re_dfastate_t **)0x0" (field_expression "mctx->state_log" identifier -> field_identifier) != (cast_expression "(re_dfastate_t **)0x0" ( (type_descriptor "re_dfastate_t **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) number_literal)) )) (compound_statement "{\n      pprVar3 = (re_dfastate_t **)\n                (*(code *)PTR_realloc_00078038)(mctx->state_log,((mctx->input).bufs_len + 1) * 4);\n      if (pprVar3 == (re_dfastate_t **)0x0) {\n        return _REG_ESPACE;\n      }\n      mctx->state_log = pprVar3;\n    }" { (expression_statement "pprVar3 = (re_dfastate_t **)\n                (*(code *)PTR_realloc_00078038)(mctx->state_log,((mctx->input).bufs_len + 1) * 4);" (assignment_expression "pprVar3 = (re_dfastate_t **)\n                (*(code *)PTR_realloc_00078038)(mctx->state_log,((mctx->input).bufs_len + 1) * 4)" identifier = (cast_expression "(re_dfastate_t **)\n                (*(code *)PTR_realloc_00078038)(mctx->state_log,((mctx->input).bufs_len + 1) * 4)" ( (type_descriptor "re_dfastate_t **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (call_expression "(*(code *)PTR_realloc_00078038)(mctx->state_log,((mctx->input).bufs_len + 1) * 4)" (parenthesized_expression "(*(code *)PTR_realloc_00078038)" ( (pointer_expression "*(code *)PTR_realloc_00078038" * (cast_expression "(code *)PTR_realloc_00078038" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(mctx->state_log,((mctx->input).bufs_len + 1) * 4)" ( (field_expression "mctx->state_log" identifier -> field_identifier) , (binary_expression "((mctx->input).bufs_len + 1) * 4" (parenthesized_expression "((mctx->input).bufs_len + 1)" ( (binary_expression "(mctx->input).bufs_len + 1" (field_expression "(mctx->input).bufs_len" (parenthesized_expression "(mctx->input)" ( (field_expression "mctx->input" identifier -> field_identifier) )) . field_identifier) + number_literal) )) * number_literal) ))))) ;) (if_statement "if (pprVar3 == (re_dfastate_t **)0x0) {\n        return _REG_ESPACE;\n      }" if (parenthesized_expression "(pprVar3 == (re_dfastate_t **)0x0)" ( (binary_expression "pprVar3 == (re_dfastate_t **)0x0" identifier == (cast_expression "(re_dfastate_t **)0x0" ( (type_descriptor "re_dfastate_t **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) number_literal)) )) (compound_statement "{\n        return _REG_ESPACE;\n      }" { (return_statement "return _REG_ESPACE;" return identifier ;) })) (expression_statement "mctx->state_log = pprVar3;" (assignment_expression "mctx->state_log = pprVar3" (field_expression "mctx->state_log" identifier -> field_identifier) = identifier) ;) })) (expression_statement "bVar1 = 1 < (mctx->input).mb_cur_max;" (assignment_expression "bVar1 = 1 < (mctx->input).mb_cur_max" identifier = (binary_expression "1 < (mctx->input).mb_cur_max" number_literal < (field_expression "(mctx->input).mb_cur_max" (parenthesized_expression "(mctx->input)" ( (field_expression "mctx->input" identifier -> field_identifier) )) . field_identifier))) ;) (if_statement "if ((mctx->input).icase != '\0') {\n      if (bVar1) {\n        rVar2 = build_wcs_upper_buffer(&mctx->input);\n        return rVar2;\n      }\n      build_upper_buffer(&mctx->input);\n      return _REG_NOERROR;\n    }" if (parenthesized_expression "((mctx->input).icase != '\0')" ( (binary_expression "(mctx->input).icase != '\0'" (field_expression "(mctx->input).icase" (parenthesized_expression "(mctx->input)" ( (field_expression "mctx->input" identifier -> field_identifier) )) . field_identifier) != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n      if (bVar1) {\n        rVar2 = build_wcs_upper_buffer(&mctx->input);\n        return rVar2;\n      }\n      build_upper_buffer(&mctx->input);\n      return _REG_NOERROR;\n    }" { (if_statement "if (bVar1) {\n        rVar2 = build_wcs_upper_buffer(&mctx->input);\n        return rVar2;\n      }" if (parenthesized_expression "(bVar1)" ( identifier )) (compound_statement "{\n        rVar2 = build_wcs_upper_buffer(&mctx->input);\n        return rVar2;\n      }" { (expression_statement "rVar2 = build_wcs_upper_buffer(&mctx->input);" (assignment_expression "rVar2 = build_wcs_upper_buffer(&mctx->input)" identifier = (call_expression "build_wcs_upper_buffer(&mctx->input)" identifier (argument_list "(&mctx->input)" ( (pointer_expression "&mctx->input" & (field_expression "mctx->input" identifier -> field_identifier)) )))) ;) (return_statement "return rVar2;" return identifier ;) })) (expression_statement "build_upper_buffer(&mctx->input);" (call_expression "build_upper_buffer(&mctx->input)" identifier (argument_list "(&mctx->input)" ( (pointer_expression "&mctx->input" & (field_expression "mctx->input" identifier -> field_identifier)) ))) ;) (return_statement "return _REG_NOERROR;" return identifier ;) })) (if_statement "if (bVar1) {\n      build_wcs_buffer(&mctx->input);\n      return _REG_NOERROR;\n    }" if (parenthesized_expression "(bVar1)" ( identifier )) (compound_statement "{\n      build_wcs_buffer(&mctx->input);\n      return _REG_NOERROR;\n    }" { (expression_statement "build_wcs_buffer(&mctx->input);" (call_expression "build_wcs_buffer(&mctx->input)" identifier (argument_list "(&mctx->input)" ( (pointer_expression "&mctx->input" & (field_expression "mctx->input" identifier -> field_identifier)) ))) ;) (return_statement "return _REG_NOERROR;" return identifier ;) })) (expression_statement "puVar6 = (mctx->input).trans;" (assignment_expression "puVar6 = (mctx->input).trans" identifier = (field_expression "(mctx->input).trans" (parenthesized_expression "(mctx->input)" ( (field_expression "mctx->input" identifier -> field_identifier) )) . field_identifier)) ;) (if_statement "if (puVar6 != (uchar *)0x0) {\n      iVar5 = (mctx->input).len;\n      iVar7 = (mctx->input).bufs_len;\n      iVar9 = (mctx->input).valid_len;\n      if (iVar7 <= iVar5) {\n        iVar5 = iVar7;\n      }\n      if (iVar5 <= iVar9) {\n        rVar2 = FUN_0004d78c();\n        return rVar2;\n      }\n      while( true ) {\n        iVar7 = (mctx->input).raw_mbs_idx + iVar9;\n        puVar8 = (mctx->input).mbs + iVar9;\n        iVar9 = iVar9 + 1;\n        *puVar8 = puVar6[(mctx->input).raw_mbs[iVar7]];\n        if (iVar5 == iVar9) break;\n        puVar6 = (mctx->input).trans;\n      }\n      (mctx->input).valid_len = iVar5;\n      (mctx->input).valid_raw_len = iVar5;\n    }" if (parenthesized_expression "(puVar6 != (uchar *)0x0)" ( (binary_expression "puVar6 != (uchar *)0x0" identifier != (cast_expression "(uchar *)0x0" ( (type_descriptor "uchar *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      iVar5 = (mctx->input).len;\n      iVar7 = (mctx->input).bufs_len;\n      iVar9 = (mctx->input).valid_len;\n      if (iVar7 <= iVar5) {\n        iVar5 = iVar7;\n      }\n      if (iVar5 <= iVar9) {\n        rVar2 = FUN_0004d78c();\n        return rVar2;\n      }\n      while( true ) {\n        iVar7 = (mctx->input).raw_mbs_idx + iVar9;\n        puVar8 = (mctx->input).mbs + iVar9;\n        iVar9 = iVar9 + 1;\n        *puVar8 = puVar6[(mctx->input).raw_mbs[iVar7]];\n        if (iVar5 == iVar9) break;\n        puVar6 = (mctx->input).trans;\n      }\n      (mctx->input).valid_len = iVar5;\n      (mctx->input).valid_raw_len = iVar5;\n    }" { (expression_statement "iVar5 = (mctx->input).len;" (assignment_expression "iVar5 = (mctx->input).len" identifier = (field_expression "(mctx->input).len" (parenthesized_expression "(mctx->input)" ( (field_expression "mctx->input" identifier -> field_identifier) )) . field_identifier)) ;) (expression_statement "iVar7 = (mctx->input).bufs_len;" (assignment_expression "iVar7 = (mctx->input).bufs_len" identifier = (field_expression "(mctx->input).bufs_len" (parenthesized_expression "(mctx->input)" ( (field_expression "mctx->input" identifier -> field_identifier) )) . field_identifier)) ;) (expression_statement "iVar9 = (mctx->input).valid_len;" (assignment_expression "iVar9 = (mctx->input).valid_len" identifier = (field_expression "(mctx->input).valid_len" (parenthesized_expression "(mctx->input)" ( (field_expression "mctx->input" identifier -> field_identifier) )) . field_identifier)) ;) (if_statement "if (iVar7 <= iVar5) {\n        iVar5 = iVar7;\n      }" if (parenthesized_expression "(iVar7 <= iVar5)" ( (binary_expression "iVar7 <= iVar5" identifier <= identifier) )) (compound_statement "{\n        iVar5 = iVar7;\n      }" { (expression_statement "iVar5 = iVar7;" (assignment_expression "iVar5 = iVar7" identifier = identifier) ;) })) (if_statement "if (iVar5 <= iVar9) {\n        rVar2 = FUN_0004d78c();\n        return rVar2;\n      }" if (parenthesized_expression "(iVar5 <= iVar9)" ( (binary_expression "iVar5 <= iVar9" identifier <= identifier) )) (compound_statement "{\n        rVar2 = FUN_0004d78c();\n        return rVar2;\n      }" { (expression_statement "rVar2 = FUN_0004d78c();" (assignment_expression "rVar2 = FUN_0004d78c()" identifier = (call_expression "FUN_0004d78c()" identifier (argument_list "()" ( )))) ;) (return_statement "return rVar2;" return identifier ;) })) (while_statement "while( true ) {\n        iVar7 = (mctx->input).raw_mbs_idx + iVar9;\n        puVar8 = (mctx->input).mbs + iVar9;\n        iVar9 = iVar9 + 1;\n        *puVar8 = puVar6[(mctx->input).raw_mbs[iVar7]];\n        if (iVar5 == iVar9) break;\n        puVar6 = (mctx->input).trans;\n      }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n        iVar7 = (mctx->input).raw_mbs_idx + iVar9;\n        puVar8 = (mctx->input).mbs + iVar9;\n        iVar9 = iVar9 + 1;\n        *puVar8 = puVar6[(mctx->input).raw_mbs[iVar7]];\n        if (iVar5 == iVar9) break;\n        puVar6 = (mctx->input).trans;\n      }" { (expression_statement "iVar7 = (mctx->input).raw_mbs_idx + iVar9;" (assignment_expression "iVar7 = (mctx->input).raw_mbs_idx + iVar9" identifier = (binary_expression "(mctx->input).raw_mbs_idx + iVar9" (field_expression "(mctx->input).raw_mbs_idx" (parenthesized_expression "(mctx->input)" ( (field_expression "mctx->input" identifier -> field_identifier) )) . field_identifier) + identifier)) ;) (expression_statement "puVar8 = (mctx->input).mbs + iVar9;" (assignment_expression "puVar8 = (mctx->input).mbs + iVar9" identifier = (binary_expression "(mctx->input).mbs + iVar9" (field_expression "(mctx->input).mbs" (parenthesized_expression "(mctx->input)" ( (field_expression "mctx->input" identifier -> field_identifier) )) . field_identifier) + identifier)) ;) (expression_statement "iVar9 = iVar9 + 1;" (assignment_expression "iVar9 = iVar9 + 1" identifier = (binary_expression "iVar9 + 1" identifier + number_literal)) ;) (expression_statement "*puVar8 = puVar6[(mctx->input).raw_mbs[iVar7]];" (assignment_expression "*puVar8 = puVar6[(mctx->input).raw_mbs[iVar7]]" (pointer_expression "*puVar8" * identifier) = (subscript_expression "puVar6[(mctx->input).raw_mbs[iVar7]]" identifier [ (subscript_expression "(mctx->input).raw_mbs[iVar7]" (field_expression "(mctx->input).raw_mbs" (parenthesized_expression "(mctx->input)" ( (field_expression "mctx->input" identifier -> field_identifier) )) . field_identifier) [ identifier ]) ])) ;) (if_statement "if (iVar5 == iVar9) break;" if (parenthesized_expression "(iVar5 == iVar9)" ( (binary_expression "iVar5 == iVar9" identifier == identifier) )) (break_statement "break;" break ;)) (expression_statement "puVar6 = (mctx->input).trans;" (assignment_expression "puVar6 = (mctx->input).trans" identifier = (field_expression "(mctx->input).trans" (parenthesized_expression "(mctx->input)" ( (field_expression "mctx->input" identifier -> field_identifier) )) . field_identifier)) ;) })) (expression_statement "(mctx->input).valid_len = iVar5;" (assignment_expression "(mctx->input).valid_len = iVar5" (field_expression "(mctx->input).valid_len" (parenthesized_expression "(mctx->input)" ( (field_expression "mctx->input" identifier -> field_identifier) )) . field_identifier) = identifier) ;) (expression_statement "(mctx->input).valid_raw_len = iVar5;" (assignment_expression "(mctx->input).valid_raw_len = iVar5" (field_expression "(mctx->input).valid_raw_len" (parenthesized_expression "(mctx->input)" ( (field_expression "mctx->input" identifier -> field_identifier) )) . field_identifier) = identifier) ;) })) })) (return_statement "return rVar2;" return identifier ;) })))
(translation_unit "int FUN_0004d6c8(int *param_1,int param_2)\n\n{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  int iVar4;\n  int iVar5;\n  undefined1 *puVar6;\n  \n  if (0x1ffffffe < (uint)param_1[9]) {\n    return 0xc;\n  }\n  iVar4 = param_1[9] << 1;\n  if (param_1[0xc] < iVar4) {\n    iVar4 = param_1[0xc];\n  }\n  if (param_2 <= iVar4) {\n    param_2 = iVar4;\n  }\n  iVar4 = FUN_0004c4d8(param_1,param_2);\n  if (iVar4 == 0) {\n    if (param_1[0x19] != 0) {\n      iVar1 = (*(code *)PTR_realloc_00078038)(param_1[0x19],(param_1[9] + 1) * 4);\n      if (iVar1 == 0) {\n        return 0xc;\n      }\n      param_1[0x19] = iVar1;\n    }\n    if (*(char *)(param_1 + 0x12) != '\0') {\n      if (1 < param_1[0x14]) {\n        iVar4 = FUN_0004cf50();\n        return iVar4;\n      }\n      FUN_0004cbe4(param_1);\n      return 0;\n    }\n    if (1 < param_1[0x14]) {\n      FUN_0004ccc8(param_1);\n      return 0;\n    }\n    iVar1 = param_1[0x10];\n    if (iVar1 != 0) {\n      iVar5 = param_1[7];\n      iVar2 = param_1[0xc];\n      if (param_1[9] <= param_1[0xc]) {\n        iVar2 = param_1[9];\n      }\n      if (iVar5 < iVar2) {\n        while( true ) {\n          iVar3 = *param_1 + iVar5;\n          puVar6 = (undefined1 *)(param_1[1] + iVar5);\n          iVar5 = iVar5 + 1;\n          *puVar6 = *(undefined1 *)(iVar1 + (uint)*(byte *)(iVar3 + param_1[6]));\n          if (iVar2 == iVar5) break;\n          iVar1 = param_1[0x10];\n        }\n        param_1[7] = iVar2;\n        param_1[8] = iVar2;\n      }\n      else {\n        param_1[7] = iVar5;\n        param_1[8] = iVar5;\n      }\n    }\n  }\n  return iVar4;\n}\n\n" (function_definition "int FUN_0004d6c8(int *param_1,int param_2)\n\n{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  int iVar4;\n  int iVar5;\n  undefined1 *puVar6;\n  \n  if (0x1ffffffe < (uint)param_1[9]) {\n    return 0xc;\n  }\n  iVar4 = param_1[9] << 1;\n  if (param_1[0xc] < iVar4) {\n    iVar4 = param_1[0xc];\n  }\n  if (param_2 <= iVar4) {\n    param_2 = iVar4;\n  }\n  iVar4 = FUN_0004c4d8(param_1,param_2);\n  if (iVar4 == 0) {\n    if (param_1[0x19] != 0) {\n      iVar1 = (*(code *)PTR_realloc_00078038)(param_1[0x19],(param_1[9] + 1) * 4);\n      if (iVar1 == 0) {\n        return 0xc;\n      }\n      param_1[0x19] = iVar1;\n    }\n    if (*(char *)(param_1 + 0x12) != '\0') {\n      if (1 < param_1[0x14]) {\n        iVar4 = FUN_0004cf50();\n        return iVar4;\n      }\n      FUN_0004cbe4(param_1);\n      return 0;\n    }\n    if (1 < param_1[0x14]) {\n      FUN_0004ccc8(param_1);\n      return 0;\n    }\n    iVar1 = param_1[0x10];\n    if (iVar1 != 0) {\n      iVar5 = param_1[7];\n      iVar2 = param_1[0xc];\n      if (param_1[9] <= param_1[0xc]) {\n        iVar2 = param_1[9];\n      }\n      if (iVar5 < iVar2) {\n        while( true ) {\n          iVar3 = *param_1 + iVar5;\n          puVar6 = (undefined1 *)(param_1[1] + iVar5);\n          iVar5 = iVar5 + 1;\n          *puVar6 = *(undefined1 *)(iVar1 + (uint)*(byte *)(iVar3 + param_1[6]));\n          if (iVar2 == iVar5) break;\n          iVar1 = param_1[0x10];\n        }\n        param_1[7] = iVar2;\n        param_1[8] = iVar2;\n      }\n      else {\n        param_1[7] = iVar5;\n        param_1[8] = iVar5;\n      }\n    }\n  }\n  return iVar4;\n}" primitive_type (function_declarator "FUN_0004d6c8(int *param_1,int param_2)" identifier (parameter_list "(int *param_1,int param_2)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int param_2" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  int iVar4;\n  int iVar5;\n  undefined1 *puVar6;\n  \n  if (0x1ffffffe < (uint)param_1[9]) {\n    return 0xc;\n  }\n  iVar4 = param_1[9] << 1;\n  if (param_1[0xc] < iVar4) {\n    iVar4 = param_1[0xc];\n  }\n  if (param_2 <= iVar4) {\n    param_2 = iVar4;\n  }\n  iVar4 = FUN_0004c4d8(param_1,param_2);\n  if (iVar4 == 0) {\n    if (param_1[0x19] != 0) {\n      iVar1 = (*(code *)PTR_realloc_00078038)(param_1[0x19],(param_1[9] + 1) * 4);\n      if (iVar1 == 0) {\n        return 0xc;\n      }\n      param_1[0x19] = iVar1;\n    }\n    if (*(char *)(param_1 + 0x12) != '\0') {\n      if (1 < param_1[0x14]) {\n        iVar4 = FUN_0004cf50();\n        return iVar4;\n      }\n      FUN_0004cbe4(param_1);\n      return 0;\n    }\n    if (1 < param_1[0x14]) {\n      FUN_0004ccc8(param_1);\n      return 0;\n    }\n    iVar1 = param_1[0x10];\n    if (iVar1 != 0) {\n      iVar5 = param_1[7];\n      iVar2 = param_1[0xc];\n      if (param_1[9] <= param_1[0xc]) {\n        iVar2 = param_1[9];\n      }\n      if (iVar5 < iVar2) {\n        while( true ) {\n          iVar3 = *param_1 + iVar5;\n          puVar6 = (undefined1 *)(param_1[1] + iVar5);\n          iVar5 = iVar5 + 1;\n          *puVar6 = *(undefined1 *)(iVar1 + (uint)*(byte *)(iVar3 + param_1[6]));\n          if (iVar2 == iVar5) break;\n          iVar1 = param_1[0x10];\n        }\n        param_1[7] = iVar2;\n        param_1[8] = iVar2;\n      }\n      else {\n        param_1[7] = iVar5;\n        param_1[8] = iVar5;\n      }\n    }\n  }\n  return iVar4;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "undefined1 *puVar6;" type_identifier (pointer_declarator "*puVar6" * identifier) ;) (if_statement "if (0x1ffffffe < (uint)param_1[9]) {\n    return 0xc;\n  }" if (parenthesized_expression "(0x1ffffffe < (uint)param_1[9])" ( (binary_expression "0x1ffffffe < (uint)param_1[9]" number_literal < (cast_expression "(uint)param_1[9]" ( (type_descriptor "uint" type_identifier) ) (subscript_expression "param_1[9]" identifier [ number_literal ]))) )) (compound_statement "{\n    return 0xc;\n  }" { (return_statement "return 0xc;" return number_literal ;) })) (expression_statement "iVar4 = param_1[9] << 1;" (assignment_expression "iVar4 = param_1[9] << 1" identifier = (binary_expression "param_1[9] << 1" (subscript_expression "param_1[9]" identifier [ number_literal ]) << number_literal)) ;) (if_statement "if (param_1[0xc] < iVar4) {\n    iVar4 = param_1[0xc];\n  }" if (parenthesized_expression "(param_1[0xc] < iVar4)" ( (binary_expression "param_1[0xc] < iVar4" (subscript_expression "param_1[0xc]" identifier [ number_literal ]) < identifier) )) (compound_statement "{\n    iVar4 = param_1[0xc];\n  }" { (expression_statement "iVar4 = param_1[0xc];" (assignment_expression "iVar4 = param_1[0xc]" identifier = (subscript_expression "param_1[0xc]" identifier [ number_literal ])) ;) })) (if_statement "if (param_2 <= iVar4) {\n    param_2 = iVar4;\n  }" if (parenthesized_expression "(param_2 <= iVar4)" ( (binary_expression "param_2 <= iVar4" identifier <= identifier) )) (compound_statement "{\n    param_2 = iVar4;\n  }" { (expression_statement "param_2 = iVar4;" (assignment_expression "param_2 = iVar4" identifier = identifier) ;) })) (expression_statement "iVar4 = FUN_0004c4d8(param_1,param_2);" (assignment_expression "iVar4 = FUN_0004c4d8(param_1,param_2)" identifier = (call_expression "FUN_0004c4d8(param_1,param_2)" identifier (argument_list "(param_1,param_2)" ( identifier , identifier )))) ;) (if_statement "if (iVar4 == 0) {\n    if (param_1[0x19] != 0) {\n      iVar1 = (*(code *)PTR_realloc_00078038)(param_1[0x19],(param_1[9] + 1) * 4);\n      if (iVar1 == 0) {\n        return 0xc;\n      }\n      param_1[0x19] = iVar1;\n    }\n    if (*(char *)(param_1 + 0x12) != '\0') {\n      if (1 < param_1[0x14]) {\n        iVar4 = FUN_0004cf50();\n        return iVar4;\n      }\n      FUN_0004cbe4(param_1);\n      return 0;\n    }\n    if (1 < param_1[0x14]) {\n      FUN_0004ccc8(param_1);\n      return 0;\n    }\n    iVar1 = param_1[0x10];\n    if (iVar1 != 0) {\n      iVar5 = param_1[7];\n      iVar2 = param_1[0xc];\n      if (param_1[9] <= param_1[0xc]) {\n        iVar2 = param_1[9];\n      }\n      if (iVar5 < iVar2) {\n        while( true ) {\n          iVar3 = *param_1 + iVar5;\n          puVar6 = (undefined1 *)(param_1[1] + iVar5);\n          iVar5 = iVar5 + 1;\n          *puVar6 = *(undefined1 *)(iVar1 + (uint)*(byte *)(iVar3 + param_1[6]));\n          if (iVar2 == iVar5) break;\n          iVar1 = param_1[0x10];\n        }\n        param_1[7] = iVar2;\n        param_1[8] = iVar2;\n      }\n      else {\n        param_1[7] = iVar5;\n        param_1[8] = iVar5;\n      }\n    }\n  }" if (parenthesized_expression "(iVar4 == 0)" ( (binary_expression "iVar4 == 0" identifier == number_literal) )) (compound_statement "{\n    if (param_1[0x19] != 0) {\n      iVar1 = (*(code *)PTR_realloc_00078038)(param_1[0x19],(param_1[9] + 1) * 4);\n      if (iVar1 == 0) {\n        return 0xc;\n      }\n      param_1[0x19] = iVar1;\n    }\n    if (*(char *)(param_1 + 0x12) != '\0') {\n      if (1 < param_1[0x14]) {\n        iVar4 = FUN_0004cf50();\n        return iVar4;\n      }\n      FUN_0004cbe4(param_1);\n      return 0;\n    }\n    if (1 < param_1[0x14]) {\n      FUN_0004ccc8(param_1);\n      return 0;\n    }\n    iVar1 = param_1[0x10];\n    if (iVar1 != 0) {\n      iVar5 = param_1[7];\n      iVar2 = param_1[0xc];\n      if (param_1[9] <= param_1[0xc]) {\n        iVar2 = param_1[9];\n      }\n      if (iVar5 < iVar2) {\n        while( true ) {\n          iVar3 = *param_1 + iVar5;\n          puVar6 = (undefined1 *)(param_1[1] + iVar5);\n          iVar5 = iVar5 + 1;\n          *puVar6 = *(undefined1 *)(iVar1 + (uint)*(byte *)(iVar3 + param_1[6]));\n          if (iVar2 == iVar5) break;\n          iVar1 = param_1[0x10];\n        }\n        param_1[7] = iVar2;\n        param_1[8] = iVar2;\n      }\n      else {\n        param_1[7] = iVar5;\n        param_1[8] = iVar5;\n      }\n    }\n  }" { (if_statement "if (param_1[0x19] != 0) {\n      iVar1 = (*(code *)PTR_realloc_00078038)(param_1[0x19],(param_1[9] + 1) * 4);\n      if (iVar1 == 0) {\n        return 0xc;\n      }\n      param_1[0x19] = iVar1;\n    }" if (parenthesized_expression "(param_1[0x19] != 0)" ( (binary_expression "param_1[0x19] != 0" (subscript_expression "param_1[0x19]" identifier [ number_literal ]) != number_literal) )) (compound_statement "{\n      iVar1 = (*(code *)PTR_realloc_00078038)(param_1[0x19],(param_1[9] + 1) * 4);\n      if (iVar1 == 0) {\n        return 0xc;\n      }\n      param_1[0x19] = iVar1;\n    }" { (expression_statement "iVar1 = (*(code *)PTR_realloc_00078038)(param_1[0x19],(param_1[9] + 1) * 4);" (assignment_expression "iVar1 = (*(code *)PTR_realloc_00078038)(param_1[0x19],(param_1[9] + 1) * 4)" identifier = (call_expression "(*(code *)PTR_realloc_00078038)(param_1[0x19],(param_1[9] + 1) * 4)" (parenthesized_expression "(*(code *)PTR_realloc_00078038)" ( (pointer_expression "*(code *)PTR_realloc_00078038" * (cast_expression "(code *)PTR_realloc_00078038" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_1[0x19],(param_1[9] + 1) * 4)" ( (subscript_expression "param_1[0x19]" identifier [ number_literal ]) , (binary_expression "(param_1[9] + 1) * 4" (parenthesized_expression "(param_1[9] + 1)" ( (binary_expression "param_1[9] + 1" (subscript_expression "param_1[9]" identifier [ number_literal ]) + number_literal) )) * number_literal) )))) ;) (if_statement "if (iVar1 == 0) {\n        return 0xc;\n      }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n        return 0xc;\n      }" { (return_statement "return 0xc;" return number_literal ;) })) (expression_statement "param_1[0x19] = iVar1;" (assignment_expression "param_1[0x19] = iVar1" (subscript_expression "param_1[0x19]" identifier [ number_literal ]) = identifier) ;) })) (if_statement "if (*(char *)(param_1 + 0x12) != '\0') {\n      if (1 < param_1[0x14]) {\n        iVar4 = FUN_0004cf50();\n        return iVar4;\n      }\n      FUN_0004cbe4(param_1);\n      return 0;\n    }" if (parenthesized_expression "(*(char *)(param_1 + 0x12) != '\0')" ( (binary_expression "*(char *)(param_1 + 0x12) != '\0'" (pointer_expression "*(char *)(param_1 + 0x12)" * (cast_expression "(char *)(param_1 + 0x12)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x12)" ( (binary_expression "param_1 + 0x12" identifier + number_literal) )))) != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n      if (1 < param_1[0x14]) {\n        iVar4 = FUN_0004cf50();\n        return iVar4;\n      }\n      FUN_0004cbe4(param_1);\n      return 0;\n    }" { (if_statement "if (1 < param_1[0x14]) {\n        iVar4 = FUN_0004cf50();\n        return iVar4;\n      }" if (parenthesized_expression "(1 < param_1[0x14])" ( (binary_expression "1 < param_1[0x14]" number_literal < (subscript_expression "param_1[0x14]" identifier [ number_literal ])) )) (compound_statement "{\n        iVar4 = FUN_0004cf50();\n        return iVar4;\n      }" { (expression_statement "iVar4 = FUN_0004cf50();" (assignment_expression "iVar4 = FUN_0004cf50()" identifier = (call_expression "FUN_0004cf50()" identifier (argument_list "()" ( )))) ;) (return_statement "return iVar4;" return identifier ;) })) (expression_statement "FUN_0004cbe4(param_1);" (call_expression "FUN_0004cbe4(param_1)" identifier (argument_list "(param_1)" ( identifier ))) ;) (return_statement "return 0;" return number_literal ;) })) (if_statement "if (1 < param_1[0x14]) {\n      FUN_0004ccc8(param_1);\n      return 0;\n    }" if (parenthesized_expression "(1 < param_1[0x14])" ( (binary_expression "1 < param_1[0x14]" number_literal < (subscript_expression "param_1[0x14]" identifier [ number_literal ])) )) (compound_statement "{\n      FUN_0004ccc8(param_1);\n      return 0;\n    }" { (expression_statement "FUN_0004ccc8(param_1);" (call_expression "FUN_0004ccc8(param_1)" identifier (argument_list "(param_1)" ( identifier ))) ;) (return_statement "return 0;" return number_literal ;) })) (expression_statement "iVar1 = param_1[0x10];" (assignment_expression "iVar1 = param_1[0x10]" identifier = (subscript_expression "param_1[0x10]" identifier [ number_literal ])) ;) (if_statement "if (iVar1 != 0) {\n      iVar5 = param_1[7];\n      iVar2 = param_1[0xc];\n      if (param_1[9] <= param_1[0xc]) {\n        iVar2 = param_1[9];\n      }\n      if (iVar5 < iVar2) {\n        while( true ) {\n          iVar3 = *param_1 + iVar5;\n          puVar6 = (undefined1 *)(param_1[1] + iVar5);\n          iVar5 = iVar5 + 1;\n          *puVar6 = *(undefined1 *)(iVar1 + (uint)*(byte *)(iVar3 + param_1[6]));\n          if (iVar2 == iVar5) break;\n          iVar1 = param_1[0x10];\n        }\n        param_1[7] = iVar2;\n        param_1[8] = iVar2;\n      }\n      else {\n        param_1[7] = iVar5;\n        param_1[8] = iVar5;\n      }\n    }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n      iVar5 = param_1[7];\n      iVar2 = param_1[0xc];\n      if (param_1[9] <= param_1[0xc]) {\n        iVar2 = param_1[9];\n      }\n      if (iVar5 < iVar2) {\n        while( true ) {\n          iVar3 = *param_1 + iVar5;\n          puVar6 = (undefined1 *)(param_1[1] + iVar5);\n          iVar5 = iVar5 + 1;\n          *puVar6 = *(undefined1 *)(iVar1 + (uint)*(byte *)(iVar3 + param_1[6]));\n          if (iVar2 == iVar5) break;\n          iVar1 = param_1[0x10];\n        }\n        param_1[7] = iVar2;\n        param_1[8] = iVar2;\n      }\n      else {\n        param_1[7] = iVar5;\n        param_1[8] = iVar5;\n      }\n    }" { (expression_statement "iVar5 = param_1[7];" (assignment_expression "iVar5 = param_1[7]" identifier = (subscript_expression "param_1[7]" identifier [ number_literal ])) ;) (expression_statement "iVar2 = param_1[0xc];" (assignment_expression "iVar2 = param_1[0xc]" identifier = (subscript_expression "param_1[0xc]" identifier [ number_literal ])) ;) (if_statement "if (param_1[9] <= param_1[0xc]) {\n        iVar2 = param_1[9];\n      }" if (parenthesized_expression "(param_1[9] <= param_1[0xc])" ( (binary_expression "param_1[9] <= param_1[0xc]" (subscript_expression "param_1[9]" identifier [ number_literal ]) <= (subscript_expression "param_1[0xc]" identifier [ number_literal ])) )) (compound_statement "{\n        iVar2 = param_1[9];\n      }" { (expression_statement "iVar2 = param_1[9];" (assignment_expression "iVar2 = param_1[9]" identifier = (subscript_expression "param_1[9]" identifier [ number_literal ])) ;) })) (if_statement "if (iVar5 < iVar2) {\n        while( true ) {\n          iVar3 = *param_1 + iVar5;\n          puVar6 = (undefined1 *)(param_1[1] + iVar5);\n          iVar5 = iVar5 + 1;\n          *puVar6 = *(undefined1 *)(iVar1 + (uint)*(byte *)(iVar3 + param_1[6]));\n          if (iVar2 == iVar5) break;\n          iVar1 = param_1[0x10];\n        }\n        param_1[7] = iVar2;\n        param_1[8] = iVar2;\n      }\n      else {\n        param_1[7] = iVar5;\n        param_1[8] = iVar5;\n      }" if (parenthesized_expression "(iVar5 < iVar2)" ( (binary_expression "iVar5 < iVar2" identifier < identifier) )) (compound_statement "{\n        while( true ) {\n          iVar3 = *param_1 + iVar5;\n          puVar6 = (undefined1 *)(param_1[1] + iVar5);\n          iVar5 = iVar5 + 1;\n          *puVar6 = *(undefined1 *)(iVar1 + (uint)*(byte *)(iVar3 + param_1[6]));\n          if (iVar2 == iVar5) break;\n          iVar1 = param_1[0x10];\n        }\n        param_1[7] = iVar2;\n        param_1[8] = iVar2;\n      }" { (while_statement "while( true ) {\n          iVar3 = *param_1 + iVar5;\n          puVar6 = (undefined1 *)(param_1[1] + iVar5);\n          iVar5 = iVar5 + 1;\n          *puVar6 = *(undefined1 *)(iVar1 + (uint)*(byte *)(iVar3 + param_1[6]));\n          if (iVar2 == iVar5) break;\n          iVar1 = param_1[0x10];\n        }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n          iVar3 = *param_1 + iVar5;\n          puVar6 = (undefined1 *)(param_1[1] + iVar5);\n          iVar5 = iVar5 + 1;\n          *puVar6 = *(undefined1 *)(iVar1 + (uint)*(byte *)(iVar3 + param_1[6]));\n          if (iVar2 == iVar5) break;\n          iVar1 = param_1[0x10];\n        }" { (expression_statement "iVar3 = *param_1 + iVar5;" (assignment_expression "iVar3 = *param_1 + iVar5" identifier = (binary_expression "*param_1 + iVar5" (pointer_expression "*param_1" * identifier) + identifier)) ;) (expression_statement "puVar6 = (undefined1 *)(param_1[1] + iVar5);" (assignment_expression "puVar6 = (undefined1 *)(param_1[1] + iVar5)" identifier = (cast_expression "(undefined1 *)(param_1[1] + iVar5)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1[1] + iVar5)" ( (binary_expression "param_1[1] + iVar5" (subscript_expression "param_1[1]" identifier [ number_literal ]) + identifier) )))) ;) (expression_statement "iVar5 = iVar5 + 1;" (assignment_expression "iVar5 = iVar5 + 1" identifier = (binary_expression "iVar5 + 1" identifier + number_literal)) ;) (expression_statement "*puVar6 = *(undefined1 *)(iVar1 + (uint)*(byte *)(iVar3 + param_1[6]));" (assignment_expression "*puVar6 = *(undefined1 *)(iVar1 + (uint)*(byte *)(iVar3 + param_1[6]))" (pointer_expression "*puVar6" * identifier) = (pointer_expression "*(undefined1 *)(iVar1 + (uint)*(byte *)(iVar3 + param_1[6]))" * (cast_expression "(undefined1 *)(iVar1 + (uint)*(byte *)(iVar3 + param_1[6]))" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + (uint)*(byte *)(iVar3 + param_1[6]))" ( (binary_expression "iVar1 + (uint)*(byte *)(iVar3 + param_1[6])" identifier + (binary_expression "(uint)*(byte *)(iVar3 + param_1[6])" (parenthesized_expression "(uint)" ( identifier )) * (cast_expression "(byte *)(iVar3 + param_1[6])" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + param_1[6])" ( (binary_expression "iVar3 + param_1[6]" identifier + (subscript_expression "param_1[6]" identifier [ number_literal ])) ))))) ))))) ;) (if_statement "if (iVar2 == iVar5) break;" if (parenthesized_expression "(iVar2 == iVar5)" ( (binary_expression "iVar2 == iVar5" identifier == identifier) )) (break_statement "break;" break ;)) (expression_statement "iVar1 = param_1[0x10];" (assignment_expression "iVar1 = param_1[0x10]" identifier = (subscript_expression "param_1[0x10]" identifier [ number_literal ])) ;) })) (expression_statement "param_1[7] = iVar2;" (assignment_expression "param_1[7] = iVar2" (subscript_expression "param_1[7]" identifier [ number_literal ]) = identifier) ;) (expression_statement "param_1[8] = iVar2;" (assignment_expression "param_1[8] = iVar2" (subscript_expression "param_1[8]" identifier [ number_literal ]) = identifier) ;) }) (else_clause "else {\n        param_1[7] = iVar5;\n        param_1[8] = iVar5;\n      }" else (compound_statement "{\n        param_1[7] = iVar5;\n        param_1[8] = iVar5;\n      }" { (expression_statement "param_1[7] = iVar5;" (assignment_expression "param_1[7] = iVar5" (subscript_expression "param_1[7]" identifier [ number_literal ]) = identifier) ;) (expression_statement "param_1[8] = iVar5;" (assignment_expression "param_1[8] = iVar5" (subscript_expression "param_1[8]" identifier [ number_literal ]) = identifier) ;) }))) })) })) (return_statement "return iVar4;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < (cast_expression ( (type_descriptor TYPE) ) (subscript_expression IDENT [ LIT ]))) )) (compound_statement { (return_statement return LIT ;) })) (expression_statement (assignment_expression IDENT = (binary_expression (subscript_expression IDENT [ LIT ]) << LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT <= IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( (subscript_expression IDENT [ LIT ]) , (binary_expression (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) + LIT) )) * LIT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (return_statement return LIT ;) })) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) })) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) != (char_literal ' escape_sequence ')) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression LIT < (subscript_expression IDENT [ LIT ])) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (return_statement return IDENT ;) })) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (return_statement return LIT ;) })) (if_statement if (parenthesized_expression ( (binary_expression LIT < (subscript_expression IDENT [ LIT ])) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (return_statement return LIT ;) })) (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) (if_statement if (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) <= (subscript_expression IDENT [ LIT ])) )) (compound_statement { (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT < IDENT) )) (compound_statement { (while_statement while (parenthesized_expression ( BOOL )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression (pointer_expression * IDENT) + IDENT)) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) + IDENT) )))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + (binary_expression (parenthesized_expression ( IDENT )) * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + (subscript_expression IDENT [ LIT ])) ))))) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == IDENT) )) (break_statement break ;)) (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) })) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) }))) })) })) (return_statement return IDENT ;) })))
(function_definition "int FUN_0004d6c8(int *param_1,int param_2)\n\n{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  int iVar4;\n  int iVar5;\n  undefined1 *puVar6;\n  \n  if (0x1ffffffe < (uint)param_1[9]) {\n    return 0xc;\n  }\n  iVar4 = param_1[9] << 1;\n  if (param_1[0xc] < iVar4) {\n    iVar4 = param_1[0xc];\n  }\n  if (param_2 <= iVar4) {\n    param_2 = iVar4;\n  }\n  iVar4 = FUN_0004c4d8(param_1,param_2);\n  if (iVar4 == 0) {\n    if (param_1[0x19] != 0) {\n      iVar1 = (*(code *)PTR_realloc_00078038)(param_1[0x19],(param_1[9] + 1) * 4);\n      if (iVar1 == 0) {\n        return 0xc;\n      }\n      param_1[0x19] = iVar1;\n    }\n    if (*(char *)(param_1 + 0x12) != '\0') {\n      if (1 < param_1[0x14]) {\n        iVar4 = FUN_0004cf50();\n        return iVar4;\n      }\n      FUN_0004cbe4(param_1);\n      return 0;\n    }\n    if (1 < param_1[0x14]) {\n      FUN_0004ccc8(param_1);\n      return 0;\n    }\n    iVar1 = param_1[0x10];\n    if (iVar1 != 0) {\n      iVar5 = param_1[7];\n      iVar2 = param_1[0xc];\n      if (param_1[9] <= param_1[0xc]) {\n        iVar2 = param_1[9];\n      }\n      if (iVar5 < iVar2) {\n        while( true ) {\n          iVar3 = *param_1 + iVar5;\n          puVar6 = (undefined1 *)(param_1[1] + iVar5);\n          iVar5 = iVar5 + 1;\n          *puVar6 = *(undefined1 *)(iVar1 + (uint)*(byte *)(iVar3 + param_1[6]));\n          if (iVar2 == iVar5) break;\n          iVar1 = param_1[0x10];\n        }\n        param_1[7] = iVar2;\n        param_1[8] = iVar2;\n      }\n      else {\n        param_1[7] = iVar5;\n        param_1[8] = iVar5;\n      }\n    }\n  }\n  return iVar4;\n}" (primitive_type "int") (function_declarator "FUN_0004d6c8(int *param_1,int param_2)" (identifier "FUN_0004d6c8") (parameter_list "(int *param_1,int param_2)" (( "(") (parameter_declaration "int *param_1" (primitive_type "int") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) () ")"))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  int iVar4;\n  int iVar5;\n  undefined1 *puVar6;\n  \n  if (0x1ffffffe < (uint)param_1[9]) {\n    return 0xc;\n  }\n  iVar4 = param_1[9] << 1;\n  if (param_1[0xc] < iVar4) {\n    iVar4 = param_1[0xc];\n  }\n  if (param_2 <= iVar4) {\n    param_2 = iVar4;\n  }\n  iVar4 = FUN_0004c4d8(param_1,param_2);\n  if (iVar4 == 0) {\n    if (param_1[0x19] != 0) {\n      iVar1 = (*(code *)PTR_realloc_00078038)(param_1[0x19],(param_1[9] + 1) * 4);\n      if (iVar1 == 0) {\n        return 0xc;\n      }\n      param_1[0x19] = iVar1;\n    }\n    if (*(char *)(param_1 + 0x12) != '\0') {\n      if (1 < param_1[0x14]) {\n        iVar4 = FUN_0004cf50();\n        return iVar4;\n      }\n      FUN_0004cbe4(param_1);\n      return 0;\n    }\n    if (1 < param_1[0x14]) {\n      FUN_0004ccc8(param_1);\n      return 0;\n    }\n    iVar1 = param_1[0x10];\n    if (iVar1 != 0) {\n      iVar5 = param_1[7];\n      iVar2 = param_1[0xc];\n      if (param_1[9] <= param_1[0xc]) {\n        iVar2 = param_1[9];\n      }\n      if (iVar5 < iVar2) {\n        while( true ) {\n          iVar3 = *param_1 + iVar5;\n          puVar6 = (undefined1 *)(param_1[1] + iVar5);\n          iVar5 = iVar5 + 1;\n          *puVar6 = *(undefined1 *)(iVar1 + (uint)*(byte *)(iVar3 + param_1[6]));\n          if (iVar2 == iVar5) break;\n          iVar1 = param_1[0x10];\n        }\n        param_1[7] = iVar2;\n        param_1[8] = iVar2;\n      }\n      else {\n        param_1[7] = iVar5;\n        param_1[8] = iVar5;\n      }\n    }\n  }\n  return iVar4;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (declaration "int iVar4;" (primitive_type "int") (identifier "iVar4") (; ";")) (declaration "int iVar5;" (primitive_type "int") (identifier "iVar5") (; ";")) (declaration "undefined1 *puVar6;" (type_identifier "undefined1") (pointer_declarator "*puVar6" (* "*") (identifier "puVar6")) (; ";")) (if_statement "if (0x1ffffffe < (uint)param_1[9]) {\n    return 0xc;\n  }" (if "if") (parenthesized_expression "(0x1ffffffe < (uint)param_1[9])" (( "(") (binary_expression "0x1ffffffe < (uint)param_1[9]" (number_literal "0x1ffffffe") (< "<") (cast_expression "(uint)param_1[9]" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (subscript_expression "param_1[9]" (identifier "param_1") ([ "[") (number_literal "9") (] "]")))) () ")")) (compound_statement "{\n    return 0xc;\n  }" ({ "{") (return_statement "return 0xc;" (return "return") (number_literal "0xc") (; ";")) (} "}"))) (expression_statement "iVar4 = param_1[9] << 1;" (assignment_expression "iVar4 = param_1[9] << 1" (identifier "iVar4") (= "=") (binary_expression "param_1[9] << 1" (subscript_expression "param_1[9]" (identifier "param_1") ([ "[") (number_literal "9") (] "]")) (<< "<<") (number_literal "1"))) (; ";")) (if_statement "if (param_1[0xc] < iVar4) {\n    iVar4 = param_1[0xc];\n  }" (if "if") (parenthesized_expression "(param_1[0xc] < iVar4)" (( "(") (binary_expression "param_1[0xc] < iVar4" (subscript_expression "param_1[0xc]" (identifier "param_1") ([ "[") (number_literal "0xc") (] "]")) (< "<") (identifier "iVar4")) () ")")) (compound_statement "{\n    iVar4 = param_1[0xc];\n  }" ({ "{") (expression_statement "iVar4 = param_1[0xc];" (assignment_expression "iVar4 = param_1[0xc]" (identifier "iVar4") (= "=") (subscript_expression "param_1[0xc]" (identifier "param_1") ([ "[") (number_literal "0xc") (] "]"))) (; ";")) (} "}"))) (if_statement "if (param_2 <= iVar4) {\n    param_2 = iVar4;\n  }" (if "if") (parenthesized_expression "(param_2 <= iVar4)" (( "(") (binary_expression "param_2 <= iVar4" (identifier "param_2") (<= "<=") (identifier "iVar4")) () ")")) (compound_statement "{\n    param_2 = iVar4;\n  }" ({ "{") (expression_statement "param_2 = iVar4;" (assignment_expression "param_2 = iVar4" (identifier "param_2") (= "=") (identifier "iVar4")) (; ";")) (} "}"))) (expression_statement "iVar4 = FUN_0004c4d8(param_1,param_2);" (assignment_expression "iVar4 = FUN_0004c4d8(param_1,param_2)" (identifier "iVar4") (= "=") (call_expression "FUN_0004c4d8(param_1,param_2)" (identifier "FUN_0004c4d8") (argument_list "(param_1,param_2)" (( "(") (identifier "param_1") (, ",") (identifier "param_2") () ")")))) (; ";")) (if_statement "if (iVar4 == 0) {\n    if (param_1[0x19] != 0) {\n      iVar1 = (*(code *)PTR_realloc_00078038)(param_1[0x19],(param_1[9] + 1) * 4);\n      if (iVar1 == 0) {\n        return 0xc;\n      }\n      param_1[0x19] = iVar1;\n    }\n    if (*(char *)(param_1 + 0x12) != '\0') {\n      if (1 < param_1[0x14]) {\n        iVar4 = FUN_0004cf50();\n        return iVar4;\n      }\n      FUN_0004cbe4(param_1);\n      return 0;\n    }\n    if (1 < param_1[0x14]) {\n      FUN_0004ccc8(param_1);\n      return 0;\n    }\n    iVar1 = param_1[0x10];\n    if (iVar1 != 0) {\n      iVar5 = param_1[7];\n      iVar2 = param_1[0xc];\n      if (param_1[9] <= param_1[0xc]) {\n        iVar2 = param_1[9];\n      }\n      if (iVar5 < iVar2) {\n        while( true ) {\n          iVar3 = *param_1 + iVar5;\n          puVar6 = (undefined1 *)(param_1[1] + iVar5);\n          iVar5 = iVar5 + 1;\n          *puVar6 = *(undefined1 *)(iVar1 + (uint)*(byte *)(iVar3 + param_1[6]));\n          if (iVar2 == iVar5) break;\n          iVar1 = param_1[0x10];\n        }\n        param_1[7] = iVar2;\n        param_1[8] = iVar2;\n      }\n      else {\n        param_1[7] = iVar5;\n        param_1[8] = iVar5;\n      }\n    }\n  }" (if "if") (parenthesized_expression "(iVar4 == 0)" (( "(") (binary_expression "iVar4 == 0" (identifier "iVar4") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    if (param_1[0x19] != 0) {\n      iVar1 = (*(code *)PTR_realloc_00078038)(param_1[0x19],(param_1[9] + 1) * 4);\n      if (iVar1 == 0) {\n        return 0xc;\n      }\n      param_1[0x19] = iVar1;\n    }\n    if (*(char *)(param_1 + 0x12) != '\0') {\n      if (1 < param_1[0x14]) {\n        iVar4 = FUN_0004cf50();\n        return iVar4;\n      }\n      FUN_0004cbe4(param_1);\n      return 0;\n    }\n    if (1 < param_1[0x14]) {\n      FUN_0004ccc8(param_1);\n      return 0;\n    }\n    iVar1 = param_1[0x10];\n    if (iVar1 != 0) {\n      iVar5 = param_1[7];\n      iVar2 = param_1[0xc];\n      if (param_1[9] <= param_1[0xc]) {\n        iVar2 = param_1[9];\n      }\n      if (iVar5 < iVar2) {\n        while( true ) {\n          iVar3 = *param_1 + iVar5;\n          puVar6 = (undefined1 *)(param_1[1] + iVar5);\n          iVar5 = iVar5 + 1;\n          *puVar6 = *(undefined1 *)(iVar1 + (uint)*(byte *)(iVar3 + param_1[6]));\n          if (iVar2 == iVar5) break;\n          iVar1 = param_1[0x10];\n        }\n        param_1[7] = iVar2;\n        param_1[8] = iVar2;\n      }\n      else {\n        param_1[7] = iVar5;\n        param_1[8] = iVar5;\n      }\n    }\n  }" ({ "{") (if_statement "if (param_1[0x19] != 0) {\n      iVar1 = (*(code *)PTR_realloc_00078038)(param_1[0x19],(param_1[9] + 1) * 4);\n      if (iVar1 == 0) {\n        return 0xc;\n      }\n      param_1[0x19] = iVar1;\n    }" (if "if") (parenthesized_expression "(param_1[0x19] != 0)" (( "(") (binary_expression "param_1[0x19] != 0" (subscript_expression "param_1[0x19]" (identifier "param_1") ([ "[") (number_literal "0x19") (] "]")) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      iVar1 = (*(code *)PTR_realloc_00078038)(param_1[0x19],(param_1[9] + 1) * 4);\n      if (iVar1 == 0) {\n        return 0xc;\n      }\n      param_1[0x19] = iVar1;\n    }" ({ "{") (expression_statement "iVar1 = (*(code *)PTR_realloc_00078038)(param_1[0x19],(param_1[9] + 1) * 4);" (assignment_expression "iVar1 = (*(code *)PTR_realloc_00078038)(param_1[0x19],(param_1[9] + 1) * 4)" (identifier "iVar1") (= "=") (call_expression "(*(code *)PTR_realloc_00078038)(param_1[0x19],(param_1[9] + 1) * 4)" (parenthesized_expression "(*(code *)PTR_realloc_00078038)" (( "(") (pointer_expression "*(code *)PTR_realloc_00078038" (* "*") (cast_expression "(code *)PTR_realloc_00078038" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_realloc_00078038"))) () ")")) (argument_list "(param_1[0x19],(param_1[9] + 1) * 4)" (( "(") (subscript_expression "param_1[0x19]" (identifier "param_1") ([ "[") (number_literal "0x19") (] "]")) (, ",") (binary_expression "(param_1[9] + 1) * 4" (parenthesized_expression "(param_1[9] + 1)" (( "(") (binary_expression "param_1[9] + 1" (subscript_expression "param_1[9]" (identifier "param_1") ([ "[") (number_literal "9") (] "]")) (+ "+") (number_literal "1")) () ")")) (* "*") (number_literal "4")) () ")")))) (; ";")) (if_statement "if (iVar1 == 0) {\n        return 0xc;\n      }" (if "if") (parenthesized_expression "(iVar1 == 0)" (( "(") (binary_expression "iVar1 == 0" (identifier "iVar1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n        return 0xc;\n      }" ({ "{") (return_statement "return 0xc;" (return "return") (number_literal "0xc") (; ";")) (} "}"))) (expression_statement "param_1[0x19] = iVar1;" (assignment_expression "param_1[0x19] = iVar1" (subscript_expression "param_1[0x19]" (identifier "param_1") ([ "[") (number_literal "0x19") (] "]")) (= "=") (identifier "iVar1")) (; ";")) (} "}"))) (if_statement "if (*(char *)(param_1 + 0x12) != '\0') {\n      if (1 < param_1[0x14]) {\n        iVar4 = FUN_0004cf50();\n        return iVar4;\n      }\n      FUN_0004cbe4(param_1);\n      return 0;\n    }" (if "if") (parenthesized_expression "(*(char *)(param_1 + 0x12) != '\0')" (( "(") (binary_expression "*(char *)(param_1 + 0x12) != '\0'" (pointer_expression "*(char *)(param_1 + 0x12)" (* "*") (cast_expression "(char *)(param_1 + 0x12)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x12)" (( "(") (binary_expression "param_1 + 0x12" (identifier "param_1") (+ "+") (number_literal "0x12")) () ")")))) (!= "!=") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (compound_statement "{\n      if (1 < param_1[0x14]) {\n        iVar4 = FUN_0004cf50();\n        return iVar4;\n      }\n      FUN_0004cbe4(param_1);\n      return 0;\n    }" ({ "{") (if_statement "if (1 < param_1[0x14]) {\n        iVar4 = FUN_0004cf50();\n        return iVar4;\n      }" (if "if") (parenthesized_expression "(1 < param_1[0x14])" (( "(") (binary_expression "1 < param_1[0x14]" (number_literal "1") (< "<") (subscript_expression "param_1[0x14]" (identifier "param_1") ([ "[") (number_literal "0x14") (] "]"))) () ")")) (compound_statement "{\n        iVar4 = FUN_0004cf50();\n        return iVar4;\n      }" ({ "{") (expression_statement "iVar4 = FUN_0004cf50();" (assignment_expression "iVar4 = FUN_0004cf50()" (identifier "iVar4") (= "=") (call_expression "FUN_0004cf50()" (identifier "FUN_0004cf50") (argument_list "()" (( "(") () ")")))) (; ";")) (return_statement "return iVar4;" (return "return") (identifier "iVar4") (; ";")) (} "}"))) (expression_statement "FUN_0004cbe4(param_1);" (call_expression "FUN_0004cbe4(param_1)" (identifier "FUN_0004cbe4") (argument_list "(param_1)" (( "(") (identifier "param_1") () ")"))) (; ";")) (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (if_statement "if (1 < param_1[0x14]) {\n      FUN_0004ccc8(param_1);\n      return 0;\n    }" (if "if") (parenthesized_expression "(1 < param_1[0x14])" (( "(") (binary_expression "1 < param_1[0x14]" (number_literal "1") (< "<") (subscript_expression "param_1[0x14]" (identifier "param_1") ([ "[") (number_literal "0x14") (] "]"))) () ")")) (compound_statement "{\n      FUN_0004ccc8(param_1);\n      return 0;\n    }" ({ "{") (expression_statement "FUN_0004ccc8(param_1);" (call_expression "FUN_0004ccc8(param_1)" (identifier "FUN_0004ccc8") (argument_list "(param_1)" (( "(") (identifier "param_1") () ")"))) (; ";")) (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (expression_statement "iVar1 = param_1[0x10];" (assignment_expression "iVar1 = param_1[0x10]" (identifier "iVar1") (= "=") (subscript_expression "param_1[0x10]" (identifier "param_1") ([ "[") (number_literal "0x10") (] "]"))) (; ";")) (if_statement "if (iVar1 != 0) {\n      iVar5 = param_1[7];\n      iVar2 = param_1[0xc];\n      if (param_1[9] <= param_1[0xc]) {\n        iVar2 = param_1[9];\n      }\n      if (iVar5 < iVar2) {\n        while( true ) {\n          iVar3 = *param_1 + iVar5;\n          puVar6 = (undefined1 *)(param_1[1] + iVar5);\n          iVar5 = iVar5 + 1;\n          *puVar6 = *(undefined1 *)(iVar1 + (uint)*(byte *)(iVar3 + param_1[6]));\n          if (iVar2 == iVar5) break;\n          iVar1 = param_1[0x10];\n        }\n        param_1[7] = iVar2;\n        param_1[8] = iVar2;\n      }\n      else {\n        param_1[7] = iVar5;\n        param_1[8] = iVar5;\n      }\n    }" (if "if") (parenthesized_expression "(iVar1 != 0)" (( "(") (binary_expression "iVar1 != 0" (identifier "iVar1") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      iVar5 = param_1[7];\n      iVar2 = param_1[0xc];\n      if (param_1[9] <= param_1[0xc]) {\n        iVar2 = param_1[9];\n      }\n      if (iVar5 < iVar2) {\n        while( true ) {\n          iVar3 = *param_1 + iVar5;\n          puVar6 = (undefined1 *)(param_1[1] + iVar5);\n          iVar5 = iVar5 + 1;\n          *puVar6 = *(undefined1 *)(iVar1 + (uint)*(byte *)(iVar3 + param_1[6]));\n          if (iVar2 == iVar5) break;\n          iVar1 = param_1[0x10];\n        }\n        param_1[7] = iVar2;\n        param_1[8] = iVar2;\n      }\n      else {\n        param_1[7] = iVar5;\n        param_1[8] = iVar5;\n      }\n    }" ({ "{") (expression_statement "iVar5 = param_1[7];" (assignment_expression "iVar5 = param_1[7]" (identifier "iVar5") (= "=") (subscript_expression "param_1[7]" (identifier "param_1") ([ "[") (number_literal "7") (] "]"))) (; ";")) (expression_statement "iVar2 = param_1[0xc];" (assignment_expression "iVar2 = param_1[0xc]" (identifier "iVar2") (= "=") (subscript_expression "param_1[0xc]" (identifier "param_1") ([ "[") (number_literal "0xc") (] "]"))) (; ";")) (if_statement "if (param_1[9] <= param_1[0xc]) {\n        iVar2 = param_1[9];\n      }" (if "if") (parenthesized_expression "(param_1[9] <= param_1[0xc])" (( "(") (binary_expression "param_1[9] <= param_1[0xc]" (subscript_expression "param_1[9]" (identifier "param_1") ([ "[") (number_literal "9") (] "]")) (<= "<=") (subscript_expression "param_1[0xc]" (identifier "param_1") ([ "[") (number_literal "0xc") (] "]"))) () ")")) (compound_statement "{\n        iVar2 = param_1[9];\n      }" ({ "{") (expression_statement "iVar2 = param_1[9];" (assignment_expression "iVar2 = param_1[9]" (identifier "iVar2") (= "=") (subscript_expression "param_1[9]" (identifier "param_1") ([ "[") (number_literal "9") (] "]"))) (; ";")) (} "}"))) (if_statement "if (iVar5 < iVar2) {\n        while( true ) {\n          iVar3 = *param_1 + iVar5;\n          puVar6 = (undefined1 *)(param_1[1] + iVar5);\n          iVar5 = iVar5 + 1;\n          *puVar6 = *(undefined1 *)(iVar1 + (uint)*(byte *)(iVar3 + param_1[6]));\n          if (iVar2 == iVar5) break;\n          iVar1 = param_1[0x10];\n        }\n        param_1[7] = iVar2;\n        param_1[8] = iVar2;\n      }\n      else {\n        param_1[7] = iVar5;\n        param_1[8] = iVar5;\n      }" (if "if") (parenthesized_expression "(iVar5 < iVar2)" (( "(") (binary_expression "iVar5 < iVar2" (identifier "iVar5") (< "<") (identifier "iVar2")) () ")")) (compound_statement "{\n        while( true ) {\n          iVar3 = *param_1 + iVar5;\n          puVar6 = (undefined1 *)(param_1[1] + iVar5);\n          iVar5 = iVar5 + 1;\n          *puVar6 = *(undefined1 *)(iVar1 + (uint)*(byte *)(iVar3 + param_1[6]));\n          if (iVar2 == iVar5) break;\n          iVar1 = param_1[0x10];\n        }\n        param_1[7] = iVar2;\n        param_1[8] = iVar2;\n      }" ({ "{") (while_statement "while( true ) {\n          iVar3 = *param_1 + iVar5;\n          puVar6 = (undefined1 *)(param_1[1] + iVar5);\n          iVar5 = iVar5 + 1;\n          *puVar6 = *(undefined1 *)(iVar1 + (uint)*(byte *)(iVar3 + param_1[6]));\n          if (iVar2 == iVar5) break;\n          iVar1 = param_1[0x10];\n        }" (while "while") (parenthesized_expression "( true )" (( "(") (true "true") () ")")) (compound_statement "{\n          iVar3 = *param_1 + iVar5;\n          puVar6 = (undefined1 *)(param_1[1] + iVar5);\n          iVar5 = iVar5 + 1;\n          *puVar6 = *(undefined1 *)(iVar1 + (uint)*(byte *)(iVar3 + param_1[6]));\n          if (iVar2 == iVar5) break;\n          iVar1 = param_1[0x10];\n        }" ({ "{") (expression_statement "iVar3 = *param_1 + iVar5;" (assignment_expression "iVar3 = *param_1 + iVar5" (identifier "iVar3") (= "=") (binary_expression "*param_1 + iVar5" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (+ "+") (identifier "iVar5"))) (; ";")) (expression_statement "puVar6 = (undefined1 *)(param_1[1] + iVar5);" (assignment_expression "puVar6 = (undefined1 *)(param_1[1] + iVar5)" (identifier "puVar6") (= "=") (cast_expression "(undefined1 *)(param_1[1] + iVar5)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1[1] + iVar5)" (( "(") (binary_expression "param_1[1] + iVar5" (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]")) (+ "+") (identifier "iVar5")) () ")")))) (; ";")) (expression_statement "iVar5 = iVar5 + 1;" (assignment_expression "iVar5 = iVar5 + 1" (identifier "iVar5") (= "=") (binary_expression "iVar5 + 1" (identifier "iVar5") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "*puVar6 = *(undefined1 *)(iVar1 + (uint)*(byte *)(iVar3 + param_1[6]));" (assignment_expression "*puVar6 = *(undefined1 *)(iVar1 + (uint)*(byte *)(iVar3 + param_1[6]))" (pointer_expression "*puVar6" (* "*") (identifier "puVar6")) (= "=") (pointer_expression "*(undefined1 *)(iVar1 + (uint)*(byte *)(iVar3 + param_1[6]))" (* "*") (cast_expression "(undefined1 *)(iVar1 + (uint)*(byte *)(iVar3 + param_1[6]))" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + (uint)*(byte *)(iVar3 + param_1[6]))" (( "(") (binary_expression "iVar1 + (uint)*(byte *)(iVar3 + param_1[6])" (identifier "iVar1") (+ "+") (binary_expression "(uint)*(byte *)(iVar3 + param_1[6])" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (* "*") (cast_expression "(byte *)(iVar3 + param_1[6])" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar3 + param_1[6])" (( "(") (binary_expression "iVar3 + param_1[6]" (identifier "iVar3") (+ "+") (subscript_expression "param_1[6]" (identifier "param_1") ([ "[") (number_literal "6") (] "]"))) () ")"))))) () ")"))))) (; ";")) (if_statement "if (iVar2 == iVar5) break;" (if "if") (parenthesized_expression "(iVar2 == iVar5)" (( "(") (binary_expression "iVar2 == iVar5" (identifier "iVar2") (== "==") (identifier "iVar5")) () ")")) (break_statement "break;" (break "break") (; ";"))) (expression_statement "iVar1 = param_1[0x10];" (assignment_expression "iVar1 = param_1[0x10]" (identifier "iVar1") (= "=") (subscript_expression "param_1[0x10]" (identifier "param_1") ([ "[") (number_literal "0x10") (] "]"))) (; ";")) (} "}"))) (expression_statement "param_1[7] = iVar2;" (assignment_expression "param_1[7] = iVar2" (subscript_expression "param_1[7]" (identifier "param_1") ([ "[") (number_literal "7") (] "]")) (= "=") (identifier "iVar2")) (; ";")) (expression_statement "param_1[8] = iVar2;" (assignment_expression "param_1[8] = iVar2" (subscript_expression "param_1[8]" (identifier "param_1") ([ "[") (number_literal "8") (] "]")) (= "=") (identifier "iVar2")) (; ";")) (} "}")) (else_clause "else {\n        param_1[7] = iVar5;\n        param_1[8] = iVar5;\n      }" (else "else") (compound_statement "{\n        param_1[7] = iVar5;\n        param_1[8] = iVar5;\n      }" ({ "{") (expression_statement "param_1[7] = iVar5;" (assignment_expression "param_1[7] = iVar5" (subscript_expression "param_1[7]" (identifier "param_1") ([ "[") (number_literal "7") (] "]")) (= "=") (identifier "iVar5")) (; ";")) (expression_statement "param_1[8] = iVar5;" (assignment_expression "param_1[8] = iVar5" (subscript_expression "param_1[8]" (identifier "param_1") ([ "[") (number_literal "8") (] "]")) (= "=") (identifier "iVar5")) (; ";")) (} "}")))) (} "}"))) (} "}"))) (return_statement "return iVar4;" (return "return") (identifier "iVar4") (; ";")) (} "}")))
(translation_unit (function_definition type: (primitive_type) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (parameter_declaration type: (primitive_type) declarator: (identifier)))) body: (compound_statement (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (number_literal) right: (cast_expression type: (type_descriptor type: (type_identifier)) value: (subscript_expression argument: (identifier) index: (number_literal))))) consequence: (compound_statement (return_statement (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (identifier))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (subscript_expression argument: (identifier) index: (number_literal)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list (subscript_expression argument: (identifier) index: (number_literal)) (binary_expression left: (parenthesized_expression (binary_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal))) right: (number_literal)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (return_statement (number_literal)))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (identifier))))) (if_statement condition: (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: (char_literal (escape_sequence)))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (number_literal) right: (subscript_expression argument: (identifier) index: (number_literal)))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list)))) (return_statement (identifier)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))) (return_statement (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (number_literal) right: (subscript_expression argument: (identifier) index: (number_literal)))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))) (return_statement (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (subscript_expression argument: (identifier) index: (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (subscript_expression argument: (identifier) index: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (subscript_expression argument: (identifier) index: (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (subscript_expression argument: (identifier) index: (number_literal)))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (subscript_expression argument: (identifier) index: (number_literal)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (compound_statement (while_statement condition: (parenthesized_expression (true)) body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (pointer_expression argument: (identifier)) right: (identifier)))) (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: (subscript_expression argument: (identifier) index: (number_literal)) right: (identifier)))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (binary_expression left: (parenthesized_expression (identifier)) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (subscript_expression argument: (identifier) index: (number_literal)))))))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (break_statement)) (expression_statement (assignment_expression left: (identifier) right: (subscript_expression argument: (identifier) index: (number_literal)))))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (identifier))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (identifier)))) alternative: (else_clause (compound_statement (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 (identifier)))))

int MASKED(int *param_1,int param_2)

{
  int iVar1;
  int iVar2;
  int iVar3;
  int iVar4;
  int iVar5;
  undefined1 *puVar6;
  
  if (0x1ffffffe < (uint)param_1[9]) {
    return 0xc;
  }
  iVar4 = param_1[9] << 1;
  if (param_1[0xc] < iVar4) {
    iVar4 = param_1[0xc];
  }
  if (param_2 <= iVar4) {
    param_2 = iVar4;
  }
  iVar4 = FUN_0004c4d8(param_1,param_2);
  if (iVar4 == 0) {
    if (param_1[0x19] != 0) {
      iVar1 = (*(code *)PTR_realloc_00078038)(param_1[0x19],(param_1[9] + 1) * 4);
      if (iVar1 == 0) {
        return 0xc;
      }
      param_1[0x19] = iVar1;
    }
    if (*(char *)(param_1 + 0x12) != '\0') {
      if (1 < param_1[0x14]) {
        iVar4 = FUN_0004cf50();
        return iVar4;
      }
      FUN_0004cbe4(param_1);
      return 0;
    }
    if (1 < param_1[0x14]) {
      FUN_0004ccc8(param_1);
      return 0;
    }
    iVar1 = param_1[0x10];
    if (iVar1 != 0) {
      iVar5 = param_1[7];
      iVar2 = param_1[0xc];
      if (param_1[9] <= param_1[0xc]) {
        iVar2 = param_1[9];
      }
      if (iVar5 < iVar2) {
        while( true ) {
          iVar3 = *param_1 + iVar5;
          puVar6 = (undefined1 *)(param_1[1] + iVar5);
          iVar5 = iVar5 + 1;
          *puVar6 = *(undefined1 *)(iVar1 + (uint)*(byte *)(iVar3 + param_1[6]));
          if (iVar2 == iVar5) break;
          iVar1 = param_1[0x10];
        }
        param_1[7] = iVar2;
        param_1[8] = iVar2;
      }
      else {
        param_1[7] = iVar5;
        param_1[8] = iVar5;
      }
    }
  }
  return iVar4;
}

