LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/pahihu[P]mixal/cell.c
// Function: unparse_cell
void unparse_cell(char *buffer, Cell cell, Flag disasm)
{
    Byte I, F, C;
    Cell A;

    if (disasm) {
        destructure_cell (cell, A, I, F, C);
        sprintf(buffer, "%s%04lo %02o %02o %02o",
                is_negative (A) ? "-" : "+", magnitude (A),
                I, F, C);
    } else
        sprintf(buffer, "%s%010lo",
                is_negative (cell) ? "-" : "+", magnitude (cell));
}

// Assembly:
movq %rsi, %rax
testl %edx, %edx
je 0x3ad4
pushq %rax
movl %eax, %esi
andl $0x3f, %esi
movl %eax, %r9d
shrl $0x6, %r9d
andl $0x3f, %r9d
movl %eax, %r8d
shrl $0xc, %r8d
andl $0x3f, %r8d
movl %eax, %ecx
shrl $0x12, %ecx
andl $0xfff, %ecx            # imm = 0xFFF
btl $0x1e, %eax
leaq 0x5716(%rip), %rax      # 0x91cc
leaq 0x5894(%rip), %rdx      # 0x9351
cmovaeq %rax, %rdx
movl %esi, (%rsp)
leaq 0x56ea(%rip), %rsi      # 0x91b5
xorl %eax, %eax
callq 0x3280
popq %rax
retq
btl $0x1e, %eax
leaq 0x56ed(%rip), %rcx      # 0x91cc
leaq 0x586b(%rip), %rdx      # 0x9351
cmovaeq %rcx, %rdx
andl $0x3fffffff, %eax       # imm = 0x3FFFFFFF
leaq 0x56d8(%rip), %rsi      # 0x91ce
movq %rax, %rcx
xorl %eax, %eax
jmp 0x3280
// File: /workspace/github_c_makefile_star2_O1/pahihu[P]mixal/cell.c
// Function: add
Cell add(Cell x, Cell y)
{   /* This is kinda clumsy. Should I combine code at the cost (?) of speed */
    /* and functional style? */
    if (sign_bit(x) == sign_bit(y)) {
        long sum = magnitude(x) + magnitude(y);
        long magnitude_of_sum = magnitude(sum);
        if (magnitude_of_sum != sum) overflow = true;
        return sign_bit(x) | magnitude_of_sum;
    } else {
        long diff = magnitude(x) - magnitude(y);
        return diff < 0 ? sign_bit (y) | -diff : sign_bit (x) | diff;
    }
}

