// File: /workspace/github_c_makefile_star2_O3/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 0x2b77
testl %r9d, %r9d
jle 0x2bff
movslq %r10d, %r14
movl %r11d, %r15d
decl %r9d
xorl %ebp, %ebp
cmpl %esi, %r10d
jge 0x2c6a
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 0x2b4b
jmp 0x2c01
testl %r9d, %r9d
jle 0x2baf
movslq %r10d, %rcx
movl %r11d, %eax
leal (,%r11,4), %r9d
subq %r9, %rdx
addq $-0x4, %rdx
cmpl %esi, %r10d
jg 0x2c89
movl (%rdx,%rcx,4), %r9d
movl %r9d, -0x4(%rdi,%rcx,4)
leaq -0x1(%rcx), %r9
movq %r9, %rcx
cmpq %rax, %r9
jg 0x2b91
cmpl $0x20, %r8d
jb 0x2bd3
leaq 0x1(%r11), %rax
cmpl %esi, %r11d
jg 0x2ca8
movl $0x0, -0x8(%rdi,%rax,4)
decq %rax
cmpq $0x1, %rax
jg 0x2bb9
cmpl %esi, %r10d
jg 0x2ce6
testl %r10d, %r10d
jle 0x2bfa
movl %r10d, %eax
cmpl $0x0, -0x4(%rdi,%rax,4)
jne 0x2bfa
leal -0x1(%r10), %eax
cmpl $0x1, %r10d
movl %eax, %r10d
jg 0x2be1
jmp 0x2c3e
movl %r10d, %eax
jmp 0x2c40
xorl %ebx, %ebx
leaq 0x1(%r11), %rdx
cmpl %esi, %r11d
jge 0x2c4b
movl %eax, %ecx
shll %cl, %ebx
movl %ebx, -0x4(%rdi,%rdx,4)
xorl %ebx, %ebx
decq %rdx
jg 0x2c05
cmpl %esi, %r10d
jge 0x2cc7
leal 0x1(%r10), %eax
testl %r10d, %r10d
js 0x2c40
movl %eax, %ecx
cmpl $0x0, -0x4(%rdi,%rcx,4)
jne 0x2c40
leal -0x1(%rax), %ecx
cmpl $0x1, %eax
movl %ecx, %eax
jg 0x2c2b
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x281f(%rip), %rdi      # 0x5471
leaq 0x25ba(%rip), %rsi      # 0x5213
leaq 0x27bb(%rip), %rcx      # 0x541b
movl $0x29e, %edx            # imm = 0x29E
callq 0x1060
leaq 0x2800(%rip), %rdi      # 0x5471
leaq 0x259b(%rip), %rsi      # 0x5213
leaq 0x279c(%rip), %rcx      # 0x541b
movl $0x297, %edx            # imm = 0x297
callq 0x1060
leaq 0x27e1(%rip), %rdi      # 0x5471
leaq 0x257c(%rip), %rsi      # 0x5213
leaq 0x277d(%rip), %rcx      # 0x541b
movl $0x2ab, %edx            # imm = 0x2AB
callq 0x1060
leaq 0x27c2(%rip), %rdi      # 0x5471
leaq 0x255d(%rip), %rsi      # 0x5213
leaq 0x275e(%rip), %rcx      # 0x541b
movl $0x2b1, %edx            # imm = 0x2B1
callq 0x1060
leaq 0x27b1(%rip), %rdi      # 0x547f
leaq 0x253e(%rip), %rsi      # 0x5213
leaq 0x273f(%rip), %rcx      # 0x541b
movl $0x2a4, %edx            # imm = 0x2A4
callq 0x1060
leaq 0x2792(%rip), %rdi      # 0x547f
leaq 0x251f(%rip), %rsi      # 0x5213
leaq 0x2720(%rip), %rcx      # 0x541b
movl $0x2b6, %edx            # imm = 0x2B6
callq 0x1060