// File: /workspace/github_cpp_makefile_star2_O3/Konano[P]UselessDatabase/Database.cpp
// Function: Database::dfsCross(unsigned int, unsigned int, bool)
void Database::dfsCross(uint idx, uint f_idx, bool print = false) {
    for (auto it: sel[idx].where) {
        if (checkWhere(it) == false) return;
    }
    if (f_idx == sel[idx].from.size()) {
        storeData(idx);
        if (print && sel_table[idx]->record_num % MAX_RESULT_LINES == 0 && sel_table[idx]->printBack(MAX_RESULT_LINES)) {
            puts("====== Press c to continue, q to quit ======");
            while (true) {
                char ch = getch();
                if (ch == 'c') {
                    puts("================= Continue =================");
                    break;
                }
                if (ch == 'q') { 
                    selStop = true;
                    puts("=================== Quit ===================");
                    return; 
                }
            }
        }
    } else {
        filterTable(sel[idx].from[f_idx].first)->initPointer();
        while (filterTable(sel[idx].from[f_idx].first)->movePointer()) {
            dfsCross(idx, f_idx + 1, print);
            if (selStop) {
                filterTable(sel[idx].from[f_idx].first)->removePointer();
                return;
            }
        }
        filterTable(sel[idx].from[f_idx].first)->removePointer();
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movl %ecx, 0xc(%rsp)
movl %edx, 0x14(%rsp)
movq %rdi, %rbx
movl %esi, 0x10(%rsp)
movl %esi, %ecx
movq %rcx, 0x18(%rsp)
shlq $0x7, %rcx
movq 0x898(%rdi,%rcx), %r12
movq %rcx, (%rsp)
movq 0x8a0(%rdi,%rcx), %r15
cmpq %r15, %r12
je 0x811a
leaq 0x38(%rsp), %r13
leaq 0x20(%rsp), %rbp
movq %rbp, %rdi
movq %r12, %rsi
callq 0xa682
movl 0x20(%r12), %eax
movl %eax, 0x8(%r13)
movq 0x18(%r12), %rax
movq %rax, (%r13)
addq $0x28, %r12
leaq 0x48(%rsp), %rdi
movq %r12, %rsi
callq 0xa26a
addq $0x18, %r12
leaq 0x60(%rsp), %rdi
movq %r12, %rsi
callq 0xa682
movl 0x18(%r12), %eax
movl %eax, 0x78(%rsp)
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x7912
movl %eax, %r14d
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0x80e3
movq 0x70(%rsp), %rsi
subq %rdi, %rsi
callq 0x53a0
leaq 0x48(%rsp), %rdi
callq 0xa37e
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x8104
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x53a0
testb %r14b, %r14b
je 0x82f6
addq $0x20, %r12
cmpq %r15, %r12
jne 0x8076
movq (%rsp), %rax
leaq (%rbx,%rax), %r15
addq $0x848, %r15            # imm = 0x848
movl 0x14(%rsp), %r14d
movl %r14d, %eax
movq 0x38(%r15), %rcx
movq 0x40(%r15), %rdx
subq %rcx, %rdx
sarq $0x3, %rdx
movabsq $-0x3333333333333333, %rsi # imm = 0xCCCCCCCCCCCCCCCD
imulq %rdx, %rsi
cmpq %rax, %rsi
jne 0x8251
movq %rbx, %rdi
movl 0x10(%rsp), %esi
callq 0x7cc2
cmpb $0x0, 0xc(%rsp)
je 0x82f6
movq 0x18(%rsp), %rax
movq 0x8848(%rbx,%rax,8), %rdi
imull $0xc28f5c29, 0x9fa0(%rdi), %eax # imm = 0xC28F5C29
rorl %eax
cmpl $0x51eb851, %eax        # imm = 0x51EB851
ja 0x82f6
movl $0x32, %esi
callq 0x2547a
testb %al, %al
je 0x82f6
leaq 0x3454e(%rip), %rdi     # 0x3c6f9
callq 0x55d0
leaq 0x20(%rsp), %rbx
leaq 0x80(%rsp), %r14
xorl %edi, %edi
movq %rbx, %rsi
callq 0x5410
testl %eax, %eax
js 0x81bd
movups 0x20(%rsp), %xmm0
movups 0x30(%rsp), %xmm1
movups 0x40(%rsp), %xmm2
movups 0x4c(%rsp), %xmm3
movups %xmm3, 0xac(%rsp)
movaps %xmm2, 0xa0(%rsp)
movaps %xmm1, 0x90(%rsp)
movaps %xmm0, 0x80(%rsp)
movq %rbx, %rdi
callq 0x5510
xorl %edi, %edi
xorl %esi, %esi
movq %rbx, %rdx
callq 0x54b0
testl %eax, %eax
js 0x81bd
callq 0x5500
movl %eax, %ebp
xorl %edi, %edi
xorl %esi, %esi
movq %r14, %rdx
callq 0x54b0
testl %eax, %eax
js 0x81bd
cmpb $0x71, %bpl
je 0x8308
movzbl %bpl, %eax
cmpl $0x63, %eax
jne 0x81bd
leaq 0x344da(%rip), %rdi     # 0x3c726
jmp 0x8316
leaq (%rax,%rax,4), %r13
movslq (%rcx,%r13,8), %rax
leaq 0x8848(%rbx), %rcx
movq %rcx, (%rsp)
leaq 0x20(%rbx), %r12
testq %rax, %rax
leaq 0x20(%rbx,%rax,8), %rcx
notl %eax
leaq 0x8848(%rbx,%rax,8), %rax
cmovsq %rax, %rcx
movq (%rcx), %rdi
callq 0x25a64
incl %r14d
movzbl 0xc(%rsp), %ebp
movq 0x38(%r15), %rax
movslq (%rax,%r13,8), %rax
testq %rax, %rax
leaq (%r12,%rax,8), %rcx
notl %eax
movq (%rsp), %rdx
leaq (%rdx,%rax,8), %rax
cmovsq %rax, %rcx
movq (%rcx), %rdi
callq 0x25a7c
testb %al, %al
je 0x82d1
movq %rbx, %rdi
movl 0x10(%rsp), %esi
movl %r14d, %edx
movl %ebp, %ecx
callq 0x8024
cmpb $0x1, 0x4b173(%rip)     # 0x53442
jne 0x828e
movq 0x38(%r15), %rax
movslq (%rax,%r13,8), %rax
testq %rax, %rax
leaq (%r12,%rax,8), %rcx
notl %eax
movq (%rsp), %rdx
leaq (%rdx,%rax,8), %rax
cmovsq %rax, %rcx
movq (%rcx), %rdi
callq 0x25a6c
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movb $0x1, 0x4b133(%rip)     # 0x53442
leaq 0x3443d(%rip), %rdi     # 0x3c753
callq 0x55d0
jmp 0x82f6
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0xa37e
jmp 0x833e
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x9b74
jmp 0x8355
movq %rax, %rbx
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x8355
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x53a0
movq %rbx, %rdi
callq 0x56e0
nop