// File: /workspace/github_cpp_makefile_star2_O3/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), %rdi
movq 0x10(%rsi), %rax
subq %rdi, %rax
je 0x188a4
movl (%rdx), %r14d
leaq (%r14,%rax,8), %rcx
cmpq $0x41, %rcx
jae 0x188cb
sarq $0x2, %rax
xorl %ecx, %ecx
xorl %edx, %edx
xorl %esi, %esi
movl (%rdi,%rdx,4), %r8d
shlq %cl, %r8
orq %r8, %rsi
incq %rdx
movl %edx, %r8d
addl $0x20, %ecx
cmpq %r8, %rax
ja 0x18877
movl %r14d, %ecx
shlq %cl, %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x18782
jmp 0x189e0
movb (%r15), %al
movb %al, (%rbx)
leaq 0x8(%rbx), %rdi
movq %r12, %rsi
callq 0x18bb6
movq 0x10(%rbx), %rax
cmpq 0x8(%rbx), %rax
jne 0x189e0
movb $0x0, (%rbx)
jmp 0x189e0
cmpl $0x21, %r14d
jb 0x188ea
leal -0x21(%r14), %ecx
movl %ecx, %ebp
shrl $0x5, %ebp
incl %ebp
andl $-0x20, %ecx
negl %ecx
addl %ecx, %r14d
addl $-0x20, %r14d
jmp 0x18913
xorl %ebp, %ebp
testl %r14d, %r14d
je 0x18913
movl $0xffffffff, %r13d      # imm = 0xFFFFFFFF
movl %r14d, %ecx
shll %cl, %r13d
notl %r13d
movl %r14d, %ecx
negl %ecx
shll %cl, %r13d
testl %r13d, -0x4(%rdi,%rax)
je 0x189f2
movb $0x0, (%rbx)
leaq 0x8(%rbx), %r15
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rbx)
movq $0x0, 0x18(%rbx)
sarq $0x2, %rax
movl %ebp, %ecx
leaq (%rcx,%rax), %rsi
incq %rsi
movq %r15, %rdi
callq 0x183d2
movq 0x8(%rbx), %rax
movq 0x10(%rbx), %rdx
subq %rax, %rdx
je 0x189d8
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
cmpl %ebp, %r10d
jae 0x1897a
movl $0x0, (%rax,%r10,4)
jmp 0x189cd
cmpq %r10, %rsi
jne 0x18995
leal (%r9,%r10), %r11d
movl (%rdi,%r11,4), %r11d
shlq %cl, %r11
shrq $0x20, %r11
movl %r11d, -0x4(%rax,%rdx,4)
jmp 0x189cd
cmpl %ebp, %r10d
jbe 0x189be
leal (%r9,%r10), %r11d
movl (%rdi,%r11,4), %r11d
leal (%r8,%r10), %r14d
movl (%rdi,%r14,4), %r14d
shlq $0x20, %r14
orq %r11, %r14
shlq %cl, %r14
shrq $0x20, %r14
movl %r14d, (%rax,%r10,4)
jmp 0x189cd
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 0x1896b
movq %rbx, %rdi
callq 0x18b5e
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 0x18bb6
movq 0x8(%rbx), %rdx
cmpq %rdx, 0x10(%rbx)
jne 0x18a10
movb $0x0, (%rbx)
movq 0x8(%r15), %rsi
movq 0x10(%r15), %rdi
subq %rsi, %rdi
je 0x189e0
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 0x18a2f
jmp 0x189e0
movq %rax, %r14
movq (%r15), %rdi
testq %rdi, %rdi
je 0x18a72
movq 0x18(%rbx), %rsi
subq %rdi, %rsi
callq 0x4260
movq %r14, %rdi
callq 0x43f0