// File: /workspace/github_c_makefile_star2_O0/Nico01[P]obj2asm/oprocess.c
// Function: process
void process()
{
    NODE_T *seg_node;
    char            text[80];
    int             dummy;

    pub_node  = start( public_tree, RIGHT );    /* Start at beginning of */
    pub_rec   = (PUB_T *)pub_node->data;        /* Public symbols list   */

    fix_node  = start( fix_tree, RIGHT );       /* Start at beginning of */
    fix_rec   = (FIX_T *)fix_node->data;        /* Fixup records list    */

    data_node = start( data_tree, RIGHT );      /* Start at beginning of */
    data_rec = (DAT_T *)data_node->data;        /* Data record list      */

    hint_node  = start( hint_tree, RIGHT );     /* Start at beginning of */
    hint_rec   = (HINT_T *)hint_node->data;     /* Hints list            */

    sex_node = start( sex_tree, RIGHT );        /* Start at beginning of */

    if ( pass == 3 && !processor_type_comment_occurred ) {
        out_line( "", ".286p", "", "" );
        out_line( "", ".287", "", "" );
        processor_mode = 286;
    }

    /*
    ** Display all defined public values ( segment == 0 )
    */
    segment = 0;
    if ( pass == 3 && pub_rec->seg_idx == segment ) {
        out_newline();                  /* Blank line before trailings */
    }
    while ( pub_rec->seg_idx == segment ) {
        lone_public();                  /* Finish off any trailing */
        pub_advance();                  /* lone public labels      */
    }

    /*
    ** Loop through all segments
    */
    segment_mode = processor_mode;
    seg_node = start( segment_tree, RIGHT );
    while ( seg_node != segment_tree ) {
        seg_rec = (SEG_T *)seg_node->data;
        process_segment();
        seg_node = traverse( seg_node, RIGHT );
    }

    /*
    ** Finish off this module
    */
    fix_search.seg_idx    = 0;
    fix_search.dat_offset = 0;
    fix_search.offset     = 1;          /* Look for MODEND record */

    fix_rec = (FIX_T *)find( (char *)&fix_search, fix_tree, TC fix_compare, NULL );
    if ( fix_rec == NULL ) {
        if ( pass == 3 ) {
            out_newline();
            out_opcode("END");
            out_newline();
        }
    } else {
        get_target( text, fix_rec, 0, 0L, FALSE, 0, FALSE, &dummy, CS );
        if ( pass == 3 ) {
            out_newline();
            out_line( "", "END", text, "Module starting address" );
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
leaq 0xf506(%rip), %rax      # 0x20178
movq (%rax), %rdi
movl $0x1, %esi
callq 0x16d10
movq %rax, %rcx
leaq 0xf5c7(%rip), %rax      # 0x20250
movq %rcx, (%rax)
leaq 0xf5bd(%rip), %rax      # 0x20250
movq (%rax), %rax
movq 0x20(%rax), %rcx
leaq 0xf5b7(%rip), %rax      # 0x20258
movq %rcx, (%rax)
leaq 0xf4f5(%rip), %rax      # 0x201a0
movq (%rax), %rdi
movl $0x1, %esi
callq 0x16d10
movq %rax, %rcx
leaq 0xf61e(%rip), %rax      # 0x202e0
movq %rcx, (%rax)
leaq 0xf614(%rip), %rax      # 0x202e0
movq (%rax), %rax
movq 0x20(%rax), %rcx
leaq 0xf60e(%rip), %rax      # 0x202e8
movq %rcx, (%rax)
leaq 0xf4ac(%rip), %rax      # 0x20190
movq (%rax), %rdi
movl $0x1, %esi
callq 0x16d10
movq %rax, 0xfa88(%rip)      # 0x20780
movq 0xfa81(%rip), %rax      # 0x20780
movq 0x20(%rax), %rax
movq %rax, 0xfa7e(%rip)      # 0x20788
leaq 0xf497(%rip), %rax      # 0x201a8
movq (%rax), %rdi
movl $0x1, %esi
callq 0x16d10
movq %rax, %rcx
leaq 0xf590(%rip), %rax      # 0x202b8
movq %rcx, (%rax)
leaq 0xf586(%rip), %rax      # 0x202b8
movq (%rax), %rax
movq 0x20(%rax), %rcx
leaq 0xf580(%rip), %rax      # 0x202c0
movq %rcx, (%rax)
leaq 0xf43e(%rip), %rax      # 0x20188
movq (%rax), %rdi
movl $0x1, %esi
callq 0x16d10
movq %rax, 0xfa1a(%rip)      # 0x20778
leaq 0xf3d3(%rip), %rax      # 0x20138
cmpl $0x3, (%rax)
jne 0x10db5
leaq 0xf34f(%rip), %rax      # 0x200c0
cmpl $0x0, (%rax)
jne 0x10db5
leaq 0x7443(%rip), %rcx      # 0x181c0
leaq 0x7169(%rip), %rsi      # 0x17eed
movq %rcx, %rdi
movq %rcx, %rdx
callq 0xe2d0
leaq 0x742a(%rip), %rcx      # 0x181c0
leaq 0x7156(%rip), %rsi      # 0x17ef3
movq %rcx, %rdi
movq %rcx, %rdx
callq 0xe2d0
leaq 0xf305(%rip), %rax      # 0x200b4
movl $0x11e, (%rax)          # imm = 0x11E
leaq 0xf5a4(%rip), %rax      # 0x20360
movl $0x0, (%rax)
leaq 0xf36f(%rip), %rax      # 0x20138
cmpl $0x3, (%rax)
jne 0x10dea
leaq 0xf483(%rip), %rax      # 0x20258
movq (%rax), %rax
movl (%rax), %eax
leaq 0xf57f(%rip), %rcx      # 0x20360
cmpl (%rcx), %eax
jne 0x10dea
callq 0xe280
jmp 0x10dec
leaq 0xf465(%rip), %rax      # 0x20258
movq (%rax), %rax
movl (%rax), %eax
leaq 0xf561(%rip), %rcx      # 0x20360
cmpl (%rcx), %eax
jne 0x10e0f
callq 0xe4b0
callq 0xe3f0
jmp 0x10dec
leaq 0xf29e(%rip), %rax      # 0x200b4
movl (%rax), %ecx
leaq 0xf551(%rip), %rax      # 0x20370
movl %ecx, (%rax)
leaq 0xf340(%rip), %rax      # 0x20168
movq (%rax), %rdi
movl $0x1, %esi
callq 0x16d10
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
leaq 0xf324(%rip), %rcx      # 0x20168
cmpq (%rcx), %rax
je 0x10e74
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rcx
leaq 0xf368(%rip), %rax      # 0x201c0
movq %rcx, (%rax)
callq 0x10610
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x16d70
movq %rax, -0x8(%rbp)
jmp 0x10e39
leaq 0xf475(%rip), %rax      # 0x202f0
movl $0x0, (%rax)
leaq 0xf468(%rip), %rax      # 0x202f0
movq $0x0, 0x8(%rax)
leaq 0xf459(%rip), %rax      # 0x202f0
movl $0x1, 0x10(%rax)
leaq 0xf2fb(%rip), %rax      # 0x201a0
movq (%rax), %rsi
leaq 0xf441(%rip), %rdi      # 0x202f0
leaq 0x3bca(%rip), %rdx      # 0x14a80
xorl %eax, %eax
movl %eax, %ecx
callq 0x16c50
movq %rax, %rcx
leaq 0xf41f(%rip), %rax      # 0x202e8
movq %rcx, (%rax)
leaq 0xf415(%rip), %rax      # 0x202e8
cmpq $0x0, (%rax)
jne 0x10efd
leaq 0xf258(%rip), %rax      # 0x20138
cmpl $0x3, (%rax)
jne 0x10efb
callq 0xe280
leaq 0x7007(%rip), %rdi      # 0x17ef8
callq 0xe150
callq 0xe280
jmp 0x10f66
leaq -0x60(%rbp), %rdi
leaq 0xf3e0(%rip), %rax      # 0x202e8
movq (%rax), %rsi
xorl %r9d, %r9d
xorl %eax, %eax
movl %eax, %ecx
leaq -0x64(%rbp), %rax
movl %r9d, %edx
movl %r9d, %r8d
movl $0x0, (%rsp)
movq %rax, 0x8(%rsp)
movl $0x12, 0x10(%rsp)
callq 0x12d30
leaq 0xf1fc(%rip), %rax      # 0x20138
cmpl $0x3, (%rax)
jne 0x10f64
callq 0xe280
leaq -0x60(%rbp), %rdx
leaq 0x726f(%rip), %rdi      # 0x181c0
leaq 0x6fa0(%rip), %rsi      # 0x17ef8
leaq 0x6f9d(%rip), %rcx      # 0x17efc
callq 0xe2d0
jmp 0x10f66
addq $0x80, %rsp
popq %rbp
retq
nop