
char * dupvprintf_inner(char *buf,int oldlen,int *oldsize,char *fmt,__va_list_tag *ap)

{
  long lVar1;
  int iVar2;
  int iVar3;
  int iVar4;
  long in_FS_OFFSET;
  va_list aq;
  
  lVar1 = *(long *)(in_FS_OFFSET + 0x28);
  iVar4 = *oldsize;
  if (iVar4 < oldlen) {
                    /* WARNING: Subroutine does not return */
    __assert_fail("*oldsize >= oldlen","misc.c",0x193,"dupvprintf_inner");
  }
  iVar3 = iVar4 - oldlen;
  if (iVar3 == 0) {
    iVar4 = oldlen + 0x200;
    buf = (char *)saferealloc(buf,(long)iVar4,1);
    iVar3 = 0x200;
  }
  while( true ) {
    aq[0].gp_offset = ap->gp_offset;
    aq[0].fp_offset = ap->fp_offset;
    aq[0].overflow_arg_area = ap->overflow_arg_area;
    aq[0].reg_save_area = ap->reg_save_area;
    iVar2 = __vsnprintf_chk(buf + oldlen,(long)iVar3,1,0xffffffffffffffff,fmt,aq);
    if ((-1 < iVar2) && (iVar2 < iVar3)) break;
    iVar3 = iVar3 + 0x200;
    if (0 < iVar2) {
      iVar3 = iVar2 + 1;
    }
    iVar4 = iVar3 + oldlen;
    buf = (char *)saferealloc(buf,(long)iVar4,1);
  }
  *oldsize = iVar4;
  if (lVar1 == *(long *)(in_FS_OFFSET + 0x28)) {
    return buf;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail();
}



long FUN_00121428(long param_1,int param_2,int *param_3,undefined8 param_4,undefined8 *param_5)

{
  int iVar1;
  int iVar2;
  int iVar3;
  long in_FS_OFFSET;
  undefined8 local_58;
  undefined8 uStack_50;
  undefined8 local_48;
  long local_40;
  
  local_40 = *(long *)(in_FS_OFFSET + 0x28);
  iVar3 = *param_3;
  if (iVar3 < param_2) {
                    /* WARNING: Subroutine does not return */
    __assert_fail("*oldsize >= oldlen","misc.c",0x193,"dupvprintf_inner");
  }
  iVar2 = iVar3 - param_2;
  if (iVar2 == 0) {
    iVar3 = param_2 + 0x200;
    param_1 = FUN_00121313(param_1,(long)iVar3,1,0);
    iVar2 = 0x200;
  }
  while( true ) {
    local_58 = *param_5;
    uStack_50 = param_5[1];
    local_48 = param_5[2];
    iVar1 = __vsnprintf_chk(param_2 + param_1,(long)iVar2,1,0xffffffffffffffff,param_4,&local_58);
    if ((-1 < iVar1) && (iVar1 < iVar2)) break;
    iVar2 = iVar2 + 0x200;
    if (0 < iVar1) {
      iVar2 = iVar1 + 1;
    }
    iVar3 = iVar2 + param_2;
    param_1 = FUN_00121313(param_1,(long)iVar3,1);
  }
  *param_3 = iVar3;
  if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {
    return param_1;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail();
}


PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x38
MOV qword ptr [RSP + 0x8],RDX
MOV qword ptr [RSP],RCX
MOV RCX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x28],RCX
XOR ECX,ECX
MOV R13D,dword ptr [RDX]
CMP R13D,ESI
JL 0x0012146e
MOV R12,RDI
MOV R14D,ESI
MOV R15,R8
MOV EBX,R13D
SUB EBX,ESI
JZ 0x0012148d
LEA RBP,[RSP + 0x10]
JMP 0x001214d0
LEA RCX,[0x173fb0]
MOV EDX,0x193
LEA RSI,[0x17922e]
LEA RDI,[0x173fe3]
CALL 0x0010f990
LEA R13D,[RSI + 0x200]
MOVSXD RSI,R13D
MOV EDX,0x1
CALL 0x00121313
MOV R12,RAX
MOV EBX,0x200
JMP 0x00121467
LEA EDX,[RAX + 0x1]
ADD EBX,0x200
TEST EAX,EAX
CMOVG EBX,EDX
LEA R13D,[RBX + R14*0x1]
MOVSXD RSI,R13D
MOV EDX,0x1
MOV RDI,R12
CALL 0x00121313
MOV R12,RAX
MOVDQU XMM0,xmmword ptr [R15]
MOVUPS xmmword ptr [RBP],XMM0
MOV RAX,qword ptr [R15 + 0x10]
MOV qword ptr [RBP + 0x10],RAX
MOVSXD RSI,EBX
MOVSXD RDI,R14D
ADD RDI,R12
MOV R9,RBP
MOV R8,qword ptr [RSP]
MOV RCX,-0x1
MOV EDX,0x1
CALL 0x0010fc20
TEST EAX,EAX
JS 0x001214ab
CMP EBX,EAX
JLE 0x001214ab
MOV RAX,qword ptr [RSP + 0x8]
MOV dword ptr [RAX],R13D
MOV RAX,R12
MOV RCX,qword ptr [RSP + 0x28]
XOR RCX,qword ptr FS:[0x28]
JNZ 0x00121534
ADD RSP,0x38
POP RBX
POP RBP
POP R12
POP R13
POP R14
POP R15
RET
CALL 0x00110180
(translation_unit "long FUN_00121428(long param_1,int param_2,int *param_3,undefined8 param_4,undefined8 *param_5)\n\n{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  long in_FS_OFFSET;\n  undefined8 local_58;\n  undefined8 uStack_50;\n  undefined8 local_48;\n  long local_40;\n  \n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  iVar3 = *param_3;\n  if (iVar3 < param_2) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("*oldsize >= oldlen","misc.c",0x193,"dupvprintf_inner");\n  }\n  iVar2 = iVar3 - param_2;\n  if (iVar2 == 0) {\n    iVar3 = param_2 + 0x200;\n    param_1 = FUN_00121313(param_1,(long)iVar3,1,0);\n    iVar2 = 0x200;\n  }\n  while( true ) {\n    local_58 = *param_5;\n    uStack_50 = param_5[1];\n    local_48 = param_5[2];\n    iVar1 = __vsnprintf_chk(param_2 + param_1,(long)iVar2,1,0xffffffffffffffff,param_4,&local_58);\n    if ((-1 < iVar1) && (iVar1 < iVar2)) break;\n    iVar2 = iVar2 + 0x200;\n    if (0 < iVar1) {\n      iVar2 = iVar1 + 1;\n    }\n    iVar3 = iVar2 + param_2;\n    param_1 = FUN_00121313(param_1,(long)iVar3,1);\n  }\n  *param_3 = iVar3;\n  if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return param_1;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail();\n}\n\n" (function_definition "long FUN_00121428(long param_1,int param_2,int *param_3,undefined8 param_4,undefined8 *param_5)\n\n{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  long in_FS_OFFSET;\n  undefined8 local_58;\n  undefined8 uStack_50;\n  undefined8 local_48;\n  long local_40;\n  \n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  iVar3 = *param_3;\n  if (iVar3 < param_2) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("*oldsize >= oldlen","misc.c",0x193,"dupvprintf_inner");\n  }\n  iVar2 = iVar3 - param_2;\n  if (iVar2 == 0) {\n    iVar3 = param_2 + 0x200;\n    param_1 = FUN_00121313(param_1,(long)iVar3,1,0);\n    iVar2 = 0x200;\n  }\n  while( true ) {\n    local_58 = *param_5;\n    uStack_50 = param_5[1];\n    local_48 = param_5[2];\n    iVar1 = __vsnprintf_chk(param_2 + param_1,(long)iVar2,1,0xffffffffffffffff,param_4,&local_58);\n    if ((-1 < iVar1) && (iVar1 < iVar2)) break;\n    iVar2 = iVar2 + 0x200;\n    if (0 < iVar1) {\n      iVar2 = iVar1 + 1;\n    }\n    iVar3 = iVar2 + param_2;\n    param_1 = FUN_00121313(param_1,(long)iVar3,1);\n  }\n  *param_3 = iVar3;\n  if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return param_1;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail();\n}" (sized_type_specifier "long" long) (function_declarator "FUN_00121428(long param_1,int param_2,int *param_3,undefined8 param_4,undefined8 *param_5)" identifier (parameter_list "(long param_1,int param_2,int *param_3,undefined8 param_4,undefined8 *param_5)" ( (parameter_declaration "long param_1" (sized_type_specifier "long" long) identifier) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "int *param_3" primitive_type (pointer_declarator "*param_3" * identifier)) , (parameter_declaration "undefined8 param_4" type_identifier identifier) , (parameter_declaration "undefined8 *param_5" type_identifier (pointer_declarator "*param_5" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  long in_FS_OFFSET;\n  undefined8 local_58;\n  undefined8 uStack_50;\n  undefined8 local_48;\n  long local_40;\n  \n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  iVar3 = *param_3;\n  if (iVar3 < param_2) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("*oldsize >= oldlen","misc.c",0x193,"dupvprintf_inner");\n  }\n  iVar2 = iVar3 - param_2;\n  if (iVar2 == 0) {\n    iVar3 = param_2 + 0x200;\n    param_1 = FUN_00121313(param_1,(long)iVar3,1,0);\n    iVar2 = 0x200;\n  }\n  while( true ) {\n    local_58 = *param_5;\n    uStack_50 = param_5[1];\n    local_48 = param_5[2];\n    iVar1 = __vsnprintf_chk(param_2 + param_1,(long)iVar2,1,0xffffffffffffffff,param_4,&local_58);\n    if ((-1 < iVar1) && (iVar1 < iVar2)) break;\n    iVar2 = iVar2 + 0x200;\n    if (0 < iVar1) {\n      iVar2 = iVar1 + 1;\n    }\n    iVar3 = iVar2 + param_2;\n    param_1 = FUN_00121313(param_1,(long)iVar3,1);\n  }\n  *param_3 = iVar3;\n  if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return param_1;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail();\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "long in_FS_OFFSET;" (sized_type_specifier "long" long) identifier ;) (declaration "undefined8 local_58;" type_identifier identifier ;) (declaration "undefined8 uStack_50;" type_identifier identifier ;) (declaration "undefined8 local_48;" type_identifier identifier ;) (declaration "long local_40;" (sized_type_specifier "long" long) identifier ;) (expression_statement "local_40 = *(long *)(in_FS_OFFSET + 0x28);" (assignment_expression "local_40 = *(long *)(in_FS_OFFSET + 0x28)" identifier = (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" * (cast_expression "(long *)(in_FS_OFFSET + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_FS_OFFSET + 0x28)" ( (binary_expression "in_FS_OFFSET + 0x28" identifier + number_literal) ))))) ;) (expression_statement "iVar3 = *param_3;" (assignment_expression "iVar3 = *param_3" identifier = (pointer_expression "*param_3" * identifier)) ;) (if_statement "if (iVar3 < param_2) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("*oldsize >= oldlen","misc.c",0x193,"dupvprintf_inner");\n  }" if (parenthesized_expression "(iVar3 < param_2)" ( (binary_expression "iVar3 < param_2" identifier < identifier) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("*oldsize >= oldlen","misc.c",0x193,"dupvprintf_inner");\n  }" { comment (expression_statement "__assert_fail("*oldsize >= oldlen","misc.c",0x193,"dupvprintf_inner");" (call_expression "__assert_fail("*oldsize >= oldlen","misc.c",0x193,"dupvprintf_inner")" identifier (argument_list "("*oldsize >= oldlen","misc.c",0x193,"dupvprintf_inner")" ( (string_literal ""*oldsize >= oldlen"" " string_content ") , (string_literal ""misc.c"" " string_content ") , number_literal , (string_literal ""dupvprintf_inner"" " string_content ") ))) ;) })) (expression_statement "iVar2 = iVar3 - param_2;" (assignment_expression "iVar2 = iVar3 - param_2" identifier = (binary_expression "iVar3 - param_2" identifier - identifier)) ;) (if_statement "if (iVar2 == 0) {\n    iVar3 = param_2 + 0x200;\n    param_1 = FUN_00121313(param_1,(long)iVar3,1,0);\n    iVar2 = 0x200;\n  }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n    iVar3 = param_2 + 0x200;\n    param_1 = FUN_00121313(param_1,(long)iVar3,1,0);\n    iVar2 = 0x200;\n  }" { (expression_statement "iVar3 = param_2 + 0x200;" (assignment_expression "iVar3 = param_2 + 0x200" identifier = (binary_expression "param_2 + 0x200" identifier + number_literal)) ;) (expression_statement "param_1 = FUN_00121313(param_1,(long)iVar3,1,0);" (assignment_expression "param_1 = FUN_00121313(param_1,(long)iVar3,1,0)" identifier = (call_expression "FUN_00121313(param_1,(long)iVar3,1,0)" identifier (argument_list "(param_1,(long)iVar3,1,0)" ( identifier , (cast_expression "(long)iVar3" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) , number_literal , number_literal )))) ;) (expression_statement "iVar2 = 0x200;" (assignment_expression "iVar2 = 0x200" identifier = number_literal) ;) })) (while_statement "while( true ) {\n    local_58 = *param_5;\n    uStack_50 = param_5[1];\n    local_48 = param_5[2];\n    iVar1 = __vsnprintf_chk(param_2 + param_1,(long)iVar2,1,0xffffffffffffffff,param_4,&local_58);\n    if ((-1 < iVar1) && (iVar1 < iVar2)) break;\n    iVar2 = iVar2 + 0x200;\n    if (0 < iVar1) {\n      iVar2 = iVar1 + 1;\n    }\n    iVar3 = iVar2 + param_2;\n    param_1 = FUN_00121313(param_1,(long)iVar3,1);\n  }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n    local_58 = *param_5;\n    uStack_50 = param_5[1];\n    local_48 = param_5[2];\n    iVar1 = __vsnprintf_chk(param_2 + param_1,(long)iVar2,1,0xffffffffffffffff,param_4,&local_58);\n    if ((-1 < iVar1) && (iVar1 < iVar2)) break;\n    iVar2 = iVar2 + 0x200;\n    if (0 < iVar1) {\n      iVar2 = iVar1 + 1;\n    }\n    iVar3 = iVar2 + param_2;\n    param_1 = FUN_00121313(param_1,(long)iVar3,1);\n  }" { (expression_statement "local_58 = *param_5;" (assignment_expression "local_58 = *param_5" identifier = (pointer_expression "*param_5" * identifier)) ;) (expression_statement "uStack_50 = param_5[1];" (assignment_expression "uStack_50 = param_5[1]" identifier = (subscript_expression "param_5[1]" identifier [ number_literal ])) ;) (expression_statement "local_48 = param_5[2];" (assignment_expression "local_48 = param_5[2]" identifier = (subscript_expression "param_5[2]" identifier [ number_literal ])) ;) (expression_statement "iVar1 = __vsnprintf_chk(param_2 + param_1,(long)iVar2,1,0xffffffffffffffff,param_4,&local_58);" (assignment_expression "iVar1 = __vsnprintf_chk(param_2 + param_1,(long)iVar2,1,0xffffffffffffffff,param_4,&local_58)" identifier = (call_expression "__vsnprintf_chk(param_2 + param_1,(long)iVar2,1,0xffffffffffffffff,param_4,&local_58)" identifier (argument_list "(param_2 + param_1,(long)iVar2,1,0xffffffffffffffff,param_4,&local_58)" ( (binary_expression "param_2 + param_1" identifier + identifier) , (cast_expression "(long)iVar2" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) , number_literal , number_literal , identifier , (pointer_expression "&local_58" & identifier) )))) ;) (if_statement "if ((-1 < iVar1) && (iVar1 < iVar2)) break;" if (parenthesized_expression "((-1 < iVar1) && (iVar1 < iVar2))" ( (binary_expression "(-1 < iVar1) && (iVar1 < iVar2)" (parenthesized_expression "(-1 < iVar1)" ( (binary_expression "-1 < iVar1" number_literal < identifier) )) && (parenthesized_expression "(iVar1 < iVar2)" ( (binary_expression "iVar1 < iVar2" identifier < identifier) ))) )) (break_statement "break;" break ;)) (expression_statement "iVar2 = iVar2 + 0x200;" (assignment_expression "iVar2 = iVar2 + 0x200" identifier = (binary_expression "iVar2 + 0x200" identifier + number_literal)) ;) (if_statement "if (0 < iVar1) {\n      iVar2 = iVar1 + 1;\n    }" if (parenthesized_expression "(0 < iVar1)" ( (binary_expression "0 < iVar1" number_literal < identifier) )) (compound_statement "{\n      iVar2 = iVar1 + 1;\n    }" { (expression_statement "iVar2 = iVar1 + 1;" (assignment_expression "iVar2 = iVar1 + 1" identifier = (binary_expression "iVar1 + 1" identifier + number_literal)) ;) })) (expression_statement "iVar3 = iVar2 + param_2;" (assignment_expression "iVar3 = iVar2 + param_2" identifier = (binary_expression "iVar2 + param_2" identifier + identifier)) ;) (expression_statement "param_1 = FUN_00121313(param_1,(long)iVar3,1);" (assignment_expression "param_1 = FUN_00121313(param_1,(long)iVar3,1)" identifier = (call_expression "FUN_00121313(param_1,(long)iVar3,1)" identifier (argument_list "(param_1,(long)iVar3,1)" ( identifier , (cast_expression "(long)iVar3" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) , number_literal )))) ;) })) (expression_statement "*param_3 = iVar3;" (assignment_expression "*param_3 = iVar3" (pointer_expression "*param_3" * identifier) = identifier) ;) (if_statement "if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return param_1;\n  }" if (parenthesized_expression "(local_40 == *(long *)(in_FS_OFFSET + 0x28))" ( (binary_expression "local_40 == *(long *)(in_FS_OFFSET + 0x28)" identifier == (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" * (cast_expression "(long *)(in_FS_OFFSET + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_FS_OFFSET + 0x28)" ( (binary_expression "in_FS_OFFSET + 0x28" identifier + number_literal) ))))) )) (compound_statement "{\n    return param_1;\n  }" { (return_statement "return param_1;" return identifier ;) })) comment (expression_statement "__stack_chk_fail();" (call_expression "__stack_chk_fail()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "char * dupvprintf_inner(char *buf,int oldlen,int *oldsize,char *fmt,__va_list_tag *ap)\n\n{\n  long lVar1;\n  int iVar2;\n  int iVar3;\n  int iVar4;\n  long in_FS_OFFSET;\n  va_list aq;\n  \n  lVar1 = *(long *)(in_FS_OFFSET + 0x28);\n  iVar4 = *oldsize;\n  if (iVar4 < oldlen) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("*oldsize >= oldlen","misc.c",0x193,"dupvprintf_inner");\n  }\n  iVar3 = iVar4 - oldlen;\n  if (iVar3 == 0) {\n    iVar4 = oldlen + 0x200;\n    buf = (char *)saferealloc(buf,(long)iVar4,1);\n    iVar3 = 0x200;\n  }\n  while( true ) {\n    aq[0].gp_offset = ap->gp_offset;\n    aq[0].fp_offset = ap->fp_offset;\n    aq[0].overflow_arg_area = ap->overflow_arg_area;\n    aq[0].reg_save_area = ap->reg_save_area;\n    iVar2 = __vsnprintf_chk(buf + oldlen,(long)iVar3,1,0xffffffffffffffff,fmt,aq);\n    if ((-1 < iVar2) && (iVar2 < iVar3)) break;\n    iVar3 = iVar3 + 0x200;\n    if (0 < iVar2) {\n      iVar3 = iVar2 + 1;\n    }\n    iVar4 = iVar3 + oldlen;\n    buf = (char *)saferealloc(buf,(long)iVar4,1);\n  }\n  *oldsize = iVar4;\n  if (lVar1 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return buf;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail();\n}\n\n" (function_definition "char * dupvprintf_inner(char *buf,int oldlen,int *oldsize,char *fmt,__va_list_tag *ap)\n\n{\n  long lVar1;\n  int iVar2;\n  int iVar3;\n  int iVar4;\n  long in_FS_OFFSET;\n  va_list aq;\n  \n  lVar1 = *(long *)(in_FS_OFFSET + 0x28);\n  iVar4 = *oldsize;\n  if (iVar4 < oldlen) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("*oldsize >= oldlen","misc.c",0x193,"dupvprintf_inner");\n  }\n  iVar3 = iVar4 - oldlen;\n  if (iVar3 == 0) {\n    iVar4 = oldlen + 0x200;\n    buf = (char *)saferealloc(buf,(long)iVar4,1);\n    iVar3 = 0x200;\n  }\n  while( true ) {\n    aq[0].gp_offset = ap->gp_offset;\n    aq[0].fp_offset = ap->fp_offset;\n    aq[0].overflow_arg_area = ap->overflow_arg_area;\n    aq[0].reg_save_area = ap->reg_save_area;\n    iVar2 = __vsnprintf_chk(buf + oldlen,(long)iVar3,1,0xffffffffffffffff,fmt,aq);\n    if ((-1 < iVar2) && (iVar2 < iVar3)) break;\n    iVar3 = iVar3 + 0x200;\n    if (0 < iVar2) {\n      iVar3 = iVar2 + 1;\n    }\n    iVar4 = iVar3 + oldlen;\n    buf = (char *)saferealloc(buf,(long)iVar4,1);\n  }\n  *oldsize = iVar4;\n  if (lVar1 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return buf;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail();\n}" primitive_type (pointer_declarator "* dupvprintf_inner(char *buf,int oldlen,int *oldsize,char *fmt,__va_list_tag *ap)" * (function_declarator "dupvprintf_inner(char *buf,int oldlen,int *oldsize,char *fmt,__va_list_tag *ap)" identifier (parameter_list "(char *buf,int oldlen,int *oldsize,char *fmt,__va_list_tag *ap)" ( (parameter_declaration "char *buf" primitive_type (pointer_declarator "*buf" * identifier)) , (parameter_declaration "int oldlen" primitive_type identifier) , (parameter_declaration "int *oldsize" primitive_type (pointer_declarator "*oldsize" * identifier)) , (parameter_declaration "char *fmt" primitive_type (pointer_declarator "*fmt" * identifier)) , (parameter_declaration "__va_list_tag *ap" type_identifier (pointer_declarator "*ap" * identifier)) )))) (compound_statement "{\n  long lVar1;\n  int iVar2;\n  int iVar3;\n  int iVar4;\n  long in_FS_OFFSET;\n  va_list aq;\n  \n  lVar1 = *(long *)(in_FS_OFFSET + 0x28);\n  iVar4 = *oldsize;\n  if (iVar4 < oldlen) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("*oldsize >= oldlen","misc.c",0x193,"dupvprintf_inner");\n  }\n  iVar3 = iVar4 - oldlen;\n  if (iVar3 == 0) {\n    iVar4 = oldlen + 0x200;\n    buf = (char *)saferealloc(buf,(long)iVar4,1);\n    iVar3 = 0x200;\n  }\n  while( true ) {\n    aq[0].gp_offset = ap->gp_offset;\n    aq[0].fp_offset = ap->fp_offset;\n    aq[0].overflow_arg_area = ap->overflow_arg_area;\n    aq[0].reg_save_area = ap->reg_save_area;\n    iVar2 = __vsnprintf_chk(buf + oldlen,(long)iVar3,1,0xffffffffffffffff,fmt,aq);\n    if ((-1 < iVar2) && (iVar2 < iVar3)) break;\n    iVar3 = iVar3 + 0x200;\n    if (0 < iVar2) {\n      iVar3 = iVar2 + 1;\n    }\n    iVar4 = iVar3 + oldlen;\n    buf = (char *)saferealloc(buf,(long)iVar4,1);\n  }\n  *oldsize = iVar4;\n  if (lVar1 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return buf;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail();\n}" { (declaration "long lVar1;" (sized_type_specifier "long" long) identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "long in_FS_OFFSET;" (sized_type_specifier "long" long) identifier ;) (declaration "va_list aq;" type_identifier identifier ;) (expression_statement "lVar1 = *(long *)(in_FS_OFFSET + 0x28);" (assignment_expression "lVar1 = *(long *)(in_FS_OFFSET + 0x28)" identifier = (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" * (cast_expression "(long *)(in_FS_OFFSET + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_FS_OFFSET + 0x28)" ( (binary_expression "in_FS_OFFSET + 0x28" identifier + number_literal) ))))) ;) (expression_statement "iVar4 = *oldsize;" (assignment_expression "iVar4 = *oldsize" identifier = (pointer_expression "*oldsize" * identifier)) ;) (if_statement "if (iVar4 < oldlen) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("*oldsize >= oldlen","misc.c",0x193,"dupvprintf_inner");\n  }" if (parenthesized_expression "(iVar4 < oldlen)" ( (binary_expression "iVar4 < oldlen" identifier < identifier) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("*oldsize >= oldlen","misc.c",0x193,"dupvprintf_inner");\n  }" { comment (expression_statement "__assert_fail("*oldsize >= oldlen","misc.c",0x193,"dupvprintf_inner");" (call_expression "__assert_fail("*oldsize >= oldlen","misc.c",0x193,"dupvprintf_inner")" identifier (argument_list "("*oldsize >= oldlen","misc.c",0x193,"dupvprintf_inner")" ( (string_literal ""*oldsize >= oldlen"" " string_content ") , (string_literal ""misc.c"" " string_content ") , number_literal , (string_literal ""dupvprintf_inner"" " string_content ") ))) ;) })) (expression_statement "iVar3 = iVar4 - oldlen;" (assignment_expression "iVar3 = iVar4 - oldlen" identifier = (binary_expression "iVar4 - oldlen" identifier - identifier)) ;) (if_statement "if (iVar3 == 0) {\n    iVar4 = oldlen + 0x200;\n    buf = (char *)saferealloc(buf,(long)iVar4,1);\n    iVar3 = 0x200;\n  }" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (compound_statement "{\n    iVar4 = oldlen + 0x200;\n    buf = (char *)saferealloc(buf,(long)iVar4,1);\n    iVar3 = 0x200;\n  }" { (expression_statement "iVar4 = oldlen + 0x200;" (assignment_expression "iVar4 = oldlen + 0x200" identifier = (binary_expression "oldlen + 0x200" identifier + number_literal)) ;) (expression_statement "buf = (char *)saferealloc(buf,(long)iVar4,1);" (assignment_expression "buf = (char *)saferealloc(buf,(long)iVar4,1)" identifier = (cast_expression "(char *)saferealloc(buf,(long)iVar4,1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "saferealloc(buf,(long)iVar4,1)" identifier (argument_list "(buf,(long)iVar4,1)" ( identifier , (cast_expression "(long)iVar4" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) , number_literal ))))) ;) (expression_statement "iVar3 = 0x200;" (assignment_expression "iVar3 = 0x200" identifier = number_literal) ;) })) (while_statement "while( true ) {\n    aq[0].gp_offset = ap->gp_offset;\n    aq[0].fp_offset = ap->fp_offset;\n    aq[0].overflow_arg_area = ap->overflow_arg_area;\n    aq[0].reg_save_area = ap->reg_save_area;\n    iVar2 = __vsnprintf_chk(buf + oldlen,(long)iVar3,1,0xffffffffffffffff,fmt,aq);\n    if ((-1 < iVar2) && (iVar2 < iVar3)) break;\n    iVar3 = iVar3 + 0x200;\n    if (0 < iVar2) {\n      iVar3 = iVar2 + 1;\n    }\n    iVar4 = iVar3 + oldlen;\n    buf = (char *)saferealloc(buf,(long)iVar4,1);\n  }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n    aq[0].gp_offset = ap->gp_offset;\n    aq[0].fp_offset = ap->fp_offset;\n    aq[0].overflow_arg_area = ap->overflow_arg_area;\n    aq[0].reg_save_area = ap->reg_save_area;\n    iVar2 = __vsnprintf_chk(buf + oldlen,(long)iVar3,1,0xffffffffffffffff,fmt,aq);\n    if ((-1 < iVar2) && (iVar2 < iVar3)) break;\n    iVar3 = iVar3 + 0x200;\n    if (0 < iVar2) {\n      iVar3 = iVar2 + 1;\n    }\n    iVar4 = iVar3 + oldlen;\n    buf = (char *)saferealloc(buf,(long)iVar4,1);\n  }" { (expression_statement "aq[0].gp_offset = ap->gp_offset;" (assignment_expression "aq[0].gp_offset = ap->gp_offset" (field_expression "aq[0].gp_offset" (subscript_expression "aq[0]" identifier [ number_literal ]) . field_identifier) = (field_expression "ap->gp_offset" identifier -> field_identifier)) ;) (expression_statement "aq[0].fp_offset = ap->fp_offset;" (assignment_expression "aq[0].fp_offset = ap->fp_offset" (field_expression "aq[0].fp_offset" (subscript_expression "aq[0]" identifier [ number_literal ]) . field_identifier) = (field_expression "ap->fp_offset" identifier -> field_identifier)) ;) (expression_statement "aq[0].overflow_arg_area = ap->overflow_arg_area;" (assignment_expression "aq[0].overflow_arg_area = ap->overflow_arg_area" (field_expression "aq[0].overflow_arg_area" (subscript_expression "aq[0]" identifier [ number_literal ]) . field_identifier) = (field_expression "ap->overflow_arg_area" identifier -> field_identifier)) ;) (expression_statement "aq[0].reg_save_area = ap->reg_save_area;" (assignment_expression "aq[0].reg_save_area = ap->reg_save_area" (field_expression "aq[0].reg_save_area" (subscript_expression "aq[0]" identifier [ number_literal ]) . field_identifier) = (field_expression "ap->reg_save_area" identifier -> field_identifier)) ;) (expression_statement "iVar2 = __vsnprintf_chk(buf + oldlen,(long)iVar3,1,0xffffffffffffffff,fmt,aq);" (assignment_expression "iVar2 = __vsnprintf_chk(buf + oldlen,(long)iVar3,1,0xffffffffffffffff,fmt,aq)" identifier = (call_expression "__vsnprintf_chk(buf + oldlen,(long)iVar3,1,0xffffffffffffffff,fmt,aq)" identifier (argument_list "(buf + oldlen,(long)iVar3,1,0xffffffffffffffff,fmt,aq)" ( (binary_expression "buf + oldlen" identifier + identifier) , (cast_expression "(long)iVar3" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) , number_literal , number_literal , identifier , identifier )))) ;) (if_statement "if ((-1 < iVar2) && (iVar2 < iVar3)) break;" if (parenthesized_expression "((-1 < iVar2) && (iVar2 < iVar3))" ( (binary_expression "(-1 < iVar2) && (iVar2 < iVar3)" (parenthesized_expression "(-1 < iVar2)" ( (binary_expression "-1 < iVar2" number_literal < identifier) )) && (parenthesized_expression "(iVar2 < iVar3)" ( (binary_expression "iVar2 < iVar3" identifier < identifier) ))) )) (break_statement "break;" break ;)) (expression_statement "iVar3 = iVar3 + 0x200;" (assignment_expression "iVar3 = iVar3 + 0x200" identifier = (binary_expression "iVar3 + 0x200" identifier + number_literal)) ;) (if_statement "if (0 < iVar2) {\n      iVar3 = iVar2 + 1;\n    }" if (parenthesized_expression "(0 < iVar2)" ( (binary_expression "0 < iVar2" number_literal < identifier) )) (compound_statement "{\n      iVar3 = iVar2 + 1;\n    }" { (expression_statement "iVar3 = iVar2 + 1;" (assignment_expression "iVar3 = iVar2 + 1" identifier = (binary_expression "iVar2 + 1" identifier + number_literal)) ;) })) (expression_statement "iVar4 = iVar3 + oldlen;" (assignment_expression "iVar4 = iVar3 + oldlen" identifier = (binary_expression "iVar3 + oldlen" identifier + identifier)) ;) (expression_statement "buf = (char *)saferealloc(buf,(long)iVar4,1);" (assignment_expression "buf = (char *)saferealloc(buf,(long)iVar4,1)" identifier = (cast_expression "(char *)saferealloc(buf,(long)iVar4,1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "saferealloc(buf,(long)iVar4,1)" identifier (argument_list "(buf,(long)iVar4,1)" ( identifier , (cast_expression "(long)iVar4" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) , number_literal ))))) ;) })) (expression_statement "*oldsize = iVar4;" (assignment_expression "*oldsize = iVar4" (pointer_expression "*oldsize" * identifier) = identifier) ;) (if_statement "if (lVar1 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return buf;\n  }" if (parenthesized_expression "(lVar1 == *(long *)(in_FS_OFFSET + 0x28))" ( (binary_expression "lVar1 == *(long *)(in_FS_OFFSET + 0x28)" identifier == (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" * (cast_expression "(long *)(in_FS_OFFSET + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_FS_OFFSET + 0x28)" ( (binary_expression "in_FS_OFFSET + 0x28" identifier + number_literal) ))))) )) (compound_statement "{\n    return buf;\n  }" { (return_statement "return buf;" return identifier ;) })) comment (expression_statement "__stack_chk_fail();" (call_expression "__stack_chk_fail()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "long FUN_00121428(long param_1,int param_2,int *param_3,undefined8 param_4,undefined8 *param_5)\n\n{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  long in_FS_OFFSET;\n  undefined8 local_58;\n  undefined8 uStack_50;\n  undefined8 local_48;\n  long local_40;\n  \n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  iVar3 = *param_3;\n  if (iVar3 < param_2) {\n                    \n    __assert_fail("*oldsize >= oldlen","misc.c",0x193,"dupvprintf_inner");\n  }\n  iVar2 = iVar3 - param_2;\n  if (iVar2 == 0) {\n    iVar3 = param_2 + 0x200;\n    param_1 = FUN_00121313(param_1,(long)iVar3,1,0);\n    iVar2 = 0x200;\n  }\n  while( true ) {\n    local_58 = *param_5;\n    uStack_50 = param_5[1];\n    local_48 = param_5[2];\n    iVar1 = __vsnprintf_chk(param_2 + param_1,(long)iVar2,1,0xffffffffffffffff,param_4,&local_58);\n    if ((-1 < iVar1) && (iVar1 < iVar2)) break;\n    iVar2 = iVar2 + 0x200;\n    if (0 < iVar1) {\n      iVar2 = iVar1 + 1;\n    }\n    iVar3 = iVar2 + param_2;\n    param_1 = FUN_00121313(param_1,(long)iVar3,1);\n  }\n  *param_3 = iVar3;\n  if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return param_1;\n  }\n                    \n  __stack_chk_fail();\n}\n\n" (function_definition "long FUN_00121428(long param_1,int param_2,int *param_3,undefined8 param_4,undefined8 *param_5)\n\n{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  long in_FS_OFFSET;\n  undefined8 local_58;\n  undefined8 uStack_50;\n  undefined8 local_48;\n  long local_40;\n  \n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  iVar3 = *param_3;\n  if (iVar3 < param_2) {\n                    \n    __assert_fail("*oldsize >= oldlen","misc.c",0x193,"dupvprintf_inner");\n  }\n  iVar2 = iVar3 - param_2;\n  if (iVar2 == 0) {\n    iVar3 = param_2 + 0x200;\n    param_1 = FUN_00121313(param_1,(long)iVar3,1,0);\n    iVar2 = 0x200;\n  }\n  while( true ) {\n    local_58 = *param_5;\n    uStack_50 = param_5[1];\n    local_48 = param_5[2];\n    iVar1 = __vsnprintf_chk(param_2 + param_1,(long)iVar2,1,0xffffffffffffffff,param_4,&local_58);\n    if ((-1 < iVar1) && (iVar1 < iVar2)) break;\n    iVar2 = iVar2 + 0x200;\n    if (0 < iVar1) {\n      iVar2 = iVar1 + 1;\n    }\n    iVar3 = iVar2 + param_2;\n    param_1 = FUN_00121313(param_1,(long)iVar3,1);\n  }\n  *param_3 = iVar3;\n  if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return param_1;\n  }\n                    \n  __stack_chk_fail();\n}" (sized_type_specifier "long" long) (function_declarator "FUN_00121428(long param_1,int param_2,int *param_3,undefined8 param_4,undefined8 *param_5)" identifier (parameter_list "(long param_1,int param_2,int *param_3,undefined8 param_4,undefined8 *param_5)" ( (parameter_declaration "long param_1" (sized_type_specifier "long" long) identifier) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "int *param_3" primitive_type (pointer_declarator "*param_3" * identifier)) , (parameter_declaration "undefined8 param_4" type_identifier identifier) , (parameter_declaration "undefined8 *param_5" type_identifier (pointer_declarator "*param_5" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  long in_FS_OFFSET;\n  undefined8 local_58;\n  undefined8 uStack_50;\n  undefined8 local_48;\n  long local_40;\n  \n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  iVar3 = *param_3;\n  if (iVar3 < param_2) {\n                    \n    __assert_fail("*oldsize >= oldlen","misc.c",0x193,"dupvprintf_inner");\n  }\n  iVar2 = iVar3 - param_2;\n  if (iVar2 == 0) {\n    iVar3 = param_2 + 0x200;\n    param_1 = FUN_00121313(param_1,(long)iVar3,1,0);\n    iVar2 = 0x200;\n  }\n  while( true ) {\n    local_58 = *param_5;\n    uStack_50 = param_5[1];\n    local_48 = param_5[2];\n    iVar1 = __vsnprintf_chk(param_2 + param_1,(long)iVar2,1,0xffffffffffffffff,param_4,&local_58);\n    if ((-1 < iVar1) && (iVar1 < iVar2)) break;\n    iVar2 = iVar2 + 0x200;\n    if (0 < iVar1) {\n      iVar2 = iVar1 + 1;\n    }\n    iVar3 = iVar2 + param_2;\n    param_1 = FUN_00121313(param_1,(long)iVar3,1);\n  }\n  *param_3 = iVar3;\n  if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return param_1;\n  }\n                    \n  __stack_chk_fail();\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "long in_FS_OFFSET;" (sized_type_specifier "long" long) identifier ;) (declaration "undefined8 local_58;" type_identifier identifier ;) (declaration "undefined8 uStack_50;" type_identifier identifier ;) (declaration "undefined8 local_48;" type_identifier identifier ;) (declaration "long local_40;" (sized_type_specifier "long" long) identifier ;) (expression_statement "local_40 = *(long *)(in_FS_OFFSET + 0x28);" (assignment_expression "local_40 = *(long *)(in_FS_OFFSET + 0x28)" identifier = (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" * (cast_expression "(long *)(in_FS_OFFSET + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_FS_OFFSET + 0x28)" ( (binary_expression "in_FS_OFFSET + 0x28" identifier + number_literal) ))))) ;) (expression_statement "iVar3 = *param_3;" (assignment_expression "iVar3 = *param_3" identifier = (pointer_expression "*param_3" * identifier)) ;) (if_statement "if (iVar3 < param_2) {\n                    \n    __assert_fail("*oldsize >= oldlen","misc.c",0x193,"dupvprintf_inner");\n  }" if (parenthesized_expression "(iVar3 < param_2)" ( (binary_expression "iVar3 < param_2" identifier < identifier) )) (compound_statement "{\n                    \n    __assert_fail("*oldsize >= oldlen","misc.c",0x193,"dupvprintf_inner");\n  }" { (expression_statement "__assert_fail("*oldsize >= oldlen","misc.c",0x193,"dupvprintf_inner");" (call_expression "__assert_fail("*oldsize >= oldlen","misc.c",0x193,"dupvprintf_inner")" identifier (argument_list "("*oldsize >= oldlen","misc.c",0x193,"dupvprintf_inner")" ( (string_literal ""*oldsize >= oldlen"" " string_content ") , (string_literal ""misc.c"" " string_content ") , number_literal , (string_literal ""dupvprintf_inner"" " string_content ") ))) ;) })) (expression_statement "iVar2 = iVar3 - param_2;" (assignment_expression "iVar2 = iVar3 - param_2" identifier = (binary_expression "iVar3 - param_2" identifier - identifier)) ;) (if_statement "if (iVar2 == 0) {\n    iVar3 = param_2 + 0x200;\n    param_1 = FUN_00121313(param_1,(long)iVar3,1,0);\n    iVar2 = 0x200;\n  }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n    iVar3 = param_2 + 0x200;\n    param_1 = FUN_00121313(param_1,(long)iVar3,1,0);\n    iVar2 = 0x200;\n  }" { (expression_statement "iVar3 = param_2 + 0x200;" (assignment_expression "iVar3 = param_2 + 0x200" identifier = (binary_expression "param_2 + 0x200" identifier + number_literal)) ;) (expression_statement "param_1 = FUN_00121313(param_1,(long)iVar3,1,0);" (assignment_expression "param_1 = FUN_00121313(param_1,(long)iVar3,1,0)" identifier = (call_expression "FUN_00121313(param_1,(long)iVar3,1,0)" identifier (argument_list "(param_1,(long)iVar3,1,0)" ( identifier , (cast_expression "(long)iVar3" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) , number_literal , number_literal )))) ;) (expression_statement "iVar2 = 0x200;" (assignment_expression "iVar2 = 0x200" identifier = number_literal) ;) })) (while_statement "while( true ) {\n    local_58 = *param_5;\n    uStack_50 = param_5[1];\n    local_48 = param_5[2];\n    iVar1 = __vsnprintf_chk(param_2 + param_1,(long)iVar2,1,0xffffffffffffffff,param_4,&local_58);\n    if ((-1 < iVar1) && (iVar1 < iVar2)) break;\n    iVar2 = iVar2 + 0x200;\n    if (0 < iVar1) {\n      iVar2 = iVar1 + 1;\n    }\n    iVar3 = iVar2 + param_2;\n    param_1 = FUN_00121313(param_1,(long)iVar3,1);\n  }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n    local_58 = *param_5;\n    uStack_50 = param_5[1];\n    local_48 = param_5[2];\n    iVar1 = __vsnprintf_chk(param_2 + param_1,(long)iVar2,1,0xffffffffffffffff,param_4,&local_58);\n    if ((-1 < iVar1) && (iVar1 < iVar2)) break;\n    iVar2 = iVar2 + 0x200;\n    if (0 < iVar1) {\n      iVar2 = iVar1 + 1;\n    }\n    iVar3 = iVar2 + param_2;\n    param_1 = FUN_00121313(param_1,(long)iVar3,1);\n  }" { (expression_statement "local_58 = *param_5;" (assignment_expression "local_58 = *param_5" identifier = (pointer_expression "*param_5" * identifier)) ;) (expression_statement "uStack_50 = param_5[1];" (assignment_expression "uStack_50 = param_5[1]" identifier = (subscript_expression "param_5[1]" identifier [ number_literal ])) ;) (expression_statement "local_48 = param_5[2];" (assignment_expression "local_48 = param_5[2]" identifier = (subscript_expression "param_5[2]" identifier [ number_literal ])) ;) (expression_statement "iVar1 = __vsnprintf_chk(param_2 + param_1,(long)iVar2,1,0xffffffffffffffff,param_4,&local_58);" (assignment_expression "iVar1 = __vsnprintf_chk(param_2 + param_1,(long)iVar2,1,0xffffffffffffffff,param_4,&local_58)" identifier = (call_expression "__vsnprintf_chk(param_2 + param_1,(long)iVar2,1,0xffffffffffffffff,param_4,&local_58)" identifier (argument_list "(param_2 + param_1,(long)iVar2,1,0xffffffffffffffff,param_4,&local_58)" ( (binary_expression "param_2 + param_1" identifier + identifier) , (cast_expression "(long)iVar2" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) , number_literal , number_literal , identifier , (pointer_expression "&local_58" & identifier) )))) ;) (if_statement "if ((-1 < iVar1) && (iVar1 < iVar2)) break;" if (parenthesized_expression "((-1 < iVar1) && (iVar1 < iVar2))" ( (binary_expression "(-1 < iVar1) && (iVar1 < iVar2)" (parenthesized_expression "(-1 < iVar1)" ( (binary_expression "-1 < iVar1" number_literal < identifier) )) && (parenthesized_expression "(iVar1 < iVar2)" ( (binary_expression "iVar1 < iVar2" identifier < identifier) ))) )) (break_statement "break;" break ;)) (expression_statement "iVar2 = iVar2 + 0x200;" (assignment_expression "iVar2 = iVar2 + 0x200" identifier = (binary_expression "iVar2 + 0x200" identifier + number_literal)) ;) (if_statement "if (0 < iVar1) {\n      iVar2 = iVar1 + 1;\n    }" if (parenthesized_expression "(0 < iVar1)" ( (binary_expression "0 < iVar1" number_literal < identifier) )) (compound_statement "{\n      iVar2 = iVar1 + 1;\n    }" { (expression_statement "iVar2 = iVar1 + 1;" (assignment_expression "iVar2 = iVar1 + 1" identifier = (binary_expression "iVar1 + 1" identifier + number_literal)) ;) })) (expression_statement "iVar3 = iVar2 + param_2;" (assignment_expression "iVar3 = iVar2 + param_2" identifier = (binary_expression "iVar2 + param_2" identifier + identifier)) ;) (expression_statement "param_1 = FUN_00121313(param_1,(long)iVar3,1);" (assignment_expression "param_1 = FUN_00121313(param_1,(long)iVar3,1)" identifier = (call_expression "FUN_00121313(param_1,(long)iVar3,1)" identifier (argument_list "(param_1,(long)iVar3,1)" ( identifier , (cast_expression "(long)iVar3" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) , number_literal )))) ;) })) (expression_statement "*param_3 = iVar3;" (assignment_expression "*param_3 = iVar3" (pointer_expression "*param_3" * identifier) = identifier) ;) (if_statement "if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return param_1;\n  }" if (parenthesized_expression "(local_40 == *(long *)(in_FS_OFFSET + 0x28))" ( (binary_expression "local_40 == *(long *)(in_FS_OFFSET + 0x28)" identifier == (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" * (cast_expression "(long *)(in_FS_OFFSET + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_FS_OFFSET + 0x28)" ( (binary_expression "in_FS_OFFSET + 0x28" identifier + number_literal) ))))) )) (compound_statement "{\n    return param_1;\n  }" { (return_statement "return param_1;" return identifier ;) })) (expression_statement "__stack_chk_fail();" (call_expression "__stack_chk_fail()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit (function_definition (sized_type_specifier long) (function_declarator IDENT (parameter_list ( (parameter_declaration (sized_type_specifier long) IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration (sized_type_specifier long) IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration (sized_type_specifier long) IDENT ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < IDENT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content ") , (string_literal " string_content ") , LIT , (string_literal " string_content ") ))) ;) })) (expression_statement (assignment_expression IDENT = (binary_expression IDENT - IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT) , LIT , LIT )))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) })) (while_statement while (parenthesized_expression ( BOOL )) (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (binary_expression IDENT + IDENT) , (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT) , LIT , LIT , IDENT , (pointer_expression & IDENT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression LIT < IDENT) )) && (parenthesized_expression ( (binary_expression IDENT < IDENT) ))) )) (break_statement break ;)) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) })) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + IDENT)) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT) , LIT )))) ;) })) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (return_statement return IDENT ;) })) (expression_statement (call_expression IDENT (argument_list ( ))) ;) })))
(function_definition "long FUN_00121428(long param_1,int param_2,int *param_3,undefined8 param_4,undefined8 *param_5)\n\n{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  long in_FS_OFFSET;\n  undefined8 local_58;\n  undefined8 uStack_50;\n  undefined8 local_48;\n  long local_40;\n  \n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  iVar3 = *param_3;\n  if (iVar3 < param_2) {\n                    \n    __assert_fail("*oldsize >= oldlen","misc.c",0x193,"dupvprintf_inner");\n  }\n  iVar2 = iVar3 - param_2;\n  if (iVar2 == 0) {\n    iVar3 = param_2 + 0x200;\n    param_1 = FUN_00121313(param_1,(long)iVar3,1,0);\n    iVar2 = 0x200;\n  }\n  while( true ) {\n    local_58 = *param_5;\n    uStack_50 = param_5[1];\n    local_48 = param_5[2];\n    iVar1 = __vsnprintf_chk(param_2 + param_1,(long)iVar2,1,0xffffffffffffffff,param_4,&local_58);\n    if ((-1 < iVar1) && (iVar1 < iVar2)) break;\n    iVar2 = iVar2 + 0x200;\n    if (0 < iVar1) {\n      iVar2 = iVar1 + 1;\n    }\n    iVar3 = iVar2 + param_2;\n    param_1 = FUN_00121313(param_1,(long)iVar3,1);\n  }\n  *param_3 = iVar3;\n  if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return param_1;\n  }\n                    \n  __stack_chk_fail();\n}" (sized_type_specifier "long" (long "long")) (function_declarator "FUN_00121428(long param_1,int param_2,int *param_3,undefined8 param_4,undefined8 *param_5)" (identifier "FUN_00121428") (parameter_list "(long param_1,int param_2,int *param_3,undefined8 param_4,undefined8 *param_5)" (( "(") (parameter_declaration "long param_1" (sized_type_specifier "long" (long "long")) (identifier "param_1")) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) (, ",") (parameter_declaration "int *param_3" (primitive_type "int") (pointer_declarator "*param_3" (* "*") (identifier "param_3"))) (, ",") (parameter_declaration "undefined8 param_4" (type_identifier "undefined8") (identifier "param_4")) (, ",") (parameter_declaration "undefined8 *param_5" (type_identifier "undefined8") (pointer_declarator "*param_5" (* "*") (identifier "param_5"))) () ")"))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  long in_FS_OFFSET;\n  undefined8 local_58;\n  undefined8 uStack_50;\n  undefined8 local_48;\n  long local_40;\n  \n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  iVar3 = *param_3;\n  if (iVar3 < param_2) {\n                    \n    __assert_fail("*oldsize >= oldlen","misc.c",0x193,"dupvprintf_inner");\n  }\n  iVar2 = iVar3 - param_2;\n  if (iVar2 == 0) {\n    iVar3 = param_2 + 0x200;\n    param_1 = FUN_00121313(param_1,(long)iVar3,1,0);\n    iVar2 = 0x200;\n  }\n  while( true ) {\n    local_58 = *param_5;\n    uStack_50 = param_5[1];\n    local_48 = param_5[2];\n    iVar1 = __vsnprintf_chk(param_2 + param_1,(long)iVar2,1,0xffffffffffffffff,param_4,&local_58);\n    if ((-1 < iVar1) && (iVar1 < iVar2)) break;\n    iVar2 = iVar2 + 0x200;\n    if (0 < iVar1) {\n      iVar2 = iVar1 + 1;\n    }\n    iVar3 = iVar2 + param_2;\n    param_1 = FUN_00121313(param_1,(long)iVar3,1);\n  }\n  *param_3 = iVar3;\n  if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return param_1;\n  }\n                    \n  __stack_chk_fail();\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (declaration "long in_FS_OFFSET;" (sized_type_specifier "long" (long "long")) (identifier "in_FS_OFFSET") (; ";")) (declaration "undefined8 local_58;" (type_identifier "undefined8") (identifier "local_58") (; ";")) (declaration "undefined8 uStack_50;" (type_identifier "undefined8") (identifier "uStack_50") (; ";")) (declaration "undefined8 local_48;" (type_identifier "undefined8") (identifier "local_48") (; ";")) (declaration "long local_40;" (sized_type_specifier "long" (long "long")) (identifier "local_40") (; ";")) (expression_statement "local_40 = *(long *)(in_FS_OFFSET + 0x28);" (assignment_expression "local_40 = *(long *)(in_FS_OFFSET + 0x28)" (identifier "local_40") (= "=") (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" (* "*") (cast_expression "(long *)(in_FS_OFFSET + 0x28)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_FS_OFFSET + 0x28)" (( "(") (binary_expression "in_FS_OFFSET + 0x28" (identifier "in_FS_OFFSET") (+ "+") (number_literal "0x28")) () ")"))))) (; ";")) (expression_statement "iVar3 = *param_3;" (assignment_expression "iVar3 = *param_3" (identifier "iVar3") (= "=") (pointer_expression "*param_3" (* "*") (identifier "param_3"))) (; ";")) (if_statement "if (iVar3 < param_2) {\n                    \n    __assert_fail("*oldsize >= oldlen","misc.c",0x193,"dupvprintf_inner");\n  }" (if "if") (parenthesized_expression "(iVar3 < param_2)" (( "(") (binary_expression "iVar3 < param_2" (identifier "iVar3") (< "<") (identifier "param_2")) () ")")) (compound_statement "{\n                    \n    __assert_fail("*oldsize >= oldlen","misc.c",0x193,"dupvprintf_inner");\n  }" ({ "{") (expression_statement "__assert_fail("*oldsize >= oldlen","misc.c",0x193,"dupvprintf_inner");" (call_expression "__assert_fail("*oldsize >= oldlen","misc.c",0x193,"dupvprintf_inner")" (identifier "__assert_fail") (argument_list "("*oldsize >= oldlen","misc.c",0x193,"dupvprintf_inner")" (( "(") (string_literal ""*oldsize >= oldlen"" (" """) (string_content "*oldsize >= oldlen") (" """)) (, ",") (string_literal ""misc.c"" (" """) (string_content "misc.c") (" """)) (, ",") (number_literal "0x193") (, ",") (string_literal ""dupvprintf_inner"" (" """) (string_content "dupvprintf_inner") (" """)) () ")"))) (; ";")) (} "}"))) (expression_statement "iVar2 = iVar3 - param_2;" (assignment_expression "iVar2 = iVar3 - param_2" (identifier "iVar2") (= "=") (binary_expression "iVar3 - param_2" (identifier "iVar3") (- "-") (identifier "param_2"))) (; ";")) (if_statement "if (iVar2 == 0) {\n    iVar3 = param_2 + 0x200;\n    param_1 = FUN_00121313(param_1,(long)iVar3,1,0);\n    iVar2 = 0x200;\n  }" (if "if") (parenthesized_expression "(iVar2 == 0)" (( "(") (binary_expression "iVar2 == 0" (identifier "iVar2") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    iVar3 = param_2 + 0x200;\n    param_1 = FUN_00121313(param_1,(long)iVar3,1,0);\n    iVar2 = 0x200;\n  }" ({ "{") (expression_statement "iVar3 = param_2 + 0x200;" (assignment_expression "iVar3 = param_2 + 0x200" (identifier "iVar3") (= "=") (binary_expression "param_2 + 0x200" (identifier "param_2") (+ "+") (number_literal "0x200"))) (; ";")) (expression_statement "param_1 = FUN_00121313(param_1,(long)iVar3,1,0);" (assignment_expression "param_1 = FUN_00121313(param_1,(long)iVar3,1,0)" (identifier "param_1") (= "=") (call_expression "FUN_00121313(param_1,(long)iVar3,1,0)" (identifier "FUN_00121313") (argument_list "(param_1,(long)iVar3,1,0)" (( "(") (identifier "param_1") (, ",") (cast_expression "(long)iVar3" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "iVar3")) (, ",") (number_literal "1") (, ",") (number_literal "0") () ")")))) (; ";")) (expression_statement "iVar2 = 0x200;" (assignment_expression "iVar2 = 0x200" (identifier "iVar2") (= "=") (number_literal "0x200")) (; ";")) (} "}"))) (while_statement "while( true ) {\n    local_58 = *param_5;\n    uStack_50 = param_5[1];\n    local_48 = param_5[2];\n    iVar1 = __vsnprintf_chk(param_2 + param_1,(long)iVar2,1,0xffffffffffffffff,param_4,&local_58);\n    if ((-1 < iVar1) && (iVar1 < iVar2)) break;\n    iVar2 = iVar2 + 0x200;\n    if (0 < iVar1) {\n      iVar2 = iVar1 + 1;\n    }\n    iVar3 = iVar2 + param_2;\n    param_1 = FUN_00121313(param_1,(long)iVar3,1);\n  }" (while "while") (parenthesized_expression "( true )" (( "(") (true "true") () ")")) (compound_statement "{\n    local_58 = *param_5;\n    uStack_50 = param_5[1];\n    local_48 = param_5[2];\n    iVar1 = __vsnprintf_chk(param_2 + param_1,(long)iVar2,1,0xffffffffffffffff,param_4,&local_58);\n    if ((-1 < iVar1) && (iVar1 < iVar2)) break;\n    iVar2 = iVar2 + 0x200;\n    if (0 < iVar1) {\n      iVar2 = iVar1 + 1;\n    }\n    iVar3 = iVar2 + param_2;\n    param_1 = FUN_00121313(param_1,(long)iVar3,1);\n  }" ({ "{") (expression_statement "local_58 = *param_5;" (assignment_expression "local_58 = *param_5" (identifier "local_58") (= "=") (pointer_expression "*param_5" (* "*") (identifier "param_5"))) (; ";")) (expression_statement "uStack_50 = param_5[1];" (assignment_expression "uStack_50 = param_5[1]" (identifier "uStack_50") (= "=") (subscript_expression "param_5[1]" (identifier "param_5") ([ "[") (number_literal "1") (] "]"))) (; ";")) (expression_statement "local_48 = param_5[2];" (assignment_expression "local_48 = param_5[2]" (identifier "local_48") (= "=") (subscript_expression "param_5[2]" (identifier "param_5") ([ "[") (number_literal "2") (] "]"))) (; ";")) (expression_statement "iVar1 = __vsnprintf_chk(param_2 + param_1,(long)iVar2,1,0xffffffffffffffff,param_4,&local_58);" (assignment_expression "iVar1 = __vsnprintf_chk(param_2 + param_1,(long)iVar2,1,0xffffffffffffffff,param_4,&local_58)" (identifier "iVar1") (= "=") (call_expression "__vsnprintf_chk(param_2 + param_1,(long)iVar2,1,0xffffffffffffffff,param_4,&local_58)" (identifier "__vsnprintf_chk") (argument_list "(param_2 + param_1,(long)iVar2,1,0xffffffffffffffff,param_4,&local_58)" (( "(") (binary_expression "param_2 + param_1" (identifier "param_2") (+ "+") (identifier "param_1")) (, ",") (cast_expression "(long)iVar2" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "iVar2")) (, ",") (number_literal "1") (, ",") (number_literal "0xffffffffffffffff") (, ",") (identifier "param_4") (, ",") (pointer_expression "&local_58" (& "&") (identifier "local_58")) () ")")))) (; ";")) (if_statement "if ((-1 < iVar1) && (iVar1 < iVar2)) break;" (if "if") (parenthesized_expression "((-1 < iVar1) && (iVar1 < iVar2))" (( "(") (binary_expression "(-1 < iVar1) && (iVar1 < iVar2)" (parenthesized_expression "(-1 < iVar1)" (( "(") (binary_expression "-1 < iVar1" (number_literal "-1") (< "<") (identifier "iVar1")) () ")")) (&& "&&") (parenthesized_expression "(iVar1 < iVar2)" (( "(") (binary_expression "iVar1 < iVar2" (identifier "iVar1") (< "<") (identifier "iVar2")) () ")"))) () ")")) (break_statement "break;" (break "break") (; ";"))) (expression_statement "iVar2 = iVar2 + 0x200;" (assignment_expression "iVar2 = iVar2 + 0x200" (identifier "iVar2") (= "=") (binary_expression "iVar2 + 0x200" (identifier "iVar2") (+ "+") (number_literal "0x200"))) (; ";")) (if_statement "if (0 < iVar1) {\n      iVar2 = iVar1 + 1;\n    }" (if "if") (parenthesized_expression "(0 < iVar1)" (( "(") (binary_expression "0 < iVar1" (number_literal "0") (< "<") (identifier "iVar1")) () ")")) (compound_statement "{\n      iVar2 = iVar1 + 1;\n    }" ({ "{") (expression_statement "iVar2 = iVar1 + 1;" (assignment_expression "iVar2 = iVar1 + 1" (identifier "iVar2") (= "=") (binary_expression "iVar1 + 1" (identifier "iVar1") (+ "+") (number_literal "1"))) (; ";")) (} "}"))) (expression_statement "iVar3 = iVar2 + param_2;" (assignment_expression "iVar3 = iVar2 + param_2" (identifier "iVar3") (= "=") (binary_expression "iVar2 + param_2" (identifier "iVar2") (+ "+") (identifier "param_2"))) (; ";")) (expression_statement "param_1 = FUN_00121313(param_1,(long)iVar3,1);" (assignment_expression "param_1 = FUN_00121313(param_1,(long)iVar3,1)" (identifier "param_1") (= "=") (call_expression "FUN_00121313(param_1,(long)iVar3,1)" (identifier "FUN_00121313") (argument_list "(param_1,(long)iVar3,1)" (( "(") (identifier "param_1") (, ",") (cast_expression "(long)iVar3" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "iVar3")) (, ",") (number_literal "1") () ")")))) (; ";")) (} "}"))) (expression_statement "*param_3 = iVar3;" (assignment_expression "*param_3 = iVar3" (pointer_expression "*param_3" (* "*") (identifier "param_3")) (= "=") (identifier "iVar3")) (; ";")) (if_statement "if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return param_1;\n  }" (if "if") (parenthesized_expression "(local_40 == *(long *)(in_FS_OFFSET + 0x28))" (( "(") (binary_expression "local_40 == *(long *)(in_FS_OFFSET + 0x28)" (identifier "local_40") (== "==") (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" (* "*") (cast_expression "(long *)(in_FS_OFFSET + 0x28)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_FS_OFFSET + 0x28)" (( "(") (binary_expression "in_FS_OFFSET + 0x28" (identifier "in_FS_OFFSET") (+ "+") (number_literal "0x28")) () ")"))))) () ")")) (compound_statement "{\n    return param_1;\n  }" ({ "{") (return_statement "return param_1;" (return "return") (identifier "param_1") (; ";")) (} "}"))) (expression_statement "__stack_chk_fail();" (call_expression "__stack_chk_fail()" (identifier "__stack_chk_fail") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")))

char * function_1(char *var_8,int var_3,int *oldsize,char *fmt,type_1 *ap)

{
  long var_10;
  int var_9;
  int var_5;
  int var_2;
  long var_1;
  type_2 aq;
  
  var_10 = *(long *)(var_1 + 0x28);
  var_2 = *oldsize;
  if (var_2 < var_3) {
                    /* WARNING: Subroutine does not return */
    var_4("*oldsize >= oldlen","misc.c",0x193,"dupvprintf_inner");
  }
  var_5 = var_2 - var_3;
  if (var_5 == 0) {
    var_2 = var_3 + 0x200;
    var_8 = (char *)var_6(var_8,(long)var_2,1);
    var_5 = 0x200;
  }
  while( true ) {
    aq[0].gp_offset = ap->gp_offset;
    aq[0].fp_offset = ap->fp_offset;
    aq[0].overflow_arg_area = ap->overflow_arg_area;
    aq[0].reg_save_area = ap->reg_save_area;
    var_9 = var_7(var_8 + var_3,(long)var_5,1,0xffffffffffffffff,fmt,aq);
    if ((-1 < var_9) && (var_9 < var_5)) break;
    var_5 = var_5 + 0x200;
    if (0 < var_9) {
      var_5 = var_9 + 1;
    }
    var_2 = var_5 + var_3;
    var_8 = (char *)var_6(var_8,(long)var_2,1);
  }
  *oldsize = var_2;
  if (var_10 == *(long *)(var_1 + 0x28)) {
    return var_8;
  }
                    /* WARNING: Subroutine does not return */
  var_11();
}


(translation_unit (function_definition type: (sized_type_specifier) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (sized_type_specifier) declarator: (identifier)) (parameter_declaration type: (primitive_type) declarator: (identifier)) (parameter_declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))))) body: (compound_statement (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (sized_type_specifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (sized_type_specifier) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (sized_type_specifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (string_literal (string_content)) (string_literal (string_content)) (number_literal) (string_literal (string_content))))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (cast_expression type: (type_descriptor type: (sized_type_specifier)) value: (identifier)) (number_literal) (number_literal))))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))))) (while_statement condition: (parenthesized_expression (true)) body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (subscript_expression argument: (identifier) index: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (subscript_expression argument: (identifier) index: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (identifier)) (cast_expression type: (type_descriptor type: (sized_type_specifier)) value: (identifier)) (number_literal) (number_literal) (identifier) (pointer_expression argument: (identifier)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (number_literal) right: (identifier))) right: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))))) consequence: (break_statement)) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (number_literal) right: (identifier))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (cast_expression type: (type_descriptor type: (sized_type_specifier)) value: (identifier)) (number_literal))))))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (sized_type_specifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) consequence: (compound_statement (return_statement (identifier)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list))))))

