// File: /workspace/github_c_makefile_star2_O1/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 %ecx, %r9d
movl %r8d, %r11d
shrl $0x5, %r11d
leal (%r11,%r9), %r10d
movl %r8d, %eax
andl $0x1f, %eax
je 0x2b62
testl %r9d, %r9d
jle 0x2bea
movslq %r10d, %r14
movl %r11d, %r15d
decl %r9d
xorl %ebp, %ebp
cmpl %esi, %r10d
jge 0x2c55
movslq %r9d, %r9
movl (%rdx,%r9,4), %ebx
movl %r8d, %ecx
shldl %cl, %ebx, %ebp
movl %ebp, (%rdi,%r14,4)
decq %r14
decl %r9d
movl %ebx, %ebp
cmpq %r15, %r14
jg 0x2b36
jmp 0x2bec
testl %r9d, %r9d
jle 0x2b9a
movslq %r10d, %rcx
movl %r11d, %eax
leal (,%r11,4), %r9d
subq %r9, %rdx
addq $-0x4, %rdx
cmpl %esi, %r10d
jg 0x2c74
movl (%rdx,%rcx,4), %r9d
movl %r9d, -0x4(%rdi,%rcx,4)
leaq -0x1(%rcx), %r9
movq %r9, %rcx
cmpq %rax, %r9
jg 0x2b7c
cmpl $0x20, %r8d
jb 0x2bbe
leaq 0x1(%r11), %rax
cmpl %esi, %r11d
jg 0x2c93
movl $0x0, -0x8(%rdi,%rax,4)
decq %rax
cmpq $0x1, %rax
jg 0x2ba4
cmpl %esi, %r10d
jg 0x2cd1
testl %r10d, %r10d
jle 0x2be5
movl %r10d, %eax
cmpl $0x0, -0x4(%rdi,%rax,4)
jne 0x2be5
leal -0x1(%r10), %eax
cmpl $0x1, %r10d
movl %eax, %r10d
jg 0x2bcc
jmp 0x2c29
movl %r10d, %eax
jmp 0x2c2b
xorl %ebx, %ebx
leaq 0x1(%r11), %rdx
cmpl %esi, %r11d
jge 0x2c36
movl %eax, %ecx
shll %cl, %ebx
movl %ebx, -0x4(%rdi,%rdx,4)
xorl %ebx, %ebx
decq %rdx
jg 0x2bf0
cmpl %esi, %r10d
jge 0x2cb2
leal 0x1(%r10), %eax
testl %r10d, %r10d
js 0x2c2b
movl %eax, %ecx
cmpl $0x0, -0x4(%rdi,%rcx,4)
jne 0x2c2b
leal -0x1(%rax), %ecx
cmpl $0x1, %eax
movl %ecx, %eax
jg 0x2c16
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2834(%rip), %rdi      # 0x5471
leaq 0x25cf(%rip), %rsi      # 0x5213
leaq 0x27d0(%rip), %rcx      # 0x541b
movl $0x29e, %edx            # imm = 0x29E
callq 0x1060
leaq 0x2815(%rip), %rdi      # 0x5471
leaq 0x25b0(%rip), %rsi      # 0x5213
leaq 0x27b1(%rip), %rcx      # 0x541b
movl $0x297, %edx            # imm = 0x297
callq 0x1060
leaq 0x27f6(%rip), %rdi      # 0x5471
leaq 0x2591(%rip), %rsi      # 0x5213
leaq 0x2792(%rip), %rcx      # 0x541b
movl $0x2ab, %edx            # imm = 0x2AB
callq 0x1060
leaq 0x27d7(%rip), %rdi      # 0x5471
leaq 0x2572(%rip), %rsi      # 0x5213
leaq 0x2773(%rip), %rcx      # 0x541b
movl $0x2b1, %edx            # imm = 0x2B1
callq 0x1060
leaq 0x27c6(%rip), %rdi      # 0x547f
leaq 0x2553(%rip), %rsi      # 0x5213
leaq 0x2754(%rip), %rcx      # 0x541b
movl $0x2a4, %edx            # imm = 0x2A4
callq 0x1060
leaq 0x27a7(%rip), %rdi      # 0x547f
leaq 0x2534(%rip), %rsi      # 0x5213
leaq 0x2735(%rip), %rcx      # 0x541b
movl $0x2b6, %edx            # imm = 0x2B6
callq 0x1060