// File: zhengwangsun[P]pas2c/semantics.cpp
// Function: expression_list1(int, int)
int expression_list1(int k,int useFlag)
{
	TreeNode tNode= tree.node[k];
	TreeNode childNode;
	
    int flag1, flag2;
    if(lookahead(k) == 105)//105是,
    {
    	code[currentLine].append(",");
        flag1 = expression(tree.node[k].child[1],useFlag);
        if (useFlag == 3)//说明是函数调用，将读到的表达式类型记录在procArgument里面
        {
            procArgument.push_back(flag1);
        }
        
        flag2 = expression_list1(tree.node[k].child[2],useFlag);
        
        if (flag1 != -1 && flag2 != -1)//都不是-1
            return flag1;//将flag1的值返回，剩下的可以再递归看
        else
        {
            cout<<"type not match where expression_list'"<<endl;
            return -1;
        }
    }
    else if(lookahead(k) == 106)//106是e
    {
        return 0;
    }
    else
    {
        cout<<"expr_list' error!"<<endl;
        return -1;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1a0, %rsp            # imm = 0x1A0
movl %edi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movslq -0x8(%rbp), %rax
imulq $0xa8, %rax, %rcx
leaq 0xb4585(%rip), %rax     # 0xc6138
leaq 0x8(%rax,%rcx), %rsi
leaq -0xb8(%rbp), %rdi
callq 0x14920
leaq -0x160(%rbp), %rdi
callq 0x149d0
movl -0x8(%rbp), %edi
callq 0xca50
movl %eax, -0x17c(%rbp)
jmp 0x11be0
movl -0x17c(%rbp), %eax
cmpl $0x69, %eax
jne 0x11d30
movslq 0xaea2a(%rip), %rax     # 0xc0620
shlq $0x5, %rax
leaq 0xadd9f(%rip), %rdi     # 0xbf9a0
addq %rax, %rdi
leaq 0xce00(%rip), %rsi      # 0x1ea0b
callq 0x3490
jmp 0x11c12
movslq -0x8(%rbp), %rax
imulq $0xa8, %rax, %rcx
leaq 0xb4514(%rip), %rax     # 0xc6138
movl 0x10(%rax,%rcx), %edi
movl -0xc(%rbp), %esi
callq 0x11130
movl %eax, -0x180(%rbp)
jmp 0x11c38
movl -0x180(%rbp), %eax
movl %eax, -0x164(%rbp)
cmpl $0x3, -0xc(%rbp)
jne 0x11c90
leaq 0xadd0f(%rip), %rdi     # 0xbf960
leaq -0x164(%rbp), %rsi
callq 0x14d90
jmp 0x11c5f
jmp 0x11c90
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x170(%rbp)
movl %eax, -0x174(%rbp)
leaq -0x160(%rbp), %rdi
callq 0x14a90
leaq -0xb8(%rbp), %rdi
callq 0x14a90
jmp 0x11dc4
movslq -0x8(%rbp), %rax
imulq $0xa8, %rax, %rcx
leaq 0xb4496(%rip), %rax     # 0xc6138
movl 0x14(%rax,%rcx), %edi
movl -0xc(%rbp), %esi
callq 0x11b90
movl %eax, -0x184(%rbp)
jmp 0x11cb6
movl -0x184(%rbp), %eax
movl %eax, -0x168(%rbp)
cmpl $-0x1, -0x164(%rbp)
je 0x11cec
cmpl $-0x1, -0x168(%rbp)
je 0x11cec
movl -0x164(%rbp), %eax
movl %eax, -0x4(%rbp)
movl $0x1, -0x178(%rbp)
jmp 0x11da0
movq 0x142d5(%rip), %rdi     # 0x25fc8
leaq 0xccce(%rip), %rsi      # 0x1e9c8
callq 0x3280
movq %rax, -0x190(%rbp)
jmp 0x11d08
movq -0x190(%rbp), %rdi
movq 0x1429a(%rip), %rsi     # 0x25fb0
callq 0x32b0
jmp 0x11d1d
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl $0x1, -0x178(%rbp)
jmp 0x11da0
movl -0x8(%rbp), %edi
callq 0xca50
movl %eax, -0x194(%rbp)
jmp 0x11d40
movl -0x194(%rbp), %eax
cmpl $0x6a, %eax
jne 0x11d5e
movl $0x0, -0x4(%rbp)
movl $0x1, -0x178(%rbp)
jmp 0x11da0
movq 0x14263(%rip), %rdi     # 0x25fc8
leaq 0xcc82(%rip), %rsi      # 0x1e9ee
callq 0x3280
movq %rax, -0x1a0(%rbp)
jmp 0x11d7a
movq -0x1a0(%rbp), %rdi
movq 0x14228(%rip), %rsi     # 0x25fb0
callq 0x32b0
jmp 0x11d8f
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl $0x1, -0x178(%rbp)
leaq -0x160(%rbp), %rdi
callq 0x14a90
leaq -0xb8(%rbp), %rdi
callq 0x14a90
movl -0x4(%rbp), %eax
addq $0x1a0, %rsp            # imm = 0x1A0
popq %rbp
retq
movq -0x170(%rbp), %rdi
callq 0x3450