
int md5_stream(FILE *stream,void *resblock)

{
  int iVar1;
  size_t sVar2;
  ulong len;
  md5_ctx ctx;
  char buffer [4168];
  
  md5_init_ctx(&ctx);
  do {
    len = 0;
    do {
      sVar2 = fread(buffer + len,1,0x1000 - len,(FILE *)stream);
      len = len + sVar2;
      if (0xfff < len) break;
    } while (sVar2 != 0);
    if (sVar2 == 0) {
      iVar1 = ferror((FILE *)stream);
      if (iVar1 == 0) {
        if (len != 0) {
          md5_process_bytes(buffer,len,&ctx);
        }
        md5_finish_ctx(&ctx,resblock);
        iVar1 = 0;
      }
      else {
        iVar1 = 1;
      }
      return iVar1;
    }
    md5_process_block(buffer,0x1000,&ctx);
  } while( true );
}



undefined4 FUN_0015a960(FILE *param_1,undefined8 param_2)

{
  int iVar1;
  size_t sVar2;
  ulong uVar3;
  undefined4 uVar4;
  undefined1 auStack_1128 [160];
  undefined1 local_1088 [4184];
  
  FUN_00159de0(auStack_1128);
  do {
    uVar3 = 0;
    do {
      sVar2 = fread(local_1088 + uVar3,1,0x1000 - uVar3,param_1);
      uVar3 = uVar3 + sVar2;
      if (0xfff < uVar3) break;
    } while (sVar2 != 0);
    if (sVar2 == 0) {
      iVar1 = ferror(param_1);
      if (iVar1 == 0) {
        if (uVar3 != 0) {
          FUN_0015a640(local_1088,uVar3,auStack_1128);
        }
        FUN_0015a5a0(auStack_1128,param_2);
        uVar4 = 0;
      }
      else {
        uVar4 = 1;
      }
      return uVar4;
    }
    FUN_00159e30(local_1088,0x1000,auStack_1128);
  } while( true );
}


PUSH R15
MOV R15,RSI
PUSH R14
PUSH R13
MOV R13D,0x1000
PUSH R12
MOV R12,RDI
PUSH RBP
PUSH RBX
SUB RSP,0x10f8
MOV R14,RSP
LEA RBP,[RSP + 0xa0]
MOV RDI,R14
CALL 0x00159de0
XOR EBX,EBX
NOP word ptr [RAX + RAX*0x1]
MOV RDX,R13
LEA RDI,[RBP + RBX*0x1]
MOV RCX,R12
MOV ESI,0x1
SUB RDX,RBX
CALL 0x0010d230
ADD RBX,RAX
CMP RBX,0xfff
JA 0x0015a9c1
TEST RAX,RAX
JNZ 0x0015a998
TEST RAX,RAX
JZ 0x0015a9e0
MOV RDX,R14
MOV ESI,0x1000
MOV RDI,RBP
CALL 0x00159e30
JMP 0x0015a990
MOV RDI,R12
CALL 0x0010d190
MOV R12D,EAX
TEST EAX,EAX
JNZ 0x0015aa14
TEST RBX,RBX
JNZ 0x0015aa1c
MOV RSI,R15
MOV RDI,R14
CALL 0x0015a5a0
ADD RSP,0x10f8
MOV EAX,R12D
POP RBX
POP RBP
POP R12
POP R13
POP R14
POP R15
RET
MOV R12D,0x1
JMP 0x0015a9ff
MOV RDX,R14
MOV RSI,RBX
MOV RDI,RBP
CALL 0x0015a640
JMP 0x0015a9f4
(translation_unit "undefined4 FUN_0015a960(FILE *param_1,undefined8 param_2)\n\n{\n  int iVar1;\n  size_t sVar2;\n  ulong uVar3;\n  undefined4 uVar4;\n  undefined1 auStack_1128 [160];\n  undefined1 local_1088 [4184];\n  \n  FUN_00159de0(auStack_1128);\n  do {\n    uVar3 = 0;\n    do {\n      sVar2 = fread(local_1088 + uVar3,1,0x1000 - uVar3,param_1);\n      uVar3 = uVar3 + sVar2;\n      if (0xfff < uVar3) break;\n    } while (sVar2 != 0);\n    if (sVar2 == 0) {\n      iVar1 = ferror(param_1);\n      if (iVar1 == 0) {\n        if (uVar3 != 0) {\n          FUN_0015a640(local_1088,uVar3,auStack_1128);\n        }\n        FUN_0015a5a0(auStack_1128,param_2);\n        uVar4 = 0;\n      }\n      else {\n        uVar4 = 1;\n      }\n      return uVar4;\n    }\n    FUN_00159e30(local_1088,0x1000,auStack_1128);\n  } while( true );\n}\n\n" (function_definition "undefined4 FUN_0015a960(FILE *param_1,undefined8 param_2)\n\n{\n  int iVar1;\n  size_t sVar2;\n  ulong uVar3;\n  undefined4 uVar4;\n  undefined1 auStack_1128 [160];\n  undefined1 local_1088 [4184];\n  \n  FUN_00159de0(auStack_1128);\n  do {\n    uVar3 = 0;\n    do {\n      sVar2 = fread(local_1088 + uVar3,1,0x1000 - uVar3,param_1);\n      uVar3 = uVar3 + sVar2;\n      if (0xfff < uVar3) break;\n    } while (sVar2 != 0);\n    if (sVar2 == 0) {\n      iVar1 = ferror(param_1);\n      if (iVar1 == 0) {\n        if (uVar3 != 0) {\n          FUN_0015a640(local_1088,uVar3,auStack_1128);\n        }\n        FUN_0015a5a0(auStack_1128,param_2);\n        uVar4 = 0;\n      }\n      else {\n        uVar4 = 1;\n      }\n      return uVar4;\n    }\n    FUN_00159e30(local_1088,0x1000,auStack_1128);\n  } while( true );\n}" type_identifier (function_declarator "FUN_0015a960(FILE *param_1,undefined8 param_2)" identifier (parameter_list "(FILE *param_1,undefined8 param_2)" ( (parameter_declaration "FILE *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "undefined8 param_2" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  size_t sVar2;\n  ulong uVar3;\n  undefined4 uVar4;\n  undefined1 auStack_1128 [160];\n  undefined1 local_1088 [4184];\n  \n  FUN_00159de0(auStack_1128);\n  do {\n    uVar3 = 0;\n    do {\n      sVar2 = fread(local_1088 + uVar3,1,0x1000 - uVar3,param_1);\n      uVar3 = uVar3 + sVar2;\n      if (0xfff < uVar3) break;\n    } while (sVar2 != 0);\n    if (sVar2 == 0) {\n      iVar1 = ferror(param_1);\n      if (iVar1 == 0) {\n        if (uVar3 != 0) {\n          FUN_0015a640(local_1088,uVar3,auStack_1128);\n        }\n        FUN_0015a5a0(auStack_1128,param_2);\n        uVar4 = 0;\n      }\n      else {\n        uVar4 = 1;\n      }\n      return uVar4;\n    }\n    FUN_00159e30(local_1088,0x1000,auStack_1128);\n  } while( true );\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "size_t sVar2;" primitive_type identifier ;) (declaration "ulong uVar3;" type_identifier identifier ;) (declaration "undefined4 uVar4;" type_identifier identifier ;) (declaration "undefined1 auStack_1128 [160];" type_identifier (array_declarator "auStack_1128 [160]" identifier [ number_literal ]) ;) (declaration "undefined1 local_1088 [4184];" type_identifier (array_declarator "local_1088 [4184]" identifier [ number_literal ]) ;) (expression_statement "FUN_00159de0(auStack_1128);" (call_expression "FUN_00159de0(auStack_1128)" identifier (argument_list "(auStack_1128)" ( identifier ))) ;) (do_statement "do {\n    uVar3 = 0;\n    do {\n      sVar2 = fread(local_1088 + uVar3,1,0x1000 - uVar3,param_1);\n      uVar3 = uVar3 + sVar2;\n      if (0xfff < uVar3) break;\n    } while (sVar2 != 0);\n    if (sVar2 == 0) {\n      iVar1 = ferror(param_1);\n      if (iVar1 == 0) {\n        if (uVar3 != 0) {\n          FUN_0015a640(local_1088,uVar3,auStack_1128);\n        }\n        FUN_0015a5a0(auStack_1128,param_2);\n        uVar4 = 0;\n      }\n      else {\n        uVar4 = 1;\n      }\n      return uVar4;\n    }\n    FUN_00159e30(local_1088,0x1000,auStack_1128);\n  } while( true );" do (compound_statement "{\n    uVar3 = 0;\n    do {\n      sVar2 = fread(local_1088 + uVar3,1,0x1000 - uVar3,param_1);\n      uVar3 = uVar3 + sVar2;\n      if (0xfff < uVar3) break;\n    } while (sVar2 != 0);\n    if (sVar2 == 0) {\n      iVar1 = ferror(param_1);\n      if (iVar1 == 0) {\n        if (uVar3 != 0) {\n          FUN_0015a640(local_1088,uVar3,auStack_1128);\n        }\n        FUN_0015a5a0(auStack_1128,param_2);\n        uVar4 = 0;\n      }\n      else {\n        uVar4 = 1;\n      }\n      return uVar4;\n    }\n    FUN_00159e30(local_1088,0x1000,auStack_1128);\n  }" { (expression_statement "uVar3 = 0;" (assignment_expression "uVar3 = 0" identifier = number_literal) ;) (do_statement "do {\n      sVar2 = fread(local_1088 + uVar3,1,0x1000 - uVar3,param_1);\n      uVar3 = uVar3 + sVar2;\n      if (0xfff < uVar3) break;\n    } while (sVar2 != 0);" do (compound_statement "{\n      sVar2 = fread(local_1088 + uVar3,1,0x1000 - uVar3,param_1);\n      uVar3 = uVar3 + sVar2;\n      if (0xfff < uVar3) break;\n    }" { (expression_statement "sVar2 = fread(local_1088 + uVar3,1,0x1000 - uVar3,param_1);" (assignment_expression "sVar2 = fread(local_1088 + uVar3,1,0x1000 - uVar3,param_1)" identifier = (call_expression "fread(local_1088 + uVar3,1,0x1000 - uVar3,param_1)" identifier (argument_list "(local_1088 + uVar3,1,0x1000 - uVar3,param_1)" ( (binary_expression "local_1088 + uVar3" identifier + identifier) , number_literal , (binary_expression "0x1000 - uVar3" number_literal - identifier) , identifier )))) ;) (expression_statement "uVar3 = uVar3 + sVar2;" (assignment_expression "uVar3 = uVar3 + sVar2" identifier = (binary_expression "uVar3 + sVar2" identifier + identifier)) ;) (if_statement "if (0xfff < uVar3) break;" if (parenthesized_expression "(0xfff < uVar3)" ( (binary_expression "0xfff < uVar3" number_literal < identifier) )) (break_statement "break;" break ;)) }) while (parenthesized_expression "(sVar2 != 0)" ( (binary_expression "sVar2 != 0" identifier != number_literal) )) ;) (if_statement "if (sVar2 == 0) {\n      iVar1 = ferror(param_1);\n      if (iVar1 == 0) {\n        if (uVar3 != 0) {\n          FUN_0015a640(local_1088,uVar3,auStack_1128);\n        }\n        FUN_0015a5a0(auStack_1128,param_2);\n        uVar4 = 0;\n      }\n      else {\n        uVar4 = 1;\n      }\n      return uVar4;\n    }" if (parenthesized_expression "(sVar2 == 0)" ( (binary_expression "sVar2 == 0" identifier == number_literal) )) (compound_statement "{\n      iVar1 = ferror(param_1);\n      if (iVar1 == 0) {\n        if (uVar3 != 0) {\n          FUN_0015a640(local_1088,uVar3,auStack_1128);\n        }\n        FUN_0015a5a0(auStack_1128,param_2);\n        uVar4 = 0;\n      }\n      else {\n        uVar4 = 1;\n      }\n      return uVar4;\n    }" { (expression_statement "iVar1 = ferror(param_1);" (assignment_expression "iVar1 = ferror(param_1)" identifier = (call_expression "ferror(param_1)" identifier (argument_list "(param_1)" ( identifier )))) ;) (if_statement "if (iVar1 == 0) {\n        if (uVar3 != 0) {\n          FUN_0015a640(local_1088,uVar3,auStack_1128);\n        }\n        FUN_0015a5a0(auStack_1128,param_2);\n        uVar4 = 0;\n      }\n      else {\n        uVar4 = 1;\n      }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n        if (uVar3 != 0) {\n          FUN_0015a640(local_1088,uVar3,auStack_1128);\n        }\n        FUN_0015a5a0(auStack_1128,param_2);\n        uVar4 = 0;\n      }" { (if_statement "if (uVar3 != 0) {\n          FUN_0015a640(local_1088,uVar3,auStack_1128);\n        }" if (parenthesized_expression "(uVar3 != 0)" ( (binary_expression "uVar3 != 0" identifier != number_literal) )) (compound_statement "{\n          FUN_0015a640(local_1088,uVar3,auStack_1128);\n        }" { (expression_statement "FUN_0015a640(local_1088,uVar3,auStack_1128);" (call_expression "FUN_0015a640(local_1088,uVar3,auStack_1128)" identifier (argument_list "(local_1088,uVar3,auStack_1128)" ( identifier , identifier , identifier ))) ;) })) (expression_statement "FUN_0015a5a0(auStack_1128,param_2);" (call_expression "FUN_0015a5a0(auStack_1128,param_2)" identifier (argument_list "(auStack_1128,param_2)" ( identifier , identifier ))) ;) (expression_statement "uVar4 = 0;" (assignment_expression "uVar4 = 0" identifier = number_literal) ;) }) (else_clause "else {\n        uVar4 = 1;\n      }" else (compound_statement "{\n        uVar4 = 1;\n      }" { (expression_statement "uVar4 = 1;" (assignment_expression "uVar4 = 1" identifier = number_literal) ;) }))) (return_statement "return uVar4;" return identifier ;) })) (expression_statement "FUN_00159e30(local_1088,0x1000,auStack_1128);" (call_expression "FUN_00159e30(local_1088,0x1000,auStack_1128)" identifier (argument_list "(local_1088,0x1000,auStack_1128)" ( identifier , number_literal , identifier ))) ;) }) while (parenthesized_expression "( true )" ( true )) ;) })))
(translation_unit "int md5_stream(FILE *stream,void *resblock)\n\n{\n  int iVar1;\n  size_t sVar2;\n  ulong len;\n  md5_ctx ctx;\n  char buffer [4168];\n  \n  md5_init_ctx(&ctx);\n  do {\n    len = 0;\n    do {\n      sVar2 = fread(buffer + len,1,0x1000 - len,(FILE *)stream);\n      len = len + sVar2;\n      if (0xfff < len) break;\n    } while (sVar2 != 0);\n    if (sVar2 == 0) {\n      iVar1 = ferror((FILE *)stream);\n      if (iVar1 == 0) {\n        if (len != 0) {\n          md5_process_bytes(buffer,len,&ctx);\n        }\n        md5_finish_ctx(&ctx,resblock);\n        iVar1 = 0;\n      }\n      else {\n        iVar1 = 1;\n      }\n      return iVar1;\n    }\n    md5_process_block(buffer,0x1000,&ctx);\n  } while( true );\n}\n\n" (function_definition "int md5_stream(FILE *stream,void *resblock)\n\n{\n  int iVar1;\n  size_t sVar2;\n  ulong len;\n  md5_ctx ctx;\n  char buffer [4168];\n  \n  md5_init_ctx(&ctx);\n  do {\n    len = 0;\n    do {\n      sVar2 = fread(buffer + len,1,0x1000 - len,(FILE *)stream);\n      len = len + sVar2;\n      if (0xfff < len) break;\n    } while (sVar2 != 0);\n    if (sVar2 == 0) {\n      iVar1 = ferror((FILE *)stream);\n      if (iVar1 == 0) {\n        if (len != 0) {\n          md5_process_bytes(buffer,len,&ctx);\n        }\n        md5_finish_ctx(&ctx,resblock);\n        iVar1 = 0;\n      }\n      else {\n        iVar1 = 1;\n      }\n      return iVar1;\n    }\n    md5_process_block(buffer,0x1000,&ctx);\n  } while( true );\n}" primitive_type (function_declarator "md5_stream(FILE *stream,void *resblock)" identifier (parameter_list "(FILE *stream,void *resblock)" ( (parameter_declaration "FILE *stream" type_identifier (pointer_declarator "*stream" * identifier)) , (parameter_declaration "void *resblock" primitive_type (pointer_declarator "*resblock" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  size_t sVar2;\n  ulong len;\n  md5_ctx ctx;\n  char buffer [4168];\n  \n  md5_init_ctx(&ctx);\n  do {\n    len = 0;\n    do {\n      sVar2 = fread(buffer + len,1,0x1000 - len,(FILE *)stream);\n      len = len + sVar2;\n      if (0xfff < len) break;\n    } while (sVar2 != 0);\n    if (sVar2 == 0) {\n      iVar1 = ferror((FILE *)stream);\n      if (iVar1 == 0) {\n        if (len != 0) {\n          md5_process_bytes(buffer,len,&ctx);\n        }\n        md5_finish_ctx(&ctx,resblock);\n        iVar1 = 0;\n      }\n      else {\n        iVar1 = 1;\n      }\n      return iVar1;\n    }\n    md5_process_block(buffer,0x1000,&ctx);\n  } while( true );\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "size_t sVar2;" primitive_type identifier ;) (declaration "ulong len;" type_identifier identifier ;) (declaration "md5_ctx ctx;" type_identifier identifier ;) (declaration "char buffer [4168];" primitive_type (array_declarator "buffer [4168]" identifier [ number_literal ]) ;) (expression_statement "md5_init_ctx(&ctx);" (call_expression "md5_init_ctx(&ctx)" identifier (argument_list "(&ctx)" ( (pointer_expression "&ctx" & identifier) ))) ;) (do_statement "do {\n    len = 0;\n    do {\n      sVar2 = fread(buffer + len,1,0x1000 - len,(FILE *)stream);\n      len = len + sVar2;\n      if (0xfff < len) break;\n    } while (sVar2 != 0);\n    if (sVar2 == 0) {\n      iVar1 = ferror((FILE *)stream);\n      if (iVar1 == 0) {\n        if (len != 0) {\n          md5_process_bytes(buffer,len,&ctx);\n        }\n        md5_finish_ctx(&ctx,resblock);\n        iVar1 = 0;\n      }\n      else {\n        iVar1 = 1;\n      }\n      return iVar1;\n    }\n    md5_process_block(buffer,0x1000,&ctx);\n  } while( true );" do (compound_statement "{\n    len = 0;\n    do {\n      sVar2 = fread(buffer + len,1,0x1000 - len,(FILE *)stream);\n      len = len + sVar2;\n      if (0xfff < len) break;\n    } while (sVar2 != 0);\n    if (sVar2 == 0) {\n      iVar1 = ferror((FILE *)stream);\n      if (iVar1 == 0) {\n        if (len != 0) {\n          md5_process_bytes(buffer,len,&ctx);\n        }\n        md5_finish_ctx(&ctx,resblock);\n        iVar1 = 0;\n      }\n      else {\n        iVar1 = 1;\n      }\n      return iVar1;\n    }\n    md5_process_block(buffer,0x1000,&ctx);\n  }" { (expression_statement "len = 0;" (assignment_expression "len = 0" identifier = number_literal) ;) (do_statement "do {\n      sVar2 = fread(buffer + len,1,0x1000 - len,(FILE *)stream);\n      len = len + sVar2;\n      if (0xfff < len) break;\n    } while (sVar2 != 0);" do (compound_statement "{\n      sVar2 = fread(buffer + len,1,0x1000 - len,(FILE *)stream);\n      len = len + sVar2;\n      if (0xfff < len) break;\n    }" { (expression_statement "sVar2 = fread(buffer + len,1,0x1000 - len,(FILE *)stream);" (assignment_expression "sVar2 = fread(buffer + len,1,0x1000 - len,(FILE *)stream)" identifier = (call_expression "fread(buffer + len,1,0x1000 - len,(FILE *)stream)" identifier (argument_list "(buffer + len,1,0x1000 - len,(FILE *)stream)" ( (binary_expression "buffer + len" identifier + identifier) , number_literal , (binary_expression "0x1000 - len" number_literal - identifier) , (cast_expression "(FILE *)stream" ( (type_descriptor "FILE *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) )))) ;) (expression_statement "len = len + sVar2;" (assignment_expression "len = len + sVar2" identifier = (binary_expression "len + sVar2" identifier + identifier)) ;) (if_statement "if (0xfff < len) break;" if (parenthesized_expression "(0xfff < len)" ( (binary_expression "0xfff < len" number_literal < identifier) )) (break_statement "break;" break ;)) }) while (parenthesized_expression "(sVar2 != 0)" ( (binary_expression "sVar2 != 0" identifier != number_literal) )) ;) (if_statement "if (sVar2 == 0) {\n      iVar1 = ferror((FILE *)stream);\n      if (iVar1 == 0) {\n        if (len != 0) {\n          md5_process_bytes(buffer,len,&ctx);\n        }\n        md5_finish_ctx(&ctx,resblock);\n        iVar1 = 0;\n      }\n      else {\n        iVar1 = 1;\n      }\n      return iVar1;\n    }" if (parenthesized_expression "(sVar2 == 0)" ( (binary_expression "sVar2 == 0" identifier == number_literal) )) (compound_statement "{\n      iVar1 = ferror((FILE *)stream);\n      if (iVar1 == 0) {\n        if (len != 0) {\n          md5_process_bytes(buffer,len,&ctx);\n        }\n        md5_finish_ctx(&ctx,resblock);\n        iVar1 = 0;\n      }\n      else {\n        iVar1 = 1;\n      }\n      return iVar1;\n    }" { (expression_statement "iVar1 = ferror((FILE *)stream);" (assignment_expression "iVar1 = ferror((FILE *)stream)" identifier = (call_expression "ferror((FILE *)stream)" identifier (argument_list "((FILE *)stream)" ( (cast_expression "(FILE *)stream" ( (type_descriptor "FILE *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) )))) ;) (if_statement "if (iVar1 == 0) {\n        if (len != 0) {\n          md5_process_bytes(buffer,len,&ctx);\n        }\n        md5_finish_ctx(&ctx,resblock);\n        iVar1 = 0;\n      }\n      else {\n        iVar1 = 1;\n      }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n        if (len != 0) {\n          md5_process_bytes(buffer,len,&ctx);\n        }\n        md5_finish_ctx(&ctx,resblock);\n        iVar1 = 0;\n      }" { (if_statement "if (len != 0) {\n          md5_process_bytes(buffer,len,&ctx);\n        }" if (parenthesized_expression "(len != 0)" ( (binary_expression "len != 0" identifier != number_literal) )) (compound_statement "{\n          md5_process_bytes(buffer,len,&ctx);\n        }" { (expression_statement "md5_process_bytes(buffer,len,&ctx);" (call_expression "md5_process_bytes(buffer,len,&ctx)" identifier (argument_list "(buffer,len,&ctx)" ( identifier , identifier , (pointer_expression "&ctx" & identifier) ))) ;) })) (expression_statement "md5_finish_ctx(&ctx,resblock);" (call_expression "md5_finish_ctx(&ctx,resblock)" identifier (argument_list "(&ctx,resblock)" ( (pointer_expression "&ctx" & identifier) , identifier ))) ;) (expression_statement "iVar1 = 0;" (assignment_expression "iVar1 = 0" identifier = number_literal) ;) }) (else_clause "else {\n        iVar1 = 1;\n      }" else (compound_statement "{\n        iVar1 = 1;\n      }" { (expression_statement "iVar1 = 1;" (assignment_expression "iVar1 = 1" identifier = number_literal) ;) }))) (return_statement "return iVar1;" return identifier ;) })) (expression_statement "md5_process_block(buffer,0x1000,&ctx);" (call_expression "md5_process_block(buffer,0x1000,&ctx)" identifier (argument_list "(buffer,0x1000,&ctx)" ( identifier , number_literal , (pointer_expression "&ctx" & identifier) ))) ;) }) while (parenthesized_expression "( true )" ( true )) ;) })))
(translation_unit "undefined4 FUN_0015a960(FILE *param_1,undefined8 param_2)\n\n{\n  int iVar1;\n  size_t sVar2;\n  ulong uVar3;\n  undefined4 uVar4;\n  undefined1 auStack_1128 [160];\n  undefined1 local_1088 [4184];\n  \n  FUN_00159de0(auStack_1128);\n  do {\n    uVar3 = 0;\n    do {\n      sVar2 = fread(local_1088 + uVar3,1,0x1000 - uVar3,param_1);\n      uVar3 = uVar3 + sVar2;\n      if (0xfff < uVar3) break;\n    } while (sVar2 != 0);\n    if (sVar2 == 0) {\n      iVar1 = ferror(param_1);\n      if (iVar1 == 0) {\n        if (uVar3 != 0) {\n          FUN_0015a640(local_1088,uVar3,auStack_1128);\n        }\n        FUN_0015a5a0(auStack_1128,param_2);\n        uVar4 = 0;\n      }\n      else {\n        uVar4 = 1;\n      }\n      return uVar4;\n    }\n    FUN_00159e30(local_1088,0x1000,auStack_1128);\n  } while( true );\n}\n\n" (function_definition "undefined4 FUN_0015a960(FILE *param_1,undefined8 param_2)\n\n{\n  int iVar1;\n  size_t sVar2;\n  ulong uVar3;\n  undefined4 uVar4;\n  undefined1 auStack_1128 [160];\n  undefined1 local_1088 [4184];\n  \n  FUN_00159de0(auStack_1128);\n  do {\n    uVar3 = 0;\n    do {\n      sVar2 = fread(local_1088 + uVar3,1,0x1000 - uVar3,param_1);\n      uVar3 = uVar3 + sVar2;\n      if (0xfff < uVar3) break;\n    } while (sVar2 != 0);\n    if (sVar2 == 0) {\n      iVar1 = ferror(param_1);\n      if (iVar1 == 0) {\n        if (uVar3 != 0) {\n          FUN_0015a640(local_1088,uVar3,auStack_1128);\n        }\n        FUN_0015a5a0(auStack_1128,param_2);\n        uVar4 = 0;\n      }\n      else {\n        uVar4 = 1;\n      }\n      return uVar4;\n    }\n    FUN_00159e30(local_1088,0x1000,auStack_1128);\n  } while( true );\n}" type_identifier (function_declarator "FUN_0015a960(FILE *param_1,undefined8 param_2)" identifier (parameter_list "(FILE *param_1,undefined8 param_2)" ( (parameter_declaration "FILE *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "undefined8 param_2" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  size_t sVar2;\n  ulong uVar3;\n  undefined4 uVar4;\n  undefined1 auStack_1128 [160];\n  undefined1 local_1088 [4184];\n  \n  FUN_00159de0(auStack_1128);\n  do {\n    uVar3 = 0;\n    do {\n      sVar2 = fread(local_1088 + uVar3,1,0x1000 - uVar3,param_1);\n      uVar3 = uVar3 + sVar2;\n      if (0xfff < uVar3) break;\n    } while (sVar2 != 0);\n    if (sVar2 == 0) {\n      iVar1 = ferror(param_1);\n      if (iVar1 == 0) {\n        if (uVar3 != 0) {\n          FUN_0015a640(local_1088,uVar3,auStack_1128);\n        }\n        FUN_0015a5a0(auStack_1128,param_2);\n        uVar4 = 0;\n      }\n      else {\n        uVar4 = 1;\n      }\n      return uVar4;\n    }\n    FUN_00159e30(local_1088,0x1000,auStack_1128);\n  } while( true );\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "size_t sVar2;" primitive_type identifier ;) (declaration "ulong uVar3;" type_identifier identifier ;) (declaration "undefined4 uVar4;" type_identifier identifier ;) (declaration "undefined1 auStack_1128 [160];" type_identifier (array_declarator "auStack_1128 [160]" identifier [ number_literal ]) ;) (declaration "undefined1 local_1088 [4184];" type_identifier (array_declarator "local_1088 [4184]" identifier [ number_literal ]) ;) (expression_statement "FUN_00159de0(auStack_1128);" (call_expression "FUN_00159de0(auStack_1128)" identifier (argument_list "(auStack_1128)" ( identifier ))) ;) (do_statement "do {\n    uVar3 = 0;\n    do {\n      sVar2 = fread(local_1088 + uVar3,1,0x1000 - uVar3,param_1);\n      uVar3 = uVar3 + sVar2;\n      if (0xfff < uVar3) break;\n    } while (sVar2 != 0);\n    if (sVar2 == 0) {\n      iVar1 = ferror(param_1);\n      if (iVar1 == 0) {\n        if (uVar3 != 0) {\n          FUN_0015a640(local_1088,uVar3,auStack_1128);\n        }\n        FUN_0015a5a0(auStack_1128,param_2);\n        uVar4 = 0;\n      }\n      else {\n        uVar4 = 1;\n      }\n      return uVar4;\n    }\n    FUN_00159e30(local_1088,0x1000,auStack_1128);\n  } while( true );" do (compound_statement "{\n    uVar3 = 0;\n    do {\n      sVar2 = fread(local_1088 + uVar3,1,0x1000 - uVar3,param_1);\n      uVar3 = uVar3 + sVar2;\n      if (0xfff < uVar3) break;\n    } while (sVar2 != 0);\n    if (sVar2 == 0) {\n      iVar1 = ferror(param_1);\n      if (iVar1 == 0) {\n        if (uVar3 != 0) {\n          FUN_0015a640(local_1088,uVar3,auStack_1128);\n        }\n        FUN_0015a5a0(auStack_1128,param_2);\n        uVar4 = 0;\n      }\n      else {\n        uVar4 = 1;\n      }\n      return uVar4;\n    }\n    FUN_00159e30(local_1088,0x1000,auStack_1128);\n  }" { (expression_statement "uVar3 = 0;" (assignment_expression "uVar3 = 0" identifier = number_literal) ;) (do_statement "do {\n      sVar2 = fread(local_1088 + uVar3,1,0x1000 - uVar3,param_1);\n      uVar3 = uVar3 + sVar2;\n      if (0xfff < uVar3) break;\n    } while (sVar2 != 0);" do (compound_statement "{\n      sVar2 = fread(local_1088 + uVar3,1,0x1000 - uVar3,param_1);\n      uVar3 = uVar3 + sVar2;\n      if (0xfff < uVar3) break;\n    }" { (expression_statement "sVar2 = fread(local_1088 + uVar3,1,0x1000 - uVar3,param_1);" (assignment_expression "sVar2 = fread(local_1088 + uVar3,1,0x1000 - uVar3,param_1)" identifier = (call_expression "fread(local_1088 + uVar3,1,0x1000 - uVar3,param_1)" identifier (argument_list "(local_1088 + uVar3,1,0x1000 - uVar3,param_1)" ( (binary_expression "local_1088 + uVar3" identifier + identifier) , number_literal , (binary_expression "0x1000 - uVar3" number_literal - identifier) , identifier )))) ;) (expression_statement "uVar3 = uVar3 + sVar2;" (assignment_expression "uVar3 = uVar3 + sVar2" identifier = (binary_expression "uVar3 + sVar2" identifier + identifier)) ;) (if_statement "if (0xfff < uVar3) break;" if (parenthesized_expression "(0xfff < uVar3)" ( (binary_expression "0xfff < uVar3" number_literal < identifier) )) (break_statement "break;" break ;)) }) while (parenthesized_expression "(sVar2 != 0)" ( (binary_expression "sVar2 != 0" identifier != number_literal) )) ;) (if_statement "if (sVar2 == 0) {\n      iVar1 = ferror(param_1);\n      if (iVar1 == 0) {\n        if (uVar3 != 0) {\n          FUN_0015a640(local_1088,uVar3,auStack_1128);\n        }\n        FUN_0015a5a0(auStack_1128,param_2);\n        uVar4 = 0;\n      }\n      else {\n        uVar4 = 1;\n      }\n      return uVar4;\n    }" if (parenthesized_expression "(sVar2 == 0)" ( (binary_expression "sVar2 == 0" identifier == number_literal) )) (compound_statement "{\n      iVar1 = ferror(param_1);\n      if (iVar1 == 0) {\n        if (uVar3 != 0) {\n          FUN_0015a640(local_1088,uVar3,auStack_1128);\n        }\n        FUN_0015a5a0(auStack_1128,param_2);\n        uVar4 = 0;\n      }\n      else {\n        uVar4 = 1;\n      }\n      return uVar4;\n    }" { (expression_statement "iVar1 = ferror(param_1);" (assignment_expression "iVar1 = ferror(param_1)" identifier = (call_expression "ferror(param_1)" identifier (argument_list "(param_1)" ( identifier )))) ;) (if_statement "if (iVar1 == 0) {\n        if (uVar3 != 0) {\n          FUN_0015a640(local_1088,uVar3,auStack_1128);\n        }\n        FUN_0015a5a0(auStack_1128,param_2);\n        uVar4 = 0;\n      }\n      else {\n        uVar4 = 1;\n      }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n        if (uVar3 != 0) {\n          FUN_0015a640(local_1088,uVar3,auStack_1128);\n        }\n        FUN_0015a5a0(auStack_1128,param_2);\n        uVar4 = 0;\n      }" { (if_statement "if (uVar3 != 0) {\n          FUN_0015a640(local_1088,uVar3,auStack_1128);\n        }" if (parenthesized_expression "(uVar3 != 0)" ( (binary_expression "uVar3 != 0" identifier != number_literal) )) (compound_statement "{\n          FUN_0015a640(local_1088,uVar3,auStack_1128);\n        }" { (expression_statement "FUN_0015a640(local_1088,uVar3,auStack_1128);" (call_expression "FUN_0015a640(local_1088,uVar3,auStack_1128)" identifier (argument_list "(local_1088,uVar3,auStack_1128)" ( identifier , identifier , identifier ))) ;) })) (expression_statement "FUN_0015a5a0(auStack_1128,param_2);" (call_expression "FUN_0015a5a0(auStack_1128,param_2)" identifier (argument_list "(auStack_1128,param_2)" ( identifier , identifier ))) ;) (expression_statement "uVar4 = 0;" (assignment_expression "uVar4 = 0" identifier = number_literal) ;) }) (else_clause "else {\n        uVar4 = 1;\n      }" else (compound_statement "{\n        uVar4 = 1;\n      }" { (expression_statement "uVar4 = 1;" (assignment_expression "uVar4 = 1" identifier = number_literal) ;) }))) (return_statement "return uVar4;" return identifier ;) })) (expression_statement "FUN_00159e30(local_1088,0x1000,auStack_1128);" (call_expression "FUN_00159e30(local_1088,0x1000,auStack_1128)" identifier (argument_list "(local_1088,0x1000,auStack_1128)" ( identifier , number_literal , identifier ))) ;) }) while (parenthesized_expression "( true )" ( true )) ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (array_declarator IDENT [ LIT ]) ;) (declaration TYPE (array_declarator IDENT [ LIT ]) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (binary_expression IDENT + IDENT) , LIT , (binary_expression LIT - IDENT) , IDENT )))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (break_statement break ;)) }) while (parenthesized_expression ( (binary_expression IDENT != LIT) )) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT ))) ;) })) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT ))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) }))) (return_statement return IDENT ;) })) (expression_statement (call_expression IDENT (argument_list ( IDENT , LIT , IDENT ))) ;) }) while (parenthesized_expression ( BOOL )) ;) })))
(function_definition "undefined4 FUN_0015a960(FILE *param_1,undefined8 param_2)\n\n{\n  int iVar1;\n  size_t sVar2;\n  ulong uVar3;\n  undefined4 uVar4;\n  undefined1 auStack_1128 [160];\n  undefined1 local_1088 [4184];\n  \n  FUN_00159de0(auStack_1128);\n  do {\n    uVar3 = 0;\n    do {\n      sVar2 = fread(local_1088 + uVar3,1,0x1000 - uVar3,param_1);\n      uVar3 = uVar3 + sVar2;\n      if (0xfff < uVar3) break;\n    } while (sVar2 != 0);\n    if (sVar2 == 0) {\n      iVar1 = ferror(param_1);\n      if (iVar1 == 0) {\n        if (uVar3 != 0) {\n          FUN_0015a640(local_1088,uVar3,auStack_1128);\n        }\n        FUN_0015a5a0(auStack_1128,param_2);\n        uVar4 = 0;\n      }\n      else {\n        uVar4 = 1;\n      }\n      return uVar4;\n    }\n    FUN_00159e30(local_1088,0x1000,auStack_1128);\n  } while( true );\n}" (type_identifier "undefined4") (function_declarator "FUN_0015a960(FILE *param_1,undefined8 param_2)" (identifier "FUN_0015a960") (parameter_list "(FILE *param_1,undefined8 param_2)" (( "(") (parameter_declaration "FILE *param_1" (type_identifier "FILE") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "undefined8 param_2" (type_identifier "undefined8") (identifier "param_2")) () ")"))) (compound_statement "{\n  int iVar1;\n  size_t sVar2;\n  ulong uVar3;\n  undefined4 uVar4;\n  undefined1 auStack_1128 [160];\n  undefined1 local_1088 [4184];\n  \n  FUN_00159de0(auStack_1128);\n  do {\n    uVar3 = 0;\n    do {\n      sVar2 = fread(local_1088 + uVar3,1,0x1000 - uVar3,param_1);\n      uVar3 = uVar3 + sVar2;\n      if (0xfff < uVar3) break;\n    } while (sVar2 != 0);\n    if (sVar2 == 0) {\n      iVar1 = ferror(param_1);\n      if (iVar1 == 0) {\n        if (uVar3 != 0) {\n          FUN_0015a640(local_1088,uVar3,auStack_1128);\n        }\n        FUN_0015a5a0(auStack_1128,param_2);\n        uVar4 = 0;\n      }\n      else {\n        uVar4 = 1;\n      }\n      return uVar4;\n    }\n    FUN_00159e30(local_1088,0x1000,auStack_1128);\n  } while( true );\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "size_t sVar2;" (primitive_type "size_t") (identifier "sVar2") (; ";")) (declaration "ulong uVar3;" (type_identifier "ulong") (identifier "uVar3") (; ";")) (declaration "undefined4 uVar4;" (type_identifier "undefined4") (identifier "uVar4") (; ";")) (declaration "undefined1 auStack_1128 [160];" (type_identifier "undefined1") (array_declarator "auStack_1128 [160]" (identifier "auStack_1128") ([ "[") (number_literal "160") (] "]")) (; ";")) (declaration "undefined1 local_1088 [4184];" (type_identifier "undefined1") (array_declarator "local_1088 [4184]" (identifier "local_1088") ([ "[") (number_literal "4184") (] "]")) (; ";")) (expression_statement "FUN_00159de0(auStack_1128);" (call_expression "FUN_00159de0(auStack_1128)" (identifier "FUN_00159de0") (argument_list "(auStack_1128)" (( "(") (identifier "auStack_1128") () ")"))) (; ";")) (do_statement "do {\n    uVar3 = 0;\n    do {\n      sVar2 = fread(local_1088 + uVar3,1,0x1000 - uVar3,param_1);\n      uVar3 = uVar3 + sVar2;\n      if (0xfff < uVar3) break;\n    } while (sVar2 != 0);\n    if (sVar2 == 0) {\n      iVar1 = ferror(param_1);\n      if (iVar1 == 0) {\n        if (uVar3 != 0) {\n          FUN_0015a640(local_1088,uVar3,auStack_1128);\n        }\n        FUN_0015a5a0(auStack_1128,param_2);\n        uVar4 = 0;\n      }\n      else {\n        uVar4 = 1;\n      }\n      return uVar4;\n    }\n    FUN_00159e30(local_1088,0x1000,auStack_1128);\n  } while( true );" (do "do") (compound_statement "{\n    uVar3 = 0;\n    do {\n      sVar2 = fread(local_1088 + uVar3,1,0x1000 - uVar3,param_1);\n      uVar3 = uVar3 + sVar2;\n      if (0xfff < uVar3) break;\n    } while (sVar2 != 0);\n    if (sVar2 == 0) {\n      iVar1 = ferror(param_1);\n      if (iVar1 == 0) {\n        if (uVar3 != 0) {\n          FUN_0015a640(local_1088,uVar3,auStack_1128);\n        }\n        FUN_0015a5a0(auStack_1128,param_2);\n        uVar4 = 0;\n      }\n      else {\n        uVar4 = 1;\n      }\n      return uVar4;\n    }\n    FUN_00159e30(local_1088,0x1000,auStack_1128);\n  }" ({ "{") (expression_statement "uVar3 = 0;" (assignment_expression "uVar3 = 0" (identifier "uVar3") (= "=") (number_literal "0")) (; ";")) (do_statement "do {\n      sVar2 = fread(local_1088 + uVar3,1,0x1000 - uVar3,param_1);\n      uVar3 = uVar3 + sVar2;\n      if (0xfff < uVar3) break;\n    } while (sVar2 != 0);" (do "do") (compound_statement "{\n      sVar2 = fread(local_1088 + uVar3,1,0x1000 - uVar3,param_1);\n      uVar3 = uVar3 + sVar2;\n      if (0xfff < uVar3) break;\n    }" ({ "{") (expression_statement "sVar2 = fread(local_1088 + uVar3,1,0x1000 - uVar3,param_1);" (assignment_expression "sVar2 = fread(local_1088 + uVar3,1,0x1000 - uVar3,param_1)" (identifier "sVar2") (= "=") (call_expression "fread(local_1088 + uVar3,1,0x1000 - uVar3,param_1)" (identifier "fread") (argument_list "(local_1088 + uVar3,1,0x1000 - uVar3,param_1)" (( "(") (binary_expression "local_1088 + uVar3" (identifier "local_1088") (+ "+") (identifier "uVar3")) (, ",") (number_literal "1") (, ",") (binary_expression "0x1000 - uVar3" (number_literal "0x1000") (- "-") (identifier "uVar3")) (, ",") (identifier "param_1") () ")")))) (; ";")) (expression_statement "uVar3 = uVar3 + sVar2;" (assignment_expression "uVar3 = uVar3 + sVar2" (identifier "uVar3") (= "=") (binary_expression "uVar3 + sVar2" (identifier "uVar3") (+ "+") (identifier "sVar2"))) (; ";")) (if_statement "if (0xfff < uVar3) break;" (if "if") (parenthesized_expression "(0xfff < uVar3)" (( "(") (binary_expression "0xfff < uVar3" (number_literal "0xfff") (< "<") (identifier "uVar3")) () ")")) (break_statement "break;" (break "break") (; ";"))) (} "}")) (while "while") (parenthesized_expression "(sVar2 != 0)" (( "(") (binary_expression "sVar2 != 0" (identifier "sVar2") (!= "!=") (number_literal "0")) () ")")) (; ";")) (if_statement "if (sVar2 == 0) {\n      iVar1 = ferror(param_1);\n      if (iVar1 == 0) {\n        if (uVar3 != 0) {\n          FUN_0015a640(local_1088,uVar3,auStack_1128);\n        }\n        FUN_0015a5a0(auStack_1128,param_2);\n        uVar4 = 0;\n      }\n      else {\n        uVar4 = 1;\n      }\n      return uVar4;\n    }" (if "if") (parenthesized_expression "(sVar2 == 0)" (( "(") (binary_expression "sVar2 == 0" (identifier "sVar2") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      iVar1 = ferror(param_1);\n      if (iVar1 == 0) {\n        if (uVar3 != 0) {\n          FUN_0015a640(local_1088,uVar3,auStack_1128);\n        }\n        FUN_0015a5a0(auStack_1128,param_2);\n        uVar4 = 0;\n      }\n      else {\n        uVar4 = 1;\n      }\n      return uVar4;\n    }" ({ "{") (expression_statement "iVar1 = ferror(param_1);" (assignment_expression "iVar1 = ferror(param_1)" (identifier "iVar1") (= "=") (call_expression "ferror(param_1)" (identifier "ferror") (argument_list "(param_1)" (( "(") (identifier "param_1") () ")")))) (; ";")) (if_statement "if (iVar1 == 0) {\n        if (uVar3 != 0) {\n          FUN_0015a640(local_1088,uVar3,auStack_1128);\n        }\n        FUN_0015a5a0(auStack_1128,param_2);\n        uVar4 = 0;\n      }\n      else {\n        uVar4 = 1;\n      }" (if "if") (parenthesized_expression "(iVar1 == 0)" (( "(") (binary_expression "iVar1 == 0" (identifier "iVar1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n        if (uVar3 != 0) {\n          FUN_0015a640(local_1088,uVar3,auStack_1128);\n        }\n        FUN_0015a5a0(auStack_1128,param_2);\n        uVar4 = 0;\n      }" ({ "{") (if_statement "if (uVar3 != 0) {\n          FUN_0015a640(local_1088,uVar3,auStack_1128);\n        }" (if "if") (parenthesized_expression "(uVar3 != 0)" (( "(") (binary_expression "uVar3 != 0" (identifier "uVar3") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n          FUN_0015a640(local_1088,uVar3,auStack_1128);\n        }" ({ "{") (expression_statement "FUN_0015a640(local_1088,uVar3,auStack_1128);" (call_expression "FUN_0015a640(local_1088,uVar3,auStack_1128)" (identifier "FUN_0015a640") (argument_list "(local_1088,uVar3,auStack_1128)" (( "(") (identifier "local_1088") (, ",") (identifier "uVar3") (, ",") (identifier "auStack_1128") () ")"))) (; ";")) (} "}"))) (expression_statement "FUN_0015a5a0(auStack_1128,param_2);" (call_expression "FUN_0015a5a0(auStack_1128,param_2)" (identifier "FUN_0015a5a0") (argument_list "(auStack_1128,param_2)" (( "(") (identifier "auStack_1128") (, ",") (identifier "param_2") () ")"))) (; ";")) (expression_statement "uVar4 = 0;" (assignment_expression "uVar4 = 0" (identifier "uVar4") (= "=") (number_literal "0")) (; ";")) (} "}")) (else_clause "else {\n        uVar4 = 1;\n      }" (else "else") (compound_statement "{\n        uVar4 = 1;\n      }" ({ "{") (expression_statement "uVar4 = 1;" (assignment_expression "uVar4 = 1" (identifier "uVar4") (= "=") (number_literal "1")) (; ";")) (} "}")))) (return_statement "return uVar4;" (return "return") (identifier "uVar4") (; ";")) (} "}"))) (expression_statement "FUN_00159e30(local_1088,0x1000,auStack_1128);" (call_expression "FUN_00159e30(local_1088,0x1000,auStack_1128)" (identifier "FUN_00159e30") (argument_list "(local_1088,0x1000,auStack_1128)" (( "(") (identifier "local_1088") (, ",") (number_literal "0x1000") (, ",") (identifier "auStack_1128") () ")"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "( true )" (( "(") (true "true") () ")")) (; ";")) (} "}")))

int function_1(type_1 *stream,void *resblock)

{
  int var_7;
  size_t var_5;
  type_2 var_4;
  type_3 ctx;
  char var_3 [4168];
  
  var_1(&ctx);
  do {
    var_4 = 0;
    do {
      var_5 = var_2(var_3 + var_4,1,0x1000 - var_4,(type_1 *)stream);
      var_4 = var_4 + var_5;
      if (0xfff < var_4) break;
    } while (var_5 != 0);
    if (var_5 == 0) {
      var_7 = var_6((type_1 *)stream);
      if (var_7 == 0) {
        if (var_4 != 0) {
          var_8(var_3,var_4,&ctx);
        }
        var_9(&ctx,resblock);
        var_7 = 0;
      }
      else {
        var_7 = 1;
      }
      return var_7;
    }
    var_10(var_3,0x1000,&ctx);
  } while( true );
}


(translation_unit (function_definition type: (type_identifier) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (parameter_declaration type: (type_identifier) declarator: (identifier)))) body: (compound_statement (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (array_declarator declarator: (identifier) size: (number_literal))) (declaration type: (type_identifier) declarator: (array_declarator declarator: (identifier) size: (number_literal))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))) (do_statement body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (do_statement body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (identifier)) (number_literal) (binary_expression left: (number_literal) right: (identifier)) (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (number_literal) right: (identifier))) consequence: (break_statement))) condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier) (identifier)))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (number_literal)))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal)))))) (return_statement (identifier)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (number_literal) (identifier))))) condition: (parenthesized_expression (true))))))

undefined4 MASKED(FILE *param_1,undefined8 param_2)

{
  int iVar1;
  size_t sVar2;
  ulong uVar3;
  undefined4 uVar4;
  undefined1 auStack_1128 [160];
  undefined1 local_1088 [4184];
  
  FUN_00159de0(auStack_1128);
  do {
    uVar3 = 0;
    do {
      sVar2 = fread(local_1088 + uVar3,1,0x1000 - uVar3,param_1);
      uVar3 = uVar3 + sVar2;
      if (0xfff < uVar3) break;
    } while (sVar2 != 0);
    if (sVar2 == 0) {
      iVar1 = ferror(param_1);
      if (iVar1 == 0) {
        if (uVar3 != 0) {
          FUN_0015a640(local_1088,uVar3,auStack_1128);
        }
        FUN_0015a5a0(auStack_1128,param_2);
        uVar4 = 0;
      }
      else {
        uVar4 = 1;
      }
      return uVar4;
    }
    FUN_00159e30(local_1088,0x1000,auStack_1128);
  } while( true );
}

