LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/pahihu[P]mixal/cell.c
// Function: address_to_string
const char *address_to_string(Address address)
{
    static char buf[16];

    if (memory_size > 4000)
        sprintf(buf, "%c%05o", address < 0 ? '-' : '+', abs(address));
    else
        sprintf(buf, "%c%04o", address < 0 ? '-' : '+', abs(address));

    return buf;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
leaq 0xf752(%rip), %rax      # 0x13dd4
cmpl $0xfa0, (%rax)          # imm = 0xFA0
jle 0x46be
movl -0x4(%rbp), %ecx
movl $0x2b, %edx
movl $0x2d, %eax
cmpl $0x0, %ecx
cmovll %eax, %edx
movl -0x4(%rbp), %ecx
movl %ecx, %eax
negl %eax
cmovnsl %eax, %ecx
leaq 0xe4b2(%rip), %rdi      # 0x12b60
leaq 0x7ae2(%rip), %rsi      # 0xc197
movb $0x0, %al
callq 0x3240
jmp 0x46f0
movl -0x4(%rbp), %ecx
movl $0x2b, %edx
movl $0x2d, %eax
cmpl $0x0, %ecx
cmovll %eax, %edx
movl -0x4(%rbp), %ecx
movl %ecx, %eax
negl %eax
cmovnsl %eax, %ecx
leaq 0xe47e(%rip), %rdi      # 0x12b60
leaq 0x7ab5(%rip), %rsi      # 0xc19e
movb $0x0, %al
callq 0x3240
leaq 0xe469(%rip), %rax      # 0x12b60
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/pahihu[P]mixal/cell.c
// Function: index_to_string
const char *index_to_string(Cell index)
{
    static char buf[16];

    if (memory_size > 4000)
        sprintf(buf, "%c%05lo", is_negative (index) ? '-' : '+', magnitude (index));
    else
        sprintf(buf, "%c%04lo", is_negative (index)  ? '-' : '+', magnitude (index));

    return buf;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
leaq 0xf6c1(%rip), %rax      # 0x13dd4
cmpl $0xfa0, (%rax)          # imm = 0xFA0
jle 0x4759
movq -0x8(%rbp), %rcx
andq $0x40000000, %rcx       # imm = 0x40000000
movl $0x2b, %edx
movl $0x2d, %eax
cmpq $0x0, %rcx
cmovnel %eax, %edx
movq -0x8(%rbp), %rcx
andq $0x3fffffff, %rcx       # imm = 0x3FFFFFFF
leaq 0xe427(%rip), %rdi      # 0x12b70
leaq 0x7a55(%rip), %rsi      # 0xc1a5
movb $0x0, %al
callq 0x3240
jmp 0x4795
movq -0x8(%rbp), %rcx
andq $0x40000000, %rcx       # imm = 0x40000000
movl $0x2b, %edx
movl $0x2d, %eax
cmpq $0x0, %rcx
cmovnel %eax, %edx
movq -0x8(%rbp), %rcx
andq $0x3fffffff, %rcx       # imm = 0x3FFFFFFF
leaq 0xe3e9(%rip), %rdi      # 0x12b70
leaq 0x7a1f(%rip), %rsi      # 0xc1ad
movb $0x0, %al
callq 0x3240
leaq 0xe3d4(%rip), %rax      # 0x12b70
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/pahihu[P]mixal/cell.c
// Function: cell_to_address
Address cell_to_address(Cell cell)
{
    if ((sign_bit(cell) != 0 && magnitude(cell) != 0)
       || memory_size <= magnitude(cell))
    {
        char buffer[16];
        unparse_cell(buffer, cell, false);
        error("Value is not an address: %s", buffer);
        return 0;
    }
    return (Address) magnitude(cell);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
andq $0x40000000, %rax       # imm = 0x40000000
cmpq $0x0, %rax
je 0x47ec
movq -0x10(%rbp), %rax
andq $0x3fffffff, %rax       # imm = 0x3FFFFFFF
cmpq $0x0, %rax
jne 0x4806
leaq 0xf5e1(%rip), %rax      # 0x13dd4
movslq (%rax), %rax
movq -0x10(%rbp), %rcx
andq $0x3fffffff, %rcx       # imm = 0x3FFFFFFF
cmpq %rcx, %rax
jg 0x4830
leaq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rsi
xorl %edx, %edx
callq 0x3a30
leaq -0x20(%rbp), %rsi
leaq 0x79b7(%rip), %rdi      # 0xc1d7
movb $0x0, %al
callq 0x74b0
movl $0x0, -0x4(%rbp)
jmp 0x483d
movq -0x10(%rbp), %rax
andq $0x3fffffff, %rax       # imm = 0x3FFFFFFF
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/pahihu[P]mixal/charset.c
// Function: mix_to_C_char
char mix_to_C_char(Byte mix_char)
{
    assert((unsigned)mix_char < num_chars);

    if (current_device_type == card_out) {
	/* --- Card punch cannot write characters 20, 21, 48, ... --- */
        if ((mix_char > 48) || (mix_char == 20) || (mix_char == 21))
            return ' ';
    }
    return mix_chars[(unsigned)mix_char];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x8(%rbp)
movl -0x8(%rbp), %eax
cmpq $0x40, %rax
jae 0x49b6
jmp 0x49d5
leaq 0x784b(%rip), %rdi      # 0xc208
leaq 0x7863(%rip), %rsi      # 0xc227
movl $0x12, %edx
leaq 0x7861(%rip), %rcx      # 0xc231
callq 0x3100
leaq 0xe31c(%rip), %rax      # 0x12cf8
cmpl $0x4, (%rax)
jne 0x49fb
cmpl $0x30, -0x8(%rbp)
ja 0x49f3
cmpl $0x14, -0x8(%rbp)
je 0x49f3
cmpl $0x15, -0x8(%rbp)
jne 0x49f9
movb $0x20, -0x1(%rbp)
jmp 0x4a0d
jmp 0x49fb
movl -0x8(%rbp), %eax
movl %eax, %ecx
leaq 0x7869(%rip), %rax      # 0xc270
movb (%rax,%rcx), %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/pahihu[P]mixal/charset.c
// Function: C_char_to_mix
Byte C_char_to_mix(char c)
{
    Byte ret;
    const char *s;

    s = strchr(mix_chars, toupper(c));
    if (!s) return 63;
    ret = (Byte) (s - mix_chars);

    /* --- Card reader cannot read, characters 20, 21, 48, ... --- */
    if (current_device_type == card_in) {
        if ((ret > 48) || (ret == 20) || (ret == 21))
            ret = 0;
    }
    return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movb %dil, %al
movb %al, -0x5(%rbp)
movsbl -0x5(%rbp), %edi
callq 0x3080
movl %eax, %esi
leaq 0x7830(%rip), %rdi      # 0xc270
callq 0x30e0
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x4a59
movl $0x3f, -0x4(%rbp)
jmp 0x4a97
movq -0x18(%rbp), %rax
leaq 0x780c(%rip), %rcx      # 0xc270
subq %rcx, %rax
movl %eax, -0xc(%rbp)
leaq 0xe287(%rip), %rax      # 0x12cf8
cmpl $0x3, (%rax)
jne 0x4a91
cmpl $0x30, -0xc(%rbp)
ja 0x4a88
cmpl $0x14, -0xc(%rbp)
je 0x4a88
cmpl $0x15, -0xc(%rbp)
jne 0x4a8f
movl $0x0, -0xc(%rbp)
jmp 0x4a91
movl -0xc(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/pahihu[P]mixal/driver.c
// Function: skip_2blanks
static const char *skip_2blanks(const char *s)
{
    unsigned i;
    for (i = 0; i < 2; i++) {
        if (!isblank(s[i]))
            break;
    }
    return s + i;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
cmpl $0x2, -0xc(%rbp)
jae 0x4f1a
callq 0x3280
movq (%rax), %rax
movq -0x8(%rbp), %rcx
movl -0xc(%rbp), %edx
movsbl (%rcx,%rdx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x1, %eax
cmpl $0x0, %eax
jne 0x4f0d
jmp 0x4f1a
jmp 0x4f0f
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x4ee3
movq -0x8(%rbp), %rax
movl -0xc(%rbp), %ecx
addq %rcx, %rax
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/pahihu[P]mixal/driver.c
// Function: lookup_mnemonic
static Handler lookup_mnemonic(const char *mnemonic)
{
    unsigned i;
    delta_C = 0;
    for (i = 0; i < sizeof op_table / sizeof op_table[0]; ++i) {
	if (compare_mnemonics(mnemonic, op_table[i].name) == 0) {
	    the_C = op_table[i].C + delta_C;
	    default_F = op_table[i].F;
	    F_must_be_default = op_table[i].is_extended;
	    return op_table[i].handler;
	}
    }
    return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl $0x0, 0xdd6e(%rip)      # 0x12cb4
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpq $0x46, %rax
jae 0x5005
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %eax
movl %eax, %ecx
leaq 0xbdf6(%rip), %rax      # 0x10d60
shlq $0x5, %rcx
addq %rcx, %rax
movq (%rax), %rsi
callq 0x50c0
cmpl $0x0, %eax
jne 0x4ff5
movl -0x14(%rbp), %eax
movl %eax, %ecx
leaq 0xbdd6(%rip), %rax      # 0x10d60
shlq $0x5, %rcx
addq %rcx, %rax
movl 0x10(%rax), %eax
addl 0xdd1a(%rip), %eax      # 0x12cb4
movl %eax, 0xdd18(%rip)      # 0x12cb8
movl -0x14(%rbp), %eax
movl %eax, %ecx
leaq 0xbdb4(%rip), %rax      # 0x10d60
shlq $0x5, %rcx
addq %rcx, %rax
movl 0x14(%rax), %eax
movl %eax, 0xdd00(%rip)      # 0x12cbc
movl -0x14(%rbp), %eax
movl %eax, %ecx
leaq 0xbd98(%rip), %rax      # 0x10d60
shlq $0x5, %rcx
addq %rcx, %rax
movl 0x18(%rax), %eax
movl %eax, 0xdce8(%rip)      # 0x12cc0
movl -0x14(%rbp), %eax
movl %eax, %ecx
leaq 0xbd7c(%rip), %rax      # 0x10d60
shlq $0x5, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x500d
jmp 0x4ff7
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x4f4d
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/pahihu[P]mixal/driver.c
// Function: do_equ
static void do_equ(void)
{
    define_symbol(string_to_symbol(label), parse_W());
    if (VERBOSE) {
        Cell cell = symbol_value(string_to_symbol(label));
        printf("          %s%010lo  %s\n",
               is_negative(cell) ? "-" : "+", magnitude(cell),
               current_line);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
leaq 0xdc61(%rip), %rdi      # 0x12c90
callq 0xb2b0
movq %rax, -0x10(%rbp)
callq 0x8430
movq -0x10(%rbp), %rdi
movq %rax, %rsi
callq 0xb610
leaq 0xecb0(%rip), %rax      # 0x13d00
cmpl $0x0, (%rax)
je 0x50ae
leaq 0xdc34(%rip), %rdi      # 0x12c90
callq 0xb2b0
movq %rax, %rdi
callq 0xb540
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rcx
andq $0x40000000, %rcx       # imm = 0x40000000
leaq 0x714d(%rip), %rsi      # 0xc1cc
leaq 0x72cb(%rip), %rax      # 0xc351
cmpq $0x0, %rcx
cmovneq %rax, %rsi
movq -0x8(%rbp), %rdx
andq $0x3fffffff, %rdx       # imm = 0x3FFFFFFF
leaq 0x73c3(%rip), %rdi      # 0xc463
leaq 0xdad9(%rip), %rcx      # 0x12b80
movb $0x0, %al
callq 0x30f0
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/pahihu[P]mixal/driver.c
// Function: compare_mnemonics
static int compare_mnemonics(const char *datum, const char *pattern)
{
    unsigned my_delta_C = 0;
    for (; *pattern; ++pattern, ++datum) {
	char d = tolower(*datum);
	if (*pattern == '-') {
	    static const char legals[] = "a123456x";
	    const char *temp = strchr(legals, d);
	    if (temp)
		my_delta_C = temp - legals;
	    else
		break;
	} else if (*pattern == d)
	    ;
	else
	    break;
    }
    {
	int result = tolower(*datum) - *pattern;
	if (result == 0)
	    delta_C = my_delta_C;
	return result;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movq -0x10(%rbp), %rax
cmpb $0x0, (%rax)
je 0x5165
movq -0x8(%rbp), %rax
movsbl (%rax), %edi
callq 0x31a0
movb %al, -0x15(%rbp)
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
jne 0x5131
movsbl -0x15(%rbp), %esi
leaq 0x7371(%rip), %rdi      # 0xc47b
callq 0x30e0
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x512d
movq -0x20(%rbp), %rax
leaq 0x7356(%rip), %rcx      # 0xc47b
subq %rcx, %rax
movl %eax, -0x14(%rbp)
jmp 0x512f
jmp 0x5165
jmp 0x5146
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
movsbl -0x15(%rbp), %ecx
cmpl %ecx, %eax
jne 0x5142
jmp 0x5144
jmp 0x5165
jmp 0x5146
jmp 0x5148
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x8(%rbp)
jmp 0x50d7
movq -0x8(%rbp), %rax
movsbl (%rax), %edi
callq 0x31a0
movq -0x10(%rbp), %rcx
movsbl (%rcx), %ecx
subl %ecx, %eax
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
jne 0x518c
movl -0x14(%rbp), %eax
movl %eax, 0xdb28(%rip)      # 0x12cb4
movl -0x24(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/pahihu[P]mixal/driver.c
// Function: do_end
static void do_end(void)
{
    Address address;

    address = cell_to_address(parse_W());
    set_entry_point(address);
    if (VERBOSE) {
        printf("                %s  %s\n",
                address_to_string(address), current_line);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
callq 0x8430
movq %rax, %rdi
callq 0x47c0
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %edi
callq 0x3520
leaq 0xeab9(%rip), %rax      # 0x13d00
cmpl $0x0, (%rax)
je 0x526c
movl -0x4(%rbp), %edi
callq 0x4670
movq %rax, %rsi
leaq 0x71ed(%rip), %rdi      # 0xc44b
leaq 0xd91b(%rip), %rdx      # 0x12b80
movb $0x0, %al
callq 0x30f0
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/pahihu[P]mixal/driver.c
// Function: do_orig
static void do_orig(void)
{
    here = cell_to_address(parse_W());
    if (VERBOSE) {
        printf("                %s  %s\n",
                address_to_string(here), current_line);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
callq 0x8430
movq %rax, %rdi
callq 0x47c0
movl %eax, %ecx
leaq 0xd4aa(%rip), %rax      # 0x12744
movl %ecx, (%rax)
leaq 0xea5d(%rip), %rax      # 0x13d00
cmpl $0x0, (%rax)
je 0x52ce
leaq 0xd495(%rip), %rax      # 0x12744
movl (%rax), %edi
callq 0x4670
movq %rax, %rsi
leaq 0x718b(%rip), %rdi      # 0xc44b
leaq 0xd8b9(%rip), %rdx      # 0x12b80
movb $0x0, %al
callq 0x30f0
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/pahihu[P]mixal/io.c
// Function: do_scheduled_io
void do_scheduled_io(unsigned clocks)
{
    int i;
    Byte device;

    if (dbg > 3) {
        fflush(stdout);
        fprintf(stderr,"do_scheduled_io(%d)\n", clocks);
    }
    for (i = 0; i < clocks; i++) {
        next_scheduled_io = (unsigned) -1;
        for (device = 0; device < num_devices; device++) {
            if (devices[device].busy) {
                devices[device].busy--;
                if (0 == devices[device].busy)
                    do_io(device);
                else if (devices[device].busy < next_scheduled_io)
                    next_scheduled_io = devices[device].busy;
            }
        }
        if (next_scheduled_io == (unsigned) -1)
            next_scheduled_io = 0;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
cmpl $0x3, 0xd75a(%rip)      # 0x12cdc
jle 0x55ae
movq 0xca45(%rip), %rax      # 0x11fd0
movq (%rax), %rdi
callq 0x31c0
movq 0xca5e(%rip), %rax      # 0x11ff8
movq (%rax), %rdi
movl -0x4(%rbp), %edx
leaq 0x6eff(%rip), %rsi      # 0xc4a6
movb $0x0, %al
callq 0x3170
movl $0x0, -0x8(%rbp)
movl -0x8(%rbp), %eax
cmpl -0x4(%rbp), %eax
jae 0x56a7
movl $0xffffffff, 0xd715(%rip) # imm = 0xFFFFFFFF
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
cmpq $0x14, %rax
jae 0x5684
movl -0xc(%rbp), %eax
movl %eax, %ecx
leaq 0xcb85(%rip), %rax      # 0x12170
imulq $0x48, %rcx, %rcx
addq %rcx, %rax
cmpl $0x0, 0x18(%rax)
je 0x5674
movl -0xc(%rbp), %eax
movl %eax, %ecx
leaq 0xcb6c(%rip), %rax      # 0x12170
imulq $0x48, %rcx, %rcx
addq %rcx, %rax
movl 0x18(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x18(%rax)
movl -0xc(%rbp), %eax
leaq 0xcb52(%rip), %rcx      # 0x12170
imulq $0x48, %rax, %rax
addq %rax, %rcx
xorl %eax, %eax
cmpl 0x18(%rcx), %eax
jne 0x5636
movl -0xc(%rbp), %edi
callq 0x56b0
jmp 0x5672
movl -0xc(%rbp), %eax
movl %eax, %ecx
leaq 0xcb2e(%rip), %rax      # 0x12170
imulq $0x48, %rcx, %rcx
addq %rcx, %rax
movl 0x18(%rax), %eax
cmpl 0xd68e(%rip), %eax      # 0x12ce0
jae 0x5670
movl -0xc(%rbp), %eax
movl %eax, %ecx
leaq 0xcb10(%rip), %rax      # 0x12170
imulq $0x48, %rcx, %rcx
addq %rcx, %rax
movl 0x18(%rax), %eax
movl %eax, 0xd670(%rip)      # 0x12ce0
jmp 0x5672
jmp 0x5674
jmp 0x5676
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x55d2
cmpl $-0x1, 0xd655(%rip)     # 0x12ce0
jne 0x5697
movl $0x0, 0xd649(%rip)      # 0x12ce0
jmp 0x5699
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0x55b5
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/pahihu[P]mixal/io.c
// Function: io_init
void io_init(void)
{
    Byte i;

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

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

    for (i = 0; i < num_devices; i++) {
        devices[i].busy = 0;
        devices[i].int_request = false;
        devices[i].int_pending = false;
        devices[i].rewound = devices[i].type == tape ? true : false;
    }
    for (i = 0; i < memory_size; i++) {
        incomplete[i] = -WRITE;
        control_incomplete[i] = -WRITE;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
leaq 0xe445(%rip), %rax      # 0x13dd4
movslq (%rax), %rdi
shlq $0x2, %rdi
callq 0x31b0
movq %rax, 0xd346(%rip)      # 0x12ce8
cmpq $0x0, 0xd33e(%rip)      # 0x12ce8
jne 0x59ba
leaq 0x6b08(%rip), %rdi      # 0xc4bb
movb $0x0, %al
callq 0x7380
leaq 0xe413(%rip), %rax      # 0x13dd4
movslq (%rax), %rdi
shlq $0x2, %rdi
callq 0x31b0
movq %rax, 0xd31c(%rip)      # 0x12cf0
cmpq $0x0, 0xd314(%rip)      # 0x12cf0
jne 0x59ec
leaq 0x6ad6(%rip), %rdi      # 0xc4bb
movb $0x0, %al
callq 0x7380
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
cmpq $0x14, %rax
jae 0x5a94
movl -0x4(%rbp), %eax
movl %eax, %ecx
leaq 0xc764(%rip), %rax      # 0x12170
imulq $0x48, %rcx, %rcx
addq %rcx, %rax
movl $0x0, 0x18(%rax)
movl -0x4(%rbp), %eax
movl %eax, %ecx
leaq 0xc74a(%rip), %rax      # 0x12170
imulq $0x48, %rcx, %rcx
addq %rcx, %rax
movl $0x0, 0x3c(%rax)
movl -0x4(%rbp), %eax
movl %eax, %ecx
leaq 0xc730(%rip), %rax      # 0x12170
imulq $0x48, %rcx, %rcx
addq %rcx, %rax
movl $0x0, 0x40(%rax)
movl -0x4(%rbp), %eax
movl %eax, %ecx
leaq 0xc716(%rip), %rax      # 0x12170
imulq $0x48, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %edx
xorl %ecx, %ecx
movl $0x1, %eax
cmpl $0x2, %edx
cmovel %eax, %ecx
movl -0x4(%rbp), %eax
movl %eax, %edx
leaq 0xc6f4(%rip), %rax      # 0x12170
imulq $0x48, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x44(%rax)
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x59f3
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
leaq 0xe32f(%rip), %rcx      # 0x13dd4
cmpl (%rcx), %eax
jae 0x5ad6
movq 0xd238(%rip), %rax      # 0x12ce8
movl -0x4(%rbp), %ecx
movl $0x15, (%rax,%rcx,4)
movq 0xd22f(%rip), %rax      # 0x12cf0
movl -0x4(%rbp), %ecx
movl $0x15, (%rax,%rcx,4)
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x5a9b
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/pahihu[P]mixal/io.c
// Function: io_complete
unsigned io_complete(void)
{
    unsigned clocks = 0;

    while (next_scheduled_io) {
        do_scheduled_io(1);
        clocks++;
        idle_time++;
    }
    return clocks;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl $0x0, -0x4(%rbp)
cmpl $0x0, 0xd1ea(%rip)      # 0x12ce0
je 0x5b1f
movl $0x1, %edi
callq 0x5570
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
movq 0xd1be(%rip), %rax      # 0x12cd0
addq $0x1, %rax
movq %rax, 0xd1b3(%rip)      # 0x12cd0
jmp 0x5aef
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/pahihu[P]mixal/io.c
// Function: io_shutdown
void io_shutdown(void)
{
    Byte device;

    for (device = 0; device < num_devices; device++) {
        if (devices[device].file) {
            fclose(devices[device].file);
            devices[device].file = NULL;
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
cmpq $0x14, %rax
jae 0x5ba6
movl -0x4(%rbp), %eax
movl %eax, %ecx
leaq 0xc61c(%rip), %rax      # 0x12170
imulq $0x48, %rcx, %rcx
addq %rcx, %rax
cmpq $0x0, 0x8(%rax)
je 0x5b99
movl -0x4(%rbp), %eax
movl %eax, %ecx
leaq 0xc602(%rip), %rax      # 0x12170
imulq $0x48, %rcx, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rdi
callq 0x30c0
movl -0x4(%rbp), %eax
movl %eax, %ecx
leaq 0xc5e6(%rip), %rax      # 0x12170
imulq $0x48, %rcx, %rcx
addq %rcx, %rax
movq $0x0, 0x8(%rax)
jmp 0x5b9b
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x5b3f
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/pahihu[P]mixal/io.c
// Function: io_incomplete
Flag io_incomplete(Address address, Access access)
{
    Flag ret = false;
    int count;
    
    if (memory_size <= magnitude(address))
        error("Address out of range -- io_incomplete");
        
    count = fetch_incomplete(address);
    if (count == -WRITE)                    /* it is free */
        ret = false;
    else if (access == write_access)        /* either written to, or read from , therefore not writable */
        ret = false;
    else if (access == read_access)         /* if read from, then readable */
        ret = count ? true : false;
    return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
leaq 0xe208(%rip), %rax      # 0x13dd4
movslq (%rax), %rax
movslq -0x4(%rbp), %rcx
andq $0x3fffffff, %rcx       # imm = 0x3FFFFFFF
cmpq %rcx, %rax
jg 0x5bed
leaq 0x68e8(%rip), %rdi      # 0xc4ce
movb $0x0, %al
callq 0x74b0
movl -0x4(%rbp), %edi
callq 0x5c40
movl %eax, -0x10(%rbp)
cmpl $0x15, -0x10(%rbp)
jne 0x5c07
movl $0x0, -0xc(%rbp)
jmp 0x5c33
cmpl $0x1, -0x8(%rbp)
jne 0x5c16
movl $0x0, -0xc(%rbp)
jmp 0x5c31
cmpl $0x0, -0x8(%rbp)
jne 0x5c2f
movl -0x10(%rbp), %edx
xorl %eax, %eax
movl $0x1, %ecx
cmpl $0x0, %edx
cmovnel %ecx, %eax
movl %eax, -0xc(%rbp)
jmp 0x5c31
jmp 0x5c33
movl -0xc(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movl $0x7, -0x1c(%rbp)
movl $0xff, -0x18(%rbp)
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpq $0x14, %rax
jae 0x5d21
movl -0x14(%rbp), %eax
movl %eax, %ecx
leaq 0xc4be(%rip), %rax      # 0x12170
imulq $0x48, %rcx, %rcx
addq %rcx, %rax
cmpl $0x0, 0x18(%rax)
jne 0x5cd7
movl -0x14(%rbp), %eax
leaq 0xc4a7(%rip), %rcx      # 0x12170
imulq $0x48, %rax, %rax
addq %rax, %rcx
xorl %eax, %eax
cmpl 0x40(%rcx), %eax
jne 0x5cd9
jmp 0x5d13
movl -0x14(%rbp), %eax
movl %eax, %ecx
leaq 0xc48b(%rip), %rax      # 0x12170
imulq $0x48, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %eax
cmpl -0x1c(%rbp), %eax
jae 0x5d11
movl -0x14(%rbp), %eax
movl %eax, %ecx
leaq 0xc471(%rip), %rax      # 0x12170
imulq $0x48, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %eax
movl %eax, -0x1c(%rbp)
movl -0x14(%rbp), %eax
movl %eax, -0x18(%rbp)
jmp 0x5d13
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x5c9d
movl $0xff, %eax
cmpl -0x18(%rbp), %eax
je 0x5d71
movl -0x18(%rbp), %eax
movl %eax, %ecx
leaq 0xc439(%rip), %rax      # 0x12170
imulq $0x48, %rcx, %rcx
addq %rcx, %rax
movl $0x0, 0x3c(%rax)
movl -0x18(%rbp), %eax
movl %eax, %ecx
leaq 0xc41f(%rip), %rax      # 0x12170
imulq $0x48, %rcx, %rcx
addq %rcx, %rax
movl $0x0, 0x40(%rax)
movl -0x18(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
movl $0x1, -0x4(%rbp)
jmp 0x5d78
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq 0xb96a(%rip), %rdi      # 0x11700
movq 0xb96b(%rip), %rsi      # 0x11708
callq 0x3210
movq %rax, -0x18(%rbp)
xorl %eax, %eax
cmpq -0x18(%rbp), %rax
jne 0x5dbc
leaq 0x673f(%rip), %rdi      # 0xc4f4
movb $0x0, %al
callq 0x74b0
movl $0x0, -0x2c(%rbp)
movl $0x64, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
leaq 0xe000(%rip), %rcx      # 0x13dd4
cmpl (%rcx), %eax
jge 0x5e72
movl $0x0, -0x34(%rbp)
movl $0x0, -0x30(%rbp)
cmpl $0x7, -0x30(%rbp)
jge 0x5e37
leaq 0xdfdd(%rip), %rax      # 0x13dd4
movl (%rax), %eax
movl -0x1c(%rbp), %ecx
addl -0x30(%rbp), %ecx
cmpl %ecx, %eax
jg 0x5e05
jmp 0x5e37
movl -0x1c(%rbp), %edi
callq 0x8e80
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
andq $0x3fffffff, %rax       # imm = 0x3FFFFFFF
cmpq $0x0, %rax
je 0x5e2a
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x5e2c
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x5dea
cmpl $0x0, -0x34(%rbp)
je 0x5e62
movq -0x18(%rbp), %rdi
movq -0x8(%rbp), %rsi
movl -0x1c(%rbp), %edx
movl -0x34(%rbp), %ecx
callq 0x5eb0
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
movl -0x1c(%rbp), %eax
addl $0x6, %eax
movl %eax, -0x1c(%rbp)
jmp 0x5e64
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x5dca
cmpl $0x0, -0x2c(%rbp)
je 0x5e9d
movq -0x18(%rbp), %rdi
movl -0xc(%rbp), %edx
movl %edx, %eax
negl %eax
cmovnsl %eax, %edx
leaq 0x6680(%rip), %rsi      # 0xc50d
movb $0x0, %al
callq 0x3170
movq -0x18(%rbp), %rdi
callq 0x31c0
movq -0x18(%rbp), %rdi
callq 0x30c0
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/pahihu[P]mixal/io.c
// Function: punch_card
static void punch_card(FILE *fdev, const char *title, Address address, int num_words)
{
    static char overpunch[] = "~JKLMNOPQR";
    int i;
    char buf[16];
    Cell cell;

    fprintf(fdev, "%-5s%1d%04d", title, num_words, address);
    for (i = 0; i < num_words; i++) {
        if (memory_size <= address + i)
            break;
        cell = memory_fetch (address + i);
        sprintf(buf, "%010ld", magnitude (cell));
        if (is_negative (cell))
            buf[9] = overpunch[buf[9]-'0'];
        fprintf(fdev, "%s", buf);
    }

    for (i = num_words; i < 7; i++)
        fprintf(fdev, "          ");

    fprintf(fdev, "\n");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rdx
movl -0x18(%rbp), %ecx
movl -0x14(%rbp), %r8d
leaq 0x6968(%rip), %rsi      # 0xc844
movb $0x0, %al
callq 0x3170
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0x18(%rbp), %eax
jge 0x5f82
leaq 0xded7(%rip), %rax      # 0x13dd4
movl (%rax), %eax
movl -0x14(%rbp), %ecx
addl -0x1c(%rbp), %ecx
cmpl %ecx, %eax
jg 0x5f0b
jmp 0x5f82
movl -0x14(%rbp), %edi
addl -0x1c(%rbp), %edi
callq 0x8e80
movq %rax, -0x38(%rbp)
leaq -0x30(%rbp), %rdi
movq -0x38(%rbp), %rdx
andq $0x3fffffff, %rdx       # imm = 0x3FFFFFFF
leaq 0x6920(%rip), %rsi      # 0xc850
movb $0x0, %al
callq 0x3240
movq -0x38(%rbp), %rax
andq $0x40000000, %rax       # imm = 0x40000000
cmpq $0x0, %rax
je 0x5f5e
movsbl -0x27(%rbp), %eax
subl $0x30, %eax
movslq %eax, %rcx
leaq 0xc7d0(%rip), %rax      # 0x12728
movb (%rax,%rcx), %al
movb %al, -0x27(%rbp)
movq -0x8(%rbp), %rdi
leaq -0x30(%rbp), %rdx
leaq 0x7707(%rip), %rsi      # 0xd674
movb $0x0, %al
callq 0x3170
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x5eea
movl -0x18(%rbp), %eax
movl %eax, -0x1c(%rbp)
cmpl $0x7, -0x1c(%rbp)
jge 0x5fab
movq -0x8(%rbp), %rdi
leaq 0x68be(%rip), %rsi      # 0xc857
movb $0x0, %al
callq 0x3170
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x5f88
movq -0x8(%rbp), %rdi
leaq 0x6f97(%rip), %rsi      # 0xcf4d
movb $0x0, %al
callq 0x3170
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/pahihu[P]mixal/io.c
// Function: ensure_open
static void ensure_open(Byte device)
{
    if (num_devices <= device)
        error("Unknown device - %02o", device);
    if (!assigned_file(device)) {
        if (attributes(device)->base_filename) {
            const char *filename = device_filename(device);
            const char *fam = attributes(device)->fam;
            if (!(devices[device].file = fopen(filename, fam))) {
                if (!strcmp(fam, BIN_RWRITE))
                    devices[device].file = fopen(filename, BIN_CREATE);
                if (!devices[device].file)
                    error("Cannot open device file %s: %s", filename, strerror(errno));
            }
            devices[device].position = 0;
        } else
            error("No file assigned to device %02o (type %d)", device, devices[device].type);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movl -0x4(%rbp), %eax
movl %eax, %ecx
movl $0x14, %eax
cmpq %rcx, %rax
ja 0x5ffb
movl -0x4(%rbp), %esi
leaq 0x649c(%rip), %rdi      # 0xc490
movb $0x0, %al
callq 0x74b0
movl -0x4(%rbp), %edi
callq 0x6640
cmpq $0x0, %rax
jne 0x6132
movl -0x4(%rbp), %edi
callq 0x6140
cmpq $0x0, (%rax)
je 0x610a
movl -0x4(%rbp), %edi
callq 0x66e0
movq %rax, -0x10(%rbp)
movl -0x4(%rbp), %edi
callq 0x6140
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x3210
movl -0x4(%rbp), %ecx
movl %ecx, %edx
leaq 0xc11c(%rip), %rcx      # 0x12170
imulq $0x48, %rdx, %rdx
addq %rdx, %rcx
movq %rax, 0x8(%rcx)
cmpq $0x0, %rax
jne 0x60ed
movq -0x18(%rbp), %rdi
leaq 0x64a5(%rip), %rsi      # 0xc519
callq 0x3160
cmpl $0x0, %eax
jne 0x60a8
movq -0x10(%rbp), %rdi
leaq 0x6494(%rip), %rsi      # 0xc51d
callq 0x3210
movq %rax, %rcx
movl -0x4(%rbp), %eax
movl %eax, %edx
leaq 0xc0d3(%rip), %rax      # 0x12170
imulq $0x48, %rdx, %rdx
addq %rdx, %rax
movq %rcx, 0x8(%rax)
movl -0x4(%rbp), %eax
movl %eax, %ecx
leaq 0xc0bc(%rip), %rax      # 0x12170
imulq $0x48, %rcx, %rcx
addq %rcx, %rax
cmpq $0x0, 0x8(%rax)
jne 0x60eb
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
callq 0x3050
movl (%rax), %edi
callq 0x3270
movq -0x20(%rbp), %rsi
movq %rax, %rdx
leaq 0x643d(%rip), %rdi      # 0xc521
movb $0x0, %al
callq 0x74b0
jmp 0x60ed
movl -0x4(%rbp), %eax
movl %eax, %ecx
leaq 0xc077(%rip), %rax      # 0x12170
imulq $0x48, %rcx, %rcx
addq %rcx, %rax
movq $0x0, 0x10(%rax)
jmp 0x6130
movl -0x4(%rbp), %esi
movl -0x4(%rbp), %eax
movl %eax, %ecx
leaq 0xc057(%rip), %rax      # 0x12170
imulq $0x48, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %edx
leaq 0x6417(%rip), %rdi      # 0xc540
movb $0x0, %al
callq 0x74b0
jmp 0x6132
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0xc(%rbp)
cmpl $0x0, 0xc68a(%rip)      # 0x12cd8
je 0x666d
movl -0xc(%rbp), %eax
movl %eax, %ecx
leaq 0xbb14(%rip), %rax      # 0x12170
imulq $0x48, %rcx, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x66d0
movl -0xc(%rbp), %eax
leaq (%rax,%rax,8), %rcx
leaq 0xbaf5(%rip), %rax      # 0x12170
movl (%rax,%rcx,8), %eax
movl %eax, -0x10(%rbp)
subl $0x3, %eax
je 0x6695
jmp 0x6688
movl -0x10(%rbp), %eax
addl $-0x4, %eax
subl $0x2, %eax
jb 0x66a5
jmp 0x66b5
movq 0xb93c(%rip), %rax      # 0x11fd8
movq (%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x66d0
movq 0xb924(%rip), %rax      # 0x11fd0
movq (%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x66d0
movl -0xc(%rbp), %eax
movl %eax, %ecx
leaq 0xbaaf(%rip), %rax      # 0x12170
imulq $0x48, %rcx, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/pahihu[P]mixal/io.c
// Function: device_filename
static char *device_filename(Byte device)
{
    static char filename[FILENAME_MAX];
    if (device < 16)
        sprintf(filename, "%s%02d",
            attributes(device)->base_filename, device);
    else
        strcpy(filename, attributes(device)->base_filename);
    return filename;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
cmpl $0x10, -0x4(%rbp)
jae 0x6716
movl -0x4(%rbp), %edi
callq 0x6140
movq (%rax), %rdx
movl -0x4(%rbp), %ecx
leaq 0xc5fa(%rip), %rdi      # 0x12d00
leaq 0x5e5d(%rip), %rsi      # 0xc56a
movb $0x0, %al
callq 0x3240
jmp 0x672d
movl -0x4(%rbp), %edi
callq 0x6140
movq (%rax), %rsi
leaq 0xc5d8(%rip), %rdi      # 0x12d00
callq 0x3070
leaq 0xc5cc(%rip), %rax      # 0x12d00
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movl %edx, -0xc(%rbp)
cmpl $0x0, -0x4(%rbp)
jge 0x6774
callq 0x8b50
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jne 0x6772
leaq 0x5e71(%rip), %rdi      # 0xc5dc
movb $0x0, %al
callq 0x74b0
jmp 0x6774
cmpl $0x2, 0xc561(%rip)      # 0x12cdc
jle 0x67ae
movq 0xb84c(%rip), %rax      # 0x11fd0
movq (%rax), %rdi
callq 0x31c0
movq 0xb865(%rip), %rax      # 0x11ff8
movq (%rax), %rdi
movl -0x4(%rbp), %edx
movl -0x8(%rbp), %ecx
movl -0xc(%rbp), %r8d
leaq 0x5e61(%rip), %rsi      # 0xc608
movb $0x0, %al
callq 0x3170
movl $0x0, -0x10(%rbp)
movl -0x10(%rbp), %eax
cmpl -0x8(%rbp), %eax
jae 0x686a
leaq 0xd60c(%rip), %rax      # 0x13dd4
movslq (%rax), %rax
movl -0x4(%rbp), %ecx
addl -0x10(%rbp), %ecx
movslq %ecx, %rcx
andq $0x3fffffff, %rcx       # imm = 0x3FFFFFFF
cmpq %rcx, %rax
jg 0x67ee
leaq 0x5e3f(%rip), %rdi      # 0xc626
movb $0x0, %al
callq 0x74b0
movl -0x4(%rbp), %edi
addl -0x10(%rbp), %edi
callq 0x5c40
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
addl -0xc(%rbp), %eax
cmpl $0x0, %eax
jge 0x684b
cmpl $0x3, 0xc4ce(%rip)      # 0x12cdc
jle 0x683d
movq 0xb7b9(%rip), %rax      # 0x11fd0
movq (%rax), %rdi
callq 0x31c0
movq 0xb7d2(%rip), %rax      # 0x11ff8
movq (%rax), %rdi
movl -0x14(%rbp), %edx
movl -0xc(%rbp), %ecx
leaq 0x5e1b(%rip), %rsi      # 0xc651
movb $0x0, %al
callq 0x3170
leaq 0x5e24(%rip), %rdi      # 0xc668
movb $0x0, %al
callq 0x74b0
movl -0x4(%rbp), %edi
addl -0x10(%rbp), %edi
movl -0x14(%rbp), %esi
addl -0xc(%rbp), %esi
callq 0x6870
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x67b5
addq $0x20, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl $0x4, %edi
movl $0x5, %esi
callq 0x36d0
movl %eax, %edi
movq -0x10(%rbp), %rsi
callq 0x3620
movl %eax, -0x18(%rbp)
movl -0x4(%rbp), %eax
movl %eax, %ecx
leaq 0xb885(%rip), %rax      # 0x12170
imulq $0x48, %rcx, %rcx
addq %rcx, %rax
cmpl $0x0, (%rax)
jne 0x6902
movl -0x18(%rbp), %eax
andl $0x1ff, %eax            # imm = 0x1FF
movl %eax, -0x18(%rbp)
movl -0x4(%rbp), %edi
movl -0x18(%rbp), %esi
xorl %edx, %edx
callq 0x6e20
movl -0x4(%rbp), %edi
movl -0x14(%rbp), %esi
callq 0x6f10
addq $0x20, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/pahihu[P]mixal/io.c
// Function: disk_out
static void disk_out(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, true);
    write_block(device, buffer);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl $0x4, %edi
movl $0x5, %esi
callq 0x36d0
movl %eax, %edi
movq -0x10(%rbp), %rsi
callq 0x3620
movl %eax, -0x18(%rbp)
movl -0x4(%rbp), %eax
movl %eax, %ecx
leaq 0xb815(%rip), %rax      # 0x12170
imulq $0x48, %rcx, %rcx
addq %rcx, %rax
cmpl $0x0, (%rax)
jne 0x6972
movl -0x18(%rbp), %eax
andl $0x1ff, %eax            # imm = 0x1FF
movl %eax, -0x18(%rbp)
movl -0x4(%rbp), %edi
movl -0x18(%rbp), %esi
movl $0x1, %edx
callq 0x6e20
movl -0x4(%rbp), %edi
movl -0x14(%rbp), %esi
callq 0x70b0
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rax
andq $0x3fffffff, %rax       # imm = 0x3FFFFFFF
cmpq $0x0, %rax
je 0x69d4
movl -0x4(%rbp), %esi
leaq 0x5d8e(%rip), %rdi      # 0xc75b
movb $0x0, %al
callq 0x74b0
movl $0x4, %edi
movl $0x5, %esi
callq 0x36d0
movl %eax, %edi
movq -0x10(%rbp), %rsi
callq 0x3620
movl %eax, -0x1c(%rbp)
movl -0x4(%rbp), %eax
movl %eax, %ecx
leaq 0xb773(%rip), %rax      # 0x12170
imulq $0x48, %rcx, %rcx
addq %rcx, %rax
cmpl $0x0, (%rax)
jne 0x6a14
movl -0x1c(%rbp), %eax
andl $0x1ff, %eax            # imm = 0x1FF
movl %eax, -0x1c(%rbp)
movl -0x4(%rbp), %edi
movl -0x1c(%rbp), %esi
xorl %edx, %edx
callq 0x6e20
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rax
andq $0x3fffffff, %rax       # imm = 0x3FFFFFFF
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
jne 0x6b07
movl -0x4(%rbp), %edi
xorl %edx, %edx
movl %edx, %esi
callq 0x6e20
jmp 0x6bd9
movq -0x18(%rbp), %rax
andq $0x40000000, %rax       # imm = 0x40000000
cmpq $0x0, %rax
je 0x6b4e
movl -0x4(%rbp), %edi
callq 0x7200
movl %eax, -0x20(%rbp)
movl -0x20(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jae 0x6b33
movl $0x0, -0x1c(%rbp)
jmp 0x6b3c
movl -0x20(%rbp), %eax
subl -0x1c(%rbp), %eax
movl %eax, -0x1c(%rbp)
movl -0x4(%rbp), %edi
movl -0x1c(%rbp), %esi
xorl %edx, %edx
callq 0x6e20
jmp 0x6bd7
movl -0x4(%rbp), %edi
callq 0x6640
movq %rax, -0x28(%rbp)
movl -0x4(%rbp), %edi
callq 0x7200
movl %eax, -0x20(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, %ecx
addl $-0x1, %ecx
movl %ecx, -0x1c(%rbp)
cmpl $0x0, %eax
je 0x6bd5
movl -0x4(%rbp), %edi
movl -0x20(%rbp), %esi
addl $0x1, %esi
movl %esi, -0x20(%rbp)
xorl %edx, %edx
callq 0x6e20
movq -0x28(%rbp), %rdi
callq 0x3110
movl %eax, -0x2c(%rbp)
cmpl $-0x1, -0x2c(%rbp)
jne 0x6b9c
jmp 0x6bd5
movl -0x2c(%rbp), %edi
movq -0x28(%rbp), %rsi
callq 0x31d0
cmpl $-0x1, %eax
jne 0x6bd3
movl -0x4(%rbp), %eax
movl %eax, -0x30(%rbp)
callq 0x3050
movl (%rax), %edi
callq 0x3270
movl -0x30(%rbp), %esi
movq %rax, %rdx
leaq 0x5b28(%rip), %rdi      # 0xc6f4
movb $0x0, %al
callq 0x74b0
jmp 0x6b65
jmp 0x6bd7
jmp 0x6bd9
movl -0x4(%rbp), %edi
callq 0x7200
movl %eax, %eax
movl %eax, %ecx
movl -0x4(%rbp), %eax
movl %eax, %edx
leaq 0xb57f(%rip), %rax      # 0x12170
imulq $0x48, %rdx, %rdx
addq %rdx, %rax
movq %rcx, 0x10(%rax)
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movl %edx, -0xc(%rbp)
movl -0x4(%rbp), %eax
movl %eax, %ecx
leaq 0xb333(%rip), %rax      # 0x12170
imulq $0x48, %rcx, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rax
movl -0x8(%rbp), %ecx
cmpq %rcx, %rax
je 0x6efb
movl -0x4(%rbp), %edi
callq 0x6140
cmpl $0x0, 0x10(%rax)
je 0x6e82
movl -0x4(%rbp), %edi
callq 0x6140
movl 0x10(%rax), %eax
cmpl -0x8(%rbp), %eax
ja 0x6e82
leaq 0x5869(%rip), %rdi      # 0xc6e2
movb $0x0, %al
callq 0x74b0
jmp 0x6ef9
movl -0x4(%rbp), %edi
callq 0x6640
movq %rax, -0x18(%rbp)
movl -0x8(%rbp), %eax
movq %rax, -0x20(%rbp)
movl -0x4(%rbp), %edi
callq 0x7070
movq -0x20(%rbp), %rsi
movq -0x18(%rbp), %rdi
movl %eax, %eax
imulq %rax, %rsi
xorl %edx, %edx
callq 0x31e0
cmpl $0x0, %eax
je 0x6edd
movl -0x4(%rbp), %eax
movl %eax, -0x24(%rbp)
callq 0x3050
movl (%rax), %edi
callq 0x3270
movl -0x24(%rbp), %esi
movq %rax, %rdx
leaq 0x581e(%rip), %rdi      # 0xc6f4
movb $0x0, %al
callq 0x74b0
movl -0x8(%rbp), %eax
movl %eax, %ecx
movl -0x4(%rbp), %eax
movl %eax, %edx
leaq 0xb282(%rip), %rax      # 0x12170
imulq $0x48, %rdx, %rdx
addq %rdx, %rax
movq %rcx, 0x10(%rax)
jmp 0x6efb
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movl -0x4(%rbp), %edi
callq 0x6640
movq %rax, -0x10(%rbp)
movl -0x4(%rbp), %edi
callq 0x7090
movl %eax, -0x14(%rbp)
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
cmpl -0x14(%rbp), %eax
jae 0x7034
movq $0x0, -0x28(%rbp)
movq -0x10(%rbp), %rdi
callq 0x3110
movl %eax, -0x20(%rbp)
cmpl $-0x1, -0x20(%rbp)
jne 0x6f91
movq 0xb067(%rip), %rax      # 0x11fd0
movq (%rax), %rdi
callq 0x31c0
movq 0xb080(%rip), %rax      # 0x11ff8
movq (%rax), %rdi
movl -0x4(%rbp), %edx
leaq 0x577f(%rip), %rsi      # 0xc704
movb $0x0, %al
callq 0x3170
jmp 0x7067
cmpl $0x2d, -0x20(%rbp)
jne 0x6fa5
movq -0x28(%rbp), %rax
xorq $0x40000000, %rax       # imm = 0x40000000
movq %rax, -0x28(%rbp)
jmp 0x6fa7
movl $0x1, -0x1c(%rbp)
cmpl $0x5, -0x1c(%rbp)
ja 0x7017
movq -0x10(%rbp), %rdi
callq 0x3110
movl %eax, -0x20(%rbp)
cmpl $-0x1, -0x20(%rbp)
jne 0x6ff2
movq 0xb003(%rip), %rax      # 0x11fd0
movq (%rax), %rdi
callq 0x31c0
movq 0xb01c(%rip), %rax      # 0x11ff8
movq (%rax), %rdi
movl -0x4(%rbp), %edx
leaq 0x571b(%rip), %rsi      # 0xc704
movb $0x0, %al
callq 0x3170
jmp 0x7067
movl -0x20(%rbp), %edi
callq 0x4aa0
movl %eax, %edi
movl -0x1c(%rbp), %esi
movq -0x28(%rbp), %rdx
callq 0x3730
movq %rax, -0x28(%rbp)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x6fae
movl -0x8(%rbp), %edi
addl -0x18(%rbp), %edi
movq -0x28(%rbp), %rsi
callq 0x8f40
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x6f3c
movq -0x10(%rbp), %rdi
callq 0x3110
movl %eax, -0x20(%rbp)
cmpl $0xa, -0x20(%rbp)
jne 0x7048
jmp 0x7067
leaq 0x56de(%rip), %rdi      # 0xc72d
leaq 0x56e1(%rip), %rsi      # 0xc737
movl $0x26f, %edx            # imm = 0x26F
leaq 0x56da(%rip), %rcx      # 0xc73c
callq 0x3100
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl %ecx, -0x14(%rbp)
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
cmpl -0x10(%rbp), %eax
jae 0x7139
movl -0xc(%rbp), %edi
addl -0x18(%rbp), %edi
callq 0x8e80
movq %rax, %rdi
movq -0x8(%rbp), %rsi
movl -0x14(%rbp), %edx
callq 0x7150
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x710c
movq -0x8(%rbp), %rsi
movl $0xa, %edi
callq 0x3130
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)