// File: /workspace/github_c_makefile_star2_O2/pahihu[P]mixal/run.c
// Function: do_shift
static void do_shift(void)
{
    Cell ignore;
    unsigned long count = magnitude(M);

    if (is_negative(M) && count != 0)
        error("Negative shift count");
    switch (F) {
    case 0: /* SLA */
        shift_left(zero, r[A], count, &ignore, &r[A]);
        break;
    case 1: /* SRA */
        shift_right(r[A], zero, count, &r[A], &ignore);
        break;
    case 2: /* SLAX */
        shift_left(r[A], r[X], count, &r[A], &r[X]);
        break;
    case 3: /* SRAX */
        shift_right(r[A], r[X], count, &r[A], &r[X]);
        break;
    case 4: /* SLC  */
        shift_left_circular(r[A], r[X], (unsigned)(count % 10), &r[A], &r[X]);
        break;
    case 5: { /* SRC */
        unsigned c = (10 - count % 10) % 10;    /* -count modulo 10 */
        shift_left_circular(r[A], r[X], c, &r[A], &r[X]);
        break;
    }
    case 6: { /* SLB */
        check_binary();
        shift_left_binary(r[A], r[X], count, &r[A], &r[X]);
        break;
    }
    case 7: { /* SRB */
        check_binary();
        shift_right_binary(r[A], r[X], count, &r[A], &r[X]);
        break;
    }
    default: error("Unknown extended opcode");
    }
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq 0x9485(%rip), %rbx      # 0x10df0
btl $0x1e, %ebx
setae %al
andq $0x3fffffff, %rbx       # imm = 0x3FFFFFFF
sete %cl
orb %al, %cl
jne 0x798e
leaq 0x28e9(%rip), %rdi      # 0xa270
xorl %eax, %eax
callq 0x5700
movl 0x9458(%rip), %eax      # 0x10dec
cmpq $0x7, %rax
ja 0x7b03
leaq 0x235b(%rip), %rcx      # 0x9d00
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x93ab(%rip), %rsi      # 0x10d60
leaq 0x93a4(%rip), %r8       # 0x10d60
leaq 0x8(%rsp), %rcx
xorl %edi, %edi
movq %rbx, %rdx
callq 0x3ba5
jmp 0x7a99
movq 0x9389(%rip), %rdi      # 0x10d60
leaq 0x9382(%rip), %rcx      # 0x10d60
movq 0x93b3(%rip), %rsi      # 0x10d98
leaq 0x93ac(%rip), %r8       # 0x10d98
pushq $0xa
popq %r9
movl %ebx, %eax
xorl %edx, %edx
divl %r9d
jmp 0x7acb
movq 0x935d(%rip), %rdi      # 0x10d60
leaq 0x9356(%rip), %rcx      # 0x10d60
movq 0x9387(%rip), %rsi      # 0x10d98
leaq 0x9380(%rip), %r8       # 0x10d98
movq %rbx, %rdx
addq $0x10, %rsp
popq %rbx
jmp 0x3ba5
movq 0x9334(%rip), %rdi      # 0x10d60
leaq 0x932d(%rip), %rcx      # 0x10d60
movq 0x935e(%rip), %rsi      # 0x10d98
leaq 0x9357(%rip), %r8       # 0x10d98
movq %rbx, %rdx
addq $0x10, %rsp
popq %rbx
jmp 0x3b3c
callq 0x7f60
movq 0x9306(%rip), %rdi      # 0x10d60
leaq 0x92ff(%rip), %rcx      # 0x10d60
movq 0x9330(%rip), %rsi      # 0x10d98
leaq 0x9329(%rip), %r8       # 0x10d98
movq %rbx, %rdx
addq $0x10, %rsp
popq %rbx
jmp 0x3c11
movq 0x92dd(%rip), %rdi      # 0x10d60
leaq 0x92d6(%rip), %rcx      # 0x10d60
leaq 0x8(%rsp), %r8
xorl %esi, %esi
movq %rbx, %rdx
callq 0x3b3c
addq $0x10, %rsp
popq %rbx
retq
pushq $0xa
popq %rcx
movl %ebx, %eax
xorl %edx, %edx
divl %ecx
subl %edx, %ecx
testl %edx, %edx
cmovnel %ecx, %edx
movq 0x92aa(%rip), %rdi      # 0x10d60
leaq 0x92a3(%rip), %rcx      # 0x10d60
movq 0x92d4(%rip), %rsi      # 0x10d98
leaq 0x92cd(%rip), %r8       # 0x10d98
addq $0x10, %rsp
popq %rbx
jmp 0x3cde
callq 0x7f60
movq 0x927f(%rip), %rdi      # 0x10d60
leaq 0x9278(%rip), %rcx      # 0x10d60
movq 0x92a9(%rip), %rsi      # 0x10d98
leaq 0x92a2(%rip), %r8       # 0x10d98
movq %rbx, %rdx
addq $0x10, %rsp
popq %rbx
jmp 0x3c76
leaq 0x272d(%rip), %rdi      # 0xa237
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
jmp 0x5700