
reg_errcode_t re_string_realloc_buffers(re_string_t *pstr,Idx new_buf_len)

{
  wint_t *pwVar1;
  Idx *pIVar2;
  uchar *puVar3;
  
  if (1 < pstr->mb_cur_max) {
    if (0x3fffffff < (uint)new_buf_len) {
      return _REG_ESPACE;
    }
    pwVar1 = (wint_t *)(*(code *)PTR_realloc_00053478)(pstr->wcs,new_buf_len << 2);
    if (pwVar1 == (wint_t *)0x0) {
      return _REG_ESPACE;
    }
    pstr->wcs = pwVar1;
    if (pstr->offsets != (Idx *)0x0) {
      pIVar2 = (Idx *)(*(code *)PTR_realloc_00053478)(pstr->offsets,new_buf_len << 2);
      if (pIVar2 == (Idx *)0x0) {
        return _REG_ESPACE;
      }
      pstr->offsets = pIVar2;
    }
  }
  if (pstr->mbs_allocated != '\0') {
    puVar3 = (uchar *)(*(code *)PTR_realloc_00053478)(pstr->mbs,new_buf_len);
    if (puVar3 == (uchar *)0x0) {
      return _REG_ESPACE;
    }
    pstr->mbs = puVar3;
  }
  pstr->bufs_len = new_buf_len;
  return _REG_NOERROR;
}



undefined4 FUN_00029938(int param_1,uint param_2)

{
  int iVar1;
  
  if (1 < *(int *)(param_1 + 0x50)) {
    if (0x3fffffff < param_2) {
      return 0xc;
    }
    iVar1 = (*(code *)PTR_realloc_00053478)(*(undefined4 *)(param_1 + 8),param_2 << 2);
    if (iVar1 == 0) {
      return 0xc;
    }
    *(int *)(param_1 + 8) = iVar1;
    if (*(int *)(param_1 + 0xc) != 0) {
      iVar1 = (*(code *)PTR_realloc_00053478)(*(int *)(param_1 + 0xc),param_2 << 2);
      if (iVar1 == 0) {
        return 0xc;
      }
      *(int *)(param_1 + 0xc) = iVar1;
    }
  }
  if (*(char *)(param_1 + 0x4b) != '\0') {
    iVar1 = (*(code *)PTR_realloc_00053478)(*(undefined4 *)(param_1 + 4),param_2);
    if (iVar1 == 0) {
      return 0xc;
    }
    *(int *)(param_1 + 4) = iVar1;
  }
  *(uint *)(param_1 + 0x24) = param_2;
  return 0;
}


