// File: /workspace/github_c_makefile_star2_O3/pahihu[P]mixal/driver.c
// Function: assemble_line
void assemble_line(const char *line)
{
    char mnemonic[max_identifier_length+1];
    const char *scan = line;
    int n;

    current_line[0] = '\0';             /* trim right */
    if (line) {
        strcpy(current_line, line);
        n = strlen(current_line);
        while (n && isspace(current_line[n-1])) n--;
        current_line[n] = '\0';
    }

    if (*skip_blanks(scan) == '*') {    /* the comment character */
        if (VERBOSE)
            printf("                       %s\n", current_line);
	    return;
    }

    eat_identifier(label, &scan);       /* eat label if any */
    scan = skip_blanks(scan);
    eat_identifier(mnemonic, &scan);    /* eat mnemonic */
    if (0 == strcasecmp(mnemonic, "alf")) {
      scan = skip_2blanks(scan);
      setup_scanner(scan, 0);
    } else {
      scan = skip_blanks(scan);
      setup_scanner(scan, 1);           /* prepare to parse operand field */
    }

    {
	Handler handler = lookup_mnemonic(mnemonic);
	if (handler != do_equ && label[0] != '\0')
	    define_symbol(string_to_symbol(label), address_to_cell(here));
	if (handler) {
	    handler();
	    done_parsing();  /* this goes here since *all* handlers parse an operand field */
	} else if (mnemonic[0] != '\0')
	    error("Unknown instruction: %s", mnemonic);
	else
	    ;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
movq %rdi, (%rsp)
movb $0x0, 0xb950(%rip)      # 0xfb70
testq %rdi, %rdi
je 0x4282
leaq 0xb944(%rip), %r14      # 0xfb70
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3090
movq %r14, %rdi
callq 0x3100
movslq %eax, %r12
shlq $0x20, %rax
movabsq $-0x100000000, %r15     # imm = 0xFFFFFFFF00000000
movq %r12, %rbp
movq %rax, %r13
subq $0x1, %rbp
jb 0x4278
callq 0x32d0
movq (%rax), %rcx
movsbq -0x1(%r12,%r14), %rdx
leaq (%r15,%r13), %rax
testb $0x20, 0x1(%rcx,%rdx,2)
movq %rbp, %r12
jne 0x4253
sarq $0x20, %r13
movb $0x0, (%r13,%r14)
leaq 0x505f(%rip), %rsi      # 0x92e8
movq %rbx, %rdi
callq 0x3160
cmpb $0x2a, (%rbx,%rax)
jne 0x42ca
leaq 0xca42(%rip), %rax      # 0x10ce0
cmpl $0x0, (%rax)
je 0x44ce
leaq 0x5003(%rip), %rdi      # 0x92b1
leaq 0xb8bb(%rip), %rsi      # 0xfb70
xorl %eax, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3120
leaq 0xb9af(%rip), %rdi      # 0xfc80
movq %rsp, %r14
movq %r14, %rsi
callq 0x44dd
movq (%r14), %rbx
leaq 0x5002(%rip), %rsi      # 0x92e8
movq %rbx, %rdi
callq 0x3160
addq %rbx, %rax
movq %rax, (%r14)
leaq 0x10(%rsp), %rbx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x44dd
leaq 0x4fc1(%rip), %rsi      # 0x92cc
movq %rbx, %rdi
callq 0x3060
movq (%r14), %r14
testl %eax, %eax
je 0x433a
leaq 0x4fc7(%rip), %rsi      # 0x92e8
movq %r14, %rdi
callq 0x3160
addq %rax, %r14
movq %r14, (%rsp)
movq %r14, %rdi
movl $0x1, %esi
jmp 0x4381
callq 0x32d0
movq (%rax), %rcx
xorl %esi, %esi
xorl %edi, %edi
movq %rdi, %rax
movsbq (%r14,%rdi), %rdx
movzwl (%rcx,%rdx,2), %edx
testb $0x1, %sil
jne 0x4369
movl %edx, %r8d
movl $0x1, %edi
movb $0x1, %sil
andl $0x1, %r8d
jne 0x4346
testb $0x1, %dl
movl $0x2, %ecx
cmoveq %rax, %rcx
addq %rcx, %r14
movq %r14, (%rsp)
movq %r14, %rdi
xorl %esi, %esi
callq 0x6294
callq 0x32c0
movq (%rax), %r13
leaq 0x50e6(%rip), %r14      # 0x947b
xorl %ebp, %ebp
movq %rbp, %rcx
shlq $0x5, %rcx
leaq 0x99ab(%rip), %rax      # 0xdd50
movq %rcx, 0x8(%rsp)
movq (%rcx,%rax), %r15
movb (%r15), %al
movl $0x0, %ebx
leaq 0x10(%rsp), %r12
movl $0x0, %ecx
testb %al, %al
je 0x4413
incq %r15
xorl %ebx, %ebx
movsbq (%r12), %rcx
movl (%r13,%rcx,4), %ecx
cmpb $0x2d, %al
jne 0x43f3
movsbl %cl, %esi
movl $0x9, %edx
movq %r14, %rdi
callq 0x3180
testq %rax, %rax
je 0x440e
subl %r14d, %eax
movl %eax, %ebx
jmp 0x43fd
movsbl %al, %edx
movsbl %cl, %ecx
cmpl %edx, %ecx
jne 0x4410
incq %r12
movb (%r15), %al
incq %r15
testb %al, %al
jne 0x43c9
xorl %eax, %eax
jmp 0x4410
movb $0x2d, %al
movsbl %al, %ecx
movsbq (%r12), %rax
cmpl %ecx, (%r13,%rax,4)
je 0x4431
incq %rbp
cmpq $0x46, %rbp
jne 0x4397
xorl %r14d, %r14d
jmp 0x445c
leaq 0x9918(%rip), %rcx      # 0xdd50
addq 0x8(%rsp), %rcx
addl 0x10(%rcx), %ebx
movl %ebx, 0xb85e(%rip)      # 0xfca4
movl 0x14(%rcx), %eax
movl %eax, 0xb859(%rip)      # 0xfca8
movl 0x18(%rcx), %eax
movl %eax, 0xb854(%rip)      # 0xfcac
movq 0x8(%rcx), %r14
leaq 0x177(%rip), %rax       # 0x45da
cmpq %rax, %r14
je 0x4499
cmpb $0x0, 0xb811(%rip)      # 0xfc80
je 0x4499
leaq 0xb808(%rip), %rdi      # 0xfc80
callq 0x87a4
movq %rax, %rbx
leaq 0xb2ad(%rip), %rax      # 0xf734
movl (%rax), %edi
callq 0x4033
movq %rbx, %rdi
movq %rax, %rsi
callq 0x89bb
testq %r14, %r14
je 0x44b4
callq *%r14
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x689b
cmpb $0x0, 0x10(%rsp)
je 0x44ce
leaq 0x4e0e(%rip), %rdi      # 0x92d0
leaq 0x10(%rsp), %rsi
xorl %eax, %eax
callq 0x5bec
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq