// File: /workspace/github_c_makefile_star2_O0/negge[P]xlink/src/xlink.c
// Function: xlink_module_dump_segments
void xlink_module_dump_segments(xlink_module *mod) {
  int i, j;
  printf("Segment records:\n");
  for (i = 1; i <= mod->nsegments; i++) {
    xlink_segment *seg;
    seg = xlink_module_get_segment(mod, i);
    printf("%2i : %6s segment %s %s %s %6s 0x%04x bytes%s\n", i, seg->name->str,
     OMF_SEGDEF_ALIGN[seg->attrib.align], OMF_SEGDEF_USE[seg->attrib.proc],
     OMF_SEGDEF_COMBINE[seg->attrib.combine], xlink_segment_get_class_name(seg),
     seg->length, seg->attrib.big ? ", big" : "");
  }
  for (i = 1; i <= mod->ngroups; i++) {
    xlink_group *grp;
    grp = xlink_module_get_group(mod, i);
    printf("Group: %s\n", xlink_group_get_name(grp));
    for (j = 1; j <= grp->nsegments; j++) {
      printf("%2i : segment %8s\n", j,
       xlink_segment_get_name(xlink_group_get_segment(grp, j)));
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x68, %rsp
movq %rdi, -0x10(%rbp)
leaq 0x972a(%rip), %rdi      # 0xec8e
movb $0x0, %al
callq 0x20a0
movl $0x1, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x130(%rcx), %eax
jg 0x567a
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x3440
movq %rax, -0x20(%rbp)
movl -0x14(%rbp), %eax
movl %eax, -0x4c(%rbp)
movq -0x20(%rbp), %rax
movq 0x20(%rax), %rax
addq $0x10, %rax
movq %rax, -0x48(%rbp)
movq -0x20(%rbp), %rax
movb 0x10(%rax), %al
shrb $0x5, %al
movzbl %al, %eax
movl %eax, %ecx
leaq 0x11a4f(%rip), %rax     # 0x17010
movq (%rax,%rcx,8), %rax
movq %rax, -0x40(%rbp)
movq -0x20(%rbp), %rax
movb 0x10(%rax), %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, %ecx
leaq 0x11a72(%rip), %rax     # 0x17050
movq (%rax,%rcx,8), %rax
movq %rax, -0x38(%rbp)
movq -0x20(%rbp), %rax
movb 0x10(%rax), %al
shrb $0x2, %al
andb $0x7, %al
movzbl %al, %eax
movl %eax, %ecx
leaq 0x11a62(%rip), %rax     # 0x17060
movq (%rax,%rcx,8), %rax
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rdi
callq 0x27a0
movl -0x4c(%rbp), %esi
movq -0x48(%rbp), %rdx
movq -0x40(%rbp), %rcx
movq -0x38(%rbp), %r8
movq -0x30(%rbp), %r9
movq %rax, %r11
movq -0x20(%rbp), %rax
movl 0x1c(%rax), %r10d
movq -0x20(%rbp), %rax
movb 0x10(%rax), %al
shrb %al
andb $0x1, %al
movzbl %al, %ebx
leaq 0xa21c(%rip), %rax      # 0xf85e
leaq 0x94a4(%rip), %rdi      # 0xeaed
cmpl $0x0, %ebx
cmovneq %rdi, %rax
leaq 0x9649(%rip), %rdi      # 0xeca0
movq %r11, (%rsp)
movl %r10d, 0x8(%rsp)
movq %rax, 0x10(%rsp)
movb $0x0, %al
callq 0x20a0
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x5572
movl $0x1, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x140(%rcx), %eax
jg 0x571a
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x35a0
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
callq 0x2a50
movq %rax, %rsi
leaq 0x9618(%rip), %rdi      # 0xeccf
movb $0x0, %al
callq 0x20a0
movl $0x1, -0x18(%rbp)
movl -0x18(%rbp), %eax
movq -0x28(%rbp), %rcx
cmpl 0x20(%rcx), %eax
jg 0x570a
movl -0x18(%rbp), %eax
movl %eax, -0x50(%rbp)
movq -0x28(%rbp), %rdi
movl -0x18(%rbp), %esi
callq 0x2960
movq %rax, %rdi
callq 0x2760
movl -0x50(%rbp), %esi
movq %rax, %rdx
leaq 0x95e2(%rip), %rdi      # 0xecda
movb $0x0, %al
callq 0x20a0
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x56c5
jmp 0x570c
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x5681
addq $0x68, %rsp
popq %rbx
popq %rbp
retq
nopw %cs:(%rax,%rax)