// File: /workspace/github_c_makefile_star2_O1/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 $0x48, %rsp
movq %rdi, %rbx
movq %rdi, 0x8(%rsp)
movb $0x0, 0xb927(%rip)      # 0xfb70
testq %rdi, %rdi
je 0x4299
leaq 0xb91b(%rip), %r14      # 0xfb70
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3090
movq %r14, %rdi
callq 0x3100
movslq %eax, %r15
incq %r15
cmpq $0x1, %r15
je 0x428e
callq 0x32d0
movq (%rax), %rax
movsbq -0x2(%r15,%r14), %rcx
decq %r15
testb $0x20, 0x1(%rax,%rcx,2)
jne 0x426e
jmp 0x4291
xorl %r15d, %r15d
movslq %r15d, %rax
movb $0x0, (%rax,%r14)
leaq 0x5048(%rip), %rsi      # 0x92e8
movq %rbx, %rdi
callq 0x3160
cmpb $0x2a, (%rbx,%rax)
jne 0x42e1
leaq 0xca2b(%rip), %rax      # 0x10ce0
cmpl $0x0, (%rax)
je 0x44f3
leaq 0x4fec(%rip), %rdi      # 0x92b1
leaq 0xb8a4(%rip), %rsi      # 0xfb70
xorl %eax, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3120
leaq 0xb998(%rip), %rdi      # 0xfc80
leaq 0x8(%rsp), %r14
movq %r14, %rsi
callq 0x4502
movq (%r14), %rbx
leaq 0x4fe9(%rip), %rsi      # 0x92e8
movq %rbx, %rdi
callq 0x3160
addq %rbx, %rax
movq %rax, (%r14)
leaq 0x20(%rsp), %rbx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4502
leaq 0x4fa8(%rip), %rsi      # 0x92cc
movq %rbx, %rdi
callq 0x3060
movq (%r14), %r14
testl %eax, %eax
je 0x4354
leaq 0x4fae(%rip), %rsi      # 0x92e8
movq %r14, %rdi
callq 0x3160
addq %rax, %r14
movq %r14, 0x8(%rsp)
movq %r14, %rdi
movl $0x1, %esi
jmp 0x4386
callq 0x32d0
movq (%rax), %rcx
xorl %eax, %eax
movsbq (%r14,%rax), %rdx
testb $0x1, (%rcx,%rdx,2)
je 0x4377
incq %rax
cmpq $0x1, %rax
je 0x435e
movl $0x2, %eax
movl %eax, %eax
addq %rax, %r14
movq %r14, 0x8(%rsp)
movq %r14, %rdi
xorl %esi, %esi
callq 0x6258
callq 0x32c0
movq (%rax), %r13
xorl %eax, %eax
movq %rax, 0x18(%rsp)
movq %rax, %rcx
shlq $0x5, %rcx
leaq 0x99a8(%rip), %rax      # 0xdd50
movq %rcx, 0x10(%rsp)
movq (%rcx,%rax), %r14
movb (%r14), %r12b
testb %r12b, %r12b
je 0x4429
incq %r14
xorl %ebx, %ebx
leaq 0x20(%rsp), %r15
movsbq (%r15), %rax
movl (%r13,%rax,4), %eax
cmpb $0x2d, %r12b
jne 0x4403
movsbl %al, %esi
movl $0x9, %edx
leaq 0x509a(%rip), %rbp      # 0x947b
movq %rbp, %rdi
callq 0x3180
xorl %ecx, %ecx
testq %rax, %rax
sete %dl
movl %eax, %esi
subl %ebp, %esi
testq %rax, %rax
cmovnel %esi, %ebx
jne 0x4413
movb %dl, %cl
addl %ecx, %ecx
jmp 0x4415
movsbl %r12b, %edx
movsbl %al, %eax
movl $0x2, %ecx
cmpl %edx, %eax
jne 0x4415
xorl %ecx, %ecx
testl %ecx, %ecx
jne 0x4430
incq %r15
movb (%r14), %r12b
incq %r14
testb %r12b, %r12b
jne 0x43c3
jmp 0x4430
leaq 0x20(%rsp), %r15
xorl %ebx, %ebx
movsbq (%r15), %rax
movsbl %r12b, %ecx
cmpl %ecx, (%r13,%rax,4)
je 0x4456
movq 0x18(%rsp), %rax
incq %rax
cmpq $0x46, %rax
jne 0x4395
xorl %r14d, %r14d
jmp 0x4481
leaq 0x98f3(%rip), %rcx      # 0xdd50
addq 0x10(%rsp), %rcx
addl 0x10(%rcx), %ebx
movl %ebx, 0xb839(%rip)      # 0xfca4
movl 0x14(%rcx), %eax
movl %eax, 0xb834(%rip)      # 0xfca8
movl 0x18(%rcx), %eax
movl %eax, 0xb82f(%rip)      # 0xfcac
movq 0x8(%rcx), %r14
leaq 0x172(%rip), %rax       # 0x45fa
cmpq %rax, %r14
je 0x44be
cmpb $0x0, 0xb7ec(%rip)      # 0xfc80
je 0x44be
leaq 0xb7e3(%rip), %rdi      # 0xfc80
callq 0x878c
movq %rax, %rbx
leaq 0xb288(%rip), %rax      # 0xf734
movl (%rax), %edi
callq 0x405a
movq %rbx, %rdi
movq %rax, %rsi
callq 0x899a
testq %r14, %r14
je 0x44d9
callq *%r14
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x6884
cmpb $0x0, 0x20(%rsp)
je 0x44f3
leaq 0x4de9(%rip), %rdi      # 0x92d0
leaq 0x20(%rsp), %rsi
xorl %eax, %eax
callq 0x5bbc
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq