// File: /workspace/github_c_makefile_star2_O3/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 0x9333(%rip), %eax      # 0x10dec
cmpq $0xb, %rax
ja 0x7f0d
leaq 0x2206(%rip), %rcx      # 0x9cd0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0xa, %edi
callq 0x374c
movq %rax, %rbx
movq 0x92b1(%rip), %rsi      # 0x10d98
movl $0x5, %edi
callq 0x3774
movl %eax, %ebp
addl $-0x14, %ebp
cmpl $-0xa, %ebp
jb 0x7b0e
movq 0x9296(%rip), %rdi      # 0x10d98
callq 0x85d3
movq %rax, 0x928a(%rip)      # 0x10d98
movl $0x1, %r14d
xorl %eax, %eax
movl $0xcccccccd, %r12d      # imm = 0xCCCCCCCD
movq %rbx, %rdi
movq %rax, %rsi
callq 0x3c15
movq %rax, %r15
movq 0x922f(%rip), %rsi      # 0x10d60
movl %r14d, %edi
callq 0x3774
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 0x3ad2
incl %r14d
cmpl $0x6, %r14d
jne 0x7b1c
movl $0x1, %r14d
movl $0xcccccccd, %r12d      # imm = 0xCCCCCCCD
movq %rbx, %rdi
movq %rax, %rsi
callq 0x3c15
movq %rax, %r15
movq 0x9219(%rip), %rsi      # 0x10d98
movl %r14d, %edi
callq 0x3774
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 0x3ad2
incl %r14d
cmpl $0x6, %r14d
jne 0x7b6a
movl $0x40000000, %ecx       # imm = 0x40000000
movq 0x91a8(%rip), %rdx      # 0x10d60
andq %rcx, %rdx
cmpl $-0xa, %ebp
cmovaeq %rcx, %rdx
xorq %rax, %rdx
movq %rdx, 0x9194(%rip)      # 0x10d60
jmp 0x7f43
movq 0x9188(%rip), %r14      # 0x10d60
andl $0x3fffffff, %r14d      # imm = 0x3FFFFFFF
movl $0x30, %edi
callq 0x4189
movl %eax, %ebx
movl $0x5, %ebp
movq 0x91a1(%rip), %rcx      # 0x10d98
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
movl %ebp, %esi
movq %rcx, %rdx
callq 0x385b
movq %rax, %rcx
movq %rax, 0x9168(%rip)      # 0x10d98
decl %ebp
jne 0x7c01
movl $0x5, %ebp
movq 0x9120(%rip), %rcx      # 0x10d60
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
movl %r14d, %edi
movl %ebp, %esi
movq %rcx, %rdx
callq 0x385b
movq %rax, %rcx
movq %rax, 0x90ef(%rip)      # 0x10d60
movq %r15, %r14
decl %ebp
jne 0x7c40
btl $0x1e, %ecx
jae 0x7f43
movq 0x910f(%rip), %rdi      # 0x10d98
callq 0x85d3
jmp 0x7f04
testb $0x2, 0x90a2(%rip)      # 0x10d3c
jne 0x7caa
leaq 0x21bf(%rip), %rdi      # 0x9e62
xorl %eax, %eax
callq 0x5bec
cmpl $0x0, 0x9097(%rip)      # 0x10d48
je 0x7f23
movq 0x9102(%rip), %rax      # 0x10dc0
movq 0x48(%rax), %rcx
movq %rcx, 0x9097(%rip)      # 0x10d60
movq 0x40(%rax), %rcx
movq %rcx, 0x90c4(%rip)      # 0x10d98
movl $0x7, %ecx
leaq 0x9088(%rip), %rdx      # 0x10d68
movq (%rax,%rcx,8), %rsi
movq %rsi, (%rdx)
decq %rcx
addq $0x8, %rdx
cmpq $0x1, %rcx
jne 0x7ce0
movq 0x8(%rax), %rbx
movl $0x4, %edi
movl $0x5, %esi
callq 0x382a
movl %eax, %edi
movq %rbx, %rsi
callq 0x37cd
movq %rax, 0x9088(%rip)      # 0x10da0
movl $0x1, %edi
movl $0x2, %esi
callq 0x382a
movl %eax, %edi
movq %rbx, %rsi
callq 0x37cd
movq %rax, %rdi
callq 0x4037
movl %eax, 0x9071(%rip)      # 0x10db0
movl $0x3, %edi
movq %rbx, %rsi
callq 0x3774
xorl %ecx, %ecx
cmpl $0x8, %eax
setae %cl
leaq 0x7de5(%rip), %rdx      # 0xfb40
movl %ecx, (%rdx)
andl $0x7, %eax
decl %eax
movl %eax, 0x8fdc(%rip)      # 0x10d44
movl $0x0, 0x8fd6(%rip)      # 0x10d48
movb $0x1, 0x914f(%rip)      # 0x10ec8
jmp 0x7f3c
testb $0x1, 0x8fb7(%rip)      # 0x10d3c
jne 0x7d95
leaq 0x24c1(%rip), %rdi      # 0xa24f
xorl %eax, %eax
callq 0x5bec
movl 0x8fc5(%rip), %eax      # 0x10d60
notl %eax
orq $-0x80000000, %rax      # imm = 0x80000000
jmp 0x7e61
testb $0x1, 0x8f8d(%rip)      # 0x10d3c
jne 0x7dbf
leaq 0x2497(%rip), %rdi      # 0xa24f
xorl %eax, %eax
callq 0x5bec
movq 0x8f9a(%rip), %rbx      # 0x10d60
callq 0x85ae
movq %rbx, %rdi
movq %rax, %rsi
callq 0x3d49
jmp 0x7e61
testb $0x1, 0x8f5a(%rip)      # 0x10d3c
jne 0x7df2
leaq 0x2464(%rip), %rdi      # 0xa24f
xorl %eax, %eax
callq 0x5bec
movq 0x8f67(%rip), %rbx      # 0x10d60
callq 0x85ae
movq %rbx, %rdi
movq %rax, %rsi
callq 0x3d23
jmp 0x7e61
testb $0x4, 0x8f2a(%rip)      # 0x10d3c
jne 0x7e22
leaq 0x23f5(%rip), %rdi      # 0xa210
xorl %eax, %eax
callq 0x5bec
movq 0x8f37(%rip), %rdi      # 0x10d60
callq 0x40fa
jmp 0x7ec7
testb $0x1, 0x8f02(%rip)      # 0x10d3c
jne 0x7e4a
leaq 0x240c(%rip), %rdi      # 0xa24f
xorl %eax, %eax
callq 0x5bec
movq 0x8f0f(%rip), %rbx      # 0x10d60
callq 0x85ae
movq %rbx, %rdi
movq %rax, %rsi
callq 0x3d36
movq %rax, 0x8ef8(%rip)      # 0x10d60
jmp 0x7f43
testb $-0x80, 0x8ec8(%rip)    # 0x10d3c
jne 0x7e84
leaq 0x23e3(%rip), %rdi      # 0xa260
xorl %eax, %eax
callq 0x5bec
movq 0x8f65(%rip), %rdi      # 0x10df0
callq 0x4037
movl %eax, %edi
movl $0x1, %esi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x747f
testb $0x4, 0x8e91(%rip)      # 0x10d3c
jne 0x7ebb
leaq 0x235c(%rip), %rdi      # 0xa210
xorl %eax, %eax
callq 0x5bec
movq 0x8e9e(%rip), %rdi      # 0x10d60
callq 0x410d
movq %rax, 0x8e92(%rip)      # 0x10d60
addq $0x2, 0x8e5a(%rip)      # 0x10d30
jmp 0x7f43
testb $0x1, 0x8e5d(%rip)      # 0x10d3c
jne 0x7eef
leaq 0x2367(%rip), %rdi      # 0xa24f
xorl %eax, %eax
callq 0x5bec
movq 0x8e6a(%rip), %rax      # 0x10d60
movq 0x8e9b(%rip), %rcx      # 0x10d98
movq %rcx, 0x8e5c(%rip)      # 0x10d60
movq %rax, 0x8e8d(%rip)      # 0x10d98
jmp 0x7f43
leaq 0x2323(%rip), %rdi      # 0xa237
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x5bec
callq 0x776d
movl $0x1, 0x8e16(%rip)      # 0x10d48
movl $0xfffffff4, 0x8e74(%rip) # imm = 0xFFFFFFF4
incq 0x8ded(%rip)            # 0x10d30
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movb $0x1, 0x8ded(%rip)      # 0x10d40
callq 0x4e24
movl %eax, %eax
addq %rax, 0x8dcf(%rip)      # 0x10d30
leaq 0x8e98(%rip), %rdi      # 0x10e00
movl $0x1, %esi
callq 0x3230