// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq 0x9a31(%rip), %rax      # 0x13e10
andq $0x3fffffff, %rax       # imm = 0x3FFFFFFF
movq %rax, -0x10(%rbp)
movq 0x9a20(%rip), %rax      # 0x13e10
andq $0x40000000, %rax       # imm = 0x40000000
cmpq $0x0, %rax
je 0xa411
cmpq $0x0, -0x10(%rbp)
je 0xa411
leaq 0x3093(%rip), %rdi      # 0xd49d
movb $0x0, %al
callq 0x74b0
movl 0x99f5(%rip), %eax      # 0x13e0c
movq %rax, -0x20(%rbp)
subq $0x7, %rax
ja 0xa5ac
movq -0x20(%rbp), %rax
leaq 0x2a08(%rip), %rcx      # 0xce38
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x9940(%rip), %rsi      # 0x13d80
movq -0x10(%rbp), %rdx
xorl %eax, %eax
movl %eax, %edi
leaq -0x8(%rbp), %rcx
leaq 0x992d(%rip), %r8       # 0x13d80
callq 0x4270
jmp 0xa5ba
movq 0x991c(%rip), %rdi      # 0x13d80
movq -0x10(%rbp), %rdx
xorl %eax, %eax
movl %eax, %esi
leaq 0x990d(%rip), %rcx      # 0x13d80
leaq -0x8(%rbp), %r8
callq 0x4190
jmp 0xa5ba
movq 0x98f8(%rip), %rdi      # 0x13d80
movq 0x9929(%rip), %rsi      # 0x13db8
movq -0x10(%rbp), %rdx
leaq 0x98e6(%rip), %rcx      # 0x13d80
movq %rcx, %r8
addq $0x38, %r8
callq 0x4270
jmp 0xa5ba
movq 0x98ce(%rip), %rdi      # 0x13d80
movq 0x98ff(%rip), %rsi      # 0x13db8
movq -0x10(%rbp), %rdx
leaq 0x98bc(%rip), %rcx      # 0x13d80
movq %rcx, %r8
addq $0x38, %r8
callq 0x4190
jmp 0xa5ba
movq 0x98a4(%rip), %rdi      # 0x13d80
movq 0x98d5(%rip), %rsi      # 0x13db8
movq -0x10(%rbp), %rax
movl $0xa, %ecx
xorl %edx, %edx
divq %rcx
leaq 0x9888(%rip), %rcx      # 0x13d80
movq %rcx, %r8
addq $0x38, %r8
callq 0x4510
jmp 0xa5ba
movq -0x10(%rbp), %rax
movl $0xa, %ecx
xorl %edx, %edx
divq %rcx
movl $0xa, %eax
subq %rdx, %rax
movl $0xa, %ecx
xorl %edx, %edx
divq %rcx
movl %edx, %eax
movl %eax, -0x14(%rbp)
movq 0x984b(%rip), %rdi      # 0x13d80
movq 0x987c(%rip), %rsi      # 0x13db8
movl -0x14(%rbp), %edx
leaq 0x983a(%rip), %rcx      # 0x13d80
movq %rcx, %r8
addq $0x38, %r8
callq 0x4510
jmp 0xa5ba
callq 0xac90
movq 0x9820(%rip), %rdi      # 0x13d80
movq 0x9851(%rip), %rsi      # 0x13db8
movq -0x10(%rbp), %rdx
leaq 0x980e(%rip), %rcx      # 0x13d80
movq %rcx, %r8
addq $0x38, %r8
callq 0x4430
jmp 0xa5ba
callq 0xac90
movq 0x97f4(%rip), %rdi      # 0x13d80
movq 0x9825(%rip), %rsi      # 0x13db8
movq -0x10(%rbp), %rdx
leaq 0x97e2(%rip), %rcx      # 0x13d80
movq %rcx, %r8
addq $0x38, %r8
callq 0x4350
jmp 0xa5ba
leaq 0x2eb1(%rip), %rdi      # 0xd464
movb $0x0, %al
callq 0x74b0
addq $0x20, %rsp
popq %rbp
retq