// 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>::doSubtract(efgy::math::numeric::bigIntegers<long long, unsigned long long, unsigned int, 32u> const&, efgy::math::numeric::bigIntegers<long long, unsigned long long, unsigned int, 32u> const&, bool)
void doSubtract(const bigIntegers &a, const bigIntegers &b,
                  bool allocate = true) {
    if ((a.cell.size() <= cellsPerLong) && (b.cell.size() <= cellsPerLong)) {
      *this = bigIntegers((a).toInteger() - (b).toInteger(), negative);
      return;
    }

    bool overflow = true;

    if (allocate) {
      cell.resize(a.cell.size());
    }

    if (cell.size() == 0) {
      negative = false;
      return;
    }

    for (cellType i = 0; i < cell.size(); i++) {
      cellType av = (i < a.cell.size()) ? a.cell[i] : 0;
      cellType bv = ~((i < b.cell.size()) ? b.cell[i] : 0);

      if (overflow) {
        bv = bv + 1;

        overflow = (bv == 0);
      }

      cell[i] = (overflow ? av : (av + bv));

      overflow = overflow || ((cell[i] < av) || (cell[i] < bv));
    }

    if (a.cell.size() > 0) {
      cellType &l = cell[(cell.size() - 1)];
      cellType o = a.cell[(a.cell.size() - 1)];

      unsigned int j = cellBitCount;

      do {
        j--;

        if (!(o & (1 << j))) {
          l &= ~cellType(1 << j);
        } else {
          break;
        }
      } while (j > 0);
    }

    shrink();
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq 0x8(%rsi), %r8
movq 0x10(%rsi), %rsi
movq %rsi, %rax
subq %r8, %rax
sarq $0x2, %rax
cmpq $0x2, %rax
ja 0x1998a
movq 0x8(%r14), %rdx
movq 0x10(%r14), %r9
movq %r9, %rdi
subq %rdx, %rdi
cmpq $0x8, %rdi
ja 0x1998a
xorl %ecx, %ecx
cmpq %r8, %rsi
je 0x19a8c
xorl %r10d, %r10d
xorl %esi, %esi
movl (%r8,%r10,4), %r11d
shlq %cl, %r11
orq %r11, %rsi
incq %r10
movl %r10d, %r11d
addl $0x20, %ecx
cmpq %r11, %rax
ja 0x1996d
jmp 0x19a8e
testb %cl, %cl
je 0x1999a
leaq 0x8(%rbx), %rdi
movq %rax, %rsi
callq 0x183d2
movq 0x8(%rbx), %rax
movq 0x10(%rbx), %rdx
movq %rdx, %rcx
subq %rax, %rcx
subq %rax, %rdx
je 0x19a87
sarq $0x2, %rcx
movq 0x8(%r15), %rdi
movq 0x10(%r15), %r8
movq %r8, (%rsp)
subq %rdi, %r8
sarq $0x2, %r8
movq 0x8(%r14), %r9
movq 0x10(%r14), %r10
subq %r9, %r10
sarq $0x2, %r10
movb $0x1, %bpl
xorl %r11d, %r11d
xorl %r14d, %r14d
movl $0x0, %r15d
cmpq %r14, %r8
jbe 0x199ef
movl (%rdi,%r14,4), %r15d
movl $0xffffffff, %r13d      # imm = 0xFFFFFFFF
cmpq %r14, %r10
jbe 0x19a01
movl (%r9,%r14,4), %r13d
notl %r13d
movl %r13d, %r12d
incl %r12d
sete %sil
testb $0x1, %bpl
jne 0x19a14
movl %r13d, %r12d
andb %sil, %bpl
testb $0x1, %bpl
movl %r12d, %esi
cmovnel %r11d, %esi
addl %r15d, %esi
setb %r15b
movl %esi, (%rax,%r14,4)
orb %bpl, %r15b
cmpl %r12d, %esi
setb %bpl
orb %r15b, %bpl
andb $0x1, %bpl
incq %r14
movl %r14d, %esi
cmpq %rsi, %rcx
ja 0x199e0
movq (%rsp), %rcx
cmpq %rdi, %rcx
je 0x19a71
movl -0x4(%rcx), %esi
movl $0x1f, %ecx
movl $0x1, %edi
shll %cl, %edi
btl %ecx, %esi
jb 0x19a71
notl %edi
andl %edi, -0x4(%rax,%rdx)
addl $-0x1, %ecx
jb 0x19a5a
movq %rbx, %rdi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x18b5e
movb $0x0, (%rbx)
jmp 0x19aff
xorl %esi, %esi
xorl %ecx, %ecx
cmpq %rdx, %r9
je 0x19ab8
shrq $0x2, %rdi
xorl %r8d, %r8d
xorl %eax, %eax
movl (%rdx,%r8,4), %r9d
shlq %cl, %r9
orq %r9, %rax
incq %r8
movl %r8d, %r9d
addl $0x20, %ecx
cmpq %r9, %rdi
ja 0x19a9e
jmp 0x19aba
xorl %eax, %eax
subq %rax, %rsi
movzbl (%rbx), %edx
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x18782
cmpq %rbx, %r14
je 0x19ae8
leaq 0x10(%rsp), %rsi
movb -0x8(%rsi), %al
movb %al, (%rbx)
addq $0x8, %rbx
movq %rbx, %rdi
callq 0x18a7a
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x19aff
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x4260
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x19b28
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x4260
movq %rbx, %rdi
callq 0x43f0