// File: 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
movq %rsp, %rbp
subq $0xf0, %rsp
movb %cl, %al
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
andb $0x1, %al
movb %al, -0x11(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0xb0(%rbp)
addq $0x848, %rax            # imm = 0x848
movl -0xc(%rbp), %ecx
shlq $0x7, %rcx
addq %rcx, %rax
addq $0x50, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
callq 0xce20
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rdi
callq 0xce50
movq %rax, -0x30(%rbp)
leaq -0x28(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0xce80
testb $0x1, %al
jne 0x960f
jmp 0x96bf
leaq -0x28(%rbp), %rdi
callq 0xcec0
movq %rax, %rsi
leaq -0x90(%rbp), %rdi
movq %rdi, -0xc0(%rbp)
callq 0xcee0
movq -0xb0(%rbp), %rdi
movq -0xc0(%rbp), %rsi
callq 0x87e0
movb %al, -0xb1(%rbp)
jmp 0x9649
movb -0xb1(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x9688
movl $0x1, -0xa0(%rbp)
jmp 0x9692
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
leaq -0x90(%rbp), %rdi
callq 0xcfa0
jmp 0x9b06
movl $0x0, -0xa0(%rbp)
leaq -0x90(%rbp), %rdi
callq 0xcfa0
movl -0xa0(%rbp), %eax
testl %eax, %eax
je 0x96af
jmp 0x96aa
jmp 0x9afd
jmp 0x96b1
leaq -0x28(%rbp), %rdi
callq 0xcfe0
jmp 0x95f9
movq -0xb0(%rbp), %rdi
movl -0x10(%rbp), %eax
movq %rax, -0xc8(%rbp)
addq $0x848, %rdi            # imm = 0x848
movl -0xc(%rbp), %eax
shlq $0x7, %rax
addq %rax, %rdi
addq $0x38, %rdi
callq 0xd000
movq %rax, %rcx
movq -0xc8(%rbp), %rax
cmpq %rcx, %rax
jne 0x97bc
movq -0xb0(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x90c0
testb $0x1, -0x11(%rbp)
je 0x97b7
movq -0xb0(%rbp), %rax
movl -0xc(%rbp), %ecx
movq 0x8848(%rax,%rcx,8), %rax
movl 0x9fa0(%rax), %eax
movl $0x32, %ecx
xorl %edx, %edx
divl %ecx
cmpl $0x0, %edx
jne 0x97b7
movq -0xb0(%rbp), %rax
movl -0xc(%rbp), %ecx
movq 0x8848(%rax,%rcx,8), %rdi
movl $0x32, %esi
callq 0x4e6b0
testb $0x1, %al
jne 0x975e
jmp 0x97b7
leaq 0x752d8(%rip), %rdi     # 0x7ea3d
callq 0x6780
callq 0xd030
movb %al, -0xa1(%rbp)
movsbl -0xa1(%rbp), %eax
cmpl $0x63, %eax
jne 0x978f
leaq 0x752e2(%rip), %rdi     # 0x7ea6a
callq 0x6780
jmp 0x97b5
movsbl -0xa1(%rbp), %eax
cmpl $0x71, %eax
jne 0x97b3
movb $0x1, 0xa7da0(%rip)     # 0xb1542
leaq 0x752ee(%rip), %rdi     # 0x7ea97
callq 0x6780
jmp 0x9afd
jmp 0x976a
jmp 0x97b7
jmp 0x9afd
movq -0xb0(%rbp), %rdi
addq $0x848, %rdi            # imm = 0x848
movl -0xc(%rbp), %eax
shlq $0x7, %rax
addq %rax, %rdi
addq $0x38, %rdi
movl -0x10(%rbp), %eax
movl %eax, %esi
callq 0xd0d0
cmpl $0x0, (%rax)
jge 0x9832
movq -0xb0(%rbp), %rdi
addq $0x848, %rdi            # imm = 0x848
movl -0xc(%rbp), %eax
shlq $0x7, %rax
addq %rax, %rdi
addq $0x38, %rdi
movl -0x10(%rbp), %eax
movl %eax, %esi
callq 0xd0d0
movq %rax, %rdx
movq -0xb0(%rbp), %rax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
subl (%rdx), %ecx
movslq %ecx, %rcx
movq 0x8848(%rax,%rcx,8), %rax
movq %rax, -0xd0(%rbp)
jmp 0x9871
movq -0xb0(%rbp), %rdi
addq $0x848, %rdi            # imm = 0x848
movl -0xc(%rbp), %eax
shlq $0x7, %rax
addq %rax, %rdi
addq $0x38, %rdi
movl -0x10(%rbp), %eax
movl %eax, %esi
callq 0xd0d0
movq %rax, %rcx
movq -0xb0(%rbp), %rax
movslq (%rcx), %rcx
movq 0x20(%rax,%rcx,8), %rax
movq %rax, -0xd0(%rbp)
movq -0xd0(%rbp), %rdi
callq 0x4f020
movq -0xb0(%rbp), %rdi
addq $0x848, %rdi            # imm = 0x848
movl -0xc(%rbp), %eax
shlq $0x7, %rax
addq %rax, %rdi
addq $0x38, %rdi
movl -0x10(%rbp), %eax
movl %eax, %esi
callq 0xd0d0
cmpl $0x0, (%rax)
jge 0x98f3
movq -0xb0(%rbp), %rdi
addq $0x848, %rdi            # imm = 0x848
movl -0xc(%rbp), %eax
shlq $0x7, %rax
addq %rax, %rdi
addq $0x38, %rdi
movl -0x10(%rbp), %eax
movl %eax, %esi
callq 0xd0d0
movq %rax, %rdx
movq -0xb0(%rbp), %rax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
subl (%rdx), %ecx
movslq %ecx, %rcx
movq 0x8848(%rax,%rcx,8), %rax
movq %rax, -0xd8(%rbp)
jmp 0x9932
movq -0xb0(%rbp), %rdi
addq $0x848, %rdi            # imm = 0x848
movl -0xc(%rbp), %eax
shlq $0x7, %rax
addq %rax, %rdi
addq $0x38, %rdi
movl -0x10(%rbp), %eax
movl %eax, %esi
callq 0xd0d0
movq %rax, %rcx
movq -0xb0(%rbp), %rax
movslq (%rcx), %rcx
movq 0x20(%rax,%rcx,8), %rax
movq %rax, -0xd8(%rbp)
movq -0xd8(%rbp), %rdi
callq 0x4f080
testb $0x1, %al
jne 0x9947
jmp 0x9a3c
movq -0xb0(%rbp), %rdi
movl -0xc(%rbp), %esi
movl -0x10(%rbp), %edx
addl $0x1, %edx
movb -0x11(%rbp), %al
andb $0x1, %al
movzbl %al, %ecx
callq 0x95a0
testb $0x1, 0xa7bd7(%rip)     # 0xb1542
je 0x9a37
movq -0xb0(%rbp), %rdi
addq $0x848, %rdi            # imm = 0x848
movl -0xc(%rbp), %eax
shlq $0x7, %rax
addq %rax, %rdi
addq $0x38, %rdi
movl -0x10(%rbp), %eax
movl %eax, %esi
callq 0xd0d0
cmpl $0x0, (%rax)
jge 0x99e7
movq -0xb0(%rbp), %rdi
addq $0x848, %rdi            # imm = 0x848
movl -0xc(%rbp), %eax
shlq $0x7, %rax
addq %rax, %rdi
addq $0x38, %rdi
movl -0x10(%rbp), %eax
movl %eax, %esi
callq 0xd0d0
movq %rax, %rdx
movq -0xb0(%rbp), %rax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
subl (%rdx), %ecx
movslq %ecx, %rcx
movq 0x8848(%rax,%rcx,8), %rax
movq %rax, -0xe0(%rbp)
jmp 0x9a26
movq -0xb0(%rbp), %rdi
addq $0x848, %rdi            # imm = 0x848
movl -0xc(%rbp), %eax
shlq $0x7, %rax
addq %rax, %rdi
addq $0x38, %rdi
movl -0x10(%rbp), %eax
movl %eax, %esi
callq 0xd0d0
movq %rax, %rcx
movq -0xb0(%rbp), %rax
movslq (%rcx), %rcx
movq 0x20(%rax,%rcx,8), %rax
movq %rax, -0xe0(%rbp)
movq -0xe0(%rbp), %rdi
callq 0x4f040
jmp 0x9afd
jmp 0x987d
movq -0xb0(%rbp), %rdi
addq $0x848, %rdi            # imm = 0x848
movl -0xc(%rbp), %eax
shlq $0x7, %rax
addq %rax, %rdi
addq $0x38, %rdi
movl -0x10(%rbp), %eax
movl %eax, %esi
callq 0xd0d0
cmpl $0x0, (%rax)
jge 0x9ab2
movq -0xb0(%rbp), %rdi
addq $0x848, %rdi            # imm = 0x848
movl -0xc(%rbp), %eax
shlq $0x7, %rax
addq %rax, %rdi
addq $0x38, %rdi
movl -0x10(%rbp), %eax
movl %eax, %esi
callq 0xd0d0
movq %rax, %rdx
movq -0xb0(%rbp), %rax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
subl (%rdx), %ecx
movslq %ecx, %rcx
movq 0x8848(%rax,%rcx,8), %rax
movq %rax, -0xe8(%rbp)
jmp 0x9af1
movq -0xb0(%rbp), %rdi
addq $0x848, %rdi            # imm = 0x848
movl -0xc(%rbp), %eax
shlq $0x7, %rax
addq %rax, %rdi
addq $0x38, %rdi
movl -0x10(%rbp), %eax
movl %eax, %esi
callq 0xd0d0
movq %rax, %rcx
movq -0xb0(%rbp), %rax
movslq (%rcx), %rcx
movq 0x20(%rax,%rcx,8), %rax
movq %rax, -0xe8(%rbp)
movq -0xe8(%rbp), %rdi
callq 0x4f040
addq $0xf0, %rsp
popq %rbp
retq
movq -0x98(%rbp), %rdi
callq 0x6890
nopw %cs:(%rax,%rax)