// File: /workspace/github_cpp_makefile_star2_O1/zhengwangsun[P]pas2c/semantics.cpp
// Function: variable1(int)
void variable1(int k)
{
	TreeNode tNode= tree.node[k];
	TreeNode childNode;
    if(lookahead(k) == 110)//110是[
    {
    	code[currentLine].append("[");
        if(expression(tree.node[k].child[1], 0) == 1)//下标必须是整数,expression里面标志位为0对吗
        {
            //[]内类型正确
            code[currentLine].append("]");
        }
        else
        {
            cout<<"subscript wrong where variable1"<<endl;//数组下标错误
        }
    }
    else if(lookahead(k) == 106)//106是e
    {

    }
    else
    {
        cout<<"variable' error!"<<endl;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x158, %rsp            # imm = 0x158
movslq %edi, %rax
imulq $0xa8, %rax, %rax
leaq 0xadb9e(%rip), %r14     # 0xba0c8
leaq (%r14,%rax), %rbx
addq $0x8, %rbx
leaq 0x8(%rsp), %rax
movl $0xb, %ecx
movq %rax, %rdi
movq %rbx, %rsi
rep  movsq (%rsi), %es:(%rdi)
movb 0x58(%rbx), %cl
movb %cl, 0x58(%rax)
leaq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %r15
movq %r15, -0x10(%r15)
movq 0x60(%rbx), %rsi
movq 0x68(%rbx), %rdx
addq %rsi, %rdx
callq 0x768e
leaq 0x88(%rsp), %rdi
leaq 0x98(%rsp), %r12
movq %r12, -0x10(%r12)
movq 0x80(%rbx), %rsi
movq 0x88(%rbx), %rdx
addq %rsi, %rdx
callq 0x768e
movq 0xa0(%rbx), %rax
movq %rax, 0xa8(%rsp)
leaq 0x120(%rsp), %r13
movq %r13, -0x10(%r13)
xorl %eax, %eax
movq %rax, -0x8(%r13)
movb %al, (%r13)
leaq 0x140(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq %rax, -0x8(%rbp)
movb %al, (%rbp)
movl (%rbx), %eax
movl $0x10, %edx
leaq 0x8333(%rip), %rsi      # 0x1490d
testl %eax, %eax
jle 0xc669
movslq 0x4(%rbx), %rcx
imulq $0xa8, %rcx, %rcx
cmpl $0x6e, 0x5c(%r14,%rcx)
jne 0xc644
movslq 0xa7fb4(%rip), %rdi     # 0xb45b0
shlq $0x5, %rdi
leaq 0xa7329(%rip), %r14     # 0xb3930
addq %r14, %rdi
leaq 0x7c5f(%rip), %rsi      # 0x14270
callq 0x23d0
movl 0x8(%rbx), %edi
xorl %esi, %esi
callq 0xc280
cmpl $0x1, %eax
jne 0xc65d
movslq 0xa7f84(%rip), %rax     # 0xb45b0
shlq $0x5, %rax
addq %rax, %r14
leaq 0x7c38(%rip), %rsi      # 0x14272
movq %r14, %rdi
callq 0x23d0
jmp 0xc6a3
testl %eax, %eax
jle 0xc669
movslq 0x4(%rbx), %rax
imulq $0xa8, %rax, %rax
cmpl $0x6a, 0x5c(%r14,%rax)
jne 0xc669
jmp 0xc6a3
movl $0x1f, %edx
leaq 0x8284(%rip), %rsi      # 0x148ed
movq 0xd960(%rip), %rbx      # 0x19fd0
movq %rbx, %rdi
callq 0x2280
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x2200
movsbl %al, %esi
movq 0xd93a(%rip), %rdi      # 0x19fd0
callq 0x2030
movq %rax, %rdi
callq 0x2150
movq 0x130(%rsp), %rdi
cmpq %rbp, %rdi
je 0xc6c0
movq 0x140(%rsp), %rsi
incq %rsi
callq 0x2230
movq 0x110(%rsp), %rdi
cmpq %r13, %rdi
je 0xc6dd
movq 0x120(%rsp), %rsi
incq %rsi
callq 0x2230
movq 0x88(%rsp), %rdi
cmpq %r12, %rdi
je 0xc6fa
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x2230
movq 0x68(%rsp), %rdi
cmpq %r15, %rdi
je 0xc711
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x2230
addq $0x158, %rsp            # imm = 0x158
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x68(%rsp), %rdi
cmpq %r15, %rdi
je 0xc759
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x2230
jmp 0xc759
movq %rax, %rbx
leaq 0xb0(%rsp), %rdi
callq 0xf7a8
leaq 0x8(%rsp), %rdi
callq 0xf7a8
movq %rbx, %rdi
callq 0x23a0