// File: /workspace/github_cpp_makefile_star2_O1/Danis98[P]PietGen/parse.cpp
// Function: print_ast()
void print_ast(){
	std::cout<<"[DEBUG] BEGIN STATEMENT LIST\n";
	for(int i=0;i<cur_node->stmts.size();i++){
		int type=cur_node->stmts[i]->getID();
		switch(type){
		case STMT:
			std::cout<<"[DEBUG] STATEMENT {"<<keyword_to_str(cur_node->stmts[i]->cmd);
			if(cur_node->stmts[i]->cmd==TOK_PUSH)
				std::cout<<", "<<cur_node->stmts[i]->val<<"}\n";
			else if(cur_node->stmts[i]->cmd==TOK_IN || cur_node->stmts[i]->cmd==TOK_OUT)
				std::cout<<", "<<keyword_to_str(cur_node->stmts[i]->io_type)<<"}\n";
			else if(cur_node->stmts[i]->cmd==TOK_CALL)
				std::cout<<", "<<cur_node->stmts[i]->id<<"}\n";
			else
				std::cout<<"}\n";
			break;
		case PROC:{
			std::cout<<"[DEBUG] PROCEDURE {"<<cur_node->stmts[i]->id<<"}\n";
			NStatementList *prev=cur_node;
			cur_node=&(((NProcedure*)cur_node->stmts[i])->block);
			print_ast();
			cur_node=prev;
			std::cout<<"[DEBUG] END OF PROCEDURE\n";
			break;}
		default: break;
		}
	}
	std::cout<<"[DEBUG] END STATEMENT LIST\n";
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq 0x495c(%rip), %rdi      # 0x7fd8
leaq 0x1abd(%rip), %rsi      # 0x5140
movl $0x1d, %edx
callq 0x21d0
movq 0x4b54(%rip), %rcx      # 0x81e8
movq 0x8(%rcx), %rax
cmpq %rax, 0x10(%rcx)
je 0x38bb
xorl %r13d, %r13d
movq 0x492c(%rip), %rbx      # 0x7fd8
leaq 0x1ac2(%rip), %r15      # 0x5175
leaq -0x48(%rbp), %r14
movq (%rax,%r13,8), %rdi
movq (%rdi), %rax
callq *0x10(%rax)
cmpl $-0x3, %eax
je 0x3786
cmpl $-0x2, %eax
jne 0x3899
movl $0x13, %edx
movq %rbx, %rdi
leaq 0x1a7c(%rip), %rsi      # 0x515e
callq 0x21d0
movq 0x4afa(%rip), %rax      # 0x81e8
movq 0x8(%rax), %rax
movq (%rax,%r13,8), %rax
movl 0x8(%rax), %esi
movq %r14, %rdi
callq 0x34a2
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
movq %rbx, %rdi
callq 0x21d0
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x3723
callq 0x2190
movq 0x4abe(%rip), %rax      # 0x81e8
movq 0x8(%rax), %rax
movq (%rax,%r13,8), %rax
movl 0x8(%rax), %eax
leal -0x10(%rax), %ecx
movl $0x2, %edx
movq %rbx, %rdi
cmpl $0x2, %ecx
jb 0x3804
cmpl $0x14, %eax
je 0x385e
cmpl $0x3, %eax
jne 0x3891
leaq 0x1a10(%rip), %rsi      # 0x5172
callq 0x21d0
movq 0x4a7a(%rip), %rax      # 0x81e8
movq 0x8(%rax), %rax
movq (%rax,%r13,8), %rax
movl 0x10(%rax), %esi
movq %rbx, %rdi
callq 0x2260
jmp 0x3889
movl $0x13, %edx
movq %rbx, %rdi
leaq 0x19e3(%rip), %rsi      # 0x5178
callq 0x21d0
movq 0x4a47(%rip), %rax      # 0x81e8
movq 0x8(%rax), %rax
movq (%rax,%r13,8), %rax
movq 0x18(%rax), %rsi
movq 0x20(%rax), %rdx
movq %rbx, %rdi
callq 0x21d0
movl $0x2, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x21d0
movq 0x4a18(%rip), %r12      # 0x81e8
movq 0x8(%r12), %rax
movq (%rax,%r13,8), %rax
addq $0x58, %rax
movq %rax, 0x4a04(%rip)      # 0x81e8
callq 0x3664
movq %r12, 0x49f8(%rip)      # 0x81e8
movl $0x19, %edx
movq %rbx, %rdi
leaq 0x198d(%rip), %rsi      # 0x518c
jmp 0x3894
leaq 0x1967(%rip), %rsi      # 0x5172
callq 0x21d0
movq 0x49d1(%rip), %rax      # 0x81e8
movq 0x8(%rax), %rax
movq (%rax,%r13,8), %rax
movl 0xc(%rax), %esi
movq %r14, %rdi
callq 0x34a2
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
movq %rbx, %rdi
callq 0x21d0
movl $0x2, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x21d0
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x3899
callq 0x2190
jmp 0x3899
leaq 0x190d(%rip), %rsi      # 0x5172
callq 0x21d0
movq 0x4977(%rip), %rax      # 0x81e8
movq 0x8(%rax), %rax
movq (%rax,%r13,8), %rax
movq 0x18(%rax), %rsi
movq 0x20(%rax), %rdx
movq %rbx, %rdi
callq 0x21d0
movl $0x2, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x21d0
incq %r13
movq 0x4945(%rip), %rcx      # 0x81e8
movq 0x8(%rcx), %rax
movq 0x10(%rcx), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %r13, %rcx
ja 0x36b7
movq 0x4716(%rip), %rdi      # 0x7fd8
leaq 0x18dd(%rip), %rsi      # 0x51a6
movl $0x1b, %edx
callq 0x21d0
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x38e4
movq %rax, %rbx
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x38f9
callq 0x2190
movq %rbx, %rdi
callq 0x2270