// File: /workspace/github_cpp_makefile_star2_O1/ef-gy[P]libefgy/include/ef.gy/big-integers.h
// Function: efgy::math::numeric::bigIntegers<long long, unsigned long long, unsigned int, 32u>::operator<<(unsigned int const&) const
bigIntegers operator<<(const cellType &b) const {
    if (cell.size() == 0) {
      return *this;
    }

    if ((cell.size() * cellBitCount + b) <= longBitCount) {
      return bigIntegers((*this).toInteger() << b, false);
    }

    cellType pushCells = 0;
    cellType q = b;

    while (q > cellBitCount) {
      pushCells++;
      q -= cellBitCount;
    }

    if ((pushCells == 0) && (q > 0)) {
      const cellType negQ = (cellBitCount - q);
      const cellType mask = ((1 << q) - 1) << negQ;

      if ((cell[(cell.size() - 1)] & mask) == 0) {
        /* no additional cells needed */
        bigIntegers r = *this;
        cellType overflow = 0;

        for (cellType i = 0; i < cell.size(); i++) {
          cellType newContent = (cell[i] << q) | overflow;
          overflow = (cell[i] & mask) >> negQ;
          r.cell[i] = newContent;
        }

        return r;
      }
    }

    bigIntegers r;

    r.cell.resize(cell.size() + pushCells + 1);

    for (cellType i = 0; i < r.cell.size(); i++) {
      if (i < pushCells) {
        r.cell[i] = 0;
      } else if (i == (r.cell.size() - 1)) {
        cellType j = i - 1;

        r.cell[i] = ((Tu(cell[(j - pushCells)])) << q) >> cellBitCount;
      } else if (i > pushCells) {
        cellType j = i - 1;

        r.cell[i] = (((Tu(cell[(j - pushCells)])) |
                      (Tu(cell[(i - pushCells)]) << cellBitCount))
                     << q) >>
                    cellBitCount;
      } else {
        r.cell[i] = Tu(cell[(i - pushCells)]) << q;
      }
    }

    r.shrink();

    return r;
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x8(%rsi), %r12
movq 0x8(%rsi), %rax
movq 0x10(%rsi), %rsi
subq %rax, %rsi
je 0x1879d
movl (%rdx), %r14d
leaq (%r14,%rsi,8), %rcx
cmpq $0x41, %rcx
jae 0x187c4
movq 0x10(%r15), %rdx
xorl %ecx, %ecx
subq %rax, %rdx
je 0x188d3
sarq $0x2, %rdx
xorl %edi, %edi
xorl %esi, %esi
movl (%rax,%rdi,4), %r8d
shlq %cl, %r8
orq %r8, %rsi
incq %rdi
movl %edi, %r8d
addl $0x20, %ecx
cmpq %r8, %rdx
ja 0x18780
jmp 0x188d5
movb (%r15), %al
movb %al, (%rbx)
leaq 0x8(%rbx), %rdi
movq %r12, %rsi
callq 0x18aae
movq 0x10(%rbx), %rax
cmpq 0x8(%rbx), %rax
jne 0x188e5
movb $0x0, (%rbx)
jmp 0x188e5
xorl %ebp, %ebp
cmpl $0x20, %r14d
jbe 0x187e3
leal -0x21(%r14), %ecx
movl %ecx, %ebp
shrl $0x5, %ebp
andl $-0x20, %ecx
incl %ebp
negl %ecx
addl %ecx, %r14d
addl $-0x20, %r14d
testl %ebp, %ebp
setne %cl
testl %r14d, %r14d
sete %dl
orb %cl, %dl
jne 0x18814
movl $0xffffffff, %r13d      # imm = 0xFFFFFFFF
movl %r14d, %ecx
shll %cl, %r13d
notl %r13d
movl %r14d, %ecx
negl %ecx
shll %cl, %r13d
testl %r13d, -0x4(%rax,%rsi)
je 0x188f7
movb $0x0, (%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rbx)
movq $0x0, 0x18(%rbx)
movq 0x10(%r15), %rax
subq 0x8(%r15), %rax
leaq 0x8(%rbx), %r15
sarq $0x2, %rax
movl %ebp, %ecx
leaq (%rcx,%rax), %rsi
incq %rsi
movq %r15, %rdi
callq 0x182f2
movq 0x8(%rbx), %rax
movq 0x10(%rbx), %rdx
subq %rax, %rdx
je 0x188c9
sarq $0x2, %rdx
leaq -0x1(%rdx), %rsi
movq (%r12), %rdi
movl %r14d, %ecx
movl %ebp, %r8d
negl %r8d
leaq -0x1(%r8), %r9
xorl %r10d, %r10d
movl $0x0, %r11d
cmpl %ebp, %r10d
jb 0x188ba
cmpq %r10, %rsi
jne 0x1888a
leal (%r9,%r10), %r11d
movl (%rdi,%r11,4), %r11d
jmp 0x188a6
cmpl %ebp, %r10d
jbe 0x188af
leal (%r9,%r10), %r11d
movl (%rdi,%r11,4), %r14d
leal (%r8,%r10), %r11d
movl (%rdi,%r11,4), %r11d
shlq $0x20, %r11
orq %r14, %r11
shlq %cl, %r11
shrq $0x20, %r11
jmp 0x188ba
leal (%r8,%r10), %r11d
movl (%rdi,%r11,4), %r11d
shlq %cl, %r11
movl %r11d, (%rax,%r10,4)
incq %r10
movl %r10d, %r11d
cmpq %r11, %rdx
ja 0x18870
movq %rbx, %rdi
callq 0x18a56
jmp 0x188e5
xorl %esi, %esi
movl %r14d, %ecx
shlq %cl, %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x18694
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movb (%r15), %al
movb %al, (%rbx)
leaq 0x8(%rbx), %rdi
movq %r12, %rsi
callq 0x18aae
movq 0x8(%rbx), %rdx
cmpq %rdx, 0x10(%rbx)
jne 0x18915
movb $0x0, (%rbx)
movq 0x8(%r15), %rsi
movq 0x10(%r15), %rdi
subq %rsi, %rdi
je 0x188e5
movl $0x20, %eax
subl %r14d, %eax
sarq $0x2, %rdi
xorl %r8d, %r8d
xorl %r9d, %r9d
movl (%rsi,%r8,4), %r10d
movl %r10d, %r11d
movl %r14d, %ecx
shll %cl, %r11d
orl %r9d, %r11d
andl %r13d, %r10d
movl %eax, %ecx
shrl %cl, %r10d
movl %r11d, (%rdx,%r8,4)
incq %r8
movl %r8d, %ecx
movl %r10d, %r9d
cmpq %rcx, %rdi
ja 0x18934
jmp 0x188e5
movq %rax, %r14
movq (%r15), %rdi
testq %rdi, %rdi
je 0x18977
movq 0x18(%rbx), %rsi
subq %rdi, %rsi
callq 0x4260
movq %r14, %rdi
callq 0x43f0
nop