// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x90, %rsp
movl 0x9edb(%rip), %eax      # 0x13e0c
movq %rax, -0x40(%rbp)
subq $0xb, %rax
ja 0xa3ae
movq -0x40(%rbp), %rax
leaq 0x2ebe(%rip), %rcx      # 0xce08
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0x0, -0x8(%rbp)
movq $0x0, -0x10(%rbp)
movl $0xa, %edi
callq 0x3570
movq %rax, -0x18(%rbp)
movq 0x9e41(%rip), %rdi      # 0x13db8
callq 0xabe0
cmpl $0x0, %eax
je 0x9f9b
movq 0x9e30(%rip), %rdi      # 0x13db8
callq 0xac30
movq %rax, 0x9e24(%rip)      # 0x13db8
movl $0x1, -0x8(%rbp)
movl $0x1, -0x4(%rbp)
cmpl $0x5, -0x4(%rbp)
ja 0x9fed
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x3e80
movq %rax, -0x48(%rbp)
movl -0x4(%rbp), %edi
movq 0x9dbd(%rip), %rsi      # 0x13d80
callq 0x35c0
movq -0x48(%rbp), %rdi
movl $0xa, %ecx
xorl %edx, %edx
divl %ecx
movl %edx, %eax
movl %eax, %esi
callq 0x3b50
movq %rax, -0x10(%rbp)
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x9fa2
movl $0x1, -0x4(%rbp)
cmpl $0x5, -0x4(%rbp)
ja 0xa03f
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x3e80
movq %rax, -0x50(%rbp)
movl -0x4(%rbp), %edi
movq 0x9da3(%rip), %rsi      # 0x13db8
callq 0x35c0
movq -0x50(%rbp), %rdi
movl $0xa, %ecx
xorl %edx, %edx
divl %ecx
movl %edx, %eax
movl %eax, %esi
callq 0x3b50
movq %rax, -0x10(%rbp)
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x9ff4
cmpl $0x0, -0x8(%rbp)
je 0xa058
movq -0x10(%rbp), %rax
xorq $0x40000000, %rax       # imm = 0x40000000
movq %rax, 0x9d2a(%rip)      # 0x13d80
jmp 0xa08e
movq 0x9d21(%rip), %rax      # 0x13d80
andq $0x40000000, %rax       # imm = 0x40000000
cmpq $0x0, %rax
je 0xa07b
movq -0x10(%rbp), %rax
xorq $0x40000000, %rax       # imm = 0x40000000
movq %rax, -0x58(%rbp)
jmp 0xa083
movq -0x10(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
movq %rax, 0x9cf2(%rip)      # 0x13d80
jmp 0xa3bc
movq 0x9ce6(%rip), %rax      # 0x13d80
andq $0x3fffffff, %rax       # imm = 0x3FFFFFFF
movq %rax, -0x20(%rbp)
movl $0x30, %edi
callq 0x4a20
movl %eax, -0x24(%rbp)
movl $0x5, -0x28(%rbp)
xorl %eax, %eax
cmpl -0x28(%rbp), %eax
jae 0xa110
movl -0x24(%rbp), %eax
movq %rax, -0x60(%rbp)
movq -0x20(%rbp), %rax
movl $0xa, %ecx
xorl %edx, %edx
divq %rcx
movq -0x60(%rbp), %rax
addq %rdx, %rax
movl %eax, %edi
movl -0x28(%rbp), %esi
movq 0x9cd1(%rip), %rdx      # 0x13db8
callq 0x3730
movq %rax, 0x9cc5(%rip)      # 0x13db8
movl -0x28(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x28(%rbp)
movq -0x20(%rbp), %rax
movl $0xa, %ecx
xorl %edx, %edx
divq %rcx
movq %rax, -0x20(%rbp)
jmp 0xa0b8
movl $0x5, -0x28(%rbp)
xorl %eax, %eax
cmpl -0x28(%rbp), %eax
jae 0xa16f
movl -0x24(%rbp), %eax
movq %rax, -0x68(%rbp)
movq -0x20(%rbp), %rax
movl $0xa, %ecx
xorl %edx, %edx
divq %rcx
movq -0x68(%rbp), %rax
addq %rdx, %rax
movl %eax, %edi
movl -0x28(%rbp), %esi
movq 0x9c3a(%rip), %rdx      # 0x13d80
callq 0x3730
movq %rax, 0x9c2e(%rip)      # 0x13d80
movl -0x28(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x28(%rbp)
movq -0x20(%rbp), %rax
movl $0xa, %ecx
xorl %edx, %edx
divq %rcx
movq %rax, -0x20(%rbp)
jmp 0xa117
movq 0x9c0a(%rip), %rax      # 0x13d80
andq $0x40000000, %rax       # imm = 0x40000000
cmpq $0x0, %rax
je 0xa195
movq 0x9c2f(%rip), %rdi      # 0x13db8
callq 0xac30
movq %rax, 0x9c23(%rip)      # 0x13db8
jmp 0xa3bc
movl $0x1, 0x9bbc(%rip)      # 0x13d60
callq 0x5ae0
movl %eax, %eax
addq 0x9b9e(%rip), %rax      # 0x13d50
movq %rax, 0x9b97(%rip)      # 0x13d50
leaq 0x9c60(%rip), %rdi      # 0x13e20
movl $0x1, %esi
callq 0x31f0
callq 0xac90
movq 0x9baa(%rip), %rax      # 0x13d80
movq %rax, -0x70(%rbp)
callq 0xaba0
movq -0x70(%rbp), %rdi
movq %rax, %rsi
callq 0x4150
movq %rax, 0x9b8e(%rip)      # 0x13d80
jmp 0xa3bc
callq 0xac90
movq 0x9b7d(%rip), %rax      # 0x13d80
movq %rax, -0x78(%rbp)
callq 0xaba0
movq -0x78(%rbp), %rdi
movq %rax, %rsi
callq 0x40d0
movq %rax, 0x9b61(%rip)      # 0x13d80
jmp 0xa3bc
callq 0xac90
movq 0x9b50(%rip), %rax      # 0x13d80
movq %rax, -0x80(%rbp)
callq 0xaba0
movq -0x80(%rbp), %rdi
movq %rax, %rsi
callq 0x4110
movq %rax, 0x9b34(%rip)      # 0x13d80
jmp 0xa3bc
callq 0xab70
movq 0x9b23(%rip), %rdi      # 0x13d80
callq 0x4910
movq %rax, 0x9b17(%rip)      # 0x13d80
movq 0x9ae0(%rip), %rax      # 0x13d50
addq $0x2, %rax
movq %rax, 0x9ad5(%rip)      # 0x13d50
jmp 0xa3bc
callq 0xab70
movq 0x9af4(%rip), %rdi      # 0x13d80
callq 0x4940
movq %rax, 0x9ae8(%rip)      # 0x13d80
movq 0x9ab1(%rip), %rax      # 0x13d50
addq $0x2, %rax
movq %rax, 0x9aa6(%rip)      # 0x13d50
jmp 0xa3bc
callq 0xac90
movq 0x9ac5(%rip), %rax      # 0x13d80
andq $0x3fffffff, %rax       # imm = 0x3FFFFFFF
xorq $-0x1, %rax
movq %rax, -0x30(%rbp)
movq 0x9ab0(%rip), %rax      # 0x13d80
andq $0x40000000, %rax       # imm = 0x40000000
cmpq $0x0, %rax
je 0xa2ef
movq -0x30(%rbp), %rax
xorq $0x40000000, %rax       # imm = 0x40000000
movq %rax, -0x88(%rbp)
jmp 0xa2fa
movq -0x30(%rbp), %rax
movq %rax, -0x88(%rbp)
movq -0x88(%rbp), %rax
movq %rax, 0x9a78(%rip)      # 0x13d80
jmp 0xa3bc
callq 0x8f10
xorl %eax, %eax
cmpl 0x9a4e(%rip), %eax      # 0x13d68
jne 0xa337
callq 0x9b10
movl $0x1, 0x9a3d(%rip)      # 0x13d68
movl $0xfffffff4, 0x9a9b(%rip) # imm = 0xFFFFFFF4
jmp 0xa350
callq 0xacc0
movl $0x0, 0x9a22(%rip)      # 0x13d68
movl $0x1, 0x9b98(%rip)      # 0x13ee8
movq 0x99f9(%rip), %rax      # 0x13d50
addq $0x1, %rax
movq %rax, 0x99ee(%rip)      # 0x13d50
jmp 0xa3bc
callq 0xac90
movq 0x9a10(%rip), %rax      # 0x13d80
movq %rax, -0x38(%rbp)
movq 0x9a3d(%rip), %rax      # 0x13db8
movq %rax, 0x99fe(%rip)      # 0x13d80
movq -0x38(%rbp), %rax
movq %rax, 0x9a2b(%rip)      # 0x13db8
jmp 0xa3bc
callq 0xadd0
movq 0x9a75(%rip), %rdi      # 0x13e10
callq 0x47c0
movl %eax, %edi
movl $0x1, %esi
callq 0x9910
jmp 0xa3bc
leaq 0x30af(%rip), %rdi      # 0xd464
movb $0x0, %al
callq 0x74b0
addq $0x90, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)