LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/pahihu[P]mixal/io.c
// Function: write_cell
static void write_cell(Cell cell, FILE *outfile, Flag text)
{
    unsigned i;

    if (text) {
        for (i = 1; i <= 5; ++i)
            fputc(mix_to_C_char(get_byte(i, cell)), outfile);
        return;
    }

    fputc(is_negative(cell) ? '-' : ' ', outfile);
    for (i = 1; i <= 5; ++i)
        fputc(get_byte(i, cell), outfile);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
je 0x71a2
movl $0x1, -0x18(%rbp)
cmpl $0x5, -0x18(%rbp)
ja 0x71a0
movl -0x18(%rbp), %edi
movq -0x8(%rbp), %rsi
callq 0x35c0
movl %eax, %edi
callq 0x49a0
movsbl %al, %edi
movq -0x10(%rbp), %rsi
callq 0x3130
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x7170
jmp 0x71f6
movq -0x8(%rbp), %rcx
andq $0x40000000, %rcx       # imm = 0x40000000
movl $0x20, %edi
movl $0x2d, %eax
cmpq $0x0, %rcx
cmovnel %eax, %edi
movq -0x10(%rbp), %rsi
callq 0x3130
movl $0x1, -0x18(%rbp)
cmpl $0x5, -0x18(%rbp)
ja 0x71f6
movl -0x18(%rbp), %edi
movq -0x8(%rbp), %rsi
callq 0x35c0
movl %eax, %edi
movq -0x10(%rbp), %rsi
callq 0x3130
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x71ce
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/pahihu[P]mixal/io.c
// Function: read_line
static void read_line(FILE* file, Address buffer, unsigned size)
{
    unsigned i, b;
    Flag past_end = false;

    for (i = 0; i < size; ++i) {
        Cell cell = zero;
        for (b = 1; b <= 5; ++b) {
            Byte mix_char;
            if (past_end)
                mix_char = (Byte) 0;
            else {
                int c = fgetc(file);
                if (c == '\n' || c == EOF) {
                    past_end = true, mix_char = (Byte) 0;
                } else
                    mix_char = C_char_to_mix((char) c);
            }
            cell = set_byte(mix_char, b, cell);
        }
        if (dbg) {
            printf("read_line: %3d = ", buffer + i);
            write_cell (cell, stdout, true);
            printf("\n");
        }
        memory_store(buffer + i, cell);
    }
    if (false == past_end) {
        int c = fgetc(file);
        if (c != '\n' && c != EOF)
            error("Line not terminated (%d)", c);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl $0x0, -0x1c(%rbp)
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x10(%rbp), %eax
jae 0x7346
movq $0x0, -0x28(%rbp)
movl $0x1, -0x18(%rbp)
cmpl $0x5, -0x18(%rbp)
ja 0x72e6
cmpl $0x0, -0x1c(%rbp)
je 0x7290
movl $0x0, -0x2c(%rbp)
jmp 0x72c8
movq -0x8(%rbp), %rdi
callq 0x3110
movl %eax, -0x30(%rbp)
cmpl $0xa, -0x30(%rbp)
je 0x72a8
cmpl $-0x1, -0x30(%rbp)
jne 0x72b8
movl $0x1, -0x1c(%rbp)
movl $0x0, -0x2c(%rbp)
jmp 0x72c6
movl -0x30(%rbp), %eax
movsbl %al, %edi
callq 0x4a20
movl %eax, -0x2c(%rbp)
jmp 0x72c8
movl -0x2c(%rbp), %edi
movl -0x18(%rbp), %esi
movq -0x28(%rbp), %rdx
callq 0x3730
movq %rax, -0x28(%rbp)
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x727b
cmpl $0x0, 0xb9ef(%rip)      # 0x12cdc
je 0x7329
movl -0xc(%rbp), %esi
addl -0x14(%rbp), %esi
leaq 0x548b(%rip), %rdi      # 0xc787
movb $0x0, %al
callq 0x30f0
movq -0x28(%rbp), %rdi
movq 0xacc2(%rip), %rax      # 0x11fd0
movq (%rax), %rsi
movl $0x1, %edx
callq 0x7150
leaq 0x5c2b(%rip), %rdi      # 0xcf4d
movb $0x0, %al
callq 0x30f0
movl -0xc(%rbp), %edi
addl -0x14(%rbp), %edi
movq -0x28(%rbp), %rsi
callq 0x8f40
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x7260
xorl %eax, %eax
cmpl -0x1c(%rbp), %eax
jne 0x7378
movq -0x8(%rbp), %rdi
callq 0x3110
movl %eax, -0x34(%rbp)
cmpl $0xa, -0x34(%rbp)
je 0x7376
cmpl $-0x1, -0x34(%rbp)
je 0x7376
movl -0x34(%rbp), %esi
leaq 0x542a(%rip), %rdi      # 0xc799
movb $0x0, %al
callq 0x74b0
jmp 0x7378
addq $0x40, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/pahihu[P]mixal/main.c
// Function: fatal_error
void fatal_error(const char *message, ...)
{
    va_list args;

    if (current_file)   /*** of course, the error may not have anything to do with the file... */
        fprintf(stderr, "FATAL ERROR (%s, line %u): ", current_file, line_number);
    else
        fprintf(stderr, "FATAL ERROR: ");

    va_start(args, message);
    vfprintf(stderr, message, args);
    va_end(args);
    fprintf(stderr, "\n");

    io_shutdown();
    exit(1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
testb %al, %al
je 0x73b5
movaps %xmm0, -0xa0(%rbp)
movaps %xmm1, -0x90(%rbp)
movaps %xmm2, -0x80(%rbp)
movaps %xmm3, -0x70(%rbp)
movaps %xmm4, -0x60(%rbp)
movaps %xmm5, -0x50(%rbp)
movaps %xmm6, -0x40(%rbp)
movaps %xmm7, -0x30(%rbp)
movq %r9, -0xa8(%rbp)
movq %r8, -0xb0(%rbp)
movq %rcx, -0xb8(%rbp)
movq %rdx, -0xc0(%rbp)
movq %rsi, -0xc8(%rbp)
movq %rdi, -0x8(%rbp)
cmpq $0x0, 0xc924(%rip)      # 0x13d08
je 0x740d
movq 0xac0b(%rip), %rax      # 0x11ff8
movq (%rax), %rdi
movq 0xc911(%rip), %rdx      # 0x13d08
movl 0xc913(%rip), %ecx      # 0x13d10
leaq 0x54c4(%rip), %rsi      # 0xc8c8
movb $0x0, %al
callq 0x3170
jmp 0x7425
movq 0xabe4(%rip), %rax      # 0x11ff8
movq (%rax), %rdi
leaq 0x54c6(%rip), %rsi      # 0xc8e4
movb $0x0, %al
callq 0x3170
leaq -0x20(%rbp), %rax
leaq -0xd0(%rbp), %rcx
movq %rcx, 0x10(%rax)
leaq 0x10(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl $0x30, 0x4(%rax)
movl $0x8, (%rax)
movq 0xaba8(%rip), %rax      # 0x11ff8
movq (%rax), %rdi
movq -0x8(%rbp), %rsi
leaq -0x20(%rbp), %rdx
callq 0x3220
leaq -0x20(%rbp), %rax
movq 0xab8d(%rip), %rax      # 0x11ff8
movq (%rax), %rdi
leaq 0x5ad8(%rip), %rsi      # 0xcf4d
movb $0x0, %al
callq 0x3170
callq 0x5b30
movl $0x1, %edi
callq 0x3250
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/pahihu[P]mixal/main.c
// Function: error
void error(const char *message, ...)
{
    va_list args;

    fflush(stdout);

    ++num_errors;
    va_start(args, message);
    if (error_handler)
        error_handler(message, args);
    else
        fatal_error("No error handler installed");
    va_end(args);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
testb %al, %al
je 0x74e5
movaps %xmm0, -0xa0(%rbp)
movaps %xmm1, -0x90(%rbp)
movaps %xmm2, -0x80(%rbp)
movaps %xmm3, -0x70(%rbp)
movaps %xmm4, -0x60(%rbp)
movaps %xmm5, -0x50(%rbp)
movaps %xmm6, -0x40(%rbp)
movaps %xmm7, -0x30(%rbp)
movq %r9, -0xa8(%rbp)
movq %r8, -0xb0(%rbp)
movq %rcx, -0xb8(%rbp)
movq %rdx, -0xc0(%rbp)
movq %rsi, -0xc8(%rbp)
movq %rdi, -0x8(%rbp)
movq 0xaabd(%rip), %rax      # 0x11fd0
movq (%rax), %rdi
callq 0x31c0
movl 0xc7ff(%rip), %eax      # 0x13d20
addl $0x1, %eax
movl %eax, 0xc7f6(%rip)      # 0x13d20
leaq -0x20(%rbp), %rax
leaq -0xd0(%rbp), %rcx
movq %rcx, 0x10(%rax)
leaq 0x10(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl $0x30, 0x4(%rax)
movl $0x8, (%rax)
cmpq $0x0, 0xc7c2(%rip)      # 0x13d18
je 0x756b
movq 0xc7b9(%rip), %rax      # 0x13d18
movq -0x8(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq *%rax
jmp 0x7579
leaq 0x5380(%rip), %rdi      # 0xc8f2
movb $0x0, %al
callq 0x7380
addq $0xd0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/pahihu[P]mixal/main.c
// Function: warn
void warn(const char *message, ...)
{
    va_list args;

    if (current_file)
        fprintf(stderr, "WARNING (%s, line %u): ", current_file, line_number);
    else
        fprintf(stderr, "WARNING: ");
    va_start(args, message);
    vfprintf(stderr, message, args);
    va_end(args);
    fprintf(stderr, "\n");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
testb %al, %al
je 0x75c5
movaps %xmm0, -0xa0(%rbp)
movaps %xmm1, -0x90(%rbp)
movaps %xmm2, -0x80(%rbp)
movaps %xmm3, -0x70(%rbp)
movaps %xmm4, -0x60(%rbp)
movaps %xmm5, -0x50(%rbp)
movaps %xmm6, -0x40(%rbp)
movaps %xmm7, -0x30(%rbp)
movq %r9, -0xa8(%rbp)
movq %r8, -0xb0(%rbp)
movq %rcx, -0xb8(%rbp)
movq %rdx, -0xc0(%rbp)
movq %rsi, -0xc8(%rbp)
movq %rdi, -0x8(%rbp)
cmpq $0x0, 0xc714(%rip)      # 0x13d08
je 0x761d
movq 0xa9fb(%rip), %rax      # 0x11ff8
movq (%rax), %rdi
movq 0xc701(%rip), %rdx      # 0x13d08
movl 0xc703(%rip), %ecx      # 0x13d10
leaq 0x52f9(%rip), %rsi      # 0xc90d
movb $0x0, %al
callq 0x3170
jmp 0x7635
movq 0xa9d4(%rip), %rax      # 0x11ff8
movq (%rax), %rdi
leaq 0x52f7(%rip), %rsi      # 0xc925
movb $0x0, %al
callq 0x3170
leaq -0xd0(%rbp), %rax
movq %rax, -0x10(%rbp)
leaq 0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movl $0x30, -0x1c(%rbp)
movl $0x8, -0x20(%rbp)
movq 0xa99b(%rip), %rax      # 0x11ff8
movq %rax, -0xd8(%rbp)
movq (%rax), %rdi
movq -0x8(%rbp), %rsi
leaq -0x20(%rbp), %rdx
callq 0x3220
movq -0xd8(%rbp), %rax
movq (%rax), %rdi
leaq 0x58c8(%rip), %rsi      # 0xcf4d
xorl %eax, %eax
callq 0x3170
addq $0xe0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/pahihu[P]mixal/main.c
// Function: assembler_error
static void assembler_error(const char *message, va_list args)
{
    if (current_file)
        fprintf(stderr, "ERROR (%s, line %u): ", current_file, line_number);
    else
        fprintf(stderr, "ERROR: ");
    vfprintf(stderr, message, args);
    fprintf(stderr, "\n");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpq $0x0, 0xc220(%rip)      # 0x13d08
je 0x7b11
movq 0xa507(%rip), %rax      # 0x11ff8
movq (%rax), %rdi
movq 0xc20d(%rip), %rdx      # 0x13d08
movl 0xc20f(%rip), %ecx      # 0x13d10
leaq 0x4dc6(%rip), %rsi      # 0xc8ce
movb $0x0, %al
callq 0x3170
jmp 0x7b29
movq 0xa4e0(%rip), %rax      # 0x11ff8
movq (%rax), %rdi
leaq 0x5a14(%rip), %rsi      # 0xd536
movb $0x0, %al
callq 0x3170
movq 0xa4c8(%rip), %rax      # 0x11ff8
movq (%rax), %rdi
movq -0x8(%rbp), %rsi
movq -0x10(%rbp), %rdx
callq 0x3220
movq 0xa4b1(%rip), %rax      # 0x11ff8
movq (%rax), %rdi
leaq 0x53fc(%rip), %rsi      # 0xcf4d
movb $0x0, %al
callq 0x3170
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/pahihu[P]mixal/main.c
// Function: assemble_file
static void assemble_file(const char *filename)
{
    FILE *infile = open_file(filename, "r");
    char line[257];

    current_file = filename, line_number = 0;
    while (fgets(line, sizeof line, infile)) {
        ++line_number;
        assemble_line(line);
        if (line[strlen(line) - 1] != '\n') {
            if (!fgets(line, sizeof line, infile))
                break;        /* the file's last line had no '\n' */
            else {
                error("Line length exceeds 256 characters");
                /* Skip the rest of the line */
                while (line[strlen(line) - 1] != '\n')
                    if (!fgets(line, sizeof line, infile))
                        break;
            }
        }
    }
    if (ferror(infile))
        error("%s: %s", filename, strerror(errno));
    fclose(infile);
    current_file = NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x130, %rsp            # imm = 0x130
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
leaq 0x47c4(%rip), %rsi      # 0xc33e
callq 0x7cc0
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, 0xc17a(%rip)      # 0x13d08
movl $0x0, 0xc178(%rip)      # 0x13d10
leaq -0x120(%rbp), %rdi
movq -0x10(%rbp), %rdx
movl $0x101, %esi            # imm = 0x101
callq 0x3140
cmpq $0x0, %rax
je 0x7c5f
movl 0xc153(%rip), %eax      # 0x13d10
addl $0x1, %eax
movl %eax, 0xc14a(%rip)      # 0x13d10
leaq -0x120(%rbp), %rdi
callq 0x4ae0
leaq -0x120(%rbp), %rdi
callq 0x30d0
subq $0x1, %rax
movsbl -0x120(%rbp,%rax), %eax
cmpl $0xa, %eax
je 0x7c5a
leaq -0x120(%rbp), %rdi
movq -0x10(%rbp), %rdx
movl $0x101, %esi            # imm = 0x101
callq 0x3140
cmpq $0x0, %rax
jne 0x7c0c
jmp 0x7c5f
leaq 0x4d46(%rip), %rdi      # 0xc959
movb $0x0, %al
callq 0x74b0
leaq -0x120(%rbp), %rdi
callq 0x30d0
subq $0x1, %rax
movsbl -0x120(%rbp,%rax), %eax
cmpl $0xa, %eax
je 0x7c56
leaq -0x120(%rbp), %rdi
movq -0x10(%rbp), %rdx
movl $0x101, %esi            # imm = 0x101
callq 0x3140
cmpq $0x0, %rax
jne 0x7c54
jmp 0x7c56
jmp 0x7c1a
jmp 0x7c58
jmp 0x7c5a
jmp 0x7b98
movq -0x10(%rbp), %rdi
callq 0x3090
cmpl $0x0, %eax
je 0x7c9c
movq -0x8(%rbp), %rax
movq %rax, -0x128(%rbp)
callq 0x3050
movl (%rax), %edi
callq 0x3270
movq -0x128(%rbp), %rsi
movq %rax, %rdx
leaq 0x48a4(%rip), %rdi      # 0xc539
movb $0x0, %al
callq 0x74b0
movq -0x10(%rbp), %rdi
callq 0x30c0
movq $0x0, 0xc058(%rip) # 0x13d08
addq $0x130, %rsp            # imm = 0x130
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/pahihu[P]mixal/main.c
// Function: open_file
static FILE *open_file(const char *filename, const char *mode)
{
    if (strcmp(filename, "-") == 0) {
        assert(mode[0] == 'r' || mode[0] == 'w');
        return mode[0] == 'w' ? stdout : stdin;
    } else {
        FILE *result = fopen(filename, mode);
        if (!result)
            fatal_error("%s: %s", filename, strerror(errno));
        return result;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
leaq 0x4676(%rip), %rsi      # 0xc351
callq 0x3160
cmpl $0x0, %eax
jne 0x7d52
movq -0x18(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x72, %eax
je 0x7cfd
movq -0x18(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x77, %eax
jne 0x7cff
jmp 0x7d1e
leaq 0x4c76(%rip), %rdi      # 0xc97c
leaq 0x4c90(%rip), %rsi      # 0xc99d
movl $0x55, %edx
leaq 0x4c8b(%rip), %rcx      # 0xc9a4
callq 0x3100
movq -0x18(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x77, %eax
jne 0x7d3a
movq 0xa29f(%rip), %rax      # 0x11fd0
movq (%rax), %rax
movq %rax, -0x28(%rbp)
jmp 0x7d48
movq 0xa297(%rip), %rax      # 0x11fd8
movq (%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x7d9b
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x3210
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x7d93
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
callq 0x3050
movl (%rax), %edi
callq 0x3270
movq -0x30(%rbp), %rsi
movq %rax, %rdx
leaq 0x47ad(%rip), %rdi      # 0xc539
movb $0x0, %al
callq 0x7380
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/pahihu[P]mixal/parse.c
// Function: parse_operand
Cell parse_operand(Flag F_must_be_default, Byte default_F)
{
    Cell A = parse_A();
    Cell I = parse_I();
    Cell F = parse_F((Cell)default_F);
    if (F_must_be_default && F != (Cell)default_F)
	error("Illegal operand to extended-opcode instruction");
    return set_field(A, make_field_spec(0, 2),
	     set_field(I, make_field_spec(3, 3),
	       set_field(F, make_field_spec(4, 4), zero)));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
callq 0x8350
movq %rax, -0x10(%rbp)
callq 0x83a0
movq %rax, -0x18(%rbp)
movl -0x8(%rbp), %eax
movl %eax, %edi
callq 0x83e0
movq %rax, -0x20(%rbp)
cmpl $0x0, -0x4(%rbp)
je 0x82ce
movq -0x20(%rbp), %rax
movl -0x8(%rbp), %ecx
cmpq %rcx, %rax
je 0x82ce
leaq 0x4a41(%rip), %rdi      # 0xcd08
movb $0x0, %al
callq 0x74b0
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
xorl %edi, %edi
movl $0x2, %esi
callq 0x36d0
movl %eax, -0x24(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x40(%rbp)
movl $0x3, %esi
movl %esi, %edi
callq 0x36d0
movl %eax, -0x34(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x48(%rbp)
movl $0x4, %esi
movl %esi, %edi
callq 0x36d0
movq -0x48(%rbp), %rdi
movl %eax, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x3790
movq -0x40(%rbp), %rdi
movl -0x34(%rbp), %esi
movq %rax, %rdx
callq 0x3790
movq -0x30(%rbp), %rdi
movl -0x24(%rbp), %esi
movq %rax, %rdx
callq 0x3790
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/pahihu[P]mixal/parse.c
// Function: parse_A
static Cell parse_A(void)
{
    if (is_future())
	return parse_future();
    else if (is_expr())
	return parse_expr();
    else
	return zero;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
callq 0x87d0
cmpl $0x0, %eax
je 0x836d
callq 0x8800
movq %rax, -0x8(%rbp)
jmp 0x838a
callq 0x8870
cmpl $0x0, %eax
je 0x8382
callq 0x84a0
movq %rax, -0x8(%rbp)
jmp 0x838a
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/pahihu[P]mixal/parse.c
// Function: parse_I
static Cell parse_I(void)
{
    if (token == ',') {
	advance();
	return parse_expr();
    } else
	return zero;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movsbl 0xb981(%rip), %eax      # 0x13d30
cmpl $0x2c, %eax
jne 0x83c4
callq 0x7f90
callq 0x84a0
movq %rax, -0x8(%rbp)
jmp 0x83cc
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/pahihu[P]mixal/parse.c
// Function: parse_F
static Cell parse_F(Cell default_F)
{
    if (token == '(') {
	Cell result;
	advance();
	result = parse_expr();
	expect(')');
	return result;
    } else
	return default_F;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movsbl 0xb93d(%rip), %eax      # 0x13d30
cmpl $0x28, %eax
jne 0x841a
callq 0x7f90
callq 0x84a0
movq %rax, -0x18(%rbp)
movl $0x29, %edi
callq 0x88c0
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x8422
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/pahihu[P]mixal/parse.c
// Function: parse_W
Cell parse_W(void)
{
    Cell result = zero;
    for (;;) {
	Cell expr = parse_expr();
	Cell F = parse_F(5);
	assert_valid_field(F);
	result = set_field(expr, (Byte) F, result);
	if (token != ',')
	    break;
	advance();
    }
    return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq $0x0, -0x8(%rbp)
callq 0x84a0
movq %rax, -0x10(%rbp)
movl $0x5, %edi
callq 0x83e0
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0x39b0
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movl %eax, %esi
movq -0x8(%rbp), %rdx
callq 0x3790
movq %rax, -0x8(%rbp)
movsbl 0xb8b2(%rip), %eax      # 0x13d30
cmpl $0x2c, %eax
je 0x8485
jmp 0x848c
callq 0x7f90
jmp 0x8440
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/pahihu[P]mixal/parse.c
// Function: parse_expr
static Cell parse_expr(void)
{
    Flag sav_overflow = overflow;       /* do not clobber overflow */

    Cell sign = ulong_to_cell(1);
    if (token == '+' || token == '-') {
	if (token == '-')
	    sign = negative(sign);
	    advance();
    }
    overflow = false;
    {
	static const char ops[] = "+-*/%:";
	static BinOp * const handlers[] = 
	       { add, sub, mul, slash, double_slash, colon };
	Cell cell = mul(sign, parse_atomic());
	for (;;) {
	    const char *s = strchr(ops, token);
	    if (s) {
		advance();
		cell = handlers[s - ops](cell, parse_atomic());
	    } else {
		if (overflow)
		    warn("Overflow in evaluation of expression");
                overflow = sav_overflow;
		return cell;
	    }
	}
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
leaq 0xa6a1(%rip), %rax      # 0x12b50
movl (%rax), %eax
movl %eax, -0x4(%rbp)
movl $0x1, %edi
callq 0x3570
movq %rax, -0x10(%rbp)
movsbl 0xb867(%rip), %eax      # 0x13d30
cmpl $0x2b, %eax
je 0x84da
movsbl 0xb85b(%rip), %eax      # 0x13d30
cmpl $0x2d, %eax
jne 0x84f9
movsbl 0xb84f(%rip), %eax      # 0x13d30
cmpl $0x2d, %eax
jne 0x84f4
movq -0x10(%rbp), %rax
xorq $0x40000000, %rax       # imm = 0x40000000
movq %rax, -0x10(%rbp)
callq 0x7f90
leaq 0xa650(%rip), %rax      # 0x12b50
movl $0x0, (%rax)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
callq 0x89f0
movq -0x28(%rbp), %rdi
movq %rax, %rsi
callq 0x3e80
movq %rax, -0x18(%rbp)
movsbl 0xb806(%rip), %esi      # 0x13d30
leaq 0x48cd(%rip), %rdi      # 0xcdfe
callq 0x30e0
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x8583
callq 0x7f90
movq -0x20(%rbp), %rcx
leaq 0x48ad(%rip), %rax      # 0xcdfe
subq %rax, %rcx
leaq 0x9255(%rip), %rax      # 0x117b0
movq (%rax,%rcx,8), %rax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x38(%rbp)
callq 0x89f0
movq -0x38(%rbp), %rdi
movq %rax, %rsi
movq -0x30(%rbp), %rax
callq *%rax
movq %rax, -0x18(%rbp)
jmp 0x85b3
leaq 0xa5c6(%rip), %rax      # 0x12b50
cmpl $0x0, (%rax)
je 0x859d
leaq 0x482a(%rip), %rdi      # 0xcdc0
movb $0x0, %al
callq 0x7590
movl -0x4(%rbp), %ecx
leaq 0xa5a9(%rip), %rax      # 0x12b50
movl %ecx, (%rax)
movq -0x18(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
jmp 0x8523
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/pahihu[P]mixal/parse.c
// Function: parse_S
Cell parse_S(void)
{
    Cell result = zero;
    advance_S();
    result = token_value;
    advance();
    return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq $0x0, -0x8(%rbp)
callq 0x85f0
movq 0xb75c(%rip), %rax      # 0x13d38
movq %rax, -0x8(%rbp)
callq 0x7f90
movq -0x8(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/pahihu[P]mixal/parse.c
// Function: parse_future
static Cell parse_future(void)
{
    Symbol symbol;
    if (token == future_sym) {
	symbol = token_symbol;
	advance();
    } else {
	Cell value;
	expect('=');
	value = parse_W();
	expect('=');
	symbol = generate_future_sym(value);
    }
    forward_reference(symbol, here);
    return zero;   /* The real value will be filled in when symbol is defined */
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movsbl 0xb521(%rip), %eax      # 0x13d30
cmpl $0x66, %eax
jne 0x8826
movq 0xb525(%rip), %rax      # 0x13d40
movq %rax, -0x8(%rbp)
callq 0x7f90
jmp 0x8850
movl $0x3d, %edi
callq 0x88c0
callq 0x8430
movq %rax, -0x10(%rbp)
movl $0x3d, %edi
callq 0x88c0
movq -0x10(%rbp), %rdi
callq 0xb800
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rdi
leaq 0x9ee9(%rip), %rax      # 0x12744
movl (%rax), %esi
callq 0xb590
xorl %eax, %eax
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/pahihu[P]mixal/parse.c
// Function: expect
static void expect(char expected_token)
{
    if (token != expected_token)
        error ("Expected '%c', not '%*.*s'",
	       expected_token,
	       the_string - token_start, the_string - token_start, token_start);
    advance();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movb %dil, %al
movb %al, -0x1(%rbp)
movsbl 0xb45b(%rip), %eax      # 0x13d30
movsbl -0x1(%rbp), %ecx
cmpl %ecx, %eax
je 0x8918
movsbl -0x1(%rbp), %esi
movq 0xb440(%rip), %rdx      # 0x13d28
movq 0xb459(%rip), %rax      # 0x13d48
subq %rax, %rdx
movq 0xb42f(%rip), %rcx      # 0x13d28
movq 0xb448(%rip), %rax      # 0x13d48
subq %rax, %rcx
movq 0xb43e(%rip), %r8       # 0x13d48
leaq 0x4494(%rip), %rdi      # 0xcda5
movb $0x0, %al
callq 0x74b0
callq 0x7f90
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/pahihu[P]mixal/parse.c
// Function: parse_atomic
static Cell parse_atomic(void)
{
    Cell result = zero;
    switch (token) {
	case '*':           result = address_to_cell(here); break;
	case number:        result = token_value; break;
	case defined_sym:   result = symbol_value(token_symbol); break;
	default: 
	    error("Expected an atomic value");
    }
    advance();
    return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq $0x0, -0x8(%rbp)
movsbl 0xb329(%rip), %eax      # 0x13d30
movl %eax, -0xc(%rbp)
subl $0x2a, %eax
je 0x8a25
jmp 0x8a11
movl -0xc(%rbp), %eax
subl $0x30, %eax
je 0x8a39
jmp 0x8a1b
movl -0xc(%rbp), %eax
subl $0x64, %eax
je 0x8a46
jmp 0x8a58
leaq 0x9d18(%rip), %rax      # 0x12744
movl (%rax), %edi
callq 0x47b0
movq %rax, -0x8(%rbp)
jmp 0x8a66
movq 0xb2f8(%rip), %rax      # 0x13d38
movq %rax, -0x8(%rbp)
jmp 0x8a66
movq 0xb2f3(%rip), %rdi      # 0x13d40
callq 0xb540
movq %rax, -0x8(%rbp)
jmp 0x8a66
leaq 0x4386(%rip), %rdi      # 0xcde5
movb $0x0, %al
callq 0x74b0
callq 0x7f90
movq -0x8(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
// File: /workspace/github_c_makefile_star2_O0/pahihu[P]mixal/run.c
// Function: set_initial_state
void set_initial_state(void)
{
    /* --- Initialize I/O system --- */
    io_init();

    overflow = false;
    comparison_indicator = 0;
    internal_state = (mix_config & MIXCONFIG_INTERRUPT)
            ? control_state 
            : normal_state;

    /* --- Init real-time clock --- */
    rtc_busy = 0;
    rtc_int_pending = false;
    {
    unsigned i;
    for (i = 0; i < 10; ++i)
        r[i] = zero;
    }
    pc = entry_point;       /*** need to check for no entry point */
    halting = false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
callq 0x5980
leaq 0xa08c(%rip), %rax      # 0x12b50
movl $0x0, (%rax)
movl $0x0, 0xb290(%rip)      # 0x13d64
movl 0xb282(%rip), %edx      # 0x13d5c
andl $0x2, %edx
xorl %eax, %eax
movl $0x1, %ecx
cmpl $0x0, %edx
cmovnel %ecx, %eax
movl %eax, 0xb278(%rip)      # 0x13d68
movl $0x0, 0xb272(%rip)      # 0x13d6c
movl $0x0, 0xb26c(%rip)      # 0x13d70
movl $0x0, -0x4(%rbp)
cmpl $0xa, -0x4(%rbp)
jae 0x8b30
movl -0x4(%rbp), %eax
movl %eax, %ecx
leaq 0xb263(%rip), %rax      # 0x13d80
movq $0x0, (%rax,%rcx,8)
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x8b0b
leaq 0x9c11(%rip), %rax      # 0x12748
movl (%rax), %eax
movl %eax, 0xb291(%rip)      # 0x13dd0
movl $0x0, 0xb217(%rip)      # 0x13d60
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/pahihu[P]mixal/run.c
// Function: set_configuration
void set_configuration(unsigned flags)
{
    memory_size = 4000;
    INDEX_MAX = ((1L << 12) - 1);

    if (MIXCONFIG_MASTER & flags) {
        flags = (unsigned) -1;
        INDEX_MAX = ((1L << 15) - 1);
        memory_size = 32000;
    }
    mix_config |= flags;

    init_configuration();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
movl $0xfa0, 0xb25f(%rip)    # imm = 0xFA0
movq $0xfff, 0xb258(%rip) # imm = 0xFFF
movl -0x4(%rbp), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x8ba9
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movq $0x7fff, 0xb239(%rip) # imm = 0x7FFF
movl $0x7d00, 0xb22b(%rip)   # imm = 0x7D00
movl -0x4(%rbp), %eax
orl 0xb1aa(%rip), %eax      # 0x13d5c
movl %eax, 0xb1a4(%rip)      # 0x13d5c
callq 0x8bd0
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/pahihu[P]mixal/run.c
// Function: init_configuration
static void init_configuration(void)
{
    /* --- Allocate memory --- */
    memory = malloc(sizeof(Cell) * memory_size);
    if (!memory)
        fatal_error("Out of heap space!");

    control_memory = malloc(sizeof(Cell) * memory_size);
    if (!control_memory)
        fatal_error("Out of heap space!");

    frequency = malloc(sizeof(unsigned) * memory_size);
    if (!frequency)
        fatal_error("Out of heap space!");

    control_frequency = malloc(sizeof(unsigned) * memory_size);
    if (!control_frequency)
        fatal_error("Out of heap space!");

    /* --- Load core memory --- */
    if (mix_config & MIXCONFIG_CORE) {
        if (mix_config & MIXCONFIG_INTERRUPT)
            load_memory("mixcore.ctl", control_memory, memory_size);
        load_memory("mixcore.dat", memory, memory_size);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movslq 0xb1f9(%rip), %rdi      # 0x13dd4
shlq $0x3, %rdi
callq 0x31b0
movq %rax, 0xb1fd(%rip)      # 0x13de8
cmpq $0x0, 0xb1f5(%rip)      # 0x13de8
jne 0x8c03
leaq 0x38bf(%rip), %rdi      # 0xc4bb
movb $0x0, %al
callq 0x7380
movslq 0xb1ca(%rip), %rdi      # 0x13dd4
shlq $0x3, %rdi
callq 0x31b0
movq %rax, 0xb1c6(%rip)      # 0x13de0
cmpq $0x0, 0xb1be(%rip)      # 0x13de0
jne 0x8c32
leaq 0x3890(%rip), %rdi      # 0xc4bb
movb $0x0, %al
callq 0x7380
movslq 0xb19b(%rip), %rdi      # 0x13dd4
shlq $0x2, %rdi
callq 0x31b0
movq %rax, 0xb1af(%rip)      # 0x13df8
cmpq $0x0, 0xb1a7(%rip)      # 0x13df8
jne 0x8c61
leaq 0x3861(%rip), %rdi      # 0xc4bb
movb $0x0, %al
callq 0x7380
movslq 0xb16c(%rip), %rdi      # 0x13dd4
shlq $0x2, %rdi
callq 0x31b0
movq %rax, 0xb278(%rip)      # 0x13ef0
cmpq $0x0, 0xb270(%rip)      # 0x13ef0
jne 0x8c90
leaq 0x3832(%rip), %rdi      # 0xc4bb
movb $0x0, %al
callq 0x7380
movl 0xb0c6(%rip), %eax      # 0x13d5c
andl $0x8, %eax
cmpl $0x0, %eax
je 0x8cde
movl 0xb0b8(%rip), %eax      # 0x13d5c
andl $0x2, %eax
cmpl $0x0, %eax
je 0x8cc5
movq 0xb12d(%rip), %rsi      # 0x13de0
movl 0xb11b(%rip), %edx      # 0x13dd4
leaq 0x4396(%rip), %rdi      # 0xd056
callq 0x9c60
movq 0xb11c(%rip), %rsi      # 0x13de8
movl 0xb102(%rip), %edx      # 0x13dd4
leaq 0x4389(%rip), %rdi      # 0xd062
callq 0x9c60
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/pahihu[P]mixal/run.c
// Function: print_CPU_state
void print_CPU_state(void)
{
    printf ("A:");
    print_cell (r[A]);
    printf ("\t");
    {                        /* Print the index registers: */
        unsigned i;
        for (i = 1; i <= 6; ++i)
        printf ("I%u:%s  ", i, index_to_string (r[i]));
    }
    printf ("\nX:");
    print_cell (r[X]);
    printf ("\t J:%s", index_to_string (r[J])); /* (it's always nonnegative) */
    printf ("  PC:"); print_pc();
    printf ("  Flags: %-7s %-8s %-7s",
        comparison_indicator < 0 ? "less" :
        comparison_indicator == 0 ? "equal" : "greater",
    overflow ? "overflow" : "",
        control_state == internal_state ? "control" : "");
    printf (" %11lu elapsed (%lu idle)\n", elapsed_time, idle_time);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
leaq 0x41ad(%rip), %rdi      # 0xce9c
movb $0x0, %al
callq 0x30f0
movq 0xb083(%rip), %rdi      # 0x13d80
callq 0x4620
leaq 0x35e0(%rip), %rdi      # 0xc2e9
movb $0x0, %al
callq 0x30f0
movl $0x1, -0x4(%rbp)
cmpl $0x6, -0x4(%rbp)
ja 0x8d57
movl -0x4(%rbp), %eax
movl %eax, -0x8(%rbp)
movl -0x4(%rbp), %eax
movl %eax, %ecx
leaq 0xb051(%rip), %rax      # 0x13d80
movq (%rax,%rcx,8), %rdi
callq 0x4700
movl -0x8(%rbp), %esi
movq %rax, %rdx
leaq 0x415a(%rip), %rdi      # 0xce9f
movb $0x0, %al
callq 0x30f0
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x8d17
leaq 0x414a(%rip), %rdi      # 0xcea8
movb $0x0, %al
callq 0x30f0
movq 0xb04c(%rip), %rdi      # 0x13db8
callq 0x4620
movq 0xb048(%rip), %rdi      # 0x13dc0
callq 0x4700
movq %rax, %rsi
leaq 0x4125(%rip), %rdi      # 0xceac
movb $0x0, %al
callq 0x30f0
leaq 0x411e(%rip), %rdi      # 0xceb3
movb $0x0, %al
callq 0x30f0
callq 0x8e50
cmpl $0x0, 0xafbc(%rip)      # 0x13d64
jge 0x8db7
leaq 0x4120(%rip), %rax      # 0xced1
movq %rax, -0x10(%rbp)
jmp 0x8dd6
movl 0xafa7(%rip), %edx      # 0x13d64
leaq 0x4118(%rip), %rax      # 0xcedc
leaq 0x410b(%rip), %rcx      # 0xced6
cmpl $0x0, %edx
cmoveq %rcx, %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rsi
leaq 0x9d6f(%rip), %rax      # 0x12b50
movl (%rax), %ecx
leaq 0x3500(%rip), %rdx      # 0xc2ea
leaq 0x40f3(%rip), %rax      # 0xcee4
cmpl $0x0, %ecx
cmovneq %rax, %rdx
movl 0xaf69(%rip), %r8d      # 0x13d68
movl $0x1, %edi
leaq 0x34df(%rip), %rcx      # 0xc2ea
leaq 0x37b7(%rip), %rax      # 0xc5c9
cmpl %r8d, %edi
cmoveq %rax, %rcx
leaq 0x4099(%rip), %rdi      # 0xceb9
movb $0x0, %al
callq 0x30f0
movq 0xaf22(%rip), %rsi      # 0x13d50
leaq 0x9e9b(%rip), %rax      # 0x12cd0
movq (%rax), %rdx
leaq 0x40ae(%rip), %rdi      # 0xceed
movb $0x0, %al
callq 0x30f0
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/pahihu[P]mixal/run.c
// Function: memory_fetch
Cell memory_fetch(Address address)
{
    Cell cell;

    if (memory_size <= abs(address))
        error("Address out of range");

    if (address < 0) {
        check_interrupt();
        if (normal_state == internal_state)
            error("Cannot access control store in normal state");

        cell = control_memory[-address];
    }
    else
        cell = memory[address];

    return cell;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
movl 0xaf43(%rip), %eax      # 0x13dd4
movl -0x4(%rbp), %ecx
movl %ecx, %edx
negl %edx
cmovnsl %edx, %ecx
cmpl %ecx, %eax
jg 0x8ead
leaq 0x4062(%rip), %rdi      # 0xcf08
movb $0x0, %al
callq 0x74b0
cmpl $0x0, -0x4(%rbp)
jge 0x8ee9
callq 0x8f10
xorl %eax, %eax
cmpl 0xaea8(%rip), %eax      # 0x13d68
jne 0x8ed0
leaq 0x3713(%rip), %rdi      # 0xc5dc
movb $0x0, %al
callq 0x74b0
movq 0xaf09(%rip), %rax      # 0x13de0
xorl %ecx, %ecx
subl -0x4(%rbp), %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x10(%rbp)
jmp 0x8efc
movq 0xaef8(%rip), %rax      # 0x13de8
movslq -0x4(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/pahihu[P]mixal/run.c
// Function: memory_store
void memory_store(Address address, Cell cell)
{
    if (memory_size <= abs(address))
        error("Address out of range");

    if (address < 0) {
    check_interrupt();
        if (normal_state == internal_state)
            error("Cannot access control store in normal state");

        memory[-address] = cell;
        if (-10 == address)
            rtc_busy = 1000;
    } else
        memory[address] = cell;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movl 0xae7f(%rip), %eax      # 0x13dd4
movl -0x4(%rbp), %ecx
movl %ecx, %edx
negl %edx
cmovnsl %edx, %ecx
cmpl %ecx, %eax
jg 0x8f71
leaq 0x3f9e(%rip), %rdi      # 0xcf08
movb $0x0, %al
callq 0x74b0
cmpl $0x0, -0x4(%rbp)
jge 0x8fc1
callq 0x8f10
xorl %eax, %eax
cmpl 0xade4(%rip), %eax      # 0x13d68
jne 0x8f94
leaq 0x364f(%rip), %rdi      # 0xc5dc
movb $0x0, %al
callq 0x74b0
movq -0x10(%rbp), %rdx
movq 0xae49(%rip), %rax      # 0x13de8
xorl %ecx, %ecx
subl -0x4(%rbp), %ecx
movslq %ecx, %rcx
movq %rdx, (%rax,%rcx,8)
movl $0xfffffff6, %eax       # imm = 0xFFFFFFF6
cmpl -0x4(%rbp), %eax
jne 0x8fbf
movl $0x3e8, 0xadad(%rip)    # imm = 0x3E8
jmp 0x8fd4
movq -0x10(%rbp), %rdx
movq 0xae1c(%rip), %rax      # 0x13de8
movslq -0x4(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/pahihu[P]mixal/run.c
// Function: mnemonic
const char* mnemonic(Byte C, Byte F)
{
    static char buffer[5];
    const char *ret = op_table[C].mnemonic;
    
    if (*ret == '*') {
        strncpy(buffer, ret + 1 + F * 4, 4);
        buffer[4] = '\0';
        ret = buffer;
    } else if (*ret == '%') {
        strncpy(buffer, ret + 1 + (7 & F) * 4, 4);
        buffer[4] = '\0';
        ret = buffer;
    }
    return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movl -0x4(%rbp), %eax
movl %eax, %ecx
leaq 0x8616(%rip), %rax      # 0x117e0
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2a, %eax
jne 0x921d
movq -0x10(%rbp), %rsi
addq $0x1, %rsi
movl -0x8(%rbp), %eax
shll $0x2, %eax
movl %eax, %eax
addq %rax, %rsi
leaq 0xac01(%rip), %rdi      # 0x13e00
movl $0x4, %edx
callq 0x3060
movb $0x0, 0xabf4(%rip)      # 0x13e04
leaq 0xabe9(%rip), %rax      # 0x13e00
movq %rax, -0x10(%rbp)
jmp 0x9264
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x25, %eax
jne 0x9262
movq -0x10(%rbp), %rsi
addq $0x1, %rsi
movl -0x8(%rbp), %eax
andl $0x7, %eax
shll $0x2, %eax
movl %eax, %eax
addq %rax, %rsi
leaq 0xabba(%rip), %rdi      # 0x13e00
movl $0x4, %edx
callq 0x3060
movb $0x0, 0xabad(%rip)      # 0x13e04
leaq 0xaba2(%rip), %rax      # 0x13e00
movq %rax, -0x10(%rbp)
jmp 0x9264
movq -0x10(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/pahihu[P]mixal/run.c
// Function: stop
static void stop(const char *message, va_list args)
{
    fprintf(stderr, "RUNTIME ERROR: ");
    vfprintf(stderr, message, args);
    fprintf(stderr, "\n");
    print_CPU_state();
    exit(1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq 0x87d1(%rip), %rax      # 0x11ff8
movq (%rax), %rdi
leaq 0x3cfd(%rip), %rsi      # 0xd52e
movb $0x0, %al
callq 0x3170
movq 0x87b9(%rip), %rax      # 0x11ff8
movq (%rax), %rdi
movq -0x8(%rbp), %rsi
movq -0x10(%rbp), %rdx
callq 0x3220
movq 0x87a2(%rip), %rax      # 0x11ff8
movq (%rax), %rdi
leaq 0x36ed(%rip), %rsi      # 0xcf4d
movb $0x0, %al
callq 0x3170
callq 0x8ce0
movl $0x1, %edi
callq 0x3250
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/pahihu[P]mixal/run.c
// Function: save_memory
static void save_memory(const char *path, Cell *store, unsigned size)
{
    FILE *fout;
    size_t cells_written;

    fout = fopen(path, "wb");
    if (NULL == fout)
        error("Cannot open %s", path);
    cells_written = fwrite(store, sizeof(Cell), size, fout);
    fclose(fout);
    if (cells_written != size)
        error("Cannot write %d cells to %s", size, path);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rdi
leaq 0x3ca0(%rip), %rsi      # 0xd53e
callq 0x3210
movq %rax, -0x20(%rbp)
xorl %eax, %eax
cmpq -0x20(%rbp), %rax
jne 0x98c1
movq -0x8(%rbp), %rsi
leaq 0x3c87(%rip), %rdi      # 0xd541
movb $0x0, %al
callq 0x74b0
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %eax
movl %eax, %edx
movq -0x20(%rbp), %rcx
movl $0x8, %esi
callq 0x3260
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rdi
callq 0x30c0
movq -0x28(%rbp), %rax
movl -0x14(%rbp), %ecx
cmpq %rcx, %rax
je 0x9906
movl -0x14(%rbp), %esi
movq -0x8(%rbp), %rdx
leaq 0x3c51(%rip), %rdi      # 0xd550
movb $0x0, %al
callq 0x74b0
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/pahihu[P]mixal/run.c
// Function: save_state
static void save_state(void)
{
    Cell psw;
    Byte flags;
    int i;

    control_memory[9] = r[A];
    control_memory[8] = r[X];
    for (i = 1; i < 7; i++)
        control_memory[8 - i] = r[i];

    flags = 0;
    if (overflow)
        flags += 8;
    flags += 1 + SIGN(comparison_indicator);

    psw = set_field(r[J], make_field_spec(4, 5), zero);
    psw = set_byte(flags, 3, psw);
    psw = set_field(address_to_cell(pc), make_field_spec(1, 2), psw);

    control_memory[1] = psw;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq 0xa261(%rip), %rcx      # 0x13d80
movq 0xa2ba(%rip), %rax      # 0x13de0
movq %rcx, 0x48(%rax)
movq 0xa287(%rip), %rcx      # 0x13db8
movq 0xa2a8(%rip), %rax      # 0x13de0
movq %rcx, 0x40(%rax)
movl $0x1, -0x10(%rbp)
cmpl $0x7, -0x10(%rbp)
jge 0x9b79
movslq -0x10(%rbp), %rcx
leaq 0xa22c(%rip), %rax      # 0x13d80
movq (%rax,%rcx,8), %rdx
movq 0xa281(%rip), %rax      # 0x13de0
movl $0x8, %ecx
subl -0x10(%rbp), %ecx
movslq %ecx, %rcx
movq %rdx, (%rax,%rcx,8)
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x9b43
movl $0x0, -0xc(%rbp)
leaq 0x8fc9(%rip), %rax      # 0x12b50
cmpl $0x0, (%rax)
je 0x9b95
movl -0xc(%rbp), %eax
addl $0x8, %eax
movl %eax, -0xc(%rbp)
cmpl $0x0, 0xa1c8(%rip)      # 0x13d64
jge 0x9ba8
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, -0x14(%rbp)
jmp 0x9bbe
movl 0xa1b6(%rip), %edx      # 0x13d64
xorl %eax, %eax
movl $0x1, %ecx
cmpl $0x0, %edx
cmovgl %ecx, %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
addl $0x1, %eax
addl -0xc(%rbp), %eax
movl %eax, -0xc(%rbp)
movq 0xa1ef(%rip), %rax      # 0x13dc0
movq %rax, -0x28(%rbp)
movl $0x4, %edi
movl $0x5, %esi
callq 0x36d0
movq -0x28(%rbp), %rdi
movl %eax, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x3790
movq %rax, -0x8(%rbp)
movl -0xc(%rbp), %edi
movq -0x8(%rbp), %rdx
movl $0x3, %esi
callq 0x3730
movq %rax, -0x8(%rbp)
movl 0xa1be(%rip), %edi      # 0x13dd0
callq 0x47b0
movq %rax, -0x20(%rbp)
movl $0x1, %edi
movl $0x2, %esi
callq 0x36d0
movq -0x20(%rbp), %rdi
movl %eax, %esi
movq -0x8(%rbp), %rdx
callq 0x3790
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rcx
movq 0xa198(%rip), %rax      # 0x13de0
movq %rcx, 0x8(%rax)
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/pahihu[P]mixal/run.c
// Function: load_memory
static void load_memory(const char *path, Cell *store, unsigned size)
{
    FILE *fin;

    fin = fopen(path, "rb");
    if (NULL == fin)
        return;
    fread(store, sizeof(Cell), size, fin);
    fclose(fin);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rdi
leaq 0x27ae(%rip), %rsi      # 0xc42c
callq 0x3210
movq %rax, -0x20(%rbp)
xorl %eax, %eax
cmpq -0x20(%rbp), %rax
jne 0x9c91
jmp 0x9cb1
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %eax
movl %eax, %edx
movq -0x20(%rbp), %rcx
movl $0x8, %esi
callq 0x30a0
movq -0x20(%rbp), %rdi
callq 0x30c0
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/pahihu[P]mixal/run.c
// Function: do_add
static void do_add(void)
{
    if (6 == F) {
        check_float();
        r[A] = float_add(r[A], safe_fetch(cell_to_address(M)));
        elapsed_time += 2;
    } else
        r[A] = add(r[A], get_V());
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl $0x6, %eax
cmpl 0xa129(%rip), %eax      # 0x13e0c
jne 0x9d2f
callq 0xab70
movq 0xa08f(%rip), %rax      # 0x13d80
movq %rax, -0x8(%rbp)
movq 0xa114(%rip), %rdi      # 0x13e10
callq 0x47c0
movl %eax, %edi
callq 0x94b0
movq -0x8(%rbp), %rdi
movq %rax, %rsi
callq 0x4850
movq %rax, 0xa065(%rip)      # 0x13d80
movq 0xa02e(%rip), %rax      # 0x13d50
addq $0x2, %rax
movq %rax, 0xa023(%rip)      # 0x13d50
jmp 0x9d52
movq 0xa04a(%rip), %rax      # 0x13d80
movq %rax, -0x10(%rbp)
callq 0xaba0
movq -0x10(%rbp), %rdi
movq %rax, %rsi
callq 0x3b50
movq %rax, 0xa02e(%rip)      # 0x13d80
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/pahihu[P]mixal/run.c
// Function: do_sub
static void do_sub(void)
{
    if (6 == F) {
        check_float();
        r[A] = float_subtract(r[A], safe_fetch(cell_to_address(M)));
        elapsed_time += 2;
    } else
        r[A] = sub(r[A], get_V());
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl $0x6, %eax
cmpl 0xa099(%rip), %eax      # 0x13e0c
jne 0x9dbf
callq 0xab70
movq 0x9fff(%rip), %rax      # 0x13d80
movq %rax, -0x8(%rbp)
movq 0xa084(%rip), %rdi      # 0x13e10
callq 0x47c0
movl %eax, %edi
callq 0x94b0
movq -0x8(%rbp), %rdi
movq %rax, %rsi
callq 0x4880
movq %rax, 0x9fd5(%rip)      # 0x13d80
movq 0x9f9e(%rip), %rax      # 0x13d50
addq $0x2, %rax
movq %rax, 0x9f93(%rip)      # 0x13d50
jmp 0x9de2
movq 0x9fba(%rip), %rax      # 0x13d80
movq %rax, -0x10(%rbp)
callq 0xaba0
movq -0x10(%rbp), %rdi
movq %rax, %rsi
callq 0x3c30
movq %rax, 0x9f9e(%rip)      # 0x13d80
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/pahihu[P]mixal/run.c
// Function: do_mul
static void do_mul(void)
{
    if (6 == F) {
        check_float();
        r[A] = float_multiply(r[A], safe_fetch(cell_to_address(M)));
        /* NB. FMUL is 9u, MUL is 10 */
        elapsed_time -= 1;
    } else
        multiply(r[A], get_V(), &r[A], &r[X]);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl $0x6, %eax
cmpl 0xa009(%rip), %eax      # 0x13e0c
jne 0x9e4f
callq 0xab70
movq 0x9f6f(%rip), %rax      # 0x13d80
movq %rax, -0x8(%rbp)
movq 0x9ff4(%rip), %rdi      # 0x13e10
callq 0x47c0
movl %eax, %edi
callq 0x94b0
movq -0x8(%rbp), %rdi
movq %rax, %rsi
callq 0x48b0
movq %rax, 0x9f45(%rip)      # 0x13d80
movq 0x9f0e(%rip), %rax      # 0x13d50
subq $0x1, %rax
movq %rax, 0x9f03(%rip)      # 0x13d50
jmp 0x9e79
movq 0x9f2a(%rip), %rax      # 0x13d80
movq %rax, -0x10(%rbp)
callq 0xaba0
movq -0x10(%rbp), %rdi
movq %rax, %rsi
leaq 0x9f13(%rip), %rdx      # 0x13d80
movq %rdx, %rcx
addq $0x38, %rcx
callq 0x3c60
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/pahihu[P]mixal/run.c
// Function: do_div
static void do_div(void)
{
    if (6 == F) {
        check_float();
        r[A] = float_divide(r[A], safe_fetch(cell_to_address(M)));
        /* NB. FDIV is 11u, DIV is 12u */
        elapsed_time -= 1;
    } else
        divide(r[A], r[X], get_V(), &r[A], &r[X]);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl $0x6, %eax
cmpl 0x9f79(%rip), %eax      # 0x13e0c
jne 0x9edf
callq 0xab70
movq 0x9edf(%rip), %rax      # 0x13d80
movq %rax, -0x8(%rbp)
movq 0x9f64(%rip), %rdi      # 0x13e10
callq 0x47c0
movl %eax, %edi
callq 0x94b0
movq -0x8(%rbp), %rdi
movq %rax, %rsi
callq 0x48e0
movq %rax, 0x9eb5(%rip)      # 0x13d80
movq 0x9e7e(%rip), %rax      # 0x13d50
subq $0x1, %rax
movq %rax, 0x9e73(%rip)      # 0x13d50
jmp 0x9f18
movq 0x9e9a(%rip), %rax      # 0x13d80
movq %rax, -0x18(%rbp)
movq 0x9ec7(%rip), %rax      # 0x13db8
movq %rax, -0x10(%rbp)
callq 0xaba0
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq %rax, %rdx
leaq 0x9e74(%rip), %rcx      # 0x13d80
movq %rcx, %r8
addq $0x38, %r8
callq 0x3ed0
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/pahihu[P]mixal/run.c
// Function: do_move
static void do_move(void)
{
    Address from = cell_to_address(M);
    Address to = cell_to_address(r[1]);
    unsigned i, count = F;

    for (i = 0; i < count; i++) {
        safe_store(to + i, safe_fetch(from + i));
        elapsed_time += 2;
    }
    r[1] = address_to_cell(to + count);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq 0x9841(%rip), %rdi      # 0x13e10
callq 0x47c0
movl %eax, -0x4(%rbp)
movq 0x97aa(%rip), %rdi      # 0x13d88
callq 0x47c0
movl %eax, -0x8(%rbp)
movl 0x9820(%rip), %eax      # 0x13e0c
movl %eax, -0x10(%rbp)
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
cmpl -0x10(%rbp), %eax
jae 0xa63a
movl -0x8(%rbp), %eax
addl -0xc(%rbp), %eax
movl %eax, -0x14(%rbp)
movl -0x4(%rbp), %edi
addl -0xc(%rbp), %edi
callq 0x94b0
movl -0x14(%rbp), %edi
movq %rax, %rsi
callq 0xae00
movq 0x972c(%rip), %rax      # 0x13d50
addq $0x2, %rax
movq %rax, 0x9721(%rip)      # 0x13d50
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0xa5f6
movl -0x8(%rbp), %edi
addl -0x10(%rbp), %edi
callq 0x47b0
movq %rax, 0x973c(%rip)      # 0x13d88
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/pahihu[P]mixal/run.c
// Function: do_ldi
static void do_ldi(void) { 
    Cell cell = get_V();
    if (INDEX_MAX < magnitude(cell))
        error("Magnitude too large for index register: %10o", magnitude(cell));
    r[C & 7] = cell; 
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
callq 0xaba0
movq %rax, -0x8(%rbp)
movq 0x9740(%rip), %rax      # 0x13dd8
movq -0x8(%rbp), %rcx
andq $0x3fffffff, %rcx       # imm = 0x3FFFFFFF
cmpq %rcx, %rax
jge 0xa6c1
movq -0x8(%rbp), %rsi
andq $0x3fffffff, %rsi       # imm = 0x3FFFFFFF
leaq 0x2e15(%rip), %rdi      # 0xd4cf
movb $0x0, %al
callq 0x74b0
movq -0x8(%rbp), %rdx
movl 0x973d(%rip), %eax      # 0x13e08
andl $0x7, %eax
movl %eax, %eax
movl %eax, %ecx
leaq 0x96a7(%rip), %rax      # 0x13d80
movq %rdx, (%rax,%rcx,8)
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/pahihu[P]mixal/run.c
// Function: do_ldin
static void do_ldin(void) {
    Cell cell = get_V();
    if (INDEX_MAX < magnitude(cell))
        error("Magnitude too large for index register: %10o", magnitude(cell));
    r[C & 7] = negative(cell);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
callq 0xaba0
movq %rax, -0x8(%rbp)
movq 0x9690(%rip), %rax      # 0x13dd8
movq -0x8(%rbp), %rcx
andq $0x3fffffff, %rcx       # imm = 0x3FFFFFFF
cmpq %rcx, %rax
jge 0xa771
movq -0x8(%rbp), %rsi
andq $0x3fffffff, %rsi       # imm = 0x3FFFFFFF
leaq 0x2d65(%rip), %rdi      # 0xd4cf
movb $0x0, %al
callq 0x74b0
movq -0x8(%rbp), %rdx
xorq $0x40000000, %rdx       # imm = 0x40000000
movl 0x9686(%rip), %eax      # 0x13e08
andl $0x7, %eax
movl %eax, %eax
movl %eax, %ecx
leaq 0x95f0(%rip), %rax      # 0x13d80
movq %rdx, (%rax,%rcx,8)
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)