// File: /workspace/github_c_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
leaq 0xe6b2(%rip), %rax      # 0x1cfa8
movq (%rax), %rdi
movl $0x1, %esi
callq 0x127bd
leaq 0xe776(%rip), %r13      # 0x1d080
movq %rax, (%r13)
movq 0x20(%rax), %rax
leaq 0xe76f(%rip), %rbp      # 0x1d088
movq %rax, (%rbp)
leaq 0xe6ac(%rip), %r15      # 0x1cfd0
movq (%r15), %rdi
movl $0x1, %esi
callq 0x127bd
leaq 0xe7d8(%rip), %rcx      # 0x1d110
movq %rax, (%rcx)
movq 0x20(%rax), %rax
leaq 0xe7d2(%rip), %r14      # 0x1d118
movq %rax, (%r14)
leaq 0xe670(%rip), %rax      # 0x1cfc0
movq (%rax), %rdi
movl $0x1, %esi
callq 0x127bd
movq %rax, 0xec4c(%rip)      # 0x1d5b0
movq 0x20(%rax), %rax
movq %rax, 0xec49(%rip)      # 0x1d5b8
leaq 0xe662(%rip), %rax      # 0x1cfd8
movq (%rax), %rdi
movl $0x1, %esi
callq 0x127bd
leaq 0xe75e(%rip), %rcx      # 0x1d0e8
movq %rax, (%rcx)
movq 0x20(%rax), %rax
leaq 0xe758(%rip), %rcx      # 0x1d0f0
movq %rax, (%rcx)
leaq 0xe616(%rip), %rax      # 0x1cfb8
movq (%rax), %rdi
movl $0x1, %esi
callq 0x127bd
movq %rax, 0xebf2(%rip)      # 0x1d5a8
leaq 0xe5ab(%rip), %r12      # 0x1cf68
cmpl $0x3, (%r12)
jne 0xea0e
leaq 0xe525(%rip), %rax      # 0x1cef0
cmpl $0x0, (%rax)
jne 0xea0e
leaq 0x5474(%rip), %rsi      # 0x13e4b
leaq 0x572e(%rip), %rbx      # 0x1410c
movq %rbx, %rdi
movq %rbx, %rdx
movq %rbx, %rcx
callq 0xcad8
leaq 0x545e(%rip), %rsi      # 0x13e51
movq %rbx, %rdi
movq %rbx, %rdx
movq %rbx, %rcx
callq 0xcad8
leaq 0xe4dc(%rip), %rax      # 0x1cee4
movl $0x11e, (%rax)          # imm = 0x11E
leaq 0xe77b(%rip), %rbx      # 0x1d190
movl $0x0, (%rbx)
cmpl $0x3, (%r12)
jne 0xea30
movq (%rbp), %rax
cmpl $0x0, (%rax)
jne 0xea30
callq 0xca6d
movq (%rbp), %rax
movl (%rax), %eax
cmpl (%rbx), %eax
jne 0xea5b
callq 0xcc20
movq (%r13), %rdi
movl $0x1, %esi
callq 0x127da
movq %rax, (%r13)
movq 0x20(%rax), %rax
movq %rax, (%rbp)
jmp 0xea34
leaq 0xe482(%rip), %rax      # 0x1cee4
movl (%rax), %eax
leaq 0xe735(%rip), %rcx      # 0x1d1a0
movl %eax, (%rcx)
leaq 0xe524(%rip), %r13      # 0x1cf98
movq (%r13), %rdi
movl $0x1, %esi
callq 0x127bd
cmpq (%r13), %rax
je 0xeab5
movq %rax, %rbx
leaq 0xe55e(%rip), %rbp      # 0x1cff0
movq 0x20(%rbx), %rax
movq %rax, (%rbp)
callq 0xe4ed
movq %rbx, %rdi
movl $0x1, %esi
callq 0x127da
movq %rax, %rbx
cmpq (%r13), %rax
jne 0xea92
leaq 0xe664(%rip), %rdi      # 0x1d120
movl $0x0, (%rdi)
movq $0x0, 0x8(%rdi)
movl $0x1, 0x10(%rdi)
movq (%r15), %rsi
leaq 0x269d(%rip), %rdx      # 0x11178
xorl %ecx, %ecx
callq 0x1275f
movq %rax, (%r14)
testq %rax, %rax
je 0xeb41
subq $0x8, %rsp
leaq 0x14(%rsp), %r10
leaq 0x18(%rsp), %rdi
movq %rax, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
pushq $0x12
pushq %r10
pushq $0x0
callq 0xfe9c
addq $0x20, %rsp
cmpl $0x3, (%r12)
jne 0xeb6c
callq 0xca6d
leaq 0x55e5(%rip), %rdi      # 0x1410c
leaq 0x5328(%rip), %rsi      # 0x13e56
leaq 0x5325(%rip), %rcx      # 0x13e5a
leaq 0x10(%rsp), %rdx
callq 0xcad8
jmp 0xeb6c
cmpl $0x3, (%r12)
jne 0xeb6c
callq 0xca6d
leaq 0x5302(%rip), %rdi      # 0x13e56
callq 0xc9aa
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xca6d
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop