
int simple_copy(char *from,char *to)

{
  int iVar1;
  int __fd;
  int iVar2;
  int iVar3;
  int *piVar4;
  size_t sVar5;
  ssize_t sVar6;
  char buf [8192];
  
  __fd = open(from,0);
  if (-1 < __fd) {
    iVar2 = open(to,0x241,0x1ff);
    piVar4 = __errno_location();
    if (iVar2 < 0) {
      iVar2 = *piVar4;
      close(__fd);
      *piVar4 = iVar2;
    }
    else {
      do {
        sVar6 = read(__fd,buf,0x2000);
        iVar3 = (int)sVar6;
        if (iVar3 < 1) {
          iVar1 = *piVar4;
          close(__fd);
          close(iVar2);
          if (iVar3 != 0) {
            *piVar4 = iVar1;
            return -1;
          }
          return 0;
        }
        sVar5 = write(iVar2,buf,(long)iVar3);
      } while (sVar5 == (long)iVar3);
      iVar3 = *piVar4;
      close(__fd);
      close(iVar2);
      *piVar4 = iVar3;
    }
  }
  return -1;
}



ulong FUN_0010c3b0(char *param_1,char *param_2)

{
  int iVar1;
  int __fd;
  int iVar2;
  int iVar3;
  int *piVar4;
  size_t sVar5;
  ulong uVar6;
  undefined1 auStack_2028 [8192];
  
  __fd = open(param_1,0);
  if (-1 < __fd) {
    iVar2 = open(param_2,0x241,0x1ff);
    piVar4 = __errno_location();
    if (iVar2 < 0) {
      iVar2 = *piVar4;
      close(__fd);
      *piVar4 = iVar2;
    }
    else {
      do {
        uVar6 = read(__fd,auStack_2028,0x2000);
        iVar3 = (int)uVar6;
        if (iVar3 < 1) {
          iVar1 = *piVar4;
          close(__fd);
          close(iVar2);
          if (iVar3 != 0) {
            *piVar4 = iVar1;
            return 0xffffffff;
          }
          return uVar6 & 0xffffffff;
        }
        sVar5 = write(iVar2,auStack_2028,(long)iVar3);
      } while (sVar5 == (long)iVar3);
      iVar3 = *piVar4;
      close(__fd);
      close(iVar2);
      *piVar4 = iVar3;
    }
  }
  return 0xffffffff;
}


