// File: /workspace/github_c_makefile_star2_O1/ww9210[P]xnuca_final_ssp/main.c
// Function: dump_program_header_entry
void dump_program_header_entry(ELF64_FileRef file, ELF64_HeaderRef header){
    ELF64_ProgramHeaderEntryRef pHeader;
    ELF64_SectionHeaderEntryRef sHeader;
    ELF64_Half i;
    for( i = 0; i < ELF64_HeaderGetProgramHeaderEntryCount( header ); i++ )
    {
        pHeader = ELF64_FileGetProgramHeaderEntry( file, i );
        
        printf
        (
            "    ### Program header entry (%lu):\n"
            "    \n"
            "        - Segment type:                %s\n"
            "        - Segment attributes:          %lu (%s)\n"
            "        - Offset in file:              0x%016lx\n"
            "        - Virtual address in memory:   0x%016lx\n"
            "        - Size of segment in file:     %lu\n"
            "        - Size of segment in memory:   %lu\n"
            "        - Alignment of segment:        %lu\n"
            "    \n",
            ( unsigned long )i,
            ELF64_ProgramHeaderEntryGetTypeString( pHeader ),
            ( unsigned long )ELF64_ProgramHeaderEntryGetAttributes( pHeader ),
            ELF64_ProgramHeaderEntryGetAttributesString( pHeader ),
            ELF64_ProgramHeaderEntryGetFileOffset( pHeader ),
            ELF64_ProgramHeaderEntryGetMemoryVirtualAddress( pHeader ),
            ( unsigned long )ELF64_ProgramHeaderEntryGetFileSize( pHeader ),
            ( unsigned long )ELF64_ProgramHeaderEntryGetMemorySize( pHeader ),
            ( unsigned long )ELF64_ProgramHeaderEntryGetAlignment( pHeader )
        );
    }
   
    for( i = 0; i < ELF64_HeaderGetSectionHeaderEntryCount( header ); i++ )
    {
        sHeader = ELF64_FileGetSectionHeaderEntry( file, i );

        printf
        (
            "    ### Section header entry (%lu):\n"
            "    \n"
            "        - Section name:                            %s\n"
            "        - Section type:                            %s\n"
            "        - Section attributes:                      %lu (%s)\n"
            "        - Virtual address in memory:               0x%016lx\n"
            "        - Offset in file:                          %lu\n"
            "        - Size of section:                         %lu\n"
            "        - Link to other section:                   %lu\n"
            "        - Miscellaneous information:               %lu\n"
            "        - Address alignment boundary:              %lu\n"
            "        - Size of entries, if section has table:   %lu\n"
            "    \n",
            ( unsigned long )i,
            ELF64_FileGetNameOfSection( file, sHeader ),
            ELF64_SectionHeaderEntryGetTypeString( sHeader ),
            ( unsigned long )ELF64_SectionHeaderEntryGetAttributes( sHeader ),
            ELF64_SectionHeaderEntryGetAttributesString( sHeader ),
            ELF64_SectionHeaderEntryGetMemoryVirtualAddress( sHeader ),
            ( unsigned long )ELF64_SectionHeaderEntryGetFileOffset( sHeader ),
            ( unsigned long )ELF64_SectionHeaderEntryGetSectionSize( sHeader ),
            ( unsigned long )ELF64_SectionHeaderEntryGetLinkedSectionIndex( sHeader ),
            ( unsigned long )ELF64_SectionHeaderEntryGetMiscInfo( sHeader ),
            ( unsigned long )ELF64_SectionHeaderEntryGetAddressAlignmentBoundary( sHeader ),
            ( unsigned long )ELF64_SectionHeaderEntryGetEntrySize( sHeader )
        );
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
callq 0x2bd9
testw %ax, %ax
movq %rbx, -0x58(%rbp)
movq %r14, -0x50(%rbp)
je 0x1899
xorl %r12d, %r12d
movq %r14, %rdi
movl %r12d, %esi
callq 0x2bb4
movq %rax, %r14
movq %rax, %rdi
callq 0x33ac
movq %rax, -0x48(%rbp)
movq %r14, %rdi
callq 0x33f1
movl %eax, %eax
movq %rax, -0x40(%rbp)
movq %r14, %rdi
callq 0x3403
movq %rax, -0x38(%rbp)
movq %r14, %rdi
callq 0x3480
movq %rax, -0x30(%rbp)
movq %r14, %rdi
callq 0x3493
movq %rax, %r13
movq %r14, %rdi
callq 0x34a6
movq %rax, %r15
movq %r14, %rdi
callq 0x34b9
movq %rax, %rbx
movq %r14, %rdi
movq -0x50(%rbp), %r14
callq 0x34cc
movq %rax, %r10
leaq 0x2826(%rip), %rdi      # 0x407f
movq %r12, %rsi
movq -0x48(%rbp), %rdx
movq -0x40(%rbp), %rcx
movq -0x38(%rbp), %r8
movq -0x30(%rbp), %r9
xorl %eax, %eax
pushq %r10
pushq %rbx
movq -0x58(%rbp), %rbx
pushq %r15
pushq %r13
callq 0x10d0
addq $0x20, %rsp
incq %r12
movq %rbx, %rdi
callq 0x2bd9
movzwl %ax, %eax
cmpq %rax, %r12
jb 0x17e2
movq %rbx, %rdi
callq 0x2c37
testw %ax, %ax
je 0x1993
xorl %r12d, %r12d
movq %r14, %rdi
movl %r12d, %esi
callq 0x2c12
movq %rax, %r15
movq %r14, %rdi
movq %rax, %rsi
callq 0x2c70
movq %rax, -0x48(%rbp)
movq %r15, %rdi
callq 0x34df
movq %rax, -0x40(%rbp)
movq %r15, %rdi
callq 0x350a
movq %rax, -0x38(%rbp)
movq %r15, %rdi
callq 0x351d
movq %rax, -0x70(%rbp)
movq %r15, %rdi
callq 0x3581
movq %rax, -0x30(%rbp)
movq %r15, %rdi
callq 0x2d76
movq %rax, -0x68(%rbp)
movq %r15, %rdi
callq 0x3594
movq %rax, -0x60(%rbp)
movq %r15, %rdi
callq 0x2efc
movl %eax, %r14d
movq %r15, %rdi
callq 0x35a7
movl %eax, %r13d
movq %r15, %rdi
callq 0x35b9
movq %rax, %rbx
movq %r15, %rdi
callq 0x2e8a
movq %rax, %r10
subq $0x8, %rsp
leaq 0x28a0(%rip), %rdi      # 0x41e9
movq %r12, %rsi
movq -0x48(%rbp), %rdx
movq -0x40(%rbp), %rcx
movq -0x38(%rbp), %r8
movq -0x70(%rbp), %r9
xorl %eax, %eax
pushq %r10
pushq %rbx
pushq %r13
pushq %r14
movq -0x50(%rbp), %r14
pushq -0x60(%rbp)
pushq -0x68(%rbp)
pushq -0x30(%rbp)
callq 0x10d0
addq $0x40, %rsp
incq %r12
movq -0x58(%rbp), %rdi
callq 0x2c37
movzwl %ax, %eax
cmpq %rax, %r12
jb 0x18ad
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq