// File: /workspace/github_cpp_makefile_star2_O1/lhydave[P]SysYCompilerLab/front/node.cpp
// Function: sysY_AST::exp_node::reduce()
void exp_node::reduce()
{
	if (exp_type == EXP_NUM)
	{
		eeyore_name = to_string(num);
		dbg_printf("eeyore_name in exp_node: %s\n", eeyore_name.c_str());
	}
	else if (exp_type == EXP_VAR)
	{
		var_entry query;
		find_var(sysy_name, query);
		eeyore_name = query.eeyore_name;
		if (query.is_const && query.dim.size() == 0) // a const
		{
			exp_type = EXP_NUM;
			eeyore_name = to_string(query.val[0]);
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rdi, %rbx
movl 0x98(%rdi), %eax
cmpl $0x1, %eax
je 0xed34
cmpl $0x2, %eax
jne 0xef33
movl 0x94(%rbx), %r12d
movl %r12d, %ebp
negl %ebp
cmovsl %r12d, %ebp
movl $0x1, %r14d
cmpl $0xa, %ebp
jb 0xee24
movl $0x4, %r14d
movl $0xd1b71759, %eax       # imm = 0xD1B71759
movl %ebp, %ecx
cmpl $0x63, %ecx
jbe 0xee1b
cmpl $0x3e7, %ecx            # imm = 0x3E7
jbe 0xee21
cmpl $0x2710, %ecx           # imm = 0x2710
jb 0xee24
movl %ecx, %edx
imulq %rax, %rdx
shrq $0x2d, %rdx
addl $0x4, %r14d
cmpl $0x1869f, %ecx          # imm = 0x1869F
movl %edx, %ecx
ja 0xecf2
addl $-0x3, %r14d
jmp 0xee24
leaq 0x30(%rsp), %r13
movq %r13, -0x10(%r13)
xorl %eax, %eax
movq %rax, -0x8(%r13)
movb %al, (%r13)
leaq 0x50(%rsp), %r12
movq %r12, -0x10(%r12)
movq %rax, -0x8(%r12)
movb %al, (%r12)
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%r12)
movups %xmm0, 0x28(%r12)
movups %xmm0, 0x38(%r12)
leaq 0x50(%rbx), %rdi
leaq 0x20(%rsp), %rsi
callq 0x14f6c
leaq 0x70(%rbx), %r14
leaq 0x20(%rsp), %rsi
movq %r14, %rdi
callq 0x5140
cmpb $0x1, 0x61(%rsp)
jne 0xeed1
movq 0x70(%rsp), %rax
cmpq 0x68(%rsp), %rax
jne 0xeed1
movl $0x2, 0x98(%rbx)
movq 0x80(%rsp), %rax
movl (%rax), %ebx
movl %ebx, %ebp
negl %ebp
cmovsl %ebx, %ebp
movl $0x1, %r15d
cmpl $0xa, %ebp
jb 0xee79
movl $0x4, %r15d
movl $0xd1b71759, %eax       # imm = 0xD1B71759
movl %ebp, %ecx
cmpl $0x63, %ecx
jbe 0xee70
cmpl $0x3e7, %ecx            # imm = 0x3E7
jbe 0xee76
cmpl $0x2710, %ecx           # imm = 0x2710
jb 0xee79
movl %ecx, %edx
imulq %rax, %rdx
shrq $0x2d, %rdx
addl $0x4, %r15d
cmpl $0x1869f, %ecx          # imm = 0x1869F
movl %edx, %ecx
ja 0xede0
addl $-0x3, %r15d
jmp 0xee79
addl $-0x2, %r14d
jmp 0xee24
decl %r14d
shrl $0x1f, %r12d
movl %r12d, %esi
addl %r14d, %esi
leaq 0x30(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x20(%rsp), %r15
movq %r15, %rdi
movl $0x2d, %edx
callq 0x52b0
movq (%r15), %rdi
addq %r12, %rdi
movl %r14d, %esi
movl %ebp, %edx
callq 0x1230e
addq $0x70, %rbx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x5310
movq (%r15), %rdi
jmp 0xef21
addl $-0x2, %r15d
jmp 0xee79
decl %r15d
shrl $0x1f, %ebx
leal (%r15,%rbx), %esi
leaq 0x10(%rsp), %rax
movq %rax, -0x10(%rax)
movq %rsp, %rdi
movl $0x2d, %edx
callq 0x52b0
movq %rsp, %rax
addq (%rax), %rbx
movq %rbx, %rdi
movl %r15d, %esi
movl %ebp, %edx
callq 0x1230e
movq %r14, %rdi
movq %rsp, %rbx
movq %rbx, %rsi
callq 0x5310
movq (%rbx), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0xeed1
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x5240
movq 0x80(%rsp), %rdi
testq %rdi, %rdi
je 0xeeee
movq 0x90(%rsp), %rsi
subq %rdi, %rsi
callq 0x5240
movq 0x68(%rsp), %rdi
testq %rdi, %rdi
je 0xef05
movq 0x78(%rsp), %rsi
subq %rdi, %rsi
callq 0x5240
movq 0x40(%rsp), %rdi
cmpq %r12, %rdi
je 0xef1c
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x5240
movq 0x20(%rsp), %rdi
cmpq %r13, %rdi
je 0xef33
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x5240
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xef47
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x11f96
movq %rbx, %rdi
callq 0x54c0