// File: /workspace/github_cpp_makefile_star2_O2/Davidc2525[P]Leaf/parser/Parser.cpp
// Function: Parser::Statement(LEAF::AST::NODEU*&)
void Parser::Statement(ASTU&stat) {
		ASTU e_stat;
		switch (la->kind) {
		case _t_pointer: case _name: case 15 /* "(" */: case 24 /* ":" */: case 25 /* "," */: case 26 /* "[" */: {
			if (isVarDecl()) {
				stat = block_stat(); 
				VarDeclDef(stat);
				Expect(11 /* ";" */);
			} else {
				Designator(stat);
				if (la->kind == 12 /* "=" */) {
					Get();
					Expr(e_stat);
					if(!get_obj(stat)->type->equals(get_obj(e_stat)->type)  ){
					cout<<";error de asignacion, tipos diferentes."<<endl; 
					dump(get_obj(stat)->type,2);
					dump(get_obj(e_stat)->type,2);
					exit(1);
					}else{
					stat = assign(stat,e_stat);
					Obj*o = new Obj(1,new string(),new Struct()); 
					set_obj(stat,o);
					} 
					
					
				} else if (la->kind == 15 /* "(" */) {
					ActParams(stat,false);
				} else SynErr(51);
				Expect(11 /* ";" */);
			}
			break;
		}
		case 28 /* "extern" */: case 29 /* "fun" */: {
			FuncDecl(stat);
			break;
		}
		case 13 /* "class" */: {
			Get();
			Expect(_name);
			Expect(9 /* "{" */);
			stat = block_stat(); 
			if (isVarDecl()) {
				VarDeclDef(stat);
				Expect(11 /* ";" */);
			} else if (la->kind == 28 /* "extern" */ || la->kind == 29 /* "fun" */) {
				FuncDecl(stat);
				Expect(11 /* ";" */);
			} else SynErr(52);
			Expect(10 /* "}" */);
			break;
		}
		case 14 /* "print" */: {
			Get();
			Expect(15 /* "(" */);
			Expr(e_stat);
			Expect(16 /* ")" */);
			Expect(11 /* ";" */);
			stat = print_node(e_stat);
			break;
		}
		case 17 /* "sizeof" */: {
			Get();
			Expect(15 /* "(" */);
			Expr(e_stat);
			Expect(16 /* ")" */);
			break;
		}
		case 18 /* "ret" */: {
			Get();
			if (StartOf(2)) {
				Expr(e_stat);
				if(!  symbol_table::currMethod()->type->elemType->equals(get_obj(e_stat)->type) ){cout<<";El valor q retorna no coincide con la firma. "<<*symbol_table::currMethod()->name<<endl; exit(1);}
				stat = return_node(e_stat); set_obj(stat,get_obj(e_stat)); 
				
			} else if (la->kind == 11 /* ";" */) {
				stat = return_node();
			} else SynErr(53);
			Expect(11 /* ";" */);
			break;
		}
		case 19 /* "if" */: {
			Get();
			Expect(15 /* "(" */);
			Expr(e_stat);
			Expect(16 /* ")" */);
			stat = if_node(e_stat); 
			StatementBLock(stat);
			if (la->kind == 20 /* "else" */) {
				Get();
				StatementBLock(stat);
			}
			break;
		}
		case 21 /* "throw" */: {
			Get();
			Expr(e_stat);
			stat = new_throw(e_stat); 
			break;
		}
		case 22 /* "try" */: {
			TryCatchStatement(stat);
			break;
		}
		case 9 /* "{" */: {
			StatementBLock(stat);
			break;
		}
		case 11 /* ";" */: {
			Get();
			stat = empty_node(); 
			break;
		}
		default: SynErr(54); break;
		}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq 0x30(%rdi), %rax
movl (%rax), %eax
decl %eax
cmpl $0x1c, %eax
ja 0xaecc
movq %rsi, %r14
leaq 0xbcae(%rip), %rcx      # 0x168f4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %rbx, %rdi
callq 0xcf22
testb %al, %al
je 0xac73
callq 0x805c
movq %rax, (%r14)
movq %rbx, %rdi
movq %r14, %rsi
callq 0xb090
jmp 0xae6f
movq %rbx, %rdi
movq %r14, %rsi
callq 0xb484
movq 0x30(%rbx), %rax
movl (%rax), %eax
cmpl $0xf, %eax
je 0xad5f
cmpl $0xc, %eax
jne 0xad71
movq %rbx, %rdi
callq 0xaa2e
leaq 0x8(%rsp), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0xc8fa
movq (%r14), %rdi
callq 0x80da
movq 0x18(%rax), %r12
movq (%r15), %r15
movq %r15, %rdi
callq 0x80da
movq 0x18(%rax), %rsi
movq %r12, %rdi
callq 0xee86
testb %al, %al
je 0xaff7
movq (%r14), %rdi
movq %r15, %rsi
callq 0x8230
movq %rax, (%r14)
pushq $0x48
popq %rdi
callq 0x5260
movq %rax, %r15
pushq $0x20
popq %rdi
callq 0x5260
movq %rax, %r12
addq $0x10, %rax
movq %rax, (%r12)
andq $0x0, 0x8(%r12)
movb $0x0, 0x10(%r12)
pushq $0x30
popq %rdi
callq 0x5260
andq $0x0, (%rax)
andq $0x0, 0xc(%rax)
andq $0x0, 0x18(%rax)
andq $0x0, 0x28(%rax)
pushq $0x1
popq %rsi
movq %r15, %rdi
movq %r12, %rdx
movq %rax, %rcx
callq 0xf244
movq (%r14), %rdi
movq %r15, %rsi
jmp 0xae6a
movq %rbx, %rdi
movq %r14, %rsi
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xb7c6
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0xb6b2
jmp 0xae6f
pushq $0x33
popq %rsi
movq %rbx, %rdi
callq 0xa6a4
jmp 0xae6f
movq %rbx, %rdi
callq 0xaa2e
pushq $0xf
popq %rsi
movq %rbx, %rdi
callq 0xaa9a
leaq 0x8(%rsp), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0xc8fa
pushq $0x10
popq %rsi
movq %rbx, %rdi
callq 0xaa9a
movq (%r15), %rdi
callq 0x82ab
movq %rax, (%r14)
movq %rbx, %rdi
movq %r14, %rsi
callq 0xbbc0
movq 0x30(%rbx), %rax
cmpl $0x14, (%rax)
jne 0xaf99
movq %rbx, %rdi
callq 0xaa2e
movq %rbx, %rdi
movq %r14, %rsi
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xbbc0
movq %rbx, %rdi
callq 0xaa2e
movq 0x30(%rbx), %rax
movslq (%rax), %rax
leaq 0xbbb9(%rip), %rcx      # 0x169c0
cmpb $0x1, 0x68(%rax,%rcx)
jne 0xafa6
leaq 0x8(%rsp), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0xc8fa
callq 0xf840
movq 0x18(%rax), %rax
movq 0x18(%rax), %r12
movq (%r15), %r15
movq %r15, %rdi
callq 0x80da
movq 0x18(%rax), %rsi
movq %r12, %rdi
callq 0xee86
testb %al, %al
je 0xb043
movq %r15, %rdi
callq 0x8230
movq %rax, %r12
movq %rax, (%r14)
movq %r15, %rdi
callq 0x80da
movq %r12, %rdi
movq %rax, %rsi
callq 0x80df
pushq $0xb
popq %rsi
movq %rbx, %rdi
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xaa9a
movq %rbx, %rdi
callq 0xaa2e
pushq $0xf
popq %rsi
movq %rbx, %rdi
callq 0xaa9a
leaq 0x8(%rsp), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0xc8fa
pushq $0x10
popq %rsi
movq %rbx, %rdi
callq 0xaa9a
pushq $0xb
popq %rsi
movq %rbx, %rdi
callq 0xaa9a
movq (%r15), %rdi
callq 0x82ab
jmp 0xaf96
pushq $0x36
popq %rsi
movq %rbx, %rdi
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xa6a4
movq %rbx, %rdi
callq 0xaa2e
pushq $0x4
popq %rsi
movq %rbx, %rdi
callq 0xaa9a
pushq $0x9
popq %rsi
movq %rbx, %rdi
callq 0xaa9a
callq 0x805c
movq %rax, (%r14)
movq %rbx, %rdi
callq 0xcf22
testb %al, %al
je 0xafb8
movq %rbx, %rdi
movq %r14, %rsi
callq 0xb090
jmp 0xafd1
movq %rbx, %rdi
movq %r14, %rsi
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xbc1e
movq %rbx, %rdi
callq 0xaa2e
pushq $0xf
popq %rsi
movq %rbx, %rdi
callq 0xaa9a
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0xc8fa
pushq $0x10
jmp 0xae71
movq %rbx, %rdi
callq 0xaa2e
callq 0x8273
jmp 0xaf96
movq %rbx, %rdi
callq 0xaa2e
leaq 0x8(%rsp), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0xc8fa
movq (%r15), %rdi
callq 0x82ab
movq %rax, (%r14)
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
cmpl $0xb, %eax
jne 0xafde
callq 0x8230
movq %rax, (%r14)
jmp 0xae6f
movq 0x30(%rbx), %rax
movl (%rax), %eax
andl $-0x2, %eax
cmpl $0x1c, %eax
jne 0xafe5
movq %rbx, %rdi
movq %r14, %rsi
callq 0xb7c6
pushq $0xb
popq %rsi
movq %rbx, %rdi
callq 0xaa9a
jmp 0xaff0
pushq $0x35
jmp 0xad73
pushq $0x34
popq %rsi
movq %rbx, %rdi
callq 0xa6a4
pushq $0xa
jmp 0xae71
movq 0x19fd2(%rip), %rdi     # 0x24fd0
leaq 0xbbf7(%rip), %rsi      # 0x16bfc
callq 0x5240
movq %rax, %rdi
callq 0x5120
movq (%r14), %rdi
callq 0x80da
movq 0x18(%rax), %rsi
pushq $0x2
popq %rbp
movq %rbx, %rdi
movl %ebp, %edx
callq 0xd092
movq %r15, %rdi
callq 0x80da
movq 0x18(%rax), %rsi
movq %rbx, %rdi
movl %ebp, %edx
callq 0xd092
jmp 0xb072
movq 0x19f86(%rip), %rdi     # 0x24fd0
leaq 0xbbd3(%rip), %rsi      # 0x16c24
callq 0x5240
movq %rax, %rbx
callq 0xf840
movq 0x8(%rax), %rsi
movq %rbx, %rdi
callq 0x5200
movq %rax, %rdi
callq 0x5120
pushq $0x1
popq %rdi
callq 0x5300
movq %rax, %rbx
pushq $0x48
popq %rsi
movq %r15, %rdi
callq 0x5270
movq %rbx, %rdi
callq 0x5420