// File: 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
movq %rsp, %rbp
subq $0xe0, %rsp
movb %cl, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
andb $0x1, %al
movb %al, -0x19(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x10(%rbp), %rdi
addq $0x8, %rdi
callq 0x3c9c0
cmpq $0x2, %rax
ja 0x3fd24
movq -0x18(%rbp), %rdi
addq $0x8, %rdi
callq 0x3c9c0
cmpq $0x2, %rax
ja 0x3fd24
movq -0x10(%rbp), %rdi
callq 0x3d1f0
movq %rax, -0x88(%rbp)
movq -0x18(%rbp), %rdi
callq 0x3d1f0
movq -0x88(%rbp), %rsi
movq %rax, %rcx
movq -0x78(%rbp), %rax
subq %rcx, %rsi
movzbl (%rax), %edx
andl $0x1, %edx
leaq -0x40(%rbp), %rdi
movq %rdi, -0x80(%rbp)
callq 0x3d290
movq -0x78(%rbp), %rdi
movq -0x80(%rbp), %rsi
callq 0x3d420
jmp 0x3fcfc
leaq -0x40(%rbp), %rdi
callq 0x10260
jmp 0x3fff9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x10260
jmp 0x40002
movb $0x1, -0x4d(%rbp)
testb $0x1, -0x19(%rbp)
je 0x3fd59
movq -0x78(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x90(%rbp)
movq -0x10(%rbp), %rdi
addq $0x8, %rdi
callq 0x3c9c0
movq -0x90(%rbp), %rdi
movq %rax, %rsi
callq 0x3c360
movq -0x78(%rbp), %rdi
addq $0x8, %rdi
callq 0x3c9c0
cmpq $0x0, %rax
jne 0x3fd78
movq -0x78(%rbp), %rax
movb $0x0, (%rax)
jmp 0x3fff9
movl $0x0, -0x54(%rbp)
movq -0x78(%rbp), %rdi
movl -0x54(%rbp), %eax
movq %rax, -0x98(%rbp)
addq $0x8, %rdi
callq 0x3c9c0
movq %rax, %rcx
movq -0x98(%rbp), %rax
cmpq %rcx, %rax
jae 0x3ff28
movl -0x54(%rbp), %eax
movq %rax, -0xa0(%rbp)
movq -0x10(%rbp), %rdi
addq $0x8, %rdi
callq 0x3c9c0
movq %rax, %rcx
movq -0xa0(%rbp), %rax
cmpq %rcx, %rax
jae 0x3fdeb
movq -0x10(%rbp), %rdi
addq $0x8, %rdi
movl -0x54(%rbp), %eax
movl %eax, %esi
callq 0x3d8a0
movl (%rax), %eax
movl %eax, -0xa4(%rbp)
jmp 0x3fdf5
xorl %eax, %eax
movl %eax, -0xa4(%rbp)
jmp 0x3fdf5
movl -0xa4(%rbp), %eax
movl %eax, -0x58(%rbp)
movl -0x54(%rbp), %eax
movq %rax, -0xb0(%rbp)
movq -0x18(%rbp), %rdi
addq $0x8, %rdi
callq 0x3c9c0
movq %rax, %rcx
movq -0xb0(%rbp), %rax
cmpq %rcx, %rax
jae 0x3fe40
movq -0x18(%rbp), %rdi
addq $0x8, %rdi
movl -0x54(%rbp), %eax
movl %eax, %esi
callq 0x3d8a0
movl (%rax), %eax
movl %eax, -0xb4(%rbp)
jmp 0x3fe4a
xorl %eax, %eax
movl %eax, -0xb4(%rbp)
jmp 0x3fe4a
movl -0xb4(%rbp), %eax
xorl $-0x1, %eax
movl %eax, -0x5c(%rbp)
testb $0x1, -0x4d(%rbp)
je 0x3fe71
movl -0x5c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x5c(%rbp)
cmpl $0x0, -0x5c(%rbp)
sete %al
andb $0x1, %al
movb %al, -0x4d(%rbp)
testb $0x1, -0x4d(%rbp)
je 0x3fe82
movl -0x58(%rbp), %eax
movl %eax, -0xb8(%rbp)
jmp 0x3fe8e
movl -0x58(%rbp), %eax
addl -0x5c(%rbp), %eax
movl %eax, -0xb8(%rbp)
movq -0x78(%rbp), %rdi
movl -0xb8(%rbp), %eax
movl %eax, -0xc0(%rbp)
addq $0x8, %rdi
movl -0x54(%rbp), %eax
movl %eax, %esi
callq 0x3c3f0
movl -0xc0(%rbp), %ecx
movl %ecx, (%rax)
movb $0x1, %al
testb $0x1, -0x4d(%rbp)
movb %al, -0xb9(%rbp)
jne 0x3ff0f
movq -0x78(%rbp), %rdi
addq $0x8, %rdi
movl -0x54(%rbp), %eax
movl %eax, %esi
callq 0x3c3f0
movl (%rax), %ecx
movb $0x1, %al
cmpl -0x58(%rbp), %ecx
movb %al, -0xc1(%rbp)
jb 0x3ff03
movq -0x78(%rbp), %rdi
addq $0x8, %rdi
movl -0x54(%rbp), %eax
movl %eax, %esi
callq 0x3c3f0
movl (%rax), %eax
cmpl -0x5c(%rbp), %eax
setb %al
movb %al, -0xc1(%rbp)
movb -0xc1(%rbp), %al
movb %al, -0xb9(%rbp)
movb -0xb9(%rbp), %al
andb $0x1, %al
movb %al, -0x4d(%rbp)
movl -0x54(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x54(%rbp)
jmp 0x3fd7f
movq -0x10(%rbp), %rdi
addq $0x8, %rdi
callq 0x3c9c0
cmpq $0x0, %rax
jbe 0x3fff0
movq -0x78(%rbp), %rdi
movq %rdi, %rax
addq $0x8, %rax
movq %rax, -0xd8(%rbp)
addq $0x8, %rdi
callq 0x3c9c0
movq -0xd8(%rbp), %rdi
movq %rax, %rsi
subq $0x1, %rsi
callq 0x3c3f0
movq %rax, -0x68(%rbp)
movq -0x10(%rbp), %rax
addq $0x8, %rax
movq %rax, -0xd0(%rbp)
movq -0x10(%rbp), %rdi
addq $0x8, %rdi
callq 0x3c9c0
movq -0xd0(%rbp), %rdi
movq %rax, %rsi
subq $0x1, %rsi
callq 0x3d8a0
movl (%rax), %eax
movl %eax, -0x6c(%rbp)
movl $0x20, -0x70(%rbp)
movl -0x70(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x70(%rbp)
movl -0x6c(%rbp), %eax
movl -0x70(%rbp), %ecx
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
andl %ecx, %eax
cmpl $0x0, %eax
jne 0x3ffe4
movl -0x70(%rbp), %ecx
movl $0x1, %eax
shll %cl, %eax
movl %eax, %ecx
xorl $-0x1, %ecx
movq -0x68(%rbp), %rax
andl (%rax), %ecx
movl %ecx, (%rax)
jmp 0x3ffe6
jmp 0x3ffee
jmp 0x3ffe8
cmpl $0x0, -0x70(%rbp)
ja 0x3ffac
jmp 0x3fff0
movq -0x78(%rbp), %rdi
callq 0x3e480
addq $0xe0, %rsp
popq %rbp
retq
movq -0x48(%rbp), %rdi
callq 0x55e0
nopl (%rax,%rax)