PUSH R14
XOR EAX,EAX
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
MOV RBX,RSI
XOR ESI,ESI
SUB RSP,0x2000
CALL 0x00104740
TEST EAX,EAX
JS 0x0010c47d
MOV EDX,0x1ff
MOV ESI,0x241
MOV RDI,RBX
MOV R12D,EAX
XOR EAX,EAX
CALL 0x00104740
MOV R13D,EAX
CALL 0x001040a0
MOV R14,RAX
TEST R13D,R13D
JS 0x0010c484
MOV RBP,RSP
JMP 0x0010c41e
MOVSXD RBX,EAX
MOV RSI,RBP
MOV EDI,R13D
MOV RDX,RBX
CALL 0x001041a0
CMP RAX,RBX
JNZ 0x0010c460
MOV EDX,0x2000
MOV RSI,RBP
MOV EDI,R12D
CALL 0x001043f0
MOV EBX,EAX
TEST EAX,EAX
JG 0x0010c408
MOV EDI,R12D
MOV EBP,dword ptr [R14]
CALL 0x001043a0
MOV EDI,R13D
CALL 0x001043a0
TEST EBX,EBX
JNZ 0x0010c498
ADD RSP,0x2000
MOV EAX,EBX
POP RBX
POP RBP
POP R12
POP R13
POP R14
RET
MOV EBX,dword ptr [R14]
MOV EDI,R12D
CALL 0x001043a0
MOV EDI,R13D
CALL 0x001043a0
MOV dword ptr [R14],EBX
MOV EBX,0xffffffff
JMP 0x0010c44b
MOV EBX,0xffffffff
JMP 0x0010c44b
MOV EBX,dword ptr [RAX]
MOV EDI,R12D
CALL 0x001043a0
MOV dword ptr [R14],EBX
MOV EBX,0xffffffff
JMP 0x0010c44b
MOV dword ptr [R14],EBP
MOV EBX,0xffffffff
JMP 0x0010c44b
(translation_unit "ulong FUN_0010c3b0(char *param_1,char *param_2)\n\n{\n  int iVar1;\n  int __fd;\n  int iVar2;\n  int iVar3;\n  int *piVar4;\n  size_t sVar5;\n  ulong uVar6;\n  undefined1 auStack_2028 [8192];\n  \n  __fd = open(param_1,0);\n  if (-1 < __fd) {\n    iVar2 = open(param_2,0x241,0x1ff);\n    piVar4 = __errno_location();\n    if (iVar2 < 0) {\n      iVar2 = *piVar4;\n      close(__fd);\n      *piVar4 = iVar2;\n    }\n    else {\n      do {\n        uVar6 = read(__fd,auStack_2028,0x2000);\n        iVar3 = (int)uVar6;\n        if (iVar3 < 1) {\n          iVar1 = *piVar4;\n          close(__fd);\n          close(iVar2);\n          if (iVar3 != 0) {\n            *piVar4 = iVar1;\n            return 0xffffffff;\n          }\n          return uVar6 & 0xffffffff;\n        }\n        sVar5 = write(iVar2,auStack_2028,(long)iVar3);\n      } while (sVar5 == (long)iVar3);\n      iVar3 = *piVar4;\n      close(__fd);\n      close(iVar2);\n      *piVar4 = iVar3;\n    }\n  }\n  return 0xffffffff;\n}\n\n" (function_definition "ulong FUN_0010c3b0(char *param_1,char *param_2)\n\n{\n  int iVar1;\n  int __fd;\n  int iVar2;\n  int iVar3;\n  int *piVar4;\n  size_t sVar5;\n  ulong uVar6;\n  undefined1 auStack_2028 [8192];\n  \n  __fd = open(param_1,0);\n  if (-1 < __fd) {\n    iVar2 = open(param_2,0x241,0x1ff);\n    piVar4 = __errno_location();\n    if (iVar2 < 0) {\n      iVar2 = *piVar4;\n      close(__fd);\n      *piVar4 = iVar2;\n    }\n    else {\n      do {\n        uVar6 = read(__fd,auStack_2028,0x2000);\n        iVar3 = (int)uVar6;\n        if (iVar3 < 1) {\n          iVar1 = *piVar4;\n          close(__fd);\n          close(iVar2);\n          if (iVar3 != 0) {\n            *piVar4 = iVar1;\n            return 0xffffffff;\n          }\n          return uVar6 & 0xffffffff;\n        }\n        sVar5 = write(iVar2,auStack_2028,(long)iVar3);\n      } while (sVar5 == (long)iVar3);\n      iVar3 = *piVar4;\n      close(__fd);\n      close(iVar2);\n      *piVar4 = iVar3;\n    }\n  }\n  return 0xffffffff;\n}" type_identifier (function_declarator "FUN_0010c3b0(char *param_1,char *param_2)" identifier (parameter_list "(char *param_1,char *param_2)" ( (parameter_declaration "char *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "char *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  int __fd;\n  int iVar2;\n  int iVar3;\n  int *piVar4;\n  size_t sVar5;\n  ulong uVar6;\n  undefined1 auStack_2028 [8192];\n  \n  __fd = open(param_1,0);\n  if (-1 < __fd) {\n    iVar2 = open(param_2,0x241,0x1ff);\n    piVar4 = __errno_location();\n    if (iVar2 < 0) {\n      iVar2 = *piVar4;\n      close(__fd);\n      *piVar4 = iVar2;\n    }\n    else {\n      do {\n        uVar6 = read(__fd,auStack_2028,0x2000);\n        iVar3 = (int)uVar6;\n        if (iVar3 < 1) {\n          iVar1 = *piVar4;\n          close(__fd);\n          close(iVar2);\n          if (iVar3 != 0) {\n            *piVar4 = iVar1;\n            return 0xffffffff;\n          }\n          return uVar6 & 0xffffffff;\n        }\n        sVar5 = write(iVar2,auStack_2028,(long)iVar3);\n      } while (sVar5 == (long)iVar3);\n      iVar3 = *piVar4;\n      close(__fd);\n      close(iVar2);\n      *piVar4 = iVar3;\n    }\n  }\n  return 0xffffffff;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int __fd;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int *piVar4;" primitive_type (pointer_declarator "*piVar4" * identifier) ;) (declaration "size_t sVar5;" primitive_type identifier ;) (declaration "ulong uVar6;" type_identifier identifier ;) (declaration "undefined1 auStack_2028 [8192];" type_identifier (array_declarator "auStack_2028 [8192]" identifier [ number_literal ]) ;) (expression_statement "__fd = open(param_1,0);" (assignment_expression "__fd = open(param_1,0)" identifier = (call_expression "open(param_1,0)" identifier (argument_list "(param_1,0)" ( identifier , number_literal )))) ;) (if_statement "if (-1 < __fd) {\n    iVar2 = open(param_2,0x241,0x1ff);\n    piVar4 = __errno_location();\n    if (iVar2 < 0) {\n      iVar2 = *piVar4;\n      close(__fd);\n      *piVar4 = iVar2;\n    }\n    else {\n      do {\n        uVar6 = read(__fd,auStack_2028,0x2000);\n        iVar3 = (int)uVar6;\n        if (iVar3 < 1) {\n          iVar1 = *piVar4;\n          close(__fd);\n          close(iVar2);\n          if (iVar3 != 0) {\n            *piVar4 = iVar1;\n            return 0xffffffff;\n          }\n          return uVar6 & 0xffffffff;\n        }\n        sVar5 = write(iVar2,auStack_2028,(long)iVar3);\n      } while (sVar5 == (long)iVar3);\n      iVar3 = *piVar4;\n      close(__fd);\n      close(iVar2);\n      *piVar4 = iVar3;\n    }\n  }" if (parenthesized_expression "(-1 < __fd)" ( (binary_expression "-1 < __fd" number_literal < identifier) )) (compound_statement "{\n    iVar2 = open(param_2,0x241,0x1ff);\n    piVar4 = __errno_location();\n    if (iVar2 < 0) {\n      iVar2 = *piVar4;\n      close(__fd);\n      *piVar4 = iVar2;\n    }\n    else {\n      do {\n        uVar6 = read(__fd,auStack_2028,0x2000);\n        iVar3 = (int)uVar6;\n        if (iVar3 < 1) {\n          iVar1 = *piVar4;\n          close(__fd);\n          close(iVar2);\n          if (iVar3 != 0) {\n            *piVar4 = iVar1;\n            return 0xffffffff;\n          }\n          return uVar6 & 0xffffffff;\n        }\n        sVar5 = write(iVar2,auStack_2028,(long)iVar3);\n      } while (sVar5 == (long)iVar3);\n      iVar3 = *piVar4;\n      close(__fd);\n      close(iVar2);\n      *piVar4 = iVar3;\n    }\n  }" { (expression_statement "iVar2 = open(param_2,0x241,0x1ff);" (assignment_expression "iVar2 = open(param_2,0x241,0x1ff)" identifier = (call_expression "open(param_2,0x241,0x1ff)" identifier (argument_list "(param_2,0x241,0x1ff)" ( identifier , number_literal , number_literal )))) ;) (expression_statement "piVar4 = __errno_location();" (assignment_expression "piVar4 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (if_statement "if (iVar2 < 0) {\n      iVar2 = *piVar4;\n      close(__fd);\n      *piVar4 = iVar2;\n    }\n    else {\n      do {\n        uVar6 = read(__fd,auStack_2028,0x2000);\n        iVar3 = (int)uVar6;\n        if (iVar3 < 1) {\n          iVar1 = *piVar4;\n          close(__fd);\n          close(iVar2);\n          if (iVar3 != 0) {\n            *piVar4 = iVar1;\n            return 0xffffffff;\n          }\n          return uVar6 & 0xffffffff;\n        }\n        sVar5 = write(iVar2,auStack_2028,(long)iVar3);\n      } while (sVar5 == (long)iVar3);\n      iVar3 = *piVar4;\n      close(__fd);\n      close(iVar2);\n      *piVar4 = iVar3;\n    }" if (parenthesized_expression "(iVar2 < 0)" ( (binary_expression "iVar2 < 0" identifier < number_literal) )) (compound_statement "{\n      iVar2 = *piVar4;\n      close(__fd);\n      *piVar4 = iVar2;\n    }" { (expression_statement "iVar2 = *piVar4;" (assignment_expression "iVar2 = *piVar4" identifier = (pointer_expression "*piVar4" * identifier)) ;) (expression_statement "close(__fd);" (call_expression "close(__fd)" identifier (argument_list "(__fd)" ( identifier ))) ;) (expression_statement "*piVar4 = iVar2;" (assignment_expression "*piVar4 = iVar2" (pointer_expression "*piVar4" * identifier) = identifier) ;) }) (else_clause "else {\n      do {\n        uVar6 = read(__fd,auStack_2028,0x2000);\n        iVar3 = (int)uVar6;\n        if (iVar3 < 1) {\n          iVar1 = *piVar4;\n          close(__fd);\n          close(iVar2);\n          if (iVar3 != 0) {\n            *piVar4 = iVar1;\n            return 0xffffffff;\n          }\n          return uVar6 & 0xffffffff;\n        }\n        sVar5 = write(iVar2,auStack_2028,(long)iVar3);\n      } while (sVar5 == (long)iVar3);\n      iVar3 = *piVar4;\n      close(__fd);\n      close(iVar2);\n      *piVar4 = iVar3;\n    }" else (compound_statement "{\n      do {\n        uVar6 = read(__fd,auStack_2028,0x2000);\n        iVar3 = (int)uVar6;\n        if (iVar3 < 1) {\n          iVar1 = *piVar4;\n          close(__fd);\n          close(iVar2);\n          if (iVar3 != 0) {\n            *piVar4 = iVar1;\n            return 0xffffffff;\n          }\n          return uVar6 & 0xffffffff;\n        }\n        sVar5 = write(iVar2,auStack_2028,(long)iVar3);\n      } while (sVar5 == (long)iVar3);\n      iVar3 = *piVar4;\n      close(__fd);\n      close(iVar2);\n      *piVar4 = iVar3;\n    }" { (do_statement "do {\n        uVar6 = read(__fd,auStack_2028,0x2000);\n        iVar3 = (int)uVar6;\n        if (iVar3 < 1) {\n          iVar1 = *piVar4;\n          close(__fd);\n          close(iVar2);\n          if (iVar3 != 0) {\n            *piVar4 = iVar1;\n            return 0xffffffff;\n          }\n          return uVar6 & 0xffffffff;\n        }\n        sVar5 = write(iVar2,auStack_2028,(long)iVar3);\n      } while (sVar5 == (long)iVar3);" do (compound_statement "{\n        uVar6 = read(__fd,auStack_2028,0x2000);\n        iVar3 = (int)uVar6;\n        if (iVar3 < 1) {\n          iVar1 = *piVar4;\n          close(__fd);\n          close(iVar2);\n          if (iVar3 != 0) {\n            *piVar4 = iVar1;\n            return 0xffffffff;\n          }\n          return uVar6 & 0xffffffff;\n        }\n        sVar5 = write(iVar2,auStack_2028,(long)iVar3);\n      }" { (expression_statement "uVar6 = read(__fd,auStack_2028,0x2000);" (assignment_expression "uVar6 = read(__fd,auStack_2028,0x2000)" identifier = (call_expression "read(__fd,auStack_2028,0x2000)" identifier (argument_list "(__fd,auStack_2028,0x2000)" ( identifier , identifier , number_literal )))) ;) (expression_statement "iVar3 = (int)uVar6;" (assignment_expression "iVar3 = (int)uVar6" identifier = (cast_expression "(int)uVar6" ( (type_descriptor "int" primitive_type) ) identifier)) ;) (if_statement "if (iVar3 < 1) {\n          iVar1 = *piVar4;\n          close(__fd);\n          close(iVar2);\n          if (iVar3 != 0) {\n            *piVar4 = iVar1;\n            return 0xffffffff;\n          }\n          return uVar6 & 0xffffffff;\n        }" if (parenthesized_expression "(iVar3 < 1)" ( (binary_expression "iVar3 < 1" identifier < number_literal) )) (compound_statement "{\n          iVar1 = *piVar4;\n          close(__fd);\n          close(iVar2);\n          if (iVar3 != 0) {\n            *piVar4 = iVar1;\n            return 0xffffffff;\n          }\n          return uVar6 & 0xffffffff;\n        }" { (expression_statement "iVar1 = *piVar4;" (assignment_expression "iVar1 = *piVar4" identifier = (pointer_expression "*piVar4" * identifier)) ;) (expression_statement "close(__fd);" (call_expression "close(__fd)" identifier (argument_list "(__fd)" ( identifier ))) ;) (expression_statement "close(iVar2);" (call_expression "close(iVar2)" identifier (argument_list "(iVar2)" ( identifier ))) ;) (if_statement "if (iVar3 != 0) {\n            *piVar4 = iVar1;\n            return 0xffffffff;\n          }" if (parenthesized_expression "(iVar3 != 0)" ( (binary_expression "iVar3 != 0" identifier != number_literal) )) (compound_statement "{\n            *piVar4 = iVar1;\n            return 0xffffffff;\n          }" { (expression_statement "*piVar4 = iVar1;" (assignment_expression "*piVar4 = iVar1" (pointer_expression "*piVar4" * identifier) = identifier) ;) (return_statement "return 0xffffffff;" return number_literal ;) })) (return_statement "return uVar6 & 0xffffffff;" return (binary_expression "uVar6 & 0xffffffff" identifier & number_literal) ;) })) (expression_statement "sVar5 = write(iVar2,auStack_2028,(long)iVar3);" (assignment_expression "sVar5 = write(iVar2,auStack_2028,(long)iVar3)" identifier = (call_expression "write(iVar2,auStack_2028,(long)iVar3)" identifier (argument_list "(iVar2,auStack_2028,(long)iVar3)" ( identifier , identifier , (cast_expression "(long)iVar3" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) )))) ;) }) while (parenthesized_expression "(sVar5 == (long)iVar3)" ( (binary_expression "sVar5 == (long)iVar3" identifier == (cast_expression "(long)iVar3" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier)) )) ;) (expression_statement "iVar3 = *piVar4;" (assignment_expression "iVar3 = *piVar4" identifier = (pointer_expression "*piVar4" * identifier)) ;) (expression_statement "close(__fd);" (call_expression "close(__fd)" identifier (argument_list "(__fd)" ( identifier ))) ;) (expression_statement "close(iVar2);" (call_expression "close(iVar2)" identifier (argument_list "(iVar2)" ( identifier ))) ;) (expression_statement "*piVar4 = iVar3;" (assignment_expression "*piVar4 = iVar3" (pointer_expression "*piVar4" * identifier) = identifier) ;) }))) })) (return_statement "return 0xffffffff;" return number_literal ;) })))
(translation_unit "int simple_copy(char *from,char *to)\n\n{\n  int iVar1;\n  int __fd;\n  int iVar2;\n  int iVar3;\n  int *piVar4;\n  size_t sVar5;\n  ssize_t sVar6;\n  char buf [8192];\n  \n  __fd = open(from,0);\n  if (-1 < __fd) {\n    iVar2 = open(to,0x241,0x1ff);\n    piVar4 = __errno_location();\n    if (iVar2 < 0) {\n      iVar2 = *piVar4;\n      close(__fd);\n      *piVar4 = iVar2;\n    }\n    else {\n      do {\n        sVar6 = read(__fd,buf,0x2000);\n        iVar3 = (int)sVar6;\n        if (iVar3 < 1) {\n          iVar1 = *piVar4;\n          close(__fd);\n          close(iVar2);\n          if (iVar3 != 0) {\n            *piVar4 = iVar1;\n            return -1;\n          }\n          return 0;\n        }\n        sVar5 = write(iVar2,buf,(long)iVar3);\n      } while (sVar5 == (long)iVar3);\n      iVar3 = *piVar4;\n      close(__fd);\n      close(iVar2);\n      *piVar4 = iVar3;\n    }\n  }\n  return -1;\n}\n\n" (function_definition "int simple_copy(char *from,char *to)\n\n{\n  int iVar1;\n  int __fd;\n  int iVar2;\n  int iVar3;\n  int *piVar4;\n  size_t sVar5;\n  ssize_t sVar6;\n  char buf [8192];\n  \n  __fd = open(from,0);\n  if (-1 < __fd) {\n    iVar2 = open(to,0x241,0x1ff);\n    piVar4 = __errno_location();\n    if (iVar2 < 0) {\n      iVar2 = *piVar4;\n      close(__fd);\n      *piVar4 = iVar2;\n    }\n    else {\n      do {\n        sVar6 = read(__fd,buf,0x2000);\n        iVar3 = (int)sVar6;\n        if (iVar3 < 1) {\n          iVar1 = *piVar4;\n          close(__fd);\n          close(iVar2);\n          if (iVar3 != 0) {\n            *piVar4 = iVar1;\n            return -1;\n          }\n          return 0;\n        }\n        sVar5 = write(iVar2,buf,(long)iVar3);\n      } while (sVar5 == (long)iVar3);\n      iVar3 = *piVar4;\n      close(__fd);\n      close(iVar2);\n      *piVar4 = iVar3;\n    }\n  }\n  return -1;\n}" primitive_type (function_declarator "simple_copy(char *from,char *to)" identifier (parameter_list "(char *from,char *to)" ( (parameter_declaration "char *from" primitive_type (pointer_declarator "*from" * identifier)) , (parameter_declaration "char *to" primitive_type (pointer_declarator "*to" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  int __fd;\n  int iVar2;\n  int iVar3;\n  int *piVar4;\n  size_t sVar5;\n  ssize_t sVar6;\n  char buf [8192];\n  \n  __fd = open(from,0);\n  if (-1 < __fd) {\n    iVar2 = open(to,0x241,0x1ff);\n    piVar4 = __errno_location();\n    if (iVar2 < 0) {\n      iVar2 = *piVar4;\n      close(__fd);\n      *piVar4 = iVar2;\n    }\n    else {\n      do {\n        sVar6 = read(__fd,buf,0x2000);\n        iVar3 = (int)sVar6;\n        if (iVar3 < 1) {\n          iVar1 = *piVar4;\n          close(__fd);\n          close(iVar2);\n          if (iVar3 != 0) {\n            *piVar4 = iVar1;\n            return -1;\n          }\n          return 0;\n        }\n        sVar5 = write(iVar2,buf,(long)iVar3);\n      } while (sVar5 == (long)iVar3);\n      iVar3 = *piVar4;\n      close(__fd);\n      close(iVar2);\n      *piVar4 = iVar3;\n    }\n  }\n  return -1;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int __fd;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int *piVar4;" primitive_type (pointer_declarator "*piVar4" * identifier) ;) (declaration "size_t sVar5;" primitive_type identifier ;) (declaration "ssize_t sVar6;" primitive_type identifier ;) (declaration "char buf [8192];" primitive_type (array_declarator "buf [8192]" identifier [ number_literal ]) ;) (expression_statement "__fd = open(from,0);" (assignment_expression "__fd = open(from,0)" identifier = (call_expression "open(from,0)" identifier (argument_list "(from,0)" ( identifier , number_literal )))) ;) (if_statement "if (-1 < __fd) {\n    iVar2 = open(to,0x241,0x1ff);\n    piVar4 = __errno_location();\n    if (iVar2 < 0) {\n      iVar2 = *piVar4;\n      close(__fd);\n      *piVar4 = iVar2;\n    }\n    else {\n      do {\n        sVar6 = read(__fd,buf,0x2000);\n        iVar3 = (int)sVar6;\n        if (iVar3 < 1) {\n          iVar1 = *piVar4;\n          close(__fd);\n          close(iVar2);\n          if (iVar3 != 0) {\n            *piVar4 = iVar1;\n            return -1;\n          }\n          return 0;\n        }\n        sVar5 = write(iVar2,buf,(long)iVar3);\n      } while (sVar5 == (long)iVar3);\n      iVar3 = *piVar4;\n      close(__fd);\n      close(iVar2);\n      *piVar4 = iVar3;\n    }\n  }" if (parenthesized_expression "(-1 < __fd)" ( (binary_expression "-1 < __fd" number_literal < identifier) )) (compound_statement "{\n    iVar2 = open(to,0x241,0x1ff);\n    piVar4 = __errno_location();\n    if (iVar2 < 0) {\n      iVar2 = *piVar4;\n      close(__fd);\n      *piVar4 = iVar2;\n    }\n    else {\n      do {\n        sVar6 = read(__fd,buf,0x2000);\n        iVar3 = (int)sVar6;\n        if (iVar3 < 1) {\n          iVar1 = *piVar4;\n          close(__fd);\n          close(iVar2);\n          if (iVar3 != 0) {\n            *piVar4 = iVar1;\n            return -1;\n          }\n          return 0;\n        }\n        sVar5 = write(iVar2,buf,(long)iVar3);\n      } while (sVar5 == (long)iVar3);\n      iVar3 = *piVar4;\n      close(__fd);\n      close(iVar2);\n      *piVar4 = iVar3;\n    }\n  }" { (expression_statement "iVar2 = open(to,0x241,0x1ff);" (assignment_expression "iVar2 = open(to,0x241,0x1ff)" identifier = (call_expression "open(to,0x241,0x1ff)" identifier (argument_list "(to,0x241,0x1ff)" ( identifier , number_literal , number_literal )))) ;) (expression_statement "piVar4 = __errno_location();" (assignment_expression "piVar4 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (if_statement "if (iVar2 < 0) {\n      iVar2 = *piVar4;\n      close(__fd);\n      *piVar4 = iVar2;\n    }\n    else {\n      do {\n        sVar6 = read(__fd,buf,0x2000);\n        iVar3 = (int)sVar6;\n        if (iVar3 < 1) {\n          iVar1 = *piVar4;\n          close(__fd);\n          close(iVar2);\n          if (iVar3 != 0) {\n            *piVar4 = iVar1;\n            return -1;\n          }\n          return 0;\n        }\n        sVar5 = write(iVar2,buf,(long)iVar3);\n      } while (sVar5 == (long)iVar3);\n      iVar3 = *piVar4;\n      close(__fd);\n      close(iVar2);\n      *piVar4 = iVar3;\n    }" if (parenthesized_expression "(iVar2 < 0)" ( (binary_expression "iVar2 < 0" identifier < number_literal) )) (compound_statement "{\n      iVar2 = *piVar4;\n      close(__fd);\n      *piVar4 = iVar2;\n    }" { (expression_statement "iVar2 = *piVar4;" (assignment_expression "iVar2 = *piVar4" identifier = (pointer_expression "*piVar4" * identifier)) ;) (expression_statement "close(__fd);" (call_expression "close(__fd)" identifier (argument_list "(__fd)" ( identifier ))) ;) (expression_statement "*piVar4 = iVar2;" (assignment_expression "*piVar4 = iVar2" (pointer_expression "*piVar4" * identifier) = identifier) ;) }) (else_clause "else {\n      do {\n        sVar6 = read(__fd,buf,0x2000);\n        iVar3 = (int)sVar6;\n        if (iVar3 < 1) {\n          iVar1 = *piVar4;\n          close(__fd);\n          close(iVar2);\n          if (iVar3 != 0) {\n            *piVar4 = iVar1;\n            return -1;\n          }\n          return 0;\n        }\n        sVar5 = write(iVar2,buf,(long)iVar3);\n      } while (sVar5 == (long)iVar3);\n      iVar3 = *piVar4;\n      close(__fd);\n      close(iVar2);\n      *piVar4 = iVar3;\n    }" else (compound_statement "{\n      do {\n        sVar6 = read(__fd,buf,0x2000);\n        iVar3 = (int)sVar6;\n        if (iVar3 < 1) {\n          iVar1 = *piVar4;\n          close(__fd);\n          close(iVar2);\n          if (iVar3 != 0) {\n            *piVar4 = iVar1;\n            return -1;\n          }\n          return 0;\n        }\n        sVar5 = write(iVar2,buf,(long)iVar3);\n      } while (sVar5 == (long)iVar3);\n      iVar3 = *piVar4;\n      close(__fd);\n      close(iVar2);\n      *piVar4 = iVar3;\n    }" { (do_statement "do {\n        sVar6 = read(__fd,buf,0x2000);\n        iVar3 = (int)sVar6;\n        if (iVar3 < 1) {\n          iVar1 = *piVar4;\n          close(__fd);\n          close(iVar2);\n          if (iVar3 != 0) {\n            *piVar4 = iVar1;\n            return -1;\n          }\n          return 0;\n        }\n        sVar5 = write(iVar2,buf,(long)iVar3);\n      } while (sVar5 == (long)iVar3);" do (compound_statement "{\n        sVar6 = read(__fd,buf,0x2000);\n        iVar3 = (int)sVar6;\n        if (iVar3 < 1) {\n          iVar1 = *piVar4;\n          close(__fd);\n          close(iVar2);\n          if (iVar3 != 0) {\n            *piVar4 = iVar1;\n            return -1;\n          }\n          return 0;\n        }\n        sVar5 = write(iVar2,buf,(long)iVar3);\n      }" { (expression_statement "sVar6 = read(__fd,buf,0x2000);" (assignment_expression "sVar6 = read(__fd,buf,0x2000)" identifier = (call_expression "read(__fd,buf,0x2000)" identifier (argument_list "(__fd,buf,0x2000)" ( identifier , identifier , number_literal )))) ;) (expression_statement "iVar3 = (int)sVar6;" (assignment_expression "iVar3 = (int)sVar6" identifier = (cast_expression "(int)sVar6" ( (type_descriptor "int" primitive_type) ) identifier)) ;) (if_statement "if (iVar3 < 1) {\n          iVar1 = *piVar4;\n          close(__fd);\n          close(iVar2);\n          if (iVar3 != 0) {\n            *piVar4 = iVar1;\n            return -1;\n          }\n          return 0;\n        }" if (parenthesized_expression "(iVar3 < 1)" ( (binary_expression "iVar3 < 1" identifier < number_literal) )) (compound_statement "{\n          iVar1 = *piVar4;\n          close(__fd);\n          close(iVar2);\n          if (iVar3 != 0) {\n            *piVar4 = iVar1;\n            return -1;\n          }\n          return 0;\n        }" { (expression_statement "iVar1 = *piVar4;" (assignment_expression "iVar1 = *piVar4" identifier = (pointer_expression "*piVar4" * identifier)) ;) (expression_statement "close(__fd);" (call_expression "close(__fd)" identifier (argument_list "(__fd)" ( identifier ))) ;) (expression_statement "close(iVar2);" (call_expression "close(iVar2)" identifier (argument_list "(iVar2)" ( identifier ))) ;) (if_statement "if (iVar3 != 0) {\n            *piVar4 = iVar1;\n            return -1;\n          }" if (parenthesized_expression "(iVar3 != 0)" ( (binary_expression "iVar3 != 0" identifier != number_literal) )) (compound_statement "{\n            *piVar4 = iVar1;\n            return -1;\n          }" { (expression_statement "*piVar4 = iVar1;" (assignment_expression "*piVar4 = iVar1" (pointer_expression "*piVar4" * identifier) = identifier) ;) (return_statement "return -1;" return number_literal ;) })) (return_statement "return 0;" return number_literal ;) })) (expression_statement "sVar5 = write(iVar2,buf,(long)iVar3);" (assignment_expression "sVar5 = write(iVar2,buf,(long)iVar3)" identifier = (call_expression "write(iVar2,buf,(long)iVar3)" identifier (argument_list "(iVar2,buf,(long)iVar3)" ( identifier , identifier , (cast_expression "(long)iVar3" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) )))) ;) }) while (parenthesized_expression "(sVar5 == (long)iVar3)" ( (binary_expression "sVar5 == (long)iVar3" identifier == (cast_expression "(long)iVar3" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier)) )) ;) (expression_statement "iVar3 = *piVar4;" (assignment_expression "iVar3 = *piVar4" identifier = (pointer_expression "*piVar4" * identifier)) ;) (expression_statement "close(__fd);" (call_expression "close(__fd)" identifier (argument_list "(__fd)" ( identifier ))) ;) (expression_statement "close(iVar2);" (call_expression "close(iVar2)" identifier (argument_list "(iVar2)" ( identifier ))) ;) (expression_statement "*piVar4 = iVar3;" (assignment_expression "*piVar4 = iVar3" (pointer_expression "*piVar4" * identifier) = identifier) ;) }))) })) (return_statement "return -1;" return number_literal ;) })))
(translation_unit "ulong FUN_0010c3b0(char *param_1,char *param_2)\n\n{\n  int iVar1;\n  int __fd;\n  int iVar2;\n  int iVar3;\n  int *piVar4;\n  size_t sVar5;\n  ulong uVar6;\n  undefined1 auStack_2028 [8192];\n  \n  __fd = open(param_1,0);\n  if (-1 < __fd) {\n    iVar2 = open(param_2,0x241,0x1ff);\n    piVar4 = __errno_location();\n    if (iVar2 < 0) {\n      iVar2 = *piVar4;\n      close(__fd);\n      *piVar4 = iVar2;\n    }\n    else {\n      do {\n        uVar6 = read(__fd,auStack_2028,0x2000);\n        iVar3 = (int)uVar6;\n        if (iVar3 < 1) {\n          iVar1 = *piVar4;\n          close(__fd);\n          close(iVar2);\n          if (iVar3 != 0) {\n            *piVar4 = iVar1;\n            return 0xffffffff;\n          }\n          return uVar6 & 0xffffffff;\n        }\n        sVar5 = write(iVar2,auStack_2028,(long)iVar3);\n      } while (sVar5 == (long)iVar3);\n      iVar3 = *piVar4;\n      close(__fd);\n      close(iVar2);\n      *piVar4 = iVar3;\n    }\n  }\n  return 0xffffffff;\n}\n\n" (function_definition "ulong FUN_0010c3b0(char *param_1,char *param_2)\n\n{\n  int iVar1;\n  int __fd;\n  int iVar2;\n  int iVar3;\n  int *piVar4;\n  size_t sVar5;\n  ulong uVar6;\n  undefined1 auStack_2028 [8192];\n  \n  __fd = open(param_1,0);\n  if (-1 < __fd) {\n    iVar2 = open(param_2,0x241,0x1ff);\n    piVar4 = __errno_location();\n    if (iVar2 < 0) {\n      iVar2 = *piVar4;\n      close(__fd);\n      *piVar4 = iVar2;\n    }\n    else {\n      do {\n        uVar6 = read(__fd,auStack_2028,0x2000);\n        iVar3 = (int)uVar6;\n        if (iVar3 < 1) {\n          iVar1 = *piVar4;\n          close(__fd);\n          close(iVar2);\n          if (iVar3 != 0) {\n            *piVar4 = iVar1;\n            return 0xffffffff;\n          }\n          return uVar6 & 0xffffffff;\n        }\n        sVar5 = write(iVar2,auStack_2028,(long)iVar3);\n      } while (sVar5 == (long)iVar3);\n      iVar3 = *piVar4;\n      close(__fd);\n      close(iVar2);\n      *piVar4 = iVar3;\n    }\n  }\n  return 0xffffffff;\n}" type_identifier (function_declarator "FUN_0010c3b0(char *param_1,char *param_2)" identifier (parameter_list "(char *param_1,char *param_2)" ( (parameter_declaration "char *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "char *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  int __fd;\n  int iVar2;\n  int iVar3;\n  int *piVar4;\n  size_t sVar5;\n  ulong uVar6;\n  undefined1 auStack_2028 [8192];\n  \n  __fd = open(param_1,0);\n  if (-1 < __fd) {\n    iVar2 = open(param_2,0x241,0x1ff);\n    piVar4 = __errno_location();\n    if (iVar2 < 0) {\n      iVar2 = *piVar4;\n      close(__fd);\n      *piVar4 = iVar2;\n    }\n    else {\n      do {\n        uVar6 = read(__fd,auStack_2028,0x2000);\n        iVar3 = (int)uVar6;\n        if (iVar3 < 1) {\n          iVar1 = *piVar4;\n          close(__fd);\n          close(iVar2);\n          if (iVar3 != 0) {\n            *piVar4 = iVar1;\n            return 0xffffffff;\n          }\n          return uVar6 & 0xffffffff;\n        }\n        sVar5 = write(iVar2,auStack_2028,(long)iVar3);\n      } while (sVar5 == (long)iVar3);\n      iVar3 = *piVar4;\n      close(__fd);\n      close(iVar2);\n      *piVar4 = iVar3;\n    }\n  }\n  return 0xffffffff;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int __fd;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int *piVar4;" primitive_type (pointer_declarator "*piVar4" * identifier) ;) (declaration "size_t sVar5;" primitive_type identifier ;) (declaration "ulong uVar6;" type_identifier identifier ;) (declaration "undefined1 auStack_2028 [8192];" type_identifier (array_declarator "auStack_2028 [8192]" identifier [ number_literal ]) ;) (expression_statement "__fd = open(param_1,0);" (assignment_expression "__fd = open(param_1,0)" identifier = (call_expression "open(param_1,0)" identifier (argument_list "(param_1,0)" ( identifier , number_literal )))) ;) (if_statement "if (-1 < __fd) {\n    iVar2 = open(param_2,0x241,0x1ff);\n    piVar4 = __errno_location();\n    if (iVar2 < 0) {\n      iVar2 = *piVar4;\n      close(__fd);\n      *piVar4 = iVar2;\n    }\n    else {\n      do {\n        uVar6 = read(__fd,auStack_2028,0x2000);\n        iVar3 = (int)uVar6;\n        if (iVar3 < 1) {\n          iVar1 = *piVar4;\n          close(__fd);\n          close(iVar2);\n          if (iVar3 != 0) {\n            *piVar4 = iVar1;\n            return 0xffffffff;\n          }\n          return uVar6 & 0xffffffff;\n        }\n        sVar5 = write(iVar2,auStack_2028,(long)iVar3);\n      } while (sVar5 == (long)iVar3);\n      iVar3 = *piVar4;\n      close(__fd);\n      close(iVar2);\n      *piVar4 = iVar3;\n    }\n  }" if (parenthesized_expression "(-1 < __fd)" ( (binary_expression "-1 < __fd" number_literal < identifier) )) (compound_statement "{\n    iVar2 = open(param_2,0x241,0x1ff);\n    piVar4 = __errno_location();\n    if (iVar2 < 0) {\n      iVar2 = *piVar4;\n      close(__fd);\n      *piVar4 = iVar2;\n    }\n    else {\n      do {\n        uVar6 = read(__fd,auStack_2028,0x2000);\n        iVar3 = (int)uVar6;\n        if (iVar3 < 1) {\n          iVar1 = *piVar4;\n          close(__fd);\n          close(iVar2);\n          if (iVar3 != 0) {\n            *piVar4 = iVar1;\n            return 0xffffffff;\n          }\n          return uVar6 & 0xffffffff;\n        }\n        sVar5 = write(iVar2,auStack_2028,(long)iVar3);\n      } while (sVar5 == (long)iVar3);\n      iVar3 = *piVar4;\n      close(__fd);\n      close(iVar2);\n      *piVar4 = iVar3;\n    }\n  }" { (expression_statement "iVar2 = open(param_2,0x241,0x1ff);" (assignment_expression "iVar2 = open(param_2,0x241,0x1ff)" identifier = (call_expression "open(param_2,0x241,0x1ff)" identifier (argument_list "(param_2,0x241,0x1ff)" ( identifier , number_literal , number_literal )))) ;) (expression_statement "piVar4 = __errno_location();" (assignment_expression "piVar4 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (if_statement "if (iVar2 < 0) {\n      iVar2 = *piVar4;\n      close(__fd);\n      *piVar4 = iVar2;\n    }\n    else {\n      do {\n        uVar6 = read(__fd,auStack_2028,0x2000);\n        iVar3 = (int)uVar6;\n        if (iVar3 < 1) {\n          iVar1 = *piVar4;\n          close(__fd);\n          close(iVar2);\n          if (iVar3 != 0) {\n            *piVar4 = iVar1;\n            return 0xffffffff;\n          }\n          return uVar6 & 0xffffffff;\n        }\n        sVar5 = write(iVar2,auStack_2028,(long)iVar3);\n      } while (sVar5 == (long)iVar3);\n      iVar3 = *piVar4;\n      close(__fd);\n      close(iVar2);\n      *piVar4 = iVar3;\n    }" if (parenthesized_expression "(iVar2 < 0)" ( (binary_expression "iVar2 < 0" identifier < number_literal) )) (compound_statement "{\n      iVar2 = *piVar4;\n      close(__fd);\n      *piVar4 = iVar2;\n    }" { (expression_statement "iVar2 = *piVar4;" (assignment_expression "iVar2 = *piVar4" identifier = (pointer_expression "*piVar4" * identifier)) ;) (expression_statement "close(__fd);" (call_expression "close(__fd)" identifier (argument_list "(__fd)" ( identifier ))) ;) (expression_statement "*piVar4 = iVar2;" (assignment_expression "*piVar4 = iVar2" (pointer_expression "*piVar4" * identifier) = identifier) ;) }) (else_clause "else {\n      do {\n        uVar6 = read(__fd,auStack_2028,0x2000);\n        iVar3 = (int)uVar6;\n        if (iVar3 < 1) {\n          iVar1 = *piVar4;\n          close(__fd);\n          close(iVar2);\n          if (iVar3 != 0) {\n            *piVar4 = iVar1;\n            return 0xffffffff;\n          }\n          return uVar6 & 0xffffffff;\n        }\n        sVar5 = write(iVar2,auStack_2028,(long)iVar3);\n      } while (sVar5 == (long)iVar3);\n      iVar3 = *piVar4;\n      close(__fd);\n      close(iVar2);\n      *piVar4 = iVar3;\n    }" else (compound_statement "{\n      do {\n        uVar6 = read(__fd,auStack_2028,0x2000);\n        iVar3 = (int)uVar6;\n        if (iVar3 < 1) {\n          iVar1 = *piVar4;\n          close(__fd);\n          close(iVar2);\n          if (iVar3 != 0) {\n            *piVar4 = iVar1;\n            return 0xffffffff;\n          }\n          return uVar6 & 0xffffffff;\n        }\n        sVar5 = write(iVar2,auStack_2028,(long)iVar3);\n      } while (sVar5 == (long)iVar3);\n      iVar3 = *piVar4;\n      close(__fd);\n      close(iVar2);\n      *piVar4 = iVar3;\n    }" { (do_statement "do {\n        uVar6 = read(__fd,auStack_2028,0x2000);\n        iVar3 = (int)uVar6;\n        if (iVar3 < 1) {\n          iVar1 = *piVar4;\n          close(__fd);\n          close(iVar2);\n          if (iVar3 != 0) {\n            *piVar4 = iVar1;\n            return 0xffffffff;\n          }\n          return uVar6 & 0xffffffff;\n        }\n        sVar5 = write(iVar2,auStack_2028,(long)iVar3);\n      } while (sVar5 == (long)iVar3);" do (compound_statement "{\n        uVar6 = read(__fd,auStack_2028,0x2000);\n        iVar3 = (int)uVar6;\n        if (iVar3 < 1) {\n          iVar1 = *piVar4;\n          close(__fd);\n          close(iVar2);\n          if (iVar3 != 0) {\n            *piVar4 = iVar1;\n            return 0xffffffff;\n          }\n          return uVar6 & 0xffffffff;\n        }\n        sVar5 = write(iVar2,auStack_2028,(long)iVar3);\n      }" { (expression_statement "uVar6 = read(__fd,auStack_2028,0x2000);" (assignment_expression "uVar6 = read(__fd,auStack_2028,0x2000)" identifier = (call_expression "read(__fd,auStack_2028,0x2000)" identifier (argument_list "(__fd,auStack_2028,0x2000)" ( identifier , identifier , number_literal )))) ;) (expression_statement "iVar3 = (int)uVar6;" (assignment_expression "iVar3 = (int)uVar6" identifier = (cast_expression "(int)uVar6" ( (type_descriptor "int" primitive_type) ) identifier)) ;) (if_statement "if (iVar3 < 1) {\n          iVar1 = *piVar4;\n          close(__fd);\n          close(iVar2);\n          if (iVar3 != 0) {\n            *piVar4 = iVar1;\n            return 0xffffffff;\n          }\n          return uVar6 & 0xffffffff;\n        }" if (parenthesized_expression "(iVar3 < 1)" ( (binary_expression "iVar3 < 1" identifier < number_literal) )) (compound_statement "{\n          iVar1 = *piVar4;\n          close(__fd);\n          close(iVar2);\n          if (iVar3 != 0) {\n            *piVar4 = iVar1;\n            return 0xffffffff;\n          }\n          return uVar6 & 0xffffffff;\n        }" { (expression_statement "iVar1 = *piVar4;" (assignment_expression "iVar1 = *piVar4" identifier = (pointer_expression "*piVar4" * identifier)) ;) (expression_statement "close(__fd);" (call_expression "close(__fd)" identifier (argument_list "(__fd)" ( identifier ))) ;) (expression_statement "close(iVar2);" (call_expression "close(iVar2)" identifier (argument_list "(iVar2)" ( identifier ))) ;) (if_statement "if (iVar3 != 0) {\n            *piVar4 = iVar1;\n            return 0xffffffff;\n          }" if (parenthesized_expression "(iVar3 != 0)" ( (binary_expression "iVar3 != 0" identifier != number_literal) )) (compound_statement "{\n            *piVar4 = iVar1;\n            return 0xffffffff;\n          }" { (expression_statement "*piVar4 = iVar1;" (assignment_expression "*piVar4 = iVar1" (pointer_expression "*piVar4" * identifier) = identifier) ;) (return_statement "return 0xffffffff;" return number_literal ;) })) (return_statement "return uVar6 & 0xffffffff;" return (binary_expression "uVar6 & 0xffffffff" identifier & number_literal) ;) })) (expression_statement "sVar5 = write(iVar2,auStack_2028,(long)iVar3);" (assignment_expression "sVar5 = write(iVar2,auStack_2028,(long)iVar3)" identifier = (call_expression "write(iVar2,auStack_2028,(long)iVar3)" identifier (argument_list "(iVar2,auStack_2028,(long)iVar3)" ( identifier , identifier , (cast_expression "(long)iVar3" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) )))) ;) }) while (parenthesized_expression "(sVar5 == (long)iVar3)" ( (binary_expression "sVar5 == (long)iVar3" identifier == (cast_expression "(long)iVar3" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier)) )) ;) (expression_statement "iVar3 = *piVar4;" (assignment_expression "iVar3 = *piVar4" identifier = (pointer_expression "*piVar4" * identifier)) ;) (expression_statement "close(__fd);" (call_expression "close(__fd)" identifier (argument_list "(__fd)" ( identifier ))) ;) (expression_statement "close(iVar2);" (call_expression "close(iVar2)" identifier (argument_list "(iVar2)" ( identifier ))) ;) (expression_statement "*piVar4 = iVar3;" (assignment_expression "*piVar4 = iVar3" (pointer_expression "*piVar4" * identifier) = identifier) ;) }))) })) (return_statement "return 0xffffffff;" return number_literal ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (array_declarator IDENT [ LIT ]) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , LIT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , LIT , LIT )))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) }) (else_clause else (compound_statement { (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , LIT )))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE) ) IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (return_statement return LIT ;) })) (return_statement return (binary_expression IDENT & LIT) ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT) )))) ;) }) while (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT)) )) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) }))) })) (return_statement return LIT ;) })))
(function_definition "ulong FUN_0010c3b0(char *param_1,char *param_2)\n\n{\n  int iVar1;\n  int __fd;\n  int iVar2;\n  int iVar3;\n  int *piVar4;\n  size_t sVar5;\n  ulong uVar6;\n  undefined1 auStack_2028 [8192];\n  \n  __fd = open(param_1,0);\n  if (-1 < __fd) {\n    iVar2 = open(param_2,0x241,0x1ff);\n    piVar4 = __errno_location();\n    if (iVar2 < 0) {\n      iVar2 = *piVar4;\n      close(__fd);\n      *piVar4 = iVar2;\n    }\n    else {\n      do {\n        uVar6 = read(__fd,auStack_2028,0x2000);\n        iVar3 = (int)uVar6;\n        if (iVar3 < 1) {\n          iVar1 = *piVar4;\n          close(__fd);\n          close(iVar2);\n          if (iVar3 != 0) {\n            *piVar4 = iVar1;\n            return 0xffffffff;\n          }\n          return uVar6 & 0xffffffff;\n        }\n        sVar5 = write(iVar2,auStack_2028,(long)iVar3);\n      } while (sVar5 == (long)iVar3);\n      iVar3 = *piVar4;\n      close(__fd);\n      close(iVar2);\n      *piVar4 = iVar3;\n    }\n  }\n  return 0xffffffff;\n}" (type_identifier "ulong") (function_declarator "FUN_0010c3b0(char *param_1,char *param_2)" (identifier "FUN_0010c3b0") (parameter_list "(char *param_1,char *param_2)" (( "(") (parameter_declaration "char *param_1" (primitive_type "char") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "char *param_2" (primitive_type "char") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) () ")"))) (compound_statement "{\n  int iVar1;\n  int __fd;\n  int iVar2;\n  int iVar3;\n  int *piVar4;\n  size_t sVar5;\n  ulong uVar6;\n  undefined1 auStack_2028 [8192];\n  \n  __fd = open(param_1,0);\n  if (-1 < __fd) {\n    iVar2 = open(param_2,0x241,0x1ff);\n    piVar4 = __errno_location();\n    if (iVar2 < 0) {\n      iVar2 = *piVar4;\n      close(__fd);\n      *piVar4 = iVar2;\n    }\n    else {\n      do {\n        uVar6 = read(__fd,auStack_2028,0x2000);\n        iVar3 = (int)uVar6;\n        if (iVar3 < 1) {\n          iVar1 = *piVar4;\n          close(__fd);\n          close(iVar2);\n          if (iVar3 != 0) {\n            *piVar4 = iVar1;\n            return 0xffffffff;\n          }\n          return uVar6 & 0xffffffff;\n        }\n        sVar5 = write(iVar2,auStack_2028,(long)iVar3);\n      } while (sVar5 == (long)iVar3);\n      iVar3 = *piVar4;\n      close(__fd);\n      close(iVar2);\n      *piVar4 = iVar3;\n    }\n  }\n  return 0xffffffff;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "int __fd;" (primitive_type "int") (identifier "__fd") (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (declaration "int *piVar4;" (primitive_type "int") (pointer_declarator "*piVar4" (* "*") (identifier "piVar4")) (; ";")) (declaration "size_t sVar5;" (primitive_type "size_t") (identifier "sVar5") (; ";")) (declaration "ulong uVar6;" (type_identifier "ulong") (identifier "uVar6") (; ";")) (declaration "undefined1 auStack_2028 [8192];" (type_identifier "undefined1") (array_declarator "auStack_2028 [8192]" (identifier "auStack_2028") ([ "[") (number_literal "8192") (] "]")) (; ";")) (expression_statement "__fd = open(param_1,0);" (assignment_expression "__fd = open(param_1,0)" (identifier "__fd") (= "=") (call_expression "open(param_1,0)" (identifier "open") (argument_list "(param_1,0)" (( "(") (identifier "param_1") (, ",") (number_literal "0") () ")")))) (; ";")) (if_statement "if (-1 < __fd) {\n    iVar2 = open(param_2,0x241,0x1ff);\n    piVar4 = __errno_location();\n    if (iVar2 < 0) {\n      iVar2 = *piVar4;\n      close(__fd);\n      *piVar4 = iVar2;\n    }\n    else {\n      do {\n        uVar6 = read(__fd,auStack_2028,0x2000);\n        iVar3 = (int)uVar6;\n        if (iVar3 < 1) {\n          iVar1 = *piVar4;\n          close(__fd);\n          close(iVar2);\n          if (iVar3 != 0) {\n            *piVar4 = iVar1;\n            return 0xffffffff;\n          }\n          return uVar6 & 0xffffffff;\n        }\n        sVar5 = write(iVar2,auStack_2028,(long)iVar3);\n      } while (sVar5 == (long)iVar3);\n      iVar3 = *piVar4;\n      close(__fd);\n      close(iVar2);\n      *piVar4 = iVar3;\n    }\n  }" (if "if") (parenthesized_expression "(-1 < __fd)" (( "(") (binary_expression "-1 < __fd" (number_literal "-1") (< "<") (identifier "__fd")) () ")")) (compound_statement "{\n    iVar2 = open(param_2,0x241,0x1ff);\n    piVar4 = __errno_location();\n    if (iVar2 < 0) {\n      iVar2 = *piVar4;\n      close(__fd);\n      *piVar4 = iVar2;\n    }\n    else {\n      do {\n        uVar6 = read(__fd,auStack_2028,0x2000);\n        iVar3 = (int)uVar6;\n        if (iVar3 < 1) {\n          iVar1 = *piVar4;\n          close(__fd);\n          close(iVar2);\n          if (iVar3 != 0) {\n            *piVar4 = iVar1;\n            return 0xffffffff;\n          }\n          return uVar6 & 0xffffffff;\n        }\n        sVar5 = write(iVar2,auStack_2028,(long)iVar3);\n      } while (sVar5 == (long)iVar3);\n      iVar3 = *piVar4;\n      close(__fd);\n      close(iVar2);\n      *piVar4 = iVar3;\n    }\n  }" ({ "{") (expression_statement "iVar2 = open(param_2,0x241,0x1ff);" (assignment_expression "iVar2 = open(param_2,0x241,0x1ff)" (identifier "iVar2") (= "=") (call_expression "open(param_2,0x241,0x1ff)" (identifier "open") (argument_list "(param_2,0x241,0x1ff)" (( "(") (identifier "param_2") (, ",") (number_literal "0x241") (, ",") (number_literal "0x1ff") () ")")))) (; ";")) (expression_statement "piVar4 = __errno_location();" (assignment_expression "piVar4 = __errno_location()" (identifier "piVar4") (= "=") (call_expression "__errno_location()" (identifier "__errno_location") (argument_list "()" (( "(") () ")")))) (; ";")) (if_statement "if (iVar2 < 0) {\n      iVar2 = *piVar4;\n      close(__fd);\n      *piVar4 = iVar2;\n    }\n    else {\n      do {\n        uVar6 = read(__fd,auStack_2028,0x2000);\n        iVar3 = (int)uVar6;\n        if (iVar3 < 1) {\n          iVar1 = *piVar4;\n          close(__fd);\n          close(iVar2);\n          if (iVar3 != 0) {\n            *piVar4 = iVar1;\n            return 0xffffffff;\n          }\n          return uVar6 & 0xffffffff;\n        }\n        sVar5 = write(iVar2,auStack_2028,(long)iVar3);\n      } while (sVar5 == (long)iVar3);\n      iVar3 = *piVar4;\n      close(__fd);\n      close(iVar2);\n      *piVar4 = iVar3;\n    }" (if "if") (parenthesized_expression "(iVar2 < 0)" (( "(") (binary_expression "iVar2 < 0" (identifier "iVar2") (< "<") (number_literal "0")) () ")")) (compound_statement "{\n      iVar2 = *piVar4;\n      close(__fd);\n      *piVar4 = iVar2;\n    }" ({ "{") (expression_statement "iVar2 = *piVar4;" (assignment_expression "iVar2 = *piVar4" (identifier "iVar2") (= "=") (pointer_expression "*piVar4" (* "*") (identifier "piVar4"))) (; ";")) (expression_statement "close(__fd);" (call_expression "close(__fd)" (identifier "close") (argument_list "(__fd)" (( "(") (identifier "__fd") () ")"))) (; ";")) (expression_statement "*piVar4 = iVar2;" (assignment_expression "*piVar4 = iVar2" (pointer_expression "*piVar4" (* "*") (identifier "piVar4")) (= "=") (identifier "iVar2")) (; ";")) (} "}")) (else_clause "else {\n      do {\n        uVar6 = read(__fd,auStack_2028,0x2000);\n        iVar3 = (int)uVar6;\n        if (iVar3 < 1) {\n          iVar1 = *piVar4;\n          close(__fd);\n          close(iVar2);\n          if (iVar3 != 0) {\n            *piVar4 = iVar1;\n            return 0xffffffff;\n          }\n          return uVar6 & 0xffffffff;\n        }\n        sVar5 = write(iVar2,auStack_2028,(long)iVar3);\n      } while (sVar5 == (long)iVar3);\n      iVar3 = *piVar4;\n      close(__fd);\n      close(iVar2);\n      *piVar4 = iVar3;\n    }" (else "else") (compound_statement "{\n      do {\n        uVar6 = read(__fd,auStack_2028,0x2000);\n        iVar3 = (int)uVar6;\n        if (iVar3 < 1) {\n          iVar1 = *piVar4;\n          close(__fd);\n          close(iVar2);\n          if (iVar3 != 0) {\n            *piVar4 = iVar1;\n            return 0xffffffff;\n          }\n          return uVar6 & 0xffffffff;\n        }\n        sVar5 = write(iVar2,auStack_2028,(long)iVar3);\n      } while (sVar5 == (long)iVar3);\n      iVar3 = *piVar4;\n      close(__fd);\n      close(iVar2);\n      *piVar4 = iVar3;\n    }" ({ "{") (do_statement "do {\n        uVar6 = read(__fd,auStack_2028,0x2000);\n        iVar3 = (int)uVar6;\n        if (iVar3 < 1) {\n          iVar1 = *piVar4;\n          close(__fd);\n          close(iVar2);\n          if (iVar3 != 0) {\n            *piVar4 = iVar1;\n            return 0xffffffff;\n          }\n          return uVar6 & 0xffffffff;\n        }\n        sVar5 = write(iVar2,auStack_2028,(long)iVar3);\n      } while (sVar5 == (long)iVar3);" (do "do") (compound_statement "{\n        uVar6 = read(__fd,auStack_2028,0x2000);\n        iVar3 = (int)uVar6;\n        if (iVar3 < 1) {\n          iVar1 = *piVar4;\n          close(__fd);\n          close(iVar2);\n          if (iVar3 != 0) {\n            *piVar4 = iVar1;\n            return 0xffffffff;\n          }\n          return uVar6 & 0xffffffff;\n        }\n        sVar5 = write(iVar2,auStack_2028,(long)iVar3);\n      }" ({ "{") (expression_statement "uVar6 = read(__fd,auStack_2028,0x2000);" (assignment_expression "uVar6 = read(__fd,auStack_2028,0x2000)" (identifier "uVar6") (= "=") (call_expression "read(__fd,auStack_2028,0x2000)" (identifier "read") (argument_list "(__fd,auStack_2028,0x2000)" (( "(") (identifier "__fd") (, ",") (identifier "auStack_2028") (, ",") (number_literal "0x2000") () ")")))) (; ";")) (expression_statement "iVar3 = (int)uVar6;" (assignment_expression "iVar3 = (int)uVar6" (identifier "iVar3") (= "=") (cast_expression "(int)uVar6" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "uVar6"))) (; ";")) (if_statement "if (iVar3 < 1) {\n          iVar1 = *piVar4;\n          close(__fd);\n          close(iVar2);\n          if (iVar3 != 0) {\n            *piVar4 = iVar1;\n            return 0xffffffff;\n          }\n          return uVar6 & 0xffffffff;\n        }" (if "if") (parenthesized_expression "(iVar3 < 1)" (( "(") (binary_expression "iVar3 < 1" (identifier "iVar3") (< "<") (number_literal "1")) () ")")) (compound_statement "{\n          iVar1 = *piVar4;\n          close(__fd);\n          close(iVar2);\n          if (iVar3 != 0) {\n            *piVar4 = iVar1;\n            return 0xffffffff;\n          }\n          return uVar6 & 0xffffffff;\n        }" ({ "{") (expression_statement "iVar1 = *piVar4;" (assignment_expression "iVar1 = *piVar4" (identifier "iVar1") (= "=") (pointer_expression "*piVar4" (* "*") (identifier "piVar4"))) (; ";")) (expression_statement "close(__fd);" (call_expression "close(__fd)" (identifier "close") (argument_list "(__fd)" (( "(") (identifier "__fd") () ")"))) (; ";")) (expression_statement "close(iVar2);" (call_expression "close(iVar2)" (identifier "close") (argument_list "(iVar2)" (( "(") (identifier "iVar2") () ")"))) (; ";")) (if_statement "if (iVar3 != 0) {\n            *piVar4 = iVar1;\n            return 0xffffffff;\n          }" (if "if") (parenthesized_expression "(iVar3 != 0)" (( "(") (binary_expression "iVar3 != 0" (identifier "iVar3") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n            *piVar4 = iVar1;\n            return 0xffffffff;\n          }" ({ "{") (expression_statement "*piVar4 = iVar1;" (assignment_expression "*piVar4 = iVar1" (pointer_expression "*piVar4" (* "*") (identifier "piVar4")) (= "=") (identifier "iVar1")) (; ";")) (return_statement "return 0xffffffff;" (return "return") (number_literal "0xffffffff") (; ";")) (} "}"))) (return_statement "return uVar6 & 0xffffffff;" (return "return") (binary_expression "uVar6 & 0xffffffff" (identifier "uVar6") (& "&") (number_literal "0xffffffff")) (; ";")) (} "}"))) (expression_statement "sVar5 = write(iVar2,auStack_2028,(long)iVar3);" (assignment_expression "sVar5 = write(iVar2,auStack_2028,(long)iVar3)" (identifier "sVar5") (= "=") (call_expression "write(iVar2,auStack_2028,(long)iVar3)" (identifier "write") (argument_list "(iVar2,auStack_2028,(long)iVar3)" (( "(") (identifier "iVar2") (, ",") (identifier "auStack_2028") (, ",") (cast_expression "(long)iVar3" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "iVar3")) () ")")))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(sVar5 == (long)iVar3)" (( "(") (binary_expression "sVar5 == (long)iVar3" (identifier "sVar5") (== "==") (cast_expression "(long)iVar3" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "iVar3"))) () ")")) (; ";")) (expression_statement "iVar3 = *piVar4;" (assignment_expression "iVar3 = *piVar4" (identifier "iVar3") (= "=") (pointer_expression "*piVar4" (* "*") (identifier "piVar4"))) (; ";")) (expression_statement "close(__fd);" (call_expression "close(__fd)" (identifier "close") (argument_list "(__fd)" (( "(") (identifier "__fd") () ")"))) (; ";")) (expression_statement "close(iVar2);" (call_expression "close(iVar2)" (identifier "close") (argument_list "(iVar2)" (( "(") (identifier "iVar2") () ")"))) (; ";")) (expression_statement "*piVar4 = iVar3;" (assignment_expression "*piVar4 = iVar3" (pointer_expression "*piVar4" (* "*") (identifier "piVar4")) (= "=") (identifier "iVar3")) (; ";")) (} "}")))) (} "}"))) (return_statement "return 0xffffffff;" (return "return") (number_literal "0xffffffff") (; ";")) (} "}")))

