// File: /workspace/github_c_makefile_star2_O2/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 0x9843(%rip), %eax      # 0x10dec
cmpq $0xb, %rax
ja 0x7882
leaq 0x2716(%rip), %rcx      # 0x9cd0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
pushq $0xa
popq %rdi
callq 0x3554
movq %rax, %rbx
movq 0x97c3(%rip), %rsi      # 0x10d98
pushq $0x5
popq %rdi
callq 0x357c
movl %eax, %ebp
addl $-0x14, %ebp
cmpl $-0xa, %ebp
jb 0x75fa
movq 0x97aa(%rip), %rdi      # 0x10d98
callq 0x7f33
movq %rax, 0x979e(%rip)      # 0x10d98
pushq $0x1
popq %r14
xorl %eax, %eax
pushq $0xa
popq %r12
cmpl $0x6, %r14d
je 0x7687
movq %rbx, %rdi
movq %rax, %rsi
callq 0x39f3
movq %rax, %r15
movq 0x9741(%rip), %rsi      # 0x10d60
movl %r14d, %edi
callq 0x357c
xorl %edx, %edx
divl %r12d
movq %r15, %rdi
movq %rdx, %rsi
callq 0x38b0
incl %r14d
jmp 0x7604
movq 0x971d(%rip), %r14      # 0x10d60
andl $0x3fffffff, %r14d      # imm = 0x3FFFFFFF
pushq $0x30
popq %rdi
callq 0x3f47
movl %eax, %ebx
pushq $0x5
popq %rsi
pushq $0xa
popq %r15
movl %esi, %ebp
subl $0x1, %ebp
jb 0x76c3
movq %r14, %rax
xorl %edx, %edx
divq %r15
leal (%rdx,%rbx), %edi
movq 0x9724(%rip), %rdx      # 0x10d98
movq %rax, %r14
callq 0x363f
movq %rax, 0x9715(%rip)      # 0x10d98
movl %ebp, %esi
jmp 0x765d
pushq $0x1
popq %r14
cmpl $0x6, %r14d
je 0x76f2
movq %rbx, %rdi
movq %rax, %rsi
callq 0x39f3
movq %rax, %r15
movq 0x96f2(%rip), %rsi      # 0x10d98
movl %r14d, %edi
callq 0x357c
xorl %edx, %edx
divl %r12d
movq %r15, %rdi
movq %rdx, %rsi
callq 0x38b0
incl %r14d
jmp 0x768b
pushq $0x5
popq %rsi
movl %esi, %ebp
subl $0x1, %ebp
jb 0x7717
movq %r14, %rax
xorl %edx, %edx
divq %r15
leal (%rdx,%rbx), %edi
movq 0x9681(%rip), %rdx      # 0x10d60
movq %rax, %r14
callq 0x363f
movq %rax, 0x9672(%rip)      # 0x10d60
movl %ebp, %esi
jmp 0x76c8
movl $0x40000000, %ecx       # imm = 0x40000000
movq 0x9662(%rip), %rdx      # 0x10d60
andq %rcx, %rdx
cmpl $-0xa, %ebp
cmovaeq %rcx, %rdx
xorq %rax, %rdx
movq %rdx, 0x964e(%rip)      # 0x10d60
jmp 0x7932
testb $0x40, 0x9645(%rip)     # 0x10d63
je 0x7932
movq 0x966d(%rip), %rdi      # 0x10d98
callq 0x7f33
jmp 0x7876
callq 0x68f1
cmpl $0x0, 0x9607(%rip)      # 0x10d48
je 0x7912
movq 0x9672(%rip), %rax      # 0x10dc0
movq 0x48(%rax), %rcx
movq %rcx, 0x9607(%rip)      # 0x10d60
movq 0x40(%rax), %rcx
movq %rcx, 0x9634(%rip)      # 0x10d98
leaq 0x95fd(%rip), %rcx      # 0x10d68
pushq $0x7
popq %rdx
cmpq $0x1, %rdx
je 0x7898
movq (%rax,%rdx,8), %rsi
movq %rsi, (%rcx)
addq $0x8, %rcx
decq %rdx
jmp 0x776e
callq 0x7f60
movl 0x95cd(%rip), %eax      # 0x10d60
notl %eax
orq $-0x80000000, %rax      # imm = 0x80000000
jmp 0x7808
callq 0x7f60
movq 0x95b7(%rip), %rbx      # 0x10d60
callq 0x7f0e
movq %rbx, %rdi
movq %rax, %rsi
callq 0x3b2d
jmp 0x7808
callq 0x7f60
movq 0x9599(%rip), %rbx      # 0x10d60
callq 0x7f0e
movq %rbx, %rdi
movq %rax, %rsi
callq 0x3b07
jmp 0x7808
callq 0x7ef6
movq 0x957b(%rip), %rdi      # 0x10d60
callq 0x3eba
jmp 0x7848
callq 0x7f60
movq 0x9568(%rip), %rbx      # 0x10d60
callq 0x7f0e
movq %rbx, %rdi
movq %rax, %rsi
callq 0x3b1a
movq %rax, 0x9551(%rip)      # 0x10d60
jmp 0x7932
callq 0x7f78
movq 0x95d0(%rip), %rdi      # 0x10df0
callq 0x3e15
pushq $0x1
popq %rsi
movl %eax, %edi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x7022
callq 0x7ef6
movq 0x951d(%rip), %rdi      # 0x10d60
callq 0x3ecd
movq %rax, 0x9511(%rip)      # 0x10d60
addq $0x2, 0x94d9(%rip)      # 0x10d30
jmp 0x7932
callq 0x7f60
movq 0x94f8(%rip), %rax      # 0x10d60
movq 0x9529(%rip), %rcx      # 0x10d98
movq %rcx, 0x94ea(%rip)      # 0x10d60
movq %rax, 0x951b(%rip)      # 0x10d98
jmp 0x7932
leaq 0x29ae(%rip), %rdi      # 0xa237
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x5700
movq 0x8(%rax), %rbx
pushq $0x4
popq %rdi
pushq $0x5
popq %rsi
callq 0x3610
movl %eax, %edi
movq %rbx, %rsi
callq 0x35b3
movq %rax, 0x94e8(%rip)      # 0x10da0
pushq $0x1
popq %rdi
pushq $0x2
popq %rsi
callq 0x3610
movl %eax, %edi
movq %rbx, %rsi
callq 0x35b3
movq %rax, %rdi
callq 0x3e15
movl %eax, 0x94d5(%rip)      # 0x10db0
pushq $0x3
popq %rdi
movq %rbx, %rsi
callq 0x357c
xorl %ecx, %ecx
cmpl $0x8, %eax
setae %cl
leaq 0x824b(%rip), %rdx      # 0xfb40
movl %ecx, (%rdx)
andl $0x7, %eax
decl %eax
movl %eax, 0x9442(%rip)      # 0x10d44
andl $0x0, 0x943f(%rip)      # 0x10d48
movb $0x1, 0x95b8(%rip)      # 0x10ec8
jmp 0x792b
callq 0x72bf
movl $0x1, 0x9427(%rip)      # 0x10d48
movl $0xfffffff4, 0x9485(%rip) # imm = 0xFFFFFFF4
incq 0x93fe(%rip)            # 0x10d30
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movb $0x1, 0x93fe(%rip)      # 0x10d40
callq 0x4ae5
movl %eax, %eax
addq %rax, 0x93e0(%rip)      # 0x10d30
leaq 0x94a9(%rip), %rdi      # 0x10e00
pushq $0x1
popq %rsi
callq 0x3230