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

linebuffer * readlinebuffer_delim(linebuffer *linebuffer,FILE *stream,char delimiter)

{
  byte *pbVar1;
  size_t sVar2;
  char *pcVar3;
  uint uVar4;
  char *pcVar5;
  byte bVar6;
  uint uVar7;
  char *local_30;
  char *local_2c;
  
  pcVar5 = linebuffer->buffer;
  local_30 = pcVar5 + linebuffer->size;
  local_2c = pcVar5;
  if ((stream->_flags & 0x10) != 0) {
    return (linebuffer *)0x0;
  }
  do {
    pbVar1 = (byte *)stream->_IO_read_ptr;
    if (pbVar1 < stream->_IO_read_end) {
      stream->_IO_read_ptr = (char *)(pbVar1 + 1);
      uVar4 = (uint)*pbVar1;
LAB_00013069:
      pcVar3 = pcVar5;
      uVar7 = uVar4;
      bVar6 = (byte)uVar4;
      if (pcVar5 == local_30) goto LAB_000130c6;
    }
    else {
      uVar4 = __uflow((_IO_FILE *)stream);
      if (uVar4 != 0xffffffff) goto LAB_00013069;
      if (local_2c == pcVar5) {
        return (linebuffer *)0x0;
      }
      if ((stream->_flags & 0x20) != 0) {
        return (linebuffer *)0x0;
      }
      if (pcVar5[-1] == delimiter) goto LAB_0001312b;
      uVar7 = (int)delimiter;
      bVar6 = delimiter;
      if (pcVar5 != local_30) {
        *pcVar5 = delimiter;
        pcVar5 = pcVar5 + 1;
        goto LAB_0001312b;
      }
LAB_000130c6:
      sVar2 = linebuffer->size;
      local_2c = (char *)x2realloc(local_2c,&linebuffer->size);
      linebuffer->buffer = local_2c;
      local_30 = local_2c + linebuffer->size;
      uVar4 = (uint)bVar6;
      pcVar3 = local_2c + sVar2;
    }
    pcVar5 = pcVar3 + 1;
    *pcVar3 = (char)uVar4;
    if (uVar7 == (int)delimiter) {
LAB_0001312b:
      linebuffer->length = (int)pcVar5 - (int)local_2c;
      return linebuffer;
    }
  } while( true );
}



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

int * FUN_00013010(int *param_1,_IO_FILE *param_2,byte param_3)

