
size_t rpl_regerror(int errcode,regex_t *preg,char *errbuf,size_t errbuf_size)

{
  undefined4 uVar1;
  int iVar2;
  size_t sVar3;
  uint uVar4;
  uint uVar5;
  
  if ((uint)errcode < 0x11) {
    uVar1 = (*(code *)PTR_dcgettext_0003d334)
                      (0,PTR_DAT_0003d148 +
                         *(int *)(PTR_DAT_0003d148 + errcode * 4 + -0x355c) + -0x3518,5);
    iVar2 = (*(code *)PTR_strlen_0003d2e4)(uVar1);
    uVar5 = iVar2 + 1;
    if (errbuf_size != 0) {
      uVar4 = uVar5;
      if (errbuf_size < uVar5) {
        uVar4 = errbuf_size - 1;
        errbuf[uVar4] = '\0';
      }
      (*(code *)PTR_memcpy_0003d34c)(errbuf,uVar1,uVar4);
    }
    return uVar5;
  }
  sVar3 = (*(code *)PTR_abort_0003d264)();
  return sVar3;
}



uint FUN_00029638(uint param_1,undefined4 param_2,int param_3,uint param_4)

{
  undefined4 uVar1;
  int iVar2;
  uint uVar3;
  uint uVar4;
  
  if (param_1 < 0x11) {
    uVar1 = (*(code *)PTR_dcgettext_0003d334)
                      (0,PTR_DAT_0003d148 +
                         *(int *)(PTR_DAT_0003d148 + param_1 * 4 + -0x355c) + -0x3518,5);
    iVar2 = (*(code *)PTR_strlen_0003d2e4)(uVar1);
    uVar4 = iVar2 + 1;
    if (param_4 != 0) {
      uVar3 = uVar4;
      if (param_4 < uVar4) {
        uVar3 = param_4 - 1;
        *(undefined1 *)(param_3 + uVar3) = 0;
      }
      (*(code *)PTR_memcpy_0003d34c)(param_3,uVar1,uVar3);
    }
    return uVar4;
  }
  uVar4 = (*(code *)PTR_abort_0003d264)();
  return uVar4;
}


