
/* DWARF original name: sized_write_ehdr<64, true>
   DWARF original prototype: void sized_write_ehdr<64,_true>(Dwp_output_file * this) */

void __thiscall gold::Dwp_output_file::sized_write_ehdr<64,_true>(Dwp_output_file *this)

{
  ulong uVar1;
  char *pcVar2;
  ushort uVar3;
  size_t sVar4;
  char *format;
  uchar e_ident [16];
  uchar buf [64];
  
  uVar3 = (ushort)this->machine_;
  buf._18_2_ = uVar3 << 8 | uVar3 >> 8;
  uVar1 = this->shoff_;
  buf._40_8_ = uVar1 >> 0x38 | (uVar1 & 0xff000000000000) >> 0x28 | (uVar1 & 0xff0000000000) >> 0x18
               | (uVar1 & 0xff00000000) >> 8 | (uVar1 & 0xff000000) << 8 |
               (uVar1 & 0xff0000) << 0x18 | (uVar1 & 0xff00) << 0x28 | uVar1 << 0x38;
  buf[0x30] = '\0';
  buf[0x31] = '\0';
  buf[0x32] = '\0';
  buf[0x33] = '\0';
  buf[0x34] = '\0';
  buf[0x35] = '@';
  buf[0x36] = '\0';
  buf[0x37] = '\0';
  uVar3 = (ushort)this->shnum_;
  buf._60_2_ = uVar3 << 8 | uVar3 >> 8;
  if (0xfeff < this->shnum_) {
    buf._60_2_ = 0;
  }
  buf[0] = '\x7f';
  buf[1] = 'E';
  buf[2] = 'L';
  buf[3] = 'F';
  buf[4] = '\x02';
  buf[5] = '\x02';
  buf[6] = '\x01';
  buf[7] = '\0';
  buf[8] = '\0';
  buf[9] = '\0';
  buf[10] = '\0';
  buf[0xb] = '\0';
  buf[0xc] = '\0';
  buf[0xd] = '\0';
  buf[0xe] = '\0';
  buf[0xf] = '\0';
  buf[0x10] = '\0';
  buf[0x11] = '\x01';
  buf[0x14] = '\0';
  buf[0x15] = '\0';
  buf[0x16] = '\0';
  buf[0x17] = '\x01';
  uVar3 = (ushort)this->shstrndx_;
  buf._62_2_ = uVar3 << 8 | uVar3 >> 8;
  if (0xfeff < this->shstrndx_) {
    buf._62_2_ = 0xffff;
  }
  buf[0x18] = '\0';
  buf[0x19] = '\0';
  buf[0x1a] = '\0';
  buf[0x1b] = '\0';
  buf[0x1c] = '\0';
  buf[0x1d] = '\0';
  buf[0x1e] = '\0';
  buf[0x1f] = '\0';
  buf[0x20] = '\0';
  buf[0x21] = '\0';
  buf[0x22] = '\0';
  buf[0x23] = '\0';
  buf[0x24] = '\0';
  buf[0x25] = '\0';
  buf[0x26] = '\0';
  buf[0x27] = '\0';
  buf[0x38] = '\0';
  buf[0x39] = '\0';
  buf[0x3a] = '\0';
  buf[0x3b] = '@';
  fseek((FILE *)this->fd_,0,0);
  sVar4 = fwrite(buf,1,0x40,(FILE *)this->fd_);
  if (0x3f < sVar4) {
    return;
  }
  pcVar2 = this->name_;
  format = (char *)gettext("%s: error writing ELF header");
                    /* WARNING: Subroutine does not return */
  gold_fatal(format,pcVar2);
}



void FUN_001606c0(undefined8 *param_1)

{
  ulong uVar1;
  undefined8 uVar2;
  ushort uVar3;
  size_t sVar4;
  undefined8 uVar5;
  undefined8 local_48;
  undefined8 uStack_40;
  undefined2 local_38;
  ushort local_36;
  undefined4 local_34;
  undefined8 local_30;
  undefined8 local_28;
  ulong local_20;
  undefined8 local_18;
  undefined4 local_10;
  ushort local_c;
  ushort local_a;
  
  local_36 = *(ushort *)(param_1 + 1) << 8 | *(ushort *)(param_1 + 1) >> 8;
  uVar1 = param_1[0xd];
  local_20 = uVar1 >> 0x38 | (uVar1 & 0xff000000000000) >> 0x28 | (uVar1 & 0xff0000000000) >> 0x18 |
             (uVar1 & 0xff00000000) >> 8 | (uVar1 & 0xff000000) << 8 | (uVar1 & 0xff0000) << 0x18 |
             (uVar1 & 0xff00) << 0x28 | uVar1 << 0x38;
  local_18 = 0x400000000000;
  uVar3 = (ushort)*(uint *)(param_1 + 6);
  local_c = uVar3 << 8 | uVar3 >> 8;
  if (0xfeff < *(uint *)(param_1 + 6)) {
    local_c = 0;
  }
  local_48 = 0x10202464c457f;
  uStack_40 = 0;
  local_38 = 0x100;
  local_34 = 0x1000000;
  uVar3 = (ushort)*(uint *)(param_1 + 0xe);
  local_a = uVar3 << 8 | uVar3 >> 8;
  if (0xfeff < *(uint *)(param_1 + 0xe)) {
    local_a = 0xffff;
  }
  local_30 = 0;
  local_28 = 0;
  local_10 = 0x40000000;
  fseek((FILE *)param_1[4],0,0);
  sVar4 = fwrite(&local_48,1,0x40,(FILE *)param_1[4]);
  if (0x3f < sVar4) {
    return;
  }
  uVar2 = *param_1;
  uVar5 = gettext("%s: error writing ELF header");
                    /* WARNING: Subroutine does not return */
  FUN_001781e0(uVar5,uVar2);
}


