// File: /workspace/github_cpp_makefile_star2_O1/yw14218[P]C-Compiler/include/Function_call/functioncall.hpp
// Function: functiondefinition::compile(Context&, int) const
virtual void compile(Context &input, int p = 2)const override{
		int offset = NumVariables*4;
		if(mainflag == false){
			input.current_offset = offset;
			input.print() <<"\t.global\t" << Funcname[0] << std::endl;
			input.print() <<"\t.ent\t" << Funcname[0] << std::endl;
			input.print() << Funcname[0]<<":"<<std::endl;

			input.print() <<"\taddiu\t" << "$sp,$sp,-" << offset << std::endl;
			input.print() <<"\tsw\t" << "$fp,"<< offset-4<< "($sp)" << std::endl;
			input.print() <<"\tmove\t" << "$fp,$sp" << std::endl;
			mid->compile(input,p);
			right->compile(input,p);	
			input.print() <<"\tmove\t" << "$sp,$fp" << std::endl;
			input.print() <<"\tlw\t" <<"$fp," << offset-4 << "($sp)" << std::endl;
			input.print() <<"\taddiu\t" << "$sp,$sp," << offset << std::endl;
			input.print()<<"\tj\t" <<"$31" << std::endl;
			input.print() <<"\tnop"<< std::endl;
			input.print() << std::endl;
			Funcname.erase(Funcname.begin());
			input.print() <<"\t.end "<<Funcname[0] << std::endl;
		}
		else{
			input.print() <<"\t.global\t" << "main" << std::endl;
			input.print() <<"\t.ent\t" << "main" << std::endl;
  			input.print() << "main" <<":"<<std::endl;
			input.print() <<"\taddiu\t" << "$sp,$sp,-" << offset+8 << std::endl;
			input.print() <<"\tsw\t" << "$31,"<< offset+4<< "($sp)" << std::endl;
			input.print() <<"\tsw\t" << "$fp,"<< offset << "($sp)" << std::endl;
			input.print() <<"\tmove\t" << "$fp,$sp" << std::endl;
			mid->compile(input,p);
			right->compile(input,p);
			input.print() <<"\tmove\t" << "$sp,$fp" << std::endl;
			input.print() <<"\tlw\t" << "$31,"<< offset+4<< "($sp)" << std::endl;
			input.print() <<"\tlw\t" <<"$fp," << offset << "($sp)" << std::endl;
			input.print() <<"\taddiu\t" << "$sp,$sp," << offset+8 << std::endl;
			input.print()<<"\tj\t" <<"$31" << std::endl;
			input.print() <<"\tnop"<< std::endl;
			input.print() << std::endl;
			input.print() <<"\t.end\t" << "main" << std::endl;
			input.print() <<"\t.end main" << std::endl;
		}
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %edx, 0xc(%rsp)
movq %rsi, %rbx
movq %rdi, %r12
movl 0x1304b(%rip), %r14d    # 0x2b458
shll $0x2, %r14d
cmpb $0x0, 0x13044(%rip)     # 0x2b45c
je 0x189da
movq 0xd0(%rbx), %r15
leaq 0x5a98(%rip), %rsi      # 0x1dec4
movl $0x9, %edx
movq %r15, %rdi
callq 0x9250
leaq 0x5af2(%rip), %r13      # 0x1df32
movl $0x4, %edx
movq %r15, %rdi
movq %r13, %rsi
callq 0x9250
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x91c0
movsbl %al, %esi
movq %r15, %rdi
callq 0x9030
movq %rax, %rdi
callq 0x9140
movq 0xd0(%rbx), %r15
leaq 0x5a49(%rip), %rsi      # 0x1dece
movl $0x6, %edx
movq %r15, %rdi
callq 0x9250
movl $0x4, %edx
movq %r15, %rdi
movq %r13, %rsi
callq 0x9250
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x91c0
movsbl %al, %esi
movq %r15, %rdi
callq 0x9030
movq %rax, %rdi
callq 0x9140
movq 0xd0(%rbx), %r15
movl $0x4, %edx
movq %r15, %rdi
movq %r13, %rsi
callq 0x9250
leaq 0x582a(%rip), %rsi      # 0x1dd11
movl $0x1, %edx
movq %r15, %rdi
callq 0x9250
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x91c0
movsbl %al, %esi
movq %r15, %rdi
callq 0x9030
movq %rax, %rdi
callq 0x9140
movq 0xd0(%rbx), %r15
leaq 0x59ac(%rip), %rsi      # 0x1ded5
movl $0x7, %edx
movq %r15, %rdi
callq 0x9250
leaq 0x59a0(%rip), %rsi      # 0x1dedd
movl $0x9, %edx
movq %r15, %rdi
callq 0x9250
leal 0x8(%r14), %esi
movl %esi, 0x14(%rsp)
movq %r15, %rdi
callq 0x9380
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x91c0
movsbl %al, %esi
movq %r15, %rdi
callq 0x9030
movq %rax, %rdi
callq 0x9140
movq 0xd0(%rbx), %rbp
leaq 0x57cb(%rip), %r13      # 0x1dd5d
movl $0x4, %edx
movq %rbp, %rdi
movq %r13, %rsi
callq 0x9250
leaq 0x5977(%rip), %rsi      # 0x1df20
movl $0x4, %edx
movq %rbp, %rdi
callq 0x9250
leal 0x4(%r14), %esi
movl %esi, 0x10(%rsp)
movq %rbp, %rdi
callq 0x9380
movq %rax, %rbp
leaq 0x5164(%rip), %r15      # 0x1d734
movl $0x5, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x9250
movq (%rbp), %rax
movq -0x18(%rax), %rdi
addq %rbp, %rdi
movl $0xa, %esi
callq 0x91c0
movsbl %al, %esi
movq %rbp, %rdi
callq 0x9030
movq %rax, %rdi
callq 0x9140
movq 0xd0(%rbx), %rbp
movl $0x4, %edx
movq %rbp, %rdi
movq %r13, %rsi
callq 0x9250
leaq 0x58c1(%rip), %rsi      # 0x1dee7
movl $0x4, %edx
movq %rbp, %rdi
callq 0x9250
movq %rbp, %rdi
movl %r14d, %esi
callq 0x9380
movq %rax, %r13
movl $0x5, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x9250
movq (%r13), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x91c0
movsbl %al, %esi
movq %r13, %rdi
callq 0x9030
movq %rax, %rdi
callq 0x9140
movq 0xd0(%rbx), %rbp
leaq 0x5865(%rip), %r13      # 0x1deec
movl $0x6, %edx
movq %rbp, %rdi
movq %r13, %rsi
callq 0x9250
leaq 0x5855(%rip), %rsi      # 0x1def3
movl $0x7, %edx
movq %rbp, %rdi
callq 0x9250
movq (%rbp), %rax
movq -0x18(%rax), %rdi
addq %rbp, %rdi
movl $0xa, %esi
callq 0x91c0
movsbl %al, %esi
movq %rbp, %rdi
callq 0x9030
movq %rax, %rdi
callq 0x9140
movq 0x10(%r12), %rdi
movq (%rdi), %rax
movq %rbx, %rsi
movl 0xc(%rsp), %ebp
movl %ebp, %edx
callq *0x20(%rax)
movq 0x18(%r12), %rdi
movq (%rdi), %rax
movq %rbx, %rsi
movl %ebp, %edx
callq *0x20(%rax)
movq 0xd0(%rbx), %r12
movl $0x6, %edx
movq %r12, %rdi
movq %r13, %rsi
callq 0x9250
leaq 0x57e6(%rip), %rsi      # 0x1defb
movl $0x7, %edx
movq %r12, %rdi
callq 0x9250
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x91c0
movsbl %al, %esi
movq %r12, %rdi
callq 0x9030
movq %rax, %rdi
callq 0x9140
movq 0xd0(%rbx), %r13
leaq 0x57ab(%rip), %r12      # 0x1df03
movl $0x4, %edx
movq %r13, %rdi
movq %r12, %rsi
callq 0x9250
movl $0x4, %edx
movq %r13, %rdi
leaq 0x57a9(%rip), %rsi      # 0x1df20
callq 0x9250
movq %r13, %rdi
movl 0x10(%rsp), %esi
callq 0x9380
movq %rax, %r15
movl $0x5, %edx
movq %rax, %rdi
leaq 0x4f9a(%rip), %r13      # 0x1d734
movq %r13, %rsi
callq 0x9250
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x91c0
movsbl %al, %esi
movq %r15, %rdi
callq 0x9030
movq %rax, %rdi
callq 0x9140
movq 0xd0(%rbx), %r15
movl $0x4, %edx
movq %r15, %rdi
movq %r12, %rsi
callq 0x9250
movl $0x4, %edx
movq %r15, %rdi
leaq 0x56f8(%rip), %rsi      # 0x1dee7
callq 0x9250
movq %r15, %rdi
movl %r14d, %esi
callq 0x9380
movq %rax, %r14
movl $0x5, %edx
movq %rax, %rdi
movq %r13, %rsi
callq 0x9250
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x91c0
movsbl %al, %esi
movq %r14, %rdi
callq 0x9030
movq %rax, %rdi
callq 0x9140
movq 0xd0(%rbx), %r14
movl $0x7, %edx
movq %r14, %rdi
leaq 0x5686(%rip), %rsi      # 0x1ded5
callq 0x9250
leaq 0x56ad(%rip), %rsi      # 0x1df08
movl $0x8, %edx
movq %r14, %rdi
callq 0x9250
movq %r14, %rdi
movl 0x14(%rsp), %esi
callq 0x9380
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x91c0
movsbl %al, %esi
movq %r14, %rdi
callq 0x9030
movq %rax, %rdi
callq 0x9140
movq 0xd0(%rbx), %r14
leaq 0x5665(%rip), %rsi      # 0x1df11
movl $0x3, %edx
movq %r14, %rdi
callq 0x9250
leaq 0x5655(%rip), %rsi      # 0x1df15
movl $0x3, %edx
movq %r14, %rdi
callq 0x9250
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x91c0
movsbl %al, %esi
movq %r14, %rdi
callq 0x9030
movq %rax, %rdi
callq 0x9140
movq 0xd0(%rbx), %r14
leaq 0x50df(%rip), %rsi      # 0x1d9e1
movl $0x4, %edx
movq %r14, %rdi
callq 0x9250
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x91c0
movsbl %al, %esi
movq %r14, %rdi
callq 0x9030
movq %rax, %rdi
callq 0x9140
movq 0xd0(%rbx), %r14
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x91c0
movsbl %al, %esi
movq %r14, %rdi
callq 0x9030
movq %rax, %rdi
callq 0x9140
movq 0xd0(%rbx), %r14
leaq 0x55b3(%rip), %rsi      # 0x1df25
movl $0x6, %edx
movq %r14, %rdi
callq 0x9250
movl $0x4, %edx
movq %r14, %rdi
leaq 0x55a4(%rip), %rsi      # 0x1df32
callq 0x9250
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x91c0
movsbl %al, %esi
movq %r14, %rdi
callq 0x9030
movq %rax, %rdi
callq 0x9140
movq 0xd0(%rbx), %rbx
leaq 0x5564(%rip), %rsi      # 0x1df2c
movl $0xa, %edx
movq %rbx, %rdi
callq 0x9250
jmp 0x18e8a
movl %r14d, 0x90(%rbx)
movq 0xd0(%rbx), %r15
leaq 0x54d5(%rip), %rsi      # 0x1dec4
movl $0x9, %edx
movq %r15, %rdi
callq 0x9250
movq 0x12a1d(%rip), %rax     # 0x2b420
movq (%rax), %rsi
movq 0x8(%rax), %rdx
movq %r15, %rdi
callq 0x9250
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x91c0
movsbl %al, %esi
movq %r15, %rdi
callq 0x9030
movq %rax, %rdi
callq 0x9140
movq 0xd0(%rbx), %r15
leaq 0x5484(%rip), %rsi      # 0x1dece
movl $0x6, %edx
movq %r15, %rdi
callq 0x9250
movq 0x129c2(%rip), %rax     # 0x2b420
movq (%rax), %rsi
movq 0x8(%rax), %rdx
movq %r15, %rdi
callq 0x9250
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x91c0
movsbl %al, %esi
movq %r15, %rdi
callq 0x9030
movq %rax, %rdi
callq 0x9140
movq 0xd0(%rbx), %rdi
movq 0x1297b(%rip), %rax     # 0x2b420
movq (%rax), %rsi
movq 0x8(%rax), %rdx
callq 0x9250
movq %rax, %r15
leaq 0x5256(%rip), %rsi      # 0x1dd11
movl $0x1, %edx
movq %rax, %rdi
callq 0x9250
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x91c0
movsbl %al, %esi
movq %r15, %rdi
callq 0x9030
movq %rax, %rdi
callq 0x9140
movq 0xd0(%rbx), %r15
leaq 0x53d8(%rip), %rsi      # 0x1ded5
movl $0x7, %edx
movq %r15, %rdi
callq 0x9250
leaq 0x53cc(%rip), %rsi      # 0x1dedd
movl $0x9, %edx
movq %r15, %rdi
callq 0x9250
movq %r15, %rdi
movl %r14d, %esi
callq 0x9380
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x91c0
movsbl %al, %esi
movq %r15, %rdi
callq 0x9030
movq %rax, %rdi
callq 0x9140
movq 0xd0(%rbx), %r13
leaq 0x51fc(%rip), %rsi      # 0x1dd5d
movl $0x4, %edx
movq %r13, %rdi
callq 0x9250
leaq 0x5372(%rip), %rsi      # 0x1dee7
movl $0x4, %edx
movq %r13, %rdi
callq 0x9250
leal -0x4(%r14), %r15d
movq %r13, %rdi
movl %r15d, %esi
callq 0x9380
movq %rax, %r13
leaq 0x4b99(%rip), %rsi      # 0x1d734
movl $0x5, %edx
movq %rax, %rdi
callq 0x9250
movq (%r13), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x91c0
movsbl %al, %esi
movq %r13, %rdi
callq 0x9030
movq %rax, %rdi
callq 0x9140
movq 0xd0(%rbx), %rbp
leaq 0x530e(%rip), %r13      # 0x1deec
movl $0x6, %edx
movq %rbp, %rdi
movq %r13, %rsi
callq 0x9250
leaq 0x52fe(%rip), %rsi      # 0x1def3
movl $0x7, %edx
movq %rbp, %rdi
callq 0x9250
movq (%rbp), %rax
movq -0x18(%rax), %rdi
addq %rbp, %rdi
movl $0xa, %esi
callq 0x91c0
movsbl %al, %esi
movq %rbp, %rdi
callq 0x9030
movq %rax, %rdi
callq 0x9140
movq 0x10(%r12), %rdi
movq (%rdi), %rax
movq %rbx, %rsi
movl 0xc(%rsp), %ebp
movl %ebp, %edx
callq *0x20(%rax)
movq 0x18(%r12), %rdi
movq (%rdi), %rax
movq %rbx, %rsi
movl %ebp, %edx
callq *0x20(%rax)
movq 0xd0(%rbx), %r12
movl $0x6, %edx
movq %r12, %rdi
movq %r13, %rsi
callq 0x9250
leaq 0x528f(%rip), %rsi      # 0x1defb
movl $0x7, %edx
movq %r12, %rdi
callq 0x9250
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x91c0
movsbl %al, %esi
movq %r12, %rdi
callq 0x9030
movq %rax, %rdi
callq 0x9140
movq 0xd0(%rbx), %r12
leaq 0x5254(%rip), %rsi      # 0x1df03
movl $0x4, %edx
movq %r12, %rdi
callq 0x9250
movl $0x4, %edx
movq %r12, %rdi
leaq 0x521c(%rip), %rsi      # 0x1dee7
callq 0x9250
movq %r12, %rdi
movl %r15d, %esi
callq 0x9380
movq %rax, %r15
movl $0x5, %edx
movq %rax, %rdi
leaq 0x4a47(%rip), %rsi      # 0x1d734
callq 0x9250
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x91c0
movsbl %al, %esi
movq %r15, %rdi
callq 0x9030
movq %rax, %rdi
callq 0x9140
movq 0xd0(%rbx), %r15
movl $0x7, %edx
movq %r15, %rdi
leaq 0x51a6(%rip), %rsi      # 0x1ded5
callq 0x9250
leaq 0x51cd(%rip), %rsi      # 0x1df08
movl $0x8, %edx
movq %r15, %rdi
callq 0x9250
movq %r15, %rdi
movl %r14d, %esi
callq 0x9380
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x91c0
movsbl %al, %esi
movq %r14, %rdi
callq 0x9030
movq %rax, %rdi
callq 0x9140
movq 0xd0(%rbx), %r14
leaq 0x5186(%rip), %rsi      # 0x1df11
movl $0x3, %edx
movq %r14, %rdi
callq 0x9250
leaq 0x5176(%rip), %rsi      # 0x1df15
movl $0x3, %edx
movq %r14, %rdi
callq 0x9250
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x91c0
movsbl %al, %esi
movq %r14, %rdi
callq 0x9030
movq %rax, %rdi
callq 0x9140
movq 0xd0(%rbx), %r14
leaq 0x4c00(%rip), %rsi      # 0x1d9e1
movl $0x4, %edx
movq %r14, %rdi
callq 0x9250
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x91c0
movsbl %al, %esi
movq %r14, %rdi
callq 0x9030
movq %rax, %rdi
callq 0x9140
movq 0xd0(%rbx), %r14
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x91c0
movsbl %al, %esi
movq %r14, %rdi
callq 0x9030
movq %rax, %rdi
callq 0x9140
movq 0x125d6(%rip), %rsi     # 0x2b420
leaq 0x125cf(%rip), %rdi     # 0x2b420
callq 0x18ec0
movq 0xd0(%rbx), %rbx
leaq 0x50b5(%rip), %rsi      # 0x1df19
movl $0x6, %edx
movq %rbx, %rdi
callq 0x9250
movq 0x125a8(%rip), %rax     # 0x2b420
movq (%rax), %rsi
movq 0x8(%rax), %rdx
movq %rbx, %rdi
callq 0x9250
movq %rax, %rbx
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x91c0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x9030
movq %rax, %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x9140
nop