
/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */

int __regparm3 _argp_fmtstream_ensure(argp_fmtstream *fs,size_t amount)

{
  size_t sVar1;
  uint uVar2;
  char *pcVar3;
  int *piVar4;
  char *pcVar5;
  
  _argp_fmtstream_update(fs);
  sVar1 = fwrite_unlocked(fs->buf,1,(int)fs->p - (int)fs->buf,(FILE *)fs->stream);
  pcVar3 = fs->buf;
  if (sVar1 != (int)fs->p - (int)pcVar3) {
    pcVar5 = fs->p + -sVar1;
    fs->point_offs = fs->point_offs - sVar1;
    fs->p = pcVar5;
    memmove(pcVar3,pcVar3 + sVar1,(int)pcVar5 - (int)pcVar3);
    return 0;
  }
  fs->p = pcVar3;
  fs->point_offs = 0;
  uVar2 = (int)fs->end - (int)pcVar3;
  if (amount <= uVar2) {
    return 1;
  }
  if ((!CARRY4(amount,uVar2)) &&
     (pcVar3 = (char *)realloc(pcVar3,amount + uVar2), pcVar3 != (char *)0x0)) {
    fs->buf = pcVar3;
    fs->end = pcVar3 + amount + uVar2;
    fs->p = pcVar3;
    return 1;
  }
  piVar4 = __errno_location();
  *piVar4 = 0xc;
  return 0;
}



/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */

undefined4 __regparm3 FUN_000280f0(undefined4 *param_1,uint param_2)

{
  size_t sVar1;
  uint uVar2;
  void *pvVar3;
  int *piVar4;
  int iVar5;
  
  FUN_00027ad0(param_1);
  sVar1 = fwrite_unlocked((void *)param_1[6],1,param_1[7] - (int)param_1[6],(FILE *)*param_1);
  pvVar3 = (void *)param_1[6];
  if (sVar1 != param_1[7] - (int)pvVar3) {
    iVar5 = param_1[7] - sVar1;
    param_1[4] = param_1[4] - sVar1;
    param_1[7] = iVar5;
    memmove(pvVar3,(void *)(sVar1 + (int)pvVar3),iVar5 - (int)pvVar3);
    return 0;
  }
  param_1[7] = pvVar3;
  param_1[4] = 0;
  uVar2 = param_1[8] - (int)pvVar3;
  if (param_2 <= uVar2) {
    return 1;
  }
  if ((!CARRY4(param_2,uVar2)) && (pvVar3 = realloc(pvVar3,param_2 + uVar2), pvVar3 != (void *)0x0))
  {
    param_1[6] = pvVar3;
    param_1[8] = param_2 + uVar2 + (int)pvVar3;
    param_1[7] = pvVar3;
    return 1;
  }
  piVar4 = __errno_location();
  *piVar4 = 0xc;
  return 0;
}


PUSH EBP
PUSH EDI
MOV EDI,EDX
PUSH ESI
MOV ESI,EAX
PUSH EBX
CALL 0x00012800
ADD EBX,0xdd73
SUB ESP,0x18
PUSH EAX
CALL 0x00027ad0
MOV EDX,dword ptr [ESI + 0x18]
MOV EAX,dword ptr [ESI + 0x1c]
PUSH dword ptr [ESI]
SUB EAX,EDX
PUSH EAX
PUSH 0x1
PUSH EDX
CALL 0x00012330
MOV ECX,dword ptr [ESI + 0x1c]
MOV EDX,dword ptr [ESI + 0x18]
ADD ESP,0x20
MOV EBP,ECX
SUB EBP,EDX
CMP EAX,EBP
JNZ 0x00028170
MOV EAX,dword ptr [ESI + 0x20]
MOV dword ptr [ESI + 0x1c],EDX
MOV dword ptr [ESI + 0x10],0x0
SUB EAX,EDX
CMP EAX,EDI
JNC 0x00028163
ADD EDI,EAX
JC 0x00028198
SUB ESP,0x8
PUSH EDI
PUSH EDX
CALL 0x000121f0
ADD ESP,0x10
TEST EAX,EAX
JZ 0x00028198
ADD EDI,EAX
MOV dword ptr [ESI + 0x18],EAX
MOV dword ptr [ESI + 0x20],EDI
MOV dword ptr [ESI + 0x1c],EAX
ADD ESP,0xc
MOV EAX,0x1
POP EBX
POP ESI
POP EDI
POP EBP
RET
SUB ECX,EAX
SUB ESP,0x4
SUB dword ptr [ESI + 0x10],EAX
ADD EAX,EDX
MOV dword ptr [ESI + 0x1c],ECX
SUB ECX,EDX
PUSH ECX
PUSH EAX
PUSH EDX
CALL 0x000120a0
ADD ESP,0x10
XOR EAX,EAX
ADD ESP,0xc
POP EBX
POP ESI
POP EDI
POP EBP
RET
CALL 0x000122f0
MOV dword ptr [EAX],0xc
ADD ESP,0xc
XOR EAX,EAX
POP EBX
POP ESI
POP EDI
POP EBP
RET
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nundefined4 __regparm3 FUN_000280f0(undefined4 *param_1,uint param_2)\n\n{\n  size_t sVar1;\n  uint uVar2;\n  void *pvVar3;\n  int *piVar4;\n  int iVar5;\n  \n  FUN_00027ad0(param_1);\n  sVar1 = fwrite_unlocked((void *)param_1[6],1,param_1[7] - (int)param_1[6],(FILE *)*param_1);\n  pvVar3 = (void *)param_1[6];\n  if (sVar1 != param_1[7] - (int)pvVar3) {\n    iVar5 = param_1[7] - sVar1;\n    param_1[4] = param_1[4] - sVar1;\n    param_1[7] = iVar5;\n    memmove(pvVar3,(void *)(sVar1 + (int)pvVar3),iVar5 - (int)pvVar3);\n    return 0;\n  }\n  param_1[7] = pvVar3;\n  param_1[4] = 0;\n  uVar2 = param_1[8] - (int)pvVar3;\n  if (param_2 <= uVar2) {\n    return 1;\n  }\n  if ((!CARRY4(param_2,uVar2)) && (pvVar3 = realloc(pvVar3,param_2 + uVar2), pvVar3 != (void *)0x0))\n  {\n    param_1[6] = pvVar3;\n    param_1[8] = param_2 + uVar2 + (int)pvVar3;\n    param_1[7] = pvVar3;\n    return 1;\n  }\n  piVar4 = __errno_location();\n  *piVar4 = 0xc;\n  return 0;\n}\n\n" comment (function_definition "undefined4 __regparm3 FUN_000280f0(undefined4 *param_1,uint param_2)\n\n{\n  size_t sVar1;\n  uint uVar2;\n  void *pvVar3;\n  int *piVar4;\n  int iVar5;\n  \n  FUN_00027ad0(param_1);\n  sVar1 = fwrite_unlocked((void *)param_1[6],1,param_1[7] - (int)param_1[6],(FILE *)*param_1);\n  pvVar3 = (void *)param_1[6];\n  if (sVar1 != param_1[7] - (int)pvVar3) {\n    iVar5 = param_1[7] - sVar1;\n    param_1[4] = param_1[4] - sVar1;\n    param_1[7] = iVar5;\n    memmove(pvVar3,(void *)(sVar1 + (int)pvVar3),iVar5 - (int)pvVar3);\n    return 0;\n  }\n  param_1[7] = pvVar3;\n  param_1[4] = 0;\n  uVar2 = param_1[8] - (int)pvVar3;\n  if (param_2 <= uVar2) {\n    return 1;\n  }\n  if ((!CARRY4(param_2,uVar2)) && (pvVar3 = realloc(pvVar3,param_2 + uVar2), pvVar3 != (void *)0x0))\n  {\n    param_1[6] = pvVar3;\n    param_1[8] = param_2 + uVar2 + (int)pvVar3;\n    param_1[7] = pvVar3;\n    return 1;\n  }\n  piVar4 = __errno_location();\n  *piVar4 = 0xc;\n  return 0;\n}" type_identifier (ERROR "__regparm3" identifier) (function_declarator "FUN_000280f0(undefined4 *param_1,uint param_2)" identifier (parameter_list "(undefined4 *param_1,uint param_2)" ( (parameter_declaration "undefined4 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "uint param_2" type_identifier identifier) ))) (compound_statement "{\n  size_t sVar1;\n  uint uVar2;\n  void *pvVar3;\n  int *piVar4;\n  int iVar5;\n  \n  FUN_00027ad0(param_1);\n  sVar1 = fwrite_unlocked((void *)param_1[6],1,param_1[7] - (int)param_1[6],(FILE *)*param_1);\n  pvVar3 = (void *)param_1[6];\n  if (sVar1 != param_1[7] - (int)pvVar3) {\n    iVar5 = param_1[7] - sVar1;\n    param_1[4] = param_1[4] - sVar1;\n    param_1[7] = iVar5;\n    memmove(pvVar3,(void *)(sVar1 + (int)pvVar3),iVar5 - (int)pvVar3);\n    return 0;\n  }\n  param_1[7] = pvVar3;\n  param_1[4] = 0;\n  uVar2 = param_1[8] - (int)pvVar3;\n  if (param_2 <= uVar2) {\n    return 1;\n  }\n  if ((!CARRY4(param_2,uVar2)) && (pvVar3 = realloc(pvVar3,param_2 + uVar2), pvVar3 != (void *)0x0))\n  {\n    param_1[6] = pvVar3;\n    param_1[8] = param_2 + uVar2 + (int)pvVar3;\n    param_1[7] = pvVar3;\n    return 1;\n  }\n  piVar4 = __errno_location();\n  *piVar4 = 0xc;\n  return 0;\n}" { (declaration "size_t sVar1;" primitive_type identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "void *pvVar3;" primitive_type (pointer_declarator "*pvVar3" * identifier) ;) (declaration "int *piVar4;" primitive_type (pointer_declarator "*piVar4" * identifier) ;) (declaration "int iVar5;" primitive_type identifier ;) (expression_statement "FUN_00027ad0(param_1);" (call_expression "FUN_00027ad0(param_1)" identifier (argument_list "(param_1)" ( identifier ))) ;) (expression_statement "sVar1 = fwrite_unlocked((void *)param_1[6],1,param_1[7] - (int)param_1[6],(FILE *)*param_1);" (assignment_expression "sVar1 = fwrite_unlocked((void *)param_1[6],1,param_1[7] - (int)param_1[6],(FILE *)*param_1)" identifier = (call_expression "fwrite_unlocked((void *)param_1[6],1,param_1[7] - (int)param_1[6],(FILE *)*param_1)" identifier (argument_list "((void *)param_1[6],1,param_1[7] - (int)param_1[6],(FILE *)*param_1)" ( (cast_expression "(void *)param_1[6]" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (subscript_expression "param_1[6]" identifier [ number_literal ])) , number_literal , (binary_expression "param_1[7] - (int)param_1[6]" (subscript_expression "param_1[7]" identifier [ number_literal ]) - (cast_expression "(int)param_1[6]" ( (type_descriptor "int" primitive_type) ) (subscript_expression "param_1[6]" identifier [ number_literal ]))) , (cast_expression "(FILE *)*param_1" ( (type_descriptor "FILE *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier)) )))) ;) (expression_statement "pvVar3 = (void *)param_1[6];" (assignment_expression "pvVar3 = (void *)param_1[6]" identifier = (cast_expression "(void *)param_1[6]" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (subscript_expression "param_1[6]" identifier [ number_literal ]))) ;) (if_statement "if (sVar1 != param_1[7] - (int)pvVar3) {\n    iVar5 = param_1[7] - sVar1;\n    param_1[4] = param_1[4] - sVar1;\n    param_1[7] = iVar5;\n    memmove(pvVar3,(void *)(sVar1 + (int)pvVar3),iVar5 - (int)pvVar3);\n    return 0;\n  }" if (parenthesized_expression "(sVar1 != param_1[7] - (int)pvVar3)" ( (binary_expression "sVar1 != param_1[7] - (int)pvVar3" identifier != (binary_expression "param_1[7] - (int)pvVar3" (subscript_expression "param_1[7]" identifier [ number_literal ]) - (cast_expression "(int)pvVar3" ( (type_descriptor "int" primitive_type) ) identifier))) )) (compound_statement "{\n    iVar5 = param_1[7] - sVar1;\n    param_1[4] = param_1[4] - sVar1;\n    param_1[7] = iVar5;\n    memmove(pvVar3,(void *)(sVar1 + (int)pvVar3),iVar5 - (int)pvVar3);\n    return 0;\n  }" { (expression_statement "iVar5 = param_1[7] - sVar1;" (assignment_expression "iVar5 = param_1[7] - sVar1" identifier = (binary_expression "param_1[7] - sVar1" (subscript_expression "param_1[7]" identifier [ number_literal ]) - identifier)) ;) (expression_statement "param_1[4] = param_1[4] - sVar1;" (assignment_expression "param_1[4] = param_1[4] - sVar1" (subscript_expression "param_1[4]" identifier [ number_literal ]) = (binary_expression "param_1[4] - sVar1" (subscript_expression "param_1[4]" identifier [ number_literal ]) - identifier)) ;) (expression_statement "param_1[7] = iVar5;" (assignment_expression "param_1[7] = iVar5" (subscript_expression "param_1[7]" identifier [ number_literal ]) = identifier) ;) (expression_statement "memmove(pvVar3,(void *)(sVar1 + (int)pvVar3),iVar5 - (int)pvVar3);" (call_expression "memmove(pvVar3,(void *)(sVar1 + (int)pvVar3),iVar5 - (int)pvVar3)" identifier (argument_list "(pvVar3,(void *)(sVar1 + (int)pvVar3),iVar5 - (int)pvVar3)" ( identifier , (cast_expression "(void *)(sVar1 + (int)pvVar3)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(sVar1 + (int)pvVar3)" ( (binary_expression "sVar1 + (int)pvVar3" identifier + (cast_expression "(int)pvVar3" ( (type_descriptor "int" primitive_type) ) identifier)) ))) , (binary_expression "iVar5 - (int)pvVar3" identifier - (cast_expression "(int)pvVar3" ( (type_descriptor "int" primitive_type) ) identifier)) ))) ;) (return_statement "return 0;" return number_literal ;) })) (expression_statement "param_1[7] = pvVar3;" (assignment_expression "param_1[7] = pvVar3" (subscript_expression "param_1[7]" identifier [ number_literal ]) = identifier) ;) (expression_statement "param_1[4] = 0;" (assignment_expression "param_1[4] = 0" (subscript_expression "param_1[4]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "uVar2 = param_1[8] - (int)pvVar3;" (assignment_expression "uVar2 = param_1[8] - (int)pvVar3" identifier = (binary_expression "param_1[8] - (int)pvVar3" (subscript_expression "param_1[8]" identifier [ number_literal ]) - (cast_expression "(int)pvVar3" ( (type_descriptor "int" primitive_type) ) identifier))) ;) (if_statement "if (param_2 <= uVar2) {\n    return 1;\n  }" if (parenthesized_expression "(param_2 <= uVar2)" ( (binary_expression "param_2 <= uVar2" identifier <= identifier) )) (compound_statement "{\n    return 1;\n  }" { (return_statement "return 1;" return number_literal ;) })) (if_statement "if ((!CARRY4(param_2,uVar2)) && (pvVar3 = realloc(pvVar3,param_2 + uVar2), pvVar3 != (void *)0x0))\n  {\n    param_1[6] = pvVar3;\n    param_1[8] = param_2 + uVar2 + (int)pvVar3;\n    param_1[7] = pvVar3;\n    return 1;\n  }" if (parenthesized_expression "((!CARRY4(param_2,uVar2)) && (pvVar3 = realloc(pvVar3,param_2 + uVar2), pvVar3 != (void *)0x0))" ( (binary_expression "(!CARRY4(param_2,uVar2)) && (pvVar3 = realloc(pvVar3,param_2 + uVar2), pvVar3 != (void *)0x0)" (parenthesized_expression "(!CARRY4(param_2,uVar2))" ( (unary_expression "!CARRY4(param_2,uVar2)" ! (call_expression "CARRY4(param_2,uVar2)" identifier (argument_list "(param_2,uVar2)" ( identifier , identifier )))) )) && (parenthesized_expression "(pvVar3 = realloc(pvVar3,param_2 + uVar2), pvVar3 != (void *)0x0)" ( (comma_expression "pvVar3 = realloc(pvVar3,param_2 + uVar2), pvVar3 != (void *)0x0" (assignment_expression "pvVar3 = realloc(pvVar3,param_2 + uVar2)" identifier = (call_expression "realloc(pvVar3,param_2 + uVar2)" identifier (argument_list "(pvVar3,param_2 + uVar2)" ( identifier , (binary_expression "param_2 + uVar2" identifier + identifier) )))) , (binary_expression "pvVar3 != (void *)0x0" identifier != (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal))) ))) )) (compound_statement "{\n    param_1[6] = pvVar3;\n    param_1[8] = param_2 + uVar2 + (int)pvVar3;\n    param_1[7] = pvVar3;\n    return 1;\n  }" { (expression_statement "param_1[6] = pvVar3;" (assignment_expression "param_1[6] = pvVar3" (subscript_expression "param_1[6]" identifier [ number_literal ]) = identifier) ;) (expression_statement "param_1[8] = param_2 + uVar2 + (int)pvVar3;" (assignment_expression "param_1[8] = param_2 + uVar2 + (int)pvVar3" (subscript_expression "param_1[8]" identifier [ number_literal ]) = (binary_expression "param_2 + uVar2 + (int)pvVar3" (binary_expression "param_2 + uVar2" identifier + identifier) + (cast_expression "(int)pvVar3" ( (type_descriptor "int" primitive_type) ) identifier))) ;) (expression_statement "param_1[7] = pvVar3;" (assignment_expression "param_1[7] = pvVar3" (subscript_expression "param_1[7]" identifier [ number_literal ]) = identifier) ;) (return_statement "return 1;" return number_literal ;) })) (expression_statement "piVar4 = __errno_location();" (assignment_expression "piVar4 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (expression_statement "*piVar4 = 0xc;" (assignment_expression "*piVar4 = 0xc" (pointer_expression "*piVar4" * identifier) = number_literal) ;) (return_statement "return 0;" return number_literal ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nint __regparm3 _argp_fmtstream_ensure(argp_fmtstream *fs,size_t amount)\n\n{\n  size_t sVar1;\n  uint uVar2;\n  char *pcVar3;\n  int *piVar4;\n  char *pcVar5;\n  \n  _argp_fmtstream_update(fs);\n  sVar1 = fwrite_unlocked(fs->buf,1,(int)fs->p - (int)fs->buf,(FILE *)fs->stream);\n  pcVar3 = fs->buf;\n  if (sVar1 != (int)fs->p - (int)pcVar3) {\n    pcVar5 = fs->p + -sVar1;\n    fs->point_offs = fs->point_offs - sVar1;\n    fs->p = pcVar5;\n    memmove(pcVar3,pcVar3 + sVar1,(int)pcVar5 - (int)pcVar3);\n    return 0;\n  }\n  fs->p = pcVar3;\n  fs->point_offs = 0;\n  uVar2 = (int)fs->end - (int)pcVar3;\n  if (amount <= uVar2) {\n    return 1;\n  }\n  if ((!CARRY4(amount,uVar2)) &&\n     (pcVar3 = (char *)realloc(pcVar3,amount + uVar2), pcVar3 != (char *)0x0)) {\n    fs->buf = pcVar3;\n    fs->end = pcVar3 + amount + uVar2;\n    fs->p = pcVar3;\n    return 1;\n  }\n  piVar4 = __errno_location();\n  *piVar4 = 0xc;\n  return 0;\n}\n\n" comment (function_definition "int __regparm3 _argp_fmtstream_ensure(argp_fmtstream *fs,size_t amount)\n\n{\n  size_t sVar1;\n  uint uVar2;\n  char *pcVar3;\n  int *piVar4;\n  char *pcVar5;\n  \n  _argp_fmtstream_update(fs);\n  sVar1 = fwrite_unlocked(fs->buf,1,(int)fs->p - (int)fs->buf,(FILE *)fs->stream);\n  pcVar3 = fs->buf;\n  if (sVar1 != (int)fs->p - (int)pcVar3) {\n    pcVar5 = fs->p + -sVar1;\n    fs->point_offs = fs->point_offs - sVar1;\n    fs->p = pcVar5;\n    memmove(pcVar3,pcVar3 + sVar1,(int)pcVar5 - (int)pcVar3);\n    return 0;\n  }\n  fs->p = pcVar3;\n  fs->point_offs = 0;\n  uVar2 = (int)fs->end - (int)pcVar3;\n  if (amount <= uVar2) {\n    return 1;\n  }\n  if ((!CARRY4(amount,uVar2)) &&\n     (pcVar3 = (char *)realloc(pcVar3,amount + uVar2), pcVar3 != (char *)0x0)) {\n    fs->buf = pcVar3;\n    fs->end = pcVar3 + amount + uVar2;\n    fs->p = pcVar3;\n    return 1;\n  }\n  piVar4 = __errno_location();\n  *piVar4 = 0xc;\n  return 0;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "_argp_fmtstream_ensure(argp_fmtstream *fs,size_t amount)" identifier (parameter_list "(argp_fmtstream *fs,size_t amount)" ( (parameter_declaration "argp_fmtstream *fs" type_identifier (pointer_declarator "*fs" * identifier)) , (parameter_declaration "size_t amount" primitive_type identifier) ))) (compound_statement "{\n  size_t sVar1;\n  uint uVar2;\n  char *pcVar3;\n  int *piVar4;\n  char *pcVar5;\n  \n  _argp_fmtstream_update(fs);\n  sVar1 = fwrite_unlocked(fs->buf,1,(int)fs->p - (int)fs->buf,(FILE *)fs->stream);\n  pcVar3 = fs->buf;\n  if (sVar1 != (int)fs->p - (int)pcVar3) {\n    pcVar5 = fs->p + -sVar1;\n    fs->point_offs = fs->point_offs - sVar1;\n    fs->p = pcVar5;\n    memmove(pcVar3,pcVar3 + sVar1,(int)pcVar5 - (int)pcVar3);\n    return 0;\n  }\n  fs->p = pcVar3;\n  fs->point_offs = 0;\n  uVar2 = (int)fs->end - (int)pcVar3;\n  if (amount <= uVar2) {\n    return 1;\n  }\n  if ((!CARRY4(amount,uVar2)) &&\n     (pcVar3 = (char *)realloc(pcVar3,amount + uVar2), pcVar3 != (char *)0x0)) {\n    fs->buf = pcVar3;\n    fs->end = pcVar3 + amount + uVar2;\n    fs->p = pcVar3;\n    return 1;\n  }\n  piVar4 = __errno_location();\n  *piVar4 = 0xc;\n  return 0;\n}" { (declaration "size_t sVar1;" primitive_type identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "char *pcVar3;" primitive_type (pointer_declarator "*pcVar3" * identifier) ;) (declaration "int *piVar4;" primitive_type (pointer_declarator "*piVar4" * identifier) ;) (declaration "char *pcVar5;" primitive_type (pointer_declarator "*pcVar5" * identifier) ;) (expression_statement "_argp_fmtstream_update(fs);" (call_expression "_argp_fmtstream_update(fs)" identifier (argument_list "(fs)" ( identifier ))) ;) (expression_statement "sVar1 = fwrite_unlocked(fs->buf,1,(int)fs->p - (int)fs->buf,(FILE *)fs->stream);" (assignment_expression "sVar1 = fwrite_unlocked(fs->buf,1,(int)fs->p - (int)fs->buf,(FILE *)fs->stream)" identifier = (call_expression "fwrite_unlocked(fs->buf,1,(int)fs->p - (int)fs->buf,(FILE *)fs->stream)" identifier (argument_list "(fs->buf,1,(int)fs->p - (int)fs->buf,(FILE *)fs->stream)" ( (field_expression "fs->buf" identifier -> field_identifier) , number_literal , (binary_expression "(int)fs->p - (int)fs->buf" (cast_expression "(int)fs->p" ( (type_descriptor "int" primitive_type) ) (field_expression "fs->p" identifier -> field_identifier)) - (cast_expression "(int)fs->buf" ( (type_descriptor "int" primitive_type) ) (field_expression "fs->buf" identifier -> field_identifier))) , (cast_expression "(FILE *)fs->stream" ( (type_descriptor "FILE *" type_identifier (abstract_pointer_declarator "*" *)) ) (field_expression "fs->stream" identifier -> field_identifier)) )))) ;) (expression_statement "pcVar3 = fs->buf;" (assignment_expression "pcVar3 = fs->buf" identifier = (field_expression "fs->buf" identifier -> field_identifier)) ;) (if_statement "if (sVar1 != (int)fs->p - (int)pcVar3) {\n    pcVar5 = fs->p + -sVar1;\n    fs->point_offs = fs->point_offs - sVar1;\n    fs->p = pcVar5;\n    memmove(pcVar3,pcVar3 + sVar1,(int)pcVar5 - (int)pcVar3);\n    return 0;\n  }" if (parenthesized_expression "(sVar1 != (int)fs->p - (int)pcVar3)" ( (binary_expression "sVar1 != (int)fs->p - (int)pcVar3" identifier != (binary_expression "(int)fs->p - (int)pcVar3" (cast_expression "(int)fs->p" ( (type_descriptor "int" primitive_type) ) (field_expression "fs->p" identifier -> field_identifier)) - (cast_expression "(int)pcVar3" ( (type_descriptor "int" primitive_type) ) identifier))) )) (compound_statement "{\n    pcVar5 = fs->p + -sVar1;\n    fs->point_offs = fs->point_offs - sVar1;\n    fs->p = pcVar5;\n    memmove(pcVar3,pcVar3 + sVar1,(int)pcVar5 - (int)pcVar3);\n    return 0;\n  }" { (expression_statement "pcVar5 = fs->p + -sVar1;" (assignment_expression "pcVar5 = fs->p + -sVar1" identifier = (binary_expression "fs->p + -sVar1" (field_expression "fs->p" identifier -> field_identifier) + (unary_expression "-sVar1" - identifier))) ;) (expression_statement "fs->point_offs = fs->point_offs - sVar1;" (assignment_expression "fs->point_offs = fs->point_offs - sVar1" (field_expression "fs->point_offs" identifier -> field_identifier) = (binary_expression "fs->point_offs - sVar1" (field_expression "fs->point_offs" identifier -> field_identifier) - identifier)) ;) (expression_statement "fs->p = pcVar5;" (assignment_expression "fs->p = pcVar5" (field_expression "fs->p" identifier -> field_identifier) = identifier) ;) (expression_statement "memmove(pcVar3,pcVar3 + sVar1,(int)pcVar5 - (int)pcVar3);" (call_expression "memmove(pcVar3,pcVar3 + sVar1,(int)pcVar5 - (int)pcVar3)" identifier (argument_list "(pcVar3,pcVar3 + sVar1,(int)pcVar5 - (int)pcVar3)" ( identifier , (binary_expression "pcVar3 + sVar1" identifier + identifier) , (binary_expression "(int)pcVar5 - (int)pcVar3" (cast_expression "(int)pcVar5" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)pcVar3" ( (type_descriptor "int" primitive_type) ) identifier)) ))) ;) (return_statement "return 0;" return number_literal ;) })) (expression_statement "fs->p = pcVar3;" (assignment_expression "fs->p = pcVar3" (field_expression "fs->p" identifier -> field_identifier) = identifier) ;) (expression_statement "fs->point_offs = 0;" (assignment_expression "fs->point_offs = 0" (field_expression "fs->point_offs" identifier -> field_identifier) = number_literal) ;) (expression_statement "uVar2 = (int)fs->end - (int)pcVar3;" (assignment_expression "uVar2 = (int)fs->end - (int)pcVar3" identifier = (binary_expression "(int)fs->end - (int)pcVar3" (cast_expression "(int)fs->end" ( (type_descriptor "int" primitive_type) ) (field_expression "fs->end" identifier -> field_identifier)) - (cast_expression "(int)pcVar3" ( (type_descriptor "int" primitive_type) ) identifier))) ;) (if_statement "if (amount <= uVar2) {\n    return 1;\n  }" if (parenthesized_expression "(amount <= uVar2)" ( (binary_expression "amount <= uVar2" identifier <= identifier) )) (compound_statement "{\n    return 1;\n  }" { (return_statement "return 1;" return number_literal ;) })) (if_statement "if ((!CARRY4(amount,uVar2)) &&\n     (pcVar3 = (char *)realloc(pcVar3,amount + uVar2), pcVar3 != (char *)0x0)) {\n    fs->buf = pcVar3;\n    fs->end = pcVar3 + amount + uVar2;\n    fs->p = pcVar3;\n    return 1;\n  }" if (parenthesized_expression "((!CARRY4(amount,uVar2)) &&\n     (pcVar3 = (char *)realloc(pcVar3,amount + uVar2), pcVar3 != (char *)0x0))" ( (binary_expression "(!CARRY4(amount,uVar2)) &&\n     (pcVar3 = (char *)realloc(pcVar3,amount + uVar2), pcVar3 != (char *)0x0)" (parenthesized_expression "(!CARRY4(amount,uVar2))" ( (unary_expression "!CARRY4(amount,uVar2)" ! (call_expression "CARRY4(amount,uVar2)" identifier (argument_list "(amount,uVar2)" ( identifier , identifier )))) )) && (parenthesized_expression "(pcVar3 = (char *)realloc(pcVar3,amount + uVar2), pcVar3 != (char *)0x0)" ( (comma_expression "pcVar3 = (char *)realloc(pcVar3,amount + uVar2), pcVar3 != (char *)0x0" (assignment_expression "pcVar3 = (char *)realloc(pcVar3,amount + uVar2)" identifier = (cast_expression "(char *)realloc(pcVar3,amount + uVar2)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "realloc(pcVar3,amount + uVar2)" identifier (argument_list "(pcVar3,amount + uVar2)" ( identifier , (binary_expression "amount + uVar2" identifier + identifier) ))))) , (binary_expression "pcVar3 != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal))) ))) )) (compound_statement "{\n    fs->buf = pcVar3;\n    fs->end = pcVar3 + amount + uVar2;\n    fs->p = pcVar3;\n    return 1;\n  }" { (expression_statement "fs->buf = pcVar3;" (assignment_expression "fs->buf = pcVar3" (field_expression "fs->buf" identifier -> field_identifier) = identifier) ;) (expression_statement "fs->end = pcVar3 + amount + uVar2;" (assignment_expression "fs->end = pcVar3 + amount + uVar2" (field_expression "fs->end" identifier -> field_identifier) = (binary_expression "pcVar3 + amount + uVar2" (binary_expression "pcVar3 + amount" identifier + identifier) + identifier)) ;) (expression_statement "fs->p = pcVar3;" (assignment_expression "fs->p = pcVar3" (field_expression "fs->p" identifier -> field_identifier) = identifier) ;) (return_statement "return 1;" return number_literal ;) })) (expression_statement "piVar4 = __errno_location();" (assignment_expression "piVar4 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (expression_statement "*piVar4 = 0xc;" (assignment_expression "*piVar4 = 0xc" (pointer_expression "*piVar4" * identifier) = number_literal) ;) (return_statement "return 0;" return number_literal ;) })))
(translation_unit "undefined4 __regparm3 FUN_000280f0(undefined4 *param_1,uint param_2)\n\n{\n  size_t sVar1;\n  uint uVar2;\n  void *pvVar3;\n  int *piVar4;\n  int iVar5;\n  \n  FUN_00027ad0(param_1);\n  sVar1 = fwrite_unlocked((void *)param_1[6],1,param_1[7] - (int)param_1[6],(FILE *)*param_1);\n  pvVar3 = (void *)param_1[6];\n  if (sVar1 != param_1[7] - (int)pvVar3) {\n    iVar5 = param_1[7] - sVar1;\n    param_1[4] = param_1[4] - sVar1;\n    param_1[7] = iVar5;\n    memmove(pvVar3,(void *)(sVar1 + (int)pvVar3),iVar5 - (int)pvVar3);\n    return 0;\n  }\n  param_1[7] = pvVar3;\n  param_1[4] = 0;\n  uVar2 = param_1[8] - (int)pvVar3;\n  if (param_2 <= uVar2) {\n    return 1;\n  }\n  if ((!CARRY4(param_2,uVar2)) && (pvVar3 = realloc(pvVar3,param_2 + uVar2), pvVar3 != (void *)0x0))\n  {\n    param_1[6] = pvVar3;\n    param_1[8] = param_2 + uVar2 + (int)pvVar3;\n    param_1[7] = pvVar3;\n    return 1;\n  }\n  piVar4 = __errno_location();\n  *piVar4 = 0xc;\n  return 0;\n}\n\n" (function_definition "undefined4 __regparm3 FUN_000280f0(undefined4 *param_1,uint param_2)\n\n{\n  size_t sVar1;\n  uint uVar2;\n  void *pvVar3;\n  int *piVar4;\n  int iVar5;\n  \n  FUN_00027ad0(param_1);\n  sVar1 = fwrite_unlocked((void *)param_1[6],1,param_1[7] - (int)param_1[6],(FILE *)*param_1);\n  pvVar3 = (void *)param_1[6];\n  if (sVar1 != param_1[7] - (int)pvVar3) {\n    iVar5 = param_1[7] - sVar1;\n    param_1[4] = param_1[4] - sVar1;\n    param_1[7] = iVar5;\n    memmove(pvVar3,(void *)(sVar1 + (int)pvVar3),iVar5 - (int)pvVar3);\n    return 0;\n  }\n  param_1[7] = pvVar3;\n  param_1[4] = 0;\n  uVar2 = param_1[8] - (int)pvVar3;\n  if (param_2 <= uVar2) {\n    return 1;\n  }\n  if ((!CARRY4(param_2,uVar2)) && (pvVar3 = realloc(pvVar3,param_2 + uVar2), pvVar3 != (void *)0x0))\n  {\n    param_1[6] = pvVar3;\n    param_1[8] = param_2 + uVar2 + (int)pvVar3;\n    param_1[7] = pvVar3;\n    return 1;\n  }\n  piVar4 = __errno_location();\n  *piVar4 = 0xc;\n  return 0;\n}" type_identifier (ERROR "__regparm3" identifier) (function_declarator "FUN_000280f0(undefined4 *param_1,uint param_2)" identifier (parameter_list "(undefined4 *param_1,uint param_2)" ( (parameter_declaration "undefined4 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "uint param_2" type_identifier identifier) ))) (compound_statement "{\n  size_t sVar1;\n  uint uVar2;\n  void *pvVar3;\n  int *piVar4;\n  int iVar5;\n  \n  FUN_00027ad0(param_1);\n  sVar1 = fwrite_unlocked((void *)param_1[6],1,param_1[7] - (int)param_1[6],(FILE *)*param_1);\n  pvVar3 = (void *)param_1[6];\n  if (sVar1 != param_1[7] - (int)pvVar3) {\n    iVar5 = param_1[7] - sVar1;\n    param_1[4] = param_1[4] - sVar1;\n    param_1[7] = iVar5;\n    memmove(pvVar3,(void *)(sVar1 + (int)pvVar3),iVar5 - (int)pvVar3);\n    return 0;\n  }\n  param_1[7] = pvVar3;\n  param_1[4] = 0;\n  uVar2 = param_1[8] - (int)pvVar3;\n  if (param_2 <= uVar2) {\n    return 1;\n  }\n  if ((!CARRY4(param_2,uVar2)) && (pvVar3 = realloc(pvVar3,param_2 + uVar2), pvVar3 != (void *)0x0))\n  {\n    param_1[6] = pvVar3;\n    param_1[8] = param_2 + uVar2 + (int)pvVar3;\n    param_1[7] = pvVar3;\n    return 1;\n  }\n  piVar4 = __errno_location();\n  *piVar4 = 0xc;\n  return 0;\n}" { (declaration "size_t sVar1;" primitive_type identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "void *pvVar3;" primitive_type (pointer_declarator "*pvVar3" * identifier) ;) (declaration "int *piVar4;" primitive_type (pointer_declarator "*piVar4" * identifier) ;) (declaration "int iVar5;" primitive_type identifier ;) (expression_statement "FUN_00027ad0(param_1);" (call_expression "FUN_00027ad0(param_1)" identifier (argument_list "(param_1)" ( identifier ))) ;) (expression_statement "sVar1 = fwrite_unlocked((void *)param_1[6],1,param_1[7] - (int)param_1[6],(FILE *)*param_1);" (assignment_expression "sVar1 = fwrite_unlocked((void *)param_1[6],1,param_1[7] - (int)param_1[6],(FILE *)*param_1)" identifier = (call_expression "fwrite_unlocked((void *)param_1[6],1,param_1[7] - (int)param_1[6],(FILE *)*param_1)" identifier (argument_list "((void *)param_1[6],1,param_1[7] - (int)param_1[6],(FILE *)*param_1)" ( (cast_expression "(void *)param_1[6]" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (subscript_expression "param_1[6]" identifier [ number_literal ])) , number_literal , (binary_expression "param_1[7] - (int)param_1[6]" (subscript_expression "param_1[7]" identifier [ number_literal ]) - (cast_expression "(int)param_1[6]" ( (type_descriptor "int" primitive_type) ) (subscript_expression "param_1[6]" identifier [ number_literal ]))) , (cast_expression "(FILE *)*param_1" ( (type_descriptor "FILE *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier)) )))) ;) (expression_statement "pvVar3 = (void *)param_1[6];" (assignment_expression "pvVar3 = (void *)param_1[6]" identifier = (cast_expression "(void *)param_1[6]" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (subscript_expression "param_1[6]" identifier [ number_literal ]))) ;) (if_statement "if (sVar1 != param_1[7] - (int)pvVar3) {\n    iVar5 = param_1[7] - sVar1;\n    param_1[4] = param_1[4] - sVar1;\n    param_1[7] = iVar5;\n    memmove(pvVar3,(void *)(sVar1 + (int)pvVar3),iVar5 - (int)pvVar3);\n    return 0;\n  }" if (parenthesized_expression "(sVar1 != param_1[7] - (int)pvVar3)" ( (binary_expression "sVar1 != param_1[7] - (int)pvVar3" identifier != (binary_expression "param_1[7] - (int)pvVar3" (subscript_expression "param_1[7]" identifier [ number_literal ]) - (cast_expression "(int)pvVar3" ( (type_descriptor "int" primitive_type) ) identifier))) )) (compound_statement "{\n    iVar5 = param_1[7] - sVar1;\n    param_1[4] = param_1[4] - sVar1;\n    param_1[7] = iVar5;\n    memmove(pvVar3,(void *)(sVar1 + (int)pvVar3),iVar5 - (int)pvVar3);\n    return 0;\n  }" { (expression_statement "iVar5 = param_1[7] - sVar1;" (assignment_expression "iVar5 = param_1[7] - sVar1" identifier = (binary_expression "param_1[7] - sVar1" (subscript_expression "param_1[7]" identifier [ number_literal ]) - identifier)) ;) (expression_statement "param_1[4] = param_1[4] - sVar1;" (assignment_expression "param_1[4] = param_1[4] - sVar1" (subscript_expression "param_1[4]" identifier [ number_literal ]) = (binary_expression "param_1[4] - sVar1" (subscript_expression "param_1[4]" identifier [ number_literal ]) - identifier)) ;) (expression_statement "param_1[7] = iVar5;" (assignment_expression "param_1[7] = iVar5" (subscript_expression "param_1[7]" identifier [ number_literal ]) = identifier) ;) (expression_statement "memmove(pvVar3,(void *)(sVar1 + (int)pvVar3),iVar5 - (int)pvVar3);" (call_expression "memmove(pvVar3,(void *)(sVar1 + (int)pvVar3),iVar5 - (int)pvVar3)" identifier (argument_list "(pvVar3,(void *)(sVar1 + (int)pvVar3),iVar5 - (int)pvVar3)" ( identifier , (cast_expression "(void *)(sVar1 + (int)pvVar3)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(sVar1 + (int)pvVar3)" ( (binary_expression "sVar1 + (int)pvVar3" identifier + (cast_expression "(int)pvVar3" ( (type_descriptor "int" primitive_type) ) identifier)) ))) , (binary_expression "iVar5 - (int)pvVar3" identifier - (cast_expression "(int)pvVar3" ( (type_descriptor "int" primitive_type) ) identifier)) ))) ;) (return_statement "return 0;" return number_literal ;) })) (expression_statement "param_1[7] = pvVar3;" (assignment_expression "param_1[7] = pvVar3" (subscript_expression "param_1[7]" identifier [ number_literal ]) = identifier) ;) (expression_statement "param_1[4] = 0;" (assignment_expression "param_1[4] = 0" (subscript_expression "param_1[4]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "uVar2 = param_1[8] - (int)pvVar3;" (assignment_expression "uVar2 = param_1[8] - (int)pvVar3" identifier = (binary_expression "param_1[8] - (int)pvVar3" (subscript_expression "param_1[8]" identifier [ number_literal ]) - (cast_expression "(int)pvVar3" ( (type_descriptor "int" primitive_type) ) identifier))) ;) (if_statement "if (param_2 <= uVar2) {\n    return 1;\n  }" if (parenthesized_expression "(param_2 <= uVar2)" ( (binary_expression "param_2 <= uVar2" identifier <= identifier) )) (compound_statement "{\n    return 1;\n  }" { (return_statement "return 1;" return number_literal ;) })) (if_statement "if ((!CARRY4(param_2,uVar2)) && (pvVar3 = realloc(pvVar3,param_2 + uVar2), pvVar3 != (void *)0x0))\n  {\n    param_1[6] = pvVar3;\n    param_1[8] = param_2 + uVar2 + (int)pvVar3;\n    param_1[7] = pvVar3;\n    return 1;\n  }" if (parenthesized_expression "((!CARRY4(param_2,uVar2)) && (pvVar3 = realloc(pvVar3,param_2 + uVar2), pvVar3 != (void *)0x0))" ( (binary_expression "(!CARRY4(param_2,uVar2)) && (pvVar3 = realloc(pvVar3,param_2 + uVar2), pvVar3 != (void *)0x0)" (parenthesized_expression "(!CARRY4(param_2,uVar2))" ( (unary_expression "!CARRY4(param_2,uVar2)" ! (call_expression "CARRY4(param_2,uVar2)" identifier (argument_list "(param_2,uVar2)" ( identifier , identifier )))) )) && (parenthesized_expression "(pvVar3 = realloc(pvVar3,param_2 + uVar2), pvVar3 != (void *)0x0)" ( (comma_expression "pvVar3 = realloc(pvVar3,param_2 + uVar2), pvVar3 != (void *)0x0" (assignment_expression "pvVar3 = realloc(pvVar3,param_2 + uVar2)" identifier = (call_expression "realloc(pvVar3,param_2 + uVar2)" identifier (argument_list "(pvVar3,param_2 + uVar2)" ( identifier , (binary_expression "param_2 + uVar2" identifier + identifier) )))) , (binary_expression "pvVar3 != (void *)0x0" identifier != (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal))) ))) )) (compound_statement "{\n    param_1[6] = pvVar3;\n    param_1[8] = param_2 + uVar2 + (int)pvVar3;\n    param_1[7] = pvVar3;\n    return 1;\n  }" { (expression_statement "param_1[6] = pvVar3;" (assignment_expression "param_1[6] = pvVar3" (subscript_expression "param_1[6]" identifier [ number_literal ]) = identifier) ;) (expression_statement "param_1[8] = param_2 + uVar2 + (int)pvVar3;" (assignment_expression "param_1[8] = param_2 + uVar2 + (int)pvVar3" (subscript_expression "param_1[8]" identifier [ number_literal ]) = (binary_expression "param_2 + uVar2 + (int)pvVar3" (binary_expression "param_2 + uVar2" identifier + identifier) + (cast_expression "(int)pvVar3" ( (type_descriptor "int" primitive_type) ) identifier))) ;) (expression_statement "param_1[7] = pvVar3;" (assignment_expression "param_1[7] = pvVar3" (subscript_expression "param_1[7]" identifier [ number_literal ]) = identifier) ;) (return_statement "return 1;" return number_literal ;) })) (expression_statement "piVar4 = __errno_location();" (assignment_expression "piVar4 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (expression_statement "*piVar4 = 0xc;" (assignment_expression "*piVar4 = 0xc" (pointer_expression "*piVar4" * identifier) = number_literal) ;) (return_statement "return 0;" return number_literal ;) })))
(translation_unit (function_definition TYPE (ERROR IDENT) (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (subscript_expression IDENT [ LIT ])) , LIT , (binary_expression (subscript_expression IDENT [ LIT ]) - (cast_expression ( (type_descriptor TYPE) ) (subscript_expression IDENT [ LIT ]))) , (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT)) )))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (subscript_expression IDENT [ LIT ]))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (binary_expression (subscript_expression IDENT [ LIT ]) - (cast_expression ( (type_descriptor TYPE) ) IDENT))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression (subscript_expression IDENT [ LIT ]) - IDENT)) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (binary_expression (subscript_expression IDENT [ LIT ]) - IDENT)) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + (cast_expression ( (type_descriptor TYPE) ) IDENT)) ))) , (binary_expression IDENT - (cast_expression ( (type_descriptor TYPE) ) IDENT)) ))) ;) (return_statement return LIT ;) })) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression IDENT = (binary_expression (subscript_expression IDENT [ LIT ]) - (cast_expression ( (type_descriptor TYPE) ) IDENT))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT <= IDENT) )) (compound_statement { (return_statement return LIT ;) })) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (unary_expression ! (call_expression IDENT (argument_list ( IDENT , IDENT )))) )) && (parenthesized_expression ( (comma_expression (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , (binary_expression IDENT + IDENT) )))) , (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT))) ))) )) (compound_statement { (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (binary_expression (binary_expression IDENT + IDENT) + (cast_expression ( (type_descriptor TYPE) ) IDENT))) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (return_statement return LIT ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (return_statement return LIT ;) })))
(function_definition "undefined4 __regparm3 FUN_000280f0(undefined4 *param_1,uint param_2)\n\n{\n  size_t sVar1;\n  uint uVar2;\n  void *pvVar3;\n  int *piVar4;\n  int iVar5;\n  \n  FUN_00027ad0(param_1);\n  sVar1 = fwrite_unlocked((void *)param_1[6],1,param_1[7] - (int)param_1[6],(FILE *)*param_1);\n  pvVar3 = (void *)param_1[6];\n  if (sVar1 != param_1[7] - (int)pvVar3) {\n    iVar5 = param_1[7] - sVar1;\n    param_1[4] = param_1[4] - sVar1;\n    param_1[7] = iVar5;\n    memmove(pvVar3,(void *)(sVar1 + (int)pvVar3),iVar5 - (int)pvVar3);\n    return 0;\n  }\n  param_1[7] = pvVar3;\n  param_1[4] = 0;\n  uVar2 = param_1[8] - (int)pvVar3;\n  if (param_2 <= uVar2) {\n    return 1;\n  }\n  if ((!CARRY4(param_2,uVar2)) && (pvVar3 = realloc(pvVar3,param_2 + uVar2), pvVar3 != (void *)0x0))\n  {\n    param_1[6] = pvVar3;\n    param_1[8] = param_2 + uVar2 + (int)pvVar3;\n    param_1[7] = pvVar3;\n    return 1;\n  }\n  piVar4 = __errno_location();\n  *piVar4 = 0xc;\n  return 0;\n}" (type_identifier "undefined4") (ERROR "__regparm3" (identifier "__regparm3")) (function_declarator "FUN_000280f0(undefined4 *param_1,uint param_2)" (identifier "FUN_000280f0") (parameter_list "(undefined4 *param_1,uint param_2)" (( "(") (parameter_declaration "undefined4 *param_1" (type_identifier "undefined4") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "uint param_2" (type_identifier "uint") (identifier "param_2")) () ")"))) (compound_statement "{\n  size_t sVar1;\n  uint uVar2;\n  void *pvVar3;\n  int *piVar4;\n  int iVar5;\n  \n  FUN_00027ad0(param_1);\n  sVar1 = fwrite_unlocked((void *)param_1[6],1,param_1[7] - (int)param_1[6],(FILE *)*param_1);\n  pvVar3 = (void *)param_1[6];\n  if (sVar1 != param_1[7] - (int)pvVar3) {\n    iVar5 = param_1[7] - sVar1;\n    param_1[4] = param_1[4] - sVar1;\n    param_1[7] = iVar5;\n    memmove(pvVar3,(void *)(sVar1 + (int)pvVar3),iVar5 - (int)pvVar3);\n    return 0;\n  }\n  param_1[7] = pvVar3;\n  param_1[4] = 0;\n  uVar2 = param_1[8] - (int)pvVar3;\n  if (param_2 <= uVar2) {\n    return 1;\n  }\n  if ((!CARRY4(param_2,uVar2)) && (pvVar3 = realloc(pvVar3,param_2 + uVar2), pvVar3 != (void *)0x0))\n  {\n    param_1[6] = pvVar3;\n    param_1[8] = param_2 + uVar2 + (int)pvVar3;\n    param_1[7] = pvVar3;\n    return 1;\n  }\n  piVar4 = __errno_location();\n  *piVar4 = 0xc;\n  return 0;\n}" ({ "{") (declaration "size_t sVar1;" (primitive_type "size_t") (identifier "sVar1") (; ";")) (declaration "uint uVar2;" (type_identifier "uint") (identifier "uVar2") (; ";")) (declaration "void *pvVar3;" (primitive_type "void") (pointer_declarator "*pvVar3" (* "*") (identifier "pvVar3")) (; ";")) (declaration "int *piVar4;" (primitive_type "int") (pointer_declarator "*piVar4" (* "*") (identifier "piVar4")) (; ";")) (declaration "int iVar5;" (primitive_type "int") (identifier "iVar5") (; ";")) (expression_statement "FUN_00027ad0(param_1);" (call_expression "FUN_00027ad0(param_1)" (identifier "FUN_00027ad0") (argument_list "(param_1)" (( "(") (identifier "param_1") () ")"))) (; ";")) (expression_statement "sVar1 = fwrite_unlocked((void *)param_1[6],1,param_1[7] - (int)param_1[6],(FILE *)*param_1);" (assignment_expression "sVar1 = fwrite_unlocked((void *)param_1[6],1,param_1[7] - (int)param_1[6],(FILE *)*param_1)" (identifier "sVar1") (= "=") (call_expression "fwrite_unlocked((void *)param_1[6],1,param_1[7] - (int)param_1[6],(FILE *)*param_1)" (identifier "fwrite_unlocked") (argument_list "((void *)param_1[6],1,param_1[7] - (int)param_1[6],(FILE *)*param_1)" (( "(") (cast_expression "(void *)param_1[6]" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "param_1[6]" (identifier "param_1") ([ "[") (number_literal "6") (] "]"))) (, ",") (number_literal "1") (, ",") (binary_expression "param_1[7] - (int)param_1[6]" (subscript_expression "param_1[7]" (identifier "param_1") ([ "[") (number_literal "7") (] "]")) (- "-") (cast_expression "(int)param_1[6]" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (subscript_expression "param_1[6]" (identifier "param_1") ([ "[") (number_literal "6") (] "]")))) (, ",") (cast_expression "(FILE *)*param_1" (( "(") (type_descriptor "FILE *" (type_identifier "FILE") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*param_1" (* "*") (identifier "param_1"))) () ")")))) (; ";")) (expression_statement "pvVar3 = (void *)param_1[6];" (assignment_expression "pvVar3 = (void *)param_1[6]" (identifier "pvVar3") (= "=") (cast_expression "(void *)param_1[6]" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "param_1[6]" (identifier "param_1") ([ "[") (number_literal "6") (] "]")))) (; ";")) (if_statement "if (sVar1 != param_1[7] - (int)pvVar3) {\n    iVar5 = param_1[7] - sVar1;\n    param_1[4] = param_1[4] - sVar1;\n    param_1[7] = iVar5;\n    memmove(pvVar3,(void *)(sVar1 + (int)pvVar3),iVar5 - (int)pvVar3);\n    return 0;\n  }" (if "if") (parenthesized_expression "(sVar1 != param_1[7] - (int)pvVar3)" (( "(") (binary_expression "sVar1 != param_1[7] - (int)pvVar3" (identifier "sVar1") (!= "!=") (binary_expression "param_1[7] - (int)pvVar3" (subscript_expression "param_1[7]" (identifier "param_1") ([ "[") (number_literal "7") (] "]")) (- "-") (cast_expression "(int)pvVar3" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "pvVar3")))) () ")")) (compound_statement "{\n    iVar5 = param_1[7] - sVar1;\n    param_1[4] = param_1[4] - sVar1;\n    param_1[7] = iVar5;\n    memmove(pvVar3,(void *)(sVar1 + (int)pvVar3),iVar5 - (int)pvVar3);\n    return 0;\n  }" ({ "{") (expression_statement "iVar5 = param_1[7] - sVar1;" (assignment_expression "iVar5 = param_1[7] - sVar1" (identifier "iVar5") (= "=") (binary_expression "param_1[7] - sVar1" (subscript_expression "param_1[7]" (identifier "param_1") ([ "[") (number_literal "7") (] "]")) (- "-") (identifier "sVar1"))) (; ";")) (expression_statement "param_1[4] = param_1[4] - sVar1;" (assignment_expression "param_1[4] = param_1[4] - sVar1" (subscript_expression "param_1[4]" (identifier "param_1") ([ "[") (number_literal "4") (] "]")) (= "=") (binary_expression "param_1[4] - sVar1" (subscript_expression "param_1[4]" (identifier "param_1") ([ "[") (number_literal "4") (] "]")) (- "-") (identifier "sVar1"))) (; ";")) (expression_statement "param_1[7] = iVar5;" (assignment_expression "param_1[7] = iVar5" (subscript_expression "param_1[7]" (identifier "param_1") ([ "[") (number_literal "7") (] "]")) (= "=") (identifier "iVar5")) (; ";")) (expression_statement "memmove(pvVar3,(void *)(sVar1 + (int)pvVar3),iVar5 - (int)pvVar3);" (call_expression "memmove(pvVar3,(void *)(sVar1 + (int)pvVar3),iVar5 - (int)pvVar3)" (identifier "memmove") (argument_list "(pvVar3,(void *)(sVar1 + (int)pvVar3),iVar5 - (int)pvVar3)" (( "(") (identifier "pvVar3") (, ",") (cast_expression "(void *)(sVar1 + (int)pvVar3)" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(sVar1 + (int)pvVar3)" (( "(") (binary_expression "sVar1 + (int)pvVar3" (identifier "sVar1") (+ "+") (cast_expression "(int)pvVar3" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "pvVar3"))) () ")"))) (, ",") (binary_expression "iVar5 - (int)pvVar3" (identifier "iVar5") (- "-") (cast_expression "(int)pvVar3" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "pvVar3"))) () ")"))) (; ";")) (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (expression_statement "param_1[7] = pvVar3;" (assignment_expression "param_1[7] = pvVar3" (subscript_expression "param_1[7]" (identifier "param_1") ([ "[") (number_literal "7") (] "]")) (= "=") (identifier "pvVar3")) (; ";")) (expression_statement "param_1[4] = 0;" (assignment_expression "param_1[4] = 0" (subscript_expression "param_1[4]" (identifier "param_1") ([ "[") (number_literal "4") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "uVar2 = param_1[8] - (int)pvVar3;" (assignment_expression "uVar2 = param_1[8] - (int)pvVar3" (identifier "uVar2") (= "=") (binary_expression "param_1[8] - (int)pvVar3" (subscript_expression "param_1[8]" (identifier "param_1") ([ "[") (number_literal "8") (] "]")) (- "-") (cast_expression "(int)pvVar3" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "pvVar3")))) (; ";")) (if_statement "if (param_2 <= uVar2) {\n    return 1;\n  }" (if "if") (parenthesized_expression "(param_2 <= uVar2)" (( "(") (binary_expression "param_2 <= uVar2" (identifier "param_2") (<= "<=") (identifier "uVar2")) () ")")) (compound_statement "{\n    return 1;\n  }" ({ "{") (return_statement "return 1;" (return "return") (number_literal "1") (; ";")) (} "}"))) (if_statement "if ((!CARRY4(param_2,uVar2)) && (pvVar3 = realloc(pvVar3,param_2 + uVar2), pvVar3 != (void *)0x0))\n  {\n    param_1[6] = pvVar3;\n    param_1[8] = param_2 + uVar2 + (int)pvVar3;\n    param_1[7] = pvVar3;\n    return 1;\n  }" (if "if") (parenthesized_expression "((!CARRY4(param_2,uVar2)) && (pvVar3 = realloc(pvVar3,param_2 + uVar2), pvVar3 != (void *)0x0))" (( "(") (binary_expression "(!CARRY4(param_2,uVar2)) && (pvVar3 = realloc(pvVar3,param_2 + uVar2), pvVar3 != (void *)0x0)" (parenthesized_expression "(!CARRY4(param_2,uVar2))" (( "(") (unary_expression "!CARRY4(param_2,uVar2)" (! "!") (call_expression "CARRY4(param_2,uVar2)" (identifier "CARRY4") (argument_list "(param_2,uVar2)" (( "(") (identifier "param_2") (, ",") (identifier "uVar2") () ")")))) () ")")) (&& "&&") (parenthesized_expression "(pvVar3 = realloc(pvVar3,param_2 + uVar2), pvVar3 != (void *)0x0)" (( "(") (comma_expression "pvVar3 = realloc(pvVar3,param_2 + uVar2), pvVar3 != (void *)0x0" (assignment_expression "pvVar3 = realloc(pvVar3,param_2 + uVar2)" (identifier "pvVar3") (= "=") (call_expression "realloc(pvVar3,param_2 + uVar2)" (identifier "realloc") (argument_list "(pvVar3,param_2 + uVar2)" (( "(") (identifier "pvVar3") (, ",") (binary_expression "param_2 + uVar2" (identifier "param_2") (+ "+") (identifier "uVar2")) () ")")))) (, ",") (binary_expression "pvVar3 != (void *)0x0" (identifier "pvVar3") (!= "!=") (cast_expression "(void *)0x0" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0")))) () ")"))) () ")")) (compound_statement "{\n    param_1[6] = pvVar3;\n    param_1[8] = param_2 + uVar2 + (int)pvVar3;\n    param_1[7] = pvVar3;\n    return 1;\n  }" ({ "{") (expression_statement "param_1[6] = pvVar3;" (assignment_expression "param_1[6] = pvVar3" (subscript_expression "param_1[6]" (identifier "param_1") ([ "[") (number_literal "6") (] "]")) (= "=") (identifier "pvVar3")) (; ";")) (expression_statement "param_1[8] = param_2 + uVar2 + (int)pvVar3;" (assignment_expression "param_1[8] = param_2 + uVar2 + (int)pvVar3" (subscript_expression "param_1[8]" (identifier "param_1") ([ "[") (number_literal "8") (] "]")) (= "=") (binary_expression "param_2 + uVar2 + (int)pvVar3" (binary_expression "param_2 + uVar2" (identifier "param_2") (+ "+") (identifier "uVar2")) (+ "+") (cast_expression "(int)pvVar3" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "pvVar3")))) (; ";")) (expression_statement "param_1[7] = pvVar3;" (assignment_expression "param_1[7] = pvVar3" (subscript_expression "param_1[7]" (identifier "param_1") ([ "[") (number_literal "7") (] "]")) (= "=") (identifier "pvVar3")) (; ";")) (return_statement "return 1;" (return "return") (number_literal "1") (; ";")) (} "}"))) (expression_statement "piVar4 = __errno_location();" (assignment_expression "piVar4 = __errno_location()" (identifier "piVar4") (= "=") (call_expression "__errno_location()" (identifier "__errno_location") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "*piVar4 = 0xc;" (assignment_expression "*piVar4 = 0xc" (pointer_expression "*piVar4" (* "*") (identifier "piVar4")) (= "=") (number_literal "0xc")) (; ";")) (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */

int __regparm3 function_1(type_1 *fs,size_t var_6)

{
  size_t var_3;
  type_2 var_7;
  char *var_5;
  int *piVar4;
  char *pcVar5;
  
  var_1(fs);
  var_3 = var_2(fs->buf,1,(int)fs->p - (int)fs->buf,(type_3 *)fs->stream);
  var_5 = fs->buf;
  if (var_3 != (int)fs->p - (int)var_5) {
    pcVar5 = fs->p + -var_3;
    fs->point_offs = fs->point_offs - var_3;
    fs->p = pcVar5;
    var_4(var_5,var_5 + var_3,(int)pcVar5 - (int)var_5);
    return 0;
  }
  fs->p = var_5;
  fs->point_offs = 0;
  var_7 = (int)fs->end - (int)var_5;
  if (var_6 <= var_7) {
    return 1;
  }
  if ((!var_8(var_6,var_7)) &&
     (var_5 = (char *)var_9(var_5,var_6 + var_7), var_5 != (char *)0x0)) {
    fs->buf = var_5;
    fs->end = var_5 + var_6 + var_7;
    fs->p = var_5;
    return 1;
  }
  piVar4 = var_10();
  *piVar4 = 0xc;
  return 0;
}


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

/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */

undefined4 __regparm3 MASKED(undefined4 *param_1,uint param_2)

{
  size_t sVar1;
  uint uVar2;
  void *pvVar3;
  int *piVar4;
  int iVar5;
  
  FUN_00027ad0(param_1);
  sVar1 = fwrite_unlocked((void *)param_1[6],1,param_1[7] - (int)param_1[6],(FILE *)*param_1);
  pvVar3 = (void *)param_1[6];
  if (sVar1 != param_1[7] - (int)pvVar3) {
    iVar5 = param_1[7] - sVar1;
    param_1[4] = param_1[4] - sVar1;
    param_1[7] = iVar5;
    memmove(pvVar3,(void *)(sVar1 + (int)pvVar3),iVar5 - (int)pvVar3);
    return 0;
  }
  param_1[7] = pvVar3;
  param_1[4] = 0;
  uVar2 = param_1[8] - (int)pvVar3;
  if (param_2 <= uVar2) {
    return 1;
  }
  if ((!CARRY4(param_2,uVar2)) && (pvVar3 = realloc(pvVar3,param_2 + uVar2), pvVar3 != (void *)0x0))
  {
    param_1[6] = pvVar3;
    param_1[8] = param_2 + uVar2 + (int)pvVar3;
    param_1[7] = pvVar3;
    return 1;
  }
  piVar4 = __errno_location();
  *piVar4 = 0xc;
  return 0;
}

