// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movl $0x1, -0xc(%rbp)
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x180(%rcx), %eax
jg 0x590a
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x3b20
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movl 0x28(%rax), %eax
movl %eax, -0x34(%rbp)
subl $0x4, %eax
je 0x5839
jmp 0x578a
movl -0x34(%rbp), %eax
subl $0x6, %eax
jne 0x58d9
jmp 0x5798
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x18(%rbp), %rax
movl 0x30(%rax), %esi
callq 0x39c0
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movl 0x20(%rax), %eax
movl %eax, %ecx
leaq 0x118e0(%rip), %rax     # 0x170a0
movq (%rax,%rcx,8), %rax
movq %rax, -0x60(%rbp)
movq -0x18(%rbp), %rax
movl 0x1c(%rax), %edx
movl $0x52, %eax
movl $0x45, %ecx
cmpl $0x0, %edx
cmovnel %ecx, %eax
movl %eax, -0x54(%rbp)
movq -0x20(%rbp), %rdi
callq 0x2760
movq %rax, -0x50(%rbp)
movq -0x18(%rbp), %rax
movl 0x18(%rax), %eax
movl %eax, -0x44(%rbp)
movq -0x28(%rbp), %rdi
callq 0x2a90
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rdi
callq 0x2b40
movq -0x60(%rbp), %rsi
movl -0x54(%rbp), %edx
movq -0x50(%rbp), %rcx
movl -0x44(%rbp), %r8d
movq -0x40(%rbp), %r9
leaq 0x94c4(%rip), %rdi      # 0xeced
movq %rax, (%rsp)
movb $0x0, %al
callq 0x20a0
jmp 0x58fa
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x18(%rbp), %rax
movl 0x30(%rax), %esi
callq 0x3440
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rax
movl 0x20(%rax), %eax
movl %eax, %ecx
leaq 0x1183f(%rip), %rax     # 0x170a0
movq (%rax,%rcx,8), %rax
movq %rax, -0x78(%rbp)
movq -0x18(%rbp), %rax
movl 0x1c(%rax), %edx
movl $0x52, %eax
movl $0x45, %ecx
cmpl $0x0, %edx
cmovnel %ecx, %eax
movl %eax, -0x6c(%rbp)
movq -0x20(%rbp), %rdi
callq 0x2760
movq -0x78(%rbp), %rsi
movl -0x6c(%rbp), %edx
movq %rax, %rcx
movq -0x18(%rbp), %rax
movl 0x18(%rax), %r8d
leaq 0x9482(%rip), %rdi      # 0xed27
movb $0x0, %al
callq 0x20a0
movq -0x30(%rbp), %rdi
callq 0x2760
movq %rax, -0x68(%rbp)
movq -0x18(%rbp), %rdi
callq 0x2b40
movq -0x68(%rbp), %rsi
movq %rax, %rdx
leaq 0x947e(%rip), %rdi      # 0xed4e
movb $0x0, %al
callq 0x20a0
jmp 0x58fa
jmp 0x58db
movq -0x18(%rbp), %rax
movl 0x28(%rax), %esi
leaq 0x91b0(%rip), %rdi      # 0xea99
movb $0x0, %al
callq 0xad90
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x21c0
jmp 0x58fc
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x5746
addq $0x80, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)