
void read_random_seed(noise_consumer_t consumer)

{
  long lVar1;
  int __fd;
  char *__file;
  ssize_t sVar2;
  long in_FS_OFFSET;
  char buf [512];
  
  lVar1 = *(long *)(in_FS_OFFSET + 0x28);
  __file = make_filename(3,(char *)0x0);
  __fd = open64(__file,0);
  safefree(__file);
  if (-1 < __fd) {
    while( true ) {
      sVar2 = read(__fd,buf,0x200);
      if ((int)sVar2 < 1) break;
      (*consumer)(buf,(int)sVar2);
    }
    close(__fd);
  }
  if (lVar1 == *(long *)(in_FS_OFFSET + 0x28)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail();
}



void FUN_00155a62(code *param_1)

{
  int __fd;
  char *__file;
  ulong uVar1;
  long in_FS_OFFSET;
  undefined1 auStack_228 [520];
  long local_20;
  
  local_20 = *(long *)(in_FS_OFFSET + 0x28);
  __file = (char *)FUN_001546fa(3,0);
  __fd = open64(__file,0);
  FUN_00122b5a(__file);
  if (-1 < __fd) {
    while( true ) {
      uVar1 = read(__fd,auStack_228,0x200);
      if ((int)uVar1 < 1) break;
      (*param_1)(auStack_228,uVar1 & 0xffffffff);
    }
    close(__fd);
  }
  if (local_20 == *(long *)(in_FS_OFFSET + 0x28)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail();
}


PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x210
MOV R12,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x208],RAX
XOR EAX,EAX
MOV ESI,0x0
MOV EDI,0x3
CALL 0x001546fa
MOV RBX,RAX
MOV ESI,0x0
MOV RDI,RAX
MOV EAX,0x0
CALL 0x00111be0
MOV EBP,EAX
MOV RDI,RBX
CALL 0x00122b5a
MOV RBX,RSP
TEST EBP,EBP
JS 0x00155adc
MOV EDX,0x200
MOV RSI,RBX
MOV EDI,EBP
CALL 0x00111740
TEST EAX,EAX
JLE 0x00155ad5
MOV ESI,EAX
MOV RDI,RBX
CALL R12
JMP 0x00155ab8
MOV EDI,EBP
CALL 0x00111f80
MOV RAX,qword ptr [RSP + 0x208]
XOR RAX,qword ptr FS:[0x28]
JNZ 0x00155afb
ADD RSP,0x210
POP RBX
POP RBP
POP R12
RET
CALL 0x001111e0
(translation_unit "void FUN_00155a62(code *param_1)\n\n{\n  int __fd;\n  char *__file;\n  ulong uVar1;\n  long in_FS_OFFSET;\n  undefined1 auStack_228 [520];\n  long local_20;\n  \n  local_20 = *(long *)(in_FS_OFFSET + 0x28);\n  __file = (char *)FUN_001546fa(3,0);\n  __fd = open64(__file,0);\n  FUN_00122b5a(__file);\n  if (-1 < __fd) {\n    while( true ) {\n      uVar1 = read(__fd,auStack_228,0x200);\n      if ((int)uVar1 < 1) break;\n      (*param_1)(auStack_228,uVar1 & 0xffffffff);\n    }\n    close(__fd);\n  }\n  if (local_20 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail();\n}\n\n" (function_definition "void FUN_00155a62(code *param_1)\n\n{\n  int __fd;\n  char *__file;\n  ulong uVar1;\n  long in_FS_OFFSET;\n  undefined1 auStack_228 [520];\n  long local_20;\n  \n  local_20 = *(long *)(in_FS_OFFSET + 0x28);\n  __file = (char *)FUN_001546fa(3,0);\n  __fd = open64(__file,0);\n  FUN_00122b5a(__file);\n  if (-1 < __fd) {\n    while( true ) {\n      uVar1 = read(__fd,auStack_228,0x200);\n      if ((int)uVar1 < 1) break;\n      (*param_1)(auStack_228,uVar1 & 0xffffffff);\n    }\n    close(__fd);\n  }\n  if (local_20 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail();\n}" primitive_type (function_declarator "FUN_00155a62(code *param_1)" identifier (parameter_list "(code *param_1)" ( (parameter_declaration "code *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  int __fd;\n  char *__file;\n  ulong uVar1;\n  long in_FS_OFFSET;\n  undefined1 auStack_228 [520];\n  long local_20;\n  \n  local_20 = *(long *)(in_FS_OFFSET + 0x28);\n  __file = (char *)FUN_001546fa(3,0);\n  __fd = open64(__file,0);\n  FUN_00122b5a(__file);\n  if (-1 < __fd) {\n    while( true ) {\n      uVar1 = read(__fd,auStack_228,0x200);\n      if ((int)uVar1 < 1) break;\n      (*param_1)(auStack_228,uVar1 & 0xffffffff);\n    }\n    close(__fd);\n  }\n  if (local_20 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail();\n}" { (declaration "int __fd;" primitive_type identifier ;) (declaration "char *__file;" primitive_type (pointer_declarator "*__file" * identifier) ;) (declaration "ulong uVar1;" type_identifier identifier ;) (declaration "long in_FS_OFFSET;" (sized_type_specifier "long" long) identifier ;) (declaration "undefined1 auStack_228 [520];" type_identifier (array_declarator "auStack_228 [520]" identifier [ number_literal ]) ;) (declaration "long local_20;" (sized_type_specifier "long" long) identifier ;) (expression_statement "local_20 = *(long *)(in_FS_OFFSET + 0x28);" (assignment_expression "local_20 = *(long *)(in_FS_OFFSET + 0x28)" identifier = (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" * (cast_expression "(long *)(in_FS_OFFSET + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_FS_OFFSET + 0x28)" ( (binary_expression "in_FS_OFFSET + 0x28" identifier + number_literal) ))))) ;) (expression_statement "__file = (char *)FUN_001546fa(3,0);" (assignment_expression "__file = (char *)FUN_001546fa(3,0)" identifier = (cast_expression "(char *)FUN_001546fa(3,0)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_001546fa(3,0)" identifier (argument_list "(3,0)" ( number_literal , number_literal ))))) ;) (expression_statement "__fd = open64(__file,0);" (assignment_expression "__fd = open64(__file,0)" identifier = (call_expression "open64(__file,0)" identifier (argument_list "(__file,0)" ( identifier , number_literal )))) ;) (expression_statement "FUN_00122b5a(__file);" (call_expression "FUN_00122b5a(__file)" identifier (argument_list "(__file)" ( identifier ))) ;) (if_statement "if (-1 < __fd) {\n    while( true ) {\n      uVar1 = read(__fd,auStack_228,0x200);\n      if ((int)uVar1 < 1) break;\n      (*param_1)(auStack_228,uVar1 & 0xffffffff);\n    }\n    close(__fd);\n  }" if (parenthesized_expression "(-1 < __fd)" ( (binary_expression "-1 < __fd" number_literal < identifier) )) (compound_statement "{\n    while( true ) {\n      uVar1 = read(__fd,auStack_228,0x200);\n      if ((int)uVar1 < 1) break;\n      (*param_1)(auStack_228,uVar1 & 0xffffffff);\n    }\n    close(__fd);\n  }" { (while_statement "while( true ) {\n      uVar1 = read(__fd,auStack_228,0x200);\n      if ((int)uVar1 < 1) break;\n      (*param_1)(auStack_228,uVar1 & 0xffffffff);\n    }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n      uVar1 = read(__fd,auStack_228,0x200);\n      if ((int)uVar1 < 1) break;\n      (*param_1)(auStack_228,uVar1 & 0xffffffff);\n    }" { (expression_statement "uVar1 = read(__fd,auStack_228,0x200);" (assignment_expression "uVar1 = read(__fd,auStack_228,0x200)" identifier = (call_expression "read(__fd,auStack_228,0x200)" identifier (argument_list "(__fd,auStack_228,0x200)" ( identifier , identifier , number_literal )))) ;) (if_statement "if ((int)uVar1 < 1) break;" if (parenthesized_expression "((int)uVar1 < 1)" ( (binary_expression "(int)uVar1 < 1" (cast_expression "(int)uVar1" ( (type_descriptor "int" primitive_type) ) identifier) < number_literal) )) (break_statement "break;" break ;)) (expression_statement "(*param_1)(auStack_228,uVar1 & 0xffffffff);" (call_expression "(*param_1)(auStack_228,uVar1 & 0xffffffff)" (parenthesized_expression "(*param_1)" ( (pointer_expression "*param_1" * identifier) )) (argument_list "(auStack_228,uVar1 & 0xffffffff)" ( identifier , (binary_expression "uVar1 & 0xffffffff" identifier & number_literal) ))) ;) })) (expression_statement "close(__fd);" (call_expression "close(__fd)" identifier (argument_list "(__fd)" ( identifier ))) ;) })) (if_statement "if (local_20 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return;\n  }" if (parenthesized_expression "(local_20 == *(long *)(in_FS_OFFSET + 0x28))" ( (binary_expression "local_20 == *(long *)(in_FS_OFFSET + 0x28)" identifier == (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" * (cast_expression "(long *)(in_FS_OFFSET + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_FS_OFFSET + 0x28)" ( (binary_expression "in_FS_OFFSET + 0x28" identifier + number_literal) ))))) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) comment (expression_statement "__stack_chk_fail();" (call_expression "__stack_chk_fail()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "void read_random_seed(noise_consumer_t consumer)\n\n{\n  long lVar1;\n  int __fd;\n  char *__file;\n  ssize_t sVar2;\n  long in_FS_OFFSET;\n  char buf [512];\n  \n  lVar1 = *(long *)(in_FS_OFFSET + 0x28);\n  __file = make_filename(3,(char *)0x0);\n  __fd = open64(__file,0);\n  safefree(__file);\n  if (-1 < __fd) {\n    while( true ) {\n      sVar2 = read(__fd,buf,0x200);\n      if ((int)sVar2 < 1) break;\n      (*consumer)(buf,(int)sVar2);\n    }\n    close(__fd);\n  }\n  if (lVar1 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail();\n}\n\n" (function_definition "void read_random_seed(noise_consumer_t consumer)\n\n{\n  long lVar1;\n  int __fd;\n  char *__file;\n  ssize_t sVar2;\n  long in_FS_OFFSET;\n  char buf [512];\n  \n  lVar1 = *(long *)(in_FS_OFFSET + 0x28);\n  __file = make_filename(3,(char *)0x0);\n  __fd = open64(__file,0);\n  safefree(__file);\n  if (-1 < __fd) {\n    while( true ) {\n      sVar2 = read(__fd,buf,0x200);\n      if ((int)sVar2 < 1) break;\n      (*consumer)(buf,(int)sVar2);\n    }\n    close(__fd);\n  }\n  if (lVar1 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail();\n}" primitive_type (function_declarator "read_random_seed(noise_consumer_t consumer)" identifier (parameter_list "(noise_consumer_t consumer)" ( (parameter_declaration "noise_consumer_t consumer" type_identifier identifier) ))) (compound_statement "{\n  long lVar1;\n  int __fd;\n  char *__file;\n  ssize_t sVar2;\n  long in_FS_OFFSET;\n  char buf [512];\n  \n  lVar1 = *(long *)(in_FS_OFFSET + 0x28);\n  __file = make_filename(3,(char *)0x0);\n  __fd = open64(__file,0);\n  safefree(__file);\n  if (-1 < __fd) {\n    while( true ) {\n      sVar2 = read(__fd,buf,0x200);\n      if ((int)sVar2 < 1) break;\n      (*consumer)(buf,(int)sVar2);\n    }\n    close(__fd);\n  }\n  if (lVar1 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail();\n}" { (declaration "long lVar1;" (sized_type_specifier "long" long) identifier ;) (declaration "int __fd;" primitive_type identifier ;) (declaration "char *__file;" primitive_type (pointer_declarator "*__file" * identifier) ;) (declaration "ssize_t sVar2;" primitive_type identifier ;) (declaration "long in_FS_OFFSET;" (sized_type_specifier "long" long) identifier ;) (declaration "char buf [512];" primitive_type (array_declarator "buf [512]" identifier [ number_literal ]) ;) (expression_statement "lVar1 = *(long *)(in_FS_OFFSET + 0x28);" (assignment_expression "lVar1 = *(long *)(in_FS_OFFSET + 0x28)" identifier = (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" * (cast_expression "(long *)(in_FS_OFFSET + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_FS_OFFSET + 0x28)" ( (binary_expression "in_FS_OFFSET + 0x28" identifier + number_literal) ))))) ;) (expression_statement "__file = make_filename(3,(char *)0x0);" (assignment_expression "__file = make_filename(3,(char *)0x0)" identifier = (call_expression "make_filename(3,(char *)0x0)" identifier (argument_list "(3,(char *)0x0)" ( number_literal , (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal) )))) ;) (expression_statement "__fd = open64(__file,0);" (assignment_expression "__fd = open64(__file,0)" identifier = (call_expression "open64(__file,0)" identifier (argument_list "(__file,0)" ( identifier , number_literal )))) ;) (expression_statement "safefree(__file);" (call_expression "safefree(__file)" identifier (argument_list "(__file)" ( identifier ))) ;) (if_statement "if (-1 < __fd) {\n    while( true ) {\n      sVar2 = read(__fd,buf,0x200);\n      if ((int)sVar2 < 1) break;\n      (*consumer)(buf,(int)sVar2);\n    }\n    close(__fd);\n  }" if (parenthesized_expression "(-1 < __fd)" ( (binary_expression "-1 < __fd" number_literal < identifier) )) (compound_statement "{\n    while( true ) {\n      sVar2 = read(__fd,buf,0x200);\n      if ((int)sVar2 < 1) break;\n      (*consumer)(buf,(int)sVar2);\n    }\n    close(__fd);\n  }" { (while_statement "while( true ) {\n      sVar2 = read(__fd,buf,0x200);\n      if ((int)sVar2 < 1) break;\n      (*consumer)(buf,(int)sVar2);\n    }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n      sVar2 = read(__fd,buf,0x200);\n      if ((int)sVar2 < 1) break;\n      (*consumer)(buf,(int)sVar2);\n    }" { (expression_statement "sVar2 = read(__fd,buf,0x200);" (assignment_expression "sVar2 = read(__fd,buf,0x200)" identifier = (call_expression "read(__fd,buf,0x200)" identifier (argument_list "(__fd,buf,0x200)" ( identifier , identifier , number_literal )))) ;) (if_statement "if ((int)sVar2 < 1) break;" if (parenthesized_expression "((int)sVar2 < 1)" ( (binary_expression "(int)sVar2 < 1" (cast_expression "(int)sVar2" ( (type_descriptor "int" primitive_type) ) identifier) < number_literal) )) (break_statement "break;" break ;)) (expression_statement "(*consumer)(buf,(int)sVar2);" (call_expression "(*consumer)(buf,(int)sVar2)" (parenthesized_expression "(*consumer)" ( (pointer_expression "*consumer" * identifier) )) (argument_list "(buf,(int)sVar2)" ( identifier , (cast_expression "(int)sVar2" ( (type_descriptor "int" primitive_type) ) identifier) ))) ;) })) (expression_statement "close(__fd);" (call_expression "close(__fd)" identifier (argument_list "(__fd)" ( identifier ))) ;) })) (if_statement "if (lVar1 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return;\n  }" if (parenthesized_expression "(lVar1 == *(long *)(in_FS_OFFSET + 0x28))" ( (binary_expression "lVar1 == *(long *)(in_FS_OFFSET + 0x28)" identifier == (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" * (cast_expression "(long *)(in_FS_OFFSET + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_FS_OFFSET + 0x28)" ( (binary_expression "in_FS_OFFSET + 0x28" identifier + number_literal) ))))) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) comment (expression_statement "__stack_chk_fail();" (call_expression "__stack_chk_fail()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "void FUN_00155a62(code *param_1)\n\n{\n  int __fd;\n  char *__file;\n  ulong uVar1;\n  long in_FS_OFFSET;\n  undefined1 auStack_228 [520];\n  long local_20;\n  \n  local_20 = *(long *)(in_FS_OFFSET + 0x28);\n  __file = (char *)FUN_001546fa(3,0);\n  __fd = open64(__file,0);\n  FUN_00122b5a(__file);\n  if (-1 < __fd) {\n    while( true ) {\n      uVar1 = read(__fd,auStack_228,0x200);\n      if ((int)uVar1 < 1) break;\n      (*param_1)(auStack_228,uVar1 & 0xffffffff);\n    }\n    close(__fd);\n  }\n  if (local_20 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return;\n  }\n                    \n  __stack_chk_fail();\n}\n\n" (function_definition "void FUN_00155a62(code *param_1)\n\n{\n  int __fd;\n  char *__file;\n  ulong uVar1;\n  long in_FS_OFFSET;\n  undefined1 auStack_228 [520];\n  long local_20;\n  \n  local_20 = *(long *)(in_FS_OFFSET + 0x28);\n  __file = (char *)FUN_001546fa(3,0);\n  __fd = open64(__file,0);\n  FUN_00122b5a(__file);\n  if (-1 < __fd) {\n    while( true ) {\n      uVar1 = read(__fd,auStack_228,0x200);\n      if ((int)uVar1 < 1) break;\n      (*param_1)(auStack_228,uVar1 & 0xffffffff);\n    }\n    close(__fd);\n  }\n  if (local_20 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return;\n  }\n                    \n  __stack_chk_fail();\n}" primitive_type (function_declarator "FUN_00155a62(code *param_1)" identifier (parameter_list "(code *param_1)" ( (parameter_declaration "code *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  int __fd;\n  char *__file;\n  ulong uVar1;\n  long in_FS_OFFSET;\n  undefined1 auStack_228 [520];\n  long local_20;\n  \n  local_20 = *(long *)(in_FS_OFFSET + 0x28);\n  __file = (char *)FUN_001546fa(3,0);\n  __fd = open64(__file,0);\n  FUN_00122b5a(__file);\n  if (-1 < __fd) {\n    while( true ) {\n      uVar1 = read(__fd,auStack_228,0x200);\n      if ((int)uVar1 < 1) break;\n      (*param_1)(auStack_228,uVar1 & 0xffffffff);\n    }\n    close(__fd);\n  }\n  if (local_20 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return;\n  }\n                    \n  __stack_chk_fail();\n}" { (declaration "int __fd;" primitive_type identifier ;) (declaration "char *__file;" primitive_type (pointer_declarator "*__file" * identifier) ;) (declaration "ulong uVar1;" type_identifier identifier ;) (declaration "long in_FS_OFFSET;" (sized_type_specifier "long" long) identifier ;) (declaration "undefined1 auStack_228 [520];" type_identifier (array_declarator "auStack_228 [520]" identifier [ number_literal ]) ;) (declaration "long local_20;" (sized_type_specifier "long" long) identifier ;) (expression_statement "local_20 = *(long *)(in_FS_OFFSET + 0x28);" (assignment_expression "local_20 = *(long *)(in_FS_OFFSET + 0x28)" identifier = (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" * (cast_expression "(long *)(in_FS_OFFSET + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_FS_OFFSET + 0x28)" ( (binary_expression "in_FS_OFFSET + 0x28" identifier + number_literal) ))))) ;) (expression_statement "__file = (char *)FUN_001546fa(3,0);" (assignment_expression "__file = (char *)FUN_001546fa(3,0)" identifier = (cast_expression "(char *)FUN_001546fa(3,0)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_001546fa(3,0)" identifier (argument_list "(3,0)" ( number_literal , number_literal ))))) ;) (expression_statement "__fd = open64(__file,0);" (assignment_expression "__fd = open64(__file,0)" identifier = (call_expression "open64(__file,0)" identifier (argument_list "(__file,0)" ( identifier , number_literal )))) ;) (expression_statement "FUN_00122b5a(__file);" (call_expression "FUN_00122b5a(__file)" identifier (argument_list "(__file)" ( identifier ))) ;) (if_statement "if (-1 < __fd) {\n    while( true ) {\n      uVar1 = read(__fd,auStack_228,0x200);\n      if ((int)uVar1 < 1) break;\n      (*param_1)(auStack_228,uVar1 & 0xffffffff);\n    }\n    close(__fd);\n  }" if (parenthesized_expression "(-1 < __fd)" ( (binary_expression "-1 < __fd" number_literal < identifier) )) (compound_statement "{\n    while( true ) {\n      uVar1 = read(__fd,auStack_228,0x200);\n      if ((int)uVar1 < 1) break;\n      (*param_1)(auStack_228,uVar1 & 0xffffffff);\n    }\n    close(__fd);\n  }" { (while_statement "while( true ) {\n      uVar1 = read(__fd,auStack_228,0x200);\n      if ((int)uVar1 < 1) break;\n      (*param_1)(auStack_228,uVar1 & 0xffffffff);\n    }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n      uVar1 = read(__fd,auStack_228,0x200);\n      if ((int)uVar1 < 1) break;\n      (*param_1)(auStack_228,uVar1 & 0xffffffff);\n    }" { (expression_statement "uVar1 = read(__fd,auStack_228,0x200);" (assignment_expression "uVar1 = read(__fd,auStack_228,0x200)" identifier = (call_expression "read(__fd,auStack_228,0x200)" identifier (argument_list "(__fd,auStack_228,0x200)" ( identifier , identifier , number_literal )))) ;) (if_statement "if ((int)uVar1 < 1) break;" if (parenthesized_expression "((int)uVar1 < 1)" ( (binary_expression "(int)uVar1 < 1" (cast_expression "(int)uVar1" ( (type_descriptor "int" primitive_type) ) identifier) < number_literal) )) (break_statement "break;" break ;)) (expression_statement "(*param_1)(auStack_228,uVar1 & 0xffffffff);" (call_expression "(*param_1)(auStack_228,uVar1 & 0xffffffff)" (parenthesized_expression "(*param_1)" ( (pointer_expression "*param_1" * identifier) )) (argument_list "(auStack_228,uVar1 & 0xffffffff)" ( identifier , (binary_expression "uVar1 & 0xffffffff" identifier & number_literal) ))) ;) })) (expression_statement "close(__fd);" (call_expression "close(__fd)" identifier (argument_list "(__fd)" ( identifier ))) ;) })) (if_statement "if (local_20 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return;\n  }" if (parenthesized_expression "(local_20 == *(long *)(in_FS_OFFSET + 0x28))" ( (binary_expression "local_20 == *(long *)(in_FS_OFFSET + 0x28)" identifier == (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" * (cast_expression "(long *)(in_FS_OFFSET + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_FS_OFFSET + 0x28)" ( (binary_expression "in_FS_OFFSET + 0x28" identifier + number_literal) ))))) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) (expression_statement "__stack_chk_fail();" (call_expression "__stack_chk_fail()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration (sized_type_specifier long) IDENT ;) (declaration TYPE (array_declarator IDENT [ LIT ]) ;) (declaration (sized_type_specifier long) IDENT ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( LIT , LIT ))))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , LIT )))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (compound_statement { (while_statement while (parenthesized_expression ( BOOL )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , LIT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) < LIT) )) (break_statement break ;)) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * IDENT) )) (argument_list ( IDENT , (binary_expression IDENT & LIT) ))) ;) })) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (return_statement return ;) })) (expression_statement (call_expression IDENT (argument_list ( ))) ;) })))
(function_definition "void FUN_00155a62(code *param_1)\n\n{\n  int __fd;\n  char *__file;\n  ulong uVar1;\n  long in_FS_OFFSET;\n  undefined1 auStack_228 [520];\n  long local_20;\n  \n  local_20 = *(long *)(in_FS_OFFSET + 0x28);\n  __file = (char *)FUN_001546fa(3,0);\n  __fd = open64(__file,0);\n  FUN_00122b5a(__file);\n  if (-1 < __fd) {\n    while( true ) {\n      uVar1 = read(__fd,auStack_228,0x200);\n      if ((int)uVar1 < 1) break;\n      (*param_1)(auStack_228,uVar1 & 0xffffffff);\n    }\n    close(__fd);\n  }\n  if (local_20 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return;\n  }\n                    \n  __stack_chk_fail();\n}" (primitive_type "void") (function_declarator "FUN_00155a62(code *param_1)" (identifier "FUN_00155a62") (parameter_list "(code *param_1)" (( "(") (parameter_declaration "code *param_1" (type_identifier "code") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) () ")"))) (compound_statement "{\n  int __fd;\n  char *__file;\n  ulong uVar1;\n  long in_FS_OFFSET;\n  undefined1 auStack_228 [520];\n  long local_20;\n  \n  local_20 = *(long *)(in_FS_OFFSET + 0x28);\n  __file = (char *)FUN_001546fa(3,0);\n  __fd = open64(__file,0);\n  FUN_00122b5a(__file);\n  if (-1 < __fd) {\n    while( true ) {\n      uVar1 = read(__fd,auStack_228,0x200);\n      if ((int)uVar1 < 1) break;\n      (*param_1)(auStack_228,uVar1 & 0xffffffff);\n    }\n    close(__fd);\n  }\n  if (local_20 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return;\n  }\n                    \n  __stack_chk_fail();\n}" ({ "{") (declaration "int __fd;" (primitive_type "int") (identifier "__fd") (; ";")) (declaration "char *__file;" (primitive_type "char") (pointer_declarator "*__file" (* "*") (identifier "__file")) (; ";")) (declaration "ulong uVar1;" (type_identifier "ulong") (identifier "uVar1") (; ";")) (declaration "long in_FS_OFFSET;" (sized_type_specifier "long" (long "long")) (identifier "in_FS_OFFSET") (; ";")) (declaration "undefined1 auStack_228 [520];" (type_identifier "undefined1") (array_declarator "auStack_228 [520]" (identifier "auStack_228") ([ "[") (number_literal "520") (] "]")) (; ";")) (declaration "long local_20;" (sized_type_specifier "long" (long "long")) (identifier "local_20") (; ";")) (expression_statement "local_20 = *(long *)(in_FS_OFFSET + 0x28);" (assignment_expression "local_20 = *(long *)(in_FS_OFFSET + 0x28)" (identifier "local_20") (= "=") (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" (* "*") (cast_expression "(long *)(in_FS_OFFSET + 0x28)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_FS_OFFSET + 0x28)" (( "(") (binary_expression "in_FS_OFFSET + 0x28" (identifier "in_FS_OFFSET") (+ "+") (number_literal "0x28")) () ")"))))) (; ";")) (expression_statement "__file = (char *)FUN_001546fa(3,0);" (assignment_expression "__file = (char *)FUN_001546fa(3,0)" (identifier "__file") (= "=") (cast_expression "(char *)FUN_001546fa(3,0)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_001546fa(3,0)" (identifier "FUN_001546fa") (argument_list "(3,0)" (( "(") (number_literal "3") (, ",") (number_literal "0") () ")"))))) (; ";")) (expression_statement "__fd = open64(__file,0);" (assignment_expression "__fd = open64(__file,0)" (identifier "__fd") (= "=") (call_expression "open64(__file,0)" (identifier "open64") (argument_list "(__file,0)" (( "(") (identifier "__file") (, ",") (number_literal "0") () ")")))) (; ";")) (expression_statement "FUN_00122b5a(__file);" (call_expression "FUN_00122b5a(__file)" (identifier "FUN_00122b5a") (argument_list "(__file)" (( "(") (identifier "__file") () ")"))) (; ";")) (if_statement "if (-1 < __fd) {\n    while( true ) {\n      uVar1 = read(__fd,auStack_228,0x200);\n      if ((int)uVar1 < 1) break;\n      (*param_1)(auStack_228,uVar1 & 0xffffffff);\n    }\n    close(__fd);\n  }" (if "if") (parenthesized_expression "(-1 < __fd)" (( "(") (binary_expression "-1 < __fd" (number_literal "-1") (< "<") (identifier "__fd")) () ")")) (compound_statement "{\n    while( true ) {\n      uVar1 = read(__fd,auStack_228,0x200);\n      if ((int)uVar1 < 1) break;\n      (*param_1)(auStack_228,uVar1 & 0xffffffff);\n    }\n    close(__fd);\n  }" ({ "{") (while_statement "while( true ) {\n      uVar1 = read(__fd,auStack_228,0x200);\n      if ((int)uVar1 < 1) break;\n      (*param_1)(auStack_228,uVar1 & 0xffffffff);\n    }" (while "while") (parenthesized_expression "( true )" (( "(") (true "true") () ")")) (compound_statement "{\n      uVar1 = read(__fd,auStack_228,0x200);\n      if ((int)uVar1 < 1) break;\n      (*param_1)(auStack_228,uVar1 & 0xffffffff);\n    }" ({ "{") (expression_statement "uVar1 = read(__fd,auStack_228,0x200);" (assignment_expression "uVar1 = read(__fd,auStack_228,0x200)" (identifier "uVar1") (= "=") (call_expression "read(__fd,auStack_228,0x200)" (identifier "read") (argument_list "(__fd,auStack_228,0x200)" (( "(") (identifier "__fd") (, ",") (identifier "auStack_228") (, ",") (number_literal "0x200") () ")")))) (; ";")) (if_statement "if ((int)uVar1 < 1) break;" (if "if") (parenthesized_expression "((int)uVar1 < 1)" (( "(") (binary_expression "(int)uVar1 < 1" (cast_expression "(int)uVar1" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "uVar1")) (< "<") (number_literal "1")) () ")")) (break_statement "break;" (break "break") (; ";"))) (expression_statement "(*param_1)(auStack_228,uVar1 & 0xffffffff);" (call_expression "(*param_1)(auStack_228,uVar1 & 0xffffffff)" (parenthesized_expression "(*param_1)" (( "(") (pointer_expression "*param_1" (* "*") (identifier "param_1")) () ")")) (argument_list "(auStack_228,uVar1 & 0xffffffff)" (( "(") (identifier "auStack_228") (, ",") (binary_expression "uVar1 & 0xffffffff" (identifier "uVar1") (& "&") (number_literal "0xffffffff")) () ")"))) (; ";")) (} "}"))) (expression_statement "close(__fd);" (call_expression "close(__fd)" (identifier "close") (argument_list "(__fd)" (( "(") (identifier "__fd") () ")"))) (; ";")) (} "}"))) (if_statement "if (local_20 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return;\n  }" (if "if") (parenthesized_expression "(local_20 == *(long *)(in_FS_OFFSET + 0x28))" (( "(") (binary_expression "local_20 == *(long *)(in_FS_OFFSET + 0x28)" (identifier "local_20") (== "==") (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" (* "*") (cast_expression "(long *)(in_FS_OFFSET + 0x28)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_FS_OFFSET + 0x28)" (( "(") (binary_expression "in_FS_OFFSET + 0x28" (identifier "in_FS_OFFSET") (+ "+") (number_literal "0x28")) () ")"))))) () ")")) (compound_statement "{\n    return;\n  }" ({ "{") (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "__stack_chk_fail();" (call_expression "__stack_chk_fail()" (identifier "__stack_chk_fail") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")))

void function_1(type_1 consumer)

{
  long var_8;
  int var_5;
  char *__file;
  ssize_t sVar2;
  long var_1;
  char buf [512];
  
  var_8 = *(long *)(var_1 + 0x28);
  __file = var_2(3,(char *)0x0);
  var_5 = var_3(__file,0);
  var_4(__file);
  if (-1 < var_5) {
    while( true ) {
      sVar2 = var_6(var_5,buf,0x200);
      if ((int)sVar2 < 1) break;
      (*consumer)(buf,(int)sVar2);
    }
    var_7(var_5);
  }
  if (var_8 == *(long *)(var_1 + 0x28)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  var_9();
}


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

void MASKED(code *param_1)

{
  int __fd;
  char *__file;
  ulong uVar1;
  long in_FS_OFFSET;
  undefined1 auStack_228 [520];
  long local_20;
  
  local_20 = *(long *)(in_FS_OFFSET + 0x28);
  __file = (char *)FUN_001546fa(3,0);
  __fd = open64(__file,0);
  FUN_00122b5a(__file);
  if (-1 < __fd) {
    while( true ) {
      uVar1 = read(__fd,auStack_228,0x200);
      if ((int)uVar1 < 1) break;
      (*param_1)(auStack_228,uVar1 & 0xffffffff);
    }
    close(__fd);
  }
  if (local_20 == *(long *)(in_FS_OFFSET + 0x28)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail();
}

