// File: /workspace/github_cpp_makefile_star2_O3/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 %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x30(%rdi), %rax
movl (%rax), %eax
decl %eax
cmpl $0x1c, %eax
ja 0xc296
movq %rsi, %r14
leaq 0xd8da(%rip), %rcx      # 0x198e4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %rbx, %rdi
callq 0xebde
testb %al, %al
je 0xc037
callq 0x8cb8
movq %rax, (%r14)
movq %rbx, %rdi
movq %r14, %rsi
callq 0xc476
jmp 0xc234
movq %rbx, %rdi
movq %r14, %rsi
callq 0xc91c
movq 0x30(%rbx), %rax
movl (%rax), %eax
movq %rbx, %rdi
cmpl $0xf, %eax
je 0xc129
cmpl $0xc, %eax
jne 0xc138
callq 0xbdc0
movq %rsp, %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0xe47c
movq (%r14), %rdi
callq 0x8d62
movq 0x18(%rax), %r12
movq (%r15), %r15
movq %r15, %rdi
callq 0x8d62
movq 0x18(%rax), %rsi
movq %r12, %rdi
callq 0x10c14
testb %al, %al
je 0xc3d5
movq (%r14), %rdi
movq %r15, %rsi
callq 0x8ecc
movq %rax, (%r14)
movl $0x48, %edi
callq 0x5290
movq %rax, %r15
movl $0x20, %edi
callq 0x5290
movq %rax, %r12
addq $0x10, %rax
movq %rax, (%r12)
movq $0x0, 0x8(%r12)
movb $0x0, 0x10(%r12)
movl $0x30, %edi
callq 0x5290
xorl %ecx, %ecx
movq %rcx, (%rax)
movq %rcx, 0xc(%rax)
movq %rcx, 0x18(%rax)
movq %rcx, 0x28(%rax)
movq %r15, %rdi
movl $0x1, %esi
movq %r12, %rdx
movq %rax, %rcx
callq 0x10f64
movq (%r14), %rdi
movq %r15, %rsi
jmp 0xc22f
movq %rbx, %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0xccd4
movq %r14, %rsi
xorl %edx, %edx
callq 0xcbb0
jmp 0xc234
movl $0x33, %esi
callq 0xba20
jmp 0xc234
movq %rbx, %rdi
callq 0xbdc0
movq %rbx, %rdi
movl $0xf, %esi
callq 0xbe34
movq %rsp, %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0xe47c
movq %rbx, %rdi
movl $0x10, %esi
callq 0xbe34
movq (%r15), %rdi
callq 0x8f5d
movq %rax, (%r14)
movq %rbx, %rdi
movq %r14, %rsi
callq 0xd2d0
movq 0x30(%rbx), %rax
cmpl $0x14, (%rax)
jne 0xc36b
movq %rbx, %rdi
callq 0xbdc0
movq %rbx, %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0xd2d0
movq %rbx, %rdi
callq 0xbdc0
movq 0x30(%rbx), %rax
movslq (%rax), %rax
leaq 0xd7e2(%rip), %rcx      # 0x199b0
cmpb $0x1, 0x68(%rax,%rcx)
jne 0xc377
movq %rsp, %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0xe47c
callq 0x1171e
movq 0x18(%rax), %rax
movq 0x18(%rax), %r12
movq (%r15), %r15
movq %r15, %rdi
callq 0x8d62
movq 0x18(%rax), %rsi
movq %r12, %rdi
callq 0x10c14
testb %al, %al
je 0xc424
movq %r15, %rdi
callq 0x8ecc
movq %rax, %r12
movq %rax, (%r14)
movq %r15, %rdi
callq 0x8d62
movq %r12, %rdi
movq %rax, %rsi
callq 0x8d67
movq %rbx, %rdi
movl $0xb, %esi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0xbe34
movq %rbx, %rdi
callq 0xbdc0
movq %rbx, %rdi
movl $0xf, %esi
callq 0xbe34
movq %rsp, %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0xe47c
movq %rbx, %rdi
movl $0x10, %esi
callq 0xbe34
movq %rbx, %rdi
movl $0xb, %esi
callq 0xbe34
movq (%r15), %rdi
callq 0x8f5d
jmp 0xc368
movq %rbx, %rdi
movl $0x36, %esi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0xba20
movq %rbx, %rdi
callq 0xbdc0
movq %rbx, %rdi
movl $0x4, %esi
callq 0xbe34
movq %rbx, %rdi
movl $0x9, %esi
callq 0xbe34
callq 0x8cb8
movq %rax, (%r14)
movq %rbx, %rdi
callq 0xebde
testb %al, %al
je 0xc389
movq %rbx, %rdi
movq %r14, %rsi
callq 0xc476
jmp 0xc3a2
movq %rbx, %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0xd340
movq %rbx, %rdi
callq 0xbdc0
movq %rbx, %rdi
movl $0xf, %esi
callq 0xbe34
movq %rsp, %rsi
movq %rbx, %rdi
callq 0xe47c
movq %rbx, %rdi
movl $0x10, %esi
jmp 0xc23c
movq %rbx, %rdi
callq 0xbdc0
callq 0x8f13
jmp 0xc368
movq %rbx, %rdi
callq 0xbdc0
movq %rsp, %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0xe47c
movq (%r15), %rdi
callq 0x8f5d
movq %rax, (%r14)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
cmpl $0xb, %eax
jne 0xc3b1
callq 0x8ecc
movq %rax, (%r14)
jmp 0xc234
movq 0x30(%rbx), %rax
movl (%rax), %eax
andl $-0x2, %eax
movq %rbx, %rdi
cmpl $0x1c, %eax
jne 0xc3be
movq %r14, %rsi
callq 0xccd4
movq %rbx, %rdi
movl $0xb, %esi
callq 0xbe34
jmp 0xc3c8
movq %rbx, %rdi
movl $0x35, %esi
jmp 0xc13d
movl $0x34, %esi
callq 0xba20
movq %rbx, %rdi
movl $0xa, %esi
jmp 0xc23c
movq 0x19bfc(%rip), %rdi     # 0x25fd8
leaq 0xd809(%rip), %rsi      # 0x19bec
callq 0x5270
movq %rax, %rdi
callq 0x5130
movq (%r14), %rdi
callq 0x8d62
movq 0x18(%rax), %rsi
movq %rbx, %rdi
movl $0x2, %edx
callq 0xed84
movq %r15, %rdi
callq 0x8d62
movq 0x18(%rax), %rsi
movq %rbx, %rdi
movl $0x2, %edx
callq 0xed84
jmp 0xc453
movq 0x19bad(%rip), %rdi     # 0x25fd8
leaq 0xd7e2(%rip), %rsi      # 0x19c14
callq 0x5270
movq %rax, %rbx
callq 0x1171e
movq 0x8(%rax), %rsi
movq %rbx, %rdi
callq 0x5220
movq %rax, %rdi
callq 0x5130
movl $0x1, %edi
callq 0x5340
movq %rax, %rbx
movl $0x48, %esi
movq %r15, %rdi
callq 0x52a0
movq %rbx, %rdi
callq 0x5470
nop