// File: /workspace/github_c_makefile_star2_O3/negge[P]xlink/src/xlink.c
// Function: xlink_module_dump_relocations
void xlink_module_dump_relocations(xlink_module *mod) {
  int i;
  for (i = 1; i <= mod->nrelocs; i++) {
    xlink_reloc *rel;
    xlink_segment *seg;
    rel = xlink_module_get_reloc(mod, i);
    seg = rel->segment;
    switch (rel->target) {
      case OMF_TARGET_EXT : {
        xlink_extern *ext;
        ext = xlink_module_get_extern(seg->module, rel->target_idx);
        printf("  FIXUPP: %6s %c seg %s off 0x%03x -> ext %13s addend %s\n",
         OMF_FIXUP_LOCATION[rel->location], rel->mode ? 'E' : 'R',
         xlink_segment_get_name(seg), rel->offset, xlink_extern_get_name(ext),
         xlink_reloc_get_addend(rel));
        break;
      }
      case OMF_TARGET_SEG : {
        xlink_segment *target;
        target = xlink_module_get_segment(seg->module, rel->target_idx);
        printf(
         "  FIXUPP: %6s %c seg %s off 0x%03x -> ",
         OMF_FIXUP_LOCATION[rel->location], rel->mode ? 'E' : 'R',
         xlink_segment_get_name(seg), rel->offset);
        printf("seg %8s off 0x0 addend %s\n",
         xlink_segment_get_name(target), xlink_reloc_get_addend(rel));
        break;
      }
      default : {
        XLINK_ERROR(1, ("Unsupported target T%i", rel->target));
      }
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
cmpl $0x0, 0x180(%rdi)
jle 0x45d4
xorl %r13d, %r13d
movq %rdi, 0x10(%rsp)
incl %r13d
movl %r13d, %esi
callq 0x319c
movq %rax, %rbp
movq 0x10(%rax), %r15
movl 0x28(%rax), %esi
cmpl $0x4, %esi
je 0x4519
cmpl $0x6, %esi
jne 0x45e3
movq 0x8(%r15), %rdi
movl 0x30(%rbp), %esi
callq 0x30ee
movq %rax, %r14
cmpl $0x0, 0x1c(%rbp)
movl 0x20(%rbp), %eax
movl $0x45, %r12d
movl $0x52, %ecx
cmovel %ecx, %r12d
leaq 0xb6c0(%rip), %rcx      # 0xfb50
movq (%rcx,%rax,8), %rax
movq %rax, 0x8(%rsp)
movq 0x20(%r15), %rdx
addq $0x10, %rdx
movl (%r15), %ecx
leaq 0xeb85(%rip), %rdi      # 0x13030
leaq 0x66ae(%rip), %r15      # 0xab60
movq %r15, %rsi
xorl %eax, %eax
callq 0x21e0
movl 0x18(%rbp), %ebx
movl (%r14), %ecx
addq $0x10, %r14
leaq 0xee63(%rip), %rdi      # 0x13330
movq %r15, %rsi
movq %r14, %rdx
xorl %eax, %eax
callq 0x21e0
movq %rbp, %rdi
callq 0x28ed
leaq 0xef47(%rip), %rax      # 0x13430
movq %rax, (%rsp)
leaq 0x64de(%rip), %rdi      # 0xa9d2
movq 0x8(%rsp), %rsi
movl %r12d, %edx
leaq 0xeb2d(%rip), %rcx      # 0x13030
movl %ebx, %r8d
leaq 0xee23(%rip), %r9       # 0x13330
xorl %eax, %eax
callq 0x20c0
jmp 0x45c2
movq 0x8(%r15), %rdi
movl 0x30(%rbp), %esi
callq 0x2e36
movq %rax, %r12
cmpl $0x0, 0x1c(%rbp)
movl 0x20(%rbp), %eax
movl $0x45, %ebx
movl $0x52, %ecx
cmovel %ecx, %ebx
leaq 0xb60d(%rip), %rcx      # 0xfb50
movq (%rcx,%rax,8), %r14
movq 0x20(%r15), %rdx
addq $0x10, %rdx
movl (%r15), %ecx
leaq 0xead7(%rip), %r15      # 0x13030
movq %r15, %rdi
leaq 0x65fd(%rip), %rsi      # 0xab60
xorl %eax, %eax
callq 0x21e0
movl 0x18(%rbp), %r8d
leaq 0x6497(%rip), %rdi      # 0xaa0c
movq %r14, %rsi
movl %ebx, %edx
movq %r15, %rcx
xorl %eax, %eax
callq 0x20c0
movq 0x20(%r12), %rdx
addq $0x10, %rdx
movl (%r12), %ecx
movq %r15, %rdi
leaq 0x65c5(%rip), %rsi      # 0xab60
xorl %eax, %eax
callq 0x21e0
movq %rbp, %rdi
callq 0x28ed
leaq 0x6482(%rip), %rdi      # 0xaa33
movq %r15, %rsi
leaq 0xee75(%rip), %rdx      # 0x13430
xorl %eax, %eax
callq 0x20c0
movq 0x10(%rsp), %rdi
cmpl 0x180(%rdi), %r13d
jl 0x443d
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x6217(%rip), %rdi      # 0xa801
xorl %eax, %eax
callq 0x22ef
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x21f0