
int mkswap_main(int argc,char **argv)

{
  long lVar1;
  int fd;
  uint uVar2;
  long lVar3;
  uoff_t uVar4;
  ulong uVar5;
  long in_FS_OFFSET;
  char *label;
  char uuid_string [32];
  
  lVar1 = *(long *)(in_FS_OFFSET + 0x28);
  label = "";
  getopt32(argv,"^L:",&label);
  lVar3 = (long)optind;
  fd = xopen(argv[lVar3],1);
  uVar4 = get_volume_size_in_bytes(fd,(argv + lVar3)[1],0x400,1);
  uVar2 = getpagesize();
  uVar5 = uVar4 - uVar2;
  __printf_chk(1,"Setting up swapspace version 1, size = %lu bytes\n",uVar5);
  xwrite(fd,&bb_common_bufsiz1,0x400);
  bb_common_bufsiz1 = 1;
  DAT_001c65fc = (undefined4)(uVar5 / uVar2);
  generate_uuid((uint8_t *)&DAT_001c6604);
  bin2hex(uuid_string,(char *)&DAT_001c6604,0x10);
  __printf_chk(1,"UUID=%.8s-%.4s-%.4s-%.4s-%.12s\n",uuid_string,uuid_string + 8,uuid_string + 0xc,
               uuid_string + 0x10,uuid_string + 0x14);
  safe_strncpy((char *)((long)&DAT_001c6610 + 4),label,0x10);
  xwrite(fd,&bb_common_bufsiz1,0x204);
  xlseek(fd,(ulong)(uVar2 - 10),0);
  xwrite(fd,"SWAPSPACE2",10);
  fsync(fd);
  if (lVar1 != *(long *)(in_FS_OFFSET + 0x28)) {
                    /* WARNING: Subroutine does not return */
    __stack_chk_fail();
  }
  return 0;
}



/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */

undefined8 FUN_0015c540(undefined8 param_1,long param_2)

{
  undefined8 *puVar1;
  int __fd;
  uint uVar2;
  long lVar3;
  ulong uVar4;
  long in_FS_OFFSET;
  undefined1 *local_60;
  undefined1 local_58 [8];
  undefined1 local_50 [4];
  undefined1 local_4c [4];
  undefined1 local_48 [4];
  undefined1 local_44 [20];
  long local_30;
  
  local_30 = *(long *)(in_FS_OFFSET + 0x28);
  local_60 = &DAT_001c0d09;
  FUN_0019c219(param_2,&DAT_001bd2f0,&local_60);
  puVar1 = (undefined8 *)(param_2 + (long)optind * 8);
  __fd = FUN_0010e707(*puVar1,1);
  lVar3 = FUN_0019b9b9(__fd,puVar1[1],0x400,1);
  uVar2 = getpagesize();
  uVar4 = lVar3 - (ulong)uVar2;
  __printf_chk(1,"Setting up swapspace version 1, size = %lu bytes\n",uVar4);
  FUN_0010e824(__fd,&DAT_001c65f8,0x400);
  DAT_001c65f8 = 1;
  _DAT_001c65fc = (undefined4)(uVar4 / uVar2);
  FUN_0010ef61(&DAT_001c6604);
  FUN_0010dfe9(local_58,&DAT_001c6604,0x10);
  __printf_chk(1,"UUID=%.8s-%.4s-%.4s-%.4s-%.12s\n",local_58,local_50,local_4c,local_48,local_44);
  FUN_001a49d0(0x1c6614,local_60,0x10);
  FUN_0010e824(__fd,&DAT_001c65f8,0x204);
  FUN_0010e8a3(__fd,uVar2 - 10,0);
  FUN_0010e824(__fd,"SWAPSPACE2dflsu",10);
  fsync(__fd);
  if (local_30 != *(long *)(in_FS_OFFSET + 0x28)) {
                    /* WARNING: Subroutine does not return */
    __stack_chk_fail();
  }
  return 0;
}


PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x40
MOV RBX,RSI
MOV R12D,0x28
MOV RAX,qword ptr FS:[R12]
MOV qword ptr [RSP + 0x38],RAX
XOR EAX,EAX
LEA RAX,[0x1c0d09]
MOV qword ptr [RSP + 0x8],RAX
LEA RDX,[RSP + 0x8]
LEA RSI,[0x1bd2f0]
MOV RDI,RBX
MOV EAX,0x0
CALL 0x0019c219
MOVSXD RAX,dword ptr [0x001c62b8]
LEA RBX,[RBX + RAX*0x8]
MOV ESI,0x1
MOV RDI,qword ptr [RBX]
CALL 0x0010e707
MOV EBP,EAX
MOV RSI,qword ptr [RBX + 0x8]
MOV ECX,0x1
MOV EDX,0x400
MOV EDI,EAX
CALL 0x0019b9b9
MOV RBX,RAX
CALL 0x0010c310
MOV R13D,EAX
MOV R14D,EAX
SUB RBX,R14
MOV RDX,RBX
LEA RSI,[0x1ac4b8]
MOV EDI,0x1
MOV EAX,0x0
CALL 0x0010bf80
MOV EDX,0x400
LEA RSI,[0x1c65f8]
MOV EDI,EBP
CALL 0x0010e824
MOV dword ptr [0x001c65f8],0x1
MOV RAX,RBX
MOV EDX,0x0
DIV R14
MOV dword ptr [0x001c65fc],EAX
LEA RDI,[0x1c6604]
CALL 0x0010ef61
LEA RBX,[RSP + 0x10]
MOV EDX,0x10
LEA RSI,[0x1c6604]
MOV RDI,RBX
CALL 0x0010dfe9
LEA RCX,[RBX + 0x8]
SUB RSP,0x8
LEA RAX,[RBX + 0x14]
PUSH RAX
LEA R9,[RBX + 0x10]
LEA R8,[RBX + 0xc]
MOV RDX,RBX
LEA RSI,[0x1ac4f0]
MOV EDI,0x1
MOV EAX,0x0
CALL 0x0010bf80
MOV EDX,0x10
MOV RSI,qword ptr [RSP + 0x18]
LEA RDI,[0x1c6614]
CALL 0x001a49d0
MOV EDX,0x204
LEA RSI,[0x1c65f8]
MOV EDI,EBP
CALL 0x0010e824
LEA ESI,[R13 + -0xa]
MOV EDX,0x0
MOV EDI,EBP
CALL 0x0010e8a3
MOV EDX,0xa
LEA RSI,[0x1bd2f7]
MOV EDI,EBP
CALL 0x0010e824
MOV EDI,EBP
CALL 0x0010c070
ADD RSP,0x10
MOV RCX,qword ptr [RSP + 0x38]
XOR RCX,qword ptr FS:[R12]
JZ 0x0015c6c8
CALL 0x0010b500
MOV EAX,0x0
ADD RSP,0x40
POP RBX
POP RBP
POP R12
POP R13
POP R14
RET
(translation_unit "/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */\n\nundefined8 FUN_0015c540(undefined8 param_1,long param_2)\n\n{\n  undefined8 *puVar1;\n  int __fd;\n  uint uVar2;\n  long lVar3;\n  ulong uVar4;\n  long in_FS_OFFSET;\n  undefined1 *local_60;\n  undefined1 local_58 [8];\n  undefined1 local_50 [4];\n  undefined1 local_4c [4];\n  undefined1 local_48 [4];\n  undefined1 local_44 [20];\n  long local_30;\n  \n  local_30 = *(long *)(in_FS_OFFSET + 0x28);\n  local_60 = &DAT_001c0d09;\n  FUN_0019c219(param_2,&DAT_001bd2f0,&local_60);\n  puVar1 = (undefined8 *)(param_2 + (long)optind * 8);\n  __fd = FUN_0010e707(*puVar1,1);\n  lVar3 = FUN_0019b9b9(__fd,puVar1[1],0x400,1);\n  uVar2 = getpagesize();\n  uVar4 = lVar3 - (ulong)uVar2;\n  __printf_chk(1,"Setting up swapspace version 1, size = %lu bytes\n",uVar4);\n  FUN_0010e824(__fd,&DAT_001c65f8,0x400);\n  DAT_001c65f8 = 1;\n  _DAT_001c65fc = (undefined4)(uVar4 / uVar2);\n  FUN_0010ef61(&DAT_001c6604);\n  FUN_0010dfe9(local_58,&DAT_001c6604,0x10);\n  __printf_chk(1,"UUID=%.8s-%.4s-%.4s-%.4s-%.12s\n",local_58,local_50,local_4c,local_48,local_44);\n  FUN_001a49d0(0x1c6614,local_60,0x10);\n  FUN_0010e824(__fd,&DAT_001c65f8,0x204);\n  FUN_0010e8a3(__fd,uVar2 - 10,0);\n  FUN_0010e824(__fd,"SWAPSPACE2dflsu",10);\n  fsync(__fd);\n  if (local_30 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail();\n  }\n  return 0;\n}\n\n" comment (function_definition "undefined8 FUN_0015c540(undefined8 param_1,long param_2)\n\n{\n  undefined8 *puVar1;\n  int __fd;\n  uint uVar2;\n  long lVar3;\n  ulong uVar4;\n  long in_FS_OFFSET;\n  undefined1 *local_60;\n  undefined1 local_58 [8];\n  undefined1 local_50 [4];\n  undefined1 local_4c [4];\n  undefined1 local_48 [4];\n  undefined1 local_44 [20];\n  long local_30;\n  \n  local_30 = *(long *)(in_FS_OFFSET + 0x28);\n  local_60 = &DAT_001c0d09;\n  FUN_0019c219(param_2,&DAT_001bd2f0,&local_60);\n  puVar1 = (undefined8 *)(param_2 + (long)optind * 8);\n  __fd = FUN_0010e707(*puVar1,1);\n  lVar3 = FUN_0019b9b9(__fd,puVar1[1],0x400,1);\n  uVar2 = getpagesize();\n  uVar4 = lVar3 - (ulong)uVar2;\n  __printf_chk(1,"Setting up swapspace version 1, size = %lu bytes\n",uVar4);\n  FUN_0010e824(__fd,&DAT_001c65f8,0x400);\n  DAT_001c65f8 = 1;\n  _DAT_001c65fc = (undefined4)(uVar4 / uVar2);\n  FUN_0010ef61(&DAT_001c6604);\n  FUN_0010dfe9(local_58,&DAT_001c6604,0x10);\n  __printf_chk(1,"UUID=%.8s-%.4s-%.4s-%.4s-%.12s\n",local_58,local_50,local_4c,local_48,local_44);\n  FUN_001a49d0(0x1c6614,local_60,0x10);\n  FUN_0010e824(__fd,&DAT_001c65f8,0x204);\n  FUN_0010e8a3(__fd,uVar2 - 10,0);\n  FUN_0010e824(__fd,"SWAPSPACE2dflsu",10);\n  fsync(__fd);\n  if (local_30 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail();\n  }\n  return 0;\n}" type_identifier (function_declarator "FUN_0015c540(undefined8 param_1,long param_2)" identifier (parameter_list "(undefined8 param_1,long param_2)" ( (parameter_declaration "undefined8 param_1" type_identifier identifier) , (parameter_declaration "long param_2" (sized_type_specifier "long" long) identifier) ))) (compound_statement "{\n  undefined8 *puVar1;\n  int __fd;\n  uint uVar2;\n  long lVar3;\n  ulong uVar4;\n  long in_FS_OFFSET;\n  undefined1 *local_60;\n  undefined1 local_58 [8];\n  undefined1 local_50 [4];\n  undefined1 local_4c [4];\n  undefined1 local_48 [4];\n  undefined1 local_44 [20];\n  long local_30;\n  \n  local_30 = *(long *)(in_FS_OFFSET + 0x28);\n  local_60 = &DAT_001c0d09;\n  FUN_0019c219(param_2,&DAT_001bd2f0,&local_60);\n  puVar1 = (undefined8 *)(param_2 + (long)optind * 8);\n  __fd = FUN_0010e707(*puVar1,1);\n  lVar3 = FUN_0019b9b9(__fd,puVar1[1],0x400,1);\n  uVar2 = getpagesize();\n  uVar4 = lVar3 - (ulong)uVar2;\n  __printf_chk(1,"Setting up swapspace version 1, size = %lu bytes\n",uVar4);\n  FUN_0010e824(__fd,&DAT_001c65f8,0x400);\n  DAT_001c65f8 = 1;\n  _DAT_001c65fc = (undefined4)(uVar4 / uVar2);\n  FUN_0010ef61(&DAT_001c6604);\n  FUN_0010dfe9(local_58,&DAT_001c6604,0x10);\n  __printf_chk(1,"UUID=%.8s-%.4s-%.4s-%.4s-%.12s\n",local_58,local_50,local_4c,local_48,local_44);\n  FUN_001a49d0(0x1c6614,local_60,0x10);\n  FUN_0010e824(__fd,&DAT_001c65f8,0x204);\n  FUN_0010e8a3(__fd,uVar2 - 10,0);\n  FUN_0010e824(__fd,"SWAPSPACE2dflsu",10);\n  fsync(__fd);\n  if (local_30 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail();\n  }\n  return 0;\n}" { (declaration "undefined8 *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "int __fd;" primitive_type identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "long lVar3;" (sized_type_specifier "long" long) identifier ;) (declaration "ulong uVar4;" type_identifier identifier ;) (declaration "long in_FS_OFFSET;" (sized_type_specifier "long" long) identifier ;) (declaration "undefined1 *local_60;" type_identifier (pointer_declarator "*local_60" * identifier) ;) (declaration "undefined1 local_58 [8];" type_identifier (array_declarator "local_58 [8]" identifier [ number_literal ]) ;) (declaration "undefined1 local_50 [4];" type_identifier (array_declarator "local_50 [4]" identifier [ number_literal ]) ;) (declaration "undefined1 local_4c [4];" type_identifier (array_declarator "local_4c [4]" identifier [ number_literal ]) ;) (declaration "undefined1 local_48 [4];" type_identifier (array_declarator "local_48 [4]" identifier [ number_literal ]) ;) (declaration "undefined1 local_44 [20];" type_identifier (array_declarator "local_44 [20]" identifier [ number_literal ]) ;) (declaration "long local_30;" (sized_type_specifier "long" long) identifier ;) (expression_statement "local_30 = *(long *)(in_FS_OFFSET + 0x28);" (assignment_expression "local_30 = *(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 "local_60 = &DAT_001c0d09;" (assignment_expression "local_60 = &DAT_001c0d09" identifier = (pointer_expression "&DAT_001c0d09" & identifier)) ;) (expression_statement "FUN_0019c219(param_2,&DAT_001bd2f0,&local_60);" (call_expression "FUN_0019c219(param_2,&DAT_001bd2f0,&local_60)" identifier (argument_list "(param_2,&DAT_001bd2f0,&local_60)" ( identifier , (pointer_expression "&DAT_001bd2f0" & identifier) , (pointer_expression "&local_60" & identifier) ))) ;) (expression_statement "puVar1 = (undefined8 *)(param_2 + (long)optind * 8);" (assignment_expression "puVar1 = (undefined8 *)(param_2 + (long)optind * 8)" identifier = (cast_expression "(undefined8 *)(param_2 + (long)optind * 8)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + (long)optind * 8)" ( (binary_expression "param_2 + (long)optind * 8" identifier + (binary_expression "(long)optind * 8" (cast_expression "(long)optind" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) * number_literal)) )))) ;) (expression_statement "__fd = FUN_0010e707(*puVar1,1);" (assignment_expression "__fd = FUN_0010e707(*puVar1,1)" identifier = (call_expression "FUN_0010e707(*puVar1,1)" identifier (argument_list "(*puVar1,1)" ( (pointer_expression "*puVar1" * identifier) , number_literal )))) ;) (expression_statement "lVar3 = FUN_0019b9b9(__fd,puVar1[1],0x400,1);" (assignment_expression "lVar3 = FUN_0019b9b9(__fd,puVar1[1],0x400,1)" identifier = (call_expression "FUN_0019b9b9(__fd,puVar1[1],0x400,1)" identifier (argument_list "(__fd,puVar1[1],0x400,1)" ( identifier , (subscript_expression "puVar1[1]" identifier [ number_literal ]) , number_literal , number_literal )))) ;) (expression_statement "uVar2 = getpagesize();" (assignment_expression "uVar2 = getpagesize()" identifier = (call_expression "getpagesize()" identifier (argument_list "()" ( )))) ;) (expression_statement "uVar4 = lVar3 - (ulong)uVar2;" (assignment_expression "uVar4 = lVar3 - (ulong)uVar2" identifier = (binary_expression "lVar3 - (ulong)uVar2" identifier - (cast_expression "(ulong)uVar2" ( (type_descriptor "ulong" type_identifier) ) identifier))) ;) (expression_statement "__printf_chk(1,"Setting up swapspace version 1, size = %lu bytes\n",uVar4);" (call_expression "__printf_chk(1,"Setting up swapspace version 1, size = %lu bytes\n",uVar4)" identifier (argument_list "(1,"Setting up swapspace version 1, size = %lu bytes\n",uVar4)" ( number_literal , (string_literal ""Setting up swapspace version 1, size = %lu bytes\n"" " string_content escape_sequence ") , identifier ))) ;) (expression_statement "FUN_0010e824(__fd,&DAT_001c65f8,0x400);" (call_expression "FUN_0010e824(__fd,&DAT_001c65f8,0x400)" identifier (argument_list "(__fd,&DAT_001c65f8,0x400)" ( identifier , (pointer_expression "&DAT_001c65f8" & identifier) , number_literal ))) ;) (expression_statement "DAT_001c65f8 = 1;" (assignment_expression "DAT_001c65f8 = 1" identifier = number_literal) ;) (expression_statement "_DAT_001c65fc = (undefined4)(uVar4 / uVar2);" (assignment_expression "_DAT_001c65fc = (undefined4)(uVar4 / uVar2)" identifier = (call_expression "(undefined4)(uVar4 / uVar2)" (parenthesized_expression "(undefined4)" ( identifier )) (argument_list "(uVar4 / uVar2)" ( (binary_expression "uVar4 / uVar2" identifier / identifier) )))) ;) (expression_statement "FUN_0010ef61(&DAT_001c6604);" (call_expression "FUN_0010ef61(&DAT_001c6604)" identifier (argument_list "(&DAT_001c6604)" ( (pointer_expression "&DAT_001c6604" & identifier) ))) ;) (expression_statement "FUN_0010dfe9(local_58,&DAT_001c6604,0x10);" (call_expression "FUN_0010dfe9(local_58,&DAT_001c6604,0x10)" identifier (argument_list "(local_58,&DAT_001c6604,0x10)" ( identifier , (pointer_expression "&DAT_001c6604" & identifier) , number_literal ))) ;) (expression_statement "__printf_chk(1,"UUID=%.8s-%.4s-%.4s-%.4s-%.12s\n",local_58,local_50,local_4c,local_48,local_44);" (call_expression "__printf_chk(1,"UUID=%.8s-%.4s-%.4s-%.4s-%.12s\n",local_58,local_50,local_4c,local_48,local_44)" identifier (argument_list "(1,"UUID=%.8s-%.4s-%.4s-%.4s-%.12s\n",local_58,local_50,local_4c,local_48,local_44)" ( number_literal , (string_literal ""UUID=%.8s-%.4s-%.4s-%.4s-%.12s\n"" " string_content escape_sequence ") , identifier , identifier , identifier , identifier , identifier ))) ;) (expression_statement "FUN_001a49d0(0x1c6614,local_60,0x10);" (call_expression "FUN_001a49d0(0x1c6614,local_60,0x10)" identifier (argument_list "(0x1c6614,local_60,0x10)" ( number_literal , identifier , number_literal ))) ;) (expression_statement "FUN_0010e824(__fd,&DAT_001c65f8,0x204);" (call_expression "FUN_0010e824(__fd,&DAT_001c65f8,0x204)" identifier (argument_list "(__fd,&DAT_001c65f8,0x204)" ( identifier , (pointer_expression "&DAT_001c65f8" & identifier) , number_literal ))) ;) (expression_statement "FUN_0010e8a3(__fd,uVar2 - 10,0);" (call_expression "FUN_0010e8a3(__fd,uVar2 - 10,0)" identifier (argument_list "(__fd,uVar2 - 10,0)" ( identifier , (binary_expression "uVar2 - 10" identifier - number_literal) , number_literal ))) ;) (expression_statement "FUN_0010e824(__fd,"SWAPSPACE2dflsu",10);" (call_expression "FUN_0010e824(__fd,"SWAPSPACE2dflsu",10)" identifier (argument_list "(__fd,"SWAPSPACE2dflsu",10)" ( identifier , (string_literal ""SWAPSPACE2dflsu"" " string_content ") , number_literal ))) ;) (expression_statement "fsync(__fd);" (call_expression "fsync(__fd)" identifier (argument_list "(__fd)" ( identifier ))) ;) (if_statement "if (local_30 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail();\n  }" if (parenthesized_expression "(local_30 != *(long *)(in_FS_OFFSET + 0x28))" ( (binary_expression "local_30 != *(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                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail();\n  }" { comment (expression_statement "__stack_chk_fail();" (call_expression "__stack_chk_fail()" identifier (argument_list "()" ( ))) ;) })) (return_statement "return 0;" return number_literal ;) })))
(translation_unit "int mkswap_main(int argc,char **argv)\n\n{\n  long lVar1;\n  int fd;\n  uint uVar2;\n  long lVar3;\n  uoff_t uVar4;\n  ulong uVar5;\n  long in_FS_OFFSET;\n  char *label;\n  char uuid_string [32];\n  \n  lVar1 = *(long *)(in_FS_OFFSET + 0x28);\n  label = "";\n  getopt32(argv,"^L:",&label);\n  lVar3 = (long)optind;\n  fd = xopen(argv[lVar3],1);\n  uVar4 = get_volume_size_in_bytes(fd,(argv + lVar3)[1],0x400,1);\n  uVar2 = getpagesize();\n  uVar5 = uVar4 - uVar2;\n  __printf_chk(1,"Setting up swapspace version 1, size = %lu bytes\n",uVar5);\n  xwrite(fd,&bb_common_bufsiz1,0x400);\n  bb_common_bufsiz1 = 1;\n  DAT_001c65fc = (undefined4)(uVar5 / uVar2);\n  generate_uuid((uint8_t *)&DAT_001c6604);\n  bin2hex(uuid_string,(char *)&DAT_001c6604,0x10);\n  __printf_chk(1,"UUID=%.8s-%.4s-%.4s-%.4s-%.12s\n",uuid_string,uuid_string + 8,uuid_string + 0xc,\n               uuid_string + 0x10,uuid_string + 0x14);\n  safe_strncpy((char *)((long)&DAT_001c6610 + 4),label,0x10);\n  xwrite(fd,&bb_common_bufsiz1,0x204);\n  xlseek(fd,(ulong)(uVar2 - 10),0);\n  xwrite(fd,"SWAPSPACE2",10);\n  fsync(fd);\n  if (lVar1 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail();\n  }\n  return 0;\n}\n\n" (function_definition "int mkswap_main(int argc,char **argv)\n\n{\n  long lVar1;\n  int fd;\n  uint uVar2;\n  long lVar3;\n  uoff_t uVar4;\n  ulong uVar5;\n  long in_FS_OFFSET;\n  char *label;\n  char uuid_string [32];\n  \n  lVar1 = *(long *)(in_FS_OFFSET + 0x28);\n  label = "";\n  getopt32(argv,"^L:",&label);\n  lVar3 = (long)optind;\n  fd = xopen(argv[lVar3],1);\n  uVar4 = get_volume_size_in_bytes(fd,(argv + lVar3)[1],0x400,1);\n  uVar2 = getpagesize();\n  uVar5 = uVar4 - uVar2;\n  __printf_chk(1,"Setting up swapspace version 1, size = %lu bytes\n",uVar5);\n  xwrite(fd,&bb_common_bufsiz1,0x400);\n  bb_common_bufsiz1 = 1;\n  DAT_001c65fc = (undefined4)(uVar5 / uVar2);\n  generate_uuid((uint8_t *)&DAT_001c6604);\n  bin2hex(uuid_string,(char *)&DAT_001c6604,0x10);\n  __printf_chk(1,"UUID=%.8s-%.4s-%.4s-%.4s-%.12s\n",uuid_string,uuid_string + 8,uuid_string + 0xc,\n               uuid_string + 0x10,uuid_string + 0x14);\n  safe_strncpy((char *)((long)&DAT_001c6610 + 4),label,0x10);\n  xwrite(fd,&bb_common_bufsiz1,0x204);\n  xlseek(fd,(ulong)(uVar2 - 10),0);\n  xwrite(fd,"SWAPSPACE2",10);\n  fsync(fd);\n  if (lVar1 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail();\n  }\n  return 0;\n}" primitive_type (function_declarator "mkswap_main(int argc,char **argv)" identifier (parameter_list "(int argc,char **argv)" ( (parameter_declaration "int argc" primitive_type identifier) , (parameter_declaration "char **argv" primitive_type (pointer_declarator "**argv" * (pointer_declarator "*argv" * identifier))) ))) (compound_statement "{\n  long lVar1;\n  int fd;\n  uint uVar2;\n  long lVar3;\n  uoff_t uVar4;\n  ulong uVar5;\n  long in_FS_OFFSET;\n  char *label;\n  char uuid_string [32];\n  \n  lVar1 = *(long *)(in_FS_OFFSET + 0x28);\n  label = "";\n  getopt32(argv,"^L:",&label);\n  lVar3 = (long)optind;\n  fd = xopen(argv[lVar3],1);\n  uVar4 = get_volume_size_in_bytes(fd,(argv + lVar3)[1],0x400,1);\n  uVar2 = getpagesize();\n  uVar5 = uVar4 - uVar2;\n  __printf_chk(1,"Setting up swapspace version 1, size = %lu bytes\n",uVar5);\n  xwrite(fd,&bb_common_bufsiz1,0x400);\n  bb_common_bufsiz1 = 1;\n  DAT_001c65fc = (undefined4)(uVar5 / uVar2);\n  generate_uuid((uint8_t *)&DAT_001c6604);\n  bin2hex(uuid_string,(char *)&DAT_001c6604,0x10);\n  __printf_chk(1,"UUID=%.8s-%.4s-%.4s-%.4s-%.12s\n",uuid_string,uuid_string + 8,uuid_string + 0xc,\n               uuid_string + 0x10,uuid_string + 0x14);\n  safe_strncpy((char *)((long)&DAT_001c6610 + 4),label,0x10);\n  xwrite(fd,&bb_common_bufsiz1,0x204);\n  xlseek(fd,(ulong)(uVar2 - 10),0);\n  xwrite(fd,"SWAPSPACE2",10);\n  fsync(fd);\n  if (lVar1 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail();\n  }\n  return 0;\n}" { (declaration "long lVar1;" (sized_type_specifier "long" long) identifier ;) (declaration "int fd;" primitive_type identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "long lVar3;" (sized_type_specifier "long" long) identifier ;) (declaration "uoff_t uVar4;" type_identifier identifier ;) (declaration "ulong uVar5;" type_identifier identifier ;) (declaration "long in_FS_OFFSET;" (sized_type_specifier "long" long) identifier ;) (declaration "char *label;" primitive_type (pointer_declarator "*label" * identifier) ;) (declaration "char uuid_string [32];" primitive_type (array_declarator "uuid_string [32]" 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 "label = "";" (assignment_expression "label = """ identifier = (string_literal """" " ")) ;) (expression_statement "getopt32(argv,"^L:",&label);" (call_expression "getopt32(argv,"^L:",&label)" identifier (argument_list "(argv,"^L:",&label)" ( identifier , (string_literal ""^L:"" " string_content ") , (pointer_expression "&label" & identifier) ))) ;) (expression_statement "lVar3 = (long)optind;" (assignment_expression "lVar3 = (long)optind" identifier = (cast_expression "(long)optind" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier)) ;) (expression_statement "fd = xopen(argv[lVar3],1);" (assignment_expression "fd = xopen(argv[lVar3],1)" identifier = (call_expression "xopen(argv[lVar3],1)" identifier (argument_list "(argv[lVar3],1)" ( (subscript_expression "argv[lVar3]" identifier [ identifier ]) , number_literal )))) ;) (expression_statement "uVar4 = get_volume_size_in_bytes(fd,(argv + lVar3)[1],0x400,1);" (assignment_expression "uVar4 = get_volume_size_in_bytes(fd,(argv + lVar3)[1],0x400,1)" identifier = (call_expression "get_volume_size_in_bytes(fd,(argv + lVar3)[1],0x400,1)" identifier (argument_list "(fd,(argv + lVar3)[1],0x400,1)" ( identifier , (subscript_expression "(argv + lVar3)[1]" (parenthesized_expression "(argv + lVar3)" ( (binary_expression "argv + lVar3" identifier + identifier) )) [ number_literal ]) , number_literal , number_literal )))) ;) (expression_statement "uVar2 = getpagesize();" (assignment_expression "uVar2 = getpagesize()" identifier = (call_expression "getpagesize()" identifier (argument_list "()" ( )))) ;) (expression_statement "uVar5 = uVar4 - uVar2;" (assignment_expression "uVar5 = uVar4 - uVar2" identifier = (binary_expression "uVar4 - uVar2" identifier - identifier)) ;) (expression_statement "__printf_chk(1,"Setting up swapspace version 1, size = %lu bytes\n",uVar5);" (call_expression "__printf_chk(1,"Setting up swapspace version 1, size = %lu bytes\n",uVar5)" identifier (argument_list "(1,"Setting up swapspace version 1, size = %lu bytes\n",uVar5)" ( number_literal , (string_literal ""Setting up swapspace version 1, size = %lu bytes\n"" " string_content escape_sequence ") , identifier ))) ;) (expression_statement "xwrite(fd,&bb_common_bufsiz1,0x400);" (call_expression "xwrite(fd,&bb_common_bufsiz1,0x400)" identifier (argument_list "(fd,&bb_common_bufsiz1,0x400)" ( identifier , (pointer_expression "&bb_common_bufsiz1" & identifier) , number_literal ))) ;) (expression_statement "bb_common_bufsiz1 = 1;" (assignment_expression "bb_common_bufsiz1 = 1" identifier = number_literal) ;) (expression_statement "DAT_001c65fc = (undefined4)(uVar5 / uVar2);" (assignment_expression "DAT_001c65fc = (undefined4)(uVar5 / uVar2)" identifier = (call_expression "(undefined4)(uVar5 / uVar2)" (parenthesized_expression "(undefined4)" ( identifier )) (argument_list "(uVar5 / uVar2)" ( (binary_expression "uVar5 / uVar2" identifier / identifier) )))) ;) (expression_statement "generate_uuid((uint8_t *)&DAT_001c6604);" (call_expression "generate_uuid((uint8_t *)&DAT_001c6604)" identifier (argument_list "((uint8_t *)&DAT_001c6604)" ( (cast_expression "(uint8_t *)&DAT_001c6604" ( (type_descriptor "uint8_t *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "&DAT_001c6604" & identifier)) ))) ;) (expression_statement "bin2hex(uuid_string,(char *)&DAT_001c6604,0x10);" (call_expression "bin2hex(uuid_string,(char *)&DAT_001c6604,0x10)" identifier (argument_list "(uuid_string,(char *)&DAT_001c6604,0x10)" ( identifier , (cast_expression "(char *)&DAT_001c6604" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "&DAT_001c6604" & identifier)) , number_literal ))) ;) (expression_statement "__printf_chk(1,"UUID=%.8s-%.4s-%.4s-%.4s-%.12s\n",uuid_string,uuid_string + 8,uuid_string + 0xc,\n               uuid_string + 0x10,uuid_string + 0x14);" (call_expression "__printf_chk(1,"UUID=%.8s-%.4s-%.4s-%.4s-%.12s\n",uuid_string,uuid_string + 8,uuid_string + 0xc,\n               uuid_string + 0x10,uuid_string + 0x14)" identifier (argument_list "(1,"UUID=%.8s-%.4s-%.4s-%.4s-%.12s\n",uuid_string,uuid_string + 8,uuid_string + 0xc,\n               uuid_string + 0x10,uuid_string + 0x14)" ( number_literal , (string_literal ""UUID=%.8s-%.4s-%.4s-%.4s-%.12s\n"" " string_content escape_sequence ") , identifier , (binary_expression "uuid_string + 8" identifier + number_literal) , (binary_expression "uuid_string + 0xc" identifier + number_literal) , (binary_expression "uuid_string + 0x10" identifier + number_literal) , (binary_expression "uuid_string + 0x14" identifier + number_literal) ))) ;) (expression_statement "safe_strncpy((char *)((long)&DAT_001c6610 + 4),label,0x10);" (call_expression "safe_strncpy((char *)((long)&DAT_001c6610 + 4),label,0x10)" identifier (argument_list "((char *)((long)&DAT_001c6610 + 4),label,0x10)" ( (cast_expression "(char *)((long)&DAT_001c6610 + 4)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)&DAT_001c6610 + 4)" ( (binary_expression "(long)&DAT_001c6610 + 4" (cast_expression "(long)&DAT_001c6610" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (pointer_expression "&DAT_001c6610" & identifier)) + number_literal) ))) , identifier , number_literal ))) ;) (expression_statement "xwrite(fd,&bb_common_bufsiz1,0x204);" (call_expression "xwrite(fd,&bb_common_bufsiz1,0x204)" identifier (argument_list "(fd,&bb_common_bufsiz1,0x204)" ( identifier , (pointer_expression "&bb_common_bufsiz1" & identifier) , number_literal ))) ;) (expression_statement "xlseek(fd,(ulong)(uVar2 - 10),0);" (call_expression "xlseek(fd,(ulong)(uVar2 - 10),0)" identifier (argument_list "(fd,(ulong)(uVar2 - 10),0)" ( identifier , (call_expression "(ulong)(uVar2 - 10)" (parenthesized_expression "(ulong)" ( identifier )) (argument_list "(uVar2 - 10)" ( (binary_expression "uVar2 - 10" identifier - number_literal) ))) , number_literal ))) ;) (expression_statement "xwrite(fd,"SWAPSPACE2",10);" (call_expression "xwrite(fd,"SWAPSPACE2",10)" identifier (argument_list "(fd,"SWAPSPACE2",10)" ( identifier , (string_literal ""SWAPSPACE2"" " string_content ") , number_literal ))) ;) (expression_statement "fsync(fd);" (call_expression "fsync(fd)" identifier (argument_list "(fd)" ( identifier ))) ;) (if_statement "if (lVar1 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail();\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                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail();\n  }" { comment (expression_statement "__stack_chk_fail();" (call_expression "__stack_chk_fail()" identifier (argument_list "()" ( ))) ;) })) (return_statement "return 0;" return number_literal ;) })))
(translation_unit "undefined8 FUN_0015c540(undefined8 param_1,long param_2)\n\n{\n  undefined8 *puVar1;\n  int __fd;\n  uint uVar2;\n  long lVar3;\n  ulong uVar4;\n  long in_FS_OFFSET;\n  undefined1 *local_60;\n  undefined1 local_58 [8];\n  undefined1 local_50 [4];\n  undefined1 local_4c [4];\n  undefined1 local_48 [4];\n  undefined1 local_44 [20];\n  long local_30;\n  \n  local_30 = *(long *)(in_FS_OFFSET + 0x28);\n  local_60 = &DAT_001c0d09;\n  FUN_0019c219(param_2,&DAT_001bd2f0,&local_60);\n  puVar1 = (undefined8 *)(param_2 + (long)optind * 8);\n  __fd = FUN_0010e707(*puVar1,1);\n  lVar3 = FUN_0019b9b9(__fd,puVar1[1],0x400,1);\n  uVar2 = getpagesize();\n  uVar4 = lVar3 - (ulong)uVar2;\n  __printf_chk(1,"Setting up swapspace version 1, size = %lu bytes\n",uVar4);\n  FUN_0010e824(__fd,&DAT_001c65f8,0x400);\n  DAT_001c65f8 = 1;\n  _DAT_001c65fc = (undefined4)(uVar4 / uVar2);\n  FUN_0010ef61(&DAT_001c6604);\n  FUN_0010dfe9(local_58,&DAT_001c6604,0x10);\n  __printf_chk(1,"UUID=%.8s-%.4s-%.4s-%.4s-%.12s\n",local_58,local_50,local_4c,local_48,local_44);\n  FUN_001a49d0(0x1c6614,local_60,0x10);\n  FUN_0010e824(__fd,&DAT_001c65f8,0x204);\n  FUN_0010e8a3(__fd,uVar2 - 10,0);\n  FUN_0010e824(__fd,"SWAPSPACE2dflsu",10);\n  fsync(__fd);\n  if (local_30 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    \n    __stack_chk_fail();\n  }\n  return 0;\n}\n\n" (function_definition "undefined8 FUN_0015c540(undefined8 param_1,long param_2)\n\n{\n  undefined8 *puVar1;\n  int __fd;\n  uint uVar2;\n  long lVar3;\n  ulong uVar4;\n  long in_FS_OFFSET;\n  undefined1 *local_60;\n  undefined1 local_58 [8];\n  undefined1 local_50 [4];\n  undefined1 local_4c [4];\n  undefined1 local_48 [4];\n  undefined1 local_44 [20];\n  long local_30;\n  \n  local_30 = *(long *)(in_FS_OFFSET + 0x28);\n  local_60 = &DAT_001c0d09;\n  FUN_0019c219(param_2,&DAT_001bd2f0,&local_60);\n  puVar1 = (undefined8 *)(param_2 + (long)optind * 8);\n  __fd = FUN_0010e707(*puVar1,1);\n  lVar3 = FUN_0019b9b9(__fd,puVar1[1],0x400,1);\n  uVar2 = getpagesize();\n  uVar4 = lVar3 - (ulong)uVar2;\n  __printf_chk(1,"Setting up swapspace version 1, size = %lu bytes\n",uVar4);\n  FUN_0010e824(__fd,&DAT_001c65f8,0x400);\n  DAT_001c65f8 = 1;\n  _DAT_001c65fc = (undefined4)(uVar4 / uVar2);\n  FUN_0010ef61(&DAT_001c6604);\n  FUN_0010dfe9(local_58,&DAT_001c6604,0x10);\n  __printf_chk(1,"UUID=%.8s-%.4s-%.4s-%.4s-%.12s\n",local_58,local_50,local_4c,local_48,local_44);\n  FUN_001a49d0(0x1c6614,local_60,0x10);\n  FUN_0010e824(__fd,&DAT_001c65f8,0x204);\n  FUN_0010e8a3(__fd,uVar2 - 10,0);\n  FUN_0010e824(__fd,"SWAPSPACE2dflsu",10);\n  fsync(__fd);\n  if (local_30 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    \n    __stack_chk_fail();\n  }\n  return 0;\n}" type_identifier (function_declarator "FUN_0015c540(undefined8 param_1,long param_2)" identifier (parameter_list "(undefined8 param_1,long param_2)" ( (parameter_declaration "undefined8 param_1" type_identifier identifier) , (parameter_declaration "long param_2" (sized_type_specifier "long" long) identifier) ))) (compound_statement "{\n  undefined8 *puVar1;\n  int __fd;\n  uint uVar2;\n  long lVar3;\n  ulong uVar4;\n  long in_FS_OFFSET;\n  undefined1 *local_60;\n  undefined1 local_58 [8];\n  undefined1 local_50 [4];\n  undefined1 local_4c [4];\n  undefined1 local_48 [4];\n  undefined1 local_44 [20];\n  long local_30;\n  \n  local_30 = *(long *)(in_FS_OFFSET + 0x28);\n  local_60 = &DAT_001c0d09;\n  FUN_0019c219(param_2,&DAT_001bd2f0,&local_60);\n  puVar1 = (undefined8 *)(param_2 + (long)optind * 8);\n  __fd = FUN_0010e707(*puVar1,1);\n  lVar3 = FUN_0019b9b9(__fd,puVar1[1],0x400,1);\n  uVar2 = getpagesize();\n  uVar4 = lVar3 - (ulong)uVar2;\n  __printf_chk(1,"Setting up swapspace version 1, size = %lu bytes\n",uVar4);\n  FUN_0010e824(__fd,&DAT_001c65f8,0x400);\n  DAT_001c65f8 = 1;\n  _DAT_001c65fc = (undefined4)(uVar4 / uVar2);\n  FUN_0010ef61(&DAT_001c6604);\n  FUN_0010dfe9(local_58,&DAT_001c6604,0x10);\n  __printf_chk(1,"UUID=%.8s-%.4s-%.4s-%.4s-%.12s\n",local_58,local_50,local_4c,local_48,local_44);\n  FUN_001a49d0(0x1c6614,local_60,0x10);\n  FUN_0010e824(__fd,&DAT_001c65f8,0x204);\n  FUN_0010e8a3(__fd,uVar2 - 10,0);\n  FUN_0010e824(__fd,"SWAPSPACE2dflsu",10);\n  fsync(__fd);\n  if (local_30 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    \n    __stack_chk_fail();\n  }\n  return 0;\n}" { (declaration "undefined8 *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "int __fd;" primitive_type identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "long lVar3;" (sized_type_specifier "long" long) identifier ;) (declaration "ulong uVar4;" type_identifier identifier ;) (declaration "long in_FS_OFFSET;" (sized_type_specifier "long" long) identifier ;) (declaration "undefined1 *local_60;" type_identifier (pointer_declarator "*local_60" * identifier) ;) (declaration "undefined1 local_58 [8];" type_identifier (array_declarator "local_58 [8]" identifier [ number_literal ]) ;) (declaration "undefined1 local_50 [4];" type_identifier (array_declarator "local_50 [4]" identifier [ number_literal ]) ;) (declaration "undefined1 local_4c [4];" type_identifier (array_declarator "local_4c [4]" identifier [ number_literal ]) ;) (declaration "undefined1 local_48 [4];" type_identifier (array_declarator "local_48 [4]" identifier [ number_literal ]) ;) (declaration "undefined1 local_44 [20];" type_identifier (array_declarator "local_44 [20]" identifier [ number_literal ]) ;) (declaration "long local_30;" (sized_type_specifier "long" long) identifier ;) (expression_statement "local_30 = *(long *)(in_FS_OFFSET + 0x28);" (assignment_expression "local_30 = *(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 "local_60 = &DAT_001c0d09;" (assignment_expression "local_60 = &DAT_001c0d09" identifier = (pointer_expression "&DAT_001c0d09" & identifier)) ;) (expression_statement "FUN_0019c219(param_2,&DAT_001bd2f0,&local_60);" (call_expression "FUN_0019c219(param_2,&DAT_001bd2f0,&local_60)" identifier (argument_list "(param_2,&DAT_001bd2f0,&local_60)" ( identifier , (pointer_expression "&DAT_001bd2f0" & identifier) , (pointer_expression "&local_60" & identifier) ))) ;) (expression_statement "puVar1 = (undefined8 *)(param_2 + (long)optind * 8);" (assignment_expression "puVar1 = (undefined8 *)(param_2 + (long)optind * 8)" identifier = (cast_expression "(undefined8 *)(param_2 + (long)optind * 8)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + (long)optind * 8)" ( (binary_expression "param_2 + (long)optind * 8" identifier + (binary_expression "(long)optind * 8" (cast_expression "(long)optind" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) * number_literal)) )))) ;) (expression_statement "__fd = FUN_0010e707(*puVar1,1);" (assignment_expression "__fd = FUN_0010e707(*puVar1,1)" identifier = (call_expression "FUN_0010e707(*puVar1,1)" identifier (argument_list "(*puVar1,1)" ( (pointer_expression "*puVar1" * identifier) , number_literal )))) ;) (expression_statement "lVar3 = FUN_0019b9b9(__fd,puVar1[1],0x400,1);" (assignment_expression "lVar3 = FUN_0019b9b9(__fd,puVar1[1],0x400,1)" identifier = (call_expression "FUN_0019b9b9(__fd,puVar1[1],0x400,1)" identifier (argument_list "(__fd,puVar1[1],0x400,1)" ( identifier , (subscript_expression "puVar1[1]" identifier [ number_literal ]) , number_literal , number_literal )))) ;) (expression_statement "uVar2 = getpagesize();" (assignment_expression "uVar2 = getpagesize()" identifier = (call_expression "getpagesize()" identifier (argument_list "()" ( )))) ;) (expression_statement "uVar4 = lVar3 - (ulong)uVar2;" (assignment_expression "uVar4 = lVar3 - (ulong)uVar2" identifier = (binary_expression "lVar3 - (ulong)uVar2" identifier - (cast_expression "(ulong)uVar2" ( (type_descriptor "ulong" type_identifier) ) identifier))) ;) (expression_statement "__printf_chk(1,"Setting up swapspace version 1, size = %lu bytes\n",uVar4);" (call_expression "__printf_chk(1,"Setting up swapspace version 1, size = %lu bytes\n",uVar4)" identifier (argument_list "(1,"Setting up swapspace version 1, size = %lu bytes\n",uVar4)" ( number_literal , (string_literal ""Setting up swapspace version 1, size = %lu bytes\n"" " string_content escape_sequence ") , identifier ))) ;) (expression_statement "FUN_0010e824(__fd,&DAT_001c65f8,0x400);" (call_expression "FUN_0010e824(__fd,&DAT_001c65f8,0x400)" identifier (argument_list "(__fd,&DAT_001c65f8,0x400)" ( identifier , (pointer_expression "&DAT_001c65f8" & identifier) , number_literal ))) ;) (expression_statement "DAT_001c65f8 = 1;" (assignment_expression "DAT_001c65f8 = 1" identifier = number_literal) ;) (expression_statement "_DAT_001c65fc = (undefined4)(uVar4 / uVar2);" (assignment_expression "_DAT_001c65fc = (undefined4)(uVar4 / uVar2)" identifier = (call_expression "(undefined4)(uVar4 / uVar2)" (parenthesized_expression "(undefined4)" ( identifier )) (argument_list "(uVar4 / uVar2)" ( (binary_expression "uVar4 / uVar2" identifier / identifier) )))) ;) (expression_statement "FUN_0010ef61(&DAT_001c6604);" (call_expression "FUN_0010ef61(&DAT_001c6604)" identifier (argument_list "(&DAT_001c6604)" ( (pointer_expression "&DAT_001c6604" & identifier) ))) ;) (expression_statement "FUN_0010dfe9(local_58,&DAT_001c6604,0x10);" (call_expression "FUN_0010dfe9(local_58,&DAT_001c6604,0x10)" identifier (argument_list "(local_58,&DAT_001c6604,0x10)" ( identifier , (pointer_expression "&DAT_001c6604" & identifier) , number_literal ))) ;) (expression_statement "__printf_chk(1,"UUID=%.8s-%.4s-%.4s-%.4s-%.12s\n",local_58,local_50,local_4c,local_48,local_44);" (call_expression "__printf_chk(1,"UUID=%.8s-%.4s-%.4s-%.4s-%.12s\n",local_58,local_50,local_4c,local_48,local_44)" identifier (argument_list "(1,"UUID=%.8s-%.4s-%.4s-%.4s-%.12s\n",local_58,local_50,local_4c,local_48,local_44)" ( number_literal , (string_literal ""UUID=%.8s-%.4s-%.4s-%.4s-%.12s\n"" " string_content escape_sequence ") , identifier , identifier , identifier , identifier , identifier ))) ;) (expression_statement "FUN_001a49d0(0x1c6614,local_60,0x10);" (call_expression "FUN_001a49d0(0x1c6614,local_60,0x10)" identifier (argument_list "(0x1c6614,local_60,0x10)" ( number_literal , identifier , number_literal ))) ;) (expression_statement "FUN_0010e824(__fd,&DAT_001c65f8,0x204);" (call_expression "FUN_0010e824(__fd,&DAT_001c65f8,0x204)" identifier (argument_list "(__fd,&DAT_001c65f8,0x204)" ( identifier , (pointer_expression "&DAT_001c65f8" & identifier) , number_literal ))) ;) (expression_statement "FUN_0010e8a3(__fd,uVar2 - 10,0);" (call_expression "FUN_0010e8a3(__fd,uVar2 - 10,0)" identifier (argument_list "(__fd,uVar2 - 10,0)" ( identifier , (binary_expression "uVar2 - 10" identifier - number_literal) , number_literal ))) ;) (expression_statement "FUN_0010e824(__fd,"SWAPSPACE2dflsu",10);" (call_expression "FUN_0010e824(__fd,"SWAPSPACE2dflsu",10)" identifier (argument_list "(__fd,"SWAPSPACE2dflsu",10)" ( identifier , (string_literal ""SWAPSPACE2dflsu"" " string_content ") , number_literal ))) ;) (expression_statement "fsync(__fd);" (call_expression "fsync(__fd)" identifier (argument_list "(__fd)" ( identifier ))) ;) (if_statement "if (local_30 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    \n    __stack_chk_fail();\n  }" if (parenthesized_expression "(local_30 != *(long *)(in_FS_OFFSET + 0x28))" ( (binary_expression "local_30 != *(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                    \n    __stack_chk_fail();\n  }" { (expression_statement "__stack_chk_fail();" (call_expression "__stack_chk_fail()" identifier (argument_list "()" ( ))) ;) })) (return_statement "return 0;" return number_literal ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration (sized_type_specifier long) IDENT) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration (sized_type_specifier long) IDENT ;) (declaration TYPE IDENT ;) (declaration (sized_type_specifier long) IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (array_declarator IDENT [ LIT ]) ;) (declaration TYPE (array_declarator IDENT [ LIT ]) ;) (declaration TYPE (array_declarator IDENT [ LIT ]) ;) (declaration TYPE (array_declarator IDENT [ LIT ]) ;) (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 = (pointer_expression & IDENT)) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , (pointer_expression & IDENT) , (pointer_expression & IDENT) ))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + (binary_expression (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT) * LIT)) )))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (pointer_expression * IDENT) , LIT )))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , (subscript_expression IDENT [ LIT ]) , LIT , LIT )))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT - (cast_expression ( (type_descriptor TYPE) ) IDENT))) ;) (expression_statement (call_expression IDENT (argument_list ( LIT , (string_literal " string_content escape_sequence ") , IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , (pointer_expression & IDENT) , LIT ))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression IDENT / IDENT) )))) ;) (expression_statement (call_expression IDENT (argument_list ( (pointer_expression & IDENT) ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , (pointer_expression & IDENT) , LIT ))) ;) (expression_statement (call_expression IDENT (argument_list ( LIT , (string_literal " string_content escape_sequence ") , IDENT , IDENT , IDENT , IDENT , IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( LIT , IDENT , LIT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , (pointer_expression & IDENT) , LIT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , (binary_expression IDENT - LIT) , LIT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , (string_literal " string_content ") , 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 { (expression_statement (call_expression IDENT (argument_list ( ))) ;) })) (return_statement return LIT ;) })))
(function_definition "undefined8 FUN_0015c540(undefined8 param_1,long param_2)\n\n{\n  undefined8 *puVar1;\n  int __fd;\n  uint uVar2;\n  long lVar3;\n  ulong uVar4;\n  long in_FS_OFFSET;\n  undefined1 *local_60;\n  undefined1 local_58 [8];\n  undefined1 local_50 [4];\n  undefined1 local_4c [4];\n  undefined1 local_48 [4];\n  undefined1 local_44 [20];\n  long local_30;\n  \n  local_30 = *(long *)(in_FS_OFFSET + 0x28);\n  local_60 = &DAT_001c0d09;\n  FUN_0019c219(param_2,&DAT_001bd2f0,&local_60);\n  puVar1 = (undefined8 *)(param_2 + (long)optind * 8);\n  __fd = FUN_0010e707(*puVar1,1);\n  lVar3 = FUN_0019b9b9(__fd,puVar1[1],0x400,1);\n  uVar2 = getpagesize();\n  uVar4 = lVar3 - (ulong)uVar2;\n  __printf_chk(1,"Setting up swapspace version 1, size = %lu bytes\n",uVar4);\n  FUN_0010e824(__fd,&DAT_001c65f8,0x400);\n  DAT_001c65f8 = 1;\n  _DAT_001c65fc = (undefined4)(uVar4 / uVar2);\n  FUN_0010ef61(&DAT_001c6604);\n  FUN_0010dfe9(local_58,&DAT_001c6604,0x10);\n  __printf_chk(1,"UUID=%.8s-%.4s-%.4s-%.4s-%.12s\n",local_58,local_50,local_4c,local_48,local_44);\n  FUN_001a49d0(0x1c6614,local_60,0x10);\n  FUN_0010e824(__fd,&DAT_001c65f8,0x204);\n  FUN_0010e8a3(__fd,uVar2 - 10,0);\n  FUN_0010e824(__fd,"SWAPSPACE2dflsu",10);\n  fsync(__fd);\n  if (local_30 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    \n    __stack_chk_fail();\n  }\n  return 0;\n}" (type_identifier "undefined8") (function_declarator "FUN_0015c540(undefined8 param_1,long param_2)" (identifier "FUN_0015c540") (parameter_list "(undefined8 param_1,long param_2)" (( "(") (parameter_declaration "undefined8 param_1" (type_identifier "undefined8") (identifier "param_1")) (, ",") (parameter_declaration "long param_2" (sized_type_specifier "long" (long "long")) (identifier "param_2")) () ")"))) (compound_statement "{\n  undefined8 *puVar1;\n  int __fd;\n  uint uVar2;\n  long lVar3;\n  ulong uVar4;\n  long in_FS_OFFSET;\n  undefined1 *local_60;\n  undefined1 local_58 [8];\n  undefined1 local_50 [4];\n  undefined1 local_4c [4];\n  undefined1 local_48 [4];\n  undefined1 local_44 [20];\n  long local_30;\n  \n  local_30 = *(long *)(in_FS_OFFSET + 0x28);\n  local_60 = &DAT_001c0d09;\n  FUN_0019c219(param_2,&DAT_001bd2f0,&local_60);\n  puVar1 = (undefined8 *)(param_2 + (long)optind * 8);\n  __fd = FUN_0010e707(*puVar1,1);\n  lVar3 = FUN_0019b9b9(__fd,puVar1[1],0x400,1);\n  uVar2 = getpagesize();\n  uVar4 = lVar3 - (ulong)uVar2;\n  __printf_chk(1,"Setting up swapspace version 1, size = %lu bytes\n",uVar4);\n  FUN_0010e824(__fd,&DAT_001c65f8,0x400);\n  DAT_001c65f8 = 1;\n  _DAT_001c65fc = (undefined4)(uVar4 / uVar2);\n  FUN_0010ef61(&DAT_001c6604);\n  FUN_0010dfe9(local_58,&DAT_001c6604,0x10);\n  __printf_chk(1,"UUID=%.8s-%.4s-%.4s-%.4s-%.12s\n",local_58,local_50,local_4c,local_48,local_44);\n  FUN_001a49d0(0x1c6614,local_60,0x10);\n  FUN_0010e824(__fd,&DAT_001c65f8,0x204);\n  FUN_0010e8a3(__fd,uVar2 - 10,0);\n  FUN_0010e824(__fd,"SWAPSPACE2dflsu",10);\n  fsync(__fd);\n  if (local_30 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    \n    __stack_chk_fail();\n  }\n  return 0;\n}" ({ "{") (declaration "undefined8 *puVar1;" (type_identifier "undefined8") (pointer_declarator "*puVar1" (* "*") (identifier "puVar1")) (; ";")) (declaration "int __fd;" (primitive_type "int") (identifier "__fd") (; ";")) (declaration "uint uVar2;" (type_identifier "uint") (identifier "uVar2") (; ";")) (declaration "long lVar3;" (sized_type_specifier "long" (long "long")) (identifier "lVar3") (; ";")) (declaration "ulong uVar4;" (type_identifier "ulong") (identifier "uVar4") (; ";")) (declaration "long in_FS_OFFSET;" (sized_type_specifier "long" (long "long")) (identifier "in_FS_OFFSET") (; ";")) (declaration "undefined1 *local_60;" (type_identifier "undefined1") (pointer_declarator "*local_60" (* "*") (identifier "local_60")) (; ";")) (declaration "undefined1 local_58 [8];" (type_identifier "undefined1") (array_declarator "local_58 [8]" (identifier "local_58") ([ "[") (number_literal "8") (] "]")) (; ";")) (declaration "undefined1 local_50 [4];" (type_identifier "undefined1") (array_declarator "local_50 [4]" (identifier "local_50") ([ "[") (number_literal "4") (] "]")) (; ";")) (declaration "undefined1 local_4c [4];" (type_identifier "undefined1") (array_declarator "local_4c [4]" (identifier "local_4c") ([ "[") (number_literal "4") (] "]")) (; ";")) (declaration "undefined1 local_48 [4];" (type_identifier "undefined1") (array_declarator "local_48 [4]" (identifier "local_48") ([ "[") (number_literal "4") (] "]")) (; ";")) (declaration "undefined1 local_44 [20];" (type_identifier "undefined1") (array_declarator "local_44 [20]" (identifier "local_44") ([ "[") (number_literal "20") (] "]")) (; ";")) (declaration "long local_30;" (sized_type_specifier "long" (long "long")) (identifier "local_30") (; ";")) (expression_statement "local_30 = *(long *)(in_FS_OFFSET + 0x28);" (assignment_expression "local_30 = *(long *)(in_FS_OFFSET + 0x28)" (identifier "local_30") (= "=") (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 "local_60 = &DAT_001c0d09;" (assignment_expression "local_60 = &DAT_001c0d09" (identifier "local_60") (= "=") (pointer_expression "&DAT_001c0d09" (& "&") (identifier "DAT_001c0d09"))) (; ";")) (expression_statement "FUN_0019c219(param_2,&DAT_001bd2f0,&local_60);" (call_expression "FUN_0019c219(param_2,&DAT_001bd2f0,&local_60)" (identifier "FUN_0019c219") (argument_list "(param_2,&DAT_001bd2f0,&local_60)" (( "(") (identifier "param_2") (, ",") (pointer_expression "&DAT_001bd2f0" (& "&") (identifier "DAT_001bd2f0")) (, ",") (pointer_expression "&local_60" (& "&") (identifier "local_60")) () ")"))) (; ";")) (expression_statement "puVar1 = (undefined8 *)(param_2 + (long)optind * 8);" (assignment_expression "puVar1 = (undefined8 *)(param_2 + (long)optind * 8)" (identifier "puVar1") (= "=") (cast_expression "(undefined8 *)(param_2 + (long)optind * 8)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + (long)optind * 8)" (( "(") (binary_expression "param_2 + (long)optind * 8" (identifier "param_2") (+ "+") (binary_expression "(long)optind * 8" (cast_expression "(long)optind" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "optind")) (* "*") (number_literal "8"))) () ")")))) (; ";")) (expression_statement "__fd = FUN_0010e707(*puVar1,1);" (assignment_expression "__fd = FUN_0010e707(*puVar1,1)" (identifier "__fd") (= "=") (call_expression "FUN_0010e707(*puVar1,1)" (identifier "FUN_0010e707") (argument_list "(*puVar1,1)" (( "(") (pointer_expression "*puVar1" (* "*") (identifier "puVar1")) (, ",") (number_literal "1") () ")")))) (; ";")) (expression_statement "lVar3 = FUN_0019b9b9(__fd,puVar1[1],0x400,1);" (assignment_expression "lVar3 = FUN_0019b9b9(__fd,puVar1[1],0x400,1)" (identifier "lVar3") (= "=") (call_expression "FUN_0019b9b9(__fd,puVar1[1],0x400,1)" (identifier "FUN_0019b9b9") (argument_list "(__fd,puVar1[1],0x400,1)" (( "(") (identifier "__fd") (, ",") (subscript_expression "puVar1[1]" (identifier "puVar1") ([ "[") (number_literal "1") (] "]")) (, ",") (number_literal "0x400") (, ",") (number_literal "1") () ")")))) (; ";")) (expression_statement "uVar2 = getpagesize();" (assignment_expression "uVar2 = getpagesize()" (identifier "uVar2") (= "=") (call_expression "getpagesize()" (identifier "getpagesize") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "uVar4 = lVar3 - (ulong)uVar2;" (assignment_expression "uVar4 = lVar3 - (ulong)uVar2" (identifier "uVar4") (= "=") (binary_expression "lVar3 - (ulong)uVar2" (identifier "lVar3") (- "-") (cast_expression "(ulong)uVar2" (( "(") (type_descriptor "ulong" (type_identifier "ulong")) () ")") (identifier "uVar2")))) (; ";")) (expression_statement "__printf_chk(1,"Setting up swapspace version 1, size = %lu bytes\n",uVar4);" (call_expression "__printf_chk(1,"Setting up swapspace version 1, size = %lu bytes\n",uVar4)" (identifier "__printf_chk") (argument_list "(1,"Setting up swapspace version 1, size = %lu bytes\n",uVar4)" (( "(") (number_literal "1") (, ",") (string_literal ""Setting up swapspace version 1, size = %lu bytes\n"" (" """) (string_content "Setting up swapspace version 1, size = %lu bytes") (escape_sequence "\n") (" """)) (, ",") (identifier "uVar4") () ")"))) (; ";")) (expression_statement "FUN_0010e824(__fd,&DAT_001c65f8,0x400);" (call_expression "FUN_0010e824(__fd,&DAT_001c65f8,0x400)" (identifier "FUN_0010e824") (argument_list "(__fd,&DAT_001c65f8,0x400)" (( "(") (identifier "__fd") (, ",") (pointer_expression "&DAT_001c65f8" (& "&") (identifier "DAT_001c65f8")) (, ",") (number_literal "0x400") () ")"))) (; ";")) (expression_statement "DAT_001c65f8 = 1;" (assignment_expression "DAT_001c65f8 = 1" (identifier "DAT_001c65f8") (= "=") (number_literal "1")) (; ";")) (expression_statement "_DAT_001c65fc = (undefined4)(uVar4 / uVar2);" (assignment_expression "_DAT_001c65fc = (undefined4)(uVar4 / uVar2)" (identifier "_DAT_001c65fc") (= "=") (call_expression "(undefined4)(uVar4 / uVar2)" (parenthesized_expression "(undefined4)" (( "(") (identifier "undefined4") () ")")) (argument_list "(uVar4 / uVar2)" (( "(") (binary_expression "uVar4 / uVar2" (identifier "uVar4") (/ "/") (identifier "uVar2")) () ")")))) (; ";")) (expression_statement "FUN_0010ef61(&DAT_001c6604);" (call_expression "FUN_0010ef61(&DAT_001c6604)" (identifier "FUN_0010ef61") (argument_list "(&DAT_001c6604)" (( "(") (pointer_expression "&DAT_001c6604" (& "&") (identifier "DAT_001c6604")) () ")"))) (; ";")) (expression_statement "FUN_0010dfe9(local_58,&DAT_001c6604,0x10);" (call_expression "FUN_0010dfe9(local_58,&DAT_001c6604,0x10)" (identifier "FUN_0010dfe9") (argument_list "(local_58,&DAT_001c6604,0x10)" (( "(") (identifier "local_58") (, ",") (pointer_expression "&DAT_001c6604" (& "&") (identifier "DAT_001c6604")) (, ",") (number_literal "0x10") () ")"))) (; ";")) (expression_statement "__printf_chk(1,"UUID=%.8s-%.4s-%.4s-%.4s-%.12s\n",local_58,local_50,local_4c,local_48,local_44);" (call_expression "__printf_chk(1,"UUID=%.8s-%.4s-%.4s-%.4s-%.12s\n",local_58,local_50,local_4c,local_48,local_44)" (identifier "__printf_chk") (argument_list "(1,"UUID=%.8s-%.4s-%.4s-%.4s-%.12s\n",local_58,local_50,local_4c,local_48,local_44)" (( "(") (number_literal "1") (, ",") (string_literal ""UUID=%.8s-%.4s-%.4s-%.4s-%.12s\n"" (" """) (string_content "UUID=%.8s-%.4s-%.4s-%.4s-%.12s") (escape_sequence "\n") (" """)) (, ",") (identifier "local_58") (, ",") (identifier "local_50") (, ",") (identifier "local_4c") (, ",") (identifier "local_48") (, ",") (identifier "local_44") () ")"))) (; ";")) (expression_statement "FUN_001a49d0(0x1c6614,local_60,0x10);" (call_expression "FUN_001a49d0(0x1c6614,local_60,0x10)" (identifier "FUN_001a49d0") (argument_list "(0x1c6614,local_60,0x10)" (( "(") (number_literal "0x1c6614") (, ",") (identifier "local_60") (, ",") (number_literal "0x10") () ")"))) (; ";")) (expression_statement "FUN_0010e824(__fd,&DAT_001c65f8,0x204);" (call_expression "FUN_0010e824(__fd,&DAT_001c65f8,0x204)" (identifier "FUN_0010e824") (argument_list "(__fd,&DAT_001c65f8,0x204)" (( "(") (identifier "__fd") (, ",") (pointer_expression "&DAT_001c65f8" (& "&") (identifier "DAT_001c65f8")) (, ",") (number_literal "0x204") () ")"))) (; ";")) (expression_statement "FUN_0010e8a3(__fd,uVar2 - 10,0);" (call_expression "FUN_0010e8a3(__fd,uVar2 - 10,0)" (identifier "FUN_0010e8a3") (argument_list "(__fd,uVar2 - 10,0)" (( "(") (identifier "__fd") (, ",") (binary_expression "uVar2 - 10" (identifier "uVar2") (- "-") (number_literal "10")) (, ",") (number_literal "0") () ")"))) (; ";")) (expression_statement "FUN_0010e824(__fd,"SWAPSPACE2dflsu",10);" (call_expression "FUN_0010e824(__fd,"SWAPSPACE2dflsu",10)" (identifier "FUN_0010e824") (argument_list "(__fd,"SWAPSPACE2dflsu",10)" (( "(") (identifier "__fd") (, ",") (string_literal ""SWAPSPACE2dflsu"" (" """) (string_content "SWAPSPACE2dflsu") (" """)) (, ",") (number_literal "10") () ")"))) (; ";")) (expression_statement "fsync(__fd);" (call_expression "fsync(__fd)" (identifier "fsync") (argument_list "(__fd)" (( "(") (identifier "__fd") () ")"))) (; ";")) (if_statement "if (local_30 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    \n    __stack_chk_fail();\n  }" (if "if") (parenthesized_expression "(local_30 != *(long *)(in_FS_OFFSET + 0x28))" (( "(") (binary_expression "local_30 != *(long *)(in_FS_OFFSET + 0x28)" (identifier "local_30") (!= "!=") (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                    \n    __stack_chk_fail();\n  }" ({ "{") (expression_statement "__stack_chk_fail();" (call_expression "__stack_chk_fail()" (identifier "__stack_chk_fail") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}"))) (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}")))

int function_1(int argc,char **var_5)

{
  long var_19;
  int fd;
  type_1 var_9;
  long var_6;
  type_2 var_8;
  type_3 var_12;
  long var_1;
  char *label;
  char var_15 [32];
  
  var_19 = *(long *)(var_1 + 0x28);
  label = "";
  var_2(var_5,"^L:",&label);
  var_6 = (long)optind;
  fd = var_3(var_5[var_6],1);
  var_8 = var_4(fd,(var_5 + var_6)[1],0x400,1);
  var_9 = var_7();
  var_12 = var_8 - var_9;
  var_10(1,"Setting up swapspace version 1, size = %lu bytes\n",var_12);
  var_11(fd,&bb_common_bufsiz1,0x400);
  bb_common_bufsiz1 = 1;
  DAT_001c65fc = (undefined4)(var_12 / var_9);
  var_13((uint8_t *)&DAT_001c6604);
  var_14(var_15,(char *)&DAT_001c6604,0x10);
  var_10(1,"UUID=%.8s-%.4s-%.4s-%.4s-%.12s\n",var_15,var_15 + 8,var_15 + 0xc,
               var_15 + 0x10,var_15 + 0x14);
  var_16((char *)((long)&DAT_001c6610 + 4),label,0x10);
  var_11(fd,&bb_common_bufsiz1,0x204);
  var_17(fd,(type_3)(var_9 - 10),0);
  var_11(fd,"SWAPSPACE2",10);
  var_18(fd);
  if (var_19 != *(long *)(var_1 + 0x28)) {
                    /* WARNING: Subroutine does not return */
    var_20();
  }
  return 0;
}


(translation_unit (function_definition type: (type_identifier) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (sized_type_specifier) declarator: (identifier)))) body: (compound_statement (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (sized_type_specifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (sized_type_specifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (array_declarator declarator: (identifier) size: (number_literal))) (declaration type: (type_identifier) declarator: (array_declarator declarator: (identifier) size: (number_literal))) (declaration type: (type_identifier) declarator: (array_declarator declarator: (identifier) size: (number_literal))) (declaration type: (type_identifier) declarator: (array_declarator declarator: (identifier) size: (number_literal))) (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: (pointer_expression argument: (identifier)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (pointer_expression argument: (identifier)) (pointer_expression argument: (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (binary_expression left: (cast_expression type: (type_descriptor type: (sized_type_specifier)) value: (identifier)) right: (number_literal))))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (pointer_expression argument: (identifier)) (number_literal))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (subscript_expression argument: (identifier) index: (number_literal)) (number_literal) (number_literal))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier)) value: (identifier))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (number_literal) (string_literal (string_content) (escape_sequence)) (identifier)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (pointer_expression argument: (identifier)) (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (parenthesized_expression (identifier)) arguments: (argument_list (binary_expression left: (identifier) right: (identifier)))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (pointer_expression argument: (identifier))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (pointer_expression argument: (identifier)) (number_literal)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (number_literal) (string_literal (string_content) (escape_sequence)) (identifier) (identifier) (identifier) (identifier) (identifier)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (number_literal) (identifier) (number_literal)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (pointer_expression argument: (identifier)) (number_literal)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (binary_expression left: (identifier) right: (number_literal)) (number_literal)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (string_literal (string_content)) (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 (expression_statement (call_expression function: (identifier) arguments: (argument_list))))) (return_statement (number_literal)))))

/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */

undefined8 MASKED(undefined8 param_1,long param_2)

{
  undefined8 *puVar1;
  int __fd;
  uint uVar2;
  long lVar3;
  ulong uVar4;
  long in_FS_OFFSET;
  undefined1 *local_60;
  undefined1 local_58 [8];
  undefined1 local_50 [4];
  undefined1 local_4c [4];
  undefined1 local_48 [4];
  undefined1 local_44 [20];
  long local_30;
  
  local_30 = *(long *)(in_FS_OFFSET + 0x28);
  local_60 = &DAT_001c0d09;
  FUN_0019c219(param_2,&DAT_001bd2f0,&local_60);
  puVar1 = (undefined8 *)(param_2 + (long)optind * 8);
  __fd = FUN_0010e707(*puVar1,1);
  lVar3 = FUN_0019b9b9(__fd,puVar1[1],0x400,1);
  uVar2 = getpagesize();
  uVar4 = lVar3 - (ulong)uVar2;
  __printf_chk(1,"Setting up swapspace version 1, size = %lu bytes\n",uVar4);
  FUN_0010e824(__fd,&DAT_001c65f8,0x400);
  DAT_001c65f8 = 1;
  _DAT_001c65fc = (undefined4)(uVar4 / uVar2);
  FUN_0010ef61(&DAT_001c6604);
  FUN_0010dfe9(local_58,&DAT_001c6604,0x10);
  __printf_chk(1,"UUID=%.8s-%.4s-%.4s-%.4s-%.12s\n",local_58,local_50,local_4c,local_48,local_44);
  FUN_001a49d0(0x1c6614,local_60,0x10);
  FUN_0010e824(__fd,&DAT_001c65f8,0x204);
  FUN_0010e8a3(__fd,uVar2 - 10,0);
  FUN_0010e824(__fd,"SWAPSPACE2dflsu",10);
  fsync(__fd);
  if (local_30 != *(long *)(in_FS_OFFSET + 0x28)) {
                    /* WARNING: Subroutine does not return */
    __stack_chk_fail();
  }
  return 0;
}