// Assembly:
movl $0x40000000, %eax       # imm = 0x40000000
movq %rdi, %rcx
andq %rax, %rcx
andq %rsi, %rax
movl $0x3fffffff, %edx       # imm = 0x3FFFFFFF
andq %rdx, %rdi
andq %rdx, %rsi
cmpq %rax, %rcx
jne 0x3b3f
addq %rdi, %rsi
movl %esi, %eax
andl $0x3fffffff, %eax       # imm = 0x3FFFFFFF
cmpq $0x40000000, %rsi       # imm = 0x40000000
jb 0x3b3b
movl $0x1, 0xc005(%rip)      # 0xfb40
orq %rcx, %rax
retq
subq %rsi, %rdi
movq %rdi, %rdx
negq %rdx
orq %rdx, %rax
orq %rdi, %rcx
testq %rdi, %rdi
cmovsq %rax, %rcx
movq %rcx, %rax
retq
// File: /workspace/github_c_makefile_star2_O1/pahihu[P]mixal/cell.c
// Function: multiply
void multiply(Cell x, Cell y, Cell *high_word, Cell *low_word)
{
    unsigned long sign = sign_bit(x) ^ sign_bit(y);

    /*
       x = x0 + x1 * 2 ^ 10 + x2 * 2 ^ 20
       y = y0 + y1 * 2 ^ 10 + y2 * 2 ^ 20
       x0, x1, x2, y0, y1, y2 are < 2 ^ 10
    */
    unsigned long x0 = (x & 0x000003FF);
    unsigned long x1 = (x & 0x000FFC00) >> 10;
    unsigned long x2 = (x & 0x3FF00000) >> 20;
    unsigned long y0 = (y & 0x000003FF);
    unsigned long y1 = (y & 0x000FFC00) >> 10;
    unsigned long y2 = (y & 0x3FF00000) >> 20;

    /*
       x * y = partial0 +
               partial1 * 2 ^ 10 +
               partial2 * 2 ^ 20 +
               partial3 * 2 ^ 30 +
               partial4 * 2 ^ 40
       partial0 and partial4 are <     2 ^ 20
       partial1 and partial3 are <     2 ^ 21
       partial2 is               < 3 * 2 ^ 20
    */
    unsigned long partial0 = x0 * y0;
    unsigned long partial1 = x0 * y1 + x1 * y0;
    unsigned long partial2 = x0 * y2 + x1 * y1 + x2 * y0;
    unsigned long partial3 = x1 * y2 + x2 * y1;
    unsigned long partial4 = x2 * y2;

    /*  sum1 has a place value of 1 and is < 2 ^ 32 */
    unsigned long sum1   = partial0 + (partial1 << 10);
    unsigned long carry1 = (sum1 & 0xFFF00000) >> 20;

    /* sum2 has a place value of 2 ^ 20 and is < 2 ^ 32 */
    unsigned long sum2   = partial2 + (partial3 << 10) + carry1;
    unsigned long carry2 = (sum2 & 0xFFF00000) >> 20;

    /* sum3 has a place value of 2 ^ 40 and is < 2 ^ 20 */
    unsigned long sum3   = partial4 + carry2;

    sum1 &= ~0xFFF00000;
    sum2 &= ~0xFFF00000;

    /*
       Now paste the three values back into two.
    */
    *low_word   = sum1 | ((sum2 & 0x000003FF) << 20);
    *low_word  |= sign;
    *high_word  = ((sum2 & 0x000FFC00) >> 10) | (sum3 << 10);
    *high_word |= sign;

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
movl %esi, %eax
xorl %edi, %eax
andl $0x40000000, %eax       # imm = 0x40000000
movl $0x3ff, %r9d            # imm = 0x3FF
movq %rdi, %r14
andq %r9, %r14
movl %edi, %ebx
shrl $0xa, %ebx
movl $0x3ff, %r8d            # imm = 0x3FF
andl %r8d, %ebx
shrl $0x14, %edi
andl %r8d, %edi
movq %rsi, %r10
andq %r9, %r10
movl %esi, %r9d
shrl $0xa, %r9d
andl %r8d, %r9d
shrl $0x14, %esi
andl %r8d, %esi
movq %r10, %r15
imulq %r14, %r15
movl %r9d, %ebp
imull %r14d, %ebp
movl %ebx, %r11d
imull %r10d, %r11d
addl %ebp, %r11d
imull %esi, %r14d
movl %r9d, %ebp
imull %ebx, %ebp
imull %edi, %r10d
addl %ebp, %r10d
addl %r14d, %r10d
imull %esi, %ebx
imull %edi, %r9d
addl %ebx, %r9d
imull %edi, %esi
shll $0xa, %r11d
addq %r15, %r11
movl %r11d, %edi
shrl $0x14, %edi
shll $0xa, %r9d
addl %r10d, %r9d
addl %edi, %r9d
movl %r9d, %edi
shrl $0x14, %edi
addl %esi, %edi
andl $0xfffff, %r11d         # imm = 0xFFFFF
movl %r9d, %esi
shll $0x14, %esi
andl $0x3ff00000, %esi       # imm = 0x3FF00000
orq %r11, %rsi
orq %rax, %rsi
movq %rsi, (%rcx)
shrl $0xa, %r9d
andl %r8d, %r9d
shll $0xa, %edi
orl %r9d, %edi
orl %eax, %edi
movq %rdi, (%rdx)
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/pahihu[P]mixal/cell.c
// Function: divide
void divide(Cell n1, Cell n0, Cell d, Cell *quotient, Cell *remainder)
{
    long magn1 = magnitude(n1);
    long magd = magnitude(d);
    if (magd == 0) {
        overflow = true;
        *quotient = *remainder = zero;  /* just so they have -some- valid value */
    } else if (magn1 == 0) {    /* special-cased for speed */
        *quotient = (sign_bit(n1) ^ sign_bit(d)) | (magnitude(n0) / magd);
        *remainder = sign_bit(n1) | (magnitude(n0) % magd);
    } else if (magd <= magn1) {
        overflow = true;
        *quotient = *remainder = zero;
    } else {
        long q = magnitude(n0);
        long r = magn1;
        unsigned i;
        for (i = 30; i != 0; --i) {
            r <<= 1;
            if (q & (1L << 29))
                ++r;
            q = (q << 1) & ((1L << 30) - 1);
            if (magd <= r)
                ++q, r -= magd;
        }
        *quotient = (sign_bit(n1) ^ sign_bit(d)) | q;
        *remainder = sign_bit(n1) | r;
    }
}

// Assembly:
movl $0x3fffffff, %eax       # imm = 0x3FFFFFFF
movq %rdx, %r10
andq %rax, %r10
je 0x3ce0
movq %rdx, %r9
andq %rdi, %rax
je 0x3cf3
cmpl %eax, %r10d
jbe 0x3ce0
andl $0x3fffffff, %esi       # imm = 0x3FFFFFFF
movl $0xffffffe2, %edx       # imm = 0xFFFFFFE2
movl %esi, %r11d
shrl $0x1d, %r11d
andl $0x1, %r11d
leaq (%r11,%rax,2), %rax
andl $0x1fffffff, %esi       # imm = 0x1FFFFFFF
xorl %r11d, %r11d
cmpq %rax, %r10
setle %r11b
leaq (%r11,%rsi,2), %rsi
movl $0x0, %r11d
cmovleq %r10, %r11
subq %r11, %rax
incl %edx
jne 0x3c8d
movl %edi, %edx
andl $0x40000000, %edx       # imm = 0x40000000
xorl %edi, %r9d
andl $0x40000000, %r9d       # imm = 0x40000000
orq %r9, %rsi
movq %rsi, (%rcx)
orq %rdx, %rax
movq %rax, (%r8)
retq
movl $0x1, 0xbe56(%rip)      # 0xfb40
xorl %eax, %eax
movq %rax, (%r8)
movq %rax, (%rcx)
retq
andl $0x3fffffff, %esi       # imm = 0x3FFFFFFF
movq %rsi, %rax
xorl %edx, %edx
divq %r10
movl %edi, %esi
andl $0x40000000, %esi       # imm = 0x40000000
xorl %edi, %r9d
andl $0x40000000, %r9d       # imm = 0x40000000
orq %r9, %rax
movq %rax, (%rcx)
orq %rsi, %rdx
movq %rdx, (%r8)
retq
// File: /workspace/github_c_makefile_star2_O1/pahihu[P]mixal/cell.c
// Function: shift_right
void shift_right(Cell A, Cell X, unsigned long count, Cell *pA, Cell *pX)
{
    *pX = sign_bit(X);
    *pA = sign_bit(A);
    if (count < 5) {
        *pA |= magnitude(A) >> (6 * count);
        *pX |= CELL_MAX & ((magnitude(X) >> (6 * count))
            | (A << (30 - 6 * count)));
    } else if (count < 10)
        *pX |= magnitude(A) >> (6 * count - 30);
    else
        ;
}

// Assembly:
movq %rcx, %rax
movl $0x40000000, %r9d       # imm = 0x40000000
movq %rsi, %rcx
andq %r9, %rcx
movq %rcx, (%r8)
andq %rdi, %r9
movq %r9, (%rax)
cmpq $0x4, %rdx
ja 0x3dce
movl $0x3fffffff, %r10d      # imm = 0x3FFFFFFF
movq %rdi, %r11
andq %r10, %r11
addl %edx, %edx
leal (%rdx,%rdx,2), %ecx
shrq %cl, %r11
andq %r10, %rsi
shrq %cl, %rsi
orq %r9, %r11
movq %r11, (%rax)
movb $0x1e, %al
subb %cl, %al
movl %eax, %ecx
shlq %cl, %rdi
andq %r10, %rdi
orq %rsi, %rdi
jmp 0x3de5
cmpq $0x9, %rdx
ja 0x3deb
andl $0x3fffffff, %edi       # imm = 0x3FFFFFFF
addl %edx, %edx
leal (%rdx,%rdx,2), %ecx
addb $-0x1e, %cl
shrq %cl, %rdi
orq (%r8), %rdi
movq %rdi, (%r8)
retq
// File: /workspace/github_c_makefile_star2_O1/pahihu[P]mixal/cell.c
// Function: shift_left
void shift_left(Cell A, Cell X, unsigned long count, Cell *pA, Cell *pX)
{
    *pX = sign_bit(X);
    *pA = sign_bit(A);
    if (count < 5) {
        *pX |= CELL_MAX & (X << (6 * count));
        *pA |= CELL_MAX & ((A << (6 * count))
            | (magnitude(X) >> (30 - 6 * count)));
    } else if (count < 10)
        *pA |= CELL_MAX & (X << (6 * count - 30));
    else
        ;
}

// Assembly:
movq %rcx, %rax
movl $0x40000000, %r9d       # imm = 0x40000000
movq %rsi, %rcx
andq %r9, %rcx
movq %rcx, (%r8)
andq %rdi, %r9
movq %r9, (%rax)
cmpq $0x4, %rdx
ja 0x3e3b
addl %edx, %edx
leal (%rdx,%rdx,2), %ecx
movq %rsi, %rdx
shlq %cl, %rdx
movl $0x3fffffff, %r9d       # imm = 0x3FFFFFFF
andq %r9, %rdx
orq %rdx, (%r8)
shlq %cl, %rdi
andq %r9, %rsi
movb $0x1e, %dl
subb %cl, %dl
movl %edx, %ecx
shrq %cl, %rsi
andq %r9, %rdi
orq %rsi, %rdi
orq (%rax), %rdi
jmp 0x3e58
cmpq $0x9, %rdx
ja 0x3e5b
addl %edx, %edx
leal (%rdx,%rdx,2), %ecx
addb $-0x1e, %cl
shlq %cl, %rsi
andl $0x3fffffff, %esi       # imm = 0x3FFFFFFF
orq %r9, %rsi
movq %rsi, %rdi
movq %rdi, (%rax)
retq
// File: /workspace/github_c_makefile_star2_O1/pahihu[P]mixal/cell.c
// Function: shift_right_binary
void shift_right_binary(Cell A, Cell X, unsigned long count, Cell *pA, Cell *pX)
{
    *pX = sign_bit(X);
    *pA = sign_bit(A);
    if (count < 30) {
        *pA |= magnitude(A) >> count;
        *pX |= CELL_MAX & ((magnitude(X) >> count)
            | (A << (30 - count)));
    } else if (count < 60)
        *pX |= magnitude(A) >> (count - 30);
    else
        ;
}

// Assembly:
movq %rcx, %rax
movq %rdx, %rcx
movl $0x40000000, %edx       # imm = 0x40000000
movq %rsi, %r9
andq %rdx, %r9
movq %r9, (%r8)
andq %rdi, %rdx
movq %rdx, (%rax)
cmpq $0x1d, %rcx
ja 0x3ea8
movl $0x3fffffff, %r9d       # imm = 0x3FFFFFFF
movq %rdi, %r10
andq %r9, %r10
shrq %cl, %r10
andq %r9, %rsi
shrq %cl, %rsi
orq %rdx, %r10
movq %r10, (%rax)
movb $0x1e, %al
subb %cl, %al
movl %eax, %ecx
shlq %cl, %rdi
andq %r9, %rdi
orq %rsi, %rdi
jmp 0x3eba
cmpq $0x3b, %rcx
ja 0x3ec0
andl $0x3fffffff, %edi       # imm = 0x3FFFFFFF
addb $-0x1e, %cl
shrq %cl, %rdi
orq (%r8), %rdi
movq %rdi, (%r8)
retq
// File: /workspace/github_c_makefile_star2_O1/pahihu[P]mixal/cell.c
// Function: shift_left_binary
void shift_left_binary(Cell A, Cell X, unsigned long count, Cell *pA, Cell *pX)
{
    *pX = sign_bit(X);
    *pA = sign_bit(A);
    if (count < 30) {
        *pX |= CELL_MAX & (X << count);
        *pA |= CELL_MAX & ((A << count)
            | (magnitude(X) >> (30 - count)));
    } else if (count < 60)
        *pA |= CELL_MAX & (X << (count - 30));
    else
        ;
}

// Assembly:
movq %rcx, %rax
movq %rdx, %rcx
movl $0x40000000, %edx       # imm = 0x40000000
movq %rsi, %r9
andq %rdx, %r9
movq %r9, (%r8)
andq %rdi, %rdx
movq %rdx, (%rax)
cmpq $0x1d, %rcx
ja 0x3f0d
movq %rsi, %rdx
shlq %cl, %rdx
movl $0x3fffffff, %r9d       # imm = 0x3FFFFFFF
andq %r9, %rdx
orq %rdx, (%r8)
shlq %cl, %rdi
andq %r9, %rsi
movb $0x1e, %dl
subb %cl, %dl
movl %edx, %ecx
shrq %cl, %rsi
andq %r9, %rdi
orq %rsi, %rdi
orq (%rax), %rdi
jmp 0x3f25
cmpq $0x3b, %rcx
ja 0x3f28
addb $-0x1e, %cl
shlq %cl, %rsi
andl $0x3fffffff, %esi       # imm = 0x3FFFFFFF
orq %rdx, %rsi
movq %rsi, %rdi
movq %rdi, (%rax)
retq
// File: /workspace/github_c_makefile_star2_O1/pahihu[P]mixal/cell.c
// Function: shift_left_circular
void shift_left_circular(Cell A, Cell X, unsigned count, Cell *pA, Cell *pX)
{
    Cell A1 = count < 5 ? A : X;
    Cell X1 = count < 5 ? X : A;
    unsigned c = 6 * (count < 5 ? count : count - 5);
    *pX = sign_bit(X)
        | (CELL_MAX & ((X1 << c) | (magnitude(A1) >> (30 - c))));
    *pA = sign_bit(A)
        | (CELL_MAX & ((A1 << c) | (magnitude(X1) >> (30 - c))));
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %rax
movl $0x40000000, %r11d      # imm = 0x40000000
movq %rsi, %rbx
andq %r11, %rbx
movl %edx, %ecx
subl $0x5, %ecx
movq %rdi, %r10
cmovbq %rsi, %r10
cmovbq %rdi, %rsi
cmovbl %edx, %ecx
addl %ecx, %ecx
leal (%rcx,%rcx,2), %edx
movq %r10, %r14
movl %edx, %ecx
shlq %cl, %r14
movl $0x3fffffff, %r15d      # imm = 0x3FFFFFFF
movq %rsi, %r12
andq %r15, %r12
movb $0x1e, %r9b
subb %dl, %r9b
movl %r9d, %ecx
shrq %cl, %r12
orq %rbx, %r12
andq %r15, %r14
orq %r12, %r14
movq %r14, (%r8)
andq %r11, %rdi
movl %edx, %ecx
shlq %cl, %rsi
andq %r15, %r10
movl %r9d, %ecx
shrq %cl, %r10
orq %rdi, %r10
andq %r15, %rsi
orq %r10, %rsi
movq %rsi, (%rax)
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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 %r14
pushq %rbx
subq $0x18, %rsp
movl %edi, %eax
shrl $0x1e, %eax
movq %rdi, %rcx
andq $0x3fffffff, %rcx       # imm = 0x3FFFFFFF
setne %dl
testb %dl, %al
jne 0x408e
leaq 0xcd32(%rip), %rax      # 0x10db4
movslq (%rax), %rax
cmpq %rax, %rcx
jge 0x408e
movl %ecx, %ebx
jmp 0x40cb
btl $0x1e, %edi
leaq 0x5133(%rip), %rax      # 0x91cc
leaq 0x52b1(%rip), %rdx      # 0x9351
cmovaeq %rax, %rdx
leaq 0x5123(%rip), %rsi      # 0x91ce
xorl %ebx, %ebx
movq %rsp, %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x3280
leaq 0x5116(%rip), %rdi      # 0x91d7
movq %r14, %rsi
xorl %eax, %eax
callq 0x5bbc
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/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:
cmpl $0x40, %edi
jae 0x4191
leaq 0xbb68(%rip), %rax      # 0xfcd0
cmpl $0x4, (%rax)
jne 0x4184
cmpl $0x31, %edi
setae %al
movl %edi, %ecx
andl $0x3e, %ecx
cmpl $0x14, %ecx
sete %cl
orb %al, %cl
movb $0x20, %al
jne 0x4190
movl %edi, %eax
leaq 0x50e3(%rip), %rcx      # 0x9270
movb (%rax,%rcx), %al
retq
pushq %rax
leaq 0x506f(%rip), %rdi      # 0x9208
leaq 0x5087(%rip), %rsi      # 0x9227
leaq 0x508a(%rip), %rcx      # 0x9231
movl $0x12, %edx
callq 0x3130
// File: /workspace/github_c_makefile_star2_O1/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 %rbx
movl %edi, %ebx
callq 0x3030
movq (%rax), %rax
movslq %ebx, %rcx
movl (%rax,%rcx,4), %esi
leaq 0x50a7(%rip), %rdi      # 0x9270
movl $0x41, %edx
callq 0x3180
testq %rax, %rax
je 0x4206
leaq 0x5091(%rip), %rcx      # 0x9270
subl %ecx, %eax
leaq 0xbae8(%rip), %rcx      # 0xfcd0
cmpl $0x3, (%rcx)
jne 0x420b
movl %eax, %ecx
andl $-0x2, %ecx
xorl %edx, %edx
cmpl $0x14, %ecx
movl %eax, %ecx
cmovel %edx, %ecx
cmpl $0x31, %eax
cmovael %edx, %ecx
movl %ecx, %eax
jmp 0x420b
movl $0x3f, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/pahihu[P]mixal/driver.c
// Function: eat_identifier
static void eat_identifier(char *buffer, const_char_ptr *s)
{
    const char *scan = buffer;
    size_t size, truncated_size;

    for (scan = *s; !isspace (*scan) && *scan != '\0'; ++scan)
        ;
    size = scan - *s;

    {				/* ensure it's a legal identifier */
	Flag alpha = false, non_alphanum = false;
	for (scan = *s; scan < *s + size; ++scan) {
	    if (isalpha(*scan))
	        alpha = true;
	    else if (!isalnum (*scan))
	        non_alphanum = true;
	}
	if ((!alpha && size != 0) || non_alphanum) {
	    error ("Ill-formed label or mnemonic: %*.*s", size, size, *s);
	    buffer[0] = '\0';
	    *s += size;
	    return;
	}
    }

    if (max_identifier_length < size) {
        warn ("Truncated long label or mnemonic: %*.*s", size, size, *s);
	    truncated_size = max_identifier_length;
    } else
        truncated_size = size;

    memcpy(buffer, *s, truncated_size);
    buffer[truncated_size] = '\0';
    *s += size;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq (%rsi), %r12
callq 0x32d0
movq (%rax), %rax
movq $-0x1, %r15
movsbq 0x1(%r12,%r15), %rcx
incq %r15
testq %rcx, %rcx
je 0x453d
movzwl (%rax,%rcx,2), %ecx
andl $0x2000, %ecx           # imm = 0x2000
je 0x4523
leaq (%r12,%r15), %rdx
xorl %ecx, %ecx
cmpq %rdx, %r12
jae 0x4586
movl $0x1, %edx
movq %r15, %rsi
xorl %edi, %edi
movq %r12, %r8
movsbq (%r8), %r9
movzwl (%rax,%r9,2), %r9d
btl $0xa, %r9d
cmovbl %edx, %edi
testl $0x408, %r9d            # imm = 0x408
cmovel %edx, %ecx
incq %r8
decq %rsi
jne 0x4555
testl %edi, %edi
setne %dl
testl %ecx, %ecx
sete %al
movl %edx, %ecx
jmp 0x4588
movb $0x1, %al
testq %r15, %r15
setne %dl
xorb $0x1, %cl
testb %cl, %dl
jne 0x45d2
testb %al, %al
je 0x45d2
movq %r15, %r13
cmpq $0x21, %r15
jb 0x45bf
leaq 0x4d66(%rip), %rdi      # 0x930f
movq %r15, %rsi
movq %r15, %rdx
movq %r12, %rcx
xorl %eax, %eax
callq 0x331d
movl $0x20, %r13d
movq (%rbx), %rsi
movq %r14, %rdi
movq %r13, %rdx
callq 0x31e0
addq %r13, %r14
jmp 0x45e9
leaq 0x4d12(%rip), %rdi      # 0x92eb
movq %r15, %rsi
movq %r15, %rdx
movq %r12, %rcx
xorl %eax, %eax
callq 0x5bbc
movb $0x0, (%r14)
addq %r15, (%rbx)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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 %rbx
leaq 0xb67e(%rip), %rdi      # 0xfc80
callq 0x878c
movq %rax, %rbx
callq 0x65d9
movq %rbx, %rdi
movq %rax, %rsi
callq 0x899a
leaq 0xc6bf(%rip), %rax      # 0x10ce0
cmpl $0x0, (%rax)
je 0x466e
leaq 0xb653(%rip), %rdi      # 0xfc80
callq 0x878c
movq %rax, %rdi
callq 0x890d
btl $0x1e, %eax
leaq 0x4b87(%rip), %rcx      # 0x91cc
leaq 0x4d05(%rip), %rsi      # 0x9351
cmovaeq %rcx, %rsi
andl $0x3fffffff, %eax       # imm = 0x3FFFFFFF
leaq 0x4e07(%rip), %rdi      # 0x9463
leaq 0xb50d(%rip), %rcx      # 0xfb70
movq %rax, %rdx
xorl %eax, %eax
popq %rbx
jmp 0x3120
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/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 %rbx
callq 0x65d9
movq %rax, %rdi
callq 0x405e
movl %eax, %ebx
movl %eax, %edi
callq 0x3731
leaq 0xc604(%rip), %rax      # 0x10ce0
cmpl $0x0, (%rax)
je 0x4701
movl %ebx, %edi
callq 0x3fca
leaq 0x4d5c(%rip), %rdi      # 0x944b
leaq 0xb47a(%rip), %rdx      # 0xfb70
movq %rax, %rsi
xorl %eax, %eax
popq %rbx
jmp 0x3120
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/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 %rax
callq 0x65d9
movq %rax, %rdi
callq 0x405e
leaq 0xb01c(%rip), %rcx      # 0xf734
movl %eax, (%rcx)
leaq 0xc5bf(%rip), %rcx      # 0x10ce0
cmpl $0x0, (%rcx)
je 0x4746
movl %eax, %edi
callq 0x3fca
leaq 0x4d17(%rip), %rdi      # 0x944b
leaq 0xb435(%rip), %rdx      # 0xfb70
movq %rax, %rsi
xorl %eax, %eax
popq %rcx
jmp 0x3120
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O1/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:
testl %edi, %edi
je 0x4c2c
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl %edi, %ebx
xorl %r15d, %r15d
leaq 0xa5e5(%rip), %r12      # 0xf1a8
movl $0xffffffff, 0xb0ef(%rip) # imm = 0xFFFFFFFF
movq %r12, %r13
xorl %r14d, %r14d
movl (%r13), %eax
testl %eax, %eax
je 0x4bfb
decl %eax
movl %eax, (%r13)
je 0x4bf3
cmpl 0xb0d3(%rip), %eax      # 0xfcbc
jae 0x4bfb
movl %eax, 0xb0cb(%rip)      # 0xfcbc
jmp 0x4bfb
movl %r14d, %edi
callq 0x4c2d
incq %r14
addq $0x48, %r13
cmpq $0x14, %r14
jne 0x4bd3
cmpl $-0x1, 0xb0ad(%rip)     # 0xfcbc
jne 0x4c1b
movl $0x0, 0xb0a1(%rip)      # 0xfcbc
incl %r15d
cmpl %ebx, %r15d
jne 0x4bc3
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/pahihu[P]mixal/io.c
// Function: do_io
static void do_io(Byte device)
{
    Cell rX, offset;
    Address buffer;
    Operation operation;

    operation = devices[device].operation;
    rX        = devices[device].rX;
    offset    = devices[device].offset;
    buffer    = devices[device].buffer;

    if (dbg > 1) {
        fflush(stdout);
        fprintf(stderr,"do_io(%s, %d, %s, %s%lo, %ld, %d, @%ld)\n",
                address_to_string(devices[device].pc),
                device, operations[operation],
                is_negative(rX) ? "-" : "", magnitude(rX),
                offset, buffer,
                devices[device].position);
    }

    current_device_type = devices[device].type;
    switch (operation) {
    case control:
        attributes(device)->ioc_handler(device, rX, offset); break;
    case input:
        attributes(device)->in_handler(device, rX, buffer); break;
    case output:
        attributes(device)->out_handler(device, rX, buffer);
        if (current_device_type == printer)
            devices[device].position++;
    }
    
    if (operation != control)
        io_mark_incomplete(buffer,
                           attributes(device)->block_size, 
                           operation == input ? -WRITE : -READ);
        
    if (devices[device].int_request == true)
        devices[device].int_pending = true;

    devices[device].busy = 0;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edi, %eax
leaq (%rax,%rax,8), %rax
leaq 0xa552(%rip), %rcx      # 0xf190
leaq (%rcx,%rax,8), %r14
movl (%r14), %eax
movl 0x20(%r14), %ebp
movq 0x28(%r14), %rsi
movq 0x30(%r14), %rdx
movl 0x38(%r14), %ebx
movl %eax, 0xb075(%rip)      # 0xfcd0
cmpl $0x2, %ebp
je 0x4c8d
cmpl $0x1, %ebp
je 0x4c7a
testl %ebp, %ebp
jne 0x4caf
imulq $0x38, %rax, %rax
leaq 0x999c(%rip), %rcx      # 0xe610
callq *0x28(%rax,%rcx)
jmp 0x4cab
imulq $0x38, %rax, %rax
leaq 0x998b(%rip), %rcx      # 0xe610
movl %ebx, %edx
callq *0x18(%rax,%rcx)
jmp 0x4cab
imulq $0x38, %rax, %rax
leaq 0x9978(%rip), %rcx      # 0xe610
movl %ebx, %edx
callq *0x20(%rax,%rcx)
cmpl $0x5, 0xb02b(%rip)      # 0xfcd0
jne 0x4cab
incq 0x10(%r14)
testl %ebp, %ebp
je 0x4cd8
movl (%r14), %eax
imulq $0x38, %rax, %rax
leaq 0x9953(%rip), %rcx      # 0xe610
movl 0x14(%rax,%rcx), %esi
cmpl $0x1, %ebp
movl $0x15, %eax
movl $0x1, %edx
cmovel %eax, %edx
movl %ebx, %edi
callq 0x50ba
cmpl $0x1, 0x3c(%r14)
jne 0x4ce7
movl $0x1, 0x40(%r14)
movl $0x0, 0x18(%r14)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 %rbx
leaq 0xc093(%rip), %rbx      # 0x10db4
movslq (%rbx), %rdi
shlq $0x2, %rdi
callq 0x31f0
movq %rax, 0xaf8c(%rip)      # 0xfcc0
testq %rax, %rax
jne 0x4d47
leaq 0x4766(%rip), %rdi      # 0x94a6
xorl %eax, %eax
callq 0x5ac0
movslq (%rbx), %rdi
shlq $0x2, %rdi
callq 0x31f0
movq %rax, 0xaf6e(%rip)      # 0xfcc8
testq %rax, %rax
jne 0x4d6d
leaq 0x4740(%rip), %rdi      # 0x94a6
xorl %eax, %eax
callq 0x5ac0
movl $0x44, %eax
leaq 0xa417(%rip), %rcx      # 0xf190
movl $0x0, -0x2c(%rax,%rcx)
movq $0x0, -0x8(%rax,%rcx)
xorl %edx, %edx
cmpl $0x2, -0x44(%rax,%rcx)
sete %dl
movl %edx, (%rax,%rcx)
addq $0x48, %rax
cmpq $0x5e4, %rax            # imm = 0x5E4
jne 0x4d79
cmpl $0x0, (%rbx)
je 0x4dcd
movq 0xaf11(%rip), %rax      # 0xfcc0
movq 0xaf12(%rip), %rcx      # 0xfcc8
xorl %edx, %edx
movl $0x15, %esi
movl %esi, (%rax,%rdx,4)
movl %esi, (%rcx,%rdx,4)
incq %rdx
movl (%rbx), %edi
cmpq %rdi, %rdx
jb 0x4dbd
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/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 %rbx
cmpl $0x0, 0xaee5(%rip)      # 0xfcbc
je 0x4df9
xorl %ebx, %ebx
movl $0x1, %edi
callq 0x4baa
incq 0xaec4(%rip)            # 0xfcb0
incl %ebx
cmpl $0x0, 0xaec7(%rip)      # 0xfcbc
jne 0x4ddb
jmp 0x4dfb
xorl %ebx, %ebx
movl %ebx, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/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 %r14
pushq %rbx
pushq %rax
movl $0x8, %ebx
leaq 0xa381(%rip), %r14      # 0xf190
movq (%rbx,%r14), %rdi
testq %rdi, %rdi
je 0x4e25
callq 0x30f0
movq $0x0, (%rbx,%r14)
addq $0x48, %rbx
cmpq $0x5a8, %rbx            # imm = 0x5A8
jne 0x4e0f
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/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
pushq %rbx
pushq %rax
movl %esi, %ebx
movl %edi, %ebp
leaq 0xbf6c(%rip), %rax      # 0x10db4
movl %edi, %ecx
andl $0x3fffffff, %ecx       # imm = 0x3FFFFFFF
cmpl %ecx, (%rax)
jg 0x4e62
leaq 0x465e(%rip), %rdi      # 0x94b9
xorl %eax, %eax
callq 0x5bbc
movl %ebp, %eax
negl %eax
shlq $0x2, %rax
addq 0xae57(%rip), %rax      # 0xfcc8
movl %ebp, %ecx
shlq $0x2, %rcx
addq 0xae42(%rip), %rcx      # 0xfcc0
testl %ebp, %ebp
cmovsq %rax, %rcx
movl (%rcx), %eax
cmpl $0x15, %eax
setne %cl
testl %ebx, %ebx
sete %dl
testl %eax, %eax
setne %al
andb %cl, %al
andb %dl, %al
movzbl %al, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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:
movl $0xff, %ecx
movl $0x7, %eax
leaq 0xa2db(%rip), %rdx      # 0xf190
xorl %esi, %esi
cmpl $0x0, 0x18(%rdx)
jne 0x4ed0
cmpl $0x0, 0x40(%rdx)
je 0x4ed0
movl (%rdx), %r8d
cmpl %eax, %r8d
cmovbl %esi, %ecx
cmovbl %r8d, %eax
incq %rsi
addq $0x48, %rdx
cmpq $0x14, %rsi
jne 0x4eb7
xorl %eax, %eax
cmpl $0xff, %ecx
je 0x4f04
movl %ecx, %eax
leaq (%rax,%rax,8), %rax
leaq 0xa29c(%rip), %rdx      # 0xf190
movq $0x0, 0x3c(%rdx,%rax,8)
movl %ecx, (%rdi)
movl $0x1, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/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, %ebp
movq %rdi, 0x20(%rsp)
leaq 0x46d5(%rip), %rdi      # 0x95f6
leaq 0x4f16(%rip), %rsi      # 0x9e3e
callq 0x3250
movq %rax, %rbx
testq %rax, %rax
jne 0x4f43
leaq 0x45a3(%rip), %rdi      # 0x94df
xorl %eax, %eax
callq 0x5bbc
leaq 0xbe6a(%rip), %r13      # 0x10db4
cmpl $0x65, (%r13)
jl 0x50a4
movl %ebp, 0x8(%rsp)
movl $0x64, %r15d
xorl %ebp, %ebp
movl $0x1, %r12d
xorl %r14d, %r14d
leal (%r15,%r12), %eax
decl %eax
cmpl %eax, (%r13)
jle 0x4f8f
movl %r15d, %edi
callq 0x6c73
shlq $0x22, %rax
cmovnel %r12d, %r14d
incl %r12d
cmpl $0x8, %r12d
jne 0x4f6a
testl %r14d, %r14d
je 0x506f
movl %ebp, 0xc(%rsp)
movq %rbx, %rdi
leaq 0x47b9(%rip), %rsi      # 0x975f
movq 0x20(%rsp), %rdx
movl %r14d, %ecx
movl %r15d, %r8d
xorl %eax, %eax
callq 0x31c0
testl %r14d, %r14d
jle 0x5026
movl %r15d, %r13d
movl %r14d, %ebp
leaq 0xbdea(%rip), %rax      # 0x10db4
cmpl %r13d, (%rax)
jle 0x5026
movl %r13d, %edi
callq 0x6c73
movq %rax, %r12
movl %r12d, %edx
andl $0x3fffffff, %edx       # imm = 0x3FFFFFFF
leaq 0x10(%rsp), %rdi
leaq 0x477c(%rip), %rsi      # 0x976b
xorl %eax, %eax
callq 0x3280
btl $0x1e, %r12d
jae 0x5012
movsbq 0x19(%rsp), %rax
leaq 0x474a(%rip), %rcx      # 0x9754
movb -0x30(%rax,%rcx), %al
movb %al, 0x19(%rsp)
leaq 0x10(%rsp), %rdi
movq %rbx, %rsi
callq 0x3140
incl %r13d
decl %ebp
jne 0x4fc3
cmpl $0x6, %r14d
leaq 0x4741(%rip), %r12      # 0x9772
jg 0x5051
addl $-0x7, %r14d
movl $0xa, %esi
movl $0x1, %edx
movq %r12, %rdi
movq %rbx, %rcx
callq 0x32a0
incl %r14d
jne 0x5037
movl $0xa, %edi
movq %rbx, %rsi
callq 0x3170
movl 0xc(%rsp), %ebp
incl %ebp
addl $0x6, %r15d
leaq 0xbd45(%rip), %r13      # 0x10db4
incl %r15d
cmpl (%r13), %r15d
jl 0x4f61
testl %ebp, %ebp
movl 0x8(%rsp), %eax
je 0x50a4
movl %eax, %edx
negl %edx
cmovsl %eax, %edx
leaq 0x4466(%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_O1/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, 0x4(%rsp)
movl %esi, %ebp
movl %edi, %r14d
testl %edi, %edi
jns 0x50e9
callq 0x6a04
testl %eax, %eax
jne 0x50e9
leaq 0x447a(%rip), %rdi      # 0x955c
xorl %eax, %eax
callq 0x5bbc
testl %ebp, %ebp
je 0x5196
movslq %r14d, %r12
movl %ebp, %r13d
leaq (,%r12,4), %r15
movq %r12, %r14
negq %r14
movq %r15, %rbp
negq %rbp
movl %r12d, %eax
andl $0x3fffffff, %eax       # imm = 0x3FFFFFFF
leaq 0xbc9a(%rip), %rcx      # 0x10db4
cmpl %eax, (%rcx)
jg 0x512c
leaq 0x4463(%rip), %rdi      # 0x9588
xorl %eax, %eax
callq 0x5bbc
movq 0xab95(%rip), %rax      # 0xfcc8
addq %rbp, %rax
movq 0xab83(%rip), %rcx      # 0xfcc0
addq %r15, %rcx
testq %r12, %r12
cmovsq %rax, %rcx
movl (%rcx), %ebx
addl 0x4(%rsp), %ebx
jns 0x515d
leaq 0x445d(%rip), %rdi      # 0x95b3
xorl %eax, %eax
callq 0x5bbc
testq %r12, %r12
movq %r12, %rax
cmovsq %r14, %rax
leaq 0xab52(%rip), %rcx      # 0xfcc0
leaq 0xab53(%rip), %rdx      # 0xfcc8
cmovsq %rdx, %rcx
movq (%rcx), %rcx
movl %ebx, (%rcx,%rax,4)
incq %r12
addq $0x4, %r15
decq %r14
addq $-0x4, %rbp
decq %r13
jne 0x510b
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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
movl $0x4, %edi
movl $0x5, %esi
callq 0x384a
movl %eax, %edi
movq %r14, %rsi
callq 0x37ed
movl %ebp, %ecx
leaq (%rcx,%rcx,8), %rcx
leaq 0x9fba(%rip), %rdx      # 0xf190
movl %eax, %esi
andl $0x1ff, %esi            # imm = 0x1FF
cmpl $0x0, (%rdx,%rcx,8)
cmovnel %eax, %esi
movl %ebp, %edi
callq 0x5616
movl %ebp, %edi
movl %ebx, %esi
popq %rbx
popq %r14
popq %rbp
jmp 0x56f3
// File: /workspace/github_c_makefile_star2_O1/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 0x526c
leaq 0x441a(%rip), %rdi      # 0x967d
movl %ebx, %esi
xorl %eax, %eax
callq 0x5bbc
movl $0x4, %edi
movl $0x5, %esi
callq 0x384a
movl %eax, %edi
movq %r14, %rsi
callq 0x37ed
movl %ebx, %ecx
leaq (%rcx,%rcx,8), %rcx
leaq 0x9efe(%rip), %rdx      # 0xf190
movl %eax, %esi
andl $0x1ff, %esi            # imm = 0x1FF
cmpl $0x0, (%rdx,%rcx,8)
cmovnel %eax, %esi
movl %ebx, %edi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x5616
// File: /workspace/github_c_makefile_star2_O1/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 %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edi, %ebx
movl %edx, %r13d
movl %edi, %r12d
andl $0x3fffffff, %r13d      # imm = 0x3FFFFFFF
je 0x533d
btl $0x1e, %edx
jb 0x5341
cmpb $0x1, 0xa992(%rip)      # 0xfcb8
jne 0x5381
leaq (%r12,%r12,8), %rax
leaq 0x9e5d(%rip), %rcx      # 0xf190
leaq (%rcx,%rax,8), %rax
addq $0x8, %rax
jmp 0x53ae
xorl %esi, %esi
jmp 0x5352
movl %ebx, %edi
callq 0x594b
movl %eax, %esi
xorl %eax, %eax
subl %r13d, %esi
cmovbl %eax, %esi
movl %ebx, %edi
callq 0x5616
movl %ebx, %edi
callq 0x594b
movl %eax, %eax
leaq (%r12,%r12,8), %rcx
leaq 0x9e23(%rip), %rdx      # 0xf190
movq %rax, 0x10(%rdx,%rcx,8)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq (%r12,%r12,8), %rax
leaq 0x9e04(%rip), %rcx      # 0xf190
movl (%rcx,%rax,8), %edx
addl $-0x3, %edx
cmpl $0x3, %edx
jae 0x53a6
movl %edx, %eax
leaq 0x93f8(%rip), %rcx      # 0xe798
movq (%rcx,%rax,8), %rax
jmp 0x53ae
leaq (%rcx,%rax,8), %rax
addq $0x8, %rax
movq (%rax), %r14
movl %ebx, %edi
callq 0x594b
movl %eax, %ebp
incl %ebp
leaq 0x4253(%rip), %r15      # 0x9616
movl %ebx, %edi
movl %ebp, %esi
callq 0x5616
movq %r14, %rdi
callq 0x3150
cmpl $-0x1, %eax
je 0x5359
movl %eax, %edi
movq %r14, %rsi
callq 0x3210
cmpl $-0x1, %eax
jne 0x5403
callq 0x3070
movl (%rax), %edi
callq 0x32b0
movq %r15, %rdi
movl %ebx, %esi
movq %rax, %rdx
xorl %eax, %eax
callq 0x5bbc
decl %r13d
incl %ebp
testl %r13d, %r13d
jne 0x53c3
jmp 0x5359
// File: /workspace/github_c_makefile_star2_O1/pahihu[P]mixal/io.c
// Function: text_in
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, 0xa89d(%rip)      # 0xfcb8
jne 0x5432
leaq (%rax,%rax,8), %rcx
leaq 0x9d68(%rip), %rsi      # 0xf190
leaq (%rsi,%rcx,8), %rcx
addq $0x8, %rcx
jmp 0x545f
leaq (%rax,%rax,8), %rcx
leaq 0x9d53(%rip), %rsi      # 0xf190
movl (%rsi,%rcx,8), %edi
addl $-0x3, %edi
cmpl $0x3, %edi
jae 0x5457
movl %edi, %ecx
leaq 0x9347(%rip), %rsi      # 0xe798
movq (%rsi,%rcx,8), %rcx
jmp 0x545f
leaq (%rsi,%rcx,8), %rcx
addq $0x8, %rcx
movq (%rcx), %rdi
leaq (%rax,%rax,8), %rax
leaq 0x9d23(%rip), %rcx      # 0xf190
movl (%rcx,%rax,8), %eax
imulq $0x38, %rax, %rax
leaq 0x9195(%rip), %rcx      # 0xe610
movl 0x14(%rax,%rcx), %eax
movl %edx, %esi
movl %eax, %edx
jmp 0x59cb
// File: /workspace/github_c_makefile_star2_O1/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 %rbx
movl %edi, %eax
leaq (%rax,%rax,8), %rax
leaq 0x9b68(%rip), %rcx      # 0xf190
movl %esi, %r14d
cmpq %r14, 0x10(%rcx,%rax,8)
je 0x56ed
movl %edi, %ebx
movl (%rcx,%rax,8), %edi
imulq $0x38, %rdi, %rdx
leaq 0x8fca(%rip), %r8       # 0xe610
leaq -0x3(%rdi), %r9
cmpq $0x4, %r9
setb %r9b
cmpl %esi, 0x10(%rdx,%r8)
seta %sil
orb %r9b, %sil
je 0x5673
cmpb $0x1, 0xa651(%rip)      # 0xfcb8
jne 0x5686
leaq (%rcx,%rax,8), %rsi
addq $0x8, %rsi
jmp 0x56a5
leaq 0x3f8a(%rip), %rdi      # 0x9604
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
jmp 0x5bbc
addl $-0x3, %edi
cmpl $0x3, %edi
jae 0x569d
movl %edi, %esi
leaq 0x9101(%rip), %rdi      # 0xe798
movq (%rdi,%rsi,8), %rsi
jmp 0x56a5
leaq (%rcx,%rax,8), %rsi
addq $0x8, %rsi
leaq (%rcx,%rax,8), %r15
addq $0x10, %r15
movq (%rsi), %rdi
movl 0x14(%rdx,%r8), %eax
addl %eax, %eax
leal (%rax,%rax,2), %esi
incl %esi
imulq %r14, %rsi
xorl %edx, %edx
callq 0x3220
testl %eax, %eax
je 0x56ea
callq 0x3070
movl (%rax), %edi
callq 0x32b0
leaq 0x3f38(%rip), %rdi      # 0x9616
movl %ebx, %esi
movq %rax, %rdx
xorl %eax, %eax
callq 0x5bbc
movq %r14, (%r15)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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, %eax
cmpb $0x1, 0xa5ae(%rip)      # 0xfcb8
movl %edi, 0x4(%rsp)
leaq (%rax,%rax,8), %rcx
leaq 0x9a77(%rip), %rdx      # 0xf190
jne 0x5725
leaq (%rdx,%rcx,8), %rcx
addq $0x8, %rcx
jmp 0x5747
movl (%rdx,%rcx,8), %esi
addl $-0x3, %esi
cmpl $0x3, %esi
jae 0x573f
movl %esi, %ecx
leaq 0x905f(%rip), %rdx      # 0xe798
movq (%rdx,%rcx,8), %rcx
jmp 0x5747
leaq (%rdx,%rcx,8), %rcx
addq $0x8, %rcx
movq (%rcx), %r15
leaq (%rax,%rax,8), %rax
leaq 0x9a3b(%rip), %rcx      # 0xf190
movl (%rcx,%rax,8), %eax
imulq $0x38, %rax, %rax
leaq 0x8ead(%rip), %rcx      # 0xe610
movl 0x14(%rax,%rcx), %r13d
cmpl $0x1, %r13d
adcl $0x0, %r13d
xorl %ebx, %ebx
movq %r15, %rdi
callq 0x3150
cmpl $0x2d, %eax
je 0x5789
cmpl $-0x1, %eax
je 0x57fd
xorl %r12d, %r12d
jmp 0x578f
movl $0x40000000, %r12d      # imm = 0x40000000
movl $0x1, %ebp
movq %r15, %rdi
callq 0x3150
cmpl $-0x1, %eax
je 0x57fd
movl %eax, %edi
callq 0x420d
movl %eax, %edi
movl %ebp, %esi
movq %r12, %rdx
callq 0x387b
movq %rax, %r12
incl %ebp
cmpl $0x6, %ebp
jne 0x5794
leal (%rbx,%r14), %edi
movq %r12, %rsi
callq 0x6ceb
incl %ebx
cmpl %r13d, %ebx
jne 0x5772
movq %r15, %rdi
callq 0x3150
cmpl $0xa, %eax
je 0x5806
leaq 0x3e6a(%rip), %rdi      # 0x964f
leaq 0x3e6d(%rip), %rsi      # 0x9659
leaq 0x3e6b(%rip), %rcx      # 0x965e
movl $0x26f, %edx            # imm = 0x26F
callq 0x3130
movl 0x4(%rsp), %edi
callq 0x32f0
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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)
movq %rdi, %r14
testl %edx, %edx
je 0x5930
movl %edx, %ebp
movl %esi, %r15d
xorl %ebx, %ebx
leal (%rbx,%r15), %edi
callq 0x6c73
movq %rax, %r12
cmpl $0x0, 0x4(%rsp)
je 0x58e8
movl $0x1, %r13d
movl %r13d, %edi
movq %r12, %rsi
callq 0x3794
movl %eax, %edi
callq 0x415c
movsbl %al, %edi
movq %r14, %rsi
callq 0x3170
incl %r13d
cmpl $0x6, %r13d
jne 0x58c0
jmp 0x5926
btl $0x1e, %r12d
movl $0x2d, %edi
movl $0x20, %eax
cmovael %eax, %edi
movq %r14, %rsi
callq 0x3170
movl $0x1, %r13d
movl %r13d, %edi
movq %r12, %rsi
callq 0x3794
movl %eax, %edi
movq %r14, %rsi
callq 0x3170
incl %r13d
cmpl $0x6, %r13d
jne 0x5908
incl %ebx
cmpl %ebp, %ebx
jne 0x58a7
movl $0xa, %edi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3170