// File: /workspace/github_cpp_makefile_star2_O1/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 %rdx, %rbx
movq %rsi, %r14
movq %rdi, 0x18(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x20(%rsp)
xorl %eax, %eax
movq %rax, 0x30(%rsp)
movq %rax, 0x50(%rsp)
movaps %xmm0, 0x40(%rsp)
movq (%rdx), %rbp
movq 0x8(%rdx), %r15
cmpq %r15, %rbp
je 0x26369
leaq 0x20(%rsp), %r12
leaq 0x10(%rsp), %r13
movl 0x4(%rbp), %eax
movq (%r14), %rcx
movq (%rcx,%rax,8), %rdi
testq %rdi, %rdi
je 0x2633e
movq (%rdi), %rax
callq *0x10(%rax)
jmp 0x26340
xorl %eax, %eax
movq %rax, 0x10(%rsp)
movq %r12, %rdi
movq %r13, %rsi
callq 0xa1bc
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x26360
movq (%rdi), %rax
callq *0x8(%rax)
addq $0x8, %rbp
cmpq %r15, %rbp
jne 0x26327
movl 0x20(%rbx), %eax
cmpl $0x1, %eax
je 0x2645d
cmpl $0x2, %eax
je 0x26401
cmpl $0x3, %eax
jne 0x264ea
cmpl $0x8, 0x18(%rbx)
jne 0x26398
movb $0x1, 0x1c(%rbx)
movl $0x0, 0x18(%rbx)
cmpb $0x0, 0x1c(%rbx)
jne 0x263a8
cmpb $0x1, 0x1d(%rbx)
jne 0x264ee
movslq 0x58(%rbx), %rax
testq %rax, %rax
movq 0x18(%rsp), %rcx
movq 0x38(%rcx), %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 0xa450
movl 0x18(%rbx), %edx
movzbl 0x1c(%rbx), %ecx
movzbl 0x1d(%rbx), %r8d
movq %r15, %rdi
movq %r14, %rsi
callq 0x2615a
movl %eax, %ebx
jmp 0x26553
movq 0x40(%rbx), %r13
movq 0x48(%rbx), %rbp
cmpq %rbp, %r13
je 0x264d4
leaq 0x40(%rsp), %r15
movq %rsp, %r12
movl 0x4(%r13), %eax
movq (%r14), %rcx
movq (%rcx,%rax,8), %rdi
testq %rdi, %rdi
je 0x26432
movq (%rdi), %rax
callq *0x10(%rax)
jmp 0x26434
xorl %eax, %eax
movq %rax, (%rsp)
movq %r15, %rdi
movq %r12, %rsi
callq 0xa1bc
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x26452
movq (%rdi), %rax
callq *0x8(%rax)
addq $0x8, %r13
cmpq %rbp, %r13
jne 0x2641a
jmp 0x264d4
movq 0x28(%rbx), %r13
movq 0x30(%rbx), %rbp
cmpq %rbp, %r13
je 0x264d4
leaq 0x40(%rsp), %r15
leaq 0x8(%rsp), %r12
movq (%r13), %rdi
testq %rdi, %rdi
je 0x26488
movq (%rdi), %rax
callq *0x10(%rax)
movq %rax, %r14
jmp 0x2648b
xorl %r14d, %r14d
testq %r14, %r14
je 0x2649b
movq (%r14), %rax
movq %r14, %rdi
callq *0x10(%rax)
jmp 0x2649d
xorl %eax, %eax
movq %rax, 0x8(%rsp)
movq %r15, %rdi
movq %r12, %rsi
callq 0xa1bc
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x264bd
movq (%rdi), %rax
callq *0x8(%rax)
testq %r14, %r14
je 0x264cb
movq (%r14), %rax
movq %r14, %rdi
callq *0x8(%rax)
addq $0x8, %r13
cmpq %rbp, %r13
jne 0x26474
movl 0x18(%rbx), %edi
leaq 0x20(%rsp), %rsi
leaq 0x40(%rsp), %rdx
callq 0x78c5
movl %eax, %ebx
jmp 0x2655b
xorl %ebx, %ebx
jmp 0x2655b
leaq 0x78(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0xa450
movslq 0x58(%rbx), %rax
testq %rax, %rax
movq 0x18(%rsp), %rcx
movq 0x38(%rcx), %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 0xa450
movl 0x18(%rbx), %ecx
leaq 0x78(%rsp), %r14
leaq 0x60(%rsp), %rdx
movq %r14, %rsi
callq 0x260f0
movl %eax, %ebx
leaq 0x60(%rsp), %rdi
callq 0xa564
movq %r14, %rdi
callq 0xa564
leaq 0x40(%rsp), %rdi
callq 0xa564
leaq 0x20(%rsp), %rdi
callq 0xa564
movl %ebx, %eax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0xa564
jmp 0x26595
movq %rax, %rbx
leaq 0x78(%rsp), %rdi
jmp 0x265a7
movq %rax, %rbx
leaq 0x90(%rsp), %rdi
callq 0xa564
jmp 0x265fa
jmp 0x265e2
jmp 0x265e2
movq %rax, %rbx
jmp 0x265cc
jmp 0x265e2
movq %rax, %rbx
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x265cc
movq (%rdi), %rax
callq *0x8(%rax)
testq %r14, %r14
je 0x265fa
movq (%r14), %rax
movq %r14, %rdi
jmp 0x265f7
movq %rax, %rbx
movq (%rsp), %rdi
jmp 0x265ef
movq %rax, %rbx
jmp 0x265fa
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x265fa
movq (%rdi), %rax
callq *0x8(%rax)
leaq 0x40(%rsp), %rdi
callq 0xa564
leaq 0x20(%rsp), %rdi
callq 0xa564
movq %rbx, %rdi
callq 0x56e0