// File: /workspace/github_c_makefile_star2_O0/Nico01[P]obj2asm/oreport.c
// Function: list_ext
void list_ext()
{
    NODE_T          *seg_node;
    NODE_T          *ext_node;
    EXT_T           *ext_rec;
    int             data_index;

    data_index = 0;
    seg_node = start( segment_tree, RIGHT );
    while ( seg_node != segment_tree ) {
        seg_rec = (SEG_T *)seg_node->data;
        if ( stricmp(seg_rec->class->name, "DATA") == 0 ) {
            data_index = seg_rec->index;
            break;
        }
        seg_node = traverse( seg_node, RIGHT );
    }

    out_newline();
    ext_node = start( extern_tree, LEFT );
    while ( ext_node != extern_tree ) {
        ext_rec = (EXT_T *)ext_node->data;
        if ( ext_rec->used == 0 || ext_rec->used == -1 ) {
            if ( compatibility == 2 && data_index != 0 ) {
                if ( ext_rec->type == 2 || ext_rec->type == 3 ||
                     ext_rec->type == 4 || ext_rec->type == 5 ) {
                    if ( ext_rec->used == 0 ) {
                        sex_insert( data_index, ext_rec );
                        ext_rec->used = data_index;
                    }
                } else {
                    print_ext( ext_rec );
                }
            } else {
                print_ext( ext_rec );
            }
        }
        ext_node = traverse( ext_node, LEFT );
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl $0x0, -0x1c(%rbp)
leaq 0xf002(%rip), %rax      # 0x20168
movq (%rax), %rdi
movl $0x1, %esi
callq 0x16d10
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
leaq 0xefe6(%rip), %rcx      # 0x20168
cmpq (%rcx), %rax
je 0x111e1
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rcx
leaq 0xf02a(%rip), %rax      # 0x201c0
movq %rcx, (%rax)
leaq 0xf020(%rip), %rax      # 0x201c0
movq (%rax), %rax
movq 0x8(%rax), %rdi
addq $0x4, %rdi
leaq 0x6374(%rip), %rsi      # 0x17526
callq 0x9040
cmpl $0x0, %eax
jne 0x111cd
leaq 0xeffd(%rip), %rax      # 0x201c0
movq (%rax), %rax
movl (%rax), %eax
movl %eax, -0x1c(%rbp)
jmp 0x111e1
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x16d70
movq %rax, -0x8(%rbp)
jmp 0x11177
callq 0xe280
leaq 0xef93(%rip), %rax      # 0x20180
movq (%rax), %rdi
xorl %esi, %esi
callq 0x16d10
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0xef7a(%rip), %rcx      # 0x20180
cmpq (%rcx), %rax
je 0x112b5
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpl $0x0, 0x48(%rax)
je 0x1122f
movq -0x18(%rbp), %rax
cmpl $-0x1, 0x48(%rax)
jne 0x112a1
leaq 0xee92(%rip), %rax      # 0x200c8
cmpl $0x2, (%rax)
jne 0x11296
cmpl $0x0, -0x1c(%rbp)
je 0x11296
movq -0x18(%rbp), %rax
cmpl $0x2, 0x2c(%rax)
je 0x11269
movq -0x18(%rbp), %rax
cmpl $0x3, 0x2c(%rax)
je 0x11269
movq -0x18(%rbp), %rax
cmpl $0x4, 0x2c(%rax)
je 0x11269
movq -0x18(%rbp), %rax
cmpl $0x5, 0x2c(%rax)
jne 0x1128b
movq -0x18(%rbp), %rax
cmpl $0x0, 0x48(%rax)
jne 0x11289
movl -0x1c(%rbp), %edi
movq -0x18(%rbp), %rsi
callq 0x11d80
movl -0x1c(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x48(%rax)
jmp 0x11294
movq -0x18(%rbp), %rdi
callq 0x10f70
jmp 0x1129f
movq -0x18(%rbp), %rdi
callq 0x10f70
jmp 0x112a1
movq -0x10(%rbp), %rdi
xorl %esi, %esi
callq 0x16d70
movq %rax, -0x10(%rbp)
jmp 0x111fb
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)