// File: /workspace/github_cpp_makefile_star2_O3/Danis98[P]PietGen/parse.cpp
// Function: parse_stmt()
void parse_stmt(){
	token t=get_tok();
	NStatement *stmt=new NStatement;
	stmt->cmd=keyword_map[t];
	if(keyword_map[t]==TOK_PROC){
		stmt=new NProcedure;
		if(nested) parse_error("Procedures cannot be nested");
		NStatementList *prev_node=cur_node;
		token id=get_tok();
		if(keyword_map[id]!=TOK_INVALID)
			parse_error("Keywords are not permitted as procedure IDs: "
					+id+" used\n");
		nested=true;
		cur_node=&(((NProcedure*)stmt)->block);
		parse_stmt_list();
		cur_node=prev_node;
		nested=false;
		token end=get_tok();
		if(keyword_map[end]!=TOK_END)
			parse_error("Procedures must be ended with the end keyword");
	}
	else if(keyword_map[t]==TOK_PUSH){
		token v=get_tok();
		int val=to_num(v);
		if(val==-1) parse_error("Only integers can be pushed into the stack: "
					+v+" pushed instead");
		stmt->val=val;
	}
	else if(keyword_map[t]==TOK_IN){
		token io=get_tok();
		if(keyword_map[io]!=TOK_INT && keyword_map[io]!=TOK_CHAR)
			parse_error("Wrong token: "+io);
		stmt->io_type=keyword_map[io];}
	else if(keyword_map[t]==TOK_OUT){
		token io=get_tok();
		if(keyword_map[io]!=TOK_INT && keyword_map[io]!=TOK_CHAR)
			parse_error("Wrong token: "+io);
		stmt->io_type=keyword_map[io];
	}
	else if(keyword_map[t]==TOK_CALL){
		token id=get_tok();
		if(keyword_map[id]!=TOK_INVALID)
			parse_error("Keywords are not permitted as procedure IDs: "
					+id+" used\n");
		stmt->id=id;
	}
	
	cur_node->stmts.push_back(stmt);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x168, %rsp            # imm = 0x168
movslq 0x48f0(%rip), %rax      # 0x81f0
leal 0x1(%rax), %ecx
movl %ecx, 0x48e7(%rip)      # 0x81f0
leaq 0x4868(%rip), %r12      # 0x8178
movq (%r12), %rcx
shlq $0x5, %rax
leaq -0x80(%rbp), %r14
movq %r14, -0x10(%r14)
movq (%rcx,%rax), %rsi
movq 0x8(%rcx,%rax), %rdx
addq %rsi, %rdx
leaq -0x90(%rbp), %rdi
callq 0x26ac
movl $0x38, %edi
callq 0x21b0
movq %rax, %rbx
leaq 0x43f4(%rip), %rax      # 0x7d40
movq %rax, (%rbx)
leaq 0x28(%rbx), %rax
movq %rax, 0x18(%rbx)
movq $0x0, 0x20(%rbx)
movb $0x0, 0x28(%rbx)
movq %rbx, -0x70(%rbp)
leaq 0x484a(%rip), %rdi      # 0x81b8
leaq -0x90(%rbp), %rsi
callq 0x43a2
movl (%rax), %eax
movl %eax, 0x8(%rbx)
leaq 0x4832(%rip), %rdi      # 0x81b8
leaq -0x90(%rbp), %rsi
callq 0x43a2
cmpl $0x1, (%rax)
jne 0x3adc
movl $0x78, %edi
callq 0x21b0
movq %rax, %rbx
addq $0x28, %rax
movq %rax, 0x18(%rbx)
xorl %eax, %eax
movq %rax, 0x20(%rbx)
movb %al, 0x28(%rbx)
leaq 0x43c0(%rip), %rcx      # 0x7d80
movq %rcx, (%rbx)
leaq 0x48(%rbx), %rcx
movq %rcx, 0x38(%rbx)
movq %rax, 0x40(%rbx)
movb %al, 0x48(%rbx)
leaq 0x4317(%rip), %rcx      # 0x7cf0
movq %rcx, 0x58(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x60(%rbx)
movq %rax, 0x70(%rbx)
movq %rbx, -0x70(%rbp)
cmpb $0x1, 0x4801(%rip)      # 0x81f4
je 0x3db4
movq 0x47e8(%rip), %r13      # 0x81e8
movslq 0x47e9(%rip), %rax      # 0x81f0
leal 0x1(%rax), %ecx
movl %ecx, 0x47e0(%rip)      # 0x81f0
movq (%r12), %rcx
shlq $0x5, %rax
leaq -0x38(%rbp), %r15
movq %r15, -0x10(%r15)
movq (%rcx,%rax), %rsi
movq 0x8(%rcx,%rax), %rdx
addq %rsi, %rdx
leaq -0x48(%rbp), %rdi
callq 0x26ac
leaq 0x477c(%rip), %rdi      # 0x81b8
leaq -0x48(%rbp), %rsi
callq 0x43a2
cmpl $0x0, (%rax)
jne 0x3de5
movq %rbx, %rax
addq $0x58, %rax
movb $0x1, 0x4798(%rip)      # 0x81f4
movq %rax, 0x4785(%rip)      # 0x81e8
callq 0x40c4
movq %r13, 0x4779(%rip)      # 0x81e8
movb $0x0, 0x477e(%rip)      # 0x81f4
movslq 0x4773(%rip), %rax      # 0x81f0
leal 0x1(%rax), %ecx
movl %ecx, 0x476a(%rip)      # 0x81f0
movq (%r12), %rcx
shlq $0x5, %rax
leaq -0x58(%rbp), %r12
movq %r12, -0x10(%r12)
movq (%rcx,%rax), %rsi
movq 0x8(%rcx,%rax), %rdx
addq %rsi, %rdx
leaq -0x68(%rbp), %rdi
callq 0x26ac
leaq 0x4705(%rip), %rdi      # 0x81b8
leaq -0x68(%rbp), %rsi
callq 0x43a2
cmpl $0x2, (%rax)
jne 0x3e35
movq -0x68(%rbp), %rdi
cmpq %r12, %rdi
je 0x3ce0
callq 0x2190
jmp 0x3ce0
leaq 0x46d5(%rip), %rdi      # 0x81b8
leaq -0x90(%rbp), %rsi
callq 0x43a2
cmpl $0x3, (%rax)
jne 0x3b97
movslq 0x46f1(%rip), %rax      # 0x81f0
leal 0x1(%rax), %ecx
movl %ecx, 0x46e8(%rip)      # 0x81f0
movq (%r12), %rcx
shlq $0x5, %rax
leaq -0x38(%rbp), %r15
movq %r15, -0x10(%r15)
movq (%rcx,%rax), %rsi
movq 0x8(%rcx,%rax), %rdx
addq %rsi, %rdx
leaq -0x48(%rbp), %rdi
callq 0x26ac
leaq -0x100(%rbp), %r12
movq %r12, -0x10(%r12)
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
addq %rsi, %rdx
leaq -0x110(%rbp), %rdi
callq 0x26ac
movq -0x110(%rbp), %rdi
movq -0x108(%rbp), %rax
testq %rax, %rax
je 0x3cbd
xorl %ecx, %ecx
xorl %r13d, %r13d
movzbl (%rdi,%rcx), %edx
leal -0x3a(%rdx), %esi
cmpb $-0xa, %sil
jb 0x3cc2
leal (%r13,%r13,4), %esi
leal (%rdx,%rsi,2), %r13d
addl $-0x30, %r13d
incq %rcx
cmpq %rcx, %rax
jne 0x3b6c
jmp 0x3cc8
leaq 0x461a(%rip), %rdi      # 0x81b8
leaq -0x90(%rbp), %rsi
callq 0x43a2
cmpl $0x10, (%rax)
jne 0x3c27
movslq 0x463a(%rip), %rax      # 0x81f0
leal 0x1(%rax), %ecx
movl %ecx, 0x4631(%rip)      # 0x81f0
movq (%r12), %rcx
shlq $0x5, %rax
leaq -0x38(%rbp), %r15
movq %r15, -0x10(%r15)
movq (%rcx,%rax), %rsi
movq 0x8(%rcx,%rax), %rdx
addq %rsi, %rdx
leaq -0x48(%rbp), %rdi
callq 0x26ac
leaq 0x45cd(%rip), %rdi      # 0x81b8
leaq -0x48(%rbp), %rsi
callq 0x43a2
cmpl $0x12, (%rax)
je 0x3c12
leaq 0x45b8(%rip), %rdi      # 0x81b8
leaq -0x48(%rbp), %rsi
callq 0x43a2
cmpl $0x13, (%rax)
jne 0x3ee3
leaq 0x459f(%rip), %rdi      # 0x81b8
leaq -0x48(%rbp), %rsi
callq 0x43a2
jmp 0x3cb6
leaq 0x458a(%rip), %rdi      # 0x81b8
leaq -0x90(%rbp), %rsi
callq 0x43a2
cmpl $0x11, (%rax)
jne 0x3d39
movslq 0x45a6(%rip), %rax      # 0x81f0
leal 0x1(%rax), %ecx
movl %ecx, 0x459d(%rip)      # 0x81f0
movq (%r12), %rcx
shlq $0x5, %rax
leaq -0x38(%rbp), %r15
movq %r15, -0x10(%r15)
movq (%rcx,%rax), %rsi
movq 0x8(%rcx,%rax), %rdx
addq %rsi, %rdx
leaq -0x48(%rbp), %rdi
callq 0x26ac
leaq 0x4539(%rip), %rdi      # 0x81b8
leaq -0x48(%rbp), %rsi
callq 0x43a2
cmpl $0x12, (%rax)
je 0x3ca6
leaq 0x4524(%rip), %rdi      # 0x81b8
leaq -0x48(%rbp), %rsi
callq 0x43a2
cmpl $0x13, (%rax)
jne 0x3f3a
leaq 0x450b(%rip), %rdi      # 0x81b8
leaq -0x48(%rbp), %rsi
callq 0x43a2
movl (%rax), %eax
movl %eax, 0xc(%rbx)
jmp 0x3ce0
xorl %r13d, %r13d
jmp 0x3cc8
movl $0xffffffff, %r13d      # imm = 0xFFFFFFFF
cmpq %r12, %rdi
je 0x3cd2
callq 0x2190
cmpl $-0x1, %r13d
je 0x3e66
movl %r13d, 0x10(%rbx)
movq -0x48(%rbp), %rdi
cmpq %r15, %rdi
je 0x3cee
callq 0x2190
movq 0x44f3(%rip), %rdi      # 0x81e8
movq 0x10(%rdi), %rsi
cmpq 0x18(%rdi), %rsi
je 0x3d09
movq %rbx, (%rsi)
addq $0x8, 0x10(%rdi)
jmp 0x3d16
addq $0x8, %rdi
leaq -0x70(%rbp), %rdx
callq 0x4b3a
movq -0x90(%rbp), %rdi
cmpq %r14, %rdi
je 0x3d27
callq 0x2190
addq $0x168, %rsp            # imm = 0x168
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x4478(%rip), %rdi      # 0x81b8
leaq -0x90(%rbp), %rsi
callq 0x43a2
cmpl $0x14, (%rax)
jne 0x3cee
movslq 0x4498(%rip), %rax      # 0x81f0
leal 0x1(%rax), %ecx
movl %ecx, 0x448f(%rip)      # 0x81f0
movq (%r12), %rcx
shlq $0x5, %rax
leaq -0x38(%rbp), %r15
movq %r15, -0x10(%r15)
movq (%rcx,%rax), %rsi
movq 0x8(%rcx,%rax), %rdx
addq %rsi, %rdx
leaq -0x48(%rbp), %rdi
callq 0x26ac
leaq 0x442b(%rip), %rdi      # 0x81b8
leaq -0x48(%rbp), %rsi
callq 0x43a2
cmpl $0x0, (%rax)
jne 0x3f5d
movq %rbx, %rdi
addq $0x18, %rdi
leaq -0x48(%rbp), %rsi
callq 0x20f0
jmp 0x3ce0
leaq -0x140(%rbp), %r15
movq %r15, -0x10(%r15)
leaq 0x13fc(%rip), %rsi      # 0x51c2
leaq 0x1410(%rip), %rdx      # 0x51dd
leaq -0x150(%rbp), %rdi
callq 0x274a
leaq -0x150(%rbp), %rdi
callq 0x2de4
leaq 0x13f2(%rip), %rsi      # 0x51de
leaq -0x68(%rbp), %rdi
leaq -0x48(%rbp), %rdx
callq 0x4421
leaq 0x140c(%rip), %rsi      # 0x520c
leaq -0x68(%rbp), %rdi
callq 0x22a0
leaq -0xe0(%rbp), %r12
movq %r12, -0x10(%r12)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x3eaf
movups (%rcx), %xmm0
movups %xmm0, (%r12)
jmp 0x3ec0
leaq -0x120(%rbp), %r13
movq %r13, -0x10(%r13)
leaq 0x13cc(%rip), %rsi      # 0x5213
leaq 0x13f2(%rip), %rdx      # 0x5240
leaq -0x130(%rbp), %rdi
callq 0x274a
leaq -0x130(%rbp), %rdi
callq 0x2de4
leaq 0x13d4(%rip), %rsi      # 0x5241
leaq -0x68(%rbp), %rdi
leaq -0x48(%rbp), %rdx
callq 0x4421
leaq 0x13ed(%rip), %rsi      # 0x526e
leaq -0x68(%rbp), %rdi
callq 0x22a0
leaq -0xc0(%rbp), %r12
movq %r12, -0x10(%r12)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x3f06
movups (%rcx), %xmm0
movups %xmm0, (%r12)
jmp 0x3f17
movq %rdx, -0xf0(%rbp)
movq (%rcx), %rdx
movq %rdx, -0xe0(%rbp)
movq 0x8(%rax), %rdx
leaq -0xf0(%rbp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
callq 0x2de4
leaq 0x1394(%rip), %rsi      # 0x527e
leaq -0x190(%rbp), %rdi
leaq -0x48(%rbp), %rdx
callq 0x4421
leaq -0x190(%rbp), %rdi
callq 0x2de4
movq %rdx, -0xd0(%rbp)
movq (%rcx), %rdx
movq %rdx, -0xc0(%rbp)
movq 0x8(%rax), %rdx
leaq -0xd0(%rbp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
callq 0x2de4
leaq 0x133d(%rip), %rsi      # 0x527e
leaq -0x170(%rbp), %rdi
leaq -0x48(%rbp), %rdx
callq 0x4421
leaq -0x170(%rbp), %rdi
callq 0x2de4
leaq 0x127a(%rip), %rsi      # 0x51de
leaq -0x68(%rbp), %rdi
leaq -0x48(%rbp), %rdx
callq 0x4421
leaq 0x1294(%rip), %rsi      # 0x520c
leaq -0x68(%rbp), %rdi
callq 0x22a0
leaq -0xa0(%rbp), %r12
movq %r12, -0x10(%r12)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x3fa6
movups (%rcx), %xmm0
movups %xmm0, (%r12)
jmp 0x3fb7
movq %rdx, -0xb0(%rbp)
movq (%rcx), %rdx
movq %rdx, -0xa0(%rbp)
movq 0x8(%rax), %rdx
leaq -0xb0(%rbp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
callq 0x2de4
movq %rax, %rbx
movq -0xb0(%rbp), %rdi
jmp 0x402c
jmp 0x4038
jmp 0x4095
movq %rax, %rbx
leaq -0x160(%rbp), %rax
jmp 0x403f
movq %rax, %rbx
leaq -0x180(%rbp), %rax
jmp 0x403f
jmp 0x40a8
jmp 0x4095
movq %rax, %rbx
movq -0xd0(%rbp), %rdi
jmp 0x402c
jmp 0x4038
jmp 0x40a8
movq %rax, %rbx
movq -0xf0(%rbp), %rdi
cmpq %r12, %rdi
je 0x403b
callq 0x2190
jmp 0x403b
movq %rax, %rbx
leaq -0x58(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
jne 0x408a
jmp 0x4098
jmp 0x4095
jmp 0x40a8
jmp 0x4095
movq %rax, %rbx
movq -0x130(%rbp), %rdi
cmpq %r13, %rdi
je 0x4081
callq 0x2190
jmp 0x4081
jmp 0x407e
jmp 0x4095
jmp 0x4095
movq %rax, %rbx
movq -0x150(%rbp), %rdi
jmp 0x409c
jmp 0x40a8
jmp 0x40a8
jmp 0x4095
movq %rax, %rbx
movq -0x68(%rbp), %rdi
cmpq %r12, %rdi
je 0x4098
callq 0x2190
jmp 0x4098
jmp 0x4095
jmp 0x40a8
movq %rax, %rbx
movq -0x48(%rbp), %rdi
cmpq %r15, %rdi
je 0x40ab
callq 0x2190
jmp 0x40ab
movq %rax, %rbx
movq -0x90(%rbp), %rdi
cmpq %r14, %rdi
je 0x40bc
callq 0x2190
movq %rbx, %rdi
callq 0x2270