lui gp,0x3
addiu gp,gp,0x17a8
addu gp,gp,t9
addiu sp,sp,-0x28
lw v0,0x50(a0)
slti v0,v0,0x2
sw gp,0x10(sp)
sw s1,0x1c(sp)
or s1,a1,zero
sw s0,0x18(sp)
or s0,a0,zero
sw ra,0x24(sp)
bne v0,zero,0x000299bc
_sw s2,0x20(sp)
lui v0,0x4000
sltu v0,a1,v0
beq v0,zero,0x00029a04
_lw t9,-0x7c68(gp)
sll s2,a1,0x2
lw a0,0x8(a0)
jalr t9
_or a1,s2,zero
beq v0,zero,0x00029a04
_lw gp,0x10(sp)
lw a0,0xc(s0)
beq a0,zero,0x000299bc
_sw v0,0x8(s0)
lw t9,-0x7c68(gp)
jalr t9
_or a1,s2,zero
beq v0,zero,0x00029a04
_lw gp,0x10(sp)
sw v0,0xc(s0)
lbu v0,0x4b(s0)
bne v0,zero,0x000299e8
_lw t9,-0x7c68(gp)
lw ra,0x24(sp)
or v0,zero,zero
lw s2,0x20(sp)
sw s1,0x24(s0)
lw s1,0x1c(sp)
lw s0,0x18(sp)
jr ra
_addiu sp,sp,0x28
or a1,s1,zero
jalr t9
_lw a0,0x4(s0)
beq v0,zero,0x00029a08
_lw ra,0x24(sp)
b 0x000299c8
_sw v0,0x4(s0)
lw ra,0x24(sp)
li v0,0xc
lw s2,0x20(sp)
lw s1,0x1c(sp)
lw s0,0x18(sp)
jr ra
_addiu sp,sp,0x28
(translation_unit "undefined4 FUN_00029938(int param_1,uint param_2)\n\n{\n  int iVar1;\n  \n  if (1 < *(int *)(param_1 + 0x50)) {\n    if (0x3fffffff < param_2) {\n      return 0xc;\n    }\n    iVar1 = (*(code *)PTR_realloc_00053478)(*(undefined4 *)(param_1 + 8),param_2 << 2);\n    if (iVar1 == 0) {\n      return 0xc;\n    }\n    *(int *)(param_1 + 8) = iVar1;\n    if (*(int *)(param_1 + 0xc) != 0) {\n      iVar1 = (*(code *)PTR_realloc_00053478)(*(int *)(param_1 + 0xc),param_2 << 2);\n      if (iVar1 == 0) {\n        return 0xc;\n      }\n      *(int *)(param_1 + 0xc) = iVar1;\n    }\n  }\n  if (*(char *)(param_1 + 0x4b) != '\0') {\n    iVar1 = (*(code *)PTR_realloc_00053478)(*(undefined4 *)(param_1 + 4),param_2);\n    if (iVar1 == 0) {\n      return 0xc;\n    }\n    *(int *)(param_1 + 4) = iVar1;\n  }\n  *(uint *)(param_1 + 0x24) = param_2;\n  return 0;\n}\n\n" (function_definition "undefined4 FUN_00029938(int param_1,uint param_2)\n\n{\n  int iVar1;\n  \n  if (1 < *(int *)(param_1 + 0x50)) {\n    if (0x3fffffff < param_2) {\n      return 0xc;\n    }\n    iVar1 = (*(code *)PTR_realloc_00053478)(*(undefined4 *)(param_1 + 8),param_2 << 2);\n    if (iVar1 == 0) {\n      return 0xc;\n    }\n    *(int *)(param_1 + 8) = iVar1;\n    if (*(int *)(param_1 + 0xc) != 0) {\n      iVar1 = (*(code *)PTR_realloc_00053478)(*(int *)(param_1 + 0xc),param_2 << 2);\n      if (iVar1 == 0) {\n        return 0xc;\n      }\n      *(int *)(param_1 + 0xc) = iVar1;\n    }\n  }\n  if (*(char *)(param_1 + 0x4b) != '\0') {\n    iVar1 = (*(code *)PTR_realloc_00053478)(*(undefined4 *)(param_1 + 4),param_2);\n    if (iVar1 == 0) {\n      return 0xc;\n    }\n    *(int *)(param_1 + 4) = iVar1;\n  }\n  *(uint *)(param_1 + 0x24) = param_2;\n  return 0;\n}" type_identifier (function_declarator "FUN_00029938(int param_1,uint param_2)" identifier (parameter_list "(int param_1,uint param_2)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "uint param_2" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  \n  if (1 < *(int *)(param_1 + 0x50)) {\n    if (0x3fffffff < param_2) {\n      return 0xc;\n    }\n    iVar1 = (*(code *)PTR_realloc_00053478)(*(undefined4 *)(param_1 + 8),param_2 << 2);\n    if (iVar1 == 0) {\n      return 0xc;\n    }\n    *(int *)(param_1 + 8) = iVar1;\n    if (*(int *)(param_1 + 0xc) != 0) {\n      iVar1 = (*(code *)PTR_realloc_00053478)(*(int *)(param_1 + 0xc),param_2 << 2);\n      if (iVar1 == 0) {\n        return 0xc;\n      }\n      *(int *)(param_1 + 0xc) = iVar1;\n    }\n  }\n  if (*(char *)(param_1 + 0x4b) != '\0') {\n    iVar1 = (*(code *)PTR_realloc_00053478)(*(undefined4 *)(param_1 + 4),param_2);\n    if (iVar1 == 0) {\n      return 0xc;\n    }\n    *(int *)(param_1 + 4) = iVar1;\n  }\n  *(uint *)(param_1 + 0x24) = param_2;\n  return 0;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (if_statement "if (1 < *(int *)(param_1 + 0x50)) {\n    if (0x3fffffff < param_2) {\n      return 0xc;\n    }\n    iVar1 = (*(code *)PTR_realloc_00053478)(*(undefined4 *)(param_1 + 8),param_2 << 2);\n    if (iVar1 == 0) {\n      return 0xc;\n    }\n    *(int *)(param_1 + 8) = iVar1;\n    if (*(int *)(param_1 + 0xc) != 0) {\n      iVar1 = (*(code *)PTR_realloc_00053478)(*(int *)(param_1 + 0xc),param_2 << 2);\n      if (iVar1 == 0) {\n        return 0xc;\n      }\n      *(int *)(param_1 + 0xc) = iVar1;\n    }\n  }" if (parenthesized_expression "(1 < *(int *)(param_1 + 0x50))" ( (binary_expression "1 < *(int *)(param_1 + 0x50)" number_literal < (pointer_expression "*(int *)(param_1 + 0x50)" * (cast_expression "(int *)(param_1 + 0x50)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x50)" ( (binary_expression "param_1 + 0x50" identifier + number_literal) ))))) )) (compound_statement "{\n    if (0x3fffffff < param_2) {\n      return 0xc;\n    }\n    iVar1 = (*(code *)PTR_realloc_00053478)(*(undefined4 *)(param_1 + 8),param_2 << 2);\n    if (iVar1 == 0) {\n      return 0xc;\n    }\n    *(int *)(param_1 + 8) = iVar1;\n    if (*(int *)(param_1 + 0xc) != 0) {\n      iVar1 = (*(code *)PTR_realloc_00053478)(*(int *)(param_1 + 0xc),param_2 << 2);\n      if (iVar1 == 0) {\n        return 0xc;\n      }\n      *(int *)(param_1 + 0xc) = iVar1;\n    }\n  }" { (if_statement "if (0x3fffffff < param_2) {\n      return 0xc;\n    }" if (parenthesized_expression "(0x3fffffff < param_2)" ( (binary_expression "0x3fffffff < param_2" number_literal < identifier) )) (compound_statement "{\n      return 0xc;\n    }" { (return_statement "return 0xc;" return number_literal ;) })) (expression_statement "iVar1 = (*(code *)PTR_realloc_00053478)(*(undefined4 *)(param_1 + 8),param_2 << 2);" (assignment_expression "iVar1 = (*(code *)PTR_realloc_00053478)(*(undefined4 *)(param_1 + 8),param_2 << 2)" identifier = (call_expression "(*(code *)PTR_realloc_00053478)(*(undefined4 *)(param_1 + 8),param_2 << 2)" (parenthesized_expression "(*(code *)PTR_realloc_00053478)" ( (pointer_expression "*(code *)PTR_realloc_00053478" * (cast_expression "(code *)PTR_realloc_00053478" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(*(undefined4 *)(param_1 + 8),param_2 << 2)" ( (pointer_expression "*(undefined4 *)(param_1 + 8)" * (cast_expression "(undefined4 *)(param_1 + 8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 8)" ( (binary_expression "param_1 + 8" identifier + number_literal) )))) , (binary_expression "param_2 << 2" identifier << 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 "*(int *)(param_1 + 8) = iVar1;" (assignment_expression "*(int *)(param_1 + 8) = iVar1" (pointer_expression "*(int *)(param_1 + 8)" * (cast_expression "(int *)(param_1 + 8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 8)" ( (binary_expression "param_1 + 8" identifier + number_literal) )))) = identifier) ;) (if_statement "if (*(int *)(param_1 + 0xc) != 0) {\n      iVar1 = (*(code *)PTR_realloc_00053478)(*(int *)(param_1 + 0xc),param_2 << 2);\n      if (iVar1 == 0) {\n        return 0xc;\n      }\n      *(int *)(param_1 + 0xc) = iVar1;\n    }" if (parenthesized_expression "(*(int *)(param_1 + 0xc) != 0)" ( (binary_expression "*(int *)(param_1 + 0xc) != 0" (pointer_expression "*(int *)(param_1 + 0xc)" * (cast_expression "(int *)(param_1 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) )))) != number_literal) )) (compound_statement "{\n      iVar1 = (*(code *)PTR_realloc_00053478)(*(int *)(param_1 + 0xc),param_2 << 2);\n      if (iVar1 == 0) {\n        return 0xc;\n      }\n      *(int *)(param_1 + 0xc) = iVar1;\n    }" { (expression_statement "iVar1 = (*(code *)PTR_realloc_00053478)(*(int *)(param_1 + 0xc),param_2 << 2);" (assignment_expression "iVar1 = (*(code *)PTR_realloc_00053478)(*(int *)(param_1 + 0xc),param_2 << 2)" identifier = (call_expression "(*(code *)PTR_realloc_00053478)(*(int *)(param_1 + 0xc),param_2 << 2)" (parenthesized_expression "(*(code *)PTR_realloc_00053478)" ( (pointer_expression "*(code *)PTR_realloc_00053478" * (cast_expression "(code *)PTR_realloc_00053478" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(*(int *)(param_1 + 0xc),param_2 << 2)" ( (pointer_expression "*(int *)(param_1 + 0xc)" * (cast_expression "(int *)(param_1 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) )))) , (binary_expression "param_2 << 2" identifier << 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 "*(int *)(param_1 + 0xc) = iVar1;" (assignment_expression "*(int *)(param_1 + 0xc) = iVar1" (pointer_expression "*(int *)(param_1 + 0xc)" * (cast_expression "(int *)(param_1 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) )))) = identifier) ;) })) })) (if_statement "if (*(char *)(param_1 + 0x4b) != '\0') {\n    iVar1 = (*(code *)PTR_realloc_00053478)(*(undefined4 *)(param_1 + 4),param_2);\n    if (iVar1 == 0) {\n      return 0xc;\n    }\n    *(int *)(param_1 + 4) = iVar1;\n  }" if (parenthesized_expression "(*(char *)(param_1 + 0x4b) != '\0')" ( (binary_expression "*(char *)(param_1 + 0x4b) != '\0'" (pointer_expression "*(char *)(param_1 + 0x4b)" * (cast_expression "(char *)(param_1 + 0x4b)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x4b)" ( (binary_expression "param_1 + 0x4b" identifier + number_literal) )))) != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    iVar1 = (*(code *)PTR_realloc_00053478)(*(undefined4 *)(param_1 + 4),param_2);\n    if (iVar1 == 0) {\n      return 0xc;\n    }\n    *(int *)(param_1 + 4) = iVar1;\n  }" { (expression_statement "iVar1 = (*(code *)PTR_realloc_00053478)(*(undefined4 *)(param_1 + 4),param_2);" (assignment_expression "iVar1 = (*(code *)PTR_realloc_00053478)(*(undefined4 *)(param_1 + 4),param_2)" identifier = (call_expression "(*(code *)PTR_realloc_00053478)(*(undefined4 *)(param_1 + 4),param_2)" (parenthesized_expression "(*(code *)PTR_realloc_00053478)" ( (pointer_expression "*(code *)PTR_realloc_00053478" * (cast_expression "(code *)PTR_realloc_00053478" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(*(undefined4 *)(param_1 + 4),param_2)" ( (pointer_expression "*(undefined4 *)(param_1 + 4)" * (cast_expression "(undefined4 *)(param_1 + 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 4)" ( (binary_expression "param_1 + 4" identifier + number_literal) )))) , identifier )))) ;) (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 "*(int *)(param_1 + 4) = iVar1;" (assignment_expression "*(int *)(param_1 + 4) = iVar1" (pointer_expression "*(int *)(param_1 + 4)" * (cast_expression "(int *)(param_1 + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 4)" ( (binary_expression "param_1 + 4" identifier + number_literal) )))) = identifier) ;) })) (expression_statement "*(uint *)(param_1 + 0x24) = param_2;" (assignment_expression "*(uint *)(param_1 + 0x24) = param_2" (pointer_expression "*(uint *)(param_1 + 0x24)" * (cast_expression "(uint *)(param_1 + 0x24)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x24)" ( (binary_expression "param_1 + 0x24" identifier + number_literal) )))) = identifier) ;) (return_statement "return 0;" return number_literal ;) })))
(translation_unit "reg_errcode_t re_string_realloc_buffers(re_string_t *pstr,Idx new_buf_len)\n\n{\n  wint_t *pwVar1;\n  Idx *pIVar2;\n  uchar *puVar3;\n  \n  if (1 < pstr->mb_cur_max) {\n    if (0x3fffffff < (uint)new_buf_len) {\n      return _REG_ESPACE;\n    }\n    pwVar1 = (wint_t *)(*(code *)PTR_realloc_00053478)(pstr->wcs,new_buf_len << 2);\n    if (pwVar1 == (wint_t *)0x0) {\n      return _REG_ESPACE;\n    }\n    pstr->wcs = pwVar1;\n    if (pstr->offsets != (Idx *)0x0) {\n      pIVar2 = (Idx *)(*(code *)PTR_realloc_00053478)(pstr->offsets,new_buf_len << 2);\n      if (pIVar2 == (Idx *)0x0) {\n        return _REG_ESPACE;\n      }\n      pstr->offsets = pIVar2;\n    }\n  }\n  if (pstr->mbs_allocated != '\0') {\n    puVar3 = (uchar *)(*(code *)PTR_realloc_00053478)(pstr->mbs,new_buf_len);\n    if (puVar3 == (uchar *)0x0) {\n      return _REG_ESPACE;\n    }\n    pstr->mbs = puVar3;\n  }\n  pstr->bufs_len = new_buf_len;\n  return _REG_NOERROR;\n}\n\n" (function_definition "reg_errcode_t re_string_realloc_buffers(re_string_t *pstr,Idx new_buf_len)\n\n{\n  wint_t *pwVar1;\n  Idx *pIVar2;\n  uchar *puVar3;\n  \n  if (1 < pstr->mb_cur_max) {\n    if (0x3fffffff < (uint)new_buf_len) {\n      return _REG_ESPACE;\n    }\n    pwVar1 = (wint_t *)(*(code *)PTR_realloc_00053478)(pstr->wcs,new_buf_len << 2);\n    if (pwVar1 == (wint_t *)0x0) {\n      return _REG_ESPACE;\n    }\n    pstr->wcs = pwVar1;\n    if (pstr->offsets != (Idx *)0x0) {\n      pIVar2 = (Idx *)(*(code *)PTR_realloc_00053478)(pstr->offsets,new_buf_len << 2);\n      if (pIVar2 == (Idx *)0x0) {\n        return _REG_ESPACE;\n      }\n      pstr->offsets = pIVar2;\n    }\n  }\n  if (pstr->mbs_allocated != '\0') {\n    puVar3 = (uchar *)(*(code *)PTR_realloc_00053478)(pstr->mbs,new_buf_len);\n    if (puVar3 == (uchar *)0x0) {\n      return _REG_ESPACE;\n    }\n    pstr->mbs = puVar3;\n  }\n  pstr->bufs_len = new_buf_len;\n  return _REG_NOERROR;\n}" type_identifier (function_declarator "re_string_realloc_buffers(re_string_t *pstr,Idx new_buf_len)" identifier (parameter_list "(re_string_t *pstr,Idx new_buf_len)" ( (parameter_declaration "re_string_t *pstr" type_identifier (pointer_declarator "*pstr" * identifier)) , (parameter_declaration "Idx new_buf_len" type_identifier identifier) ))) (compound_statement "{\n  wint_t *pwVar1;\n  Idx *pIVar2;\n  uchar *puVar3;\n  \n  if (1 < pstr->mb_cur_max) {\n    if (0x3fffffff < (uint)new_buf_len) {\n      return _REG_ESPACE;\n    }\n    pwVar1 = (wint_t *)(*(code *)PTR_realloc_00053478)(pstr->wcs,new_buf_len << 2);\n    if (pwVar1 == (wint_t *)0x0) {\n      return _REG_ESPACE;\n    }\n    pstr->wcs = pwVar1;\n    if (pstr->offsets != (Idx *)0x0) {\n      pIVar2 = (Idx *)(*(code *)PTR_realloc_00053478)(pstr->offsets,new_buf_len << 2);\n      if (pIVar2 == (Idx *)0x0) {\n        return _REG_ESPACE;\n      }\n      pstr->offsets = pIVar2;\n    }\n  }\n  if (pstr->mbs_allocated != '\0') {\n    puVar3 = (uchar *)(*(code *)PTR_realloc_00053478)(pstr->mbs,new_buf_len);\n    if (puVar3 == (uchar *)0x0) {\n      return _REG_ESPACE;\n    }\n    pstr->mbs = puVar3;\n  }\n  pstr->bufs_len = new_buf_len;\n  return _REG_NOERROR;\n}" { (declaration "wint_t *pwVar1;" type_identifier (pointer_declarator "*pwVar1" * identifier) ;) (declaration "Idx *pIVar2;" type_identifier (pointer_declarator "*pIVar2" * identifier) ;) (declaration "uchar *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (if_statement "if (1 < pstr->mb_cur_max) {\n    if (0x3fffffff < (uint)new_buf_len) {\n      return _REG_ESPACE;\n    }\n    pwVar1 = (wint_t *)(*(code *)PTR_realloc_00053478)(pstr->wcs,new_buf_len << 2);\n    if (pwVar1 == (wint_t *)0x0) {\n      return _REG_ESPACE;\n    }\n    pstr->wcs = pwVar1;\n    if (pstr->offsets != (Idx *)0x0) {\n      pIVar2 = (Idx *)(*(code *)PTR_realloc_00053478)(pstr->offsets,new_buf_len << 2);\n      if (pIVar2 == (Idx *)0x0) {\n        return _REG_ESPACE;\n      }\n      pstr->offsets = pIVar2;\n    }\n  }" if (parenthesized_expression "(1 < pstr->mb_cur_max)" ( (binary_expression "1 < pstr->mb_cur_max" number_literal < (field_expression "pstr->mb_cur_max" identifier -> field_identifier)) )) (compound_statement "{\n    if (0x3fffffff < (uint)new_buf_len) {\n      return _REG_ESPACE;\n    }\n    pwVar1 = (wint_t *)(*(code *)PTR_realloc_00053478)(pstr->wcs,new_buf_len << 2);\n    if (pwVar1 == (wint_t *)0x0) {\n      return _REG_ESPACE;\n    }\n    pstr->wcs = pwVar1;\n    if (pstr->offsets != (Idx *)0x0) {\n      pIVar2 = (Idx *)(*(code *)PTR_realloc_00053478)(pstr->offsets,new_buf_len << 2);\n      if (pIVar2 == (Idx *)0x0) {\n        return _REG_ESPACE;\n      }\n      pstr->offsets = pIVar2;\n    }\n  }" { (if_statement "if (0x3fffffff < (uint)new_buf_len) {\n      return _REG_ESPACE;\n    }" if (parenthesized_expression "(0x3fffffff < (uint)new_buf_len)" ( (binary_expression "0x3fffffff < (uint)new_buf_len" number_literal < (cast_expression "(uint)new_buf_len" ( (type_descriptor "uint" type_identifier) ) identifier)) )) (compound_statement "{\n      return _REG_ESPACE;\n    }" { (return_statement "return _REG_ESPACE;" return identifier ;) })) (expression_statement "pwVar1 = (wint_t *)(*(code *)PTR_realloc_00053478)(pstr->wcs,new_buf_len << 2);" (assignment_expression "pwVar1 = (wint_t *)(*(code *)PTR_realloc_00053478)(pstr->wcs,new_buf_len << 2)" identifier = (cast_expression "(wint_t *)(*(code *)PTR_realloc_00053478)(pstr->wcs,new_buf_len << 2)" ( (type_descriptor "wint_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR_realloc_00053478)(pstr->wcs,new_buf_len << 2)" (parenthesized_expression "(*(code *)PTR_realloc_00053478)" ( (pointer_expression "*(code *)PTR_realloc_00053478" * (cast_expression "(code *)PTR_realloc_00053478" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(pstr->wcs,new_buf_len << 2)" ( (field_expression "pstr->wcs" identifier -> field_identifier) , (binary_expression "new_buf_len << 2" identifier << number_literal) ))))) ;) (if_statement "if (pwVar1 == (wint_t *)0x0) {\n      return _REG_ESPACE;\n    }" if (parenthesized_expression "(pwVar1 == (wint_t *)0x0)" ( (binary_expression "pwVar1 == (wint_t *)0x0" identifier == (cast_expression "(wint_t *)0x0" ( (type_descriptor "wint_t *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      return _REG_ESPACE;\n    }" { (return_statement "return _REG_ESPACE;" return identifier ;) })) (expression_statement "pstr->wcs = pwVar1;" (assignment_expression "pstr->wcs = pwVar1" (field_expression "pstr->wcs" identifier -> field_identifier) = identifier) ;) (if_statement "if (pstr->offsets != (Idx *)0x0) {\n      pIVar2 = (Idx *)(*(code *)PTR_realloc_00053478)(pstr->offsets,new_buf_len << 2);\n      if (pIVar2 == (Idx *)0x0) {\n        return _REG_ESPACE;\n      }\n      pstr->offsets = pIVar2;\n    }" if (parenthesized_expression "(pstr->offsets != (Idx *)0x0)" ( (binary_expression "pstr->offsets != (Idx *)0x0" (field_expression "pstr->offsets" identifier -> field_identifier) != (cast_expression "(Idx *)0x0" ( (type_descriptor "Idx *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      pIVar2 = (Idx *)(*(code *)PTR_realloc_00053478)(pstr->offsets,new_buf_len << 2);\n      if (pIVar2 == (Idx *)0x0) {\n        return _REG_ESPACE;\n      }\n      pstr->offsets = pIVar2;\n    }" { (expression_statement "pIVar2 = (Idx *)(*(code *)PTR_realloc_00053478)(pstr->offsets,new_buf_len << 2);" (assignment_expression "pIVar2 = (Idx *)(*(code *)PTR_realloc_00053478)(pstr->offsets,new_buf_len << 2)" identifier = (cast_expression "(Idx *)(*(code *)PTR_realloc_00053478)(pstr->offsets,new_buf_len << 2)" ( (type_descriptor "Idx *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR_realloc_00053478)(pstr->offsets,new_buf_len << 2)" (parenthesized_expression "(*(code *)PTR_realloc_00053478)" ( (pointer_expression "*(code *)PTR_realloc_00053478" * (cast_expression "(code *)PTR_realloc_00053478" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(pstr->offsets,new_buf_len << 2)" ( (field_expression "pstr->offsets" identifier -> field_identifier) , (binary_expression "new_buf_len << 2" identifier << number_literal) ))))) ;) (if_statement "if (pIVar2 == (Idx *)0x0) {\n        return _REG_ESPACE;\n      }" if (parenthesized_expression "(pIVar2 == (Idx *)0x0)" ( (binary_expression "pIVar2 == (Idx *)0x0" identifier == (cast_expression "(Idx *)0x0" ( (type_descriptor "Idx *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        return _REG_ESPACE;\n      }" { (return_statement "return _REG_ESPACE;" return identifier ;) })) (expression_statement "pstr->offsets = pIVar2;" (assignment_expression "pstr->offsets = pIVar2" (field_expression "pstr->offsets" identifier -> field_identifier) = identifier) ;) })) })) (if_statement "if (pstr->mbs_allocated != '\0') {\n    puVar3 = (uchar *)(*(code *)PTR_realloc_00053478)(pstr->mbs,new_buf_len);\n    if (puVar3 == (uchar *)0x0) {\n      return _REG_ESPACE;\n    }\n    pstr->mbs = puVar3;\n  }" if (parenthesized_expression "(pstr->mbs_allocated != '\0')" ( (binary_expression "pstr->mbs_allocated != '\0'" (field_expression "pstr->mbs_allocated" identifier -> field_identifier) != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    puVar3 = (uchar *)(*(code *)PTR_realloc_00053478)(pstr->mbs,new_buf_len);\n    if (puVar3 == (uchar *)0x0) {\n      return _REG_ESPACE;\n    }\n    pstr->mbs = puVar3;\n  }" { (expression_statement "puVar3 = (uchar *)(*(code *)PTR_realloc_00053478)(pstr->mbs,new_buf_len);" (assignment_expression "puVar3 = (uchar *)(*(code *)PTR_realloc_00053478)(pstr->mbs,new_buf_len)" identifier = (cast_expression "(uchar *)(*(code *)PTR_realloc_00053478)(pstr->mbs,new_buf_len)" ( (type_descriptor "uchar *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR_realloc_00053478)(pstr->mbs,new_buf_len)" (parenthesized_expression "(*(code *)PTR_realloc_00053478)" ( (pointer_expression "*(code *)PTR_realloc_00053478" * (cast_expression "(code *)PTR_realloc_00053478" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(pstr->mbs,new_buf_len)" ( (field_expression "pstr->mbs" identifier -> field_identifier) , identifier ))))) ;) (if_statement "if (puVar3 == (uchar *)0x0) {\n      return _REG_ESPACE;\n    }" if (parenthesized_expression "(puVar3 == (uchar *)0x0)" ( (binary_expression "puVar3 == (uchar *)0x0" identifier == (cast_expression "(uchar *)0x0" ( (type_descriptor "uchar *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      return _REG_ESPACE;\n    }" { (return_statement "return _REG_ESPACE;" return identifier ;) })) (expression_statement "pstr->mbs = puVar3;" (assignment_expression "pstr->mbs = puVar3" (field_expression "pstr->mbs" identifier -> field_identifier) = identifier) ;) })) (expression_statement "pstr->bufs_len = new_buf_len;" (assignment_expression "pstr->bufs_len = new_buf_len" (field_expression "pstr->bufs_len" identifier -> field_identifier) = identifier) ;) (return_statement "return _REG_NOERROR;" return identifier ;) })))
(translation_unit "undefined4 FUN_00029938(int param_1,uint param_2)\n\n{\n  int iVar1;\n  \n  if (1 < *(int *)(param_1 + 0x50)) {\n    if (0x3fffffff < param_2) {\n      return 0xc;\n    }\n    iVar1 = (*(code *)PTR_realloc_00053478)(*(undefined4 *)(param_1 + 8),param_2 << 2);\n    if (iVar1 == 0) {\n      return 0xc;\n    }\n    *(int *)(param_1 + 8) = iVar1;\n    if (*(int *)(param_1 + 0xc) != 0) {\n      iVar1 = (*(code *)PTR_realloc_00053478)(*(int *)(param_1 + 0xc),param_2 << 2);\n      if (iVar1 == 0) {\n        return 0xc;\n      }\n      *(int *)(param_1 + 0xc) = iVar1;\n    }\n  }\n  if (*(char *)(param_1 + 0x4b) != '\0') {\n    iVar1 = (*(code *)PTR_realloc_00053478)(*(undefined4 *)(param_1 + 4),param_2);\n    if (iVar1 == 0) {\n      return 0xc;\n    }\n    *(int *)(param_1 + 4) = iVar1;\n  }\n  *(uint *)(param_1 + 0x24) = param_2;\n  return 0;\n}\n\n" (function_definition "undefined4 FUN_00029938(int param_1,uint param_2)\n\n{\n  int iVar1;\n  \n  if (1 < *(int *)(param_1 + 0x50)) {\n    if (0x3fffffff < param_2) {\n      return 0xc;\n    }\n    iVar1 = (*(code *)PTR_realloc_00053478)(*(undefined4 *)(param_1 + 8),param_2 << 2);\n    if (iVar1 == 0) {\n      return 0xc;\n    }\n    *(int *)(param_1 + 8) = iVar1;\n    if (*(int *)(param_1 + 0xc) != 0) {\n      iVar1 = (*(code *)PTR_realloc_00053478)(*(int *)(param_1 + 0xc),param_2 << 2);\n      if (iVar1 == 0) {\n        return 0xc;\n      }\n      *(int *)(param_1 + 0xc) = iVar1;\n    }\n  }\n  if (*(char *)(param_1 + 0x4b) != '\0') {\n    iVar1 = (*(code *)PTR_realloc_00053478)(*(undefined4 *)(param_1 + 4),param_2);\n    if (iVar1 == 0) {\n      return 0xc;\n    }\n    *(int *)(param_1 + 4) = iVar1;\n  }\n  *(uint *)(param_1 + 0x24) = param_2;\n  return 0;\n}" type_identifier (function_declarator "FUN_00029938(int param_1,uint param_2)" identifier (parameter_list "(int param_1,uint param_2)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "uint param_2" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  \n  if (1 < *(int *)(param_1 + 0x50)) {\n    if (0x3fffffff < param_2) {\n      return 0xc;\n    }\n    iVar1 = (*(code *)PTR_realloc_00053478)(*(undefined4 *)(param_1 + 8),param_2 << 2);\n    if (iVar1 == 0) {\n      return 0xc;\n    }\n    *(int *)(param_1 + 8) = iVar1;\n    if (*(int *)(param_1 + 0xc) != 0) {\n      iVar1 = (*(code *)PTR_realloc_00053478)(*(int *)(param_1 + 0xc),param_2 << 2);\n      if (iVar1 == 0) {\n        return 0xc;\n      }\n      *(int *)(param_1 + 0xc) = iVar1;\n    }\n  }\n  if (*(char *)(param_1 + 0x4b) != '\0') {\n    iVar1 = (*(code *)PTR_realloc_00053478)(*(undefined4 *)(param_1 + 4),param_2);\n    if (iVar1 == 0) {\n      return 0xc;\n    }\n    *(int *)(param_1 + 4) = iVar1;\n  }\n  *(uint *)(param_1 + 0x24) = param_2;\n  return 0;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (if_statement "if (1 < *(int *)(param_1 + 0x50)) {\n    if (0x3fffffff < param_2) {\n      return 0xc;\n    }\n    iVar1 = (*(code *)PTR_realloc_00053478)(*(undefined4 *)(param_1 + 8),param_2 << 2);\n    if (iVar1 == 0) {\n      return 0xc;\n    }\n    *(int *)(param_1 + 8) = iVar1;\n    if (*(int *)(param_1 + 0xc) != 0) {\n      iVar1 = (*(code *)PTR_realloc_00053478)(*(int *)(param_1 + 0xc),param_2 << 2);\n      if (iVar1 == 0) {\n        return 0xc;\n      }\n      *(int *)(param_1 + 0xc) = iVar1;\n    }\n  }" if (parenthesized_expression "(1 < *(int *)(param_1 + 0x50))" ( (binary_expression "1 < *(int *)(param_1 + 0x50)" number_literal < (pointer_expression "*(int *)(param_1 + 0x50)" * (cast_expression "(int *)(param_1 + 0x50)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x50)" ( (binary_expression "param_1 + 0x50" identifier + number_literal) ))))) )) (compound_statement "{\n    if (0x3fffffff < param_2) {\n      return 0xc;\n    }\n    iVar1 = (*(code *)PTR_realloc_00053478)(*(undefined4 *)(param_1 + 8),param_2 << 2);\n    if (iVar1 == 0) {\n      return 0xc;\n    }\n    *(int *)(param_1 + 8) = iVar1;\n    if (*(int *)(param_1 + 0xc) != 0) {\n      iVar1 = (*(code *)PTR_realloc_00053478)(*(int *)(param_1 + 0xc),param_2 << 2);\n      if (iVar1 == 0) {\n        return 0xc;\n      }\n      *(int *)(param_1 + 0xc) = iVar1;\n    }\n  }" { (if_statement "if (0x3fffffff < param_2) {\n      return 0xc;\n    }" if (parenthesized_expression "(0x3fffffff < param_2)" ( (binary_expression "0x3fffffff < param_2" number_literal < identifier) )) (compound_statement "{\n      return 0xc;\n    }" { (return_statement "return 0xc;" return number_literal ;) })) (expression_statement "iVar1 = (*(code *)PTR_realloc_00053478)(*(undefined4 *)(param_1 + 8),param_2 << 2);" (assignment_expression "iVar1 = (*(code *)PTR_realloc_00053478)(*(undefined4 *)(param_1 + 8),param_2 << 2)" identifier = (call_expression "(*(code *)PTR_realloc_00053478)(*(undefined4 *)(param_1 + 8),param_2 << 2)" (parenthesized_expression "(*(code *)PTR_realloc_00053478)" ( (pointer_expression "*(code *)PTR_realloc_00053478" * (cast_expression "(code *)PTR_realloc_00053478" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(*(undefined4 *)(param_1 + 8),param_2 << 2)" ( (pointer_expression "*(undefined4 *)(param_1 + 8)" * (cast_expression "(undefined4 *)(param_1 + 8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 8)" ( (binary_expression "param_1 + 8" identifier + number_literal) )))) , (binary_expression "param_2 << 2" identifier << 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 "*(int *)(param_1 + 8) = iVar1;" (assignment_expression "*(int *)(param_1 + 8) = iVar1" (pointer_expression "*(int *)(param_1 + 8)" * (cast_expression "(int *)(param_1 + 8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 8)" ( (binary_expression "param_1 + 8" identifier + number_literal) )))) = identifier) ;) (if_statement "if (*(int *)(param_1 + 0xc) != 0) {\n      iVar1 = (*(code *)PTR_realloc_00053478)(*(int *)(param_1 + 0xc),param_2 << 2);\n      if (iVar1 == 0) {\n        return 0xc;\n      }\n      *(int *)(param_1 + 0xc) = iVar1;\n    }" if (parenthesized_expression "(*(int *)(param_1 + 0xc) != 0)" ( (binary_expression "*(int *)(param_1 + 0xc) != 0" (pointer_expression "*(int *)(param_1 + 0xc)" * (cast_expression "(int *)(param_1 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) )))) != number_literal) )) (compound_statement "{\n      iVar1 = (*(code *)PTR_realloc_00053478)(*(int *)(param_1 + 0xc),param_2 << 2);\n      if (iVar1 == 0) {\n        return 0xc;\n      }\n      *(int *)(param_1 + 0xc) = iVar1;\n    }" { (expression_statement "iVar1 = (*(code *)PTR_realloc_00053478)(*(int *)(param_1 + 0xc),param_2 << 2);" (assignment_expression "iVar1 = (*(code *)PTR_realloc_00053478)(*(int *)(param_1 + 0xc),param_2 << 2)" identifier = (call_expression "(*(code *)PTR_realloc_00053478)(*(int *)(param_1 + 0xc),param_2 << 2)" (parenthesized_expression "(*(code *)PTR_realloc_00053478)" ( (pointer_expression "*(code *)PTR_realloc_00053478" * (cast_expression "(code *)PTR_realloc_00053478" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(*(int *)(param_1 + 0xc),param_2 << 2)" ( (pointer_expression "*(int *)(param_1 + 0xc)" * (cast_expression "(int *)(param_1 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) )))) , (binary_expression "param_2 << 2" identifier << 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 "*(int *)(param_1 + 0xc) = iVar1;" (assignment_expression "*(int *)(param_1 + 0xc) = iVar1" (pointer_expression "*(int *)(param_1 + 0xc)" * (cast_expression "(int *)(param_1 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) )))) = identifier) ;) })) })) (if_statement "if (*(char *)(param_1 + 0x4b) != '\0') {\n    iVar1 = (*(code *)PTR_realloc_00053478)(*(undefined4 *)(param_1 + 4),param_2);\n    if (iVar1 == 0) {\n      return 0xc;\n    }\n    *(int *)(param_1 + 4) = iVar1;\n  }" if (parenthesized_expression "(*(char *)(param_1 + 0x4b) != '\0')" ( (binary_expression "*(char *)(param_1 + 0x4b) != '\0'" (pointer_expression "*(char *)(param_1 + 0x4b)" * (cast_expression "(char *)(param_1 + 0x4b)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x4b)" ( (binary_expression "param_1 + 0x4b" identifier + number_literal) )))) != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    iVar1 = (*(code *)PTR_realloc_00053478)(*(undefined4 *)(param_1 + 4),param_2);\n    if (iVar1 == 0) {\n      return 0xc;\n    }\n    *(int *)(param_1 + 4) = iVar1;\n  }" { (expression_statement "iVar1 = (*(code *)PTR_realloc_00053478)(*(undefined4 *)(param_1 + 4),param_2);" (assignment_expression "iVar1 = (*(code *)PTR_realloc_00053478)(*(undefined4 *)(param_1 + 4),param_2)" identifier = (call_expression "(*(code *)PTR_realloc_00053478)(*(undefined4 *)(param_1 + 4),param_2)" (parenthesized_expression "(*(code *)PTR_realloc_00053478)" ( (pointer_expression "*(code *)PTR_realloc_00053478" * (cast_expression "(code *)PTR_realloc_00053478" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(*(undefined4 *)(param_1 + 4),param_2)" ( (pointer_expression "*(undefined4 *)(param_1 + 4)" * (cast_expression "(undefined4 *)(param_1 + 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 4)" ( (binary_expression "param_1 + 4" identifier + number_literal) )))) , identifier )))) ;) (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 "*(int *)(param_1 + 4) = iVar1;" (assignment_expression "*(int *)(param_1 + 4) = iVar1" (pointer_expression "*(int *)(param_1 + 4)" * (cast_expression "(int *)(param_1 + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 4)" ( (binary_expression "param_1 + 4" identifier + number_literal) )))) = identifier) ;) })) (expression_statement "*(uint *)(param_1 + 0x24) = param_2;" (assignment_expression "*(uint *)(param_1 + 0x24) = param_2" (pointer_expression "*(uint *)(param_1 + 0x24)" * (cast_expression "(uint *)(param_1 + 0x24)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x24)" ( (binary_expression "param_1 + 0x24" identifier + number_literal) )))) = identifier) ;) (return_statement "return 0;" return number_literal ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (compound_statement { (return_statement return LIT ;) })) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) , (binary_expression IDENT << LIT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (return_statement return LIT ;) })) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_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) )))) != 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 ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) , (binary_expression IDENT << LIT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (return_statement return LIT ;) })) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_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 { (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (return_statement return LIT ;) })) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) })) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (return_statement return LIT ;) })))
(function_definition "undefined4 FUN_00029938(int param_1,uint param_2)\n\n{\n  int iVar1;\n  \n  if (1 < *(int *)(param_1 + 0x50)) {\n    if (0x3fffffff < param_2) {\n      return 0xc;\n    }\n    iVar1 = (*(code *)PTR_realloc_00053478)(*(undefined4 *)(param_1 + 8),param_2 << 2);\n    if (iVar1 == 0) {\n      return 0xc;\n    }\n    *(int *)(param_1 + 8) = iVar1;\n    if (*(int *)(param_1 + 0xc) != 0) {\n      iVar1 = (*(code *)PTR_realloc_00053478)(*(int *)(param_1 + 0xc),param_2 << 2);\n      if (iVar1 == 0) {\n        return 0xc;\n      }\n      *(int *)(param_1 + 0xc) = iVar1;\n    }\n  }\n  if (*(char *)(param_1 + 0x4b) != '\0') {\n    iVar1 = (*(code *)PTR_realloc_00053478)(*(undefined4 *)(param_1 + 4),param_2);\n    if (iVar1 == 0) {\n      return 0xc;\n    }\n    *(int *)(param_1 + 4) = iVar1;\n  }\n  *(uint *)(param_1 + 0x24) = param_2;\n  return 0;\n}" (type_identifier "undefined4") (function_declarator "FUN_00029938(int param_1,uint param_2)" (identifier "FUN_00029938") (parameter_list "(int param_1,uint param_2)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "uint param_2" (type_identifier "uint") (identifier "param_2")) () ")"))) (compound_statement "{\n  int iVar1;\n  \n  if (1 < *(int *)(param_1 + 0x50)) {\n    if (0x3fffffff < param_2) {\n      return 0xc;\n    }\n    iVar1 = (*(code *)PTR_realloc_00053478)(*(undefined4 *)(param_1 + 8),param_2 << 2);\n    if (iVar1 == 0) {\n      return 0xc;\n    }\n    *(int *)(param_1 + 8) = iVar1;\n    if (*(int *)(param_1 + 0xc) != 0) {\n      iVar1 = (*(code *)PTR_realloc_00053478)(*(int *)(param_1 + 0xc),param_2 << 2);\n      if (iVar1 == 0) {\n        return 0xc;\n      }\n      *(int *)(param_1 + 0xc) = iVar1;\n    }\n  }\n  if (*(char *)(param_1 + 0x4b) != '\0') {\n    iVar1 = (*(code *)PTR_realloc_00053478)(*(undefined4 *)(param_1 + 4),param_2);\n    if (iVar1 == 0) {\n      return 0xc;\n    }\n    *(int *)(param_1 + 4) = iVar1;\n  }\n  *(uint *)(param_1 + 0x24) = param_2;\n  return 0;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (if_statement "if (1 < *(int *)(param_1 + 0x50)) {\n    if (0x3fffffff < param_2) {\n      return 0xc;\n    }\n    iVar1 = (*(code *)PTR_realloc_00053478)(*(undefined4 *)(param_1 + 8),param_2 << 2);\n    if (iVar1 == 0) {\n      return 0xc;\n    }\n    *(int *)(param_1 + 8) = iVar1;\n    if (*(int *)(param_1 + 0xc) != 0) {\n      iVar1 = (*(code *)PTR_realloc_00053478)(*(int *)(param_1 + 0xc),param_2 << 2);\n      if (iVar1 == 0) {\n        return 0xc;\n      }\n      *(int *)(param_1 + 0xc) = iVar1;\n    }\n  }" (if "if") (parenthesized_expression "(1 < *(int *)(param_1 + 0x50))" (( "(") (binary_expression "1 < *(int *)(param_1 + 0x50)" (number_literal "1") (< "<") (pointer_expression "*(int *)(param_1 + 0x50)" (* "*") (cast_expression "(int *)(param_1 + 0x50)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x50)" (( "(") (binary_expression "param_1 + 0x50" (identifier "param_1") (+ "+") (number_literal "0x50")) () ")"))))) () ")")) (compound_statement "{\n    if (0x3fffffff < param_2) {\n      return 0xc;\n    }\n    iVar1 = (*(code *)PTR_realloc_00053478)(*(undefined4 *)(param_1 + 8),param_2 << 2);\n    if (iVar1 == 0) {\n      return 0xc;\n    }\n    *(int *)(param_1 + 8) = iVar1;\n    if (*(int *)(param_1 + 0xc) != 0) {\n      iVar1 = (*(code *)PTR_realloc_00053478)(*(int *)(param_1 + 0xc),param_2 << 2);\n      if (iVar1 == 0) {\n        return 0xc;\n      }\n      *(int *)(param_1 + 0xc) = iVar1;\n    }\n  }" ({ "{") (if_statement "if (0x3fffffff < param_2) {\n      return 0xc;\n    }" (if "if") (parenthesized_expression "(0x3fffffff < param_2)" (( "(") (binary_expression "0x3fffffff < param_2" (number_literal "0x3fffffff") (< "<") (identifier "param_2")) () ")")) (compound_statement "{\n      return 0xc;\n    }" ({ "{") (return_statement "return 0xc;" (return "return") (number_literal "0xc") (; ";")) (} "}"))) (expression_statement "iVar1 = (*(code *)PTR_realloc_00053478)(*(undefined4 *)(param_1 + 8),param_2 << 2);" (assignment_expression "iVar1 = (*(code *)PTR_realloc_00053478)(*(undefined4 *)(param_1 + 8),param_2 << 2)" (identifier "iVar1") (= "=") (call_expression "(*(code *)PTR_realloc_00053478)(*(undefined4 *)(param_1 + 8),param_2 << 2)" (parenthesized_expression "(*(code *)PTR_realloc_00053478)" (( "(") (pointer_expression "*(code *)PTR_realloc_00053478" (* "*") (cast_expression "(code *)PTR_realloc_00053478" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_realloc_00053478"))) () ")")) (argument_list "(*(undefined4 *)(param_1 + 8),param_2 << 2)" (( "(") (pointer_expression "*(undefined4 *)(param_1 + 8)" (* "*") (cast_expression "(undefined4 *)(param_1 + 8)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 8)" (( "(") (binary_expression "param_1 + 8" (identifier "param_1") (+ "+") (number_literal "8")) () ")")))) (, ",") (binary_expression "param_2 << 2" (identifier "param_2") (<< "<<") (number_literal "2")) () ")")))) (; ";")) (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 "*(int *)(param_1 + 8) = iVar1;" (assignment_expression "*(int *)(param_1 + 8) = iVar1" (pointer_expression "*(int *)(param_1 + 8)" (* "*") (cast_expression "(int *)(param_1 + 8)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 8)" (( "(") (binary_expression "param_1 + 8" (identifier "param_1") (+ "+") (number_literal "8")) () ")")))) (= "=") (identifier "iVar1")) (; ";")) (if_statement "if (*(int *)(param_1 + 0xc) != 0) {\n      iVar1 = (*(code *)PTR_realloc_00053478)(*(int *)(param_1 + 0xc),param_2 << 2);\n      if (iVar1 == 0) {\n        return 0xc;\n      }\n      *(int *)(param_1 + 0xc) = iVar1;\n    }" (if "if") (parenthesized_expression "(*(int *)(param_1 + 0xc) != 0)" (( "(") (binary_expression "*(int *)(param_1 + 0xc) != 0" (pointer_expression "*(int *)(param_1 + 0xc)" (* "*") (cast_expression "(int *)(param_1 + 0xc)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xc)" (( "(") (binary_expression "param_1 + 0xc" (identifier "param_1") (+ "+") (number_literal "0xc")) () ")")))) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      iVar1 = (*(code *)PTR_realloc_00053478)(*(int *)(param_1 + 0xc),param_2 << 2);\n      if (iVar1 == 0) {\n        return 0xc;\n      }\n      *(int *)(param_1 + 0xc) = iVar1;\n    }" ({ "{") (expression_statement "iVar1 = (*(code *)PTR_realloc_00053478)(*(int *)(param_1 + 0xc),param_2 << 2);" (assignment_expression "iVar1 = (*(code *)PTR_realloc_00053478)(*(int *)(param_1 + 0xc),param_2 << 2)" (identifier "iVar1") (= "=") (call_expression "(*(code *)PTR_realloc_00053478)(*(int *)(param_1 + 0xc),param_2 << 2)" (parenthesized_expression "(*(code *)PTR_realloc_00053478)" (( "(") (pointer_expression "*(code *)PTR_realloc_00053478" (* "*") (cast_expression "(code *)PTR_realloc_00053478" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_realloc_00053478"))) () ")")) (argument_list "(*(int *)(param_1 + 0xc),param_2 << 2)" (( "(") (pointer_expression "*(int *)(param_1 + 0xc)" (* "*") (cast_expression "(int *)(param_1 + 0xc)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xc)" (( "(") (binary_expression "param_1 + 0xc" (identifier "param_1") (+ "+") (number_literal "0xc")) () ")")))) (, ",") (binary_expression "param_2 << 2" (identifier "param_2") (<< "<<") (number_literal "2")) () ")")))) (; ";")) (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 "*(int *)(param_1 + 0xc) = iVar1;" (assignment_expression "*(int *)(param_1 + 0xc) = iVar1" (pointer_expression "*(int *)(param_1 + 0xc)" (* "*") (cast_expression "(int *)(param_1 + 0xc)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xc)" (( "(") (binary_expression "param_1 + 0xc" (identifier "param_1") (+ "+") (number_literal "0xc")) () ")")))) (= "=") (identifier "iVar1")) (; ";")) (} "}"))) (} "}"))) (if_statement "if (*(char *)(param_1 + 0x4b) != '\0') {\n    iVar1 = (*(code *)PTR_realloc_00053478)(*(undefined4 *)(param_1 + 4),param_2);\n    if (iVar1 == 0) {\n      return 0xc;\n    }\n    *(int *)(param_1 + 4) = iVar1;\n  }" (if "if") (parenthesized_expression "(*(char *)(param_1 + 0x4b) != '\0')" (( "(") (binary_expression "*(char *)(param_1 + 0x4b) != '\0'" (pointer_expression "*(char *)(param_1 + 0x4b)" (* "*") (cast_expression "(char *)(param_1 + 0x4b)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x4b)" (( "(") (binary_expression "param_1 + 0x4b" (identifier "param_1") (+ "+") (number_literal "0x4b")) () ")")))) (!= "!=") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (compound_statement "{\n    iVar1 = (*(code *)PTR_realloc_00053478)(*(undefined4 *)(param_1 + 4),param_2);\n    if (iVar1 == 0) {\n      return 0xc;\n    }\n    *(int *)(param_1 + 4) = iVar1;\n  }" ({ "{") (expression_statement "iVar1 = (*(code *)PTR_realloc_00053478)(*(undefined4 *)(param_1 + 4),param_2);" (assignment_expression "iVar1 = (*(code *)PTR_realloc_00053478)(*(undefined4 *)(param_1 + 4),param_2)" (identifier "iVar1") (= "=") (call_expression "(*(code *)PTR_realloc_00053478)(*(undefined4 *)(param_1 + 4),param_2)" (parenthesized_expression "(*(code *)PTR_realloc_00053478)" (( "(") (pointer_expression "*(code *)PTR_realloc_00053478" (* "*") (cast_expression "(code *)PTR_realloc_00053478" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_realloc_00053478"))) () ")")) (argument_list "(*(undefined4 *)(param_1 + 4),param_2)" (( "(") (pointer_expression "*(undefined4 *)(param_1 + 4)" (* "*") (cast_expression "(undefined4 *)(param_1 + 4)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 4)" (( "(") (binary_expression "param_1 + 4" (identifier "param_1") (+ "+") (number_literal "4")) () ")")))) (, ",") (identifier "param_2") () ")")))) (; ";")) (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 "*(int *)(param_1 + 4) = iVar1;" (assignment_expression "*(int *)(param_1 + 4) = iVar1" (pointer_expression "*(int *)(param_1 + 4)" (* "*") (cast_expression "(int *)(param_1 + 4)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 4)" (( "(") (binary_expression "param_1 + 4" (identifier "param_1") (+ "+") (number_literal "4")) () ")")))) (= "=") (identifier "iVar1")) (; ";")) (} "}"))) (expression_statement "*(uint *)(param_1 + 0x24) = param_2;" (assignment_expression "*(uint *)(param_1 + 0x24) = param_2" (pointer_expression "*(uint *)(param_1 + 0x24)" (* "*") (cast_expression "(uint *)(param_1 + 0x24)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x24)" (( "(") (binary_expression "param_1 + 0x24" (identifier "param_1") (+ "+") (number_literal "0x24")) () ")")))) (= "=") (identifier "param_2")) (; ";")) (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}")))

type_1 function_1(type_2 *pstr,type_3 var_1)

{
  type_4 *var_2;
  type_3 *var_3;
  type_5 *var_4;
  
  if (1 < pstr->mb_cur_max) {
    if (0x3fffffff < (type_6)var_1) {
      return _REG_ESPACE;
    }
    var_2 = (type_4 *)(*(type_7 *)PTR_realloc_00053478)(pstr->wcs,var_1 << 2);
    if (var_2 == (type_4 *)0x0) {
      return _REG_ESPACE;
    }
    pstr->wcs = var_2;
    if (pstr->offsets != (type_3 *)0x0) {
      var_3 = (type_3 *)(*(type_7 *)PTR_realloc_00053478)(pstr->offsets,var_1 << 2);
      if (var_3 == (type_3 *)0x0) {
        return _REG_ESPACE;
      }
      pstr->offsets = var_3;
    }
  }
  if (pstr->mbs_allocated != '\0') {
    var_4 = (type_5 *)(*(type_7 *)PTR_realloc_00053478)(pstr->mbs,var_1);
    if (var_4 == (type_5 *)0x0) {
      return _REG_ESPACE;
    }
    pstr->mbs = var_4;
  }
  pstr->bufs_len = var_1;
  return _REG_NOERROR;
}


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

undefined4 MASKED(int param_1,uint param_2)

{
  int iVar1;
  
  if (1 < *(int *)(param_1 + 0x50)) {
    if (0x3fffffff < param_2) {
      return 0xc;
    }
    iVar1 = (*(code *)PTR_realloc_00053478)(*(undefined4 *)(param_1 + 8),param_2 << 2);
    if (iVar1 == 0) {
      return 0xc;
    }
    *(int *)(param_1 + 8) = iVar1;
    if (*(int *)(param_1 + 0xc) != 0) {
      iVar1 = (*(code *)PTR_realloc_00053478)(*(int *)(param_1 + 0xc),param_2 << 2);
      if (iVar1 == 0) {
        return 0xc;
      }
      *(int *)(param_1 + 0xc) = iVar1;
    }
  }
  if (*(char *)(param_1 + 0x4b) != '\0') {
    iVar1 = (*(code *)PTR_realloc_00053478)(*(undefined4 *)(param_1 + 4),param_2);
    if (iVar1 == 0) {
      return 0xc;
    }
    *(int *)(param_1 + 4) = iVar1;
  }
  *(uint *)(param_1 + 0x24) = param_2;
  return 0;
}

