// File: /workspace/github_c_makefile_star2_O3/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 0x8e72(%rip), %rbx      # 0x10df0
btl $0x1e, %ebx
setae %al
andq $0x3fffffff, %rbx       # imm = 0x3FFFFFFF
sete %cl
orb %al, %cl
jne 0x7fa1
leaq 0x22d6(%rip), %rdi      # 0xa270
xorl %eax, %eax
callq 0x5bec
movl 0x8e45(%rip), %eax      # 0x10dec
cmpq $0x7, %rax
ja 0x8151
leaq 0x1d48(%rip), %rcx      # 0x9d00
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x8d98(%rip), %rsi      # 0x10d60
leaq 0x8d91(%rip), %r8       # 0x10d60
leaq 0x8(%rsp), %rcx
xorl %edi, %edi
movq %rbx, %rdx
callq 0x3dc5
jmp 0x80c7
movq 0x8d76(%rip), %rdi      # 0x10d60
leaq 0x8d6f(%rip), %rcx      # 0x10d60
movq 0x8da0(%rip), %rsi      # 0x10d98
leaq 0x8d99(%rip), %r8       # 0x10d98
imulq $0x1999999a, %rbx, %rax # imm = 0x1999999A
shrq $0x20, %rax
addl %eax, %eax
leal (%rax,%rax,4), %eax
subl %eax, %ebx
movl %ebx, %edx
jmp 0x8107
movq 0x8d41(%rip), %rdi      # 0x10d60
leaq 0x8d3a(%rip), %rcx      # 0x10d60
movq 0x8d6b(%rip), %rsi      # 0x10d98
leaq 0x8d64(%rip), %r8       # 0x10d98
movq %rbx, %rdx
addq $0x10, %rsp
popq %rbx
jmp 0x3dc5
movq 0x8d18(%rip), %rdi      # 0x10d60
leaq 0x8d11(%rip), %rcx      # 0x10d60
movq 0x8d42(%rip), %rsi      # 0x10d98
leaq 0x8d3b(%rip), %r8       # 0x10d98
movq %rbx, %rdx
addq $0x10, %rsp
popq %rbx
jmp 0x3d58
testb $0x1, 0x8ccb(%rip)      # 0x10d3c
jne 0x8081
leaq 0x21d5(%rip), %rdi      # 0xa24f
xorl %eax, %eax
callq 0x5bec
movq 0x8cd8(%rip), %rdi      # 0x10d60
leaq 0x8cd1(%rip), %rcx      # 0x10d60
movq 0x8d02(%rip), %rsi      # 0x10d98
leaq 0x8cfb(%rip), %r8       # 0x10d98
movq %rbx, %rdx
addq $0x10, %rsp
popq %rbx
jmp 0x3e35
movq 0x8caf(%rip), %rdi      # 0x10d60
leaq 0x8ca8(%rip), %rcx      # 0x10d60
leaq 0x8(%rsp), %r8
xorl %esi, %esi
movq %rbx, %rdx
callq 0x3d58
addq $0x10, %rsp
popq %rbx
retq
imulq $0x1999999a, %rbx, %rax # imm = 0x1999999A
shrq $0x20, %rax
addl %eax, %eax
leal (%rax,%rax,4), %eax
subl %eax, %ebx
movl $0xa, %edx
subl %ebx, %edx
testl %ebx, %ebx
cmovel %ebx, %edx
movq 0x8c6e(%rip), %rdi      # 0x10d60
leaq 0x8c67(%rip), %rcx      # 0x10d60
movq 0x8c98(%rip), %rsi      # 0x10d98
leaq 0x8c91(%rip), %r8       # 0x10d98
addq $0x10, %rsp
popq %rbx
jmp 0x3f02
testb $0x1, 0x8c24(%rip)      # 0x10d3c
jne 0x8128
leaq 0x212e(%rip), %rdi      # 0xa24f
xorl %eax, %eax
callq 0x5bec
movq 0x8c31(%rip), %rdi      # 0x10d60
leaq 0x8c2a(%rip), %rcx      # 0x10d60
movq 0x8c5b(%rip), %rsi      # 0x10d98
leaq 0x8c54(%rip), %r8       # 0x10d98
movq %rbx, %rdx
addq $0x10, %rsp
popq %rbx
jmp 0x3e9a
leaq 0x20df(%rip), %rdi      # 0xa237
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
jmp 0x5bec