// File: /workspace/github_cpp_makefile_star2_O2/Konano[P]UselessDatabase/Table.cpp
// Function: Table::checkWhere(Anys, WhereStmt&)
bool Table::checkWhere(Anys __data, WhereStmt &w) { // Database::checkWhere
    Anys data, _data;
    for (auto it: w.cols) data.push_back(__data[it.second]);
    switch (w.rvalue_ty) {
    case 0: {
        bool nl = true, nnl = true;
        for (uint i = 0; i < w.cols.size(); i++) {
            nl &= data[i].isNull();
            nnl &= !data[i].isNull();
        }
        return (w.op == OP_NL && nl) && (w.op == OP_NNL && nnl);
    }
    case 1: {
        for (auto it: w.rvalue) {
            _data.push_back(it);
        }
        return cmpCol(w.op, data, _data);
    }
    case 2: {
        for (auto it: w.rvalue_cols) {
            _data.push_back(__data[it.second]);
        }
        return cmpCol(w.op, data, _data);
    }
    case 3:
        if (w.op == OP_IN) w.any = true, w.op = OP_EQ;
        if (w.any || w.all) {
            return filterTable(w.rvalue_table)->cmpRecords(data, w.op, w.any, w.all);
        } else {
            return filterTable(w.rvalue_table)->cmpRecord(data, filterTable(w.rvalue_table)->val, w.op);
        }
    default:
        return false;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %rsi, %r14
movq %rdi, %r15
xorps %xmm0, %xmm0
leaq 0x40(%rsp), %r12
andq $0x0, 0x10(%r12)
movaps %xmm0, (%r12)
andq $0x0, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
movq (%rdx), %rbx
movq %rdx, 0x18(%rsp)
movq 0x8(%rdx), %rbp
leaq 0x10(%rsp), %r13
cmpq %rbp, %rbx
je 0x1f374
movl 0x4(%rbx), %eax
movq (%r14), %rcx
movq (%rcx,%rax,8), %rdi
testq %rdi, %rdi
je 0x1f34c
movq (%rdi), %rax
callq *0x10(%rax)
jmp 0x1f34e
xorl %eax, %eax
movq %rax, 0x10(%rsp)
movq %r12, %rdi
movq %r13, %rsi
callq 0x8ea0
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x1f36e
movq (%rdi), %rax
callq *0x8(%rax)
addq $0x8, %rbx
jmp 0x1f330
movq 0x18(%rsp), %r12
movl 0x20(%r12), %eax
cmpl $0x1, %eax
je 0x1f40a
cmpl $0x2, %eax
je 0x1f3b2
cmpl $0x3, %eax
jne 0x1f49c
cmpl $0x8, 0x18(%r12)
jne 0x1f4a0
movb $0x1, 0x1c(%r12)
andl $0x0, 0x18(%r12)
jmp 0x1f4b4
movq 0x40(%r12), %rbx
movq 0x48(%r12), %r13
leaq 0x20(%rsp), %r15
movq %rsp, %r12
cmpq %r13, %rbx
je 0x1f481
movl 0x4(%rbx), %eax
movq (%r14), %rcx
movq (%rcx,%rax,8), %rdi
testq %rdi, %rdi
je 0x1f3e4
movq (%rdi), %rax
callq *0x10(%rax)
jmp 0x1f3e6
xorl %eax, %eax
movq %rax, (%rsp)
movq %r15, %rdi
movq %r12, %rsi
callq 0x8ea0
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x1f404
movq (%rdi), %rax
callq *0x8(%rax)
addq $0x8, %rbx
jmp 0x1f3c4
movq 0x28(%r12), %r13
movq 0x30(%r12), %rbp
leaq 0x20(%rsp), %r15
leaq 0x8(%rsp), %r12
cmpq %rbp, %r13
je 0x1f481
movq (%r13), %rdi
movb $0x1, %bl
testq %rdi, %rdi
je 0x1f449
movq (%rdi), %rax
callq *0x10(%rax)
movq %rax, %r14
testq %rax, %rax
je 0x1f449
movq (%r14), %rax
movq %r14, %rdi
callq *0x10(%rax)
xorl %ebx, %ebx
jmp 0x1f44e
xorl %r14d, %r14d
xorl %eax, %eax
movq %rax, 0x8(%rsp)
movq %r15, %rdi
movq %r12, %rsi
callq 0x8ea0
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x1f46e
movq (%rdi), %rax
callq *0x8(%rax)
testb %bl, %bl
jne 0x1f47b
movq (%r14), %rax
movq %r14, %rdi
callq *0x8(%rax)
addq $0x8, %r13
jmp 0x1f41e
movq 0x18(%rsp), %rax
movl 0x18(%rax), %edi
leaq 0x40(%rsp), %rsi
leaq 0x20(%rsp), %rdx
callq 0x6a78
movl %eax, %ebx
jmp 0x1f511
xorl %ebx, %ebx
jmp 0x1f511
testb $0x1, 0x1c(%r12)
jne 0x1f4b4
cmpb $0x1, 0x1d(%r12)
jne 0x1f539
movslq 0x58(%r12), %rax
testq %rax, %rax
movq 0x38(%r15), %rcx
leaq 0x20(%rcx,%rax,8), %rdx
notl %eax
leaq 0x8848(%rcx,%rax,8), %rax
cmovsq %rax, %rdx
movq (%rdx), %r15
leaq 0x90(%rsp), %r14
leaq 0x40(%rsp), %rsi
movq %r14, %rdi
callq 0x9158
movl 0x18(%r12), %edx
movzbl 0x1c(%r12), %ecx
movzbl 0x1d(%r12), %r8d
movq %r15, %rdi
movq %r14, %rsi
callq 0x1f1b2
movl %eax, %ebx
movq %r14, %rdi
callq 0x9268
leaq 0x20(%rsp), %rdi
callq 0x9268
leaq 0x40(%rsp), %rdi
callq 0x9268
movl %ebx, %eax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x78(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0x9158
movslq 0x58(%r12), %rax
testq %rax, %rax
movq 0x38(%r15), %rcx
leaq 0x20(%rcx,%rax,8), %rdx
notl %eax
leaq 0x8848(%rcx,%rax,8), %rax
cmovsq %rax, %rdx
movl $0x9fd0, %esi           # imm = 0x9FD0
addq (%rdx), %rsi
leaq 0x60(%rsp), %rdi
callq 0x9158
movl 0x18(%r12), %ecx
leaq 0x78(%rsp), %r14
leaq 0x60(%rsp), %rdx
movq %r14, %rsi
callq 0x1f156
movl %eax, %ebx
leaq 0x60(%rsp), %rdi
callq 0x9268
jmp 0x1f509
movq %rax, %r15
leaq 0x60(%rsp), %rdi
callq 0x9268
jmp 0x1f5b3
movq %rax, %r15
leaq 0x78(%rsp), %rdi
jmp 0x1f5c5
movq %rax, %r15
leaq 0x90(%rsp), %rdi
callq 0x9268
jmp 0x1f617
jmp 0x1f5ff
movq %rax, %r15
jmp 0x1f5ee
jmp 0x1f5ff
jmp 0x1f5ff
movq %rax, %r15
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x1f5ea
movq (%rdi), %rax
callq *0x8(%rax)
testb %bl, %bl
jne 0x1f617
movq (%r14), %rax
movq %r14, %rdi
jmp 0x1f614
movq %rax, %r15
movq (%rsp), %rdi
jmp 0x1f60c
movq %rax, %r15
jmp 0x1f617
movq %rax, %r15
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x1f617
movq (%rdi), %rax
callq *0x8(%rax)
leaq 0x20(%rsp), %rdi
callq 0x9268
leaq 0x40(%rsp), %rdi
callq 0x9268
movq %r15, %rdi
callq 0x56f0
nop