// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x38(%rbp)
movb $0x0, 0xe085(%rip)      # 0x12b80
cmpq $0x0, -0x8(%rbp)
je 0x4b80
movq -0x8(%rbp), %rsi
leaq 0xe073(%rip), %rdi      # 0x12b80
callq 0x3070
leaq 0xe067(%rip), %rdi      # 0x12b80
callq 0x30d0
movl %eax, -0x3c(%rbp)
xorl %eax, %eax
cmpl $0x0, -0x3c(%rbp)
movb %al, -0x49(%rbp)
je 0x4b5d
callq 0x3280
movq (%rax), %rax
movl -0x3c(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rdx
leaq 0xe03c(%rip), %rcx      # 0x12b80
movsbl (%rcx,%rdx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x2000, %eax           # imm = 0x2000
cmpl $0x0, %eax
setne %al
movb %al, -0x49(%rbp)
movb -0x49(%rbp), %al
testb $0x1, %al
jne 0x4b66
jmp 0x4b71
movl -0x3c(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x4b21
movslq -0x3c(%rbp), %rcx
leaq 0xe004(%rip), %rax      # 0x12b80
movb $0x0, (%rax,%rcx)
movq -0x38(%rbp), %rdi
callq 0x4cc0
movsbl (%rax), %eax
cmpl $0x2a, %eax
jne 0x4bb7
leaq 0xf168(%rip), %rax      # 0x13d00
cmpl $0x0, (%rax)
je 0x4bb2
leaq 0x770d(%rip), %rdi      # 0xc2b1
leaq 0xdfd5(%rip), %rsi      # 0x12b80
movb $0x0, %al
callq 0x30f0
jmp 0x4cb0
leaq 0xe0d2(%rip), %rdi      # 0x12c90
leaq -0x38(%rbp), %rsi
callq 0x4d00
movq -0x38(%rbp), %rdi
callq 0x4cc0
movq %rax, -0x38(%rbp)
leaq -0x30(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x4d00
leaq -0x30(%rbp), %rdi
leaq 0x76e0(%rip), %rsi      # 0xc2cc
callq 0x3040
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jne 0x4c13
movq -0x38(%rbp), %rdi
callq 0x4ed0
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rdi
xorl %esi, %esi
callq 0x7f60
jmp 0x4c2e
movq -0x38(%rbp), %rdi
callq 0x4cc0
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rdi
movl $0x1, %esi
callq 0x7f60
leaq -0x30(%rbp), %rdi
callq 0x4f30
movq %rax, -0x48(%rbp)
leaq 0x3de(%rip), %rax       # 0x5020
cmpq %rax, -0x48(%rbp)
je 0x4c7e
movsbl 0xe041(%rip), %eax      # 0x12c90
cmpl $0x0, %eax
je 0x4c7e
leaq 0xe035(%rip), %rdi      # 0x12c90
callq 0xb2b0
movq %rax, -0x58(%rbp)
leaq 0xdad9(%rip), %rax      # 0x12744
movl (%rax), %edi
callq 0x47b0
movq -0x58(%rbp), %rdi
movq %rax, %rsi
callq 0xb610
cmpq $0x0, -0x48(%rbp)
je 0x4c8f
callq *-0x48(%rbp)
callq 0x87b0
jmp 0x4cb0
movsbl -0x30(%rbp), %eax
cmpl $0x0, %eax
je 0x4cac
leaq -0x30(%rbp), %rsi
leaq 0x762d(%rip), %rdi      # 0xc2d0
movb $0x0, %al
callq 0x74b0
jmp 0x4cae
jmp 0x4cae
jmp 0x4cb0
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)