// File: zhengwangsun[P]pas2c/semantics.cpp
// Function: simple_expression1(int)
int simple_expression1(int k)
{
	TreeNode tNode= tree.node[k];
	TreeNode childNode;
	
    int flag1, flag2;
    if(lookahead(k) == 38)//38是addop
    {
        addop(tree.node[k].child[0]);
        
        flag1 = term(tree.node[k].child[1]);
        
        flag2 = simple_expression1(tree.node[k].child[2]);
        
        if (flag1 >= flag2)
            return flag1;
        else if (flag1 <= flag2)
            return flag2;
        else
        {
            cout<<"type not match where simple_expression1"<<endl;
            return -1;
        }
    }
    else if (lookahead(k) == 106)//106是e
    {
        return 0;//说明它是任意类型
    }
    else
    {
        cout<<"simple_expr' error!"<<endl;
        return -1;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1a0, %rsp            # imm = 0x1A0
movl %edi, -0x8(%rbp)
movslq -0x8(%rbp), %rax
imulq $0xa8, %rax, %rcx
leaq 0xb3a88(%rip), %rax     # 0xc6138
leaq 0x8(%rax,%rcx), %rsi
leaq -0xb0(%rbp), %rdi
callq 0x14920
leaq -0x158(%rbp), %rdi
callq 0x149d0
movl -0x8(%rbp), %edi
callq 0xca50
movl %eax, -0x174(%rbp)
jmp 0x126dd
movl -0x174(%rbp), %eax
cmpl $0x26, %eax
jne 0x12826
movslq -0x8(%rbp), %rax
imulq $0xa8, %rax, %rcx
leaq 0xb3a3a(%rip), %rax     # 0xc6138
movl 0xc(%rax,%rcx), %edi
callq 0x12a10
jmp 0x12709
movslq -0x8(%rbp), %rax
imulq $0xa8, %rax, %rcx
leaq 0xb3a1d(%rip), %rax     # 0xc6138
movl 0x10(%rax,%rcx), %edi
callq 0x125a0
movl %eax, -0x178(%rbp)
jmp 0x1272c
movl -0x178(%rbp), %eax
movl %eax, -0x15c(%rbp)
movslq -0x8(%rbp), %rax
imulq $0xa8, %rax, %rcx
leaq 0xb39ee(%rip), %rax     # 0xc6138
movl 0x14(%rax,%rcx), %edi
callq 0x12690
movl %eax, -0x17c(%rbp)
jmp 0x1275b
movl -0x17c(%rbp), %eax
movl %eax, -0x160(%rbp)
movl -0x15c(%rbp), %eax
cmpl -0x160(%rbp), %eax
jl 0x127bc
movl -0x15c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl $0x1, -0x170(%rbp)
jmp 0x12896
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x168(%rbp)
movl %eax, -0x16c(%rbp)
leaq -0x158(%rbp), %rdi
callq 0x14a90
leaq -0xb0(%rbp), %rdi
callq 0x14a90
jmp 0x128ba
movl -0x15c(%rbp), %eax
cmpl -0x160(%rbp), %eax
jg 0x127e2
movl -0x160(%rbp), %eax
movl %eax, -0x4(%rbp)
movl $0x1, -0x170(%rbp)
jmp 0x12896
movq 0x137df(%rip), %rdi     # 0x25fc8
leaq 0xc2e4(%rip), %rsi      # 0x1ead4
callq 0x3280
movq %rax, -0x188(%rbp)
jmp 0x127fe
movq -0x188(%rbp), %rdi
movq 0x137a4(%rip), %rsi     # 0x25fb0
callq 0x32b0
jmp 0x12813
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl $0x1, -0x170(%rbp)
jmp 0x12896
movl -0x8(%rbp), %edi
callq 0xca50
movl %eax, -0x18c(%rbp)
jmp 0x12836
movl -0x18c(%rbp), %eax
cmpl $0x6a, %eax
jne 0x12854
movl $0x0, -0x4(%rbp)
movl $0x1, -0x170(%rbp)
jmp 0x12896
movq 0x1376d(%rip), %rdi     # 0x25fc8
leaq 0xc29a(%rip), %rsi      # 0x1eafc
callq 0x3280
movq %rax, -0x198(%rbp)
jmp 0x12870
movq -0x198(%rbp), %rdi
movq 0x13732(%rip), %rsi     # 0x25fb0
callq 0x32b0
jmp 0x12885
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl $0x1, -0x170(%rbp)
leaq -0x158(%rbp), %rdi
callq 0x14a90
leaq -0xb0(%rbp), %rdi
callq 0x14a90
movl -0x4(%rbp), %eax
addq $0x1a0, %rsp            # imm = 0x1A0
popq %rbp
retq
movq -0x168(%rbp), %rdi
callq 0x3450
nopw %cs:(%rax,%rax)