PUSH RBX
XOR EAX,EAX
MOV EDX,0x202
MOV RBX,RDI
MOV ECX,0x100
SUB RSP,0x50
MOV word ptr [RSP + 0xe],AX
MOVZX EAX,word ptr [RDI + 0x8]
MOV word ptr [RSP + 0x4],DX
MOV EDX,dword ptr [RDI + 0x30]
ROL AX,0x8
MOV dword ptr [RSP],0x464c457f
MOV word ptr [RSP + 0x22],AX
MOV RAX,qword ptr [RDI + 0x68]
MOV qword ptr [RSP + 0x6],0x0
BSWAP RAX
MOV qword ptr [RSP + 0x38],RAX
MOV RAX,0x400000000000
MOV qword ptr [RSP + 0x40],RAX
MOV EAX,EDX
ROL AX,0x8
CMP EDX,0xff00
MOV EDX,0x0
MOV byte ptr [RSP + 0x6],0x1
CMOVNC EAX,EDX
MOV EDX,dword ptr [RDI + 0x70]
MOVDQA XMM0,xmmword ptr [RSP]
MOV word ptr [RSP + 0x20],CX
MOV RDI,qword ptr [RDI + 0x20]
MOV dword ptr [RSP + 0x24],0x1000000
MOV word ptr [RSP + 0x4c],AX
MOV EAX,EDX
ROL AX,0x8
CMP EDX,0xff00
MOV EDX,0xffffffff
MOVAPS xmmword ptr [RSP + 0x10],XMM0
CMOVNC EAX,EDX
XOR EDX,EDX
XOR ESI,ESI
MOV qword ptr [RSP + 0x28],0x0
MOV qword ptr [RSP + 0x30],0x0
MOV dword ptr [RSP + 0x48],0x40000000
MOV word ptr [RSP + 0x4e],AX
CALL 0x00147200
MOV RCX,qword ptr [RBX + 0x20]
LEA RDI,[RSP + 0x10]
MOV EDX,0x40
MOV ESI,0x1
CALL 0x001479a0
CMP RAX,0x3f
JBE 0x001607b5
ADD RSP,0x50
POP RBX
RET
MOV RBX,qword ptr [RBX]
LEA RDI,[0x36b815]
CALL 0x00147320
MOV RDI,RAX
MOV RSI,RBX
XOR EAX,EAX
CALL 0x001781e0
(translation_unit "void FUN_001606c0(undefined8 *param_1)\n\n{\n  ulong uVar1;\n  undefined8 uVar2;\n  ushort uVar3;\n  size_t sVar4;\n  undefined8 uVar5;\n  undefined8 local_48;\n  undefined8 uStack_40;\n  undefined2 local_38;\n  ushort local_36;\n  undefined4 local_34;\n  undefined8 local_30;\n  undefined8 local_28;\n  ulong local_20;\n  undefined8 local_18;\n  undefined4 local_10;\n  ushort local_c;\n  ushort local_a;\n  \n  local_36 = *(ushort *)(param_1 + 1) << 8 | *(ushort *)(param_1 + 1) >> 8;\n  uVar1 = param_1[0xd];\n  local_20 = uVar1 >> 0x38 | (uVar1 & 0xff000000000000) >> 0x28 | (uVar1 & 0xff0000000000) >> 0x18 |\n             (uVar1 & 0xff00000000) >> 8 | (uVar1 & 0xff000000) << 8 | (uVar1 & 0xff0000) << 0x18 |\n             (uVar1 & 0xff00) << 0x28 | uVar1 << 0x38;\n  local_18 = 0x400000000000;\n  uVar3 = (ushort)*(uint *)(param_1 + 6);\n  local_c = uVar3 << 8 | uVar3 >> 8;\n  if (0xfeff < *(uint *)(param_1 + 6)) {\n    local_c = 0;\n  }\n  local_48 = 0x10202464c457f;\n  uStack_40 = 0;\n  local_38 = 0x100;\n  local_34 = 0x1000000;\n  uVar3 = (ushort)*(uint *)(param_1 + 0xe);\n  local_a = uVar3 << 8 | uVar3 >> 8;\n  if (0xfeff < *(uint *)(param_1 + 0xe)) {\n    local_a = 0xffff;\n  }\n  local_30 = 0;\n  local_28 = 0;\n  local_10 = 0x40000000;\n  fseek((FILE *)param_1[4],0,0);\n  sVar4 = fwrite(&local_48,1,0x40,(FILE *)param_1[4]);\n  if (0x3f < sVar4) {\n    return;\n  }\n  uVar2 = *param_1;\n  uVar5 = gettext("%s: error writing ELF header");\n                    /* WARNING: Subroutine does not return */\n  FUN_001781e0(uVar5,uVar2);\n}\n\n" (function_definition "void FUN_001606c0(undefined8 *param_1)\n\n{\n  ulong uVar1;\n  undefined8 uVar2;\n  ushort uVar3;\n  size_t sVar4;\n  undefined8 uVar5;\n  undefined8 local_48;\n  undefined8 uStack_40;\n  undefined2 local_38;\n  ushort local_36;\n  undefined4 local_34;\n  undefined8 local_30;\n  undefined8 local_28;\n  ulong local_20;\n  undefined8 local_18;\n  undefined4 local_10;\n  ushort local_c;\n  ushort local_a;\n  \n  local_36 = *(ushort *)(param_1 + 1) << 8 | *(ushort *)(param_1 + 1) >> 8;\n  uVar1 = param_1[0xd];\n  local_20 = uVar1 >> 0x38 | (uVar1 & 0xff000000000000) >> 0x28 | (uVar1 & 0xff0000000000) >> 0x18 |\n             (uVar1 & 0xff00000000) >> 8 | (uVar1 & 0xff000000) << 8 | (uVar1 & 0xff0000) << 0x18 |\n             (uVar1 & 0xff00) << 0x28 | uVar1 << 0x38;\n  local_18 = 0x400000000000;\n  uVar3 = (ushort)*(uint *)(param_1 + 6);\n  local_c = uVar3 << 8 | uVar3 >> 8;\n  if (0xfeff < *(uint *)(param_1 + 6)) {\n    local_c = 0;\n  }\n  local_48 = 0x10202464c457f;\n  uStack_40 = 0;\n  local_38 = 0x100;\n  local_34 = 0x1000000;\n  uVar3 = (ushort)*(uint *)(param_1 + 0xe);\n  local_a = uVar3 << 8 | uVar3 >> 8;\n  if (0xfeff < *(uint *)(param_1 + 0xe)) {\n    local_a = 0xffff;\n  }\n  local_30 = 0;\n  local_28 = 0;\n  local_10 = 0x40000000;\n  fseek((FILE *)param_1[4],0,0);\n  sVar4 = fwrite(&local_48,1,0x40,(FILE *)param_1[4]);\n  if (0x3f < sVar4) {\n    return;\n  }\n  uVar2 = *param_1;\n  uVar5 = gettext("%s: error writing ELF header");\n                    /* WARNING: Subroutine does not return */\n  FUN_001781e0(uVar5,uVar2);\n}" primitive_type (function_declarator "FUN_001606c0(undefined8 *param_1)" identifier (parameter_list "(undefined8 *param_1)" ( (parameter_declaration "undefined8 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  ulong uVar1;\n  undefined8 uVar2;\n  ushort uVar3;\n  size_t sVar4;\n  undefined8 uVar5;\n  undefined8 local_48;\n  undefined8 uStack_40;\n  undefined2 local_38;\n  ushort local_36;\n  undefined4 local_34;\n  undefined8 local_30;\n  undefined8 local_28;\n  ulong local_20;\n  undefined8 local_18;\n  undefined4 local_10;\n  ushort local_c;\n  ushort local_a;\n  \n  local_36 = *(ushort *)(param_1 + 1) << 8 | *(ushort *)(param_1 + 1) >> 8;\n  uVar1 = param_1[0xd];\n  local_20 = uVar1 >> 0x38 | (uVar1 & 0xff000000000000) >> 0x28 | (uVar1 & 0xff0000000000) >> 0x18 |\n             (uVar1 & 0xff00000000) >> 8 | (uVar1 & 0xff000000) << 8 | (uVar1 & 0xff0000) << 0x18 |\n             (uVar1 & 0xff00) << 0x28 | uVar1 << 0x38;\n  local_18 = 0x400000000000;\n  uVar3 = (ushort)*(uint *)(param_1 + 6);\n  local_c = uVar3 << 8 | uVar3 >> 8;\n  if (0xfeff < *(uint *)(param_1 + 6)) {\n    local_c = 0;\n  }\n  local_48 = 0x10202464c457f;\n  uStack_40 = 0;\n  local_38 = 0x100;\n  local_34 = 0x1000000;\n  uVar3 = (ushort)*(uint *)(param_1 + 0xe);\n  local_a = uVar3 << 8 | uVar3 >> 8;\n  if (0xfeff < *(uint *)(param_1 + 0xe)) {\n    local_a = 0xffff;\n  }\n  local_30 = 0;\n  local_28 = 0;\n  local_10 = 0x40000000;\n  fseek((FILE *)param_1[4],0,0);\n  sVar4 = fwrite(&local_48,1,0x40,(FILE *)param_1[4]);\n  if (0x3f < sVar4) {\n    return;\n  }\n  uVar2 = *param_1;\n  uVar5 = gettext("%s: error writing ELF header");\n                    /* WARNING: Subroutine does not return */\n  FUN_001781e0(uVar5,uVar2);\n}" { (declaration "ulong uVar1;" type_identifier identifier ;) (declaration "undefined8 uVar2;" type_identifier identifier ;) (declaration "ushort uVar3;" type_identifier identifier ;) (declaration "size_t sVar4;" primitive_type identifier ;) (declaration "undefined8 uVar5;" type_identifier identifier ;) (declaration "undefined8 local_48;" type_identifier identifier ;) (declaration "undefined8 uStack_40;" type_identifier identifier ;) (declaration "undefined2 local_38;" type_identifier identifier ;) (declaration "ushort local_36;" type_identifier identifier ;) (declaration "undefined4 local_34;" type_identifier identifier ;) (declaration "undefined8 local_30;" type_identifier identifier ;) (declaration "undefined8 local_28;" type_identifier identifier ;) (declaration "ulong local_20;" type_identifier identifier ;) (declaration "undefined8 local_18;" type_identifier identifier ;) (declaration "undefined4 local_10;" type_identifier identifier ;) (declaration "ushort local_c;" type_identifier identifier ;) (declaration "ushort local_a;" type_identifier identifier ;) (expression_statement "local_36 = *(ushort *)(param_1 + 1) << 8 | *(ushort *)(param_1 + 1) >> 8;" (assignment_expression "local_36 = *(ushort *)(param_1 + 1) << 8 | *(ushort *)(param_1 + 1) >> 8" identifier = (binary_expression "*(ushort *)(param_1 + 1) << 8 | *(ushort *)(param_1 + 1) >> 8" (binary_expression "*(ushort *)(param_1 + 1) << 8" (pointer_expression "*(ushort *)(param_1 + 1)" * (cast_expression "(ushort *)(param_1 + 1)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 1)" ( (binary_expression "param_1 + 1" identifier + number_literal) )))) << number_literal) | (binary_expression "*(ushort *)(param_1 + 1) >> 8" (pointer_expression "*(ushort *)(param_1 + 1)" * (cast_expression "(ushort *)(param_1 + 1)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 1)" ( (binary_expression "param_1 + 1" identifier + number_literal) )))) >> number_literal))) ;) (expression_statement "uVar1 = param_1[0xd];" (assignment_expression "uVar1 = param_1[0xd]" identifier = (subscript_expression "param_1[0xd]" identifier [ number_literal ])) ;) (expression_statement "local_20 = uVar1 >> 0x38 | (uVar1 & 0xff000000000000) >> 0x28 | (uVar1 & 0xff0000000000) >> 0x18 |\n             (uVar1 & 0xff00000000) >> 8 | (uVar1 & 0xff000000) << 8 | (uVar1 & 0xff0000) << 0x18 |\n             (uVar1 & 0xff00) << 0x28 | uVar1 << 0x38;" (assignment_expression "local_20 = uVar1 >> 0x38 | (uVar1 & 0xff000000000000) >> 0x28 | (uVar1 & 0xff0000000000) >> 0x18 |\n             (uVar1 & 0xff00000000) >> 8 | (uVar1 & 0xff000000) << 8 | (uVar1 & 0xff0000) << 0x18 |\n             (uVar1 & 0xff00) << 0x28 | uVar1 << 0x38" identifier = (binary_expression "uVar1 >> 0x38 | (uVar1 & 0xff000000000000) >> 0x28 | (uVar1 & 0xff0000000000) >> 0x18 |\n             (uVar1 & 0xff00000000) >> 8 | (uVar1 & 0xff000000) << 8 | (uVar1 & 0xff0000) << 0x18 |\n             (uVar1 & 0xff00) << 0x28 | uVar1 << 0x38" (binary_expression "uVar1 >> 0x38 | (uVar1 & 0xff000000000000) >> 0x28 | (uVar1 & 0xff0000000000) >> 0x18 |\n             (uVar1 & 0xff00000000) >> 8 | (uVar1 & 0xff000000) << 8 | (uVar1 & 0xff0000) << 0x18 |\n             (uVar1 & 0xff00) << 0x28" (binary_expression "uVar1 >> 0x38 | (uVar1 & 0xff000000000000) >> 0x28 | (uVar1 & 0xff0000000000) >> 0x18 |\n             (uVar1 & 0xff00000000) >> 8 | (uVar1 & 0xff000000) << 8 | (uVar1 & 0xff0000) << 0x18" (binary_expression "uVar1 >> 0x38 | (uVar1 & 0xff000000000000) >> 0x28 | (uVar1 & 0xff0000000000) >> 0x18 |\n             (uVar1 & 0xff00000000) >> 8 | (uVar1 & 0xff000000) << 8" (binary_expression "uVar1 >> 0x38 | (uVar1 & 0xff000000000000) >> 0x28 | (uVar1 & 0xff0000000000) >> 0x18 |\n             (uVar1 & 0xff00000000) >> 8" (binary_expression "uVar1 >> 0x38 | (uVar1 & 0xff000000000000) >> 0x28 | (uVar1 & 0xff0000000000) >> 0x18" (binary_expression "uVar1 >> 0x38 | (uVar1 & 0xff000000000000) >> 0x28" (binary_expression "uVar1 >> 0x38" identifier >> number_literal) | (binary_expression "(uVar1 & 0xff000000000000) >> 0x28" (parenthesized_expression "(uVar1 & 0xff000000000000)" ( (binary_expression "uVar1 & 0xff000000000000" identifier & number_literal) )) >> number_literal)) | (binary_expression "(uVar1 & 0xff0000000000) >> 0x18" (parenthesized_expression "(uVar1 & 0xff0000000000)" ( (binary_expression "uVar1 & 0xff0000000000" identifier & number_literal) )) >> number_literal)) | (binary_expression "(uVar1 & 0xff00000000) >> 8" (parenthesized_expression "(uVar1 & 0xff00000000)" ( (binary_expression "uVar1 & 0xff00000000" identifier & number_literal) )) >> number_literal)) | (binary_expression "(uVar1 & 0xff000000) << 8" (parenthesized_expression "(uVar1 & 0xff000000)" ( (binary_expression "uVar1 & 0xff000000" identifier & number_literal) )) << number_literal)) | (binary_expression "(uVar1 & 0xff0000) << 0x18" (parenthesized_expression "(uVar1 & 0xff0000)" ( (binary_expression "uVar1 & 0xff0000" identifier & number_literal) )) << number_literal)) | (binary_expression "(uVar1 & 0xff00) << 0x28" (parenthesized_expression "(uVar1 & 0xff00)" ( (binary_expression "uVar1 & 0xff00" identifier & number_literal) )) << number_literal)) | (binary_expression "uVar1 << 0x38" identifier << number_literal))) ;) (expression_statement "local_18 = 0x400000000000;" (assignment_expression "local_18 = 0x400000000000" identifier = number_literal) ;) (expression_statement "uVar3 = (ushort)*(uint *)(param_1 + 6);" (assignment_expression "uVar3 = (ushort)*(uint *)(param_1 + 6)" identifier = (binary_expression "(ushort)*(uint *)(param_1 + 6)" (parenthesized_expression "(ushort)" ( identifier )) * (cast_expression "(uint *)(param_1 + 6)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 6)" ( (binary_expression "param_1 + 6" identifier + number_literal) ))))) ;) (expression_statement "local_c = uVar3 << 8 | uVar3 >> 8;" (assignment_expression "local_c = uVar3 << 8 | uVar3 >> 8" identifier = (binary_expression "uVar3 << 8 | uVar3 >> 8" (binary_expression "uVar3 << 8" identifier << number_literal) | (binary_expression "uVar3 >> 8" identifier >> number_literal))) ;) (if_statement "if (0xfeff < *(uint *)(param_1 + 6)) {\n    local_c = 0;\n  }" if (parenthesized_expression "(0xfeff < *(uint *)(param_1 + 6))" ( (binary_expression "0xfeff < *(uint *)(param_1 + 6)" number_literal < (pointer_expression "*(uint *)(param_1 + 6)" * (cast_expression "(uint *)(param_1 + 6)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 6)" ( (binary_expression "param_1 + 6" identifier + number_literal) ))))) )) (compound_statement "{\n    local_c = 0;\n  }" { (expression_statement "local_c = 0;" (assignment_expression "local_c = 0" identifier = number_literal) ;) })) (expression_statement "local_48 = 0x10202464c457f;" (assignment_expression "local_48 = 0x10202464c457f" identifier = number_literal) ;) (expression_statement "uStack_40 = 0;" (assignment_expression "uStack_40 = 0" identifier = number_literal) ;) (expression_statement "local_38 = 0x100;" (assignment_expression "local_38 = 0x100" identifier = number_literal) ;) (expression_statement "local_34 = 0x1000000;" (assignment_expression "local_34 = 0x1000000" identifier = number_literal) ;) (expression_statement "uVar3 = (ushort)*(uint *)(param_1 + 0xe);" (assignment_expression "uVar3 = (ushort)*(uint *)(param_1 + 0xe)" identifier = (binary_expression "(ushort)*(uint *)(param_1 + 0xe)" (parenthesized_expression "(ushort)" ( identifier )) * (cast_expression "(uint *)(param_1 + 0xe)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xe)" ( (binary_expression "param_1 + 0xe" identifier + number_literal) ))))) ;) (expression_statement "local_a = uVar3 << 8 | uVar3 >> 8;" (assignment_expression "local_a = uVar3 << 8 | uVar3 >> 8" identifier = (binary_expression "uVar3 << 8 | uVar3 >> 8" (binary_expression "uVar3 << 8" identifier << number_literal) | (binary_expression "uVar3 >> 8" identifier >> number_literal))) ;) (if_statement "if (0xfeff < *(uint *)(param_1 + 0xe)) {\n    local_a = 0xffff;\n  }" if (parenthesized_expression "(0xfeff < *(uint *)(param_1 + 0xe))" ( (binary_expression "0xfeff < *(uint *)(param_1 + 0xe)" number_literal < (pointer_expression "*(uint *)(param_1 + 0xe)" * (cast_expression "(uint *)(param_1 + 0xe)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xe)" ( (binary_expression "param_1 + 0xe" identifier + number_literal) ))))) )) (compound_statement "{\n    local_a = 0xffff;\n  }" { (expression_statement "local_a = 0xffff;" (assignment_expression "local_a = 0xffff" identifier = number_literal) ;) })) (expression_statement "local_30 = 0;" (assignment_expression "local_30 = 0" identifier = number_literal) ;) (expression_statement "local_28 = 0;" (assignment_expression "local_28 = 0" identifier = number_literal) ;) (expression_statement "local_10 = 0x40000000;" (assignment_expression "local_10 = 0x40000000" identifier = number_literal) ;) (expression_statement "fseek((FILE *)param_1[4],0,0);" (call_expression "fseek((FILE *)param_1[4],0,0)" identifier (argument_list "((FILE *)param_1[4],0,0)" ( (cast_expression "(FILE *)param_1[4]" ( (type_descriptor "FILE *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "param_1[4]" identifier [ number_literal ])) , number_literal , number_literal ))) ;) (expression_statement "sVar4 = fwrite(&local_48,1,0x40,(FILE *)param_1[4]);" (assignment_expression "sVar4 = fwrite(&local_48,1,0x40,(FILE *)param_1[4])" identifier = (call_expression "fwrite(&local_48,1,0x40,(FILE *)param_1[4])" identifier (argument_list "(&local_48,1,0x40,(FILE *)param_1[4])" ( (pointer_expression "&local_48" & identifier) , number_literal , number_literal , (cast_expression "(FILE *)param_1[4]" ( (type_descriptor "FILE *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "param_1[4]" identifier [ number_literal ])) )))) ;) (if_statement "if (0x3f < sVar4) {\n    return;\n  }" if (parenthesized_expression "(0x3f < sVar4)" ( (binary_expression "0x3f < sVar4" number_literal < identifier) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) (expression_statement "uVar2 = *param_1;" (assignment_expression "uVar2 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (expression_statement "uVar5 = gettext("%s: error writing ELF header");" (assignment_expression "uVar5 = gettext("%s: error writing ELF header")" identifier = (call_expression "gettext("%s: error writing ELF header")" identifier (argument_list "("%s: error writing ELF header")" ( (string_literal ""%s: error writing ELF header"" " string_content ") )))) ;) comment (expression_statement "FUN_001781e0(uVar5,uVar2);" (call_expression "FUN_001781e0(uVar5,uVar2)" identifier (argument_list "(uVar5,uVar2)" ( identifier , identifier ))) ;) })))
(translation_unit "/* DWARF original name: sized_write_ehdr<64, true>\n   DWARF original prototype: void sized_write_ehdr<64,_true>(Dwp_output_file * this) */\n\nvoid __thiscall gold::Dwp_output_file::sized_write_ehdr<64,_true>(Dwp_output_file *this)\n\n{\n  ulong uVar1;\n  char *pcVar2;\n  ushort uVar3;\n  size_t sVar4;\n  char *format;\n  uchar e_ident [16];\n  uchar buf [64];\n  \n  uVar3 = (ushort)this->machine_;\n  buf._18_2_ = uVar3 << 8 | uVar3 >> 8;\n  uVar1 = this->shoff_;\n  buf._40_8_ = uVar1 >> 0x38 | (uVar1 & 0xff000000000000) >> 0x28 | (uVar1 & 0xff0000000000) >> 0x18\n               | (uVar1 & 0xff00000000) >> 8 | (uVar1 & 0xff000000) << 8 |\n               (uVar1 & 0xff0000) << 0x18 | (uVar1 & 0xff00) << 0x28 | uVar1 << 0x38;\n  buf[0x30] = '\0';\n  buf[0x31] = '\0';\n  buf[0x32] = '\0';\n  buf[0x33] = '\0';\n  buf[0x34] = '\0';\n  buf[0x35] = '@';\n  buf[0x36] = '\0';\n  buf[0x37] = '\0';\n  uVar3 = (ushort)this->shnum_;\n  buf._60_2_ = uVar3 << 8 | uVar3 >> 8;\n  if (0xfeff < this->shnum_) {\n    buf._60_2_ = 0;\n  }\n  buf[0] = '\x7f';\n  buf[1] = 'E';\n  buf[2] = 'L';\n  buf[3] = 'F';\n  buf[4] = '\x02';\n  buf[5] = '\x02';\n  buf[6] = '\x01';\n  buf[7] = '\0';\n  buf[8] = '\0';\n  buf[9] = '\0';\n  buf[10] = '\0';\n  buf[0xb] = '\0';\n  buf[0xc] = '\0';\n  buf[0xd] = '\0';\n  buf[0xe] = '\0';\n  buf[0xf] = '\0';\n  buf[0x10] = '\0';\n  buf[0x11] = '\x01';\n  buf[0x14] = '\0';\n  buf[0x15] = '\0';\n  buf[0x16] = '\0';\n  buf[0x17] = '\x01';\n  uVar3 = (ushort)this->shstrndx_;\n  buf._62_2_ = uVar3 << 8 | uVar3 >> 8;\n  if (0xfeff < this->shstrndx_) {\n    buf._62_2_ = 0xffff;\n  }\n  buf[0x18] = '\0';\n  buf[0x19] = '\0';\n  buf[0x1a] = '\0';\n  buf[0x1b] = '\0';\n  buf[0x1c] = '\0';\n  buf[0x1d] = '\0';\n  buf[0x1e] = '\0';\n  buf[0x1f] = '\0';\n  buf[0x20] = '\0';\n  buf[0x21] = '\0';\n  buf[0x22] = '\0';\n  buf[0x23] = '\0';\n  buf[0x24] = '\0';\n  buf[0x25] = '\0';\n  buf[0x26] = '\0';\n  buf[0x27] = '\0';\n  buf[0x38] = '\0';\n  buf[0x39] = '\0';\n  buf[0x3a] = '\0';\n  buf[0x3b] = '@';\n  fseek((FILE *)this->fd_,0,0);\n  sVar4 = fwrite(buf,1,0x40,(FILE *)this->fd_);\n  if (0x3f < sVar4) {\n    return;\n  }\n  pcVar2 = this->name_;\n  format = (char *)gettext("%s: error writing ELF header");\n                    /* WARNING: Subroutine does not return */\n  gold_fatal(format,pcVar2);\n}\n\n" comment (declaration "void __thiscall gold::Dwp_output_file::sized_write_ehdr<64,_true>(Dwp_output_file *this)\n\n{\n  ulong uVar1;" primitive_type (ms_call_modifier "__thiscall" __thiscall) (ERROR "gold::Dwp_output_file::" identifier : : identifier : :) identifier (ERROR "<64" < number_literal) , (ERROR "_true>(Dwp_output_file *this)\n\n{\n  ulong" identifier > ( identifier (pointer_declarator "*this" * identifier) ) { identifier) identifier ;) (declaration "char *pcVar2;" primitive_type (pointer_declarator "*pcVar2" * identifier) ;) (declaration "ushort uVar3;" type_identifier identifier ;) (declaration "size_t sVar4;" primitive_type identifier ;) (declaration "char *format;" primitive_type (pointer_declarator "*format" * identifier) ;) (declaration "uchar e_ident [16];" type_identifier (array_declarator "e_ident [16]" identifier [ number_literal ]) ;) (declaration "uchar buf [64];" type_identifier (array_declarator "buf [64]" identifier [ number_literal ]) ;) (expression_statement "uVar3 = (ushort)this->machine_;" (assignment_expression "uVar3 = (ushort)this->machine_" identifier = (cast_expression "(ushort)this->machine_" ( (type_descriptor "ushort" type_identifier) ) (field_expression "this->machine_" identifier -> field_identifier))) ;) (expression_statement "buf._18_2_ = uVar3 << 8 | uVar3 >> 8;" (assignment_expression "buf._18_2_ = uVar3 << 8 | uVar3 >> 8" (field_expression "buf._18_2_" identifier . field_identifier) = (binary_expression "uVar3 << 8 | uVar3 >> 8" (binary_expression "uVar3 << 8" identifier << number_literal) | (binary_expression "uVar3 >> 8" identifier >> number_literal))) ;) (expression_statement "uVar1 = this->shoff_;" (assignment_expression "uVar1 = this->shoff_" identifier = (field_expression "this->shoff_" identifier -> field_identifier)) ;) (expression_statement "buf._40_8_ = uVar1 >> 0x38 | (uVar1 & 0xff000000000000) >> 0x28 | (uVar1 & 0xff0000000000) >> 0x18\n               | (uVar1 & 0xff00000000) >> 8 | (uVar1 & 0xff000000) << 8 |\n               (uVar1 & 0xff0000) << 0x18 | (uVar1 & 0xff00) << 0x28 | uVar1 << 0x38;" (assignment_expression "buf._40_8_ = uVar1 >> 0x38 | (uVar1 & 0xff000000000000) >> 0x28 | (uVar1 & 0xff0000000000) >> 0x18\n               | (uVar1 & 0xff00000000) >> 8 | (uVar1 & 0xff000000) << 8 |\n               (uVar1 & 0xff0000) << 0x18 | (uVar1 & 0xff00) << 0x28 | uVar1 << 0x38" (field_expression "buf._40_8_" identifier . field_identifier) = (binary_expression "uVar1 >> 0x38 | (uVar1 & 0xff000000000000) >> 0x28 | (uVar1 & 0xff0000000000) >> 0x18\n               | (uVar1 & 0xff00000000) >> 8 | (uVar1 & 0xff000000) << 8 |\n               (uVar1 & 0xff0000) << 0x18 | (uVar1 & 0xff00) << 0x28 | uVar1 << 0x38" (binary_expression "uVar1 >> 0x38 | (uVar1 & 0xff000000000000) >> 0x28 | (uVar1 & 0xff0000000000) >> 0x18\n               | (uVar1 & 0xff00000000) >> 8 | (uVar1 & 0xff000000) << 8 |\n               (uVar1 & 0xff0000) << 0x18 | (uVar1 & 0xff00) << 0x28" (binary_expression "uVar1 >> 0x38 | (uVar1 & 0xff000000000000) >> 0x28 | (uVar1 & 0xff0000000000) >> 0x18\n               | (uVar1 & 0xff00000000) >> 8 | (uVar1 & 0xff000000) << 8 |\n               (uVar1 & 0xff0000) << 0x18" (binary_expression "uVar1 >> 0x38 | (uVar1 & 0xff000000000000) >> 0x28 | (uVar1 & 0xff0000000000) >> 0x18\n               | (uVar1 & 0xff00000000) >> 8 | (uVar1 & 0xff000000) << 8" (binary_expression "uVar1 >> 0x38 | (uVar1 & 0xff000000000000) >> 0x28 | (uVar1 & 0xff0000000000) >> 0x18\n               | (uVar1 & 0xff00000000) >> 8" (binary_expression "uVar1 >> 0x38 | (uVar1 & 0xff000000000000) >> 0x28 | (uVar1 & 0xff0000000000) >> 0x18" (binary_expression "uVar1 >> 0x38 | (uVar1 & 0xff000000000000) >> 0x28" (binary_expression "uVar1 >> 0x38" identifier >> number_literal) | (binary_expression "(uVar1 & 0xff000000000000) >> 0x28" (parenthesized_expression "(uVar1 & 0xff000000000000)" ( (binary_expression "uVar1 & 0xff000000000000" identifier & number_literal) )) >> number_literal)) | (binary_expression "(uVar1 & 0xff0000000000) >> 0x18" (parenthesized_expression "(uVar1 & 0xff0000000000)" ( (binary_expression "uVar1 & 0xff0000000000" identifier & number_literal) )) >> number_literal)) | (binary_expression "(uVar1 & 0xff00000000) >> 8" (parenthesized_expression "(uVar1 & 0xff00000000)" ( (binary_expression "uVar1 & 0xff00000000" identifier & number_literal) )) >> number_literal)) | (binary_expression "(uVar1 & 0xff000000) << 8" (parenthesized_expression "(uVar1 & 0xff000000)" ( (binary_expression "uVar1 & 0xff000000" identifier & number_literal) )) << number_literal)) | (binary_expression "(uVar1 & 0xff0000) << 0x18" (parenthesized_expression "(uVar1 & 0xff0000)" ( (binary_expression "uVar1 & 0xff0000" identifier & number_literal) )) << number_literal)) | (binary_expression "(uVar1 & 0xff00) << 0x28" (parenthesized_expression "(uVar1 & 0xff00)" ( (binary_expression "uVar1 & 0xff00" identifier & number_literal) )) << number_literal)) | (binary_expression "uVar1 << 0x38" identifier << number_literal))) ;) (expression_statement "buf[0x30] = '\0';" (assignment_expression "buf[0x30] = '\0'" (subscript_expression "buf[0x30]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "buf[0x31] = '\0';" (assignment_expression "buf[0x31] = '\0'" (subscript_expression "buf[0x31]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "buf[0x32] = '\0';" (assignment_expression "buf[0x32] = '\0'" (subscript_expression "buf[0x32]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "buf[0x33] = '\0';" (assignment_expression "buf[0x33] = '\0'" (subscript_expression "buf[0x33]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "buf[0x34] = '\0';" (assignment_expression "buf[0x34] = '\0'" (subscript_expression "buf[0x34]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "buf[0x35] = '@';" (assignment_expression "buf[0x35] = '@'" (subscript_expression "buf[0x35]" identifier [ number_literal ]) = (char_literal "'@'" ' character ')) ;) (expression_statement "buf[0x36] = '\0';" (assignment_expression "buf[0x36] = '\0'" (subscript_expression "buf[0x36]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "buf[0x37] = '\0';" (assignment_expression "buf[0x37] = '\0'" (subscript_expression "buf[0x37]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "uVar3 = (ushort)this->shnum_;" (assignment_expression "uVar3 = (ushort)this->shnum_" identifier = (cast_expression "(ushort)this->shnum_" ( (type_descriptor "ushort" type_identifier) ) (field_expression "this->shnum_" identifier -> field_identifier))) ;) (expression_statement "buf._60_2_ = uVar3 << 8 | uVar3 >> 8;" (assignment_expression "buf._60_2_ = uVar3 << 8 | uVar3 >> 8" (field_expression "buf._60_2_" identifier . field_identifier) = (binary_expression "uVar3 << 8 | uVar3 >> 8" (binary_expression "uVar3 << 8" identifier << number_literal) | (binary_expression "uVar3 >> 8" identifier >> number_literal))) ;) (if_statement "if (0xfeff < this->shnum_) {\n    buf._60_2_ = 0;\n  }" if (parenthesized_expression "(0xfeff < this->shnum_)" ( (binary_expression "0xfeff < this->shnum_" number_literal < (field_expression "this->shnum_" identifier -> field_identifier)) )) (compound_statement "{\n    buf._60_2_ = 0;\n  }" { (expression_statement "buf._60_2_ = 0;" (assignment_expression "buf._60_2_ = 0" (field_expression "buf._60_2_" identifier . field_identifier) = number_literal) ;) })) (expression_statement "buf[0] = '\x7f';" (assignment_expression "buf[0] = '\x7f'" (subscript_expression "buf[0]" identifier [ number_literal ]) = (char_literal "'\x7f'" ' escape_sequence ')) ;) (expression_statement "buf[1] = 'E';" (assignment_expression "buf[1] = 'E'" (subscript_expression "buf[1]" identifier [ number_literal ]) = (char_literal "'E'" ' character ')) ;) (expression_statement "buf[2] = 'L';" (assignment_expression "buf[2] = 'L'" (subscript_expression "buf[2]" identifier [ number_literal ]) = (char_literal "'L'" ' character ')) ;) (expression_statement "buf[3] = 'F';" (assignment_expression "buf[3] = 'F'" (subscript_expression "buf[3]" identifier [ number_literal ]) = (char_literal "'F'" ' character ')) ;) (expression_statement "buf[4] = '\x02';" (assignment_expression "buf[4] = '\x02'" (subscript_expression "buf[4]" identifier [ number_literal ]) = (char_literal "'\x02'" ' escape_sequence ')) ;) (expression_statement "buf[5] = '\x02';" (assignment_expression "buf[5] = '\x02'" (subscript_expression "buf[5]" identifier [ number_literal ]) = (char_literal "'\x02'" ' escape_sequence ')) ;) (expression_statement "buf[6] = '\x01';" (assignment_expression "buf[6] = '\x01'" (subscript_expression "buf[6]" identifier [ number_literal ]) = (char_literal "'\x01'" ' escape_sequence ')) ;) (expression_statement "buf[7] = '\0';" (assignment_expression "buf[7] = '\0'" (subscript_expression "buf[7]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "buf[8] = '\0';" (assignment_expression "buf[8] = '\0'" (subscript_expression "buf[8]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "buf[9] = '\0';" (assignment_expression "buf[9] = '\0'" (subscript_expression "buf[9]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "buf[10] = '\0';" (assignment_expression "buf[10] = '\0'" (subscript_expression "buf[10]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "buf[0xb] = '\0';" (assignment_expression "buf[0xb] = '\0'" (subscript_expression "buf[0xb]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "buf[0xc] = '\0';" (assignment_expression "buf[0xc] = '\0'" (subscript_expression "buf[0xc]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "buf[0xd] = '\0';" (assignment_expression "buf[0xd] = '\0'" (subscript_expression "buf[0xd]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "buf[0xe] = '\0';" (assignment_expression "buf[0xe] = '\0'" (subscript_expression "buf[0xe]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "buf[0xf] = '\0';" (assignment_expression "buf[0xf] = '\0'" (subscript_expression "buf[0xf]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "buf[0x10] = '\0';" (assignment_expression "buf[0x10] = '\0'" (subscript_expression "buf[0x10]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "buf[0x11] = '\x01';" (assignment_expression "buf[0x11] = '\x01'" (subscript_expression "buf[0x11]" identifier [ number_literal ]) = (char_literal "'\x01'" ' escape_sequence ')) ;) (expression_statement "buf[0x14] = '\0';" (assignment_expression "buf[0x14] = '\0'" (subscript_expression "buf[0x14]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "buf[0x15] = '\0';" (assignment_expression "buf[0x15] = '\0'" (subscript_expression "buf[0x15]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "buf[0x16] = '\0';" (assignment_expression "buf[0x16] = '\0'" (subscript_expression "buf[0x16]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "buf[0x17] = '\x01';" (assignment_expression "buf[0x17] = '\x01'" (subscript_expression "buf[0x17]" identifier [ number_literal ]) = (char_literal "'\x01'" ' escape_sequence ')) ;) (expression_statement "uVar3 = (ushort)this->shstrndx_;" (assignment_expression "uVar3 = (ushort)this->shstrndx_" identifier = (cast_expression "(ushort)this->shstrndx_" ( (type_descriptor "ushort" type_identifier) ) (field_expression "this->shstrndx_" identifier -> field_identifier))) ;) (expression_statement "buf._62_2_ = uVar3 << 8 | uVar3 >> 8;" (assignment_expression "buf._62_2_ = uVar3 << 8 | uVar3 >> 8" (field_expression "buf._62_2_" identifier . field_identifier) = (binary_expression "uVar3 << 8 | uVar3 >> 8" (binary_expression "uVar3 << 8" identifier << number_literal) | (binary_expression "uVar3 >> 8" identifier >> number_literal))) ;) (if_statement "if (0xfeff < this->shstrndx_) {\n    buf._62_2_ = 0xffff;\n  }" if (parenthesized_expression "(0xfeff < this->shstrndx_)" ( (binary_expression "0xfeff < this->shstrndx_" number_literal < (field_expression "this->shstrndx_" identifier -> field_identifier)) )) (compound_statement "{\n    buf._62_2_ = 0xffff;\n  }" { (expression_statement "buf._62_2_ = 0xffff;" (assignment_expression "buf._62_2_ = 0xffff" (field_expression "buf._62_2_" identifier . field_identifier) = number_literal) ;) })) (expression_statement "buf[0x18] = '\0';" (assignment_expression "buf[0x18] = '\0'" (subscript_expression "buf[0x18]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "buf[0x19] = '\0';" (assignment_expression "buf[0x19] = '\0'" (subscript_expression "buf[0x19]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "buf[0x1a] = '\0';" (assignment_expression "buf[0x1a] = '\0'" (subscript_expression "buf[0x1a]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "buf[0x1b] = '\0';" (assignment_expression "buf[0x1b] = '\0'" (subscript_expression "buf[0x1b]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "buf[0x1c] = '\0';" (assignment_expression "buf[0x1c] = '\0'" (subscript_expression "buf[0x1c]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "buf[0x1d] = '\0';" (assignment_expression "buf[0x1d] = '\0'" (subscript_expression "buf[0x1d]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "buf[0x1e] = '\0';" (assignment_expression "buf[0x1e] = '\0'" (subscript_expression "buf[0x1e]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "buf[0x1f] = '\0';" (assignment_expression "buf[0x1f] = '\0'" (subscript_expression "buf[0x1f]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "buf[0x20] = '\0';" (assignment_expression "buf[0x20] = '\0'" (subscript_expression "buf[0x20]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "buf[0x21] = '\0';" (assignment_expression "buf[0x21] = '\0'" (subscript_expression "buf[0x21]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "buf[0x22] = '\0';" (assignment_expression "buf[0x22] = '\0'" (subscript_expression "buf[0x22]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "buf[0x23] = '\0';" (assignment_expression "buf[0x23] = '\0'" (subscript_expression "buf[0x23]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "buf[0x24] = '\0';" (assignment_expression "buf[0x24] = '\0'" (subscript_expression "buf[0x24]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "buf[0x25] = '\0';" (assignment_expression "buf[0x25] = '\0'" (subscript_expression "buf[0x25]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "buf[0x26] = '\0';" (assignment_expression "buf[0x26] = '\0'" (subscript_expression "buf[0x26]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "buf[0x27] = '\0';" (assignment_expression "buf[0x27] = '\0'" (subscript_expression "buf[0x27]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "buf[0x38] = '\0';" (assignment_expression "buf[0x38] = '\0'" (subscript_expression "buf[0x38]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "buf[0x39] = '\0';" (assignment_expression "buf[0x39] = '\0'" (subscript_expression "buf[0x39]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "buf[0x3a] = '\0';" (assignment_expression "buf[0x3a] = '\0'" (subscript_expression "buf[0x3a]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "buf[0x3b] = '@';" (assignment_expression "buf[0x3b] = '@'" (subscript_expression "buf[0x3b]" identifier [ number_literal ]) = (char_literal "'@'" ' character ')) ;) (expression_statement "fseek((FILE *)this->fd_,0,0);" (call_expression "fseek((FILE *)this->fd_,0,0)" identifier (argument_list "((FILE *)this->fd_,0,0)" ( (cast_expression "(FILE *)this->fd_" ( (type_descriptor "FILE *" type_identifier (abstract_pointer_declarator "*" *)) ) (field_expression "this->fd_" identifier -> field_identifier)) , number_literal , number_literal ))) ;) (expression_statement "sVar4 = fwrite(buf,1,0x40,(FILE *)this->fd_);" (assignment_expression "sVar4 = fwrite(buf,1,0x40,(FILE *)this->fd_)" identifier = (call_expression "fwrite(buf,1,0x40,(FILE *)this->fd_)" identifier (argument_list "(buf,1,0x40,(FILE *)this->fd_)" ( identifier , number_literal , number_literal , (cast_expression "(FILE *)this->fd_" ( (type_descriptor "FILE *" type_identifier (abstract_pointer_declarator "*" *)) ) (field_expression "this->fd_" identifier -> field_identifier)) )))) ;) (if_statement "if (0x3f < sVar4) {\n    return;\n  }" if (parenthesized_expression "(0x3f < sVar4)" ( (binary_expression "0x3f < sVar4" number_literal < identifier) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) (expression_statement "pcVar2 = this->name_;" (assignment_expression "pcVar2 = this->name_" identifier = (field_expression "this->name_" identifier -> field_identifier)) ;) (expression_statement "format = (char *)gettext("%s: error writing ELF header");" (assignment_expression "format = (char *)gettext("%s: error writing ELF header")" identifier = (cast_expression "(char *)gettext("%s: error writing ELF header")" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "gettext("%s: error writing ELF header")" identifier (argument_list "("%s: error writing ELF header")" ( (string_literal ""%s: error writing ELF header"" " string_content ") ))))) ;) comment (expression_statement "gold_fatal(format,pcVar2);" (call_expression "gold_fatal(format,pcVar2)" identifier (argument_list "(format,pcVar2)" ( identifier , identifier ))) ;) (ERROR "}" }))
(translation_unit "void FUN_001606c0(undefined8 *param_1)\n\n{\n  ulong uVar1;\n  undefined8 uVar2;\n  ushort uVar3;\n  size_t sVar4;\n  undefined8 uVar5;\n  undefined8 local_48;\n  undefined8 uStack_40;\n  undefined2 local_38;\n  ushort local_36;\n  undefined4 local_34;\n  undefined8 local_30;\n  undefined8 local_28;\n  ulong local_20;\n  undefined8 local_18;\n  undefined4 local_10;\n  ushort local_c;\n  ushort local_a;\n  \n  local_36 = *(ushort *)(param_1 + 1) << 8 | *(ushort *)(param_1 + 1) >> 8;\n  uVar1 = param_1[0xd];\n  local_20 = uVar1 >> 0x38 | (uVar1 & 0xff000000000000) >> 0x28 | (uVar1 & 0xff0000000000) >> 0x18 |\n             (uVar1 & 0xff00000000) >> 8 | (uVar1 & 0xff000000) << 8 | (uVar1 & 0xff0000) << 0x18 |\n             (uVar1 & 0xff00) << 0x28 | uVar1 << 0x38;\n  local_18 = 0x400000000000;\n  uVar3 = (ushort)*(uint *)(param_1 + 6);\n  local_c = uVar3 << 8 | uVar3 >> 8;\n  if (0xfeff < *(uint *)(param_1 + 6)) {\n    local_c = 0;\n  }\n  local_48 = 0x10202464c457f;\n  uStack_40 = 0;\n  local_38 = 0x100;\n  local_34 = 0x1000000;\n  uVar3 = (ushort)*(uint *)(param_1 + 0xe);\n  local_a = uVar3 << 8 | uVar3 >> 8;\n  if (0xfeff < *(uint *)(param_1 + 0xe)) {\n    local_a = 0xffff;\n  }\n  local_30 = 0;\n  local_28 = 0;\n  local_10 = 0x40000000;\n  fseek((FILE *)param_1[4],0,0);\n  sVar4 = fwrite(&local_48,1,0x40,(FILE *)param_1[4]);\n  if (0x3f < sVar4) {\n    return;\n  }\n  uVar2 = *param_1;\n  uVar5 = gettext("%s: error writing ELF header");\n                    \n  FUN_001781e0(uVar5,uVar2);\n}\n\n" (function_definition "void FUN_001606c0(undefined8 *param_1)\n\n{\n  ulong uVar1;\n  undefined8 uVar2;\n  ushort uVar3;\n  size_t sVar4;\n  undefined8 uVar5;\n  undefined8 local_48;\n  undefined8 uStack_40;\n  undefined2 local_38;\n  ushort local_36;\n  undefined4 local_34;\n  undefined8 local_30;\n  undefined8 local_28;\n  ulong local_20;\n  undefined8 local_18;\n  undefined4 local_10;\n  ushort local_c;\n  ushort local_a;\n  \n  local_36 = *(ushort *)(param_1 + 1) << 8 | *(ushort *)(param_1 + 1) >> 8;\n  uVar1 = param_1[0xd];\n  local_20 = uVar1 >> 0x38 | (uVar1 & 0xff000000000000) >> 0x28 | (uVar1 & 0xff0000000000) >> 0x18 |\n             (uVar1 & 0xff00000000) >> 8 | (uVar1 & 0xff000000) << 8 | (uVar1 & 0xff0000) << 0x18 |\n             (uVar1 & 0xff00) << 0x28 | uVar1 << 0x38;\n  local_18 = 0x400000000000;\n  uVar3 = (ushort)*(uint *)(param_1 + 6);\n  local_c = uVar3 << 8 | uVar3 >> 8;\n  if (0xfeff < *(uint *)(param_1 + 6)) {\n    local_c = 0;\n  }\n  local_48 = 0x10202464c457f;\n  uStack_40 = 0;\n  local_38 = 0x100;\n  local_34 = 0x1000000;\n  uVar3 = (ushort)*(uint *)(param_1 + 0xe);\n  local_a = uVar3 << 8 | uVar3 >> 8;\n  if (0xfeff < *(uint *)(param_1 + 0xe)) {\n    local_a = 0xffff;\n  }\n  local_30 = 0;\n  local_28 = 0;\n  local_10 = 0x40000000;\n  fseek((FILE *)param_1[4],0,0);\n  sVar4 = fwrite(&local_48,1,0x40,(FILE *)param_1[4]);\n  if (0x3f < sVar4) {\n    return;\n  }\n  uVar2 = *param_1;\n  uVar5 = gettext("%s: error writing ELF header");\n                    \n  FUN_001781e0(uVar5,uVar2);\n}" primitive_type (function_declarator "FUN_001606c0(undefined8 *param_1)" identifier (parameter_list "(undefined8 *param_1)" ( (parameter_declaration "undefined8 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  ulong uVar1;\n  undefined8 uVar2;\n  ushort uVar3;\n  size_t sVar4;\n  undefined8 uVar5;\n  undefined8 local_48;\n  undefined8 uStack_40;\n  undefined2 local_38;\n  ushort local_36;\n  undefined4 local_34;\n  undefined8 local_30;\n  undefined8 local_28;\n  ulong local_20;\n  undefined8 local_18;\n  undefined4 local_10;\n  ushort local_c;\n  ushort local_a;\n  \n  local_36 = *(ushort *)(param_1 + 1) << 8 | *(ushort *)(param_1 + 1) >> 8;\n  uVar1 = param_1[0xd];\n  local_20 = uVar1 >> 0x38 | (uVar1 & 0xff000000000000) >> 0x28 | (uVar1 & 0xff0000000000) >> 0x18 |\n             (uVar1 & 0xff00000000) >> 8 | (uVar1 & 0xff000000) << 8 | (uVar1 & 0xff0000) << 0x18 |\n             (uVar1 & 0xff00) << 0x28 | uVar1 << 0x38;\n  local_18 = 0x400000000000;\n  uVar3 = (ushort)*(uint *)(param_1 + 6);\n  local_c = uVar3 << 8 | uVar3 >> 8;\n  if (0xfeff < *(uint *)(param_1 + 6)) {\n    local_c = 0;\n  }\n  local_48 = 0x10202464c457f;\n  uStack_40 = 0;\n  local_38 = 0x100;\n  local_34 = 0x1000000;\n  uVar3 = (ushort)*(uint *)(param_1 + 0xe);\n  local_a = uVar3 << 8 | uVar3 >> 8;\n  if (0xfeff < *(uint *)(param_1 + 0xe)) {\n    local_a = 0xffff;\n  }\n  local_30 = 0;\n  local_28 = 0;\n  local_10 = 0x40000000;\n  fseek((FILE *)param_1[4],0,0);\n  sVar4 = fwrite(&local_48,1,0x40,(FILE *)param_1[4]);\n  if (0x3f < sVar4) {\n    return;\n  }\n  uVar2 = *param_1;\n  uVar5 = gettext("%s: error writing ELF header");\n                    \n  FUN_001781e0(uVar5,uVar2);\n}" { (declaration "ulong uVar1;" type_identifier identifier ;) (declaration "undefined8 uVar2;" type_identifier identifier ;) (declaration "ushort uVar3;" type_identifier identifier ;) (declaration "size_t sVar4;" primitive_type identifier ;) (declaration "undefined8 uVar5;" type_identifier identifier ;) (declaration "undefined8 local_48;" type_identifier identifier ;) (declaration "undefined8 uStack_40;" type_identifier identifier ;) (declaration "undefined2 local_38;" type_identifier identifier ;) (declaration "ushort local_36;" type_identifier identifier ;) (declaration "undefined4 local_34;" type_identifier identifier ;) (declaration "undefined8 local_30;" type_identifier identifier ;) (declaration "undefined8 local_28;" type_identifier identifier ;) (declaration "ulong local_20;" type_identifier identifier ;) (declaration "undefined8 local_18;" type_identifier identifier ;) (declaration "undefined4 local_10;" type_identifier identifier ;) (declaration "ushort local_c;" type_identifier identifier ;) (declaration "ushort local_a;" type_identifier identifier ;) (expression_statement "local_36 = *(ushort *)(param_1 + 1) << 8 | *(ushort *)(param_1 + 1) >> 8;" (assignment_expression "local_36 = *(ushort *)(param_1 + 1) << 8 | *(ushort *)(param_1 + 1) >> 8" identifier = (binary_expression "*(ushort *)(param_1 + 1) << 8 | *(ushort *)(param_1 + 1) >> 8" (binary_expression "*(ushort *)(param_1 + 1) << 8" (pointer_expression "*(ushort *)(param_1 + 1)" * (cast_expression "(ushort *)(param_1 + 1)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 1)" ( (binary_expression "param_1 + 1" identifier + number_literal) )))) << number_literal) | (binary_expression "*(ushort *)(param_1 + 1) >> 8" (pointer_expression "*(ushort *)(param_1 + 1)" * (cast_expression "(ushort *)(param_1 + 1)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 1)" ( (binary_expression "param_1 + 1" identifier + number_literal) )))) >> number_literal))) ;) (expression_statement "uVar1 = param_1[0xd];" (assignment_expression "uVar1 = param_1[0xd]" identifier = (subscript_expression "param_1[0xd]" identifier [ number_literal ])) ;) (expression_statement "local_20 = uVar1 >> 0x38 | (uVar1 & 0xff000000000000) >> 0x28 | (uVar1 & 0xff0000000000) >> 0x18 |\n             (uVar1 & 0xff00000000) >> 8 | (uVar1 & 0xff000000) << 8 | (uVar1 & 0xff0000) << 0x18 |\n             (uVar1 & 0xff00) << 0x28 | uVar1 << 0x38;" (assignment_expression "local_20 = uVar1 >> 0x38 | (uVar1 & 0xff000000000000) >> 0x28 | (uVar1 & 0xff0000000000) >> 0x18 |\n             (uVar1 & 0xff00000000) >> 8 | (uVar1 & 0xff000000) << 8 | (uVar1 & 0xff0000) << 0x18 |\n             (uVar1 & 0xff00) << 0x28 | uVar1 << 0x38" identifier = (binary_expression "uVar1 >> 0x38 | (uVar1 & 0xff000000000000) >> 0x28 | (uVar1 & 0xff0000000000) >> 0x18 |\n             (uVar1 & 0xff00000000) >> 8 | (uVar1 & 0xff000000) << 8 | (uVar1 & 0xff0000) << 0x18 |\n             (uVar1 & 0xff00) << 0x28 | uVar1 << 0x38" (binary_expression "uVar1 >> 0x38 | (uVar1 & 0xff000000000000) >> 0x28 | (uVar1 & 0xff0000000000) >> 0x18 |\n             (uVar1 & 0xff00000000) >> 8 | (uVar1 & 0xff000000) << 8 | (uVar1 & 0xff0000) << 0x18 |\n             (uVar1 & 0xff00) << 0x28" (binary_expression "uVar1 >> 0x38 | (uVar1 & 0xff000000000000) >> 0x28 | (uVar1 & 0xff0000000000) >> 0x18 |\n             (uVar1 & 0xff00000000) >> 8 | (uVar1 & 0xff000000) << 8 | (uVar1 & 0xff0000) << 0x18" (binary_expression "uVar1 >> 0x38 | (uVar1 & 0xff000000000000) >> 0x28 | (uVar1 & 0xff0000000000) >> 0x18 |\n             (uVar1 & 0xff00000000) >> 8 | (uVar1 & 0xff000000) << 8" (binary_expression "uVar1 >> 0x38 | (uVar1 & 0xff000000000000) >> 0x28 | (uVar1 & 0xff0000000000) >> 0x18 |\n             (uVar1 & 0xff00000000) >> 8" (binary_expression "uVar1 >> 0x38 | (uVar1 & 0xff000000000000) >> 0x28 | (uVar1 & 0xff0000000000) >> 0x18" (binary_expression "uVar1 >> 0x38 | (uVar1 & 0xff000000000000) >> 0x28" (binary_expression "uVar1 >> 0x38" identifier >> number_literal) | (binary_expression "(uVar1 & 0xff000000000000) >> 0x28" (parenthesized_expression "(uVar1 & 0xff000000000000)" ( (binary_expression "uVar1 & 0xff000000000000" identifier & number_literal) )) >> number_literal)) | (binary_expression "(uVar1 & 0xff0000000000) >> 0x18" (parenthesized_expression "(uVar1 & 0xff0000000000)" ( (binary_expression "uVar1 & 0xff0000000000" identifier & number_literal) )) >> number_literal)) | (binary_expression "(uVar1 & 0xff00000000) >> 8" (parenthesized_expression "(uVar1 & 0xff00000000)" ( (binary_expression "uVar1 & 0xff00000000" identifier & number_literal) )) >> number_literal)) | (binary_expression "(uVar1 & 0xff000000) << 8" (parenthesized_expression "(uVar1 & 0xff000000)" ( (binary_expression "uVar1 & 0xff000000" identifier & number_literal) )) << number_literal)) | (binary_expression "(uVar1 & 0xff0000) << 0x18" (parenthesized_expression "(uVar1 & 0xff0000)" ( (binary_expression "uVar1 & 0xff0000" identifier & number_literal) )) << number_literal)) | (binary_expression "(uVar1 & 0xff00) << 0x28" (parenthesized_expression "(uVar1 & 0xff00)" ( (binary_expression "uVar1 & 0xff00" identifier & number_literal) )) << number_literal)) | (binary_expression "uVar1 << 0x38" identifier << number_literal))) ;) (expression_statement "local_18 = 0x400000000000;" (assignment_expression "local_18 = 0x400000000000" identifier = number_literal) ;) (expression_statement "uVar3 = (ushort)*(uint *)(param_1 + 6);" (assignment_expression "uVar3 = (ushort)*(uint *)(param_1 + 6)" identifier = (binary_expression "(ushort)*(uint *)(param_1 + 6)" (parenthesized_expression "(ushort)" ( identifier )) * (cast_expression "(uint *)(param_1 + 6)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 6)" ( (binary_expression "param_1 + 6" identifier + number_literal) ))))) ;) (expression_statement "local_c = uVar3 << 8 | uVar3 >> 8;" (assignment_expression "local_c = uVar3 << 8 | uVar3 >> 8" identifier = (binary_expression "uVar3 << 8 | uVar3 >> 8" (binary_expression "uVar3 << 8" identifier << number_literal) | (binary_expression "uVar3 >> 8" identifier >> number_literal))) ;) (if_statement "if (0xfeff < *(uint *)(param_1 + 6)) {\n    local_c = 0;\n  }" if (parenthesized_expression "(0xfeff < *(uint *)(param_1 + 6))" ( (binary_expression "0xfeff < *(uint *)(param_1 + 6)" number_literal < (pointer_expression "*(uint *)(param_1 + 6)" * (cast_expression "(uint *)(param_1 + 6)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 6)" ( (binary_expression "param_1 + 6" identifier + number_literal) ))))) )) (compound_statement "{\n    local_c = 0;\n  }" { (expression_statement "local_c = 0;" (assignment_expression "local_c = 0" identifier = number_literal) ;) })) (expression_statement "local_48 = 0x10202464c457f;" (assignment_expression "local_48 = 0x10202464c457f" identifier = number_literal) ;) (expression_statement "uStack_40 = 0;" (assignment_expression "uStack_40 = 0" identifier = number_literal) ;) (expression_statement "local_38 = 0x100;" (assignment_expression "local_38 = 0x100" identifier = number_literal) ;) (expression_statement "local_34 = 0x1000000;" (assignment_expression "local_34 = 0x1000000" identifier = number_literal) ;) (expression_statement "uVar3 = (ushort)*(uint *)(param_1 + 0xe);" (assignment_expression "uVar3 = (ushort)*(uint *)(param_1 + 0xe)" identifier = (binary_expression "(ushort)*(uint *)(param_1 + 0xe)" (parenthesized_expression "(ushort)" ( identifier )) * (cast_expression "(uint *)(param_1 + 0xe)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xe)" ( (binary_expression "param_1 + 0xe" identifier + number_literal) ))))) ;) (expression_statement "local_a = uVar3 << 8 | uVar3 >> 8;" (assignment_expression "local_a = uVar3 << 8 | uVar3 >> 8" identifier = (binary_expression "uVar3 << 8 | uVar3 >> 8" (binary_expression "uVar3 << 8" identifier << number_literal) | (binary_expression "uVar3 >> 8" identifier >> number_literal))) ;) (if_statement "if (0xfeff < *(uint *)(param_1 + 0xe)) {\n    local_a = 0xffff;\n  }" if (parenthesized_expression "(0xfeff < *(uint *)(param_1 + 0xe))" ( (binary_expression "0xfeff < *(uint *)(param_1 + 0xe)" number_literal < (pointer_expression "*(uint *)(param_1 + 0xe)" * (cast_expression "(uint *)(param_1 + 0xe)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xe)" ( (binary_expression "param_1 + 0xe" identifier + number_literal) ))))) )) (compound_statement "{\n    local_a = 0xffff;\n  }" { (expression_statement "local_a = 0xffff;" (assignment_expression "local_a = 0xffff" identifier = number_literal) ;) })) (expression_statement "local_30 = 0;" (assignment_expression "local_30 = 0" identifier = number_literal) ;) (expression_statement "local_28 = 0;" (assignment_expression "local_28 = 0" identifier = number_literal) ;) (expression_statement "local_10 = 0x40000000;" (assignment_expression "local_10 = 0x40000000" identifier = number_literal) ;) (expression_statement "fseek((FILE *)param_1[4],0,0);" (call_expression "fseek((FILE *)param_1[4],0,0)" identifier (argument_list "((FILE *)param_1[4],0,0)" ( (cast_expression "(FILE *)param_1[4]" ( (type_descriptor "FILE *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "param_1[4]" identifier [ number_literal ])) , number_literal , number_literal ))) ;) (expression_statement "sVar4 = fwrite(&local_48,1,0x40,(FILE *)param_1[4]);" (assignment_expression "sVar4 = fwrite(&local_48,1,0x40,(FILE *)param_1[4])" identifier = (call_expression "fwrite(&local_48,1,0x40,(FILE *)param_1[4])" identifier (argument_list "(&local_48,1,0x40,(FILE *)param_1[4])" ( (pointer_expression "&local_48" & identifier) , number_literal , number_literal , (cast_expression "(FILE *)param_1[4]" ( (type_descriptor "FILE *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "param_1[4]" identifier [ number_literal ])) )))) ;) (if_statement "if (0x3f < sVar4) {\n    return;\n  }" if (parenthesized_expression "(0x3f < sVar4)" ( (binary_expression "0x3f < sVar4" number_literal < identifier) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) (expression_statement "uVar2 = *param_1;" (assignment_expression "uVar2 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (expression_statement "uVar5 = gettext("%s: error writing ELF header");" (assignment_expression "uVar5 = gettext("%s: error writing ELF header")" identifier = (call_expression "gettext("%s: error writing ELF header")" identifier (argument_list "("%s: error writing ELF header")" ( (string_literal ""%s: error writing ELF header"" " string_content ") )))) ;) (expression_statement "FUN_001781e0(uVar5,uVar2);" (call_expression "FUN_001781e0(uVar5,uVar2)" identifier (argument_list "(uVar5,uVar2)" ( identifier , identifier ))) ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) << LIT) | (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) >> LIT))) ;) (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression (binary_expression (binary_expression (binary_expression (binary_expression (binary_expression (binary_expression IDENT >> LIT) | (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) >> LIT)) | (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) >> LIT)) | (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) >> LIT)) | (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) << LIT)) | (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) << LIT)) | (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) << LIT)) | (binary_expression IDENT << LIT))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (binary_expression (parenthesized_expression ( IDENT )) * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression IDENT << LIT) | (binary_expression IDENT >> LIT))) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) })) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (binary_expression (parenthesized_expression ( IDENT )) * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression IDENT << LIT) | (binary_expression IDENT >> LIT))) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) })) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (call_expression IDENT (argument_list ( (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (subscript_expression IDENT [ LIT ])) , LIT , LIT ))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (pointer_expression & IDENT) , LIT , LIT , (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (subscript_expression IDENT [ LIT ])) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (compound_statement { (return_statement return ;) })) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (string_literal " string_content ") )))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT ))) ;) })))
(function_definition "void FUN_001606c0(undefined8 *param_1)\n\n{\n  ulong uVar1;\n  undefined8 uVar2;\n  ushort uVar3;\n  size_t sVar4;\n  undefined8 uVar5;\n  undefined8 local_48;\n  undefined8 uStack_40;\n  undefined2 local_38;\n  ushort local_36;\n  undefined4 local_34;\n  undefined8 local_30;\n  undefined8 local_28;\n  ulong local_20;\n  undefined8 local_18;\n  undefined4 local_10;\n  ushort local_c;\n  ushort local_a;\n  \n  local_36 = *(ushort *)(param_1 + 1) << 8 | *(ushort *)(param_1 + 1) >> 8;\n  uVar1 = param_1[0xd];\n  local_20 = uVar1 >> 0x38 | (uVar1 & 0xff000000000000) >> 0x28 | (uVar1 & 0xff0000000000) >> 0x18 |\n             (uVar1 & 0xff00000000) >> 8 | (uVar1 & 0xff000000) << 8 | (uVar1 & 0xff0000) << 0x18 |\n             (uVar1 & 0xff00) << 0x28 | uVar1 << 0x38;\n  local_18 = 0x400000000000;\n  uVar3 = (ushort)*(uint *)(param_1 + 6);\n  local_c = uVar3 << 8 | uVar3 >> 8;\n  if (0xfeff < *(uint *)(param_1 + 6)) {\n    local_c = 0;\n  }\n  local_48 = 0x10202464c457f;\n  uStack_40 = 0;\n  local_38 = 0x100;\n  local_34 = 0x1000000;\n  uVar3 = (ushort)*(uint *)(param_1 + 0xe);\n  local_a = uVar3 << 8 | uVar3 >> 8;\n  if (0xfeff < *(uint *)(param_1 + 0xe)) {\n    local_a = 0xffff;\n  }\n  local_30 = 0;\n  local_28 = 0;\n  local_10 = 0x40000000;\n  fseek((FILE *)param_1[4],0,0);\n  sVar4 = fwrite(&local_48,1,0x40,(FILE *)param_1[4]);\n  if (0x3f < sVar4) {\n    return;\n  }\n  uVar2 = *param_1;\n  uVar5 = gettext("%s: error writing ELF header");\n                    \n  FUN_001781e0(uVar5,uVar2);\n}" (primitive_type "void") (function_declarator "FUN_001606c0(undefined8 *param_1)" (identifier "FUN_001606c0") (parameter_list "(undefined8 *param_1)" (( "(") (parameter_declaration "undefined8 *param_1" (type_identifier "undefined8") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) () ")"))) (compound_statement "{\n  ulong uVar1;\n  undefined8 uVar2;\n  ushort uVar3;\n  size_t sVar4;\n  undefined8 uVar5;\n  undefined8 local_48;\n  undefined8 uStack_40;\n  undefined2 local_38;\n  ushort local_36;\n  undefined4 local_34;\n  undefined8 local_30;\n  undefined8 local_28;\n  ulong local_20;\n  undefined8 local_18;\n  undefined4 local_10;\n  ushort local_c;\n  ushort local_a;\n  \n  local_36 = *(ushort *)(param_1 + 1) << 8 | *(ushort *)(param_1 + 1) >> 8;\n  uVar1 = param_1[0xd];\n  local_20 = uVar1 >> 0x38 | (uVar1 & 0xff000000000000) >> 0x28 | (uVar1 & 0xff0000000000) >> 0x18 |\n             (uVar1 & 0xff00000000) >> 8 | (uVar1 & 0xff000000) << 8 | (uVar1 & 0xff0000) << 0x18 |\n             (uVar1 & 0xff00) << 0x28 | uVar1 << 0x38;\n  local_18 = 0x400000000000;\n  uVar3 = (ushort)*(uint *)(param_1 + 6);\n  local_c = uVar3 << 8 | uVar3 >> 8;\n  if (0xfeff < *(uint *)(param_1 + 6)) {\n    local_c = 0;\n  }\n  local_48 = 0x10202464c457f;\n  uStack_40 = 0;\n  local_38 = 0x100;\n  local_34 = 0x1000000;\n  uVar3 = (ushort)*(uint *)(param_1 + 0xe);\n  local_a = uVar3 << 8 | uVar3 >> 8;\n  if (0xfeff < *(uint *)(param_1 + 0xe)) {\n    local_a = 0xffff;\n  }\n  local_30 = 0;\n  local_28 = 0;\n  local_10 = 0x40000000;\n  fseek((FILE *)param_1[4],0,0);\n  sVar4 = fwrite(&local_48,1,0x40,(FILE *)param_1[4]);\n  if (0x3f < sVar4) {\n    return;\n  }\n  uVar2 = *param_1;\n  uVar5 = gettext("%s: error writing ELF header");\n                    \n  FUN_001781e0(uVar5,uVar2);\n}" ({ "{") (declaration "ulong uVar1;" (type_identifier "ulong") (identifier "uVar1") (; ";")) (declaration "undefined8 uVar2;" (type_identifier "undefined8") (identifier "uVar2") (; ";")) (declaration "ushort uVar3;" (type_identifier "ushort") (identifier "uVar3") (; ";")) (declaration "size_t sVar4;" (primitive_type "size_t") (identifier "sVar4") (; ";")) (declaration "undefined8 uVar5;" (type_identifier "undefined8") (identifier "uVar5") (; ";")) (declaration "undefined8 local_48;" (type_identifier "undefined8") (identifier "local_48") (; ";")) (declaration "undefined8 uStack_40;" (type_identifier "undefined8") (identifier "uStack_40") (; ";")) (declaration "undefined2 local_38;" (type_identifier "undefined2") (identifier "local_38") (; ";")) (declaration "ushort local_36;" (type_identifier "ushort") (identifier "local_36") (; ";")) (declaration "undefined4 local_34;" (type_identifier "undefined4") (identifier "local_34") (; ";")) (declaration "undefined8 local_30;" (type_identifier "undefined8") (identifier "local_30") (; ";")) (declaration "undefined8 local_28;" (type_identifier "undefined8") (identifier "local_28") (; ";")) (declaration "ulong local_20;" (type_identifier "ulong") (identifier "local_20") (; ";")) (declaration "undefined8 local_18;" (type_identifier "undefined8") (identifier "local_18") (; ";")) (declaration "undefined4 local_10;" (type_identifier "undefined4") (identifier "local_10") (; ";")) (declaration "ushort local_c;" (type_identifier "ushort") (identifier "local_c") (; ";")) (declaration "ushort local_a;" (type_identifier "ushort") (identifier "local_a") (; ";")) (expression_statement "local_36 = *(ushort *)(param_1 + 1) << 8 | *(ushort *)(param_1 + 1) >> 8;" (assignment_expression "local_36 = *(ushort *)(param_1 + 1) << 8 | *(ushort *)(param_1 + 1) >> 8" (identifier "local_36") (= "=") (binary_expression "*(ushort *)(param_1 + 1) << 8 | *(ushort *)(param_1 + 1) >> 8" (binary_expression "*(ushort *)(param_1 + 1) << 8" (pointer_expression "*(ushort *)(param_1 + 1)" (* "*") (cast_expression "(ushort *)(param_1 + 1)" (( "(") (type_descriptor "ushort *" (type_identifier "ushort") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 1)" (( "(") (binary_expression "param_1 + 1" (identifier "param_1") (+ "+") (number_literal "1")) () ")")))) (<< "<<") (number_literal "8")) (| "|") (binary_expression "*(ushort *)(param_1 + 1) >> 8" (pointer_expression "*(ushort *)(param_1 + 1)" (* "*") (cast_expression "(ushort *)(param_1 + 1)" (( "(") (type_descriptor "ushort *" (type_identifier "ushort") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 1)" (( "(") (binary_expression "param_1 + 1" (identifier "param_1") (+ "+") (number_literal "1")) () ")")))) (>> ">>") (number_literal "8")))) (; ";")) (expression_statement "uVar1 = param_1[0xd];" (assignment_expression "uVar1 = param_1[0xd]" (identifier "uVar1") (= "=") (subscript_expression "param_1[0xd]" (identifier "param_1") ([ "[") (number_literal "0xd") (] "]"))) (; ";")) (expression_statement "local_20 = uVar1 >> 0x38 | (uVar1 & 0xff000000000000) >> 0x28 | (uVar1 & 0xff0000000000) >> 0x18 |\n             (uVar1 & 0xff00000000) >> 8 | (uVar1 & 0xff000000) << 8 | (uVar1 & 0xff0000) << 0x18 |\n             (uVar1 & 0xff00) << 0x28 | uVar1 << 0x38;" (assignment_expression "local_20 = uVar1 >> 0x38 | (uVar1 & 0xff000000000000) >> 0x28 | (uVar1 & 0xff0000000000) >> 0x18 |\n             (uVar1 & 0xff00000000) >> 8 | (uVar1 & 0xff000000) << 8 | (uVar1 & 0xff0000) << 0x18 |\n             (uVar1 & 0xff00) << 0x28 | uVar1 << 0x38" (identifier "local_20") (= "=") (binary_expression "uVar1 >> 0x38 | (uVar1 & 0xff000000000000) >> 0x28 | (uVar1 & 0xff0000000000) >> 0x18 |\n             (uVar1 & 0xff00000000) >> 8 | (uVar1 & 0xff000000) << 8 | (uVar1 & 0xff0000) << 0x18 |\n             (uVar1 & 0xff00) << 0x28 | uVar1 << 0x38" (binary_expression "uVar1 >> 0x38 | (uVar1 & 0xff000000000000) >> 0x28 | (uVar1 & 0xff0000000000) >> 0x18 |\n             (uVar1 & 0xff00000000) >> 8 | (uVar1 & 0xff000000) << 8 | (uVar1 & 0xff0000) << 0x18 |\n             (uVar1 & 0xff00) << 0x28" (binary_expression "uVar1 >> 0x38 | (uVar1 & 0xff000000000000) >> 0x28 | (uVar1 & 0xff0000000000) >> 0x18 |\n             (uVar1 & 0xff00000000) >> 8 | (uVar1 & 0xff000000) << 8 | (uVar1 & 0xff0000) << 0x18" (binary_expression "uVar1 >> 0x38 | (uVar1 & 0xff000000000000) >> 0x28 | (uVar1 & 0xff0000000000) >> 0x18 |\n             (uVar1 & 0xff00000000) >> 8 | (uVar1 & 0xff000000) << 8" (binary_expression "uVar1 >> 0x38 | (uVar1 & 0xff000000000000) >> 0x28 | (uVar1 & 0xff0000000000) >> 0x18 |\n             (uVar1 & 0xff00000000) >> 8" (binary_expression "uVar1 >> 0x38 | (uVar1 & 0xff000000000000) >> 0x28 | (uVar1 & 0xff0000000000) >> 0x18" (binary_expression "uVar1 >> 0x38 | (uVar1 & 0xff000000000000) >> 0x28" (binary_expression "uVar1 >> 0x38" (identifier "uVar1") (>> ">>") (number_literal "0x38")) (| "|") (binary_expression "(uVar1 & 0xff000000000000) >> 0x28" (parenthesized_expression "(uVar1 & 0xff000000000000)" (( "(") (binary_expression "uVar1 & 0xff000000000000" (identifier "uVar1") (& "&") (number_literal "0xff000000000000")) () ")")) (>> ">>") (number_literal "0x28"))) (| "|") (binary_expression "(uVar1 & 0xff0000000000) >> 0x18" (parenthesized_expression "(uVar1 & 0xff0000000000)" (( "(") (binary_expression "uVar1 & 0xff0000000000" (identifier "uVar1") (& "&") (number_literal "0xff0000000000")) () ")")) (>> ">>") (number_literal "0x18"))) (| "|") (binary_expression "(uVar1 & 0xff00000000) >> 8" (parenthesized_expression "(uVar1 & 0xff00000000)" (( "(") (binary_expression "uVar1 & 0xff00000000" (identifier "uVar1") (& "&") (number_literal "0xff00000000")) () ")")) (>> ">>") (number_literal "8"))) (| "|") (binary_expression "(uVar1 & 0xff000000) << 8" (parenthesized_expression "(uVar1 & 0xff000000)" (( "(") (binary_expression "uVar1 & 0xff000000" (identifier "uVar1") (& "&") (number_literal "0xff000000")) () ")")) (<< "<<") (number_literal "8"))) (| "|") (binary_expression "(uVar1 & 0xff0000) << 0x18" (parenthesized_expression "(uVar1 & 0xff0000)" (( "(") (binary_expression "uVar1 & 0xff0000" (identifier "uVar1") (& "&") (number_literal "0xff0000")) () ")")) (<< "<<") (number_literal "0x18"))) (| "|") (binary_expression "(uVar1 & 0xff00) << 0x28" (parenthesized_expression "(uVar1 & 0xff00)" (( "(") (binary_expression "uVar1 & 0xff00" (identifier "uVar1") (& "&") (number_literal "0xff00")) () ")")) (<< "<<") (number_literal "0x28"))) (| "|") (binary_expression "uVar1 << 0x38" (identifier "uVar1") (<< "<<") (number_literal "0x38")))) (; ";")) (expression_statement "local_18 = 0x400000000000;" (assignment_expression "local_18 = 0x400000000000" (identifier "local_18") (= "=") (number_literal "0x400000000000")) (; ";")) (expression_statement "uVar3 = (ushort)*(uint *)(param_1 + 6);" (assignment_expression "uVar3 = (ushort)*(uint *)(param_1 + 6)" (identifier "uVar3") (= "=") (binary_expression "(ushort)*(uint *)(param_1 + 6)" (parenthesized_expression "(ushort)" (( "(") (identifier "ushort") () ")")) (* "*") (cast_expression "(uint *)(param_1 + 6)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 6)" (( "(") (binary_expression "param_1 + 6" (identifier "param_1") (+ "+") (number_literal "6")) () ")"))))) (; ";")) (expression_statement "local_c = uVar3 << 8 | uVar3 >> 8;" (assignment_expression "local_c = uVar3 << 8 | uVar3 >> 8" (identifier "local_c") (= "=") (binary_expression "uVar3 << 8 | uVar3 >> 8" (binary_expression "uVar3 << 8" (identifier "uVar3") (<< "<<") (number_literal "8")) (| "|") (binary_expression "uVar3 >> 8" (identifier "uVar3") (>> ">>") (number_literal "8")))) (; ";")) (if_statement "if (0xfeff < *(uint *)(param_1 + 6)) {\n    local_c = 0;\n  }" (if "if") (parenthesized_expression "(0xfeff < *(uint *)(param_1 + 6))" (( "(") (binary_expression "0xfeff < *(uint *)(param_1 + 6)" (number_literal "0xfeff") (< "<") (pointer_expression "*(uint *)(param_1 + 6)" (* "*") (cast_expression "(uint *)(param_1 + 6)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 6)" (( "(") (binary_expression "param_1 + 6" (identifier "param_1") (+ "+") (number_literal "6")) () ")"))))) () ")")) (compound_statement "{\n    local_c = 0;\n  }" ({ "{") (expression_statement "local_c = 0;" (assignment_expression "local_c = 0" (identifier "local_c") (= "=") (number_literal "0")) (; ";")) (} "}"))) (expression_statement "local_48 = 0x10202464c457f;" (assignment_expression "local_48 = 0x10202464c457f" (identifier "local_48") (= "=") (number_literal "0x10202464c457f")) (; ";")) (expression_statement "uStack_40 = 0;" (assignment_expression "uStack_40 = 0" (identifier "uStack_40") (= "=") (number_literal "0")) (; ";")) (expression_statement "local_38 = 0x100;" (assignment_expression "local_38 = 0x100" (identifier "local_38") (= "=") (number_literal "0x100")) (; ";")) (expression_statement "local_34 = 0x1000000;" (assignment_expression "local_34 = 0x1000000" (identifier "local_34") (= "=") (number_literal "0x1000000")) (; ";")) (expression_statement "uVar3 = (ushort)*(uint *)(param_1 + 0xe);" (assignment_expression "uVar3 = (ushort)*(uint *)(param_1 + 0xe)" (identifier "uVar3") (= "=") (binary_expression "(ushort)*(uint *)(param_1 + 0xe)" (parenthesized_expression "(ushort)" (( "(") (identifier "ushort") () ")")) (* "*") (cast_expression "(uint *)(param_1 + 0xe)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xe)" (( "(") (binary_expression "param_1 + 0xe" (identifier "param_1") (+ "+") (number_literal "0xe")) () ")"))))) (; ";")) (expression_statement "local_a = uVar3 << 8 | uVar3 >> 8;" (assignment_expression "local_a = uVar3 << 8 | uVar3 >> 8" (identifier "local_a") (= "=") (binary_expression "uVar3 << 8 | uVar3 >> 8" (binary_expression "uVar3 << 8" (identifier "uVar3") (<< "<<") (number_literal "8")) (| "|") (binary_expression "uVar3 >> 8" (identifier "uVar3") (>> ">>") (number_literal "8")))) (; ";")) (if_statement "if (0xfeff < *(uint *)(param_1 + 0xe)) {\n    local_a = 0xffff;\n  }" (if "if") (parenthesized_expression "(0xfeff < *(uint *)(param_1 + 0xe))" (( "(") (binary_expression "0xfeff < *(uint *)(param_1 + 0xe)" (number_literal "0xfeff") (< "<") (pointer_expression "*(uint *)(param_1 + 0xe)" (* "*") (cast_expression "(uint *)(param_1 + 0xe)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xe)" (( "(") (binary_expression "param_1 + 0xe" (identifier "param_1") (+ "+") (number_literal "0xe")) () ")"))))) () ")")) (compound_statement "{\n    local_a = 0xffff;\n  }" ({ "{") (expression_statement "local_a = 0xffff;" (assignment_expression "local_a = 0xffff" (identifier "local_a") (= "=") (number_literal "0xffff")) (; ";")) (} "}"))) (expression_statement "local_30 = 0;" (assignment_expression "local_30 = 0" (identifier "local_30") (= "=") (number_literal "0")) (; ";")) (expression_statement "local_28 = 0;" (assignment_expression "local_28 = 0" (identifier "local_28") (= "=") (number_literal "0")) (; ";")) (expression_statement "local_10 = 0x40000000;" (assignment_expression "local_10 = 0x40000000" (identifier "local_10") (= "=") (number_literal "0x40000000")) (; ";")) (expression_statement "fseek((FILE *)param_1[4],0,0);" (call_expression "fseek((FILE *)param_1[4],0,0)" (identifier "fseek") (argument_list "((FILE *)param_1[4],0,0)" (( "(") (cast_expression "(FILE *)param_1[4]" (( "(") (type_descriptor "FILE *" (type_identifier "FILE") (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "param_1[4]" (identifier "param_1") ([ "[") (number_literal "4") (] "]"))) (, ",") (number_literal "0") (, ",") (number_literal "0") () ")"))) (; ";")) (expression_statement "sVar4 = fwrite(&local_48,1,0x40,(FILE *)param_1[4]);" (assignment_expression "sVar4 = fwrite(&local_48,1,0x40,(FILE *)param_1[4])" (identifier "sVar4") (= "=") (call_expression "fwrite(&local_48,1,0x40,(FILE *)param_1[4])" (identifier "fwrite") (argument_list "(&local_48,1,0x40,(FILE *)param_1[4])" (( "(") (pointer_expression "&local_48" (& "&") (identifier "local_48")) (, ",") (number_literal "1") (, ",") (number_literal "0x40") (, ",") (cast_expression "(FILE *)param_1[4]" (( "(") (type_descriptor "FILE *" (type_identifier "FILE") (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "param_1[4]" (identifier "param_1") ([ "[") (number_literal "4") (] "]"))) () ")")))) (; ";")) (if_statement "if (0x3f < sVar4) {\n    return;\n  }" (if "if") (parenthesized_expression "(0x3f < sVar4)" (( "(") (binary_expression "0x3f < sVar4" (number_literal "0x3f") (< "<") (identifier "sVar4")) () ")")) (compound_statement "{\n    return;\n  }" ({ "{") (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "uVar2 = *param_1;" (assignment_expression "uVar2 = *param_1" (identifier "uVar2") (= "=") (pointer_expression "*param_1" (* "*") (identifier "param_1"))) (; ";")) (expression_statement "uVar5 = gettext("%s: error writing ELF header");" (assignment_expression "uVar5 = gettext("%s: error writing ELF header")" (identifier "uVar5") (= "=") (call_expression "gettext("%s: error writing ELF header")" (identifier "gettext") (argument_list "("%s: error writing ELF header")" (( "(") (string_literal ""%s: error writing ELF header"" (" """) (string_content "%s: error writing ELF header") (" """)) () ")")))) (; ";")) (expression_statement "FUN_001781e0(uVar5,uVar2);" (call_expression "FUN_001781e0(uVar5,uVar2)" (identifier "FUN_001781e0") (argument_list "(uVar5,uVar2)" (( "(") (identifier "uVar5") (, ",") (identifier "uVar2") () ")"))) (; ";")) (} "}")))

/* DWARF original name: sized_write_ehdr<64, true>
   DWARF original prototype: void sized_write_ehdr<64,_true>(Dwp_output_file * this) */

void __thiscall gold::Dwp_output_file::sized_write_ehdr<64,_true>(Dwp_output_file *this)

{
  ulong var_2;
  char *pcVar2;
  type_1 var_1;
  size_t var_5;
  char *format;
  type_2 e_ident [16];
  type_2 buf [64];
  
  var_1 = (type_1)this->machine_;
  buf._18_2_ = var_1 << 8 | var_1 >> 8;
  var_2 = this->shoff_;
  buf._40_8_ = var_2 >> 0x38 | (var_2 & 0xff000000000000) >> 0x28 | (var_2 & 0xff0000000000) >> 0x18
               | (var_2 & 0xff00000000) >> 8 | (var_2 & 0xff000000) << 8 |
               (var_2 & 0xff0000) << 0x18 | (var_2 & 0xff00) << 0x28 | var_2 << 0x38;
  buf[0x30] = '\0';
  buf[0x31] = '\0';
  buf[0x32] = '\0';
  buf[0x33] = '\0';
  buf[0x34] = '\0';
  buf[0x35] = '@';
  buf[0x36] = '\0';
  buf[0x37] = '\0';
  var_1 = (type_1)this->shnum_;
  buf._60_2_ = var_1 << 8 | var_1 >> 8;
  if (0xfeff < this->shnum_) {
    buf._60_2_ = 0;
  }
  buf[0] = '\x7f';
  buf[1] = 'E';
  buf[2] = 'L';
  buf[3] = 'F';
  buf[4] = '\x02';
  buf[5] = '\x02';
  buf[6] = '\x01';
  buf[7] = '\0';
  buf[8] = '\0';
  buf[9] = '\0';
  buf[10] = '\0';
  buf[0xb] = '\0';
  buf[0xc] = '\0';
  buf[0xd] = '\0';
  buf[0xe] = '\0';
  buf[0xf] = '\0';
  buf[0x10] = '\0';
  buf[0x11] = '\x01';
  buf[0x14] = '\0';
  buf[0x15] = '\0';
  buf[0x16] = '\0';
  buf[0x17] = '\x01';
  var_1 = (type_1)this->shstrndx_;
  buf._62_2_ = var_1 << 8 | var_1 >> 8;
  if (0xfeff < this->shstrndx_) {
    buf._62_2_ = 0xffff;
  }
  buf[0x18] = '\0';
  buf[0x19] = '\0';
  buf[0x1a] = '\0';
  buf[0x1b] = '\0';
  buf[0x1c] = '\0';
  buf[0x1d] = '\0';
  buf[0x1e] = '\0';
  buf[0x1f] = '\0';
  buf[0x20] = '\0';
  buf[0x21] = '\0';
  buf[0x22] = '\0';
  buf[0x23] = '\0';
  buf[0x24] = '\0';
  buf[0x25] = '\0';
  buf[0x26] = '\0';
  buf[0x27] = '\0';
  buf[0x38] = '\0';
  buf[0x39] = '\0';
  buf[0x3a] = '\0';
  buf[0x3b] = '@';
  var_3((type_3 *)this->fd_,0,0);
  var_5 = var_4(buf,1,0x40,(type_3 *)this->fd_);
  if (0x3f < var_5) {
    return;
  }
  pcVar2 = this->name_;
  format = (char *)var_6("%s: error writing ELF header");
                    /* WARNING: Subroutine does not return */
  var_7(format,pcVar2);
}


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

void MASKED(undefined8 *param_1)

{
  ulong uVar1;
  undefined8 uVar2;
  ushort uVar3;
  size_t sVar4;
  undefined8 uVar5;
  undefined8 local_48;
  undefined8 uStack_40;
  undefined2 local_38;
  ushort local_36;
  undefined4 local_34;
  undefined8 local_30;
  undefined8 local_28;
  ulong local_20;
  undefined8 local_18;
  undefined4 local_10;
  ushort local_c;
  ushort local_a;
  
  local_36 = *(ushort *)(param_1 + 1) << 8 | *(ushort *)(param_1 + 1) >> 8;
  uVar1 = param_1[0xd];
  local_20 = uVar1 >> 0x38 | (uVar1 & 0xff000000000000) >> 0x28 | (uVar1 & 0xff0000000000) >> 0x18 |
             (uVar1 & 0xff00000000) >> 8 | (uVar1 & 0xff000000) << 8 | (uVar1 & 0xff0000) << 0x18 |
             (uVar1 & 0xff00) << 0x28 | uVar1 << 0x38;
  local_18 = 0x400000000000;
  uVar3 = (ushort)*(uint *)(param_1 + 6);
  local_c = uVar3 << 8 | uVar3 >> 8;
  if (0xfeff < *(uint *)(param_1 + 6)) {
    local_c = 0;
  }
  local_48 = 0x10202464c457f;
  uStack_40 = 0;
  local_38 = 0x100;
  local_34 = 0x1000000;
  uVar3 = (ushort)*(uint *)(param_1 + 0xe);
  local_a = uVar3 << 8 | uVar3 >> 8;
  if (0xfeff < *(uint *)(param_1 + 0xe)) {
    local_a = 0xffff;
  }
  local_30 = 0;
  local_28 = 0;
  local_10 = 0x40000000;
  fseek((FILE *)param_1[4],0,0);
  sVar4 = fwrite(&local_48,1,0x40,(FILE *)param_1[4]);
  if (0x3f < sVar4) {
    return;
  }
  uVar2 = *param_1;
  uVar5 = gettext("%s: error writing ELF header");
                    /* WARNING: Subroutine does not return */
  FUN_001781e0(uVar5,uVar2);
}