lui gp,0x2
addiu gp,gp,-0x4528
addu gp,gp,t9
addiu sp,sp,-0x30
sltiu v0,a0,0x11
sw gp,0x10(sp)
sw ra,0x2c(sp)
sw s3,0x28(sp)
sw s2,0x24(sp)
sw s1,0x20(sp)
beq v0,zero,0x0002970c
_sw s0,0x1c(sp)
lw v1,-0x7fc8(gp)
sll v0,a0,0x2
lw t9,-0x7ddc(gp)
or a0,zero,zero
or s3,a2,zero
addiu v1,v1,-0x355c
li a2,0x5
addu v0,v0,v1
or s1,a3,zero
lw a1,0x0(v0)
lw v0,-0x7fc8(gp)
addiu v0,v0,-0x3518
jalr t9
_addu a1,v0,a1
lw gp,0x10(sp)
or a0,v0,zero
lw t9,-0x7e2c(gp)
jalr t9
_or s2,v0,zero
lw gp,0x10(sp)
beq s1,zero,0x000296dc
_addiu s0,v0,0x1
sltu v0,s1,s0
bne v0,zero,0x000296fc
_or a2,s0,zero
lw t9,-0x7dc4(gp)
or a1,s2,zero
jalr t9
_or a0,s3,zero
lw ra,0x2c(sp)
or v0,s0,zero
lw s3,0x28(sp)
lw s2,0x24(sp)
lw s1,0x20(sp)
lw s0,0x1c(sp)
jr ra
_addiu sp,sp,0x30
addiu a2,s1,-0x1
addu v0,s3,a2
b 0x000296cc
_sb zero,0x0(v0)
lw t9,-0x7eac(gp)
jalr t9
_nop
(translation_unit "uint FUN_00029638(uint param_1,undefined4 param_2,int param_3,uint param_4)\n\n{\n  undefined4 uVar1;\n  int iVar2;\n  uint uVar3;\n  uint uVar4;\n  \n  if (param_1 < 0x11) {\n    uVar1 = (*(code *)PTR_dcgettext_0003d334)\n                      (0,PTR_DAT_0003d148 +\n                         *(int *)(PTR_DAT_0003d148 + param_1 * 4 + -0x355c) + -0x3518,5);\n    iVar2 = (*(code *)PTR_strlen_0003d2e4)(uVar1);\n    uVar4 = iVar2 + 1;\n    if (param_4 != 0) {\n      uVar3 = uVar4;\n      if (param_4 < uVar4) {\n        uVar3 = param_4 - 1;\n        *(undefined1 *)(param_3 + uVar3) = 0;\n      }\n      (*(code *)PTR_memcpy_0003d34c)(param_3,uVar1,uVar3);\n    }\n    return uVar4;\n  }\n  uVar4 = (*(code *)PTR_abort_0003d264)();\n  return uVar4;\n}\n\n" (function_definition "uint FUN_00029638(uint param_1,undefined4 param_2,int param_3,uint param_4)\n\n{\n  undefined4 uVar1;\n  int iVar2;\n  uint uVar3;\n  uint uVar4;\n  \n  if (param_1 < 0x11) {\n    uVar1 = (*(code *)PTR_dcgettext_0003d334)\n                      (0,PTR_DAT_0003d148 +\n                         *(int *)(PTR_DAT_0003d148 + param_1 * 4 + -0x355c) + -0x3518,5);\n    iVar2 = (*(code *)PTR_strlen_0003d2e4)(uVar1);\n    uVar4 = iVar2 + 1;\n    if (param_4 != 0) {\n      uVar3 = uVar4;\n      if (param_4 < uVar4) {\n        uVar3 = param_4 - 1;\n        *(undefined1 *)(param_3 + uVar3) = 0;\n      }\n      (*(code *)PTR_memcpy_0003d34c)(param_3,uVar1,uVar3);\n    }\n    return uVar4;\n  }\n  uVar4 = (*(code *)PTR_abort_0003d264)();\n  return uVar4;\n}" type_identifier (function_declarator "FUN_00029638(uint param_1,undefined4 param_2,int param_3,uint param_4)" identifier (parameter_list "(uint param_1,undefined4 param_2,int param_3,uint param_4)" ( (parameter_declaration "uint param_1" type_identifier identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "int param_3" primitive_type identifier) , (parameter_declaration "uint param_4" type_identifier identifier) ))) (compound_statement "{\n  undefined4 uVar1;\n  int iVar2;\n  uint uVar3;\n  uint uVar4;\n  \n  if (param_1 < 0x11) {\n    uVar1 = (*(code *)PTR_dcgettext_0003d334)\n                      (0,PTR_DAT_0003d148 +\n                         *(int *)(PTR_DAT_0003d148 + param_1 * 4 + -0x355c) + -0x3518,5);\n    iVar2 = (*(code *)PTR_strlen_0003d2e4)(uVar1);\n    uVar4 = iVar2 + 1;\n    if (param_4 != 0) {\n      uVar3 = uVar4;\n      if (param_4 < uVar4) {\n        uVar3 = param_4 - 1;\n        *(undefined1 *)(param_3 + uVar3) = 0;\n      }\n      (*(code *)PTR_memcpy_0003d34c)(param_3,uVar1,uVar3);\n    }\n    return uVar4;\n  }\n  uVar4 = (*(code *)PTR_abort_0003d264)();\n  return uVar4;\n}" { (declaration "undefined4 uVar1;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "uint uVar4;" type_identifier identifier ;) (if_statement "if (param_1 < 0x11) {\n    uVar1 = (*(code *)PTR_dcgettext_0003d334)\n                      (0,PTR_DAT_0003d148 +\n                         *(int *)(PTR_DAT_0003d148 + param_1 * 4 + -0x355c) + -0x3518,5);\n    iVar2 = (*(code *)PTR_strlen_0003d2e4)(uVar1);\n    uVar4 = iVar2 + 1;\n    if (param_4 != 0) {\n      uVar3 = uVar4;\n      if (param_4 < uVar4) {\n        uVar3 = param_4 - 1;\n        *(undefined1 *)(param_3 + uVar3) = 0;\n      }\n      (*(code *)PTR_memcpy_0003d34c)(param_3,uVar1,uVar3);\n    }\n    return uVar4;\n  }" if (parenthesized_expression "(param_1 < 0x11)" ( (binary_expression "param_1 < 0x11" identifier < number_literal) )) (compound_statement "{\n    uVar1 = (*(code *)PTR_dcgettext_0003d334)\n                      (0,PTR_DAT_0003d148 +\n                         *(int *)(PTR_DAT_0003d148 + param_1 * 4 + -0x355c) + -0x3518,5);\n    iVar2 = (*(code *)PTR_strlen_0003d2e4)(uVar1);\n    uVar4 = iVar2 + 1;\n    if (param_4 != 0) {\n      uVar3 = uVar4;\n      if (param_4 < uVar4) {\n        uVar3 = param_4 - 1;\n        *(undefined1 *)(param_3 + uVar3) = 0;\n      }\n      (*(code *)PTR_memcpy_0003d34c)(param_3,uVar1,uVar3);\n    }\n    return uVar4;\n  }" { (expression_statement "uVar1 = (*(code *)PTR_dcgettext_0003d334)\n                      (0,PTR_DAT_0003d148 +\n                         *(int *)(PTR_DAT_0003d148 + param_1 * 4 + -0x355c) + -0x3518,5);" (assignment_expression "uVar1 = (*(code *)PTR_dcgettext_0003d334)\n                      (0,PTR_DAT_0003d148 +\n                         *(int *)(PTR_DAT_0003d148 + param_1 * 4 + -0x355c) + -0x3518,5)" identifier = (call_expression "(*(code *)PTR_dcgettext_0003d334)\n                      (0,PTR_DAT_0003d148 +\n                         *(int *)(PTR_DAT_0003d148 + param_1 * 4 + -0x355c) + -0x3518,5)" (parenthesized_expression "(*(code *)PTR_dcgettext_0003d334)" ( (pointer_expression "*(code *)PTR_dcgettext_0003d334" * (cast_expression "(code *)PTR_dcgettext_0003d334" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(0,PTR_DAT_0003d148 +\n                         *(int *)(PTR_DAT_0003d148 + param_1 * 4 + -0x355c) + -0x3518,5)" ( number_literal , (binary_expression "PTR_DAT_0003d148 +\n                         *(int *)(PTR_DAT_0003d148 + param_1 * 4 + -0x355c) + -0x3518" (binary_expression "PTR_DAT_0003d148 +\n                         *(int *)(PTR_DAT_0003d148 + param_1 * 4 + -0x355c)" identifier + (pointer_expression "*(int *)(PTR_DAT_0003d148 + param_1 * 4 + -0x355c)" * (cast_expression "(int *)(PTR_DAT_0003d148 + param_1 * 4 + -0x355c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(PTR_DAT_0003d148 + param_1 * 4 + -0x355c)" ( (binary_expression "PTR_DAT_0003d148 + param_1 * 4 + -0x355c" (binary_expression "PTR_DAT_0003d148 + param_1 * 4" identifier + (binary_expression "param_1 * 4" identifier * number_literal)) + number_literal) ))))) + number_literal) , number_literal )))) ;) (expression_statement "iVar2 = (*(code *)PTR_strlen_0003d2e4)(uVar1);" (assignment_expression "iVar2 = (*(code *)PTR_strlen_0003d2e4)(uVar1)" identifier = (call_expression "(*(code *)PTR_strlen_0003d2e4)(uVar1)" (parenthesized_expression "(*(code *)PTR_strlen_0003d2e4)" ( (pointer_expression "*(code *)PTR_strlen_0003d2e4" * (cast_expression "(code *)PTR_strlen_0003d2e4" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(uVar1)" ( identifier )))) ;) (expression_statement "uVar4 = iVar2 + 1;" (assignment_expression "uVar4 = iVar2 + 1" identifier = (binary_expression "iVar2 + 1" identifier + number_literal)) ;) (if_statement "if (param_4 != 0) {\n      uVar3 = uVar4;\n      if (param_4 < uVar4) {\n        uVar3 = param_4 - 1;\n        *(undefined1 *)(param_3 + uVar3) = 0;\n      }\n      (*(code *)PTR_memcpy_0003d34c)(param_3,uVar1,uVar3);\n    }" if (parenthesized_expression "(param_4 != 0)" ( (binary_expression "param_4 != 0" identifier != number_literal) )) (compound_statement "{\n      uVar3 = uVar4;\n      if (param_4 < uVar4) {\n        uVar3 = param_4 - 1;\n        *(undefined1 *)(param_3 + uVar3) = 0;\n      }\n      (*(code *)PTR_memcpy_0003d34c)(param_3,uVar1,uVar3);\n    }" { (expression_statement "uVar3 = uVar4;" (assignment_expression "uVar3 = uVar4" identifier = identifier) ;) (if_statement "if (param_4 < uVar4) {\n        uVar3 = param_4 - 1;\n        *(undefined1 *)(param_3 + uVar3) = 0;\n      }" if (parenthesized_expression "(param_4 < uVar4)" ( (binary_expression "param_4 < uVar4" identifier < identifier) )) (compound_statement "{\n        uVar3 = param_4 - 1;\n        *(undefined1 *)(param_3 + uVar3) = 0;\n      }" { (expression_statement "uVar3 = param_4 - 1;" (assignment_expression "uVar3 = param_4 - 1" identifier = (binary_expression "param_4 - 1" identifier - number_literal)) ;) (expression_statement "*(undefined1 *)(param_3 + uVar3) = 0;" (assignment_expression "*(undefined1 *)(param_3 + uVar3) = 0" (pointer_expression "*(undefined1 *)(param_3 + uVar3)" * (cast_expression "(undefined1 *)(param_3 + uVar3)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + uVar3)" ( (binary_expression "param_3 + uVar3" identifier + identifier) )))) = number_literal) ;) })) (expression_statement "(*(code *)PTR_memcpy_0003d34c)(param_3,uVar1,uVar3);" (call_expression "(*(code *)PTR_memcpy_0003d34c)(param_3,uVar1,uVar3)" (parenthesized_expression "(*(code *)PTR_memcpy_0003d34c)" ( (pointer_expression "*(code *)PTR_memcpy_0003d34c" * (cast_expression "(code *)PTR_memcpy_0003d34c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_3,uVar1,uVar3)" ( identifier , identifier , identifier ))) ;) })) (return_statement "return uVar4;" return identifier ;) })) (expression_statement "uVar4 = (*(code *)PTR_abort_0003d264)();" (assignment_expression "uVar4 = (*(code *)PTR_abort_0003d264)()" identifier = (call_expression "(*(code *)PTR_abort_0003d264)()" (parenthesized_expression "(*(code *)PTR_abort_0003d264)" ( (pointer_expression "*(code *)PTR_abort_0003d264" * (cast_expression "(code *)PTR_abort_0003d264" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( )))) ;) (return_statement "return uVar4;" return identifier ;) })))
(translation_unit "size_t rpl_regerror(int errcode,regex_t *preg,char *errbuf,size_t errbuf_size)\n\n{\n  undefined4 uVar1;\n  int iVar2;\n  size_t sVar3;\n  uint uVar4;\n  uint uVar5;\n  \n  if ((uint)errcode < 0x11) {\n    uVar1 = (*(code *)PTR_dcgettext_0003d334)\n                      (0,PTR_DAT_0003d148 +\n                         *(int *)(PTR_DAT_0003d148 + errcode * 4 + -0x355c) + -0x3518,5);\n    iVar2 = (*(code *)PTR_strlen_0003d2e4)(uVar1);\n    uVar5 = iVar2 + 1;\n    if (errbuf_size != 0) {\n      uVar4 = uVar5;\n      if (errbuf_size < uVar5) {\n        uVar4 = errbuf_size - 1;\n        errbuf[uVar4] = '\0';\n      }\n      (*(code *)PTR_memcpy_0003d34c)(errbuf,uVar1,uVar4);\n    }\n    return uVar5;\n  }\n  sVar3 = (*(code *)PTR_abort_0003d264)();\n  return sVar3;\n}\n\n" (function_definition "size_t rpl_regerror(int errcode,regex_t *preg,char *errbuf,size_t errbuf_size)\n\n{\n  undefined4 uVar1;\n  int iVar2;\n  size_t sVar3;\n  uint uVar4;\n  uint uVar5;\n  \n  if ((uint)errcode < 0x11) {\n    uVar1 = (*(code *)PTR_dcgettext_0003d334)\n                      (0,PTR_DAT_0003d148 +\n                         *(int *)(PTR_DAT_0003d148 + errcode * 4 + -0x355c) + -0x3518,5);\n    iVar2 = (*(code *)PTR_strlen_0003d2e4)(uVar1);\n    uVar5 = iVar2 + 1;\n    if (errbuf_size != 0) {\n      uVar4 = uVar5;\n      if (errbuf_size < uVar5) {\n        uVar4 = errbuf_size - 1;\n        errbuf[uVar4] = '\0';\n      }\n      (*(code *)PTR_memcpy_0003d34c)(errbuf,uVar1,uVar4);\n    }\n    return uVar5;\n  }\n  sVar3 = (*(code *)PTR_abort_0003d264)();\n  return sVar3;\n}" primitive_type (function_declarator "rpl_regerror(int errcode,regex_t *preg,char *errbuf,size_t errbuf_size)" identifier (parameter_list "(int errcode,regex_t *preg,char *errbuf,size_t errbuf_size)" ( (parameter_declaration "int errcode" primitive_type identifier) , (parameter_declaration "regex_t *preg" type_identifier (pointer_declarator "*preg" * identifier)) , (parameter_declaration "char *errbuf" primitive_type (pointer_declarator "*errbuf" * identifier)) , (parameter_declaration "size_t errbuf_size" primitive_type identifier) ))) (compound_statement "{\n  undefined4 uVar1;\n  int iVar2;\n  size_t sVar3;\n  uint uVar4;\n  uint uVar5;\n  \n  if ((uint)errcode < 0x11) {\n    uVar1 = (*(code *)PTR_dcgettext_0003d334)\n                      (0,PTR_DAT_0003d148 +\n                         *(int *)(PTR_DAT_0003d148 + errcode * 4 + -0x355c) + -0x3518,5);\n    iVar2 = (*(code *)PTR_strlen_0003d2e4)(uVar1);\n    uVar5 = iVar2 + 1;\n    if (errbuf_size != 0) {\n      uVar4 = uVar5;\n      if (errbuf_size < uVar5) {\n        uVar4 = errbuf_size - 1;\n        errbuf[uVar4] = '\0';\n      }\n      (*(code *)PTR_memcpy_0003d34c)(errbuf,uVar1,uVar4);\n    }\n    return uVar5;\n  }\n  sVar3 = (*(code *)PTR_abort_0003d264)();\n  return sVar3;\n}" { (declaration "undefined4 uVar1;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "size_t sVar3;" primitive_type identifier ;) (declaration "uint uVar4;" type_identifier identifier ;) (declaration "uint uVar5;" type_identifier identifier ;) (if_statement "if ((uint)errcode < 0x11) {\n    uVar1 = (*(code *)PTR_dcgettext_0003d334)\n                      (0,PTR_DAT_0003d148 +\n                         *(int *)(PTR_DAT_0003d148 + errcode * 4 + -0x355c) + -0x3518,5);\n    iVar2 = (*(code *)PTR_strlen_0003d2e4)(uVar1);\n    uVar5 = iVar2 + 1;\n    if (errbuf_size != 0) {\n      uVar4 = uVar5;\n      if (errbuf_size < uVar5) {\n        uVar4 = errbuf_size - 1;\n        errbuf[uVar4] = '\0';\n      }\n      (*(code *)PTR_memcpy_0003d34c)(errbuf,uVar1,uVar4);\n    }\n    return uVar5;\n  }" if (parenthesized_expression "((uint)errcode < 0x11)" ( (binary_expression "(uint)errcode < 0x11" (cast_expression "(uint)errcode" ( (type_descriptor "uint" type_identifier) ) identifier) < number_literal) )) (compound_statement "{\n    uVar1 = (*(code *)PTR_dcgettext_0003d334)\n                      (0,PTR_DAT_0003d148 +\n                         *(int *)(PTR_DAT_0003d148 + errcode * 4 + -0x355c) + -0x3518,5);\n    iVar2 = (*(code *)PTR_strlen_0003d2e4)(uVar1);\n    uVar5 = iVar2 + 1;\n    if (errbuf_size != 0) {\n      uVar4 = uVar5;\n      if (errbuf_size < uVar5) {\n        uVar4 = errbuf_size - 1;\n        errbuf[uVar4] = '\0';\n      }\n      (*(code *)PTR_memcpy_0003d34c)(errbuf,uVar1,uVar4);\n    }\n    return uVar5;\n  }" { (expression_statement "uVar1 = (*(code *)PTR_dcgettext_0003d334)\n                      (0,PTR_DAT_0003d148 +\n                         *(int *)(PTR_DAT_0003d148 + errcode * 4 + -0x355c) + -0x3518,5);" (assignment_expression "uVar1 = (*(code *)PTR_dcgettext_0003d334)\n                      (0,PTR_DAT_0003d148 +\n                         *(int *)(PTR_DAT_0003d148 + errcode * 4 + -0x355c) + -0x3518,5)" identifier = (call_expression "(*(code *)PTR_dcgettext_0003d334)\n                      (0,PTR_DAT_0003d148 +\n                         *(int *)(PTR_DAT_0003d148 + errcode * 4 + -0x355c) + -0x3518,5)" (parenthesized_expression "(*(code *)PTR_dcgettext_0003d334)" ( (pointer_expression "*(code *)PTR_dcgettext_0003d334" * (cast_expression "(code *)PTR_dcgettext_0003d334" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(0,PTR_DAT_0003d148 +\n                         *(int *)(PTR_DAT_0003d148 + errcode * 4 + -0x355c) + -0x3518,5)" ( number_literal , (binary_expression "PTR_DAT_0003d148 +\n                         *(int *)(PTR_DAT_0003d148 + errcode * 4 + -0x355c) + -0x3518" (binary_expression "PTR_DAT_0003d148 +\n                         *(int *)(PTR_DAT_0003d148 + errcode * 4 + -0x355c)" identifier + (pointer_expression "*(int *)(PTR_DAT_0003d148 + errcode * 4 + -0x355c)" * (cast_expression "(int *)(PTR_DAT_0003d148 + errcode * 4 + -0x355c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(PTR_DAT_0003d148 + errcode * 4 + -0x355c)" ( (binary_expression "PTR_DAT_0003d148 + errcode * 4 + -0x355c" (binary_expression "PTR_DAT_0003d148 + errcode * 4" identifier + (binary_expression "errcode * 4" identifier * number_literal)) + number_literal) ))))) + number_literal) , number_literal )))) ;) (expression_statement "iVar2 = (*(code *)PTR_strlen_0003d2e4)(uVar1);" (assignment_expression "iVar2 = (*(code *)PTR_strlen_0003d2e4)(uVar1)" identifier = (call_expression "(*(code *)PTR_strlen_0003d2e4)(uVar1)" (parenthesized_expression "(*(code *)PTR_strlen_0003d2e4)" ( (pointer_expression "*(code *)PTR_strlen_0003d2e4" * (cast_expression "(code *)PTR_strlen_0003d2e4" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(uVar1)" ( identifier )))) ;) (expression_statement "uVar5 = iVar2 + 1;" (assignment_expression "uVar5 = iVar2 + 1" identifier = (binary_expression "iVar2 + 1" identifier + number_literal)) ;) (if_statement "if (errbuf_size != 0) {\n      uVar4 = uVar5;\n      if (errbuf_size < uVar5) {\n        uVar4 = errbuf_size - 1;\n        errbuf[uVar4] = '\0';\n      }\n      (*(code *)PTR_memcpy_0003d34c)(errbuf,uVar1,uVar4);\n    }" if (parenthesized_expression "(errbuf_size != 0)" ( (binary_expression "errbuf_size != 0" identifier != number_literal) )) (compound_statement "{\n      uVar4 = uVar5;\n      if (errbuf_size < uVar5) {\n        uVar4 = errbuf_size - 1;\n        errbuf[uVar4] = '\0';\n      }\n      (*(code *)PTR_memcpy_0003d34c)(errbuf,uVar1,uVar4);\n    }" { (expression_statement "uVar4 = uVar5;" (assignment_expression "uVar4 = uVar5" identifier = identifier) ;) (if_statement "if (errbuf_size < uVar5) {\n        uVar4 = errbuf_size - 1;\n        errbuf[uVar4] = '\0';\n      }" if (parenthesized_expression "(errbuf_size < uVar5)" ( (binary_expression "errbuf_size < uVar5" identifier < identifier) )) (compound_statement "{\n        uVar4 = errbuf_size - 1;\n        errbuf[uVar4] = '\0';\n      }" { (expression_statement "uVar4 = errbuf_size - 1;" (assignment_expression "uVar4 = errbuf_size - 1" identifier = (binary_expression "errbuf_size - 1" identifier - number_literal)) ;) (expression_statement "errbuf[uVar4] = '\0';" (assignment_expression "errbuf[uVar4] = '\0'" (subscript_expression "errbuf[uVar4]" identifier [ identifier ]) = (char_literal "'\0'" ' escape_sequence ')) ;) })) (expression_statement "(*(code *)PTR_memcpy_0003d34c)(errbuf,uVar1,uVar4);" (call_expression "(*(code *)PTR_memcpy_0003d34c)(errbuf,uVar1,uVar4)" (parenthesized_expression "(*(code *)PTR_memcpy_0003d34c)" ( (pointer_expression "*(code *)PTR_memcpy_0003d34c" * (cast_expression "(code *)PTR_memcpy_0003d34c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(errbuf,uVar1,uVar4)" ( identifier , identifier , identifier ))) ;) })) (return_statement "return uVar5;" return identifier ;) })) (expression_statement "sVar3 = (*(code *)PTR_abort_0003d264)();" (assignment_expression "sVar3 = (*(code *)PTR_abort_0003d264)()" identifier = (call_expression "(*(code *)PTR_abort_0003d264)()" (parenthesized_expression "(*(code *)PTR_abort_0003d264)" ( (pointer_expression "*(code *)PTR_abort_0003d264" * (cast_expression "(code *)PTR_abort_0003d264" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( )))) ;) (return_statement "return sVar3;" return identifier ;) })))
(translation_unit "uint FUN_00029638(uint param_1,undefined4 param_2,int param_3,uint param_4)\n\n{\n  undefined4 uVar1;\n  int iVar2;\n  uint uVar3;\n  uint uVar4;\n  \n  if (param_1 < 0x11) {\n    uVar1 = (*(code *)PTR_dcgettext_0003d334)\n                      (0,PTR_DAT_0003d148 +\n                         *(int *)(PTR_DAT_0003d148 + param_1 * 4 + -0x355c) + -0x3518,5);\n    iVar2 = (*(code *)PTR_strlen_0003d2e4)(uVar1);\n    uVar4 = iVar2 + 1;\n    if (param_4 != 0) {\n      uVar3 = uVar4;\n      if (param_4 < uVar4) {\n        uVar3 = param_4 - 1;\n        *(undefined1 *)(param_3 + uVar3) = 0;\n      }\n      (*(code *)PTR_memcpy_0003d34c)(param_3,uVar1,uVar3);\n    }\n    return uVar4;\n  }\n  uVar4 = (*(code *)PTR_abort_0003d264)();\n  return uVar4;\n}\n\n" (function_definition "uint FUN_00029638(uint param_1,undefined4 param_2,int param_3,uint param_4)\n\n{\n  undefined4 uVar1;\n  int iVar2;\n  uint uVar3;\n  uint uVar4;\n  \n  if (param_1 < 0x11) {\n    uVar1 = (*(code *)PTR_dcgettext_0003d334)\n                      (0,PTR_DAT_0003d148 +\n                         *(int *)(PTR_DAT_0003d148 + param_1 * 4 + -0x355c) + -0x3518,5);\n    iVar2 = (*(code *)PTR_strlen_0003d2e4)(uVar1);\n    uVar4 = iVar2 + 1;\n    if (param_4 != 0) {\n      uVar3 = uVar4;\n      if (param_4 < uVar4) {\n        uVar3 = param_4 - 1;\n        *(undefined1 *)(param_3 + uVar3) = 0;\n      }\n      (*(code *)PTR_memcpy_0003d34c)(param_3,uVar1,uVar3);\n    }\n    return uVar4;\n  }\n  uVar4 = (*(code *)PTR_abort_0003d264)();\n  return uVar4;\n}" type_identifier (function_declarator "FUN_00029638(uint param_1,undefined4 param_2,int param_3,uint param_4)" identifier (parameter_list "(uint param_1,undefined4 param_2,int param_3,uint param_4)" ( (parameter_declaration "uint param_1" type_identifier identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "int param_3" primitive_type identifier) , (parameter_declaration "uint param_4" type_identifier identifier) ))) (compound_statement "{\n  undefined4 uVar1;\n  int iVar2;\n  uint uVar3;\n  uint uVar4;\n  \n  if (param_1 < 0x11) {\n    uVar1 = (*(code *)PTR_dcgettext_0003d334)\n                      (0,PTR_DAT_0003d148 +\n                         *(int *)(PTR_DAT_0003d148 + param_1 * 4 + -0x355c) + -0x3518,5);\n    iVar2 = (*(code *)PTR_strlen_0003d2e4)(uVar1);\n    uVar4 = iVar2 + 1;\n    if (param_4 != 0) {\n      uVar3 = uVar4;\n      if (param_4 < uVar4) {\n        uVar3 = param_4 - 1;\n        *(undefined1 *)(param_3 + uVar3) = 0;\n      }\n      (*(code *)PTR_memcpy_0003d34c)(param_3,uVar1,uVar3);\n    }\n    return uVar4;\n  }\n  uVar4 = (*(code *)PTR_abort_0003d264)();\n  return uVar4;\n}" { (declaration "undefined4 uVar1;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "uint uVar4;" type_identifier identifier ;) (if_statement "if (param_1 < 0x11) {\n    uVar1 = (*(code *)PTR_dcgettext_0003d334)\n                      (0,PTR_DAT_0003d148 +\n                         *(int *)(PTR_DAT_0003d148 + param_1 * 4 + -0x355c) + -0x3518,5);\n    iVar2 = (*(code *)PTR_strlen_0003d2e4)(uVar1);\n    uVar4 = iVar2 + 1;\n    if (param_4 != 0) {\n      uVar3 = uVar4;\n      if (param_4 < uVar4) {\n        uVar3 = param_4 - 1;\n        *(undefined1 *)(param_3 + uVar3) = 0;\n      }\n      (*(code *)PTR_memcpy_0003d34c)(param_3,uVar1,uVar3);\n    }\n    return uVar4;\n  }" if (parenthesized_expression "(param_1 < 0x11)" ( (binary_expression "param_1 < 0x11" identifier < number_literal) )) (compound_statement "{\n    uVar1 = (*(code *)PTR_dcgettext_0003d334)\n                      (0,PTR_DAT_0003d148 +\n                         *(int *)(PTR_DAT_0003d148 + param_1 * 4 + -0x355c) + -0x3518,5);\n    iVar2 = (*(code *)PTR_strlen_0003d2e4)(uVar1);\n    uVar4 = iVar2 + 1;\n    if (param_4 != 0) {\n      uVar3 = uVar4;\n      if (param_4 < uVar4) {\n        uVar3 = param_4 - 1;\n        *(undefined1 *)(param_3 + uVar3) = 0;\n      }\n      (*(code *)PTR_memcpy_0003d34c)(param_3,uVar1,uVar3);\n    }\n    return uVar4;\n  }" { (expression_statement "uVar1 = (*(code *)PTR_dcgettext_0003d334)\n                      (0,PTR_DAT_0003d148 +\n                         *(int *)(PTR_DAT_0003d148 + param_1 * 4 + -0x355c) + -0x3518,5);" (assignment_expression "uVar1 = (*(code *)PTR_dcgettext_0003d334)\n                      (0,PTR_DAT_0003d148 +\n                         *(int *)(PTR_DAT_0003d148 + param_1 * 4 + -0x355c) + -0x3518,5)" identifier = (call_expression "(*(code *)PTR_dcgettext_0003d334)\n                      (0,PTR_DAT_0003d148 +\n                         *(int *)(PTR_DAT_0003d148 + param_1 * 4 + -0x355c) + -0x3518,5)" (parenthesized_expression "(*(code *)PTR_dcgettext_0003d334)" ( (pointer_expression "*(code *)PTR_dcgettext_0003d334" * (cast_expression "(code *)PTR_dcgettext_0003d334" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(0,PTR_DAT_0003d148 +\n                         *(int *)(PTR_DAT_0003d148 + param_1 * 4 + -0x355c) + -0x3518,5)" ( number_literal , (binary_expression "PTR_DAT_0003d148 +\n                         *(int *)(PTR_DAT_0003d148 + param_1 * 4 + -0x355c) + -0x3518" (binary_expression "PTR_DAT_0003d148 +\n                         *(int *)(PTR_DAT_0003d148 + param_1 * 4 + -0x355c)" identifier + (pointer_expression "*(int *)(PTR_DAT_0003d148 + param_1 * 4 + -0x355c)" * (cast_expression "(int *)(PTR_DAT_0003d148 + param_1 * 4 + -0x355c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(PTR_DAT_0003d148 + param_1 * 4 + -0x355c)" ( (binary_expression "PTR_DAT_0003d148 + param_1 * 4 + -0x355c" (binary_expression "PTR_DAT_0003d148 + param_1 * 4" identifier + (binary_expression "param_1 * 4" identifier * number_literal)) + number_literal) ))))) + number_literal) , number_literal )))) ;) (expression_statement "iVar2 = (*(code *)PTR_strlen_0003d2e4)(uVar1);" (assignment_expression "iVar2 = (*(code *)PTR_strlen_0003d2e4)(uVar1)" identifier = (call_expression "(*(code *)PTR_strlen_0003d2e4)(uVar1)" (parenthesized_expression "(*(code *)PTR_strlen_0003d2e4)" ( (pointer_expression "*(code *)PTR_strlen_0003d2e4" * (cast_expression "(code *)PTR_strlen_0003d2e4" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(uVar1)" ( identifier )))) ;) (expression_statement "uVar4 = iVar2 + 1;" (assignment_expression "uVar4 = iVar2 + 1" identifier = (binary_expression "iVar2 + 1" identifier + number_literal)) ;) (if_statement "if (param_4 != 0) {\n      uVar3 = uVar4;\n      if (param_4 < uVar4) {\n        uVar3 = param_4 - 1;\n        *(undefined1 *)(param_3 + uVar3) = 0;\n      }\n      (*(code *)PTR_memcpy_0003d34c)(param_3,uVar1,uVar3);\n    }" if (parenthesized_expression "(param_4 != 0)" ( (binary_expression "param_4 != 0" identifier != number_literal) )) (compound_statement "{\n      uVar3 = uVar4;\n      if (param_4 < uVar4) {\n        uVar3 = param_4 - 1;\n        *(undefined1 *)(param_3 + uVar3) = 0;\n      }\n      (*(code *)PTR_memcpy_0003d34c)(param_3,uVar1,uVar3);\n    }" { (expression_statement "uVar3 = uVar4;" (assignment_expression "uVar3 = uVar4" identifier = identifier) ;) (if_statement "if (param_4 < uVar4) {\n        uVar3 = param_4 - 1;\n        *(undefined1 *)(param_3 + uVar3) = 0;\n      }" if (parenthesized_expression "(param_4 < uVar4)" ( (binary_expression "param_4 < uVar4" identifier < identifier) )) (compound_statement "{\n        uVar3 = param_4 - 1;\n        *(undefined1 *)(param_3 + uVar3) = 0;\n      }" { (expression_statement "uVar3 = param_4 - 1;" (assignment_expression "uVar3 = param_4 - 1" identifier = (binary_expression "param_4 - 1" identifier - number_literal)) ;) (expression_statement "*(undefined1 *)(param_3 + uVar3) = 0;" (assignment_expression "*(undefined1 *)(param_3 + uVar3) = 0" (pointer_expression "*(undefined1 *)(param_3 + uVar3)" * (cast_expression "(undefined1 *)(param_3 + uVar3)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + uVar3)" ( (binary_expression "param_3 + uVar3" identifier + identifier) )))) = number_literal) ;) })) (expression_statement "(*(code *)PTR_memcpy_0003d34c)(param_3,uVar1,uVar3);" (call_expression "(*(code *)PTR_memcpy_0003d34c)(param_3,uVar1,uVar3)" (parenthesized_expression "(*(code *)PTR_memcpy_0003d34c)" ( (pointer_expression "*(code *)PTR_memcpy_0003d34c" * (cast_expression "(code *)PTR_memcpy_0003d34c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_3,uVar1,uVar3)" ( identifier , identifier , identifier ))) ;) })) (return_statement "return uVar4;" return identifier ;) })) (expression_statement "uVar4 = (*(code *)PTR_abort_0003d264)();" (assignment_expression "uVar4 = (*(code *)PTR_abort_0003d264)()" identifier = (call_expression "(*(code *)PTR_abort_0003d264)()" (parenthesized_expression "(*(code *)PTR_abort_0003d264)" ( (pointer_expression "*(code *)PTR_abort_0003d264" * (cast_expression "(code *)PTR_abort_0003d264" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( )))) ;) (return_statement "return uVar4;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( LIT , (binary_expression (binary_expression IDENT + (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression IDENT + (binary_expression IDENT * LIT)) + LIT) ))))) + LIT) , LIT )))) ;) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT )))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT - LIT)) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + IDENT) )))) = LIT) ;) })) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT , IDENT , IDENT ))) ;) })) (return_statement return IDENT ;) })) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( )))) ;) (return_statement return IDENT ;) })))
(function_definition "uint FUN_00029638(uint param_1,undefined4 param_2,int param_3,uint param_4)\n\n{\n  undefined4 uVar1;\n  int iVar2;\n  uint uVar3;\n  uint uVar4;\n  \n  if (param_1 < 0x11) {\n    uVar1 = (*(code *)PTR_dcgettext_0003d334)\n                      (0,PTR_DAT_0003d148 +\n                         *(int *)(PTR_DAT_0003d148 + param_1 * 4 + -0x355c) + -0x3518,5);\n    iVar2 = (*(code *)PTR_strlen_0003d2e4)(uVar1);\n    uVar4 = iVar2 + 1;\n    if (param_4 != 0) {\n      uVar3 = uVar4;\n      if (param_4 < uVar4) {\n        uVar3 = param_4 - 1;\n        *(undefined1 *)(param_3 + uVar3) = 0;\n      }\n      (*(code *)PTR_memcpy_0003d34c)(param_3,uVar1,uVar3);\n    }\n    return uVar4;\n  }\n  uVar4 = (*(code *)PTR_abort_0003d264)();\n  return uVar4;\n}" (type_identifier "uint") (function_declarator "FUN_00029638(uint param_1,undefined4 param_2,int param_3,uint param_4)" (identifier "FUN_00029638") (parameter_list "(uint param_1,undefined4 param_2,int param_3,uint param_4)" (( "(") (parameter_declaration "uint param_1" (type_identifier "uint") (identifier "param_1")) (, ",") (parameter_declaration "undefined4 param_2" (type_identifier "undefined4") (identifier "param_2")) (, ",") (parameter_declaration "int param_3" (primitive_type "int") (identifier "param_3")) (, ",") (parameter_declaration "uint param_4" (type_identifier "uint") (identifier "param_4")) () ")"))) (compound_statement "{\n  undefined4 uVar1;\n  int iVar2;\n  uint uVar3;\n  uint uVar4;\n  \n  if (param_1 < 0x11) {\n    uVar1 = (*(code *)PTR_dcgettext_0003d334)\n                      (0,PTR_DAT_0003d148 +\n                         *(int *)(PTR_DAT_0003d148 + param_1 * 4 + -0x355c) + -0x3518,5);\n    iVar2 = (*(code *)PTR_strlen_0003d2e4)(uVar1);\n    uVar4 = iVar2 + 1;\n    if (param_4 != 0) {\n      uVar3 = uVar4;\n      if (param_4 < uVar4) {\n        uVar3 = param_4 - 1;\n        *(undefined1 *)(param_3 + uVar3) = 0;\n      }\n      (*(code *)PTR_memcpy_0003d34c)(param_3,uVar1,uVar3);\n    }\n    return uVar4;\n  }\n  uVar4 = (*(code *)PTR_abort_0003d264)();\n  return uVar4;\n}" ({ "{") (declaration "undefined4 uVar1;" (type_identifier "undefined4") (identifier "uVar1") (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "uint uVar3;" (type_identifier "uint") (identifier "uVar3") (; ";")) (declaration "uint uVar4;" (type_identifier "uint") (identifier "uVar4") (; ";")) (if_statement "if (param_1 < 0x11) {\n    uVar1 = (*(code *)PTR_dcgettext_0003d334)\n                      (0,PTR_DAT_0003d148 +\n                         *(int *)(PTR_DAT_0003d148 + param_1 * 4 + -0x355c) + -0x3518,5);\n    iVar2 = (*(code *)PTR_strlen_0003d2e4)(uVar1);\n    uVar4 = iVar2 + 1;\n    if (param_4 != 0) {\n      uVar3 = uVar4;\n      if (param_4 < uVar4) {\n        uVar3 = param_4 - 1;\n        *(undefined1 *)(param_3 + uVar3) = 0;\n      }\n      (*(code *)PTR_memcpy_0003d34c)(param_3,uVar1,uVar3);\n    }\n    return uVar4;\n  }" (if "if") (parenthesized_expression "(param_1 < 0x11)" (( "(") (binary_expression "param_1 < 0x11" (identifier "param_1") (< "<") (number_literal "0x11")) () ")")) (compound_statement "{\n    uVar1 = (*(code *)PTR_dcgettext_0003d334)\n                      (0,PTR_DAT_0003d148 +\n                         *(int *)(PTR_DAT_0003d148 + param_1 * 4 + -0x355c) + -0x3518,5);\n    iVar2 = (*(code *)PTR_strlen_0003d2e4)(uVar1);\n    uVar4 = iVar2 + 1;\n    if (param_4 != 0) {\n      uVar3 = uVar4;\n      if (param_4 < uVar4) {\n        uVar3 = param_4 - 1;\n        *(undefined1 *)(param_3 + uVar3) = 0;\n      }\n      (*(code *)PTR_memcpy_0003d34c)(param_3,uVar1,uVar3);\n    }\n    return uVar4;\n  }" ({ "{") (expression_statement "uVar1 = (*(code *)PTR_dcgettext_0003d334)\n                      (0,PTR_DAT_0003d148 +\n                         *(int *)(PTR_DAT_0003d148 + param_1 * 4 + -0x355c) + -0x3518,5);" (assignment_expression "uVar1 = (*(code *)PTR_dcgettext_0003d334)\n                      (0,PTR_DAT_0003d148 +\n                         *(int *)(PTR_DAT_0003d148 + param_1 * 4 + -0x355c) + -0x3518,5)" (identifier "uVar1") (= "=") (call_expression "(*(code *)PTR_dcgettext_0003d334)\n                      (0,PTR_DAT_0003d148 +\n                         *(int *)(PTR_DAT_0003d148 + param_1 * 4 + -0x355c) + -0x3518,5)" (parenthesized_expression "(*(code *)PTR_dcgettext_0003d334)" (( "(") (pointer_expression "*(code *)PTR_dcgettext_0003d334" (* "*") (cast_expression "(code *)PTR_dcgettext_0003d334" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_dcgettext_0003d334"))) () ")")) (argument_list "(0,PTR_DAT_0003d148 +\n                         *(int *)(PTR_DAT_0003d148 + param_1 * 4 + -0x355c) + -0x3518,5)" (( "(") (number_literal "0") (, ",") (binary_expression "PTR_DAT_0003d148 +\n                         *(int *)(PTR_DAT_0003d148 + param_1 * 4 + -0x355c) + -0x3518" (binary_expression "PTR_DAT_0003d148 +\n                         *(int *)(PTR_DAT_0003d148 + param_1 * 4 + -0x355c)" (identifier "PTR_DAT_0003d148") (+ "+") (pointer_expression "*(int *)(PTR_DAT_0003d148 + param_1 * 4 + -0x355c)" (* "*") (cast_expression "(int *)(PTR_DAT_0003d148 + param_1 * 4 + -0x355c)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(PTR_DAT_0003d148 + param_1 * 4 + -0x355c)" (( "(") (binary_expression "PTR_DAT_0003d148 + param_1 * 4 + -0x355c" (binary_expression "PTR_DAT_0003d148 + param_1 * 4" (identifier "PTR_DAT_0003d148") (+ "+") (binary_expression "param_1 * 4" (identifier "param_1") (* "*") (number_literal "4"))) (+ "+") (number_literal "-0x355c")) () ")"))))) (+ "+") (number_literal "-0x3518")) (, ",") (number_literal "5") () ")")))) (; ";")) (expression_statement "iVar2 = (*(code *)PTR_strlen_0003d2e4)(uVar1);" (assignment_expression "iVar2 = (*(code *)PTR_strlen_0003d2e4)(uVar1)" (identifier "iVar2") (= "=") (call_expression "(*(code *)PTR_strlen_0003d2e4)(uVar1)" (parenthesized_expression "(*(code *)PTR_strlen_0003d2e4)" (( "(") (pointer_expression "*(code *)PTR_strlen_0003d2e4" (* "*") (cast_expression "(code *)PTR_strlen_0003d2e4" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_strlen_0003d2e4"))) () ")")) (argument_list "(uVar1)" (( "(") (identifier "uVar1") () ")")))) (; ";")) (expression_statement "uVar4 = iVar2 + 1;" (assignment_expression "uVar4 = iVar2 + 1" (identifier "uVar4") (= "=") (binary_expression "iVar2 + 1" (identifier "iVar2") (+ "+") (number_literal "1"))) (; ";")) (if_statement "if (param_4 != 0) {\n      uVar3 = uVar4;\n      if (param_4 < uVar4) {\n        uVar3 = param_4 - 1;\n        *(undefined1 *)(param_3 + uVar3) = 0;\n      }\n      (*(code *)PTR_memcpy_0003d34c)(param_3,uVar1,uVar3);\n    }" (if "if") (parenthesized_expression "(param_4 != 0)" (( "(") (binary_expression "param_4 != 0" (identifier "param_4") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      uVar3 = uVar4;\n      if (param_4 < uVar4) {\n        uVar3 = param_4 - 1;\n        *(undefined1 *)(param_3 + uVar3) = 0;\n      }\n      (*(code *)PTR_memcpy_0003d34c)(param_3,uVar1,uVar3);\n    }" ({ "{") (expression_statement "uVar3 = uVar4;" (assignment_expression "uVar3 = uVar4" (identifier "uVar3") (= "=") (identifier "uVar4")) (; ";")) (if_statement "if (param_4 < uVar4) {\n        uVar3 = param_4 - 1;\n        *(undefined1 *)(param_3 + uVar3) = 0;\n      }" (if "if") (parenthesized_expression "(param_4 < uVar4)" (( "(") (binary_expression "param_4 < uVar4" (identifier "param_4") (< "<") (identifier "uVar4")) () ")")) (compound_statement "{\n        uVar3 = param_4 - 1;\n        *(undefined1 *)(param_3 + uVar3) = 0;\n      }" ({ "{") (expression_statement "uVar3 = param_4 - 1;" (assignment_expression "uVar3 = param_4 - 1" (identifier "uVar3") (= "=") (binary_expression "param_4 - 1" (identifier "param_4") (- "-") (number_literal "1"))) (; ";")) (expression_statement "*(undefined1 *)(param_3 + uVar3) = 0;" (assignment_expression "*(undefined1 *)(param_3 + uVar3) = 0" (pointer_expression "*(undefined1 *)(param_3 + uVar3)" (* "*") (cast_expression "(undefined1 *)(param_3 + uVar3)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_3 + uVar3)" (( "(") (binary_expression "param_3 + uVar3" (identifier "param_3") (+ "+") (identifier "uVar3")) () ")")))) (= "=") (number_literal "0")) (; ";")) (} "}"))) (expression_statement "(*(code *)PTR_memcpy_0003d34c)(param_3,uVar1,uVar3);" (call_expression "(*(code *)PTR_memcpy_0003d34c)(param_3,uVar1,uVar3)" (parenthesized_expression "(*(code *)PTR_memcpy_0003d34c)" (( "(") (pointer_expression "*(code *)PTR_memcpy_0003d34c" (* "*") (cast_expression "(code *)PTR_memcpy_0003d34c" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_memcpy_0003d34c"))) () ")")) (argument_list "(param_3,uVar1,uVar3)" (( "(") (identifier "param_3") (, ",") (identifier "uVar1") (, ",") (identifier "uVar3") () ")"))) (; ";")) (} "}"))) (return_statement "return uVar4;" (return "return") (identifier "uVar4") (; ";")) (} "}"))) (expression_statement "uVar4 = (*(code *)PTR_abort_0003d264)();" (assignment_expression "uVar4 = (*(code *)PTR_abort_0003d264)()" (identifier "uVar4") (= "=") (call_expression "(*(code *)PTR_abort_0003d264)()" (parenthesized_expression "(*(code *)PTR_abort_0003d264)" (( "(") (pointer_expression "*(code *)PTR_abort_0003d264" (* "*") (cast_expression "(code *)PTR_abort_0003d264" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_abort_0003d264"))) () ")")) (argument_list "()" (( "(") () ")")))) (; ";")) (return_statement "return uVar4;" (return "return") (identifier "uVar4") (; ";")) (} "}")))

size_t function_1(int var_2,type_1 *preg,char *errbuf,size_t var_4)

{
  type_2 uVar1;
  int var_3;
  size_t sVar3;
  type_3 uVar4;
  type_3 var_5;
  
  if ((type_3)var_2 < 0x11) {
    uVar1 = (*(type_4 *)PTR_dcgettext_0003d334)
                      (0,var_1 +
                         *(int *)(var_1 + var_2 * 4 + -0x355c) + -0x3518,5);
    var_3 = (*(type_4 *)PTR_strlen_0003d2e4)(uVar1);
    var_5 = var_3 + 1;
    if (var_4 != 0) {
      uVar4 = var_5;
      if (var_4 < var_5) {
        uVar4 = var_4 - 1;
        errbuf[uVar4] = '\0';
      }
      (*(type_4 *)PTR_memcpy_0003d34c)(errbuf,uVar1,uVar4);
    }
    return var_5;
  }
  sVar3 = (*(type_4 *)PTR_abort_0003d264)();
  return sVar3;
}


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

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

{
  undefined4 uVar1;
  int iVar2;
  uint uVar3;
  uint uVar4;
  
  if (param_1 < 0x11) {
    uVar1 = (*(code *)PTR_dcgettext_0003d334)
                      (0,PTR_DAT_0003d148 +
                         *(int *)(PTR_DAT_0003d148 + param_1 * 4 + -0x355c) + -0x3518,5);
    iVar2 = (*(code *)PTR_strlen_0003d2e4)(uVar1);
    uVar4 = iVar2 + 1;
    if (param_4 != 0) {
      uVar3 = uVar4;
      if (param_4 < uVar4) {
        uVar3 = param_4 - 1;
        *(undefined1 *)(param_3 + uVar3) = 0;
      }
      (*(code *)PTR_memcpy_0003d34c)(param_3,uVar1,uVar3);
    }
    return uVar4;
  }
  uVar4 = (*(code *)PTR_abort_0003d264)();
  return uVar4;
}