int function_1(char *from,char *to)

{
  int iVar1;
  int var_2;
  int var_4;
  int var_7;
  int *piVar4;
  size_t var_9;
  ssize_t sVar6;
  char buf [8192];
  
  var_2 = var_1(from,0);
  if (-1 < var_2) {
    var_4 = var_1(to,0x241,0x1ff);
    piVar4 = var_3();
    if (var_4 < 0) {
      var_4 = *piVar4;
      var_5(var_2);
      *piVar4 = var_4;
    }
    else {
      do {
        sVar6 = var_6(var_2,buf,0x2000);
        var_7 = (int)sVar6;
        if (var_7 < 1) {
          iVar1 = *piVar4;
          var_5(var_2);
          var_5(var_4);
          if (var_7 != 0) {
            *piVar4 = iVar1;
            return -1;
          }
          return 0;
        }
        var_9 = var_8(var_4,buf,(long)var_7);
      } while (var_9 == (long)var_7);
      var_7 = *piVar4;
      var_5(var_2);
      var_5(var_4);
      *piVar4 = var_7;
    }
  }
  return -1;
}


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

ulong MASKED(char *param_1,char *param_2)

{
  int iVar1;
  int __fd;
  int iVar2;
  int iVar3;
  int *piVar4;
  size_t sVar5;
  ulong uVar6;
  undefined1 auStack_2028 [8192];
  
  __fd = open(param_1,0);
  if (-1 < __fd) {
    iVar2 = open(param_2,0x241,0x1ff);
    piVar4 = __errno_location();
    if (iVar2 < 0) {
      iVar2 = *piVar4;
      close(__fd);
      *piVar4 = iVar2;
    }
    else {
      do {
        uVar6 = read(__fd,auStack_2028,0x2000);
        iVar3 = (int)uVar6;
        if (iVar3 < 1) {
          iVar1 = *piVar4;
          close(__fd);
          close(iVar2);
          if (iVar3 != 0) {
            *piVar4 = iVar1;
            return 0xffffffff;
          }
          return uVar6 & 0xffffffff;
        }
        sVar5 = write(iVar2,auStack_2028,(long)iVar3);
      } while (sVar5 == (long)iVar3);
      iVar3 = *piVar4;
      close(__fd);
      close(iVar2);
      *piVar4 = iVar3;
    }
  }
  return 0xffffffff;
}

