// File: /workspace/github_c_makefile_star2_O2/983[P]bigint/bigint.c
// Function: bigint_raw_shift_left
int bigint_raw_shift_left(
    bigint_word *dst, int n_dst,
    const bigint_word *src, int n_src,
    unsigned shift
){
    int i;
    int word_shift = shift / BIGINT_WORD_BITS;
    int bits_shift = shift % BIGINT_WORD_BITS;

    if (bits_shift){
        bigint_word lo, hi = 0;

        for (i = n_src + word_shift; i > word_shift; i--){
            lo = src[i - word_shift - 1];
            BIGINT_ASSERT(i, >=, 0);
            BIGINT_ASSERT(i, <, n_dst);
            dst[i] = (hi << bits_shift) | (lo >> (BIGINT_WORD_BITS - bits_shift));
            hi = lo;
        }

        for (i = word_shift; i >= 0; i--){
            BIGINT_ASSERT(i, >=, 0);
            BIGINT_ASSERT(i, <, n_dst);
            dst[i] = hi << bits_shift;
            hi = 0;
        }

        i = n_src + word_shift + 1;
        BIGINT_ASSERT(i, <=, n_dst);
        return bigint_raw_truncate(dst, i);
    }else{
        /* this case is not only separate because of performance */
        /* but (lo >> (BIGINT_WORD_BITS - 0)) is also undefined behaviour */
        for (i = n_src + word_shift - 1; i >= word_shift; i--){
            BIGINT_ASSERT(i, >=, 0);
            BIGINT_ASSERT(i, <, n_dst);
            dst[i] = src[i - word_shift];
        }

        for (i = word_shift - 1; i >= 0; i--){
            BIGINT_ASSERT(i, >=, 0);
            BIGINT_ASSERT(i, <, n_dst);
            dst[i] = 0;
        }

        i = n_src + word_shift;
        BIGINT_ASSERT(i, <=, n_dst);
        return bigint_raw_truncate(dst, i);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %r8d, %r9d
movl %ecx, %r10d
movl %esi, %eax
movl %r8d, %r11d
shrl $0x5, %r11d
leal (%r11,%r10), %esi
andl $0x1f, %r8d
je 0x2897
movslq %esi, %r14
movl %r11d, %r15d
decl %r10d
xorl %ebx, %ebx
cmpq %r15, %r14
jle 0x286b
cmpl %eax, %esi
jge 0x28f0
movslq %r10d, %r10
movl (%rdx,%r10,4), %ebp
movl %r9d, %ecx
shldl %cl, %ebp, %ebx
movl %ebx, (%rdi,%r14,4)
decq %r14
decl %r10d
movl %ebp, %ebx
jmp 0x2843
movl %r11d, %edx
testl %edx, %edx
js 0x288b
cmpl %eax, %r11d
jge 0x290f
movl %r8d, %ecx
shll %cl, %ebx
movl %edx, %ecx
movl %ebx, (%rdi,%rcx,4)
decl %edx
xorl %ebx, %ebx
jmp 0x286e
cmpl %eax, %esi
jge 0x296c
incl %esi
jmp 0x28e1
movslq %esi, %r8
movl %r11d, %ecx
leal (,%r11,4), %r9d
subq %r9, %rdx
addq $-0x4, %rdx
cmpq %rcx, %r8
jle 0x28d4
cmpl %eax, %esi
jg 0x292e
movl (%rdx,%r8,4), %r9d
movl %r9d, -0x4(%rdi,%r8,4)
decq %r8
jmp 0x28ac
cmpl %eax, %r11d
jg 0x294d
andl $0x0, -0x4(%rdi,%rcx,4)
decq %rcx
testq %rcx, %rcx
jg 0x28c3
cmpl %eax, %esi
jg 0x298b
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x1c0c
leaq 0x1b6a(%rip), %rdi      # 0x4461
leaq 0x1905(%rip), %rsi      # 0x4203
leaq 0x1b06(%rip), %rcx      # 0x440b
movl $0x297, %edx            # imm = 0x297
callq 0x1060
leaq 0x1b4b(%rip), %rdi      # 0x4461
leaq 0x18e6(%rip), %rsi      # 0x4203
leaq 0x1ae7(%rip), %rcx      # 0x440b
movl $0x29e, %edx            # imm = 0x29E
callq 0x1060
leaq 0x1b2c(%rip), %rdi      # 0x4461
leaq 0x18c7(%rip), %rsi      # 0x4203
leaq 0x1ac8(%rip), %rcx      # 0x440b
movl $0x2ab, %edx            # imm = 0x2AB
callq 0x1060
leaq 0x1b0d(%rip), %rdi      # 0x4461
leaq 0x18a8(%rip), %rsi      # 0x4203
leaq 0x1aa9(%rip), %rcx      # 0x440b
movl $0x2b1, %edx            # imm = 0x2B1
callq 0x1060
leaq 0x1afc(%rip), %rdi      # 0x446f
leaq 0x1889(%rip), %rsi      # 0x4203
leaq 0x1a8a(%rip), %rcx      # 0x440b
movl $0x2a4, %edx            # imm = 0x2A4
callq 0x1060
leaq 0x1add(%rip), %rdi      # 0x446f
leaq 0x186a(%rip), %rsi      # 0x4203
leaq 0x1a6b(%rip), %rcx      # 0x440b
movl $0x2b6, %edx            # imm = 0x2B6
callq 0x1060