// File: /workspace/github_c_makefile_star2_O1/pahihu[P]mixal/run.c
// Function: do_special
static void do_special(void)
{
    switch (F) {
    case 0: { /* NUM */
        unsigned i;
        Flag negative = false;
        Cell num = zero;
        Cell ten = ulong_to_cell (10);
        if (overpunched(r[X])) {
            r[X] = flip_char (r[X]);
            negative = true;
        }
        for (i = 1; i <= 5; ++i)
            num = add(mul(ten, num), (Cell)(get_byte(i, r[A]) % 10));
        for (i = 1; i <= 5; ++i)
            num = add(mul(ten, num), (Cell)(get_byte(i, r[X]) % 10));
        if (negative)
            r[A] = negative(num);
        else
            r[A] = is_negative (r[A]) ? negative(num) : num;
        break;
    }
    case 1: { /* CHAR */
        unsigned long num = magnitude(r[A]);
        unsigned z = (unsigned) C_char_to_mix('0');
        unsigned i;
        for (i = 5; 0 < i; --i, num /= 10)
            r[X] = set_byte((Byte) (z + num % 10), i, r[X]);
        for (i = 5; 0 < i; --i, num /= 10)
            r[A] = set_byte((Byte) (z + num % 10), i, r[A]);
        if (is_negative (r[A]))
            r[X] = flip_char (r[X]);
        break;
    }
    case 2: /* HLT */
        halting = true;
        elapsed_time += io_complete();
        longjmp(escape_k, 1);
        break;
    case 3: /* AND */
        check_binary();
        r[A] = logical_product(r[A], get_V());
        break;
    case 4: /* OR  */
        check_binary();
        r[A] = logical_sum(r[A], get_V());
        break;
    case 5: /* XOR */
        check_binary();
        r[A] = logical_difference(r[A], get_V());
        break;
    case 6: /* FLOT */
        check_float();
        r[A] = float_flot(r[A]);
        elapsed_time += 2;
        break;
    case 7: /* FIX  */
        check_float();
        r[A] = float_fix(r[A]);
        /* NB. in TAOCP no timing for FIX */
        elapsed_time += 2;
        break;
    case 8: { /* NEG */
        check_binary();
        unsigned long cell = ~magnitude(r[A]);
        r[A] = is_negative(r[A]) ? negative(cell) : cell;
        break;
    }
    case 9: { /* INT */
        check_interrupt();
        if (normal_state == internal_state) {
            save_state();
            internal_state = control_state;
            pc = -12;
        } else {
            restore_state();
            internal_state = normal_state;
            rti_done = true;
        }
        elapsed_time++;
        break;
    }
    case 10: { /* XCH */
        check_binary();
        Cell cell = r[A];
        r[A] = r[X]; r[X] = cell;
        break;
    }
    case 11: { /* XEQ */
        check_master();
        xecute(cell_to_address(M), true);
        break;
    }
    default: error("Unknown extended opcode");
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl 0x9356(%rip), %eax      # 0x10dec
cmpq $0xb, %rax
ja 0x7ee1
leaq 0x2229(%rip), %rcx      # 0x9cd0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0xa, %edi
callq 0x376c
movq %rax, %rbx
movq 0x92d4(%rip), %rsi      # 0x10d98
movl $0x5, %edi
callq 0x3794
movl %eax, %ebp
addl $-0x14, %ebp
cmpl $-0xa, %ebp
jb 0x7aeb
movq 0x92b9(%rip), %rdi      # 0x10d98
callq 0x85bc
movq %rax, 0x92ad(%rip)      # 0x10d98
movl $0x1, %r14d
xorl %eax, %eax
movl $0xcccccccd, %r12d      # imm = 0xCCCCCCCD
movq %rbx, %rdi
movq %rax, %rsi
callq 0x3c37
movq %rax, %r15
movq 0x9252(%rip), %rsi      # 0x10d60
movl %r14d, %edi
callq 0x3794
movl %eax, %ecx
imulq %r12, %rcx
shrq $0x23, %rcx
addl %ecx, %ecx
leal (%rcx,%rcx,4), %ecx
subl %ecx, %eax
movq %r15, %rdi
movq %rax, %rsi
callq 0x3b00
incl %r14d
cmpl $0x6, %r14d
jne 0x7af9
movl $0x1, %r14d
movl $0xcccccccd, %r12d      # imm = 0xCCCCCCCD
movq %rbx, %rdi
movq %rax, %rsi
callq 0x3c37
movq %rax, %r15
movq 0x923c(%rip), %rsi      # 0x10d98
movl %r14d, %edi
callq 0x3794
movl %eax, %ecx
imulq %r12, %rcx
shrq $0x23, %rcx
addl %ecx, %ecx
leal (%rcx,%rcx,4), %ecx
subl %ecx, %eax
movq %r15, %rdi
movq %rax, %rsi
callq 0x3b00
incl %r14d
cmpl $0x6, %r14d
jne 0x7b47
movl $0x40000000, %ecx       # imm = 0x40000000
movq 0x91cb(%rip), %rdx      # 0x10d60
andq %rcx, %rdx
cmpl $-0xa, %ebp
cmovaeq %rcx, %rdx
xorq %rax, %rdx
movq %rdx, 0x91b7(%rip)      # 0x10d60
jmp 0x7f17
movq 0x91ab(%rip), %r14      # 0x10d60
andl $0x3fffffff, %r14d      # imm = 0x3FFFFFFF
movl $0x30, %edi
callq 0x41b1
movl %eax, %ebx
movl $0x5, %ebp
movabsq $-0x3333333333333333, %r12 # imm = 0xCCCCCCCCCCCCCCCD
movq %r14, %rdi
movq %r14, %rax
mulq %r12
movq %rdx, %r14
shrq $0x3, %r14
leal (%r14,%r14), %eax
leal (%rax,%rax,4), %eax
subl %eax, %edi
addl %ebx, %edi
movq 0x919f(%rip), %rdx      # 0x10d98
movl %ebp, %esi
callq 0x387b
movq %rax, 0x9191(%rip)      # 0x10d98
decl %ebp
jne 0x7bd7
movl $0x5, %ebp
movq %r14, %rax
mulq %r12
movq %rdx, %r15
shrq $0x3, %r15
leal (%r15,%r15), %eax
leal (%rax,%rax,4), %eax
subl %eax, %r14d
addl %ebx, %r14d
movq 0x912f(%rip), %rdx      # 0x10d60
movl %r14d, %edi
movl %ebp, %esi
callq 0x387b
movq %rax, 0x911e(%rip)      # 0x10d60
movq %r15, %r14
decl %ebp
jne 0x7c10
testb $0x40, 0x9113(%rip)     # 0x10d63
je 0x7f17
movq 0x913b(%rip), %rdi      # 0x10d98
callq 0x85bc
jmp 0x7ed8
testb $0x2, 0x90ce(%rip)      # 0x10d3c
jne 0x7c7e
leaq 0x21eb(%rip), %rdi      # 0x9e62
xorl %eax, %eax
callq 0x5bbc
cmpl $0x0, 0x90c3(%rip)      # 0x10d48
je 0x7ef7
movq 0x912e(%rip), %rax      # 0x10dc0
movq 0x48(%rax), %rcx
movq %rcx, 0x90c3(%rip)      # 0x10d60
movq 0x40(%rax), %rcx
movq %rcx, 0x90f0(%rip)      # 0x10d98
movl $0x7, %ecx
leaq 0x90b4(%rip), %rdx      # 0x10d68
movq (%rax,%rcx,8), %rsi
movq %rsi, (%rdx)
decq %rcx
addq $0x8, %rdx
cmpq $0x1, %rcx
jne 0x7cb4
movq 0x8(%rax), %rbx
movl $0x4, %edi
movl $0x5, %esi
callq 0x384a
movl %eax, %edi
movq %rbx, %rsi
callq 0x37ed
movq %rax, 0x90b4(%rip)      # 0x10da0
movl $0x1, %edi
movl $0x2, %esi
callq 0x384a
movl %eax, %edi
movq %rbx, %rsi
callq 0x37ed
movq %rax, %rdi
callq 0x405e
movl %eax, 0x909d(%rip)      # 0x10db0
movl $0x3, %edi
movq %rbx, %rsi
callq 0x3794
xorl %ecx, %ecx
cmpl $0x8, %eax
setae %cl
leaq 0x7e11(%rip), %rdx      # 0xfb40
movl %ecx, (%rdx)
andl $0x7, %eax
decl %eax
movl %eax, 0x9008(%rip)      # 0x10d44
movl $0x0, 0x9002(%rip)      # 0x10d48
movb $0x1, 0x917b(%rip)      # 0x10ec8
jmp 0x7f10
testb $0x1, 0x8fe3(%rip)      # 0x10d3c
jne 0x7d69
leaq 0x24ed(%rip), %rdi      # 0xa24f
xorl %eax, %eax
callq 0x5bbc
movl 0x8ff1(%rip), %eax      # 0x10d60
notl %eax
orq $-0x80000000, %rax      # imm = 0x80000000
jmp 0x7e35
testb $0x1, 0x8fb9(%rip)      # 0x10d3c
jne 0x7d93
leaq 0x24c3(%rip), %rdi      # 0xa24f
xorl %eax, %eax
callq 0x5bbc
movq 0x8fc6(%rip), %rbx      # 0x10d60
callq 0x8597
movq %rbx, %rdi
movq %rax, %rsi
callq 0x3d70
jmp 0x7e35
testb $0x1, 0x8f86(%rip)      # 0x10d3c
jne 0x7dc6
leaq 0x2490(%rip), %rdi      # 0xa24f
xorl %eax, %eax
callq 0x5bbc
movq 0x8f93(%rip), %rbx      # 0x10d60
callq 0x8597
movq %rbx, %rdi
movq %rax, %rsi
callq 0x3d4a
jmp 0x7e35
testb $0x4, 0x8f56(%rip)      # 0x10d3c
jne 0x7df6
leaq 0x2421(%rip), %rdi      # 0xa210
xorl %eax, %eax
callq 0x5bbc
movq 0x8f63(%rip), %rdi      # 0x10d60
callq 0x4121
jmp 0x7e9b
testb $0x1, 0x8f2e(%rip)      # 0x10d3c
jne 0x7e1e
leaq 0x2438(%rip), %rdi      # 0xa24f
xorl %eax, %eax
callq 0x5bbc
movq 0x8f3b(%rip), %rbx      # 0x10d60
callq 0x8597
movq %rbx, %rdi
movq %rax, %rsi
callq 0x3d5d
movq %rax, 0x8f24(%rip)      # 0x10d60
jmp 0x7f17
testb $-0x80, 0x8ef4(%rip)    # 0x10d3c
jne 0x7e58
leaq 0x240f(%rip), %rdi      # 0xa260
xorl %eax, %eax
callq 0x5bbc
movq 0x8f91(%rip), %rdi      # 0x10df0
callq 0x405e
movl %eax, %edi
movl $0x1, %esi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x7458
testb $0x4, 0x8ebd(%rip)      # 0x10d3c
jne 0x7e8f
leaq 0x2388(%rip), %rdi      # 0xa210
xorl %eax, %eax
callq 0x5bbc
movq 0x8eca(%rip), %rdi      # 0x10d60
callq 0x4134
movq %rax, 0x8ebe(%rip)      # 0x10d60
addq $0x2, 0x8e86(%rip)      # 0x10d30
jmp 0x7f17
testb $0x1, 0x8e89(%rip)      # 0x10d3c
jne 0x7ec3
leaq 0x2393(%rip), %rdi      # 0xa24f
xorl %eax, %eax
callq 0x5bbc
movq 0x8e96(%rip), %rax      # 0x10d60
movq 0x8ec7(%rip), %rcx      # 0x10d98
movq %rcx, 0x8e88(%rip)      # 0x10d60
movq %rax, 0x8eb9(%rip)      # 0x10d98
jmp 0x7f17
leaq 0x234f(%rip), %rdi      # 0xa237
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x5bbc
callq 0x774a
movl $0x1, 0x8e42(%rip)      # 0x10d48
movl $0xfffffff4, 0x8ea0(%rip) # imm = 0xFFFFFFF4
incq 0x8e19(%rip)            # 0x10d30
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movb $0x1, 0x8e19(%rip)      # 0x10d40
callq 0x4dcf
movl %eax, %eax
addq %rax, 0x8dfb(%rip)      # 0x10d30
leaq 0x8ec4(%rip), %rdi      # 0x10e00
movl $0x1, %esi
callq 0x3230