// File: /workspace/github_c_makefile_star2_O1/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 0x460d
xorl %r13d, %r13d
movq %rdi, 0x10(%rsp)
incl %r13d
movl %r13d, %esi
callq 0x31b8
movq %rax, %rbp
movq 0x10(%rax), %r15
movl 0x28(%rax), %esi
cmpl $0x4, %esi
je 0x4552
cmpl $0x6, %esi
jne 0x461c
movq 0x8(%r15), %rdi
movl 0x30(%rbp), %esi
callq 0x3106
movq %rax, %r14
cmpl $0x0, 0x1c(%rbp)
movl 0x20(%rbp), %eax
movl $0x45, %r12d
movl $0x52, %ecx
cmovel %ecx, %r12d
leaq 0xb687(%rip), %rcx      # 0xfb50
movq (%rcx,%rax,8), %rax
movq %rax, 0x8(%rsp)
movq 0x20(%r15), %rdx
addq $0x10, %rdx
movl (%r15), %ecx
leaq 0xeb4c(%rip), %rdi      # 0x13030
leaq 0x6675(%rip), %r15      # 0xab60
movq %r15, %rsi
xorl %eax, %eax
callq 0x21e0
movl 0x18(%rbp), %ebx
movl (%r14), %ecx
addq $0x10, %r14
leaq 0xee2a(%rip), %rdi      # 0x13330
movq %r15, %rsi
movq %r14, %rdx
xorl %eax, %eax
callq 0x21e0
movq %rbp, %rdi
callq 0x28f1
leaq 0xef0e(%rip), %rax      # 0x13430
movq %rax, (%rsp)
leaq 0x64a5(%rip), %rdi      # 0xa9d2
movq 0x8(%rsp), %rsi
movl %r12d, %edx
leaq 0xeaf4(%rip), %rcx      # 0x13030
movl %ebx, %r8d
leaq 0xedea(%rip), %r9       # 0x13330
xorl %eax, %eax
callq 0x20c0
jmp 0x45fb
movq 0x8(%r15), %rdi
movl 0x30(%rbp), %esi
callq 0x2e3e
movq %rax, %r12
cmpl $0x0, 0x1c(%rbp)
movl 0x20(%rbp), %eax
movl $0x45, %ebx
movl $0x52, %ecx
cmovel %ecx, %ebx
leaq 0xb5d4(%rip), %rcx      # 0xfb50
movq (%rcx,%rax,8), %r14
movq 0x20(%r15), %rdx
addq $0x10, %rdx
movl (%r15), %ecx
leaq 0xea9e(%rip), %r15      # 0x13030
movq %r15, %rdi
leaq 0x65c4(%rip), %rsi      # 0xab60
xorl %eax, %eax
callq 0x21e0
movl 0x18(%rbp), %r8d
leaq 0x645e(%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 0x658c(%rip), %rsi      # 0xab60
xorl %eax, %eax
callq 0x21e0
movq %rbp, %rdi
callq 0x28f1
leaq 0x6449(%rip), %rdi      # 0xaa33
movq %r15, %rsi
leaq 0xee3c(%rip), %rdx      # 0x13430
xorl %eax, %eax
callq 0x20c0
movq 0x10(%rsp), %rdi
cmpl 0x180(%rdi), %r13d
jl 0x4476
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x61de(%rip), %rdi      # 0xa801
xorl %eax, %eax
callq 0x22ef
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x21f0