// File: /workspace/github_cpp_makefile_star2_O3/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
movaps %xmm0, 0x20(%rsp)
xorl %eax, %eax
movq %rax, 0x30(%rsp)
movq %rax, 0x50(%rsp)
movaps %xmm0, 0x40(%rsp)
movq (%rdx), %rbx
movq %rdx, 0x18(%rsp)
movq 0x8(%rdx), %rbp
cmpq %rbp, %rbx
je 0x25d65
leaq 0x20(%rsp), %r12
leaq 0x10(%rsp), %r13
movl 0x4(%rbx), %eax
movq (%r14), %rcx
movq (%rcx,%rax,8), %rdi
testq %rdi, %rdi
je 0x25d3a
movq (%rdi), %rax
callq *0x10(%rax)
jmp 0x25d3c
xorl %eax, %eax
movq %rax, 0x10(%rsp)
movq %r12, %rdi
movq %r13, %rsi
callq 0x9f9a
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x25d5c
movq (%rdi), %rax
callq *0x8(%rax)
addq $0x8, %rbx
cmpq %rbp, %rbx
jne 0x25d23
movq 0x18(%rsp), %r12
movl 0x20(%r12), %eax
cmpl $0x1, %eax
je 0x25e03
cmpl $0x2, %eax
je 0x25da6
cmpl $0x3, %eax
jne 0x25e98
cmpl $0x8, 0x18(%r12)
jne 0x25e9c
movb $0x1, 0x1c(%r12)
movl $0x0, 0x18(%r12)
jmp 0x25eb0
movq 0x40(%r12), %rbx
movq 0x48(%r12), %r13
cmpq %r13, %rbx
je 0x25e7d
leaq 0x40(%rsp), %r15
movq %rsp, %r12
movl 0x4(%rbx), %eax
movq (%r14), %rcx
movq (%rcx,%rax,8), %rdi
testq %rdi, %rdi
je 0x25dd8
movq (%rdi), %rax
callq *0x10(%rax)
jmp 0x25dda
xorl %eax, %eax
movq %rax, (%rsp)
movq %r15, %rdi
movq %r12, %rsi
callq 0x9f9a
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x25df8
movq (%rdi), %rax
callq *0x8(%rax)
addq $0x8, %rbx
cmpq %r13, %rbx
jne 0x25dc1
jmp 0x25e7d
movq 0x28(%r12), %r13
movq 0x30(%r12), %rbp
cmpq %rbp, %r13
je 0x25e7d
leaq 0x40(%rsp), %r15
leaq 0x8(%rsp), %r12
movq (%r13), %rdi
movb $0x1, %bl
testq %rdi, %rdi
je 0x25e42
movq (%rdi), %rax
callq *0x10(%rax)
movq %rax, %r14
testq %rax, %rax
je 0x25e42
movq (%r14), %rax
movq %r14, %rdi
callq *0x10(%rax)
xorl %ebx, %ebx
jmp 0x25e47
xorl %r14d, %r14d
xorl %eax, %eax
movq %rax, 0x8(%rsp)
movq %r15, %rdi
movq %r12, %rsi
callq 0x9f9a
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x25e67
movq (%rdi), %rax
callq *0x8(%rax)
testb %bl, %bl
jne 0x25e74
movq (%r14), %rax
movq %r14, %rdi
callq *0x8(%rax)
addq $0x8, %r13
cmpq %rbp, %r13
jne 0x25e1c
movq 0x18(%rsp), %rax
movl 0x18(%rax), %edi
leaq 0x20(%rsp), %rsi
leaq 0x40(%rsp), %rdx
callq 0x78a9
movl %eax, %ebx
jmp 0x25f0d
xorl %ebx, %ebx
jmp 0x25f0d
testb $0x1, 0x1c(%r12)
jne 0x25eb0
cmpb $0x1, 0x1d(%r12)
jne 0x25f35
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 0x20(%rsp), %rsi
movq %r14, %rdi
callq 0xa26a
movl 0x18(%r12), %edx
movzbl 0x1c(%r12), %ecx
movzbl 0x1d(%r12), %r8d
movq %r15, %rdi
movq %r14, %rsi
callq 0x25b5a
movl %eax, %ebx
movq %r14, %rdi
callq 0xa37e
leaq 0x40(%rsp), %rdi
callq 0xa37e
leaq 0x20(%rsp), %rdi
callq 0xa37e
movl %ebx, %eax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x78(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0xa26a
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 0xa26a
movl 0x18(%r12), %ecx
leaq 0x78(%rsp), %r14
leaq 0x60(%rsp), %rdx
movq %r14, %rsi
callq 0x25af0
movl %eax, %ebx
leaq 0x60(%rsp), %rdi
callq 0xa37e
jmp 0x25f05
movq %rax, %r15
leaq 0x60(%rsp), %rdi
callq 0xa37e
jmp 0x25faf
movq %rax, %r15
leaq 0x78(%rsp), %rdi
jmp 0x25fc1
movq %rax, %r15
leaq 0x90(%rsp), %rdi
callq 0xa37e
jmp 0x26013
jmp 0x25ffb
movq %rax, %r15
jmp 0x25fea
jmp 0x25ffb
jmp 0x25ffb
movq %rax, %r15
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x25fe6
movq (%rdi), %rax
callq *0x8(%rax)
testb %bl, %bl
jne 0x26013
movq (%r14), %rax
movq %r14, %rdi
jmp 0x26010
movq %rax, %r15
movq (%rsp), %rdi
jmp 0x26008
movq %rax, %r15
jmp 0x26013
movq %rax, %r15
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x26013
movq (%rdi), %rax
callq *0x8(%rax)
leaq 0x40(%rsp), %rdi
callq 0xa37e
leaq 0x20(%rsp), %rdi
callq 0xa37e
movq %r15, %rdi
callq 0x56e0
nop