// File: /workspace/github_c_makefile_star2_O2/Nico01[P]obj2asm/outarget.c
// Function: get_fix
int get_fix( result, mode, pre_name, size_bytes, size, assign,
                                                    size_known, seg_reg )
    char            *result;        /* Resulting name will go here            */
    int             mode;           /* 0 = Data Deref, 1 = Code, 2 = Data Ref */
    int             pre_name;       /* Fixup type words needed?               */
    int             size_bytes;     /* Word size (386=4 others=2)             */
    int             size;           /* Size of expected value                 */
    int             assign;         /* TRUE to set size, FALSE to ignore      */
    int             *size_known;    /* Is "word ptr" text needed?             */
    int             seg_reg;        /* Segment register used                  */
{
    dword   data;
    dword   more;
    int             fix_count;

    size_bytes = size_bytes;
    fix_count = fix_type[fix_rec->form].num_bytes;

    /*
    ** BASE types do not get larger
    */
    if ( fix_rec->extended && fix_rec->form != BASE ) {
        fix_count += 2;
    }

    switch( fix_count ) {
        case 1: data = buff_getc();
                break;
        case 2: data = buff_getc();
                data += (buff_getc() << 8);
                break;
        case 4: data = buff_getc();
                data += (buff_getc() << 8);
                data += (buff_getc() << 16);
                data += (buff_getc() << 24);
                break;
        case 6: data = buff_getc();
                data += (buff_getc() << 8);
                data += (buff_getc() << 16);
                data += (buff_getc() << 24);
                more = buff_getc();
                more += (buff_getc() << 8);
                break;
        default:
                fmt_error( "Invalid fixup type" );
                break;
    }

    get_target( result, fix_rec, mode, data, pre_name, size, assign,
                                                        size_known, seg_reg );
    fix_advance();

    return( fix_count );
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %edx, %r13d
movl %esi, %ebp
movq %rdi, 0x10(%rsp)
leaq 0xc620(%rip), %rax      # 0x1c118
movq (%rax), %rax
movslq 0x18(%rax), %rcx
imulq $0x18, %rcx, %rdx
leaq 0xc256(%rip), %rsi      # 0x1bd60
movl (%rdx,%rsi), %edx
cmpl $0x0, 0x38(%rax)
leal 0x2(%rdx), %r14d
cmovel %edx, %r14d
cmpq $0x2, %rcx
cmovel %edx, %r14d
leal -0x1(%r14), %eax
cmpl $0x5, %eax
ja 0xfc53
movl %r9d, %r15d
movl %r8d, %r12d
leaq 0x384d(%rip), %rcx      # 0x13388
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
callq 0xece6
movslq %eax, %rbx
jmp 0xfc0a
callq 0xece6
movslq %eax, %rbx
callq 0xece6
shll $0x8, %eax
movq %r15, 0x8(%rsp)
movslq %eax, %r15
addq %rbx, %r15
callq 0xece6
shll $0x10, %eax
movl %ebp, 0x4(%rsp)
movslq %eax, %rbp
callq 0xece6
shll $0x18, %eax
movslq %eax, %rbx
addq %rbp, %rbx
movl 0x4(%rsp), %ebp
addq %r15, %rbx
movq 0x8(%rsp), %r15
callq 0xece6
callq 0xece6
jmp 0xfc0a
callq 0xece6
movl %ebp, 0x4(%rsp)
movslq %eax, %rbp
callq 0xece6
shll $0x8, %eax
movslq %eax, %rbx
jmp 0xfc03
callq 0xece6
movslq %eax, %rbx
callq 0xece6
shll $0x8, %eax
movl %ebp, 0x4(%rsp)
movslq %eax, %rbp
addq %rbx, %rbp
callq 0xece6
shll $0x10, %eax
movl %r13d, 0x8(%rsp)
movl %r12d, %r13d
movq %r15, %r12
movslq %eax, %r15
callq 0xece6
shll $0x18, %eax
movslq %eax, %rbx
addq %r15, %rbx
movq %r12, %r15
movl %r13d, %r12d
movl 0x8(%rsp), %r13d
addq %rbp, %rbx
movl 0x4(%rsp), %ebp
movl 0x58(%rsp), %eax
leaq 0xc503(%rip), %rcx      # 0x1c118
movq (%rcx), %rsi
subq $0x8, %rsp
movq 0x18(%rsp), %rdi
movl %ebp, %edx
movq %rbx, %rcx
movl %r13d, %r8d
movl %r12d, %r9d
pushq %rax
pushq 0x60(%rsp)
pushq %r15
callq 0xf723
addq $0x20, %rsp
callq 0xc67a
movl %r14d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x3822(%rip), %rdi      # 0x1347c
callq 0x11eec
nop