// File: /workspace/github_c_makefile_star2_O1/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 0x8e9e(%rip), %rbx      # 0x10df0
btl $0x1e, %ebx
setae %al
andq $0x3fffffff, %rbx       # imm = 0x3FFFFFFF
sete %cl
orb %al, %cl
jne 0x7f75
leaq 0x2302(%rip), %rdi      # 0xa270
xorl %eax, %eax
callq 0x5bbc
movl 0x8e71(%rip), %eax      # 0x10dec
cmpq $0x7, %rax
ja 0x813a
leaq 0x1d74(%rip), %rcx      # 0x9d00
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x8dc4(%rip), %rsi      # 0x10d60
leaq 0x8dbd(%rip), %r8       # 0x10d60
leaq 0x8(%rsp), %rcx
xorl %edi, %edi
movq %rbx, %rdx
callq 0x3dec
jmp 0x80a0
movq 0x8da2(%rip), %rdi      # 0x10d60
leaq 0x8d9b(%rip), %rcx      # 0x10d60
movq 0x8dcc(%rip), %rsi      # 0x10d98
leaq 0x8dc5(%rip), %r8       # 0x10d98
movabsq $0x199999999999999a, %rdx # imm = 0x199999999999999A
movq %rbx, %rax
mulq %rdx
addl %edx, %edx
leal (%rdx,%rdx,4), %eax
subl %eax, %ebx
movl %ebx, %edx
jmp 0x80f0
movq 0x8d68(%rip), %rdi      # 0x10d60
leaq 0x8d61(%rip), %rcx      # 0x10d60
movq 0x8d92(%rip), %rsi      # 0x10d98
leaq 0x8d8b(%rip), %r8       # 0x10d98
movq %rbx, %rdx
addq $0x10, %rsp
popq %rbx
jmp 0x3dec
movq 0x8d3f(%rip), %rdi      # 0x10d60
leaq 0x8d38(%rip), %rcx      # 0x10d60
movq 0x8d69(%rip), %rsi      # 0x10d98
leaq 0x8d62(%rip), %r8       # 0x10d98
movq %rbx, %rdx
addq $0x10, %rsp
popq %rbx
jmp 0x3d7f
testb $0x1, 0x8cf2(%rip)      # 0x10d3c
jne 0x805a
leaq 0x21fc(%rip), %rdi      # 0xa24f
xorl %eax, %eax
callq 0x5bbc
movq 0x8cff(%rip), %rdi      # 0x10d60
leaq 0x8cf8(%rip), %rcx      # 0x10d60
movq 0x8d29(%rip), %rsi      # 0x10d98
leaq 0x8d22(%rip), %r8       # 0x10d98
movq %rbx, %rdx
addq $0x10, %rsp
popq %rbx
jmp 0x3e5c
movq 0x8cd6(%rip), %rdi      # 0x10d60
leaq 0x8ccf(%rip), %rcx      # 0x10d60
leaq 0x8(%rsp), %r8
xorl %esi, %esi
movq %rbx, %rdx
callq 0x3d7f
addq $0x10, %rsp
popq %rbx
retq
movabsq $0x199999999999999a, %rcx # imm = 0x199999999999999A
movq %rbx, %rax
mulq %rcx
addl %edx, %edx
leaq (%rdx,%rdx,4), %r9
subq %rbx, %r9
addq $0xa, %r9
movq %r9, %rax
mulq %rcx
addl %edx, %edx
leal (%rdx,%rdx,4), %eax
subl %eax, %r9d
movq 0x8c88(%rip), %rdi      # 0x10d60
leaq 0x8c81(%rip), %rcx      # 0x10d60
movq 0x8cb2(%rip), %rsi      # 0x10d98
leaq 0x8cab(%rip), %r8       # 0x10d98
movl %r9d, %edx
addq $0x10, %rsp
popq %rbx
jmp 0x3f29
testb $0x1, 0x8c3b(%rip)      # 0x10d3c
jne 0x8111
leaq 0x2145(%rip), %rdi      # 0xa24f
xorl %eax, %eax
callq 0x5bbc
movq 0x8c48(%rip), %rdi      # 0x10d60
leaq 0x8c41(%rip), %rcx      # 0x10d60
movq 0x8c72(%rip), %rsi      # 0x10d98
leaq 0x8c6b(%rip), %r8       # 0x10d98
movq %rbx, %rdx
addq $0x10, %rsp
popq %rbx
jmp 0x3ec1
leaq 0x20f6(%rip), %rdi      # 0xa237
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
jmp 0x5bbc