// File: /workspace/github_cpp_makefile_star2_O2/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 %r12
pushq %rbx
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
movq 0x8(%rsi), %rax
movq 0x10(%rsi), %rdx
subq %rax, %rdx
je 0x1554b
movl (%r15), %r14d
leaq (%r14,%rdx,8), %rcx
cmpq $0x41, %rcx
jae 0x1555b
movq %r12, %rdi
callq 0x15408
movb (%r15), %cl
shlq %cl, %rax
movq %rbx, %rdi
movq %rax, %rsi
xorl %edx, %edx
callq 0x1543a
jmp 0x15661
movq %rbx, %rdi
movq %r12, %rsi
callq 0x157d4
jmp 0x15661
xorl %ecx, %ecx
movl %r14d, %ebp
subl $0x20, %ebp
cmovbl %ecx, %ebp
addl $0x1f, %ebp
movl %ebp, %ecx
andl $-0x20, %ecx
cmpl $0x21, %r14d
setb %sil
subl %ecx, %r14d
setne %cl
testb %sil, %cl
je 0x155a1
pushq $-0x1
popq %r15
movl %r14d, %ecx
shll %cl, %r15d
notl %r15d
movl %r14d, %ecx
negl %ecx
shll %cl, %r15d
testl %r15d, -0x4(%rax,%rdx)
je 0x1566d
shrl $0x5, %ebp
movq %rbx, %rdi
callq 0x157f8
movq 0x10(%r12), %rax
subq 0x8(%r12), %rax
leaq 0x8(%rbx), %r15
sarq $0x2, %rax
movl %ebp, %ecx
leaq (%rcx,%rax), %rsi
incq %rsi
movq %r15, %rdi
callq 0x150d6
movq 0x8(%rbx), %rax
movq 0x10(%rbx), %rdx
subq %rax, %rdx
sarq $0x2, %rdx
leaq -0x1(%rdx), %rsi
movq 0x8(%r12), %rdi
movl %r14d, %ecx
movl %ebp, %r8d
negl %r8d
xorl %r9d, %r9d
movl %r9d, %r9d
cmpq %r9, %rdx
jbe 0x15659
cmpl %ebp, %r9d
jae 0x15607
andl $0x0, (%rax,%r9,4)
jmp 0x15651
cmpq %r9, %rsi
jne 0x15622
leal -0x1(%r8), %r10d
movl (%rdi,%r10,4), %r10d
shlq %cl, %r10
shrq $0x20, %r10
movl %r10d, -0x4(%rax,%rdx,4)
jmp 0x15651
movl %r8d, %r10d
cmpl %ebp, %r9d
jbe 0x15646
leal -0x1(%r8), %r11d
movl (%rdi,%r11,4), %r11d
movl (%rdi,%r10,4), %r10d
shlq $0x20, %r10
orq %r11, %r10
shlq %cl, %r10
shrq $0x20, %r10
jmp 0x1564d
movl (%rdi,%r10,4), %r10d
shlq %cl, %r10
movl %r10d, (%rax,%r9,4)
incl %r9d
incl %r8d
jmp 0x155f3
movq %rbx, %rdi
callq 0x1580e
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
pushq $0x20
popq %rbp
subl %r14d, %ebp
movq %rbx, %rdi
movq %r12, %rsi
callq 0x157d4
movq 0x8(%r12), %rax
movq 0x10(%r12), %rdx
subq %rax, %rdx
sarq $0x2, %rdx
movq 0x8(%rbx), %rsi
xorl %ecx, %ecx
xorl %edi, %edi
movl %ecx, %r8d
cmpq %r8, %rdx
jbe 0x15661
movl (%rax,%r8,4), %r9d
movl %r9d, %r10d
movl %r14d, %ecx
shll %cl, %r10d
andl %r15d, %r9d
movl %ebp, %ecx
shrl %cl, %r9d
orl %edi, %r10d
movl %r10d, (%rsi,%r8,4)
leal 0x1(%r8), %ecx
movl %r9d, %edi
jmp 0x15697
movq %rax, %rbx
movq %r15, %rdi
callq 0x127b2
movq %rbx, %rdi
callq 0x4430
nop