// File: /workspace/github_cpp_makefile_star2_O1/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 $0x38, %rsp
movl %esi, %ebp
movq %rdi, 0x10(%rsp)
leaq 0xa4ba7(%rip), %rdi     # 0xb3908
leaq 0x57b8(%rip), %rsi      # 0x14520
callq 0x2090
testl %eax, %eax
je 0xeeba
movq 0xa4b5c(%rip), %r12     # 0xb38d8
cmpq 0xa4b5d(%rip), %r12     # 0xb38e0
sete %dl
je 0xef77
movslq %ebp, %rax
imulq $0xa8, %rax, %rax
leaq 0xab32b(%rip), %rcx     # 0xba0c8
addq %rcx, %rax
addq $0x88, %rax
movq %rax, 0x20(%rsp)
movq 0x10(%rsp), %rax
leaq 0x10(%rax), %rcx
movq %rcx, 0x18(%rsp)
leaq 0x20(%rax), %rcx
movq %rcx, 0x30(%rsp)
addq $0x30, %rax
movq %rax, 0x28(%rsp)
movb %dl, 0xf(%rsp)
movq 0x38(%r12), %rdx
cmpq 0xa4b35(%rip), %rdx     # 0xb3910
jne 0xeea1
testq %rdx, %rdx
je 0xedff
movq 0xa4b1b(%rip), %rsi     # 0xb3908
movq 0x30(%r12), %rdi
callq 0x2240
testl %eax, %eax
jne 0xeea1
movq (%r12), %r14
movq 0x8(%r12), %rbp
cmpq %rbp, %r14
sete %bl
je 0xeea1
movq 0x20(%rsp), %rax
movq 0x8(%rax), %r13
movq 0x8(%r14), %r15
cmpq %r13, %r15
jne 0xee42
testq %r15, %r15
je 0xee50
movq 0x20(%rsp), %rax
movq (%rax), %rsi
movq (%r14), %rdi
movq %r15, %rdx
callq 0x2240
testl %eax, %eax
je 0xee50
addq $0x50, %r14
cmpq %rbp, %r14
sete %bl
jne 0xee1d
jmp 0xeea1
movq 0x10(%rsp), %r13
movq 0x18(%rsp), %rax
movq %rax, (%r13)
movq (%r14), %rsi
addq %rsi, %r15
movq %r13, %rdi
movq %r15, %rdx
callq 0x768e
movl 0x28(%r14), %eax
movq 0x30(%rsp), %rcx
movl %eax, 0x8(%rcx)
movq 0x20(%r14), %rax
movq %rax, (%rcx)
leaq 0x30(%r14), %rsi
movq 0x28(%rsp), %rdi
callq 0xf89c
movl 0x48(%r14), %eax
movl %eax, 0x48(%r13)
testb $0x1, %bl
je 0xef70
addq $0x60, %r12
cmpq 0xa4a34(%rip), %r12     # 0xb38e0
sete %dl
jne 0xedcb
jmp 0xef77
movq 0xa49ff(%rip), %r15     # 0xb38c0
movq 0xa4a00(%rip), %rbx     # 0xb38c8
cmpq %rbx, %r15
sete %r12b
je 0xef77
movslq %ebp, %rax
imulq $0xa8, %rax, %rax
leaq 0xab1e2(%rip), %rcx     # 0xba0c8
leaq (%rcx,%rax), %r13
addq $0x88, %r13
movq 0x8(%r13), %rbp
movq 0x8(%r15), %r14
cmpq %rbp, %r14
jne 0xef16
testq %r14, %r14
je 0xef25
movq (%r13), %rsi
movq (%r15), %rdi
movq %r14, %rdx
callq 0x2240
testl %eax, %eax
je 0xef25
addq $0x50, %r15
cmpq %rbx, %r15
sete %r12b
jne 0xeef5
jmp 0xef77
movq 0x10(%rsp), %r13
leaq 0x10(%r13), %rbx
movq %rbx, (%r13)
movq (%r15), %rsi
addq %rsi, %r14
movq %r13, %rdi
movq %r14, %rdx
callq 0x768e
movl 0x28(%r15), %eax
movl %eax, 0x28(%r13)
movq 0x20(%r15), %rax
movq %rax, 0x20(%r13)
leaq 0x30(%r13), %rdi
leaq 0x30(%r15), %rsi
callq 0xf89c
movl 0x48(%r15), %eax
movl %eax, 0x48(%r13)
testb $0x1, %r12b
jne 0xef77
jmp 0xefae
testb $0x1, 0xf(%rsp)
je 0xefae
movq 0x10(%rsp), %rdi
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
xorl %eax, %eax
movq %rax, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%rdi)
movq %rax, 0x40(%rdi)
leaq 0x5978(%rip), %rcx      # 0x14917
movl $0x6, %r8d
xorl %esi, %esi
xorl %edx, %edx
callq 0x2330
movq 0x10(%rsp), %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq (%r13), %rdi
cmpq %rbx, %rdi
je 0xf000
movq (%rbx), %rsi
jmp 0xeff8
movq %rax, %r14
movq 0x10(%rsp), %rdi
callq 0xf868
jmp 0xf000
movq %rax, %r14
movq (%r13), %rdi
cmpq 0x18(%rsp), %rdi
je 0xf000
movq 0x18(%rsp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x2230
movq %r14, %rdi
callq 0x23a0