// File: /workspace/github_cpp_makefile_star2_O1/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 0xc2ca
movq %rsi, %r14
leaq 0xd856(%rip), %rcx      # 0x19894
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %rbx, %rdi
callq 0xe94a
testb %al, %al
je 0xc06b
callq 0x8ccc
movq %rax, (%r14)
movq %rbx, %rdi
movq %r14, %rsi
callq 0xc4aa
jmp 0xc268
movq %rbx, %rdi
movq %r14, %rsi
callq 0xc94e
movq 0x30(%rbx), %rax
movl (%rax), %eax
movq %rbx, %rdi
cmpl $0xf, %eax
je 0xc15d
cmpl $0xc, %eax
jne 0xc16c
callq 0xbde8
movq %rsp, %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0xe1e2
movq (%r14), %rdi
callq 0x8d76
movq 0x18(%rax), %r12
movq (%r15), %r15
movq %r15, %rdi
callq 0x8d76
movq 0x18(%rax), %rsi
movq %r12, %rdi
callq 0x10bfc
testb %al, %al
je 0xc409
movq (%r14), %rdi
movq %r15, %rsi
callq 0x8ee0
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 0x10f84
movq (%r14), %rdi
movq %r15, %rsi
jmp 0xc263
movq %rbx, %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0xcd06
movq %r14, %rsi
xorl %edx, %edx
callq 0xcbe2
jmp 0xc268
movl $0x33, %esi
callq 0xba44
jmp 0xc268
movq %rbx, %rdi
callq 0xbde8
movq %rbx, %rdi
movl $0xf, %esi
callq 0xbe68
movq %rsp, %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0xe1e2
movq %rbx, %rdi
movl $0x10, %esi
callq 0xbe68
movq (%r15), %rdi
callq 0x8f71
movq %rax, (%r14)
movq %rbx, %rdi
movq %r14, %rsi
callq 0xd29c
movq 0x30(%rbx), %rax
cmpl $0x14, (%rax)
jne 0xc39f
movq %rbx, %rdi
callq 0xbde8
movq %rbx, %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0xd29c
movq %rbx, %rdi
callq 0xbde8
movq 0x30(%rbx), %rax
movslq (%rax), %rax
leaq 0xd75e(%rip), %rcx      # 0x19960
cmpb $0x1, 0x68(%rax,%rcx)
jne 0xc3ab
movq %rsp, %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0xe1e2
callq 0x1179e
movq 0x18(%rax), %rax
movq 0x18(%rax), %r12
movq (%r15), %r15
movq %r15, %rdi
callq 0x8d76
movq 0x18(%rax), %rsi
movq %r12, %rdi
callq 0x10bfc
testb %al, %al
je 0xc458
movq %r15, %rdi
callq 0x8ee0
movq %rax, %r12
movq %rax, (%r14)
movq %r15, %rdi
callq 0x8d76
movq %r12, %rdi
movq %rax, %rsi
callq 0x8d7b
movq %rbx, %rdi
movl $0xb, %esi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0xbe68
movq %rbx, %rdi
callq 0xbde8
movq %rbx, %rdi
movl $0xf, %esi
callq 0xbe68
movq %rsp, %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0xe1e2
movq %rbx, %rdi
movl $0x10, %esi
callq 0xbe68
movq %rbx, %rdi
movl $0xb, %esi
callq 0xbe68
movq (%r15), %rdi
callq 0x8f71
jmp 0xc39c
movq %rbx, %rdi
movl $0x36, %esi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0xba44
movq %rbx, %rdi
callq 0xbde8
movq %rbx, %rdi
movl $0x4, %esi
callq 0xbe68
movq %rbx, %rdi
movl $0x9, %esi
callq 0xbe68
callq 0x8ccc
movq %rax, (%r14)
movq %rbx, %rdi
callq 0xe94a
testb %al, %al
je 0xc3bd
movq %rbx, %rdi
movq %r14, %rsi
callq 0xc4aa
jmp 0xc3d6
movq %rbx, %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0xd30c
movq %rbx, %rdi
callq 0xbde8
movq %rbx, %rdi
movl $0xf, %esi
callq 0xbe68
movq %rsp, %rsi
movq %rbx, %rdi
callq 0xe1e2
movq %rbx, %rdi
movl $0x10, %esi
jmp 0xc270
movq %rbx, %rdi
callq 0xbde8
callq 0x8f27
jmp 0xc39c
movq %rbx, %rdi
callq 0xbde8
movq %rsp, %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0xe1e2
movq (%r15), %rdi
callq 0x8f71
movq %rax, (%r14)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
cmpl $0xb, %eax
jne 0xc3e5
callq 0x8ee0
movq %rax, (%r14)
jmp 0xc268
movq 0x30(%rbx), %rax
movl (%rax), %eax
andl $-0x2, %eax
movq %rbx, %rdi
cmpl $0x1c, %eax
jne 0xc3f2
movq %r14, %rsi
callq 0xcd06
movq %rbx, %rdi
movl $0xb, %esi
callq 0xbe68
jmp 0xc3fc
movq %rbx, %rdi
movl $0x35, %esi
jmp 0xc171
movl $0x34, %esi
callq 0xba44
movq %rbx, %rdi
movl $0xa, %esi
jmp 0xc270
movq 0x19bc8(%rip), %rdi     # 0x25fd8
leaq 0xd785(%rip), %rsi      # 0x19b9c
callq 0x5270
movq %rax, %rdi
callq 0x5130
movq (%r14), %rdi
callq 0x8d76
movq 0x18(%rax), %rsi
movq %rbx, %rdi
movl $0x2, %edx
callq 0xeaf0
movq %r15, %rdi
callq 0x8d76
movq 0x18(%rax), %rsi
movq %rbx, %rdi
movl $0x2, %edx
callq 0xeaf0
jmp 0xc487
movq 0x19b79(%rip), %rdi     # 0x25fd8
leaq 0xd75e(%rip), %rsi      # 0x19bc4
callq 0x5270
movq %rax, %rbx
callq 0x1179e
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