LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/pahihu[P]mixal/io.c
// Function: io_pending_interrupt
Flag io_pending_interrupt(Byte *int_device)
{
    Byte device, next_device;
    enum DeviceType next_device_type;

    next_device_type = (enum DeviceType) (LAST_DEVICE_TYPE + 1);
    next_device      = DEV_UNK;
    for (device = 0; device < num_devices; device++) {
        if (devices[device].busy || false == devices[device].int_pending)
            continue;
        /* select device by priority */
        if (devices[device].type < next_device_type) {
            next_device_type = devices[device].type;
            next_device = device;
        }
    }
    if (DEV_UNK != next_device) {
        devices[next_device].int_request = false;
        devices[next_device].int_pending = false;
        *int_device = next_device;
        return true;
    }
    return false;
}

// Assembly:
pushq $0x7
popq %rax
movl $0xff, %ecx
leaq 0xa5ce(%rip), %rdx      # 0xf190
xorl %esi, %esi
cmpq $0x14, %rsi
je 0x4bec
cmpl $0x0, 0x18(%rdx)
jne 0x4be3
cmpl $0x0, 0x40(%rdx)
je 0x4be3
movl (%rdx), %r8d
cmpl %eax, %r8d
cmovbl %esi, %ecx
cmovbl %r8d, %eax
incq %rsi
addq $0x48, %rdx
jmp 0x4bc4
xorl %eax, %eax
cmpl $0xff, %ecx
je 0x4c0e
movl %ecx, %eax
imulq $0x48, %rax, %rax
leaq 0xa58d(%rip), %rdx      # 0xf190
andq $0x0, 0x3c(%rax,%rdx)
movl %ecx, (%rdi)
pushq $0x1
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O2/pahihu[P]mixal/io.c
// Function: punch_object_deck
void punch_object_deck(const char *title, Address start_address)
{
    FILE *card_punch;
    Address address;
    Cell cell;
    unsigned num_cards;
    int i, num_words;

    card_punch = fopen (methods[card_out].base_filename, methods[card_out].fam);
    if (NULL == card_punch)
        error ("Cannot open card puncher");
    num_cards = 0;
    for (address = 100; address < memory_size; address++) {
        num_words = 0;
        for (i = 0; i < 7; i++) {
            if (memory_size <= address + i)
                break;
            cell = memory_fetch (address);
            if (magnitude (cell))
               num_words = i + 1;
        }
        if (num_words) {
            punch_card (card_punch, title, address, num_words);
            num_cards++;
            address += 6;
        }
    }
    if (num_cards) {
        fprintf (card_punch, "TRANS0%04d\n", abs(start_address));
        fflush (card_punch);
    }
    fclose (card_punch);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %esi, 0x8(%rsp)
movq %rdi, 0x20(%rsp)
leaq 0x49c9(%rip), %rdi      # 0x95f6
leaq 0x520a(%rip), %rsi      # 0x9e3e
callq 0x3250
movq %rax, %rbx
testq %rax, %rax
jne 0x4c4f
leaq 0x4897(%rip), %rdi      # 0x94df
xorl %eax, %eax
callq 0x5700
pushq $0x64
popq %r15
leaq 0xc15a(%rip), %r12      # 0x10db4
xorl %ebp, %ebp
movq %rbx, (%rsp)
cmpl (%r12), %r15d
jge 0x4d80
xorl %r13d, %r13d
pushq $0x1
popq %rax
movl %eax, %r14d
cmpl $0x8, %r14d
je 0x4c9a
leal (%r15,%r14), %eax
decl %eax
cmpl %eax, (%r12)
jle 0x4c9a
movl %r15d, %edi
callq 0x688b
shlq $0x22, %rax
cmovnel %r14d, %r13d
incl %r14d
jmp 0x4c73
testl %r13d, %r13d
je 0x4d78
movl %ebp, 0xc(%rsp)
movq %rbx, %rdi
leaq 0x4aae(%rip), %rsi      # 0x975f
movq 0x20(%rsp), %rdx
movl %r13d, %ecx
movl %r15d, %r8d
xorl %eax, %eax
callq 0x31c0
testl %r13d, %r13d
movl $0x0, %r14d
cmovgl %r13d, %r14d
movl %r15d, %ebp
subl $0x1, %r14d
jb 0x4d39
cmpl %ebp, (%r12)
jle 0x4d39
movq %r12, %rbx
movl %ebp, %edi
callq 0x688b
movq %rax, %r12
movl %r12d, %edx
andl $0x3fffffff, %edx       # imm = 0x3FFFFFFF
leaq 0x10(%rsp), %rdi
leaq 0x4a6a(%rip), %rsi      # 0x976b
xorl %eax, %eax
callq 0x3280
btl $0x1e, %r12d
jae 0x4d24
movsbq 0x19(%rsp), %rax
leaq 0x4a38(%rip), %rcx      # 0x9754
movb -0x30(%rax,%rcx), %al
movb %al, 0x19(%rsp)
leaq 0x10(%rsp), %rdi
movq (%rsp), %rsi
callq 0x3140
incl %ebp
movq %rbx, %r12
jmp 0x4cd3
movq (%rsp), %rbx
leaq 0x4a2e(%rip), %r14      # 0x9772
pushq $0xa
popq %rbp
cmpl $0x6, %r13d
jg 0x4d63
movq %r14, %rdi
movq %rbp, %rsi
pushq $0x1
popq %rdx
movq %rbx, %rcx
callq 0x32a0
incl %r13d
jmp 0x4d47
pushq $0xa
popq %rdi
movq %rbx, %rsi
callq 0x3170
movl 0xc(%rsp), %ebp
incl %ebp
addl $0x6, %r15d
incl %r15d
jmp 0x4c60
testl %ebp, %ebp
je 0x4da8
movl 0x8(%rsp), %eax
movl %eax, %edx
negl %edx
cmovsl %eax, %edx
leaq 0x4762(%rip), %rsi      # 0x94f8
movq %rbx, %rdi
xorl %eax, %eax
callq 0x31c0
movq %rbx, %rdi
callq 0x3200
movq %rbx, %rdi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x30f0
// File: /workspace/github_c_makefile_star2_O2/pahihu[P]mixal/io.c
// Function: assigned_file
static FILE *assigned_file(unsigned device)
{
    if (redirect_devices)
        return devices[device].file;

    /* glibc2.1 fix -ajk */
    switch (devices[device].type) {
    case card_in:
        return stdin; break;
    case card_out: case printer:
        return stdout; break;
    default:
        return devices[device].file;
    }
}

// Assembly:
movl %edi, %eax
cmpb $0x1, 0xaef1(%rip)      # 0xfcb8
jne 0x4ddd
imulq $0x48, %rax, %rax
leaq 0xa3bc(%rip), %rcx      # 0xf190
addq %rcx, %rax
addq $0x8, %rax
jmp 0x4e09
imulq $0x48, %rax, %rcx
leaq 0xa3a8(%rip), %rax      # 0xf190
movl (%rcx,%rax), %edx
addl $-0x3, %edx
cmpl $0x3, %edx
jae 0x4e02
movl %edx, %eax
leaq 0x999c(%rip), %rcx      # 0xe798
movq (%rcx,%rax,8), %rax
jmp 0x4e09
addq %rcx, %rax
addq $0x8, %rax
movq (%rax), %rax
retq
// File: /workspace/github_c_makefile_star2_O2/pahihu[P]mixal/io.c
// Function: io_mark_incomplete
static void io_mark_incomplete(Address buffer, unsigned block_size, int mark)
{
    int i, current_count;

    if (buffer < 0) {
        if (normal_state == get_internal_state())
            error("Cannot access control store in normal state");
    }

    if (dbg > 2) {
        fflush(stdout);
        fprintf(stderr, "io_mark_incomplete(%d,%d,%d)\n",
                buffer, block_size, mark);
    }
    for (i = 0; i < block_size; i++) {
        if (memory_size <= magnitude(buffer + i))
            error("Address out of range -- io_mark_incomplete");
        current_count = fetch_incomplete(buffer + i);
        if (current_count + mark < 0) {
            if (dbg > 3) {
                fflush(stdout);
                fprintf(stderr, "current: %d, mark: %d\n", current_count, mark);
            }
            error("Overlapping buffers -- io_mark_incomplete");
        }
        store_incomplete(buffer + i, current_count + mark);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movl %esi, %ebp
movl %edi, %r14d
testl %edi, %edi
jns 0x4e3a
callq 0x65f3
testl %eax, %eax
jne 0x4e3a
leaq 0x4729(%rip), %rdi      # 0x955c
xorl %eax, %eax
callq 0x5700
movslq %r14d, %r12
movl %ebp, %r13d
leaq (,%r12,4), %r14
movq %r14, %rbp
negq %rbp
subq $0x1, %r13
jb 0x4ede
movl %r12d, %eax
andl $0x3fffffff, %eax       # imm = 0x3FFFFFFF
leaq 0xbf4d(%rip), %rcx      # 0x10db4
cmpl %eax, (%rcx)
jg 0x4e79
leaq 0x4716(%rip), %rdi      # 0x9588
xorl %eax, %eax
callq 0x5700
movq 0xae48(%rip), %rax      # 0xfcc8
leaq (%rax,%rbp), %rdx
movq 0xae35(%rip), %rcx      # 0xfcc0
leaq (%rcx,%r14), %rsi
testq %r12, %r12
cmovsq %rdx, %rsi
movl (%rsi), %r15d
addl %ebx, %r15d
jns 0x4eba
leaq 0x470e(%rip), %rdi      # 0x95b3
xorl %eax, %eax
callq 0x5700
movq 0xae0d(%rip), %rcx      # 0xfcc0
movq 0xae0e(%rip), %rax      # 0xfcc8
movl %r12d, %edx
negl %edx
cmovsl %r12d, %edx
testq %r12, %r12
cmovnsq %rcx, %rax
movl %r15d, (%rax,%rdx,4)
addq $0x4, %r14
addq $-0x4, %rbp
incq %r12
jmp 0x4e4e
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/pahihu[P]mixal/io.c
// Function: disk_in
static void disk_in(Byte device, Cell rX, Address buffer)
{
    unsigned block_num;

    block_num = (unsigned) field(make_field_spec(4, 5), rX);
    if (devices[device].type == drum)
        block_num &= 511;

    set_file_position(device, block_num, false);
    read_block(device, buffer);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %ebx
movq %rsi, %r14
movl %edi, %ebp
pushq $0x4
popq %rdi
pushq $0x5
popq %rsi
callq 0x3610
movl %eax, %edi
movq %r14, %rsi
callq 0x35b3
movl %ebp, %ecx
imulq $0x48, %rcx, %rcx
leaq 0xa276(%rip), %rdx      # 0xf190
movl %eax, %esi
andl $0x1ff, %esi            # imm = 0x1FF
cmpl $0x0, (%rcx,%rdx)
cmovnel %eax, %esi
movl %ebp, %edi
callq 0x523d
movl %ebp, %edi
movl %ebx, %esi
popq %rbx
popq %r14
popq %rbp
jmp 0x52f0
// File: /workspace/github_c_makefile_star2_O2/pahihu[P]mixal/io.c
// Function: disk_ioc
static void disk_ioc(Byte device, Cell rX, Cell offset)
{
    unsigned block_num;

    if (magnitude(offset) != 0)
        error("IOC argument undefined for disk device %02o", device);

    block_num = (unsigned) field(make_field_spec(4, 5), rX);
    if (devices[device].type == drum)
        block_num &= 511;

    set_file_position(device, block_num, false);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movl %edi, %ebx
shlq $0x22, %rdx
je 0x4fac
leaq 0x46da(%rip), %rdi      # 0x967d
movl %ebx, %esi
xorl %eax, %eax
callq 0x5700
pushq $0x4
popq %rdi
pushq $0x5
popq %rsi
callq 0x3610
movl %eax, %edi
movq %r14, %rsi
callq 0x35b3
movl %ebx, %ecx
imulq $0x48, %rcx, %rcx
leaq 0xa1c2(%rip), %rdx      # 0xf190
movl %eax, %esi
andl $0x1ff, %esi            # imm = 0x1FF
cmpl $0x0, (%rcx,%rdx)
cmovnel %eax, %esi
movl %ebx, %edi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x523d
// File: /workspace/github_c_makefile_star2_O2/pahihu[P]mixal/io.c
// Function: tape_ioc
static void tape_ioc(unsigned device, Cell rX, Cell offset)
{
    unsigned block_num, position;
    FILE *fd;
    int c;

    block_num = (unsigned) magnitude(offset);
    if (block_num == 0)
        set_file_position(device, 0, false);
    else if (is_negative(offset)) {
        position = get_file_position(device);
        if (position < block_num)
            block_num = 0;
        else
            block_num = position - block_num;
        set_file_position(device, block_num, false);
    } else {
        fd = assigned_file(device);
        position = get_file_position(device);
        while (block_num--) {
            set_file_position(device, ++position, false);
            c = fgetc(fd);
            if (c == EOF)
                break;
            if (ungetc(c, fd) == EOF)
                error("Device %02o: %s", device, strerror(errno));
        }
    }
    devices[device].position = get_file_position(device);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edi, %ebx
movl %edx, %r12d
andl $0x3fffffff, %r12d      # imm = 0x3FFFFFFF
je 0x50bb
movl %ebx, %edi
btl $0x1e, %edx
jb 0x50bf
callq 0x4dbe
movq %rax, %r14
movl %ebx, %edi
callq 0x54f5
movl %eax, %ebp
incl %ebp
leaq 0x45a5(%rip), %r15      # 0x9616
subl $0x1, %r12d
jb 0x50d5
movl %ebx, %edi
movl %ebp, %esi
callq 0x523d
movq %r14, %rdi
callq 0x3150
cmpl $-0x1, %eax
je 0x50d5
movl %eax, %edi
movq %r14, %rsi
callq 0x3210
cmpl $-0x1, %eax
jne 0x50b7
callq 0x3070
movl (%rax), %edi
callq 0x32b0
movq %r15, %rdi
movl %ebx, %esi
movq %rax, %rdx
xorl %eax, %eax
callq 0x5700
incl %ebp
jmp 0x5071
xorl %esi, %esi
jmp 0x50ce
callq 0x54f5
movl %eax, %esi
xorl %eax, %eax
subl %r12d, %esi
cmovbl %eax, %esi
movl %ebx, %edi
callq 0x523d
movl %ebx, %edi
callq 0x54f5
movl %eax, %eax
movl %ebx, %ecx
imulq $0x48, %rcx, %rcx
leaq 0xa0a5(%rip), %rdx      # 0xf190
movq %rax, 0x10(%rcx,%rdx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/pahihu[P]mixal/io.c
// Function: set_file_position
static void set_file_position(Byte device, unsigned block, Flag writing)
{
    if (devices[device].position != (long) block) {
        if (attributes(device)->size != 0 && attributes(device)->size <= block)
            error("Device %02o full!");
        else {
            if (fseek(assigned_file(device),
                      (long) block * external_block_size(device),
                  SEEK_SET))
                error("Device %02o: %s", device, strerror(errno));
              devices[device].position = (long) block;
        }
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl %edi, %eax
imulq $0x48, %rax, %rax
leaq 0x9f3d(%rip), %rcx      # 0xf190
movl %esi, %r14d
cmpq %r14, 0x10(%rax,%rcx)
je 0x52cf
movl (%rax,%rcx), %edx
imulq $0x38, %rdx, %r12
leaq 0x93a5(%rip), %r13      # 0xe610
addq $-0x3, %rdx
cmpq $0x4, %rdx
setb %dl
cmpl %esi, 0x10(%r12,%r13)
seta %sil
orb %dl, %sil
je 0x52d9
movl %edi, %ebx
leaq (%rax,%rcx), %r15
addq $0x10, %r15
callq 0x4dbe
imull $0x6, 0x14(%r12,%r13), %esi
incl %esi
imulq %r14, %rsi
movq %rax, %rdi
xorl %edx, %edx
callq 0x3220
testl %eax, %eax
je 0x52cc
callq 0x3070
movl (%rax), %edi
callq 0x32b0
leaq 0x4356(%rip), %rdi      # 0x9616
movl %ebx, %esi
movq %rax, %rdx
xorl %eax, %eax
callq 0x5700
movq %r14, (%r15)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x4324(%rip), %rdi      # 0x9604
xorl %eax, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x5700
// File: /workspace/github_c_makefile_star2_O2/pahihu[P]mixal/io.c
// Function: read_block
static void read_block(Byte device, Address buffer)
{
    FILE *file = assigned_file(device);
    unsigned size = block_size(device);
    unsigned i, b;
    int c;

    for (i = 0; i < size; ++i) {
        Cell cell = zero;
        c = fgetc(file);
        if (c == EOF) {
            if (true /*get_halting()*/) {
                fflush(stdout);
                fprintf(stderr, "Unexpected EOF reading from device %02o\n", device);
                return;
            }
            else
                error("Unexpected EOF reading from device %02o", device);
        }
        else if (c == '-')
            cell = negative(cell);
    
        for (b = 1; b <= 5; ++b) {
            c = fgetc(file);
            if (c == EOF) {
                if (true /*get_halting()*/) {
                    fflush(stdout);
                    fprintf(stderr, "Unexpected EOF reading from device %02o\n", device);
                    return;
                }
                else
                    error("Unexpected EOF reading from device %02o", device);
            }
            cell = set_byte(C_int_to_mix(c), b, cell);
        }
        memory_store(buffer + i, cell);
    }
    c = fgetc(file);            /* should be '\n' */
    assert(c == '\n');
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %r14d
movl %edi, %ebx
callq 0x4dbe
movq %rax, %r15
movl %ebx, 0x4(%rsp)
movl %ebx, %eax
imulq $0x48, %rax, %rax
leaq 0x9e77(%rip), %rcx      # 0xf190
movl (%rax,%rcx), %eax
imulq $0x38, %rax, %rax
leaq 0x92e9(%rip), %rcx      # 0xe610
movl 0x14(%rax,%rcx), %r13d
xorl %ebx, %ebx
movq %r15, %rdi
callq 0x3150
cmpl %r13d, %ebx
je 0x53cc
cmpl $0x2d, %eax
je 0x534e
cmpl $-0x1, %eax
je 0x5393
xorl %r12d, %r12d
jmp 0x5354
movl $0x40000000, %r12d      # imm = 0x40000000
pushq $0x1
popq %rbp
cmpl $0x6, %ebp
je 0x5383
movq %r15, %rdi
callq 0x3150
cmpl $-0x1, %eax
je 0x5393
movl %eax, %edi
callq 0x3f9f
movl %eax, %edi
movl %ebp, %esi
movq %r12, %rdx
callq 0x363f
movq %rax, %r12
incl %ebp
jmp 0x5357
leal (%rbx,%r14), %edi
movq %r12, %rsi
callq 0x6909
incl %ebx
jmp 0x532e
movq 0x9c36(%rip), %rax      # 0xefd0
movq (%rax), %rdi
callq 0x3200
movq 0x9c4f(%rip), %rax      # 0xeff8
movq (%rax), %rdi
leaq 0x4273(%rip), %rsi      # 0x9626
movl 0x4(%rsp), %edx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x31c0
cmpl $0xa, %eax
jne 0x53e0
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x4268(%rip), %rdi      # 0x964f
leaq 0x426b(%rip), %rsi      # 0x9659
leaq 0x4269(%rip), %rcx      # 0x965e
movl $0x26f, %edx            # imm = 0x26F
callq 0x3130
// File: /workspace/github_c_makefile_star2_O2/pahihu[P]mixal/io.c
// Function: write_line
static void write_line(FILE *file, Address buffer, unsigned size, Flag text)
{
    unsigned i;
    for (i = 0; i < size; ++i)
        write_cell(memory_fetch(buffer + i), file, text);
    fputc('\n', file);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, 0x4(%rsp)
movl %edx, %r14d
movl %esi, %r15d
movq %rdi, %rbx
xorl %ebp, %ebp
cmpl %r14d, %ebp
je 0x54dc
leal (%r15,%rbp), %edi
callq 0x688b
movq %rax, %r12
cmpl $0x0, 0x4(%rsp)
je 0x549b
pushq $0x1
popq %r13
cmpl $0x6, %r13d
je 0x54d5
movl %r13d, %edi
movq %r12, %rsi
callq 0x357c
movl %eax, %edi
callq 0x3ef4
movsbl %al, %edi
movq %rbx, %rsi
callq 0x3170
incl %r13d
jmp 0x5473
btl $0x1e, %r12d
pushq $0x2d
popq %rdi
pushq $0x20
popq %rax
cmovael %eax, %edi
movq %rbx, %rsi
callq 0x3170
pushq $0x1
popq %r13
cmpl $0x6, %r13d
je 0x54d5
movl %r13d, %edi
movq %r12, %rsi
callq 0x357c
movl %eax, %edi
movq %rbx, %rsi
callq 0x3170
incl %r13d
jmp 0x54b5
incl %ebp
jmp 0x5453
pushq $0xa
popq %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3170
// File: /workspace/github_c_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %edx, 0x4(%rsp)
movq %rsi, 0x8(%rsp)
movq %rdi, %rbx
xorl %ebp, %ebp
pushq $0x1
popq %r14
xorl %r12d, %r12d
cmpl 0x4(%rsp), %r12d
je 0x55c7
movq %r12, 0x10(%rsp)
xorl %r15d, %r15d
movl %r14d, %r12d
cmpl $0x6, %r12d
je 0x55ac
xorl %r13d, %r13d
testl %ebp, %ebp
je 0x5588
movl %r14d, %ebp
movl %r13d, %edi
movl %r12d, %esi
movq %r15, %rdx
callq 0x363f
movq %rax, %r15
incl %r12d
jmp 0x5562
movq %rbx, %rdi
callq 0x3150
cmpl $-0x1, %eax
je 0x556f
movl %r14d, %ebp
cmpl $0xa, %eax
je 0x5572
movsbl %al, %edi
callq 0x3f47
movl %eax, %r13d
xorl %ebp, %ebp
jmp 0x5572
movq 0x8(%rsp), %rax
movq 0x10(%rsp), %r12
leal (%r12,%rax), %edi
movq %r15, %rsi
callq 0x6909
incl %r12d
jmp 0x5550
testl %ebp, %ebp
je 0x55da
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
callq 0x3150
cmpl $-0x1, %eax
je 0x55cb
cmpl $0xa, %eax
je 0x55cb
leaq 0x40b6(%rip), %rdi      # 0x96a9
movl %eax, %esi
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x5700
nop
// File: /workspace/github_c_makefile_star2_O2/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 %r14
pushq %rbx
subq $0xd8, %rsp
movq %rdi, %rbx
movq %rsi, 0x28(%rsp)
movq %rdx, 0x30(%rsp)
movq %rcx, 0x38(%rsp)
movq %r8, 0x40(%rsp)
movq %r9, 0x48(%rsp)
testb %al, %al
je 0x566d
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movq 0xb674(%rip), %rdx      # 0x10ce8
movq 0x997d(%rip), %r14      # 0xeff8
movq (%r14), %rcx
testq %rdx, %rdx
jne 0x5697
leaq 0x4176(%rip), %rdi      # 0x9800
pushq $0xd
popq %rsi
pushq $0x1
popq %rdx
callq 0x32a0
jmp 0x56b0
movl 0xb653(%rip), %eax      # 0x10cf0
leaq 0x4140(%rip), %rsi      # 0x97e4
movq %rcx, %rdi
movl %eax, %ecx
xorl %eax, %eax
callq 0x31c0
leaq 0x20(%rsp), %rax
movq %rsp, %rdx
movq %rax, 0x10(%rdx)
leaq 0xf0(%rsp), %rax
movq %rax, 0x8(%rdx)
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, (%rdx)
movq (%r14), %rdi
movq %rbx, %rsi
callq 0x3260
movq (%r14), %rsi
pushq $0xa
popq %rdi
callq 0x3170
callq 0x4b11
pushq $0x1
popq %rdi
callq 0x3290
// File: /workspace/github_c_makefile_star2_O2/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 %r14
pushq %rbx
subq $0xd8, %rsp
movq %rdi, %rbx
leaq 0x20(%rsp), %r14
movq %rsi, 0x8(%r14)
movq %rdx, 0x10(%r14)
movq %rcx, 0x18(%r14)
movq %r8, 0x20(%r14)
movq %r9, 0x28(%r14)
testb %al, %al
je 0x5761
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movq 0x9868(%rip), %rax      # 0xefd0
movq (%rax), %rdi
callq 0x3200
incl 0xb58a(%rip)            # 0x10d00
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, (%rsp)
leaq 0xf0(%rsp), %rax
movq %rax, 0x8(%rsp)
movq %r14, 0x10(%rsp)
movq 0xb55b(%rip), %rax      # 0x10cf8
testq %rax, %rax
je 0x57b5
movq %rsp, %rsi
movq %rbx, %rdi
callq *%rax
addq $0xd8, %rsp
popq %rbx
popq %r14
retq
leaq 0x4052(%rip), %rdi      # 0x980e
xorl %eax, %eax
callq 0x560c
// File: /workspace/github_c_makefile_star2_O2/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 %r14
pushq %rbx
subq $0xd8, %rsp
movq %rdi, %rbx
movq %rsi, 0x28(%rsp)
movq %rdx, 0x30(%rsp)
movq %rcx, 0x38(%rsp)
movq %r8, 0x40(%rsp)
movq %r9, 0x48(%rsp)
testb %al, %al
je 0x5824
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movq 0xb4bd(%rip), %rdx      # 0x10ce8
movq 0x97c6(%rip), %r14      # 0xeff8
movq (%r14), %rcx
testq %rdx, %rdx
jne 0x584e
leaq 0x4000(%rip), %rdi      # 0x9841
pushq $0x9
popq %rsi
pushq $0x1
popq %rdx
callq 0x32a0
jmp 0x5867
movl 0xb49c(%rip), %eax      # 0x10cf0
leaq 0x3fce(%rip), %rsi      # 0x9829
movq %rcx, %rdi
movl %eax, %ecx
xorl %eax, %eax
callq 0x31c0
leaq 0x20(%rsp), %rax
movq %rsp, %rdx
movq %rax, 0x10(%rdx)
leaq 0xf0(%rsp), %rax
movq %rax, 0x8(%rdx)
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, (%rdx)
movq (%r14), %rdi
movq %rbx, %rsi
callq 0x3260
movq (%r14), %rsi
pushq $0xa
popq %rdi
callq 0x3170
addq $0xd8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/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 %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq 0xb12e(%rip), %rdx      # 0x10ce8
movq 0x9437(%rip), %r15      # 0xeff8
movq (%r15), %rcx
testq %rdx, %rdx
jne 0x5bdd
leaq 0x4739(%rip), %rdi      # 0xa309
pushq $0x7
popq %rsi
pushq $0x1
popq %rdx
callq 0x32a0
jmp 0x5bf6
movl 0xb10d(%rip), %eax      # 0x10cf0
leaq 0x3c00(%rip), %rsi      # 0x97ea
movq %rcx, %rdi
movl %eax, %ecx
xorl %eax, %eax
callq 0x31c0
movq (%r15), %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x3260
movq (%r15), %rsi
pushq $0xa
popq %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x3170
// File: /workspace/github_c_makefile_star2_O2/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 %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
movq %rdi, %rbx
cmpb $0x2d, (%rdi)
jne 0x5c34
cmpb $0x0, 0x1(%rbx)
je 0x5d2b
leaq 0x3703(%rip), %rsi      # 0x933e
movq %rbx, %rdi
callq 0x3250
movq %rax, %r14
testq %rax, %rax
je 0x5d3a
andl $0x0, 0xb09a(%rip)      # 0x10cf0
movq %rbx, 0xb08b(%rip)      # 0x10ce8
movq %rsp, %r15
leaq 0x3c0e(%rip), %r12      # 0x9875
movq %r15, %rdi
movl $0x101, %esi            # imm = 0x101
movq %r14, %rdx
callq 0x3190
testq %rax, %rax
je 0x5ce0
incl 0xb06e(%rip)            # 0x10cf0
movq %r15, %rdi
callq 0x3fbc
movq %r15, %rdi
callq 0x3100
cmpb $0xa, -0x1(%rax,%r15)
je 0x5c67
movq %r15, %rdi
movl $0x101, %esi            # imm = 0x101
movq %r14, %rdx
callq 0x3190
testq %rax, %rax
je 0x5ce0
movq %r12, %rdi
xorl %eax, %eax
callq 0x5700
movq %r15, %rdi
callq 0x3100
cmpb $0xa, -0x1(%rax,%r15)
je 0x5c67
movq %r15, %rdi
movl $0x101, %esi            # imm = 0x101
movq %r14, %rdx
callq 0x3190
testq %rax, %rax
jne 0x5cb9
jmp 0x5c67
movq %r14, %rdi
callq 0x30c0
testl %eax, %eax
je 0x5d0c
callq 0x3070
movl (%rax), %edi
callq 0x32b0
leaq 0x3825(%rip), %rdi      # 0x9524
movq %rbx, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0x5700
movq %r14, %rdi
callq 0x30f0
andq $0x0, 0xafcc(%rip)      # 0x10ce8
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq 0x92a6(%rip), %rax      # 0xefd8
movq (%rax), %r14
jmp 0x5c4f
callq 0x3070
movl (%rax), %edi
callq 0x32b0
leaq 0x37d7(%rip), %rdi      # 0x9524
movq %rbx, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0x560c
// File: /workspace/github_c_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %esi, %r14d
movl %edi, %ebp
movzbl 0xac2d(%rip), %eax      # 0x10d10
xorl %ebx, %ebx
movl %eax, %ecx
addl $-0x2a, %ecx
cmpl $0x3c, %ecx
ja 0x6160
movabsq $0x40000000000004b, %rdx # imm = 0x40000000000004B
btq %rcx, %rdx
jae 0x6109
callq 0x6274
movq %rax, %rbx
jmp 0x615a
cmpq $0x13, %rcx
je 0x6123
cmpq $0x3c, %rcx
jne 0x6160
movq 0xac04(%rip), %rbx      # 0x10d20
callq 0x5eec
jmp 0x6147
pushq $0x3d
popq %rbx
movl %ebx, %edi
callq 0x6498
callq 0x621b
movq %rax, %r15
movl %ebx, %edi
callq 0x6498
movq %r15, %rdi
callq 0x83d8
movq %rax, %rbx
leaq 0x95e6(%rip), %rax      # 0xf734
movl (%rax), %esi
movq %rbx, %rdi
callq 0x8225
xorl %ebx, %ebx
movb 0xabb0(%rip), %al       # 0x10d10
cmpb $0x2c, %al
jne 0x6173
callq 0x5eec
callq 0x6274
movq %rax, %r15
jmp 0x6176
xorl %r15d, %r15d
movl %r14d, %r12d
movq %r12, %rdi
callq 0x61f3
movq %rax, %r14
testl %ebp, %ebp
sete %al
cmpq %r12, %r14
sete %cl
orb %al, %cl
jne 0x61a1
leaq 0x3a36(%rip), %rdi      # 0x9bd0
xorl %eax, %eax
callq 0x5700
pushq $0x2
popq %rsi
xorl %edi, %edi
callq 0x3610
movl %eax, %ebp
pushq $0x3
popq %rdi
movl %edi, %esi
callq 0x3610
movl %eax, %r12d
pushq $0x4
popq %rdi
movl %edi, %esi
callq 0x3610
movq %r14, %rdi
movl %eax, %esi
xorl %edx, %edx
callq 0x3685
movq %r15, %rdi
movl %r12d, %esi
movq %rax, %rdx
callq 0x3685
movq %rbx, %rdi
movl %ebp, %esi
movq %rax, %rdx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x3685
// File: /workspace/github_c_makefile_star2_O2/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:
cmpb $0x28, 0xab16(%rip)     # 0x10d10
jne 0x6217
pushq %rbx
callq 0x5eec
callq 0x6274
movq %rax, %rbx
pushq $0x29
popq %rdi
callq 0x6498
movq %rbx, %rax
popq %rbx
retq
movq %rdi, %rax
retq
// File: /workspace/github_c_makefile_star2_O2/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 %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
xorl %ebx, %ebx
pushq $0x5
popq %r14
callq 0x6274
movq %rax, %r15
movq %r14, %rdi
callq 0x61f3
movq %rax, %r12
movq %rax, %rdi
callq 0x37e1
movq %r15, %rdi
movl %r12d, %esi
movq %rbx, %rdx
callq 0x3685
movq %rax, %rbx
cmpb $0x2c, 0xaab4(%rip)     # 0x10d10
jne 0x6265
callq 0x5eec
jmp 0x6229
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0x98ba(%rip), %r13      # 0xfb40
movl (%r13), %eax
movl %eax, 0x4(%rsp)
pushq $0x1
popq %rdi
callq 0x3554
movq %rax, %rbx
movzbl 0xaa70(%rip), %eax      # 0x10d10
cmpl $0x2b, %eax
je 0x62b1
cmpl $0x2d, %eax
jne 0x62b6
xorq $0x40000000, %rbx       # imm = 0x40000000
callq 0x5eec
andl $0x0, (%r13)
callq 0x6520
movq %rbx, %rdi
movq %rax, %rsi
callq 0x39f3
movq %rax, %rbx
leaq 0x39f1(%rip), %r14      # 0x9cc6
pushq $0x7
popq %r15
leaq 0x84d0(%rip), %rbp      # 0xe7b0
movsbl 0xaa29(%rip), %esi      # 0x10d10
movq %r14, %rdi
movq %r15, %rdx
callq 0x3180
testq %rax, %rax
je 0x6317
movq %rax, %r12
callq 0x5eec
subq %r14, %r12
callq 0x6520
movq %rbx, %rdi
movq %rax, %rsi
callq *(%rbp,%r12,8)
movq %rax, %rbx
jmp 0x62e0
cmpl $0x0, (%r13)
je 0x632c
leaq 0x3963(%rip), %rdi      # 0x9c88
xorl %eax, %eax
callq 0x57c3
movl 0x4(%rsp), %eax
movl %eax, (%r13)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/pahihu[P]mixal/parse.c
// Function: parse_S
static void advance_S(void)
{
    token = number;
    token_value = zero;

    if (the_string[0] == '\0') {
        token = eos;
	return;
    } else if (the_string[0] == '"') {      /* a quoted string */
	token = number;
	token_value = zero;
	++the_string;
	{
	    const char *end = strchr(the_string, '"');
	    if (!end) {
		error("Missing '\"'");
		the_string += strlen (the_string);
	    } else {
		unsigned length = end - the_string;
		if (5 < length) {
		    warn("String doesn't fit in a machine word");
		    length = 5;
		}
		{
		    unsigned i;
		    for (i = 0; i < length; ++i)
			token_value =
			  set_byte(C_char_to_mix(the_string[i]), i+1, token_value);
		}
	    }
	    the_string = end + 1;
	}
    } else {    /* read max. 5 chars */
        unsigned i;
        for (i = 0; i < 5; i++) {
            if (the_string[0] == '\0') {
                token = eos;
                break;
            }
	    token_value = set_byte(C_char_to_mix(the_string[0]), i+1, token_value);
            the_string++;
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
andq $0x0, 0xa9c3(%rip)      # 0x10d18
movb $0x30, 0xa9b4(%rip)     # 0x10d10
movq 0xa9a5(%rip), %r14      # 0x10d08
movzbl (%r14), %eax
testl %eax, %eax
je 0x63f2
cmpl $0x22, %eax
jne 0x63fd
incq %r14
movq %r14, 0xa986(%rip)      # 0x10d08
pushq $0x22
popq %rsi
movq %r14, %rdi
callq 0x3110
movq %rax, %rbx
testq %rax, %rax
je 0x644e
movq %rbx, %rax
subq %r14, %rax
cmpl $0x6, %eax
jb 0x63b5
leaq 0x389d(%rip), %rdi      # 0x9c48
xorl %eax, %eax
callq 0x57c3
pushq $0x5
popq %rax
movl %eax, %r15d
xorl %r14d, %r14d
cmpq %r14, %r15
je 0x645c
movq 0xa93d(%rip), %rax      # 0x10d08
movsbl (%rax,%r14), %edi
callq 0x3f47
incq %r14
movq 0xa939(%rip), %rdx      # 0x10d18
movl %eax, %edi
movl %r14d, %esi
callq 0x363f
movq %rax, 0xa928(%rip)      # 0x10d18
jmp 0x63bb
movb $0x7a, 0xa917(%rip)     # 0x10d10
xorl %ebx, %ebx
jmp 0x646d
pushq $0x1
popq %rbp
xorl %ebx, %ebx
cmpl $0x6, %ebp
je 0x646d
movb (%r14), %al
testb %al, %al
je 0x6445
movsbl %al, %edi
callq 0x3f47
movq 0xa8fb(%rip), %rdx      # 0x10d18
movl %eax, %edi
movl %ebp, %esi
callq 0x363f
movq %rax, %rbx
movq %rax, 0xa8e8(%rip)      # 0x10d18
movq 0xa8d1(%rip), %r14      # 0x10d08
incq %r14
movq %r14, 0xa8c7(%rip)      # 0x10d08
incl %ebp
jmp 0x6402
movb $0x7a, 0xa8c4(%rip)     # 0x10d10
jmp 0x646d
leaq 0x37e7(%rip), %rdi      # 0x9c3c
xorl %eax, %eax
callq 0x5700
incq %rbx
movq %rbx, 0xa8a2(%rip)      # 0x10d08
movq 0xa8ab(%rip), %rbx      # 0x10d18
callq 0x5eec
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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:
cmpb %dil, 0xa871(%rip)      # 0x10d10
je 0x5eec
pushq %rax
movzbl %dil, %esi
movq 0xa857(%rip), %rcx      # 0x10d08
leaq 0x37b5(%rip), %rdi      # 0x9c6d
movq %rcx, %rdx
xorl %r8d, %r8d
xorl %eax, %eax
callq 0x5700
addq $0x8, %rsp
jmp 0x5eec
// File: /workspace/github_c_makefile_star2_O2/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 %rbx
movzbl 0xa7e8(%rip), %eax      # 0x10d10
cmpl $0x64, %eax
je 0x6550
cmpl $0x30, %eax
je 0x6547
cmpl $0x2a, %eax
jne 0x6561
leaq 0x91f6(%rip), %rax      # 0xf734
movl (%rax), %edi
callq 0x3e11
jmp 0x655c
movq 0xa7ca(%rip), %rbx      # 0x10d18
jmp 0x6571
movq 0xa7c9(%rip), %rdi      # 0x10d20
callq 0x81fc
movq %rax, %rbx
jmp 0x6571
leaq 0x3745(%rip), %rdi      # 0x9cad
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x5700
callq 0x5eec
movq %rbx, %rax
popq %rbx
retq
nop
// File: /workspace/github_c_makefile_star2_O2/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 %rax
callq 0x4a2a
leaq 0x95a8(%rip), %rax      # 0xfb40
andl $0x0, (%rax)
andl $0x0, 0xa7a2(%rip)      # 0x10d44
movl 0xa794(%rip), %eax      # 0x10d3c
shrl %eax
andl $0x1, %eax
andl $0x0, 0xa798(%rip)      # 0x10d4c
movl %eax, 0xa78e(%rip)      # 0x10d48
movb $0x0, 0xa78f(%rip)      # 0x10d50
xorl %eax, %eax
leaq 0xa796(%rip), %rcx      # 0x10d60
cmpq $0x50, %rax
je 0x65db
andq $0x0, (%rax,%rcx)
addq $0x8, %rax
jmp 0x65ca
leaq 0x9156(%rip), %rax      # 0xf738
movl (%rax), %eax
movl %eax, 0xa7c6(%rip)      # 0x10db0
movb $0x0, 0xa74f(%rip)      # 0x10d40
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O2/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 %r14
pushq %rbx
pushq %rax
movl $0xfa0, 0xa7ac(%rip)    # imm = 0xFA0
movq $0xfff, 0xa7a5(%rip) # imm = 0xFFF
movl $0xfa0, %ebx            # imm = 0xFA0
testb %dil, %dil
jns 0x663a
movq $0x7fff, 0xa790(%rip) # imm = 0x7FFF
movl $0x7d00, 0xa782(%rip)   # imm = 0x7D00
pushq $-0x1
popq %rdi
movl $0x7d00, %ebx           # imm = 0x7D00
orl %edi, 0xa6fc(%rip)      # 0x10d3c
leal (,%rbx,8), %r14d
movq %r14, %rdi
callq 0x31f0
movq %rax, 0xa771(%rip)      # 0x10dc8
testq %rax, %rax
jne 0x6679
leaq 0x2e43(%rip), %rdi      # 0x94a6
xorl %eax, %eax
callq 0x560c
movslq 0xa743(%rip), %rbx      # 0x10db4
leaq (,%rbx,8), %r14
movq %r14, %rdi
callq 0x31f0
movq %rax, 0xa738(%rip)      # 0x10dc0
testq %rax, %rax
jne 0x66a2
leaq 0x2e12(%rip), %rdi      # 0x94a6
xorl %eax, %eax
callq 0x560c
movslq 0xa712(%rip), %rbx      # 0x10db4
shlq $0x2, %rbx
movq %rbx, %rdi
callq 0x31f0
movq %rax, 0xa723(%rip)      # 0x10dd8
testq %rax, %rax
jne 0x66d3
leaq 0x2de5(%rip), %rdi      # 0x94a6
xorl %eax, %eax
callq 0x560c
movslq 0xa6e5(%rip), %rbx      # 0x10db4
shlq $0x2, %rbx
movq %rbx, %rdi
callq 0x31f0
movq %rax, 0xa7ee(%rip)      # 0x10ed0
testq %rax, %rax
jne 0x66f5
leaq 0x2db8(%rip), %rdi      # 0x94a6
xorl %eax, %eax
callq 0x560c
movl 0xa641(%rip), %eax      # 0x10d3c
testb $0x8, %al
jne 0x6707
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movl 0xa6a7(%rip), %edx      # 0x10db4
testb $0x2, %al
je 0x672a
movq 0xa6a8(%rip), %rsi      # 0x10dc0
leaq 0x370a(%rip), %rdi      # 0x9e29
callq 0x738f
movl 0xa68a(%rip), %edx      # 0x10db4
movq 0xa697(%rip), %rsi      # 0x10dc8
leaq 0x36fd(%rip), %rdi      # 0x9e35
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x738f
// File: /workspace/github_c_makefile_star2_O2/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 %r15
pushq %r14
pushq %rbx
leaq 0x3614(%rip), %rdi      # 0x9d64
xorl %eax, %eax
callq 0x3120
movq 0xa602(%rip), %rdi      # 0x10d60
callq 0x3d5f
pushq $0x9
popq %rdi
callq 0x3050
pushq $0x1
popq %rbx
leaq 0xa5eb(%rip), %r15      # 0x10d60
leaq 0x35eb(%rip), %r14      # 0x9d67
cmpq $0x7, %rbx
je 0x679f
movq (%r15,%rbx,8), %rdi
callq 0x3dc7
movq %r14, %rdi
movl %ebx, %esi
movq %rax, %rdx
xorl %eax, %eax
callq 0x3120
incq %rbx
jmp 0x677c
leaq 0x35ca(%rip), %rdi      # 0x9d70
xorl %eax, %eax
callq 0x3120
movq 0xa5e4(%rip), %rdi      # 0x10d98
callq 0x3d5f
movq 0xa5e0(%rip), %rdi      # 0x10da0
callq 0x3dc7
leaq 0x35a8(%rip), %rdi      # 0x9d74
movq %rax, %rsi
xorl %eax, %eax
callq 0x3120
leaq 0x359e(%rip), %rdi      # 0x9d7b
xorl %eax, %eax
callq 0x3120
callq 0x686d
cmpl $0x0, 0xa554(%rip)      # 0x10d44
leaq 0x35a7(%rip), %rax      # 0x9d9e
leaq 0x35a6(%rip), %rcx      # 0x9da4
cmoveq %rax, %rcx
leaq 0x3590(%rip), %rsi      # 0x9d99
cmovnsq %rcx, %rsi
leaq 0x932c(%rip), %rax      # 0xfb40
cmpl $0x0, (%rax)
leaq 0x2acc(%rip), %rax      # 0x92ea
leaq 0x3587(%rip), %rdx      # 0x9dac
cmoveq %rax, %rdx
cmpl $0x1, 0xa518(%rip)      # 0x10d48
leaq 0x357e(%rip), %rcx      # 0x9db5
cmovneq %rax, %rcx
leaq 0x353f(%rip), %rdi      # 0x9d81
xorl %eax, %eax
callq 0x3120
movq 0xa4e0(%rip), %rsi      # 0x10d30
leaq 0x9459(%rip), %rax      # 0xfcb0
movq (%rax), %rdx
leaq 0x355c(%rip), %rdi      # 0x9dbd
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
jmp 0x3120
// File: /workspace/github_c_makefile_star2_O2/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
pushq %rbx
pushq %rax
movl %edi, %ebx
movl %edi, %ebp
negl %ebp
movl %edi, %eax
cmovnsl %ebp, %eax
cmpl %eax, 0xa515(%rip)      # 0x10db4
jg 0x68af
leaq 0x3530(%rip), %rdi      # 0x9dd8
xorl %eax, %eax
callq 0x5700
testl %ebx, %ebx
js 0x68be
leaq 0xa50e(%rip), %rax      # 0x10dc8
movl %ebx, %ebp
jmp 0x68e1
callq 0x68f1
cmpl $0x0, 0xa47e(%rip)      # 0x10d48
jne 0x68da
leaq 0x2c89(%rip), %rdi      # 0x955c
xorl %eax, %eax
callq 0x5700
leaq 0xa4df(%rip), %rax      # 0x10dc0
movq (%rax), %rax
movl %ebp, %ecx
movq (%rax,%rcx,8), %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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
pushq %r14
pushq %rbx
movq %rsi, %rbx
movl %edi, %ebp
movl %edi, %r14d
negl %r14d
movl %edi, %eax
cmovnsl %r14d, %eax
cmpl %eax, 0xa490(%rip)      # 0x10db4
jg 0x6934
leaq 0x34ab(%rip), %rdi      # 0x9dd8
xorl %eax, %eax
callq 0x5700
testl %ebp, %ebp
js 0x6947
movq 0xa489(%rip), %rax      # 0x10dc8
movl %ebp, %ecx
movq %rbx, (%rax,%rcx,8)
jmp 0x697d
callq 0x68f1
cmpl $0x0, 0xa3f5(%rip)      # 0x10d48
jne 0x6963
leaq 0x2c00(%rip), %rdi      # 0x955c
xorl %eax, %eax
callq 0x5700
movq 0xa45e(%rip), %rax      # 0x10dc8
movq %rbx, (%rax,%r14,8)
cmpl $-0xa, %ebp
jne 0x697d
movl $0x3e8, 0xa3cf(%rip)    # imm = 0x3E8
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/pahihu[P]mixal/run.c
// Function: print_DUMP
void print_DUMP(void)
{
    int i, j;
    Address address = 0;
    
    printf ("\n");
    printf ("CONTENTS OF MIX MEMORY (NONZERO LOCATIONS ONLY)\n\n");
    printf ("LOC        0           1           2           3                  FREQUENCY COUNTS\n");
    for (i = 0; i < memory_size / 4; i++, address += 4) {
        Flag has_nonzero = false;
        for (j = 0; !has_nonzero && j < 4; j++) {
            Cell value = memory_fetch(address + j);
            if (magnitude(value))
                has_nonzero = true;
        }
        if (!has_nonzero)
            continue;
        printf ("%s:", address_to_string(address));
        for (j = 0; j < 4; j++) {
            Cell value = memory_fetch(address + j);
            if (magnitude(value)) {
                printf (" ");
                print_cell (value);
            }
            else
                printf (" %11s", "");
        }
        printf("     ");
        for (j = 0; j < 4; j++)
            printf(" %07d", frequency[address + j]);
        printf("\n");
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
pushq $0xa
popq %rdi
callq 0x3050
leaq 0x39c2(%rip), %rdi      # 0xa366
callq 0x30b0
leaq 0x39e7(%rip), %rdi      # 0xa397
callq 0x30b0
pushq $0x4
popq %rbp
leaq 0x3438(%rip), %r12      # 0x9df7
pushq $0x20
popq %rbx
xorl %r13d, %r13d
xorl %r14d, %r14d
xorl %ecx, %ecx
movl 0xa3e4(%rip), %eax      # 0x10db4
cltd
idivl %ebp
cmpl %eax, %ecx
jge 0x6abc
movl %ecx, 0x4(%rsp)
xorl %r15d, %r15d
movb $0x1, %al
testb $0x1, %al
je 0x6a03
cmpl $0x3, %r15d
ja 0x6a03
leal (%r14,%r15), %edi
callq 0x688b
shlq $0x22, %rax
sete %al
incl %r15d
jmp 0x69e4
testb $0x1, %al
jne 0x6aa9
movl %r14d, %edi
callq 0x3d81
xorl %ebp, %ebp
leaq 0x33d1(%rip), %rdi      # 0x9ded
movq %rax, %rsi
xorl %eax, %eax
callq 0x3120
cmpl $0x4, %ebp
je 0x6a6a
leal (%r14,%rbp), %edi
callq 0x688b
movq %rax, %r15
testl $0x3fffffff, %r15d      # imm = 0x3FFFFFFF
je 0x6a51
movl %ebx, %edi
callq 0x3050
movq %r15, %rdi
callq 0x3d5f
jmp 0x6a66
leaq 0x3399(%rip), %rdi      # 0x9df1
leaq 0x288b(%rip), %rsi      # 0x92ea
xorl %eax, %eax
callq 0x3120
incl %ebp
jmp 0x6a26
leaq 0x2d06(%rip), %rdi      # 0x9777
xorl %eax, %eax
callq 0x3120
xorl %r15d, %r15d
pushq $0x4
popq %rbp
cmpq $0x4, %r15
je 0x6aa1
movq 0xa34d(%rip), %rax      # 0x10dd8
addq %r13, %rax
movl (%rax,%r15,4), %esi
movq %r12, %rdi
xorl %eax, %eax
callq 0x3120
incq %r15
jmp 0x6a7e
pushq $0xa
popq %rdi
callq 0x3050
movl 0x4(%rsp), %ecx
incl %ecx
addq $0x4, %r14
addq $0x10, %r13
jmp 0x69ca
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 %rbx
movl %edi, %eax
imulq $0x18, %rax, %rax
leaq 0x7d07(%rip), %rcx      # 0xe7e0
movq 0x10(%rax,%rcx), %rbx
movzbl (%rbx), %eax
cmpl $0x25, %eax
je 0x6af0
cmpl $0x2a, %eax
jne 0x6b18
shll $0x2, %esi
jmp 0x6af6
shll $0x2, %esi
andl $0x1c, %esi
movl %esi, %eax
leaq (%rbx,%rax), %rsi
incq %rsi
leaq 0xa2da(%rip), %rbx      # 0x10de0
pushq $0x4
popq %rdx
movq %rbx, %rdi
callq 0x3080
movb $0x0, 0xa2cc(%rip)      # 0x10de4
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/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 %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq 0x8091(%rip), %r15      # 0xeff8
movq (%r15), %rcx
leaq 0x3390(%rip), %rdi      # 0xa301
pushq $0xf
popq %rsi
pushq $0x1
popq %rdx
callq 0x32a0
movq (%r15), %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x3260
movq (%r15), %rsi
pushq $0xa
popq %rdi
callq 0x3170
callq 0x6744
pushq $0x1
popq %rdi
callq 0x3290