{
  int iVar1;
  byte *pbVar2;
  uint uVar3;
  byte *pbVar4;
  byte bVar5;
  uint uVar6;
  byte *local_30;
  byte *local_2c;
  
  pbVar4 = (byte *)param_1[2];
  local_30 = pbVar4 + *param_1;
  local_2c = pbVar4;
  if ((param_2->_flags & 0x10) != 0) {
    return (int *)0x0;
  }
  do {
    pbVar2 = (byte *)param_2->_IO_read_ptr;
    if (pbVar2 < param_2->_IO_read_end) {
      param_2->_IO_read_ptr = (char *)(pbVar2 + 1);
      uVar3 = (uint)*pbVar2;
LAB_00013069:
      pbVar2 = pbVar4;
      uVar6 = uVar3;
      bVar5 = (byte)uVar3;
      if (pbVar4 == local_30) goto LAB_000130c6;
    }
    else {
      uVar3 = __uflow(param_2);
      if (uVar3 != 0xffffffff) goto LAB_00013069;
      if (local_2c == pbVar4) {
        return (int *)0x0;
      }
      if ((param_2->_flags & 0x20) != 0) {
        return (int *)0x0;
      }
      if (pbVar4[-1] == param_3) goto LAB_0001312b;
      uVar6 = (int)(char)param_3;
      bVar5 = param_3;
      if (pbVar4 != local_30) {
        *pbVar4 = param_3;
        pbVar4 = pbVar4 + 1;
        goto LAB_0001312b;
      }
LAB_000130c6:
      iVar1 = *param_1;
      local_2c = (byte *)FUN_00015d70(local_2c,param_1);
      param_1[2] = (int)local_2c;
      local_30 = local_2c + *param_1;
      uVar3 = (uint)bVar5;
      pbVar2 = local_2c + iVar1;
    }
    pbVar4 = pbVar2 + 1;
    *pbVar2 = (byte)uVar3;
    if (uVar6 == (int)(char)param_3) {
LAB_0001312b:
      param_1[1] = (int)pbVar4 - (int)local_2c;
      return param_1;
    }
  } while( true );
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x00011f70
ADD EBX,0xafe7
SUB ESP,0x2c
MOV EDI,dword ptr [ESP + 0x40]
MOV EAX,dword ptr [ESP + 0x48]
MOV ESI,dword ptr [ESP + 0x44]
MOV EBP,dword ptr [EDI + 0x8]
MOV EDI,dword ptr [EDI]
MOV dword ptr [ESP + 0x1c],EAX
MOV byte ptr [ESP + 0x1a],AL
MOVSX EAX,AL
ADD EDI,EBP
MOV dword ptr [ESP + 0x10],EBP
MOV dword ptr [ESP + 0xc],EDI
MOV dword ptr [ESP + 0x8],EAX
TEST byte ptr [ESI],0x10
JZ 0x00013084
JMP 0x00013110
LEA EDX,[EAX + 0x1]
MOV dword ptr [ESI + 0x4],EDX
MOVZX EDI,byte ptr [EAX]
MOV EDX,dword ptr [ESP + 0x8]
MOV ECX,EDI
CMP EBP,dword ptr [ESP + 0xc]
JZ 0x000130c6
MOV EAX,EBP
LEA EBP,[EAX + 0x1]
MOV byte ptr [EAX],CL
CMP EDI,EDX
JZ 0x00013140
MOV EAX,dword ptr [ESI + 0x4]
CMP EAX,dword ptr [ESI + 0x8]
JC 0x00013060
SUB ESP,0xc
PUSH ESI
CALL 0x000112c0
ADD ESP,0x10
MOV EDI,EAX
CMP EAX,-0x1
JNZ 0x00013069
CMP dword ptr [ESP + 0x10],EBP
JZ 0x00013110
TEST byte ptr [ESI],0x20
JNZ 0x00013110
MOVZX EAX,byte ptr [ESP + 0x1a]
CMP byte ptr [EBP + -0x1],AL
JZ 0x00013140
MOV EDI,dword ptr [ESP + 0x8]
CMP EBP,dword ptr [ESP + 0xc]
JNZ 0x00013120
MOV ECX,EAX
MOV EDX,EDI
MOV EAX,dword ptr [ESP + 0x40]
MOV byte ptr [ESP + 0x1b],CL
SUB ESP,0x8
MOV dword ptr [ESP + 0x1c],EDX
MOV EBP,dword ptr [EAX]
PUSH dword ptr [ESP + 0x48]
PUSH dword ptr [ESP + 0x1c]
CALL 0x00015d70
MOV EDX,dword ptr [ESP + 0x50]
MOV ECX,EAX
MOV dword ptr [ESP + 0x20],EAX
LEA EAX,[EAX + EBP*0x1]
MOV dword ptr [EDX + 0x8],ECX
ADD ECX,dword ptr [EDX]
MOV dword ptr [ESP + 0x1c],ECX
ADD ESP,0x10
MOV EDX,dword ptr [ESP + 0x14]
MOVZX ECX,byte ptr [ESP + 0x1b]
JMP 0x00013077
ADD ESP,0x2c
XOR EAX,EAX
POP EBX
POP ESI
POP EDI
POP EBP
RET
MOVZX EBX,byte ptr [ESP + 0x1c]
LEA EAX,[EBP + 0x1]
MOV byte ptr [EBP],BL
MOV EBX,dword ptr [ESP + 0x40]
SUB EAX,dword ptr [ESP + 0x10]
MOV dword ptr [EBX + 0x4],EAX
ADD ESP,0x2c
MOV EAX,EBX
POP EBX
POP ESI
POP EDI
POP EBP
RET
MOV EAX,EBP
JMP 0x0001312b
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nint * FUN_00013010(int *param_1,_IO_FILE *param_2,byte param_3)\n\n{\n  int iVar1;\n  byte *pbVar2;\n  uint uVar3;\n  byte *pbVar4;\n  byte bVar5;\n  uint uVar6;\n  byte *local_30;\n  byte *local_2c;\n  \n  pbVar4 = (byte *)param_1[2];\n  local_30 = pbVar4 + *param_1;\n  local_2c = pbVar4;\n  if ((param_2->_flags & 0x10) != 0) {\n    return (int *)0x0;\n  }\n  do {\n    pbVar2 = (byte *)param_2->_IO_read_ptr;\n    if (pbVar2 < param_2->_IO_read_end) {\n      param_2->_IO_read_ptr = (char *)(pbVar2 + 1);\n      uVar3 = (uint)*pbVar2;\nLAB_00013069:\n      pbVar2 = pbVar4;\n      uVar6 = uVar3;\n      bVar5 = (byte)uVar3;\n      if (pbVar4 == local_30) goto LAB_000130c6;\n    }\n    else {\n      uVar3 = __uflow(param_2);\n      if (uVar3 != 0xffffffff) goto LAB_00013069;\n      if (local_2c == pbVar4) {\n        return (int *)0x0;\n      }\n      if ((param_2->_flags & 0x20) != 0) {\n        return (int *)0x0;\n      }\n      if (pbVar4[-1] == param_3) goto LAB_0001312b;\n      uVar6 = (int)(char)param_3;\n      bVar5 = param_3;\n      if (pbVar4 != local_30) {\n        *pbVar4 = param_3;\n        pbVar4 = pbVar4 + 1;\n        goto LAB_0001312b;\n      }\nLAB_000130c6:\n      iVar1 = *param_1;\n      local_2c = (byte *)FUN_00015d70(local_2c,param_1);\n      param_1[2] = (int)local_2c;\n      local_30 = local_2c + *param_1;\n      uVar3 = (uint)bVar5;\n      pbVar2 = local_2c + iVar1;\n    }\n    pbVar4 = pbVar2 + 1;\n    *pbVar2 = (byte)uVar3;\n    if (uVar6 == (int)(char)param_3) {\nLAB_0001312b:\n      param_1[1] = (int)pbVar4 - (int)local_2c;\n      return param_1;\n    }\n  } while( true );\n}\n\n" comment (function_definition "int * FUN_00013010(int *param_1,_IO_FILE *param_2,byte param_3)\n\n{\n  int iVar1;\n  byte *pbVar2;\n  uint uVar3;\n  byte *pbVar4;\n  byte bVar5;\n  uint uVar6;\n  byte *local_30;\n  byte *local_2c;\n  \n  pbVar4 = (byte *)param_1[2];\n  local_30 = pbVar4 + *param_1;\n  local_2c = pbVar4;\n  if ((param_2->_flags & 0x10) != 0) {\n    return (int *)0x0;\n  }\n  do {\n    pbVar2 = (byte *)param_2->_IO_read_ptr;\n    if (pbVar2 < param_2->_IO_read_end) {\n      param_2->_IO_read_ptr = (char *)(pbVar2 + 1);\n      uVar3 = (uint)*pbVar2;\nLAB_00013069:\n      pbVar2 = pbVar4;\n      uVar6 = uVar3;\n      bVar5 = (byte)uVar3;\n      if (pbVar4 == local_30) goto LAB_000130c6;\n    }\n    else {\n      uVar3 = __uflow(param_2);\n      if (uVar3 != 0xffffffff) goto LAB_00013069;\n      if (local_2c == pbVar4) {\n        return (int *)0x0;\n      }\n      if ((param_2->_flags & 0x20) != 0) {\n        return (int *)0x0;\n      }\n      if (pbVar4[-1] == param_3) goto LAB_0001312b;\n      uVar6 = (int)(char)param_3;\n      bVar5 = param_3;\n      if (pbVar4 != local_30) {\n        *pbVar4 = param_3;\n        pbVar4 = pbVar4 + 1;\n        goto LAB_0001312b;\n      }\nLAB_000130c6:\n      iVar1 = *param_1;\n      local_2c = (byte *)FUN_00015d70(local_2c,param_1);\n      param_1[2] = (int)local_2c;\n      local_30 = local_2c + *param_1;\n      uVar3 = (uint)bVar5;\n      pbVar2 = local_2c + iVar1;\n    }\n    pbVar4 = pbVar2 + 1;\n    *pbVar2 = (byte)uVar3;\n    if (uVar6 == (int)(char)param_3) {\nLAB_0001312b:\n      param_1[1] = (int)pbVar4 - (int)local_2c;\n      return param_1;\n    }\n  } while( true );\n}" primitive_type (pointer_declarator "* FUN_00013010(int *param_1,_IO_FILE *param_2,byte param_3)" * (function_declarator "FUN_00013010(int *param_1,_IO_FILE *param_2,byte param_3)" identifier (parameter_list "(int *param_1,_IO_FILE *param_2,byte param_3)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "_IO_FILE *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "byte param_3" type_identifier identifier) )))) (compound_statement "{\n  int iVar1;\n  byte *pbVar2;\n  uint uVar3;\n  byte *pbVar4;\n  byte bVar5;\n  uint uVar6;\n  byte *local_30;\n  byte *local_2c;\n  \n  pbVar4 = (byte *)param_1[2];\n  local_30 = pbVar4 + *param_1;\n  local_2c = pbVar4;\n  if ((param_2->_flags & 0x10) != 0) {\n    return (int *)0x0;\n  }\n  do {\n    pbVar2 = (byte *)param_2->_IO_read_ptr;\n    if (pbVar2 < param_2->_IO_read_end) {\n      param_2->_IO_read_ptr = (char *)(pbVar2 + 1);\n      uVar3 = (uint)*pbVar2;\nLAB_00013069:\n      pbVar2 = pbVar4;\n      uVar6 = uVar3;\n      bVar5 = (byte)uVar3;\n      if (pbVar4 == local_30) goto LAB_000130c6;\n    }\n    else {\n      uVar3 = __uflow(param_2);\n      if (uVar3 != 0xffffffff) goto LAB_00013069;\n      if (local_2c == pbVar4) {\n        return (int *)0x0;\n      }\n      if ((param_2->_flags & 0x20) != 0) {\n        return (int *)0x0;\n      }\n      if (pbVar4[-1] == param_3) goto LAB_0001312b;\n      uVar6 = (int)(char)param_3;\n      bVar5 = param_3;\n      if (pbVar4 != local_30) {\n        *pbVar4 = param_3;\n        pbVar4 = pbVar4 + 1;\n        goto LAB_0001312b;\n      }\nLAB_000130c6:\n      iVar1 = *param_1;\n      local_2c = (byte *)FUN_00015d70(local_2c,param_1);\n      param_1[2] = (int)local_2c;\n      local_30 = local_2c + *param_1;\n      uVar3 = (uint)bVar5;\n      pbVar2 = local_2c + iVar1;\n    }\n    pbVar4 = pbVar2 + 1;\n    *pbVar2 = (byte)uVar3;\n    if (uVar6 == (int)(char)param_3) {\nLAB_0001312b:\n      param_1[1] = (int)pbVar4 - (int)local_2c;\n      return param_1;\n    }\n  } while( true );\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "byte *pbVar2;" type_identifier (pointer_declarator "*pbVar2" * identifier) ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "byte *pbVar4;" type_identifier (pointer_declarator "*pbVar4" * identifier) ;) (declaration "byte bVar5;" type_identifier identifier ;) (declaration "uint uVar6;" type_identifier identifier ;) (declaration "byte *local_30;" type_identifier (pointer_declarator "*local_30" * identifier) ;) (declaration "byte *local_2c;" type_identifier (pointer_declarator "*local_2c" * identifier) ;) (expression_statement "pbVar4 = (byte *)param_1[2];" (assignment_expression "pbVar4 = (byte *)param_1[2]" identifier = (cast_expression "(byte *)param_1[2]" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "param_1[2]" identifier [ number_literal ]))) ;) (expression_statement "local_30 = pbVar4 + *param_1;" (assignment_expression "local_30 = pbVar4 + *param_1" identifier = (binary_expression "pbVar4 + *param_1" identifier + (pointer_expression "*param_1" * identifier))) ;) (expression_statement "local_2c = pbVar4;" (assignment_expression "local_2c = pbVar4" identifier = identifier) ;) (if_statement "if ((param_2->_flags & 0x10) != 0) {\n    return (int *)0x0;\n  }" if (parenthesized_expression "((param_2->_flags & 0x10) != 0)" ( (binary_expression "(param_2->_flags & 0x10) != 0" (parenthesized_expression "(param_2->_flags & 0x10)" ( (binary_expression "param_2->_flags & 0x10" (field_expression "param_2->_flags" identifier -> field_identifier) & number_literal) )) != number_literal) )) (compound_statement "{\n    return (int *)0x0;\n  }" { (return_statement "return (int *)0x0;" return (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal) ;) })) (do_statement "do {\n    pbVar2 = (byte *)param_2->_IO_read_ptr;\n    if (pbVar2 < param_2->_IO_read_end) {\n      param_2->_IO_read_ptr = (char *)(pbVar2 + 1);\n      uVar3 = (uint)*pbVar2;\nLAB_00013069:\n      pbVar2 = pbVar4;\n      uVar6 = uVar3;\n      bVar5 = (byte)uVar3;\n      if (pbVar4 == local_30) goto LAB_000130c6;\n    }\n    else {\n      uVar3 = __uflow(param_2);\n      if (uVar3 != 0xffffffff) goto LAB_00013069;\n      if (local_2c == pbVar4) {\n        return (int *)0x0;\n      }\n      if ((param_2->_flags & 0x20) != 0) {\n        return (int *)0x0;\n      }\n      if (pbVar4[-1] == param_3) goto LAB_0001312b;\n      uVar6 = (int)(char)param_3;\n      bVar5 = param_3;\n      if (pbVar4 != local_30) {\n        *pbVar4 = param_3;\n        pbVar4 = pbVar4 + 1;\n        goto LAB_0001312b;\n      }\nLAB_000130c6:\n      iVar1 = *param_1;\n      local_2c = (byte *)FUN_00015d70(local_2c,param_1);\n      param_1[2] = (int)local_2c;\n      local_30 = local_2c + *param_1;\n      uVar3 = (uint)bVar5;\n      pbVar2 = local_2c + iVar1;\n    }\n    pbVar4 = pbVar2 + 1;\n    *pbVar2 = (byte)uVar3;\n    if (uVar6 == (int)(char)param_3) {\nLAB_0001312b:\n      param_1[1] = (int)pbVar4 - (int)local_2c;\n      return param_1;\n    }\n  } while( true );" do (compound_statement "{\n    pbVar2 = (byte *)param_2->_IO_read_ptr;\n    if (pbVar2 < param_2->_IO_read_end) {\n      param_2->_IO_read_ptr = (char *)(pbVar2 + 1);\n      uVar3 = (uint)*pbVar2;\nLAB_00013069:\n      pbVar2 = pbVar4;\n      uVar6 = uVar3;\n      bVar5 = (byte)uVar3;\n      if (pbVar4 == local_30) goto LAB_000130c6;\n    }\n    else {\n      uVar3 = __uflow(param_2);\n      if (uVar3 != 0xffffffff) goto LAB_00013069;\n      if (local_2c == pbVar4) {\n        return (int *)0x0;\n      }\n      if ((param_2->_flags & 0x20) != 0) {\n        return (int *)0x0;\n      }\n      if (pbVar4[-1] == param_3) goto LAB_0001312b;\n      uVar6 = (int)(char)param_3;\n      bVar5 = param_3;\n      if (pbVar4 != local_30) {\n        *pbVar4 = param_3;\n        pbVar4 = pbVar4 + 1;\n        goto LAB_0001312b;\n      }\nLAB_000130c6:\n      iVar1 = *param_1;\n      local_2c = (byte *)FUN_00015d70(local_2c,param_1);\n      param_1[2] = (int)local_2c;\n      local_30 = local_2c + *param_1;\n      uVar3 = (uint)bVar5;\n      pbVar2 = local_2c + iVar1;\n    }\n    pbVar4 = pbVar2 + 1;\n    *pbVar2 = (byte)uVar3;\n    if (uVar6 == (int)(char)param_3) {\nLAB_0001312b:\n      param_1[1] = (int)pbVar4 - (int)local_2c;\n      return param_1;\n    }\n  }" { (expression_statement "pbVar2 = (byte *)param_2->_IO_read_ptr;" (assignment_expression "pbVar2 = (byte *)param_2->_IO_read_ptr" identifier = (cast_expression "(byte *)param_2->_IO_read_ptr" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (field_expression "param_2->_IO_read_ptr" identifier -> field_identifier))) ;) (if_statement "if (pbVar2 < param_2->_IO_read_end) {\n      param_2->_IO_read_ptr = (char *)(pbVar2 + 1);\n      uVar3 = (uint)*pbVar2;\nLAB_00013069:\n      pbVar2 = pbVar4;\n      uVar6 = uVar3;\n      bVar5 = (byte)uVar3;\n      if (pbVar4 == local_30) goto LAB_000130c6;\n    }\n    else {\n      uVar3 = __uflow(param_2);\n      if (uVar3 != 0xffffffff) goto LAB_00013069;\n      if (local_2c == pbVar4) {\n        return (int *)0x0;\n      }\n      if ((param_2->_flags & 0x20) != 0) {\n        return (int *)0x0;\n      }\n      if (pbVar4[-1] == param_3) goto LAB_0001312b;\n      uVar6 = (int)(char)param_3;\n      bVar5 = param_3;\n      if (pbVar4 != local_30) {\n        *pbVar4 = param_3;\n        pbVar4 = pbVar4 + 1;\n        goto LAB_0001312b;\n      }\nLAB_000130c6:\n      iVar1 = *param_1;\n      local_2c = (byte *)FUN_00015d70(local_2c,param_1);\n      param_1[2] = (int)local_2c;\n      local_30 = local_2c + *param_1;\n      uVar3 = (uint)bVar5;\n      pbVar2 = local_2c + iVar1;\n    }" if (parenthesized_expression "(pbVar2 < param_2->_IO_read_end)" ( (binary_expression "pbVar2 < param_2->_IO_read_end" identifier < (field_expression "param_2->_IO_read_end" identifier -> field_identifier)) )) (compound_statement "{\n      param_2->_IO_read_ptr = (char *)(pbVar2 + 1);\n      uVar3 = (uint)*pbVar2;\nLAB_00013069:\n      pbVar2 = pbVar4;\n      uVar6 = uVar3;\n      bVar5 = (byte)uVar3;\n      if (pbVar4 == local_30) goto LAB_000130c6;\n    }" { (expression_statement "param_2->_IO_read_ptr = (char *)(pbVar2 + 1);" (assignment_expression "param_2->_IO_read_ptr = (char *)(pbVar2 + 1)" (field_expression "param_2->_IO_read_ptr" identifier -> field_identifier) = (cast_expression "(char *)(pbVar2 + 1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(pbVar2 + 1)" ( (binary_expression "pbVar2 + 1" identifier + number_literal) )))) ;) (expression_statement "uVar3 = (uint)*pbVar2;" (assignment_expression "uVar3 = (uint)*pbVar2" identifier = (binary_expression "(uint)*pbVar2" (parenthesized_expression "(uint)" ( identifier )) * identifier)) ;) (labeled_statement "LAB_00013069:\n      pbVar2 = pbVar4;" statement_identifier : (expression_statement "pbVar2 = pbVar4;" (assignment_expression "pbVar2 = pbVar4" identifier = identifier) ;)) (expression_statement "uVar6 = uVar3;" (assignment_expression "uVar6 = uVar3" identifier = identifier) ;) (expression_statement "bVar5 = (byte)uVar3;" (assignment_expression "bVar5 = (byte)uVar3" identifier = (cast_expression "(byte)uVar3" ( (type_descriptor "byte" type_identifier) ) identifier)) ;) (if_statement "if (pbVar4 == local_30) goto LAB_000130c6;" if (parenthesized_expression "(pbVar4 == local_30)" ( (binary_expression "pbVar4 == local_30" identifier == identifier) )) (goto_statement "goto LAB_000130c6;" goto statement_identifier ;)) }) (else_clause "else {\n      uVar3 = __uflow(param_2);\n      if (uVar3 != 0xffffffff) goto LAB_00013069;\n      if (local_2c == pbVar4) {\n        return (int *)0x0;\n      }\n      if ((param_2->_flags & 0x20) != 0) {\n        return (int *)0x0;\n      }\n      if (pbVar4[-1] == param_3) goto LAB_0001312b;\n      uVar6 = (int)(char)param_3;\n      bVar5 = param_3;\n      if (pbVar4 != local_30) {\n        *pbVar4 = param_3;\n        pbVar4 = pbVar4 + 1;\n        goto LAB_0001312b;\n      }\nLAB_000130c6:\n      iVar1 = *param_1;\n      local_2c = (byte *)FUN_00015d70(local_2c,param_1);\n      param_1[2] = (int)local_2c;\n      local_30 = local_2c + *param_1;\n      uVar3 = (uint)bVar5;\n      pbVar2 = local_2c + iVar1;\n    }" else (compound_statement "{\n      uVar3 = __uflow(param_2);\n      if (uVar3 != 0xffffffff) goto LAB_00013069;\n      if (local_2c == pbVar4) {\n        return (int *)0x0;\n      }\n      if ((param_2->_flags & 0x20) != 0) {\n        return (int *)0x0;\n      }\n      if (pbVar4[-1] == param_3) goto LAB_0001312b;\n      uVar6 = (int)(char)param_3;\n      bVar5 = param_3;\n      if (pbVar4 != local_30) {\n        *pbVar4 = param_3;\n        pbVar4 = pbVar4 + 1;\n        goto LAB_0001312b;\n      }\nLAB_000130c6:\n      iVar1 = *param_1;\n      local_2c = (byte *)FUN_00015d70(local_2c,param_1);\n      param_1[2] = (int)local_2c;\n      local_30 = local_2c + *param_1;\n      uVar3 = (uint)bVar5;\n      pbVar2 = local_2c + iVar1;\n    }" { (expression_statement "uVar3 = __uflow(param_2);" (assignment_expression "uVar3 = __uflow(param_2)" identifier = (call_expression "__uflow(param_2)" identifier (argument_list "(param_2)" ( identifier )))) ;) (if_statement "if (uVar3 != 0xffffffff) goto LAB_00013069;" if (parenthesized_expression "(uVar3 != 0xffffffff)" ( (binary_expression "uVar3 != 0xffffffff" identifier != number_literal) )) (goto_statement "goto LAB_00013069;" goto statement_identifier ;)) (if_statement "if (local_2c == pbVar4) {\n        return (int *)0x0;\n      }" if (parenthesized_expression "(local_2c == pbVar4)" ( (binary_expression "local_2c == pbVar4" identifier == identifier) )) (compound_statement "{\n        return (int *)0x0;\n      }" { (return_statement "return (int *)0x0;" return (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal) ;) })) (if_statement "if ((param_2->_flags & 0x20) != 0) {\n        return (int *)0x0;\n      }" if (parenthesized_expression "((param_2->_flags & 0x20) != 0)" ( (binary_expression "(param_2->_flags & 0x20) != 0" (parenthesized_expression "(param_2->_flags & 0x20)" ( (binary_expression "param_2->_flags & 0x20" (field_expression "param_2->_flags" identifier -> field_identifier) & number_literal) )) != number_literal) )) (compound_statement "{\n        return (int *)0x0;\n      }" { (return_statement "return (int *)0x0;" return (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal) ;) })) (if_statement "if (pbVar4[-1] == param_3) goto LAB_0001312b;" if (parenthesized_expression "(pbVar4[-1] == param_3)" ( (binary_expression "pbVar4[-1] == param_3" (subscript_expression "pbVar4[-1]" identifier [ number_literal ]) == identifier) )) (goto_statement "goto LAB_0001312b;" goto statement_identifier ;)) (expression_statement "uVar6 = (int)(char)param_3;" (assignment_expression "uVar6 = (int)(char)param_3" identifier = (cast_expression "(int)(char)param_3" ( (type_descriptor "int" primitive_type) ) (cast_expression "(char)param_3" ( (type_descriptor "char" primitive_type) ) identifier))) ;) (expression_statement "bVar5 = param_3;" (assignment_expression "bVar5 = param_3" identifier = identifier) ;) (if_statement "if (pbVar4 != local_30) {\n        *pbVar4 = param_3;\n        pbVar4 = pbVar4 + 1;\n        goto LAB_0001312b;\n      }" if (parenthesized_expression "(pbVar4 != local_30)" ( (binary_expression "pbVar4 != local_30" identifier != identifier) )) (compound_statement "{\n        *pbVar4 = param_3;\n        pbVar4 = pbVar4 + 1;\n        goto LAB_0001312b;\n      }" { (expression_statement "*pbVar4 = param_3;" (assignment_expression "*pbVar4 = param_3" (pointer_expression "*pbVar4" * identifier) = identifier) ;) (expression_statement "pbVar4 = pbVar4 + 1;" (assignment_expression "pbVar4 = pbVar4 + 1" identifier = (binary_expression "pbVar4 + 1" identifier + number_literal)) ;) (goto_statement "goto LAB_0001312b;" goto statement_identifier ;) })) (labeled_statement "LAB_000130c6:\n      iVar1 = *param_1;" statement_identifier : (expression_statement "iVar1 = *param_1;" (assignment_expression "iVar1 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;)) (expression_statement "local_2c = (byte *)FUN_00015d70(local_2c,param_1);" (assignment_expression "local_2c = (byte *)FUN_00015d70(local_2c,param_1)" identifier = (cast_expression "(byte *)FUN_00015d70(local_2c,param_1)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_00015d70(local_2c,param_1)" identifier (argument_list "(local_2c,param_1)" ( identifier , identifier ))))) ;) (expression_statement "param_1[2] = (int)local_2c;" (assignment_expression "param_1[2] = (int)local_2c" (subscript_expression "param_1[2]" identifier [ number_literal ]) = (cast_expression "(int)local_2c" ( (type_descriptor "int" primitive_type) ) identifier)) ;) (expression_statement "local_30 = local_2c + *param_1;" (assignment_expression "local_30 = local_2c + *param_1" identifier = (binary_expression "local_2c + *param_1" identifier + (pointer_expression "*param_1" * identifier))) ;) (expression_statement "uVar3 = (uint)bVar5;" (assignment_expression "uVar3 = (uint)bVar5" identifier = (cast_expression "(uint)bVar5" ( (type_descriptor "uint" type_identifier) ) identifier)) ;) (expression_statement "pbVar2 = local_2c + iVar1;" (assignment_expression "pbVar2 = local_2c + iVar1" identifier = (binary_expression "local_2c + iVar1" identifier + identifier)) ;) }))) (expression_statement "pbVar4 = pbVar2 + 1;" (assignment_expression "pbVar4 = pbVar2 + 1" identifier = (binary_expression "pbVar2 + 1" identifier + number_literal)) ;) (expression_statement "*pbVar2 = (byte)uVar3;" (assignment_expression "*pbVar2 = (byte)uVar3" (pointer_expression "*pbVar2" * identifier) = (cast_expression "(byte)uVar3" ( (type_descriptor "byte" type_identifier) ) identifier)) ;) (if_statement "if (uVar6 == (int)(char)param_3) {\nLAB_0001312b:\n      param_1[1] = (int)pbVar4 - (int)local_2c;\n      return param_1;\n    }" if (parenthesized_expression "(uVar6 == (int)(char)param_3)" ( (binary_expression "uVar6 == (int)(char)param_3" identifier == (cast_expression "(int)(char)param_3" ( (type_descriptor "int" primitive_type) ) (cast_expression "(char)param_3" ( (type_descriptor "char" primitive_type) ) identifier))) )) (compound_statement "{\nLAB_0001312b:\n      param_1[1] = (int)pbVar4 - (int)local_2c;\n      return param_1;\n    }" { (labeled_statement "LAB_0001312b:\n      param_1[1] = (int)pbVar4 - (int)local_2c;" statement_identifier : (expression_statement "param_1[1] = (int)pbVar4 - (int)local_2c;" (assignment_expression "param_1[1] = (int)pbVar4 - (int)local_2c" (subscript_expression "param_1[1]" identifier [ number_literal ]) = (binary_expression "(int)pbVar4 - (int)local_2c" (cast_expression "(int)pbVar4" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)local_2c" ( (type_descriptor "int" primitive_type) ) identifier))) ;)) (return_statement "return param_1;" return identifier ;) })) }) while (parenthesized_expression "( true )" ( true )) ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n\nlinebuffer * readlinebuffer_delim(linebuffer *linebuffer,FILE *stream,char delimiter)\n\n{\n  byte *pbVar1;\n  size_t sVar2;\n  char *pcVar3;\n  uint uVar4;\n  char *pcVar5;\n  byte bVar6;\n  uint uVar7;\n  char *local_30;\n  char *local_2c;\n  \n  pcVar5 = linebuffer->buffer;\n  local_30 = pcVar5 + linebuffer->size;\n  local_2c = pcVar5;\n  if ((stream->_flags & 0x10) != 0) {\n    return (linebuffer *)0x0;\n  }\n  do {\n    pbVar1 = (byte *)stream->_IO_read_ptr;\n    if (pbVar1 < stream->_IO_read_end) {\n      stream->_IO_read_ptr = (char *)(pbVar1 + 1);\n      uVar4 = (uint)*pbVar1;\nLAB_00013069:\n      pcVar3 = pcVar5;\n      uVar7 = uVar4;\n      bVar6 = (byte)uVar4;\n      if (pcVar5 == local_30) goto LAB_000130c6;\n    }\n    else {\n      uVar4 = __uflow((_IO_FILE *)stream);\n      if (uVar4 != 0xffffffff) goto LAB_00013069;\n      if (local_2c == pcVar5) {\n        return (linebuffer *)0x0;\n      }\n      if ((stream->_flags & 0x20) != 0) {\n        return (linebuffer *)0x0;\n      }\n      if (pcVar5[-1] == delimiter) goto LAB_0001312b;\n      uVar7 = (int)delimiter;\n      bVar6 = delimiter;\n      if (pcVar5 != local_30) {\n        *pcVar5 = delimiter;\n        pcVar5 = pcVar5 + 1;\n        goto LAB_0001312b;\n      }\nLAB_000130c6:\n      sVar2 = linebuffer->size;\n      local_2c = (char *)x2realloc(local_2c,&linebuffer->size);\n      linebuffer->buffer = local_2c;\n      local_30 = local_2c + linebuffer->size;\n      uVar4 = (uint)bVar6;\n      pcVar3 = local_2c + sVar2;\n    }\n    pcVar5 = pcVar3 + 1;\n    *pcVar3 = (char)uVar4;\n    if (uVar7 == (int)delimiter) {\nLAB_0001312b:\n      linebuffer->length = (int)pcVar5 - (int)local_2c;\n      return linebuffer;\n    }\n  } while( true );\n}\n\n" comment comment (function_definition "linebuffer * readlinebuffer_delim(linebuffer *linebuffer,FILE *stream,char delimiter)\n\n{\n  byte *pbVar1;\n  size_t sVar2;\n  char *pcVar3;\n  uint uVar4;\n  char *pcVar5;\n  byte bVar6;\n  uint uVar7;\n  char *local_30;\n  char *local_2c;\n  \n  pcVar5 = linebuffer->buffer;\n  local_30 = pcVar5 + linebuffer->size;\n  local_2c = pcVar5;\n  if ((stream->_flags & 0x10) != 0) {\n    return (linebuffer *)0x0;\n  }\n  do {\n    pbVar1 = (byte *)stream->_IO_read_ptr;\n    if (pbVar1 < stream->_IO_read_end) {\n      stream->_IO_read_ptr = (char *)(pbVar1 + 1);\n      uVar4 = (uint)*pbVar1;\nLAB_00013069:\n      pcVar3 = pcVar5;\n      uVar7 = uVar4;\n      bVar6 = (byte)uVar4;\n      if (pcVar5 == local_30) goto LAB_000130c6;\n    }\n    else {\n      uVar4 = __uflow((_IO_FILE *)stream);\n      if (uVar4 != 0xffffffff) goto LAB_00013069;\n      if (local_2c == pcVar5) {\n        return (linebuffer *)0x0;\n      }\n      if ((stream->_flags & 0x20) != 0) {\n        return (linebuffer *)0x0;\n      }\n      if (pcVar5[-1] == delimiter) goto LAB_0001312b;\n      uVar7 = (int)delimiter;\n      bVar6 = delimiter;\n      if (pcVar5 != local_30) {\n        *pcVar5 = delimiter;\n        pcVar5 = pcVar5 + 1;\n        goto LAB_0001312b;\n      }\nLAB_000130c6:\n      sVar2 = linebuffer->size;\n      local_2c = (char *)x2realloc(local_2c,&linebuffer->size);\n      linebuffer->buffer = local_2c;\n      local_30 = local_2c + linebuffer->size;\n      uVar4 = (uint)bVar6;\n      pcVar3 = local_2c + sVar2;\n    }\n    pcVar5 = pcVar3 + 1;\n    *pcVar3 = (char)uVar4;\n    if (uVar7 == (int)delimiter) {\nLAB_0001312b:\n      linebuffer->length = (int)pcVar5 - (int)local_2c;\n      return linebuffer;\n    }\n  } while( true );\n}" type_identifier (pointer_declarator "* readlinebuffer_delim(linebuffer *linebuffer,FILE *stream,char delimiter)" * (function_declarator "readlinebuffer_delim(linebuffer *linebuffer,FILE *stream,char delimiter)" identifier (parameter_list "(linebuffer *linebuffer,FILE *stream,char delimiter)" ( (parameter_declaration "linebuffer *linebuffer" type_identifier (pointer_declarator "*linebuffer" * identifier)) , (parameter_declaration "FILE *stream" type_identifier (pointer_declarator "*stream" * identifier)) , (parameter_declaration "char delimiter" primitive_type identifier) )))) (compound_statement "{\n  byte *pbVar1;\n  size_t sVar2;\n  char *pcVar3;\n  uint uVar4;\n  char *pcVar5;\n  byte bVar6;\n  uint uVar7;\n  char *local_30;\n  char *local_2c;\n  \n  pcVar5 = linebuffer->buffer;\n  local_30 = pcVar5 + linebuffer->size;\n  local_2c = pcVar5;\n  if ((stream->_flags & 0x10) != 0) {\n    return (linebuffer *)0x0;\n  }\n  do {\n    pbVar1 = (byte *)stream->_IO_read_ptr;\n    if (pbVar1 < stream->_IO_read_end) {\n      stream->_IO_read_ptr = (char *)(pbVar1 + 1);\n      uVar4 = (uint)*pbVar1;\nLAB_00013069:\n      pcVar3 = pcVar5;\n      uVar7 = uVar4;\n      bVar6 = (byte)uVar4;\n      if (pcVar5 == local_30) goto LAB_000130c6;\n    }\n    else {\n      uVar4 = __uflow((_IO_FILE *)stream);\n      if (uVar4 != 0xffffffff) goto LAB_00013069;\n      if (local_2c == pcVar5) {\n        return (linebuffer *)0x0;\n      }\n      if ((stream->_flags & 0x20) != 0) {\n        return (linebuffer *)0x0;\n      }\n      if (pcVar5[-1] == delimiter) goto LAB_0001312b;\n      uVar7 = (int)delimiter;\n      bVar6 = delimiter;\n      if (pcVar5 != local_30) {\n        *pcVar5 = delimiter;\n        pcVar5 = pcVar5 + 1;\n        goto LAB_0001312b;\n      }\nLAB_000130c6:\n      sVar2 = linebuffer->size;\n      local_2c = (char *)x2realloc(local_2c,&linebuffer->size);\n      linebuffer->buffer = local_2c;\n      local_30 = local_2c + linebuffer->size;\n      uVar4 = (uint)bVar6;\n      pcVar3 = local_2c + sVar2;\n    }\n    pcVar5 = pcVar3 + 1;\n    *pcVar3 = (char)uVar4;\n    if (uVar7 == (int)delimiter) {\nLAB_0001312b:\n      linebuffer->length = (int)pcVar5 - (int)local_2c;\n      return linebuffer;\n    }\n  } while( true );\n}" { (declaration "byte *pbVar1;" type_identifier (pointer_declarator "*pbVar1" * identifier) ;) (declaration "size_t sVar2;" primitive_type identifier ;) (declaration "char *pcVar3;" primitive_type (pointer_declarator "*pcVar3" * identifier) ;) (declaration "uint uVar4;" type_identifier identifier ;) (declaration "char *pcVar5;" primitive_type (pointer_declarator "*pcVar5" * identifier) ;) (declaration "byte bVar6;" type_identifier identifier ;) (declaration "uint uVar7;" type_identifier identifier ;) (declaration "char *local_30;" primitive_type (pointer_declarator "*local_30" * identifier) ;) (declaration "char *local_2c;" primitive_type (pointer_declarator "*local_2c" * identifier) ;) (expression_statement "pcVar5 = linebuffer->buffer;" (assignment_expression "pcVar5 = linebuffer->buffer" identifier = (field_expression "linebuffer->buffer" identifier -> field_identifier)) ;) (expression_statement "local_30 = pcVar5 + linebuffer->size;" (assignment_expression "local_30 = pcVar5 + linebuffer->size" identifier = (binary_expression "pcVar5 + linebuffer->size" identifier + (field_expression "linebuffer->size" identifier -> field_identifier))) ;) (expression_statement "local_2c = pcVar5;" (assignment_expression "local_2c = pcVar5" identifier = identifier) ;) (if_statement "if ((stream->_flags & 0x10) != 0) {\n    return (linebuffer *)0x0;\n  }" if (parenthesized_expression "((stream->_flags & 0x10) != 0)" ( (binary_expression "(stream->_flags & 0x10) != 0" (parenthesized_expression "(stream->_flags & 0x10)" ( (binary_expression "stream->_flags & 0x10" (field_expression "stream->_flags" identifier -> field_identifier) & number_literal) )) != number_literal) )) (compound_statement "{\n    return (linebuffer *)0x0;\n  }" { (return_statement "return (linebuffer *)0x0;" return (cast_expression "(linebuffer *)0x0" ( (type_descriptor "linebuffer *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) ;) })) (do_statement "do {\n    pbVar1 = (byte *)stream->_IO_read_ptr;\n    if (pbVar1 < stream->_IO_read_end) {\n      stream->_IO_read_ptr = (char *)(pbVar1 + 1);\n      uVar4 = (uint)*pbVar1;\nLAB_00013069:\n      pcVar3 = pcVar5;\n      uVar7 = uVar4;\n      bVar6 = (byte)uVar4;\n      if (pcVar5 == local_30) goto LAB_000130c6;\n    }\n    else {\n      uVar4 = __uflow((_IO_FILE *)stream);\n      if (uVar4 != 0xffffffff) goto LAB_00013069;\n      if (local_2c == pcVar5) {\n        return (linebuffer *)0x0;\n      }\n      if ((stream->_flags & 0x20) != 0) {\n        return (linebuffer *)0x0;\n      }\n      if (pcVar5[-1] == delimiter) goto LAB_0001312b;\n      uVar7 = (int)delimiter;\n      bVar6 = delimiter;\n      if (pcVar5 != local_30) {\n        *pcVar5 = delimiter;\n        pcVar5 = pcVar5 + 1;\n        goto LAB_0001312b;\n      }\nLAB_000130c6:\n      sVar2 = linebuffer->size;\n      local_2c = (char *)x2realloc(local_2c,&linebuffer->size);\n      linebuffer->buffer = local_2c;\n      local_30 = local_2c + linebuffer->size;\n      uVar4 = (uint)bVar6;\n      pcVar3 = local_2c + sVar2;\n    }\n    pcVar5 = pcVar3 + 1;\n    *pcVar3 = (char)uVar4;\n    if (uVar7 == (int)delimiter) {\nLAB_0001312b:\n      linebuffer->length = (int)pcVar5 - (int)local_2c;\n      return linebuffer;\n    }\n  } while( true );" do (compound_statement "{\n    pbVar1 = (byte *)stream->_IO_read_ptr;\n    if (pbVar1 < stream->_IO_read_end) {\n      stream->_IO_read_ptr = (char *)(pbVar1 + 1);\n      uVar4 = (uint)*pbVar1;\nLAB_00013069:\n      pcVar3 = pcVar5;\n      uVar7 = uVar4;\n      bVar6 = (byte)uVar4;\n      if (pcVar5 == local_30) goto LAB_000130c6;\n    }\n    else {\n      uVar4 = __uflow((_IO_FILE *)stream);\n      if (uVar4 != 0xffffffff) goto LAB_00013069;\n      if (local_2c == pcVar5) {\n        return (linebuffer *)0x0;\n      }\n      if ((stream->_flags & 0x20) != 0) {\n        return (linebuffer *)0x0;\n      }\n      if (pcVar5[-1] == delimiter) goto LAB_0001312b;\n      uVar7 = (int)delimiter;\n      bVar6 = delimiter;\n      if (pcVar5 != local_30) {\n        *pcVar5 = delimiter;\n        pcVar5 = pcVar5 + 1;\n        goto LAB_0001312b;\n      }\nLAB_000130c6:\n      sVar2 = linebuffer->size;\n      local_2c = (char *)x2realloc(local_2c,&linebuffer->size);\n      linebuffer->buffer = local_2c;\n      local_30 = local_2c + linebuffer->size;\n      uVar4 = (uint)bVar6;\n      pcVar3 = local_2c + sVar2;\n    }\n    pcVar5 = pcVar3 + 1;\n    *pcVar3 = (char)uVar4;\n    if (uVar7 == (int)delimiter) {\nLAB_0001312b:\n      linebuffer->length = (int)pcVar5 - (int)local_2c;\n      return linebuffer;\n    }\n  }" { (expression_statement "pbVar1 = (byte *)stream->_IO_read_ptr;" (assignment_expression "pbVar1 = (byte *)stream->_IO_read_ptr" identifier = (cast_expression "(byte *)stream->_IO_read_ptr" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (field_expression "stream->_IO_read_ptr" identifier -> field_identifier))) ;) (if_statement "if (pbVar1 < stream->_IO_read_end) {\n      stream->_IO_read_ptr = (char *)(pbVar1 + 1);\n      uVar4 = (uint)*pbVar1;\nLAB_00013069:\n      pcVar3 = pcVar5;\n      uVar7 = uVar4;\n      bVar6 = (byte)uVar4;\n      if (pcVar5 == local_30) goto LAB_000130c6;\n    }\n    else {\n      uVar4 = __uflow((_IO_FILE *)stream);\n      if (uVar4 != 0xffffffff) goto LAB_00013069;\n      if (local_2c == pcVar5) {\n        return (linebuffer *)0x0;\n      }\n      if ((stream->_flags & 0x20) != 0) {\n        return (linebuffer *)0x0;\n      }\n      if (pcVar5[-1] == delimiter) goto LAB_0001312b;\n      uVar7 = (int)delimiter;\n      bVar6 = delimiter;\n      if (pcVar5 != local_30) {\n        *pcVar5 = delimiter;\n        pcVar5 = pcVar5 + 1;\n        goto LAB_0001312b;\n      }\nLAB_000130c6:\n      sVar2 = linebuffer->size;\n      local_2c = (char *)x2realloc(local_2c,&linebuffer->size);\n      linebuffer->buffer = local_2c;\n      local_30 = local_2c + linebuffer->size;\n      uVar4 = (uint)bVar6;\n      pcVar3 = local_2c + sVar2;\n    }" if (parenthesized_expression "(pbVar1 < stream->_IO_read_end)" ( (binary_expression "pbVar1 < stream->_IO_read_end" identifier < (field_expression "stream->_IO_read_end" identifier -> field_identifier)) )) (compound_statement "{\n      stream->_IO_read_ptr = (char *)(pbVar1 + 1);\n      uVar4 = (uint)*pbVar1;\nLAB_00013069:\n      pcVar3 = pcVar5;\n      uVar7 = uVar4;\n      bVar6 = (byte)uVar4;\n      if (pcVar5 == local_30) goto LAB_000130c6;\n    }" { (expression_statement "stream->_IO_read_ptr = (char *)(pbVar1 + 1);" (assignment_expression "stream->_IO_read_ptr = (char *)(pbVar1 + 1)" (field_expression "stream->_IO_read_ptr" identifier -> field_identifier) = (cast_expression "(char *)(pbVar1 + 1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(pbVar1 + 1)" ( (binary_expression "pbVar1 + 1" identifier + number_literal) )))) ;) (expression_statement "uVar4 = (uint)*pbVar1;" (assignment_expression "uVar4 = (uint)*pbVar1" identifier = (binary_expression "(uint)*pbVar1" (parenthesized_expression "(uint)" ( identifier )) * identifier)) ;) (labeled_statement "LAB_00013069:\n      pcVar3 = pcVar5;" statement_identifier : (expression_statement "pcVar3 = pcVar5;" (assignment_expression "pcVar3 = pcVar5" identifier = identifier) ;)) (expression_statement "uVar7 = uVar4;" (assignment_expression "uVar7 = uVar4" identifier = identifier) ;) (expression_statement "bVar6 = (byte)uVar4;" (assignment_expression "bVar6 = (byte)uVar4" identifier = (cast_expression "(byte)uVar4" ( (type_descriptor "byte" type_identifier) ) identifier)) ;) (if_statement "if (pcVar5 == local_30) goto LAB_000130c6;" if (parenthesized_expression "(pcVar5 == local_30)" ( (binary_expression "pcVar5 == local_30" identifier == identifier) )) (goto_statement "goto LAB_000130c6;" goto statement_identifier ;)) }) (else_clause "else {\n      uVar4 = __uflow((_IO_FILE *)stream);\n      if (uVar4 != 0xffffffff) goto LAB_00013069;\n      if (local_2c == pcVar5) {\n        return (linebuffer *)0x0;\n      }\n      if ((stream->_flags & 0x20) != 0) {\n        return (linebuffer *)0x0;\n      }\n      if (pcVar5[-1] == delimiter) goto LAB_0001312b;\n      uVar7 = (int)delimiter;\n      bVar6 = delimiter;\n      if (pcVar5 != local_30) {\n        *pcVar5 = delimiter;\n        pcVar5 = pcVar5 + 1;\n        goto LAB_0001312b;\n      }\nLAB_000130c6:\n      sVar2 = linebuffer->size;\n      local_2c = (char *)x2realloc(local_2c,&linebuffer->size);\n      linebuffer->buffer = local_2c;\n      local_30 = local_2c + linebuffer->size;\n      uVar4 = (uint)bVar6;\n      pcVar3 = local_2c + sVar2;\n    }" else (compound_statement "{\n      uVar4 = __uflow((_IO_FILE *)stream);\n      if (uVar4 != 0xffffffff) goto LAB_00013069;\n      if (local_2c == pcVar5) {\n        return (linebuffer *)0x0;\n      }\n      if ((stream->_flags & 0x20) != 0) {\n        return (linebuffer *)0x0;\n      }\n      if (pcVar5[-1] == delimiter) goto LAB_0001312b;\n      uVar7 = (int)delimiter;\n      bVar6 = delimiter;\n      if (pcVar5 != local_30) {\n        *pcVar5 = delimiter;\n        pcVar5 = pcVar5 + 1;\n        goto LAB_0001312b;\n      }\nLAB_000130c6:\n      sVar2 = linebuffer->size;\n      local_2c = (char *)x2realloc(local_2c,&linebuffer->size);\n      linebuffer->buffer = local_2c;\n      local_30 = local_2c + linebuffer->size;\n      uVar4 = (uint)bVar6;\n      pcVar3 = local_2c + sVar2;\n    }" { (expression_statement "uVar4 = __uflow((_IO_FILE *)stream);" (assignment_expression "uVar4 = __uflow((_IO_FILE *)stream)" identifier = (call_expression "__uflow((_IO_FILE *)stream)" identifier (argument_list "((_IO_FILE *)stream)" ( (cast_expression "(_IO_FILE *)stream" ( (type_descriptor "_IO_FILE *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) )))) ;) (if_statement "if (uVar4 != 0xffffffff) goto LAB_00013069;" if (parenthesized_expression "(uVar4 != 0xffffffff)" ( (binary_expression "uVar4 != 0xffffffff" identifier != number_literal) )) (goto_statement "goto LAB_00013069;" goto statement_identifier ;)) (if_statement "if (local_2c == pcVar5) {\n        return (linebuffer *)0x0;\n      }" if (parenthesized_expression "(local_2c == pcVar5)" ( (binary_expression "local_2c == pcVar5" identifier == identifier) )) (compound_statement "{\n        return (linebuffer *)0x0;\n      }" { (return_statement "return (linebuffer *)0x0;" return (cast_expression "(linebuffer *)0x0" ( (type_descriptor "linebuffer *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) ;) })) (if_statement "if ((stream->_flags & 0x20) != 0) {\n        return (linebuffer *)0x0;\n      }" if (parenthesized_expression "((stream->_flags & 0x20) != 0)" ( (binary_expression "(stream->_flags & 0x20) != 0" (parenthesized_expression "(stream->_flags & 0x20)" ( (binary_expression "stream->_flags & 0x20" (field_expression "stream->_flags" identifier -> field_identifier) & number_literal) )) != number_literal) )) (compound_statement "{\n        return (linebuffer *)0x0;\n      }" { (return_statement "return (linebuffer *)0x0;" return (cast_expression "(linebuffer *)0x0" ( (type_descriptor "linebuffer *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) ;) })) (if_statement "if (pcVar5[-1] == delimiter) goto LAB_0001312b;" if (parenthesized_expression "(pcVar5[-1] == delimiter)" ( (binary_expression "pcVar5[-1] == delimiter" (subscript_expression "pcVar5[-1]" identifier [ number_literal ]) == identifier) )) (goto_statement "goto LAB_0001312b;" goto statement_identifier ;)) (expression_statement "uVar7 = (int)delimiter;" (assignment_expression "uVar7 = (int)delimiter" identifier = (cast_expression "(int)delimiter" ( (type_descriptor "int" primitive_type) ) identifier)) ;) (expression_statement "bVar6 = delimiter;" (assignment_expression "bVar6 = delimiter" identifier = identifier) ;) (if_statement "if (pcVar5 != local_30) {\n        *pcVar5 = delimiter;\n        pcVar5 = pcVar5 + 1;\n        goto LAB_0001312b;\n      }" if (parenthesized_expression "(pcVar5 != local_30)" ( (binary_expression "pcVar5 != local_30" identifier != identifier) )) (compound_statement "{\n        *pcVar5 = delimiter;\n        pcVar5 = pcVar5 + 1;\n        goto LAB_0001312b;\n      }" { (expression_statement "*pcVar5 = delimiter;" (assignment_expression "*pcVar5 = delimiter" (pointer_expression "*pcVar5" * identifier) = identifier) ;) (expression_statement "pcVar5 = pcVar5 + 1;" (assignment_expression "pcVar5 = pcVar5 + 1" identifier = (binary_expression "pcVar5 + 1" identifier + number_literal)) ;) (goto_statement "goto LAB_0001312b;" goto statement_identifier ;) })) (labeled_statement "LAB_000130c6:\n      sVar2 = linebuffer->size;" statement_identifier : (expression_statement "sVar2 = linebuffer->size;" (assignment_expression "sVar2 = linebuffer->size" identifier = (field_expression "linebuffer->size" identifier -> field_identifier)) ;)) (expression_statement "local_2c = (char *)x2realloc(local_2c,&linebuffer->size);" (assignment_expression "local_2c = (char *)x2realloc(local_2c,&linebuffer->size)" identifier = (cast_expression "(char *)x2realloc(local_2c,&linebuffer->size)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "x2realloc(local_2c,&linebuffer->size)" identifier (argument_list "(local_2c,&linebuffer->size)" ( identifier , (pointer_expression "&linebuffer->size" & (field_expression "linebuffer->size" identifier -> field_identifier)) ))))) ;) (expression_statement "linebuffer->buffer = local_2c;" (assignment_expression "linebuffer->buffer = local_2c" (field_expression "linebuffer->buffer" identifier -> field_identifier) = identifier) ;) (expression_statement "local_30 = local_2c + linebuffer->size;" (assignment_expression "local_30 = local_2c + linebuffer->size" identifier = (binary_expression "local_2c + linebuffer->size" identifier + (field_expression "linebuffer->size" identifier -> field_identifier))) ;) (expression_statement "uVar4 = (uint)bVar6;" (assignment_expression "uVar4 = (uint)bVar6" identifier = (cast_expression "(uint)bVar6" ( (type_descriptor "uint" type_identifier) ) identifier)) ;) (expression_statement "pcVar3 = local_2c + sVar2;" (assignment_expression "pcVar3 = local_2c + sVar2" identifier = (binary_expression "local_2c + sVar2" identifier + identifier)) ;) }))) (expression_statement "pcVar5 = pcVar3 + 1;" (assignment_expression "pcVar5 = pcVar3 + 1" identifier = (binary_expression "pcVar3 + 1" identifier + number_literal)) ;) (expression_statement "*pcVar3 = (char)uVar4;" (assignment_expression "*pcVar3 = (char)uVar4" (pointer_expression "*pcVar3" * identifier) = (cast_expression "(char)uVar4" ( (type_descriptor "char" primitive_type) ) identifier)) ;) (if_statement "if (uVar7 == (int)delimiter) {\nLAB_0001312b:\n      linebuffer->length = (int)pcVar5 - (int)local_2c;\n      return linebuffer;\n    }" if (parenthesized_expression "(uVar7 == (int)delimiter)" ( (binary_expression "uVar7 == (int)delimiter" identifier == (cast_expression "(int)delimiter" ( (type_descriptor "int" primitive_type) ) identifier)) )) (compound_statement "{\nLAB_0001312b:\n      linebuffer->length = (int)pcVar5 - (int)local_2c;\n      return linebuffer;\n    }" { (labeled_statement "LAB_0001312b:\n      linebuffer->length = (int)pcVar5 - (int)local_2c;" statement_identifier : (expression_statement "linebuffer->length = (int)pcVar5 - (int)local_2c;" (assignment_expression "linebuffer->length = (int)pcVar5 - (int)local_2c" (field_expression "linebuffer->length" identifier -> field_identifier) = (binary_expression "(int)pcVar5 - (int)local_2c" (cast_expression "(int)pcVar5" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)local_2c" ( (type_descriptor "int" primitive_type) ) identifier))) ;)) (return_statement "return linebuffer;" return identifier ;) })) }) while (parenthesized_expression "( true )" ( true )) ;) })))
(translation_unit "int * FUN_00013010(int *param_1,_IO_FILE *param_2,byte param_3)\n\n{\n  int iVar1;\n  byte *pbVar2;\n  uint uVar3;\n  byte *pbVar4;\n  byte bVar5;\n  uint uVar6;\n  byte *local_30;\n  byte *local_2c;\n  \n  pbVar4 = (byte *)param_1[2];\n  local_30 = pbVar4 + *param_1;\n  local_2c = pbVar4;\n  if ((param_2->_flags & 0x10) != 0) {\n    return (int *)0x0;\n  }\n  do {\n    pbVar2 = (byte *)param_2->_IO_read_ptr;\n    if (pbVar2 < param_2->_IO_read_end) {\n      param_2->_IO_read_ptr = (char *)(pbVar2 + 1);\n      uVar3 = (uint)*pbVar2;\nLAB_00013069:\n      pbVar2 = pbVar4;\n      uVar6 = uVar3;\n      bVar5 = (byte)uVar3;\n      if (pbVar4 == local_30) goto LAB_000130c6;\n    }\n    else {\n      uVar3 = __uflow(param_2);\n      if (uVar3 != 0xffffffff) goto LAB_00013069;\n      if (local_2c == pbVar4) {\n        return (int *)0x0;\n      }\n      if ((param_2->_flags & 0x20) != 0) {\n        return (int *)0x0;\n      }\n      if (pbVar4[-1] == param_3) goto LAB_0001312b;\n      uVar6 = (int)(char)param_3;\n      bVar5 = param_3;\n      if (pbVar4 != local_30) {\n        *pbVar4 = param_3;\n        pbVar4 = pbVar4 + 1;\n        goto LAB_0001312b;\n      }\nLAB_000130c6:\n      iVar1 = *param_1;\n      local_2c = (byte *)FUN_00015d70(local_2c,param_1);\n      param_1[2] = (int)local_2c;\n      local_30 = local_2c + *param_1;\n      uVar3 = (uint)bVar5;\n      pbVar2 = local_2c + iVar1;\n    }\n    pbVar4 = pbVar2 + 1;\n    *pbVar2 = (byte)uVar3;\n    if (uVar6 == (int)(char)param_3) {\nLAB_0001312b:\n      param_1[1] = (int)pbVar4 - (int)local_2c;\n      return param_1;\n    }\n  } while( true );\n}\n\n" (function_definition "int * FUN_00013010(int *param_1,_IO_FILE *param_2,byte param_3)\n\n{\n  int iVar1;\n  byte *pbVar2;\n  uint uVar3;\n  byte *pbVar4;\n  byte bVar5;\n  uint uVar6;\n  byte *local_30;\n  byte *local_2c;\n  \n  pbVar4 = (byte *)param_1[2];\n  local_30 = pbVar4 + *param_1;\n  local_2c = pbVar4;\n  if ((param_2->_flags & 0x10) != 0) {\n    return (int *)0x0;\n  }\n  do {\n    pbVar2 = (byte *)param_2->_IO_read_ptr;\n    if (pbVar2 < param_2->_IO_read_end) {\n      param_2->_IO_read_ptr = (char *)(pbVar2 + 1);\n      uVar3 = (uint)*pbVar2;\nLAB_00013069:\n      pbVar2 = pbVar4;\n      uVar6 = uVar3;\n      bVar5 = (byte)uVar3;\n      if (pbVar4 == local_30) goto LAB_000130c6;\n    }\n    else {\n      uVar3 = __uflow(param_2);\n      if (uVar3 != 0xffffffff) goto LAB_00013069;\n      if (local_2c == pbVar4) {\n        return (int *)0x0;\n      }\n      if ((param_2->_flags & 0x20) != 0) {\n        return (int *)0x0;\n      }\n      if (pbVar4[-1] == param_3) goto LAB_0001312b;\n      uVar6 = (int)(char)param_3;\n      bVar5 = param_3;\n      if (pbVar4 != local_30) {\n        *pbVar4 = param_3;\n        pbVar4 = pbVar4 + 1;\n        goto LAB_0001312b;\n      }\nLAB_000130c6:\n      iVar1 = *param_1;\n      local_2c = (byte *)FUN_00015d70(local_2c,param_1);\n      param_1[2] = (int)local_2c;\n      local_30 = local_2c + *param_1;\n      uVar3 = (uint)bVar5;\n      pbVar2 = local_2c + iVar1;\n    }\n    pbVar4 = pbVar2 + 1;\n    *pbVar2 = (byte)uVar3;\n    if (uVar6 == (int)(char)param_3) {\nLAB_0001312b:\n      param_1[1] = (int)pbVar4 - (int)local_2c;\n      return param_1;\n    }\n  } while( true );\n}" primitive_type (pointer_declarator "* FUN_00013010(int *param_1,_IO_FILE *param_2,byte param_3)" * (function_declarator "FUN_00013010(int *param_1,_IO_FILE *param_2,byte param_3)" identifier (parameter_list "(int *param_1,_IO_FILE *param_2,byte param_3)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "_IO_FILE *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "byte param_3" type_identifier identifier) )))) (compound_statement "{\n  int iVar1;\n  byte *pbVar2;\n  uint uVar3;\n  byte *pbVar4;\n  byte bVar5;\n  uint uVar6;\n  byte *local_30;\n  byte *local_2c;\n  \n  pbVar4 = (byte *)param_1[2];\n  local_30 = pbVar4 + *param_1;\n  local_2c = pbVar4;\n  if ((param_2->_flags & 0x10) != 0) {\n    return (int *)0x0;\n  }\n  do {\n    pbVar2 = (byte *)param_2->_IO_read_ptr;\n    if (pbVar2 < param_2->_IO_read_end) {\n      param_2->_IO_read_ptr = (char *)(pbVar2 + 1);\n      uVar3 = (uint)*pbVar2;\nLAB_00013069:\n      pbVar2 = pbVar4;\n      uVar6 = uVar3;\n      bVar5 = (byte)uVar3;\n      if (pbVar4 == local_30) goto LAB_000130c6;\n    }\n    else {\n      uVar3 = __uflow(param_2);\n      if (uVar3 != 0xffffffff) goto LAB_00013069;\n      if (local_2c == pbVar4) {\n        return (int *)0x0;\n      }\n      if ((param_2->_flags & 0x20) != 0) {\n        return (int *)0x0;\n      }\n      if (pbVar4[-1] == param_3) goto LAB_0001312b;\n      uVar6 = (int)(char)param_3;\n      bVar5 = param_3;\n      if (pbVar4 != local_30) {\n        *pbVar4 = param_3;\n        pbVar4 = pbVar4 + 1;\n        goto LAB_0001312b;\n      }\nLAB_000130c6:\n      iVar1 = *param_1;\n      local_2c = (byte *)FUN_00015d70(local_2c,param_1);\n      param_1[2] = (int)local_2c;\n      local_30 = local_2c + *param_1;\n      uVar3 = (uint)bVar5;\n      pbVar2 = local_2c + iVar1;\n    }\n    pbVar4 = pbVar2 + 1;\n    *pbVar2 = (byte)uVar3;\n    if (uVar6 == (int)(char)param_3) {\nLAB_0001312b:\n      param_1[1] = (int)pbVar4 - (int)local_2c;\n      return param_1;\n    }\n  } while( true );\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "byte *pbVar2;" type_identifier (pointer_declarator "*pbVar2" * identifier) ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "byte *pbVar4;" type_identifier (pointer_declarator "*pbVar4" * identifier) ;) (declaration "byte bVar5;" type_identifier identifier ;) (declaration "uint uVar6;" type_identifier identifier ;) (declaration "byte *local_30;" type_identifier (pointer_declarator "*local_30" * identifier) ;) (declaration "byte *local_2c;" type_identifier (pointer_declarator "*local_2c" * identifier) ;) (expression_statement "pbVar4 = (byte *)param_1[2];" (assignment_expression "pbVar4 = (byte *)param_1[2]" identifier = (cast_expression "(byte *)param_1[2]" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "param_1[2]" identifier [ number_literal ]))) ;) (expression_statement "local_30 = pbVar4 + *param_1;" (assignment_expression "local_30 = pbVar4 + *param_1" identifier = (binary_expression "pbVar4 + *param_1" identifier + (pointer_expression "*param_1" * identifier))) ;) (expression_statement "local_2c = pbVar4;" (assignment_expression "local_2c = pbVar4" identifier = identifier) ;) (if_statement "if ((param_2->_flags & 0x10) != 0) {\n    return (int *)0x0;\n  }" if (parenthesized_expression "((param_2->_flags & 0x10) != 0)" ( (binary_expression "(param_2->_flags & 0x10) != 0" (parenthesized_expression "(param_2->_flags & 0x10)" ( (binary_expression "param_2->_flags & 0x10" (field_expression "param_2->_flags" identifier -> field_identifier) & number_literal) )) != number_literal) )) (compound_statement "{\n    return (int *)0x0;\n  }" { (return_statement "return (int *)0x0;" return (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal) ;) })) (do_statement "do {\n    pbVar2 = (byte *)param_2->_IO_read_ptr;\n    if (pbVar2 < param_2->_IO_read_end) {\n      param_2->_IO_read_ptr = (char *)(pbVar2 + 1);\n      uVar3 = (uint)*pbVar2;\nLAB_00013069:\n      pbVar2 = pbVar4;\n      uVar6 = uVar3;\n      bVar5 = (byte)uVar3;\n      if (pbVar4 == local_30) goto LAB_000130c6;\n    }\n    else {\n      uVar3 = __uflow(param_2);\n      if (uVar3 != 0xffffffff) goto LAB_00013069;\n      if (local_2c == pbVar4) {\n        return (int *)0x0;\n      }\n      if ((param_2->_flags & 0x20) != 0) {\n        return (int *)0x0;\n      }\n      if (pbVar4[-1] == param_3) goto LAB_0001312b;\n      uVar6 = (int)(char)param_3;\n      bVar5 = param_3;\n      if (pbVar4 != local_30) {\n        *pbVar4 = param_3;\n        pbVar4 = pbVar4 + 1;\n        goto LAB_0001312b;\n      }\nLAB_000130c6:\n      iVar1 = *param_1;\n      local_2c = (byte *)FUN_00015d70(local_2c,param_1);\n      param_1[2] = (int)local_2c;\n      local_30 = local_2c + *param_1;\n      uVar3 = (uint)bVar5;\n      pbVar2 = local_2c + iVar1;\n    }\n    pbVar4 = pbVar2 + 1;\n    *pbVar2 = (byte)uVar3;\n    if (uVar6 == (int)(char)param_3) {\nLAB_0001312b:\n      param_1[1] = (int)pbVar4 - (int)local_2c;\n      return param_1;\n    }\n  } while( true );" do (compound_statement "{\n    pbVar2 = (byte *)param_2->_IO_read_ptr;\n    if (pbVar2 < param_2->_IO_read_end) {\n      param_2->_IO_read_ptr = (char *)(pbVar2 + 1);\n      uVar3 = (uint)*pbVar2;\nLAB_00013069:\n      pbVar2 = pbVar4;\n      uVar6 = uVar3;\n      bVar5 = (byte)uVar3;\n      if (pbVar4 == local_30) goto LAB_000130c6;\n    }\n    else {\n      uVar3 = __uflow(param_2);\n      if (uVar3 != 0xffffffff) goto LAB_00013069;\n      if (local_2c == pbVar4) {\n        return (int *)0x0;\n      }\n      if ((param_2->_flags & 0x20) != 0) {\n        return (int *)0x0;\n      }\n      if (pbVar4[-1] == param_3) goto LAB_0001312b;\n      uVar6 = (int)(char)param_3;\n      bVar5 = param_3;\n      if (pbVar4 != local_30) {\n        *pbVar4 = param_3;\n        pbVar4 = pbVar4 + 1;\n        goto LAB_0001312b;\n      }\nLAB_000130c6:\n      iVar1 = *param_1;\n      local_2c = (byte *)FUN_00015d70(local_2c,param_1);\n      param_1[2] = (int)local_2c;\n      local_30 = local_2c + *param_1;\n      uVar3 = (uint)bVar5;\n      pbVar2 = local_2c + iVar1;\n    }\n    pbVar4 = pbVar2 + 1;\n    *pbVar2 = (byte)uVar3;\n    if (uVar6 == (int)(char)param_3) {\nLAB_0001312b:\n      param_1[1] = (int)pbVar4 - (int)local_2c;\n      return param_1;\n    }\n  }" { (expression_statement "pbVar2 = (byte *)param_2->_IO_read_ptr;" (assignment_expression "pbVar2 = (byte *)param_2->_IO_read_ptr" identifier = (cast_expression "(byte *)param_2->_IO_read_ptr" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (field_expression "param_2->_IO_read_ptr" identifier -> field_identifier))) ;) (if_statement "if (pbVar2 < param_2->_IO_read_end) {\n      param_2->_IO_read_ptr = (char *)(pbVar2 + 1);\n      uVar3 = (uint)*pbVar2;\nLAB_00013069:\n      pbVar2 = pbVar4;\n      uVar6 = uVar3;\n      bVar5 = (byte)uVar3;\n      if (pbVar4 == local_30) goto LAB_000130c6;\n    }\n    else {\n      uVar3 = __uflow(param_2);\n      if (uVar3 != 0xffffffff) goto LAB_00013069;\n      if (local_2c == pbVar4) {\n        return (int *)0x0;\n      }\n      if ((param_2->_flags & 0x20) != 0) {\n        return (int *)0x0;\n      }\n      if (pbVar4[-1] == param_3) goto LAB_0001312b;\n      uVar6 = (int)(char)param_3;\n      bVar5 = param_3;\n      if (pbVar4 != local_30) {\n        *pbVar4 = param_3;\n        pbVar4 = pbVar4 + 1;\n        goto LAB_0001312b;\n      }\nLAB_000130c6:\n      iVar1 = *param_1;\n      local_2c = (byte *)FUN_00015d70(local_2c,param_1);\n      param_1[2] = (int)local_2c;\n      local_30 = local_2c + *param_1;\n      uVar3 = (uint)bVar5;\n      pbVar2 = local_2c + iVar1;\n    }" if (parenthesized_expression "(pbVar2 < param_2->_IO_read_end)" ( (binary_expression "pbVar2 < param_2->_IO_read_end" identifier < (field_expression "param_2->_IO_read_end" identifier -> field_identifier)) )) (compound_statement "{\n      param_2->_IO_read_ptr = (char *)(pbVar2 + 1);\n      uVar3 = (uint)*pbVar2;\nLAB_00013069:\n      pbVar2 = pbVar4;\n      uVar6 = uVar3;\n      bVar5 = (byte)uVar3;\n      if (pbVar4 == local_30) goto LAB_000130c6;\n    }" { (expression_statement "param_2->_IO_read_ptr = (char *)(pbVar2 + 1);" (assignment_expression "param_2->_IO_read_ptr = (char *)(pbVar2 + 1)" (field_expression "param_2->_IO_read_ptr" identifier -> field_identifier) = (cast_expression "(char *)(pbVar2 + 1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(pbVar2 + 1)" ( (binary_expression "pbVar2 + 1" identifier + number_literal) )))) ;) (expression_statement "uVar3 = (uint)*pbVar2;" (assignment_expression "uVar3 = (uint)*pbVar2" identifier = (binary_expression "(uint)*pbVar2" (parenthesized_expression "(uint)" ( identifier )) * identifier)) ;) (labeled_statement "LAB_00013069:\n      pbVar2 = pbVar4;" statement_identifier : (expression_statement "pbVar2 = pbVar4;" (assignment_expression "pbVar2 = pbVar4" identifier = identifier) ;)) (expression_statement "uVar6 = uVar3;" (assignment_expression "uVar6 = uVar3" identifier = identifier) ;) (expression_statement "bVar5 = (byte)uVar3;" (assignment_expression "bVar5 = (byte)uVar3" identifier = (cast_expression "(byte)uVar3" ( (type_descriptor "byte" type_identifier) ) identifier)) ;) (if_statement "if (pbVar4 == local_30) goto LAB_000130c6;" if (parenthesized_expression "(pbVar4 == local_30)" ( (binary_expression "pbVar4 == local_30" identifier == identifier) )) (goto_statement "goto LAB_000130c6;" goto statement_identifier ;)) }) (else_clause "else {\n      uVar3 = __uflow(param_2);\n      if (uVar3 != 0xffffffff) goto LAB_00013069;\n      if (local_2c == pbVar4) {\n        return (int *)0x0;\n      }\n      if ((param_2->_flags & 0x20) != 0) {\n        return (int *)0x0;\n      }\n      if (pbVar4[-1] == param_3) goto LAB_0001312b;\n      uVar6 = (int)(char)param_3;\n      bVar5 = param_3;\n      if (pbVar4 != local_30) {\n        *pbVar4 = param_3;\n        pbVar4 = pbVar4 + 1;\n        goto LAB_0001312b;\n      }\nLAB_000130c6:\n      iVar1 = *param_1;\n      local_2c = (byte *)FUN_00015d70(local_2c,param_1);\n      param_1[2] = (int)local_2c;\n      local_30 = local_2c + *param_1;\n      uVar3 = (uint)bVar5;\n      pbVar2 = local_2c + iVar1;\n    }" else (compound_statement "{\n      uVar3 = __uflow(param_2);\n      if (uVar3 != 0xffffffff) goto LAB_00013069;\n      if (local_2c == pbVar4) {\n        return (int *)0x0;\n      }\n      if ((param_2->_flags & 0x20) != 0) {\n        return (int *)0x0;\n      }\n      if (pbVar4[-1] == param_3) goto LAB_0001312b;\n      uVar6 = (int)(char)param_3;\n      bVar5 = param_3;\n      if (pbVar4 != local_30) {\n        *pbVar4 = param_3;\n        pbVar4 = pbVar4 + 1;\n        goto LAB_0001312b;\n      }\nLAB_000130c6:\n      iVar1 = *param_1;\n      local_2c = (byte *)FUN_00015d70(local_2c,param_1);\n      param_1[2] = (int)local_2c;\n      local_30 = local_2c + *param_1;\n      uVar3 = (uint)bVar5;\n      pbVar2 = local_2c + iVar1;\n    }" { (expression_statement "uVar3 = __uflow(param_2);" (assignment_expression "uVar3 = __uflow(param_2)" identifier = (call_expression "__uflow(param_2)" identifier (argument_list "(param_2)" ( identifier )))) ;) (if_statement "if (uVar3 != 0xffffffff) goto LAB_00013069;" if (parenthesized_expression "(uVar3 != 0xffffffff)" ( (binary_expression "uVar3 != 0xffffffff" identifier != number_literal) )) (goto_statement "goto LAB_00013069;" goto statement_identifier ;)) (if_statement "if (local_2c == pbVar4) {\n        return (int *)0x0;\n      }" if (parenthesized_expression "(local_2c == pbVar4)" ( (binary_expression "local_2c == pbVar4" identifier == identifier) )) (compound_statement "{\n        return (int *)0x0;\n      }" { (return_statement "return (int *)0x0;" return (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal) ;) })) (if_statement "if ((param_2->_flags & 0x20) != 0) {\n        return (int *)0x0;\n      }" if (parenthesized_expression "((param_2->_flags & 0x20) != 0)" ( (binary_expression "(param_2->_flags & 0x20) != 0" (parenthesized_expression "(param_2->_flags & 0x20)" ( (binary_expression "param_2->_flags & 0x20" (field_expression "param_2->_flags" identifier -> field_identifier) & number_literal) )) != number_literal) )) (compound_statement "{\n        return (int *)0x0;\n      }" { (return_statement "return (int *)0x0;" return (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal) ;) })) (if_statement "if (pbVar4[-1] == param_3) goto LAB_0001312b;" if (parenthesized_expression "(pbVar4[-1] == param_3)" ( (binary_expression "pbVar4[-1] == param_3" (subscript_expression "pbVar4[-1]" identifier [ number_literal ]) == identifier) )) (goto_statement "goto LAB_0001312b;" goto statement_identifier ;)) (expression_statement "uVar6 = (int)(char)param_3;" (assignment_expression "uVar6 = (int)(char)param_3" identifier = (cast_expression "(int)(char)param_3" ( (type_descriptor "int" primitive_type) ) (cast_expression "(char)param_3" ( (type_descriptor "char" primitive_type) ) identifier))) ;) (expression_statement "bVar5 = param_3;" (assignment_expression "bVar5 = param_3" identifier = identifier) ;) (if_statement "if (pbVar4 != local_30) {\n        *pbVar4 = param_3;\n        pbVar4 = pbVar4 + 1;\n        goto LAB_0001312b;\n      }" if (parenthesized_expression "(pbVar4 != local_30)" ( (binary_expression "pbVar4 != local_30" identifier != identifier) )) (compound_statement "{\n        *pbVar4 = param_3;\n        pbVar4 = pbVar4 + 1;\n        goto LAB_0001312b;\n      }" { (expression_statement "*pbVar4 = param_3;" (assignment_expression "*pbVar4 = param_3" (pointer_expression "*pbVar4" * identifier) = identifier) ;) (expression_statement "pbVar4 = pbVar4 + 1;" (assignment_expression "pbVar4 = pbVar4 + 1" identifier = (binary_expression "pbVar4 + 1" identifier + number_literal)) ;) (goto_statement "goto LAB_0001312b;" goto statement_identifier ;) })) (labeled_statement "LAB_000130c6:\n      iVar1 = *param_1;" statement_identifier : (expression_statement "iVar1 = *param_1;" (assignment_expression "iVar1 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;)) (expression_statement "local_2c = (byte *)FUN_00015d70(local_2c,param_1);" (assignment_expression "local_2c = (byte *)FUN_00015d70(local_2c,param_1)" identifier = (cast_expression "(byte *)FUN_00015d70(local_2c,param_1)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_00015d70(local_2c,param_1)" identifier (argument_list "(local_2c,param_1)" ( identifier , identifier ))))) ;) (expression_statement "param_1[2] = (int)local_2c;" (assignment_expression "param_1[2] = (int)local_2c" (subscript_expression "param_1[2]" identifier [ number_literal ]) = (cast_expression "(int)local_2c" ( (type_descriptor "int" primitive_type) ) identifier)) ;) (expression_statement "local_30 = local_2c + *param_1;" (assignment_expression "local_30 = local_2c + *param_1" identifier = (binary_expression "local_2c + *param_1" identifier + (pointer_expression "*param_1" * identifier))) ;) (expression_statement "uVar3 = (uint)bVar5;" (assignment_expression "uVar3 = (uint)bVar5" identifier = (cast_expression "(uint)bVar5" ( (type_descriptor "uint" type_identifier) ) identifier)) ;) (expression_statement "pbVar2 = local_2c + iVar1;" (assignment_expression "pbVar2 = local_2c + iVar1" identifier = (binary_expression "local_2c + iVar1" identifier + identifier)) ;) }))) (expression_statement "pbVar4 = pbVar2 + 1;" (assignment_expression "pbVar4 = pbVar2 + 1" identifier = (binary_expression "pbVar2 + 1" identifier + number_literal)) ;) (expression_statement "*pbVar2 = (byte)uVar3;" (assignment_expression "*pbVar2 = (byte)uVar3" (pointer_expression "*pbVar2" * identifier) = (cast_expression "(byte)uVar3" ( (type_descriptor "byte" type_identifier) ) identifier)) ;) (if_statement "if (uVar6 == (int)(char)param_3) {\nLAB_0001312b:\n      param_1[1] = (int)pbVar4 - (int)local_2c;\n      return param_1;\n    }" if (parenthesized_expression "(uVar6 == (int)(char)param_3)" ( (binary_expression "uVar6 == (int)(char)param_3" identifier == (cast_expression "(int)(char)param_3" ( (type_descriptor "int" primitive_type) ) (cast_expression "(char)param_3" ( (type_descriptor "char" primitive_type) ) identifier))) )) (compound_statement "{\nLAB_0001312b:\n      param_1[1] = (int)pbVar4 - (int)local_2c;\n      return param_1;\n    }" { (labeled_statement "LAB_0001312b:\n      param_1[1] = (int)pbVar4 - (int)local_2c;" statement_identifier : (expression_statement "param_1[1] = (int)pbVar4 - (int)local_2c;" (assignment_expression "param_1[1] = (int)pbVar4 - (int)local_2c" (subscript_expression "param_1[1]" identifier [ number_literal ]) = (binary_expression "(int)pbVar4 - (int)local_2c" (cast_expression "(int)pbVar4" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)local_2c" ( (type_descriptor "int" primitive_type) ) identifier))) ;)) (return_statement "return param_1;" return identifier ;) })) }) while (parenthesized_expression "( true )" ( true )) ;) })))
(translation_unit (function_definition TYPE (pointer_declarator * (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) )))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (subscript_expression IDENT [ LIT ]))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + (pointer_expression * IDENT))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (field_expression IDENT -> field_identifier) & LIT) )) != LIT) )) (compound_statement { (return_statement return (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT) ;) })) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (field_expression IDENT -> field_identifier))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < (field_expression IDENT -> field_identifier)) )) (compound_statement { (expression_statement (assignment_expression (field_expression IDENT -> field_identifier) = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) ;) (expression_statement (assignment_expression IDENT = (binary_expression (parenthesized_expression ( IDENT )) * IDENT)) ;) (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = IDENT) ;)) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE) ) IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == IDENT) )) (goto_statement goto statement_identifier ;)) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (goto_statement goto statement_identifier ;)) (if_statement if (parenthesized_expression ( (binary_expression IDENT == IDENT) )) (compound_statement { (return_statement return (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT) ;) })) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (field_expression IDENT -> field_identifier) & LIT) )) != LIT) )) (compound_statement { (return_statement return (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT) ;) })) (if_statement if (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) == IDENT) )) (goto_statement goto statement_identifier ;)) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE) ) (cast_expression ( (type_descriptor TYPE) ) IDENT))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != IDENT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (goto_statement goto statement_identifier ;) })) (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;)) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( IDENT , IDENT ))))) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (cast_expression ( (type_descriptor TYPE) ) IDENT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + (pointer_expression * IDENT))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE) ) IDENT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + IDENT)) ;) }))) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (cast_expression ( (type_descriptor TYPE) ) IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE) ) (cast_expression ( (type_descriptor TYPE) ) IDENT))) )) (compound_statement { (labeled_statement statement_identifier : (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) - (cast_expression ( (type_descriptor TYPE) ) IDENT))) ;)) (return_statement return IDENT ;) })) }) while (parenthesized_expression ( BOOL )) ;) })))
(function_definition "int * FUN_00013010(int *param_1,_IO_FILE *param_2,byte param_3)\n\n{\n  int iVar1;\n  byte *pbVar2;\n  uint uVar3;\n  byte *pbVar4;\n  byte bVar5;\n  uint uVar6;\n  byte *local_30;\n  byte *local_2c;\n  \n  pbVar4 = (byte *)param_1[2];\n  local_30 = pbVar4 + *param_1;\n  local_2c = pbVar4;\n  if ((param_2->_flags & 0x10) != 0) {\n    return (int *)0x0;\n  }\n  do {\n    pbVar2 = (byte *)param_2->_IO_read_ptr;\n    if (pbVar2 < param_2->_IO_read_end) {\n      param_2->_IO_read_ptr = (char *)(pbVar2 + 1);\n      uVar3 = (uint)*pbVar2;\nLAB_00013069:\n      pbVar2 = pbVar4;\n      uVar6 = uVar3;\n      bVar5 = (byte)uVar3;\n      if (pbVar4 == local_30) goto LAB_000130c6;\n    }\n    else {\n      uVar3 = __uflow(param_2);\n      if (uVar3 != 0xffffffff) goto LAB_00013069;\n      if (local_2c == pbVar4) {\n        return (int *)0x0;\n      }\n      if ((param_2->_flags & 0x20) != 0) {\n        return (int *)0x0;\n      }\n      if (pbVar4[-1] == param_3) goto LAB_0001312b;\n      uVar6 = (int)(char)param_3;\n      bVar5 = param_3;\n      if (pbVar4 != local_30) {\n        *pbVar4 = param_3;\n        pbVar4 = pbVar4 + 1;\n        goto LAB_0001312b;\n      }\nLAB_000130c6:\n      iVar1 = *param_1;\n      local_2c = (byte *)FUN_00015d70(local_2c,param_1);\n      param_1[2] = (int)local_2c;\n      local_30 = local_2c + *param_1;\n      uVar3 = (uint)bVar5;\n      pbVar2 = local_2c + iVar1;\n    }\n    pbVar4 = pbVar2 + 1;\n    *pbVar2 = (byte)uVar3;\n    if (uVar6 == (int)(char)param_3) {\nLAB_0001312b:\n      param_1[1] = (int)pbVar4 - (int)local_2c;\n      return param_1;\n    }\n  } while( true );\n}" (primitive_type "int") (pointer_declarator "* FUN_00013010(int *param_1,_IO_FILE *param_2,byte param_3)" (* "*") (function_declarator "FUN_00013010(int *param_1,_IO_FILE *param_2,byte param_3)" (identifier "FUN_00013010") (parameter_list "(int *param_1,_IO_FILE *param_2,byte param_3)" (( "(") (parameter_declaration "int *param_1" (primitive_type "int") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "_IO_FILE *param_2" (type_identifier "_IO_FILE") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) (, ",") (parameter_declaration "byte param_3" (type_identifier "byte") (identifier "param_3")) () ")")))) (compound_statement "{\n  int iVar1;\n  byte *pbVar2;\n  uint uVar3;\n  byte *pbVar4;\n  byte bVar5;\n  uint uVar6;\n  byte *local_30;\n  byte *local_2c;\n  \n  pbVar4 = (byte *)param_1[2];\n  local_30 = pbVar4 + *param_1;\n  local_2c = pbVar4;\n  if ((param_2->_flags & 0x10) != 0) {\n    return (int *)0x0;\n  }\n  do {\n    pbVar2 = (byte *)param_2->_IO_read_ptr;\n    if (pbVar2 < param_2->_IO_read_end) {\n      param_2->_IO_read_ptr = (char *)(pbVar2 + 1);\n      uVar3 = (uint)*pbVar2;\nLAB_00013069:\n      pbVar2 = pbVar4;\n      uVar6 = uVar3;\n      bVar5 = (byte)uVar3;\n      if (pbVar4 == local_30) goto LAB_000130c6;\n    }\n    else {\n      uVar3 = __uflow(param_2);\n      if (uVar3 != 0xffffffff) goto LAB_00013069;\n      if (local_2c == pbVar4) {\n        return (int *)0x0;\n      }\n      if ((param_2->_flags & 0x20) != 0) {\n        return (int *)0x0;\n      }\n      if (pbVar4[-1] == param_3) goto LAB_0001312b;\n      uVar6 = (int)(char)param_3;\n      bVar5 = param_3;\n      if (pbVar4 != local_30) {\n        *pbVar4 = param_3;\n        pbVar4 = pbVar4 + 1;\n        goto LAB_0001312b;\n      }\nLAB_000130c6:\n      iVar1 = *param_1;\n      local_2c = (byte *)FUN_00015d70(local_2c,param_1);\n      param_1[2] = (int)local_2c;\n      local_30 = local_2c + *param_1;\n      uVar3 = (uint)bVar5;\n      pbVar2 = local_2c + iVar1;\n    }\n    pbVar4 = pbVar2 + 1;\n    *pbVar2 = (byte)uVar3;\n    if (uVar6 == (int)(char)param_3) {\nLAB_0001312b:\n      param_1[1] = (int)pbVar4 - (int)local_2c;\n      return param_1;\n    }\n  } while( true );\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "byte *pbVar2;" (type_identifier "byte") (pointer_declarator "*pbVar2" (* "*") (identifier "pbVar2")) (; ";")) (declaration "uint uVar3;" (type_identifier "uint") (identifier "uVar3") (; ";")) (declaration "byte *pbVar4;" (type_identifier "byte") (pointer_declarator "*pbVar4" (* "*") (identifier "pbVar4")) (; ";")) (declaration "byte bVar5;" (type_identifier "byte") (identifier "bVar5") (; ";")) (declaration "uint uVar6;" (type_identifier "uint") (identifier "uVar6") (; ";")) (declaration "byte *local_30;" (type_identifier "byte") (pointer_declarator "*local_30" (* "*") (identifier "local_30")) (; ";")) (declaration "byte *local_2c;" (type_identifier "byte") (pointer_declarator "*local_2c" (* "*") (identifier "local_2c")) (; ";")) (expression_statement "pbVar4 = (byte *)param_1[2];" (assignment_expression "pbVar4 = (byte *)param_1[2]" (identifier "pbVar4") (= "=") (cast_expression "(byte *)param_1[2]" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "param_1[2]" (identifier "param_1") ([ "[") (number_literal "2") (] "]")))) (; ";")) (expression_statement "local_30 = pbVar4 + *param_1;" (assignment_expression "local_30 = pbVar4 + *param_1" (identifier "local_30") (= "=") (binary_expression "pbVar4 + *param_1" (identifier "pbVar4") (+ "+") (pointer_expression "*param_1" (* "*") (identifier "param_1")))) (; ";")) (expression_statement "local_2c = pbVar4;" (assignment_expression "local_2c = pbVar4" (identifier "local_2c") (= "=") (identifier "pbVar4")) (; ";")) (if_statement "if ((param_2->_flags & 0x10) != 0) {\n    return (int *)0x0;\n  }" (if "if") (parenthesized_expression "((param_2->_flags & 0x10) != 0)" (( "(") (binary_expression "(param_2->_flags & 0x10) != 0" (parenthesized_expression "(param_2->_flags & 0x10)" (( "(") (binary_expression "param_2->_flags & 0x10" (field_expression "param_2->_flags" (identifier "param_2") (-> "->") (field_identifier "_flags")) (& "&") (number_literal "0x10")) () ")")) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    return (int *)0x0;\n  }" ({ "{") (return_statement "return (int *)0x0;" (return "return") (cast_expression "(int *)0x0" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0")) (; ";")) (} "}"))) (do_statement "do {\n    pbVar2 = (byte *)param_2->_IO_read_ptr;\n    if (pbVar2 < param_2->_IO_read_end) {\n      param_2->_IO_read_ptr = (char *)(pbVar2 + 1);\n      uVar3 = (uint)*pbVar2;\nLAB_00013069:\n      pbVar2 = pbVar4;\n      uVar6 = uVar3;\n      bVar5 = (byte)uVar3;\n      if (pbVar4 == local_30) goto LAB_000130c6;\n    }\n    else {\n      uVar3 = __uflow(param_2);\n      if (uVar3 != 0xffffffff) goto LAB_00013069;\n      if (local_2c == pbVar4) {\n        return (int *)0x0;\n      }\n      if ((param_2->_flags & 0x20) != 0) {\n        return (int *)0x0;\n      }\n      if (pbVar4[-1] == param_3) goto LAB_0001312b;\n      uVar6 = (int)(char)param_3;\n      bVar5 = param_3;\n      if (pbVar4 != local_30) {\n        *pbVar4 = param_3;\n        pbVar4 = pbVar4 + 1;\n        goto LAB_0001312b;\n      }\nLAB_000130c6:\n      iVar1 = *param_1;\n      local_2c = (byte *)FUN_00015d70(local_2c,param_1);\n      param_1[2] = (int)local_2c;\n      local_30 = local_2c + *param_1;\n      uVar3 = (uint)bVar5;\n      pbVar2 = local_2c + iVar1;\n    }\n    pbVar4 = pbVar2 + 1;\n    *pbVar2 = (byte)uVar3;\n    if (uVar6 == (int)(char)param_3) {\nLAB_0001312b:\n      param_1[1] = (int)pbVar4 - (int)local_2c;\n      return param_1;\n    }\n  } while( true );" (do "do") (compound_statement "{\n    pbVar2 = (byte *)param_2->_IO_read_ptr;\n    if (pbVar2 < param_2->_IO_read_end) {\n      param_2->_IO_read_ptr = (char *)(pbVar2 + 1);\n      uVar3 = (uint)*pbVar2;\nLAB_00013069:\n      pbVar2 = pbVar4;\n      uVar6 = uVar3;\n      bVar5 = (byte)uVar3;\n      if (pbVar4 == local_30) goto LAB_000130c6;\n    }\n    else {\n      uVar3 = __uflow(param_2);\n      if (uVar3 != 0xffffffff) goto LAB_00013069;\n      if (local_2c == pbVar4) {\n        return (int *)0x0;\n      }\n      if ((param_2->_flags & 0x20) != 0) {\n        return (int *)0x0;\n      }\n      if (pbVar4[-1] == param_3) goto LAB_0001312b;\n      uVar6 = (int)(char)param_3;\n      bVar5 = param_3;\n      if (pbVar4 != local_30) {\n        *pbVar4 = param_3;\n        pbVar4 = pbVar4 + 1;\n        goto LAB_0001312b;\n      }\nLAB_000130c6:\n      iVar1 = *param_1;\n      local_2c = (byte *)FUN_00015d70(local_2c,param_1);\n      param_1[2] = (int)local_2c;\n      local_30 = local_2c + *param_1;\n      uVar3 = (uint)bVar5;\n      pbVar2 = local_2c + iVar1;\n    }\n    pbVar4 = pbVar2 + 1;\n    *pbVar2 = (byte)uVar3;\n    if (uVar6 == (int)(char)param_3) {\nLAB_0001312b:\n      param_1[1] = (int)pbVar4 - (int)local_2c;\n      return param_1;\n    }\n  }" ({ "{") (expression_statement "pbVar2 = (byte *)param_2->_IO_read_ptr;" (assignment_expression "pbVar2 = (byte *)param_2->_IO_read_ptr" (identifier "pbVar2") (= "=") (cast_expression "(byte *)param_2->_IO_read_ptr" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (field_expression "param_2->_IO_read_ptr" (identifier "param_2") (-> "->") (field_identifier "_IO_read_ptr")))) (; ";")) (if_statement "if (pbVar2 < param_2->_IO_read_end) {\n      param_2->_IO_read_ptr = (char *)(pbVar2 + 1);\n      uVar3 = (uint)*pbVar2;\nLAB_00013069:\n      pbVar2 = pbVar4;\n      uVar6 = uVar3;\n      bVar5 = (byte)uVar3;\n      if (pbVar4 == local_30) goto LAB_000130c6;\n    }\n    else {\n      uVar3 = __uflow(param_2);\n      if (uVar3 != 0xffffffff) goto LAB_00013069;\n      if (local_2c == pbVar4) {\n        return (int *)0x0;\n      }\n      if ((param_2->_flags & 0x20) != 0) {\n        return (int *)0x0;\n      }\n      if (pbVar4[-1] == param_3) goto LAB_0001312b;\n      uVar6 = (int)(char)param_3;\n      bVar5 = param_3;\n      if (pbVar4 != local_30) {\n        *pbVar4 = param_3;\n        pbVar4 = pbVar4 + 1;\n        goto LAB_0001312b;\n      }\nLAB_000130c6:\n      iVar1 = *param_1;\n      local_2c = (byte *)FUN_00015d70(local_2c,param_1);\n      param_1[2] = (int)local_2c;\n      local_30 = local_2c + *param_1;\n      uVar3 = (uint)bVar5;\n      pbVar2 = local_2c + iVar1;\n    }" (if "if") (parenthesized_expression "(pbVar2 < param_2->_IO_read_end)" (( "(") (binary_expression "pbVar2 < param_2->_IO_read_end" (identifier "pbVar2") (< "<") (field_expression "param_2->_IO_read_end" (identifier "param_2") (-> "->") (field_identifier "_IO_read_end"))) () ")")) (compound_statement "{\n      param_2->_IO_read_ptr = (char *)(pbVar2 + 1);\n      uVar3 = (uint)*pbVar2;\nLAB_00013069:\n      pbVar2 = pbVar4;\n      uVar6 = uVar3;\n      bVar5 = (byte)uVar3;\n      if (pbVar4 == local_30) goto LAB_000130c6;\n    }" ({ "{") (expression_statement "param_2->_IO_read_ptr = (char *)(pbVar2 + 1);" (assignment_expression "param_2->_IO_read_ptr = (char *)(pbVar2 + 1)" (field_expression "param_2->_IO_read_ptr" (identifier "param_2") (-> "->") (field_identifier "_IO_read_ptr")) (= "=") (cast_expression "(char *)(pbVar2 + 1)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(pbVar2 + 1)" (( "(") (binary_expression "pbVar2 + 1" (identifier "pbVar2") (+ "+") (number_literal "1")) () ")")))) (; ";")) (expression_statement "uVar3 = (uint)*pbVar2;" (assignment_expression "uVar3 = (uint)*pbVar2" (identifier "uVar3") (= "=") (binary_expression "(uint)*pbVar2" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (* "*") (identifier "pbVar2"))) (; ";")) (labeled_statement "LAB_00013069:\n      pbVar2 = pbVar4;" (statement_identifier "LAB_00013069") (: ":") (expression_statement "pbVar2 = pbVar4;" (assignment_expression "pbVar2 = pbVar4" (identifier "pbVar2") (= "=") (identifier "pbVar4")) (; ";"))) (expression_statement "uVar6 = uVar3;" (assignment_expression "uVar6 = uVar3" (identifier "uVar6") (= "=") (identifier "uVar3")) (; ";")) (expression_statement "bVar5 = (byte)uVar3;" (assignment_expression "bVar5 = (byte)uVar3" (identifier "bVar5") (= "=") (cast_expression "(byte)uVar3" (( "(") (type_descriptor "byte" (type_identifier "byte")) () ")") (identifier "uVar3"))) (; ";")) (if_statement "if (pbVar4 == local_30) goto LAB_000130c6;" (if "if") (parenthesized_expression "(pbVar4 == local_30)" (( "(") (binary_expression "pbVar4 == local_30" (identifier "pbVar4") (== "==") (identifier "local_30")) () ")")) (goto_statement "goto LAB_000130c6;" (goto "goto") (statement_identifier "LAB_000130c6") (; ";"))) (} "}")) (else_clause "else {\n      uVar3 = __uflow(param_2);\n      if (uVar3 != 0xffffffff) goto LAB_00013069;\n      if (local_2c == pbVar4) {\n        return (int *)0x0;\n      }\n      if ((param_2->_flags & 0x20) != 0) {\n        return (int *)0x0;\n      }\n      if (pbVar4[-1] == param_3) goto LAB_0001312b;\n      uVar6 = (int)(char)param_3;\n      bVar5 = param_3;\n      if (pbVar4 != local_30) {\n        *pbVar4 = param_3;\n        pbVar4 = pbVar4 + 1;\n        goto LAB_0001312b;\n      }\nLAB_000130c6:\n      iVar1 = *param_1;\n      local_2c = (byte *)FUN_00015d70(local_2c,param_1);\n      param_1[2] = (int)local_2c;\n      local_30 = local_2c + *param_1;\n      uVar3 = (uint)bVar5;\n      pbVar2 = local_2c + iVar1;\n    }" (else "else") (compound_statement "{\n      uVar3 = __uflow(param_2);\n      if (uVar3 != 0xffffffff) goto LAB_00013069;\n      if (local_2c == pbVar4) {\n        return (int *)0x0;\n      }\n      if ((param_2->_flags & 0x20) != 0) {\n        return (int *)0x0;\n      }\n      if (pbVar4[-1] == param_3) goto LAB_0001312b;\n      uVar6 = (int)(char)param_3;\n      bVar5 = param_3;\n      if (pbVar4 != local_30) {\n        *pbVar4 = param_3;\n        pbVar4 = pbVar4 + 1;\n        goto LAB_0001312b;\n      }\nLAB_000130c6:\n      iVar1 = *param_1;\n      local_2c = (byte *)FUN_00015d70(local_2c,param_1);\n      param_1[2] = (int)local_2c;\n      local_30 = local_2c + *param_1;\n      uVar3 = (uint)bVar5;\n      pbVar2 = local_2c + iVar1;\n    }" ({ "{") (expression_statement "uVar3 = __uflow(param_2);" (assignment_expression "uVar3 = __uflow(param_2)" (identifier "uVar3") (= "=") (call_expression "__uflow(param_2)" (identifier "__uflow") (argument_list "(param_2)" (( "(") (identifier "param_2") () ")")))) (; ";")) (if_statement "if (uVar3 != 0xffffffff) goto LAB_00013069;" (if "if") (parenthesized_expression "(uVar3 != 0xffffffff)" (( "(") (binary_expression "uVar3 != 0xffffffff" (identifier "uVar3") (!= "!=") (number_literal "0xffffffff")) () ")")) (goto_statement "goto LAB_00013069;" (goto "goto") (statement_identifier "LAB_00013069") (; ";"))) (if_statement "if (local_2c == pbVar4) {\n        return (int *)0x0;\n      }" (if "if") (parenthesized_expression "(local_2c == pbVar4)" (( "(") (binary_expression "local_2c == pbVar4" (identifier "local_2c") (== "==") (identifier "pbVar4")) () ")")) (compound_statement "{\n        return (int *)0x0;\n      }" ({ "{") (return_statement "return (int *)0x0;" (return "return") (cast_expression "(int *)0x0" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0")) (; ";")) (} "}"))) (if_statement "if ((param_2->_flags & 0x20) != 0) {\n        return (int *)0x0;\n      }" (if "if") (parenthesized_expression "((param_2->_flags & 0x20) != 0)" (( "(") (binary_expression "(param_2->_flags & 0x20) != 0" (parenthesized_expression "(param_2->_flags & 0x20)" (( "(") (binary_expression "param_2->_flags & 0x20" (field_expression "param_2->_flags" (identifier "param_2") (-> "->") (field_identifier "_flags")) (& "&") (number_literal "0x20")) () ")")) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n        return (int *)0x0;\n      }" ({ "{") (return_statement "return (int *)0x0;" (return "return") (cast_expression "(int *)0x0" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0")) (; ";")) (} "}"))) (if_statement "if (pbVar4[-1] == param_3) goto LAB_0001312b;" (if "if") (parenthesized_expression "(pbVar4[-1] == param_3)" (( "(") (binary_expression "pbVar4[-1] == param_3" (subscript_expression "pbVar4[-1]" (identifier "pbVar4") ([ "[") (number_literal "-1") (] "]")) (== "==") (identifier "param_3")) () ")")) (goto_statement "goto LAB_0001312b;" (goto "goto") (statement_identifier "LAB_0001312b") (; ";"))) (expression_statement "uVar6 = (int)(char)param_3;" (assignment_expression "uVar6 = (int)(char)param_3" (identifier "uVar6") (= "=") (cast_expression "(int)(char)param_3" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (cast_expression "(char)param_3" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (identifier "param_3")))) (; ";")) (expression_statement "bVar5 = param_3;" (assignment_expression "bVar5 = param_3" (identifier "bVar5") (= "=") (identifier "param_3")) (; ";")) (if_statement "if (pbVar4 != local_30) {\n        *pbVar4 = param_3;\n        pbVar4 = pbVar4 + 1;\n        goto LAB_0001312b;\n      }" (if "if") (parenthesized_expression "(pbVar4 != local_30)" (( "(") (binary_expression "pbVar4 != local_30" (identifier "pbVar4") (!= "!=") (identifier "local_30")) () ")")) (compound_statement "{\n        *pbVar4 = param_3;\n        pbVar4 = pbVar4 + 1;\n        goto LAB_0001312b;\n      }" ({ "{") (expression_statement "*pbVar4 = param_3;" (assignment_expression "*pbVar4 = param_3" (pointer_expression "*pbVar4" (* "*") (identifier "pbVar4")) (= "=") (identifier "param_3")) (; ";")) (expression_statement "pbVar4 = pbVar4 + 1;" (assignment_expression "pbVar4 = pbVar4 + 1" (identifier "pbVar4") (= "=") (binary_expression "pbVar4 + 1" (identifier "pbVar4") (+ "+") (number_literal "1"))) (; ";")) (goto_statement "goto LAB_0001312b;" (goto "goto") (statement_identifier "LAB_0001312b") (; ";")) (} "}"))) (labeled_statement "LAB_000130c6:\n      iVar1 = *param_1;" (statement_identifier "LAB_000130c6") (: ":") (expression_statement "iVar1 = *param_1;" (assignment_expression "iVar1 = *param_1" (identifier "iVar1") (= "=") (pointer_expression "*param_1" (* "*") (identifier "param_1"))) (; ";"))) (expression_statement "local_2c = (byte *)FUN_00015d70(local_2c,param_1);" (assignment_expression "local_2c = (byte *)FUN_00015d70(local_2c,param_1)" (identifier "local_2c") (= "=") (cast_expression "(byte *)FUN_00015d70(local_2c,param_1)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_00015d70(local_2c,param_1)" (identifier "FUN_00015d70") (argument_list "(local_2c,param_1)" (( "(") (identifier "local_2c") (, ",") (identifier "param_1") () ")"))))) (; ";")) (expression_statement "param_1[2] = (int)local_2c;" (assignment_expression "param_1[2] = (int)local_2c" (subscript_expression "param_1[2]" (identifier "param_1") ([ "[") (number_literal "2") (] "]")) (= "=") (cast_expression "(int)local_2c" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "local_2c"))) (; ";")) (expression_statement "local_30 = local_2c + *param_1;" (assignment_expression "local_30 = local_2c + *param_1" (identifier "local_30") (= "=") (binary_expression "local_2c + *param_1" (identifier "local_2c") (+ "+") (pointer_expression "*param_1" (* "*") (identifier "param_1")))) (; ";")) (expression_statement "uVar3 = (uint)bVar5;" (assignment_expression "uVar3 = (uint)bVar5" (identifier "uVar3") (= "=") (cast_expression "(uint)bVar5" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (identifier "bVar5"))) (; ";")) (expression_statement "pbVar2 = local_2c + iVar1;" (assignment_expression "pbVar2 = local_2c + iVar1" (identifier "pbVar2") (= "=") (binary_expression "local_2c + iVar1" (identifier "local_2c") (+ "+") (identifier "iVar1"))) (; ";")) (} "}")))) (expression_statement "pbVar4 = pbVar2 + 1;" (assignment_expression "pbVar4 = pbVar2 + 1" (identifier "pbVar4") (= "=") (binary_expression "pbVar2 + 1" (identifier "pbVar2") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "*pbVar2 = (byte)uVar3;" (assignment_expression "*pbVar2 = (byte)uVar3" (pointer_expression "*pbVar2" (* "*") (identifier "pbVar2")) (= "=") (cast_expression "(byte)uVar3" (( "(") (type_descriptor "byte" (type_identifier "byte")) () ")") (identifier "uVar3"))) (; ";")) (if_statement "if (uVar6 == (int)(char)param_3) {\nLAB_0001312b:\n      param_1[1] = (int)pbVar4 - (int)local_2c;\n      return param_1;\n    }" (if "if") (parenthesized_expression "(uVar6 == (int)(char)param_3)" (( "(") (binary_expression "uVar6 == (int)(char)param_3" (identifier "uVar6") (== "==") (cast_expression "(int)(char)param_3" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (cast_expression "(char)param_3" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (identifier "param_3")))) () ")")) (compound_statement "{\nLAB_0001312b:\n      param_1[1] = (int)pbVar4 - (int)local_2c;\n      return param_1;\n    }" ({ "{") (labeled_statement "LAB_0001312b:\n      param_1[1] = (int)pbVar4 - (int)local_2c;" (statement_identifier "LAB_0001312b") (: ":") (expression_statement "param_1[1] = (int)pbVar4 - (int)local_2c;" (assignment_expression "param_1[1] = (int)pbVar4 - (int)local_2c" (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]")) (= "=") (binary_expression "(int)pbVar4 - (int)local_2c" (cast_expression "(int)pbVar4" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "pbVar4")) (- "-") (cast_expression "(int)local_2c" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "local_2c")))) (; ";"))) (return_statement "return param_1;" (return "return") (identifier "param_1") (; ";")) (} "}"))) (} "}")) (while "while") (parenthesized_expression "( true )" (( "(") (true "true") () ")")) (; ";")) (} "}")))

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

type_1 * function_1(type_1 *type_1,type_2 *stream,char var_7)

{
  type_3 *var_2;
  size_t var_9;
  char *var_10;
  type_4 var_5;
  char *var_1;
  type_3 bVar6;
  type_4 var_11;
  char *var_3;
  char *var_6;
  
  var_1 = type_1->buffer;
  var_3 = var_1 + type_1->size;
  var_6 = var_1;
  if ((stream->_flags & 0x10) != 0) {
    return (type_1 *)0x0;
  }
  do {
    var_2 = (type_3 *)stream->_IO_read_ptr;
    if (var_2 < stream->_IO_read_end) {
      stream->_IO_read_ptr = (char *)(var_2 + 1);
      var_5 = (type_4)*var_2;
LAB_00013069:
      var_10 = var_1;
      var_11 = var_5;
      bVar6 = (type_3)var_5;
      if (var_1 == var_3) goto LAB_000130c6;
    }
    else {
      var_5 = var_4((type_5 *)stream);
      if (var_5 != 0xffffffff) goto LAB_00013069;
      if (var_6 == var_1) {
        return (type_1 *)0x0;
      }
      if ((stream->_flags & 0x20) != 0) {
        return (type_1 *)0x0;
      }
      if (var_1[-1] == var_7) goto LAB_0001312b;
      var_11 = (int)var_7;
      bVar6 = var_7;
      if (var_1 != var_3) {
        *var_1 = var_7;
        var_1 = var_1 + 1;
        goto LAB_0001312b;
      }
LAB_000130c6:
      var_9 = type_1->size;
      var_6 = (char *)var_8(var_6,&type_1->size);
      type_1->buffer = var_6;
      var_3 = var_6 + type_1->size;
      var_5 = (type_4)bVar6;
      var_10 = var_6 + var_9;
    }
    var_1 = var_10 + 1;
    *var_10 = (char)var_5;
    if (var_11 == (int)var_7) {
LAB_0001312b:
      type_1->length = (int)var_1 - (int)var_6;
      return type_1;
    }
  } while( true );
}


(translation_unit (function_definition type: (primitive_type) declarator: (pointer_declarator declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (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: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (subscript_expression argument: (identifier) index: (number_literal))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (pointer_expression argument: (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (field_expression argument: (identifier) field: (field_identifier)) right: (number_literal))) right: (number_literal))) consequence: (compound_statement (return_statement (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (number_literal))))) (do_statement body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (field_expression argument: (identifier) field: (field_identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (field_expression argument: (identifier) field: (field_identifier)))) consequence: (compound_statement (expression_statement (assignment_expression left: (field_expression argument: (identifier) field: (field_identifier)) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal)))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (parenthesized_expression (identifier)) right: (identifier)))) (labeled_statement label: (statement_identifier) (expression_statement (assignment_expression left: (identifier) right: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier)) value: (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (goto_statement label: (statement_identifier)))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (goto_statement label: (statement_identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (compound_statement (return_statement (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (number_literal))))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (field_expression argument: (identifier) field: (field_identifier)) right: (number_literal))) right: (number_literal))) consequence: (compound_statement (return_statement (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (number_literal))))) (if_statement condition: (parenthesized_expression (binary_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (identifier))) consequence: (goto_statement label: (statement_identifier))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (compound_statement (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (goto_statement label: (statement_identifier)))) (labeled_statement label: (statement_identifier) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier)))))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (pointer_expression argument: (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier)) value: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (identifier))))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (cast_expression type: (type_descriptor type: (type_identifier)) value: (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier))))) consequence: (compound_statement (labeled_statement label: (statement_identifier) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)))))) (return_statement (identifier))))) condition: (parenthesized_expression (true))))))

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

