// File: /workspace/github_cpp_makefile_star2_O3/zhengwangsun[P]pas2c/semantics.cpp
// Function: getIdTuple(int)
Tuple getIdTuple(int id_position)
{
    if(currentTable == "main")
    {
        for(vector<Tuple>::iterator it = mainTable.begin(); it != mainTable.end();it++)//遍历查重
        {
            if(it->name == tree.node[id_position].value)
            {
                return *it;
            }
        }
    }
    else
    {
        for(vector<subTableItem>::iterator it = subTable.begin(); it != subTable.end();it++)
        {
            if(it->name == currentTable)//找到当前子表
            {
                for(vector<Tuple>::iterator it0 = it->item.begin(); it0 != it->item.end();it0++)//遍历子表中的item
                {
                    if(it0->name == tree.node[id_position].value)
                    {
                        return *it0;
                    }
                }
            }
        }
    }
    
    Tuple errorTuple;
    errorTuple.name = "error!";
    return errorTuple;
    
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %esi, %r12d
movq %rdi, (%rsp)
leaq 0xa3ed2(%rip), %rdi     # 0xb2908
leaq 0x4b13(%rip), %rsi      # 0x13550
callq 0x2090
testl %eax, %eax
je 0xeb01
movq 0xa3e87(%rip), %r15     # 0xb28d8
movq 0xa3e88(%rip), %rax     # 0xb28e0
movq %rax, 0x10(%rsp)
cmpq %rax, %r15
je 0xeb63
movq 0xa3ea3(%rip), %r14     # 0xb2910
movq 0xa3e94(%rip), %rax     # 0xb2908
movq %rax, 0x8(%rsp)
movslq %r12d, %rax
imulq $0xa8, %rax, %rax
leaq 0xaa63e(%rip), %rcx     # 0xb90c8
leaq (%rcx,%rax), %rbx
addq $0x88, %rbx
cmpq %r14, 0x38(%r15)
jne 0xeaf4
testq %r14, %r14
je 0xeab5
movq 0x30(%r15), %rdi
movq 0x8(%rsp), %rsi
movq %r14, %rdx
callq 0x2240
testl %eax, %eax
jne 0xeaf4
movq (%r15), %r13
movq 0x8(%r15), %rbp
cmpq %rbp, %r13
je 0xeaf4
movq 0x8(%rbx), %r12
cmpq %r12, 0x8(%r13)
jne 0xeaeb
testq %r12, %r12
je 0xeba0
movq (%rbx), %rsi
movq (%r13), %rdi
movq %r12, %rdx
callq 0x2240
testl %eax, %eax
je 0xeba0
addq $0x50, %r13
cmpq %rbp, %r13
jne 0xeac5
addq $0x60, %r15
cmpq 0x10(%rsp), %r15
jne 0xea95
jmp 0xeb63
movq 0xa3db8(%rip), %r13     # 0xb28c0
movq 0xa3db9(%rip), %rbx     # 0xb28c8
cmpq %rbx, %r13
je 0xeb63
movslq %r12d, %rax
imulq $0xa8, %rax, %rax
leaq 0xaa5a3(%rip), %rcx     # 0xb90c8
leaq (%rcx,%rax), %r15
addq $0x88, %r15
movq 0x8(%r15), %r14
cmpq %r14, 0x8(%r13)
jne 0xeb5a
testq %r14, %r14
je 0xebdc
movq (%r15), %rsi
movq (%r13), %rdi
movq %r14, %rdx
callq 0x2240
testl %eax, %eax
je 0xebdc
addq $0x50, %r13
cmpq %rbx, %r13
jne 0xeb34
movq (%rsp), %r15
leaq 0x10(%r15), %rax
movq %rax, (%r15)
xorl %eax, %eax
movq %rax, 0x8(%r15)
movb $0x0, 0x10(%r15)
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%r15)
movq %rax, 0x40(%r15)
leaq 0x4dbb(%rip), %rcx      # 0x13947
movl $0x6, %r8d
movq %r15, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x2330
jmp 0xec1e
movq (%rsp), %r15
leaq 0x10(%r15), %rbx
movq %rbx, (%r15)
movq (%r13), %rsi
addq %rsi, %r12
movq %r15, %rdi
movq %r12, %rdx
callq 0x7666
movl 0x28(%r13), %eax
movl %eax, 0x28(%r15)
movq 0x20(%r13), %rax
movq %rax, 0x20(%r15)
leaq 0x30(%r15), %rdi
leaq 0x30(%r13), %rsi
callq 0xf48a
jmp 0xec16
movq (%rsp), %r15
leaq 0x10(%r15), %rbx
movq %rbx, (%r15)
movq (%r13), %rsi
addq %rsi, %r14
movq %r15, %rdi
movq %r14, %rdx
callq 0x7666
movl 0x28(%r13), %eax
movl %eax, 0x28(%r15)
movq 0x20(%r13), %rax
movq %rax, 0x20(%r15)
leaq 0x30(%r15), %rdi
leaq 0x30(%r13), %rsi
callq 0xf48a
movl 0x48(%r13), %eax
movl %eax, 0x48(%r15)
movq %r15, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xec32
movq %rax, %r14
movq (%r15), %rdi
cmpq %rbx, %rdi
je 0xec55
movq (%rbx), %rsi
incq %rsi
callq 0x2230
jmp 0xec55
movq %rax, %r14
movq %r15, %rdi
callq 0xf456
movq %r14, %rdi
callq 0x23a0