long MASKED(long param_1,int param_2,int *param_3,undefined8 param_4,undefined8 *param_5)

{
  int iVar1;
  int iVar2;
  int iVar3;
  long in_FS_OFFSET;
  undefined8 local_58;
  undefined8 uStack_50;
  undefined8 local_48;
  long local_40;
  
  local_40 = *(long *)(in_FS_OFFSET + 0x28);
  iVar3 = *param_3;
  if (iVar3 < param_2) {
                    /* WARNING: Subroutine does not return */
    __assert_fail("*oldsize >= oldlen","misc.c",0x193,"dupvprintf_inner");
  }
  iVar2 = iVar3 - param_2;
  if (iVar2 == 0) {
    iVar3 = param_2 + 0x200;
    param_1 = FUN_00121313(param_1,(long)iVar3,1,0);
    iVar2 = 0x200;
  }
  while( true ) {
    local_58 = *param_5;
    uStack_50 = param_5[1];
    local_48 = param_5[2];
    iVar1 = __vsnprintf_chk(param_2 + param_1,(long)iVar2,1,0xffffffffffffffff,param_4,&local_58);
    if ((-1 < iVar1) && (iVar1 < iVar2)) break;
    iVar2 = iVar2 + 0x200;
    if (0 < iVar1) {
      iVar2 = iVar1 + 1;
    }
    iVar3 = iVar2 + param_2;
    param_1 = FUN_00121313(param_1,(long)iVar3,1);
  }
  *param_3 = iVar3;
  if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {
    return param_1;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail();
}

