// 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>::doDivide(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 doDivide(const bigIntegers &a, const bigIntegers &b,
                bool allocate = true) {
    if (a == zero()) {
      cell.resize(0);
      return;
    }

    if (b == zero()) {
      /* ebil */
      cell.resize(0);
      return;
    }

    if (b == one()) {
      *this = a;
      return;
    }

    if (b > a) {
      cell.resize(0);
      return;
    }

    cell.resize(0);

    bigIntegers r = bigIntegers();

    for (cellType i = a.cell.size(); i > 0; i--) {
      cellType ir = i - 1;
      cellType c = a.cell[ir];

      for (cellType j = cellBitCount; j > 0; j--) {
        cellType jr = j - 1;
        r <<= 1;

        if (c & (1 << jr)) {
          if (r.cell.size() == 0) {
            r.cell.resize(1);
            r.cell[0] = cellType(1);
          } else {
            r.cell[0] |= 1;
          }
        }

        if (r >= b) {
          r -= b;

          *this += (bigIntegers(1) << cellType(ir * cellBitCount + jr));
        }
      }
    }
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rdi, %rbx
movq 0x10(%rsi), %rax
cmpq 0x8(%rsi), %rax
je 0x19c87
movq %rdx, %r14
movq 0x8(%rdx), %rax
movq 0x10(%rdx), %rcx
subq %rax, %rcx
je 0x19c87
movq %rsi, %r15
leaq 0x8(%rsi), %rdx
movq %rdx, 0x10(%rsp)
cmpq $0x4, %rcx
jne 0x19ca6
cmpb $0x0, (%r14)
jne 0x19ca6
cmpl $0x1, (%rax)
jne 0x19ca6
cmpq %r15, %rbx
je 0x19e3a
movb (%r15), %al
movb %al, (%rbx)
addq $0x8, %rbx
movq %rbx, %rdi
movq 0x10(%rsp), %rsi
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x18a7a
addq $0x8, %rbx
movq %rbx, %rdi
xorl %esi, %esi
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x183d2
movq %r14, %rdi
movq %r15, %rsi
callq 0x1924c
movl %eax, %ebp
leaq 0x8(%rbx), %rdi
xorl %esi, %esi
callq 0x183d2
testb %bpl, %bpl
jne 0x19e3a
movb $0x0, 0x18(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rsp)
movq $0x0, 0x30(%rsp)
movq 0x10(%r15), %rcx
subq 0x8(%r15), %rcx
shrq $0x2, %rcx
testl %ecx, %ecx
je 0x19e3a
movq %rbx, 0x40(%rsp)
movl %ecx, %eax
shll $0x5, %ecx
decl %ecx
movq %rcx, (%rsp)
leaq 0x18(%rsp), %r13
leaq 0x48(%rsp), %rbp
decq %rax
movq %rax, 0x38(%rsp)
movl %eax, %eax
movq 0x10(%rsp), %rcx
movq (%rcx), %rcx
movl (%rcx,%rax,4), %ebx
movl $0x1f, %r15d
movl $0x1, 0x48(%rsp)
movq %r13, %rdi
movq %rbp, %rsi
callq 0x9d1a
btl %r15d, %ebx
jae 0x19d6a
movq 0x20(%rsp), %rax
cmpq %rax, 0x28(%rsp)
je 0x19d50
orb $0x1, (%rax)
jmp 0x19d6a
movl $0x1, %esi
leaq 0x20(%rsp), %rdi
callq 0x183d2
movq 0x20(%rsp), %rax
movl $0x1, (%rax)
movq %r13, %rdi
movq %r14, %rsi
callq 0x194ce
testb %al, %al
jne 0x19d88
movq %r13, %rdi
movq %r14, %rsi
callq 0x1924c
testb %al, %al
je 0x19e01
movq %r13, %rdi
movq %r14, %rsi
callq 0x19454
movl $0x1, %esi
leaq 0x68(%rsp), %r12
movq %r12, %rdi
callq 0x9c54
movq (%rsp), %rax
addl %r15d, %eax
addl $-0x1f, %eax
movl %eax, 0xc(%rsp)
movq %rbp, %rdi
movq %r12, %rsi
leaq 0xc(%rsp), %rdx
callq 0x1883e
movq 0x40(%rsp), %rdi
movq %rbp, %rsi
callq 0x19eae
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x19de7
movq 0x60(%rsp), %rsi
subq %rdi, %rsi
callq 0x4260
movq 0x70(%rsp), %rdi
testq %rdi, %rdi
je 0x19e01
movq 0x80(%rsp), %rsi
subq %rdi, %rsi
callq 0x4260
addl $-0x1, %r15d
jb 0x19d26
movq (%rsp), %rax
addl $-0x20, %eax
movq %rax, (%rsp)
movq 0x38(%rsp), %rax
testl %eax, %eax
jne 0x19d0b
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x19e3a
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x4260
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x19e6b
movq 0x60(%rsp), %rsi
subq %rdi, %rsi
callq 0x4260
jmp 0x19e6b
movq %rax, %rbx
movq 0x70(%rsp), %rdi
testq %rdi, %rdi
je 0x19e8e
movq 0x80(%rsp), %rsi
subq %rdi, %rsi
callq 0x4260
jmp 0x19e8e
jmp 0x19e8b
jmp 0x19e8b
movq %rax, %rbx
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x19ea5
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x4260
movq %rbx, %rdi
callq 0x43f0
nop