// File: /workspace/github_cpp_makefile_star2_O1/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, (%rsp)
movl %edx, 0x14(%rsp)
movq %rdi, %rbx
movl %esi, 0x4(%rsp)
movl %esi, %ecx
movq %rcx, 0x18(%rsp)
shlq $0x7, %rcx
movq 0x898(%rdi,%rcx), %r12
movq %rcx, 0x8(%rsp)
movq 0x8a0(%rdi,%rcx), %r15
cmpq %r15, %r12
sete %r13b
je 0x81b4
leaq 0x20(%rsp), %rbp
movq %rbp, %rdi
movq %r12, %rsi
callq 0xa91e
movl 0x20(%r12), %eax
leaq 0x38(%rsp), %rcx
movl %eax, 0x8(%rcx)
movq 0x18(%r12), %rax
movq %rax, (%rcx)
addq $0x28, %r12
leaq 0x48(%rsp), %rdi
movq %r12, %rsi
callq 0xa450
addq $0x18, %r12
leaq 0x60(%rsp), %rdi
movq %r12, %rsi
callq 0xa91e
movl 0x18(%r12), %eax
movl %eax, 0x78(%rsp)
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x792e
movl %eax, %r14d
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0x8171
movq 0x70(%rsp), %rsi
subq %rdi, %rsi
callq 0x53a0
leaq 0x48(%rsp), %rdi
callq 0xa564
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x8192
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x53a0
testb %r14b, %r14b
je 0x81aa
addq $0x20, %r12
cmpq %r15, %r12
sete %r13b
jne 0x8101
jmp 0x81b4
testb $0x1, %r13b
je 0x83a5
movq 0x8(%rsp), %rax
leaq (%rbx,%rax), %r14
addq $0x848, %r14            # imm = 0x848
movl 0x14(%rsp), %r12d
movl %r12d, %eax
movq 0x38(%r14), %rcx
movq 0x40(%r14), %rdx
subq %rcx, %rdx
sarq $0x3, %rdx
movabsq $-0x3333333333333333, %rsi # imm = 0xCCCCCCCCCCCCCCCD
imulq %rdx, %rsi
cmpq %rax, %rsi
jne 0x82f7
movq %rbx, %rdi
movl 0x4(%rsp), %esi
callq 0x7d4e
cmpb $0x0, (%rsp)
je 0x83a5
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 0x83a5
movl $0x32, %esi
callq 0x25a68
testb %al, %al
je 0x83a5
leaq 0x354b4(%rip), %rdi     # 0x3d6f9
callq 0x55d0
leaq 0x20(%rsp), %rbx
leaq 0x80(%rsp), %r14
xorl %edi, %edi
movq %rbx, %rsi
callq 0x5410
movb $-0x1, %r15b
testl %eax, %eax
js 0x82d4
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 0x82d4
callq 0x5500
movl %eax, %ebp
xorl %edi, %edi
xorl %esi, %esi
movq %r14, %rdx
callq 0x54b0
movl $0xff, %r15d
testl %eax, %eax
js 0x82d4
movl %ebp, %r15d
cmpb $0x71, %r15b
je 0x83b7
movzbl %r15b, %eax
cmpl $0x63, %eax
jne 0x8257
leaq 0x35434(%rip), %rdi     # 0x3d726
jmp 0x83c5
leaq (%rax,%rax,4), %r15
movslq (%rcx,%r15,8), %rax
leaq 0x8848(%rbx), %rcx
movq %rcx, 0x8(%rsp)
leaq 0x20(%rbx), %r13
testq %rax, %rax
leaq 0x20(%rbx,%rax,8), %rcx
notl %eax
cltq
leaq 0x8848(%rbx,%rax,8), %rax
cmovsq %rax, %rcx
movq (%rcx), %rdi
callq 0x26064
incl %r12d
movzbl (%rsp), %ebp
movq 0x38(%r14), %rax
movslq (%rax,%r15,8), %rax
testq %rax, %rax
leaq (%r13,%rax,8), %rcx
notl %eax
cltq
movq 0x8(%rsp), %rdx
leaq (%rdx,%rax,8), %rax
cmovsq %rax, %rcx
movq (%rcx), %rdi
callq 0x2607c
testb %al, %al
je 0x837d
movq %rbx, %rdi
movl 0x4(%rsp), %esi
movl %r12d, %edx
movl %ebp, %ecx
callq 0x80b0
cmpb $0x1, 0x4c0c7(%rip)     # 0x54442
jne 0x8336
movq 0x38(%r14), %rax
movslq (%rax,%r15,8), %rax
testq %rax, %rax
leaq 0x20(%rbx,%rax,8), %rcx
notl %eax
cltq
leaq 0x8848(%rbx,%rax,8), %rax
cmovsq %rax, %rcx
movq (%rcx), %rdi
callq 0x2606c
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movb $0x1, 0x4c084(%rip)     # 0x54442
leaq 0x3538e(%rip), %rdi     # 0x3d753
callq 0x55d0
jmp 0x83a5
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0xa564
jmp 0x83ed
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x9cb2
jmp 0x8404
movq %rax, %rbx
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x8404
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x53a0
movq %rbx, %rdi
callq 0x56e0