int * MASKED(int *param_1,_IO_FILE *param_2,byte param_3)

{
  int iVar1;
  byte *pbVar2;
  uint uVar3;
  byte *pbVar4;
  byte bVar5;
  uint uVar6;
  byte *local_30;
  byte *local_2c;
  
  pbVar4 = (byte *)param_1[2];
  local_30 = pbVar4 + *param_1;
  local_2c = pbVar4;
  if ((param_2->_flags & 0x10) != 0) {
    return (int *)0x0;
  }
  do {
    pbVar2 = (byte *)param_2->_IO_read_ptr;
    if (pbVar2 < param_2->_IO_read_end) {
      param_2->_IO_read_ptr = (char *)(pbVar2 + 1);
      uVar3 = (uint)*pbVar2;
LAB_00013069:
      pbVar2 = pbVar4;
      uVar6 = uVar3;
      bVar5 = (byte)uVar3;
      if (pbVar4 == local_30) goto LAB_000130c6;
    }
    else {
      uVar3 = __uflow(param_2);
      if (uVar3 != 0xffffffff) goto LAB_00013069;
      if (local_2c == pbVar4) {
        return (int *)0x0;
      }
      if ((param_2->_flags & 0x20) != 0) {
        return (int *)0x0;
      }
      if (pbVar4[-1] == param_3) goto LAB_0001312b;
      uVar6 = (int)(char)param_3;
      bVar5 = param_3;
      if (pbVar4 != local_30) {
        *pbVar4 = param_3;
        pbVar4 = pbVar4 + 1;
        goto LAB_0001312b;
      }
LAB_000130c6:
      iVar1 = *param_1;
      local_2c = (byte *)FUN_00015d70(local_2c,param_1);
      param_1[2] = (int)local_2c;
      local_30 = local_2c + *param_1;
      uVar3 = (uint)bVar5;
      pbVar2 = local_2c + iVar1;
    }
    pbVar4 = pbVar2 + 1;
    *pbVar2 = (byte)uVar3;
    if (uVar6 == (int)(char)param_3) {
LAB_0001312b:
      param_1[1] = (int)pbVar4 - (int)local_2c;
      return param_1;
    }
  } while( true );
}

