// File: /workspace/github_cpp_makefile_star2_O3/Davidc2525[P]Leaf/parser/Parser.cpp
// Function: Parser::Factor(LEAF::AST::NODEU*&)
void Parser::Factor(ASTU&f_node) {
		Obj* obj = new Obj(); string * ns=new string(""); string * buff = new string(""); 
		switch (la->kind) {
		case _t_pointer: case _name: {
			Designator(f_node);
			break;
		}
		case 47 /* "true" */: {
			Get();
			*obj=*new Obj(0,new string(""),symbol_table::boolType);  f_node = const_int_node(1); set_obj(f_node,obj);
			break;
		}
		case 48 /* "false" */: {
			Get();
			*obj=*new Obj(0,new string(""),symbol_table::boolType);  f_node = const_int_node(0); set_obj(f_node,obj);
			break;
		}
		case _t_r_pointer: {
			Get();
			Factor(f_node);
			cout<<"; referenciar "<<*get_obj(f_node)->name<<endl;  
			make_ref(get_obj(f_node));  /*dump(obj->type,2);*/ 
			f_node = (f_node);
			
			break;
		}
		case _floatLit: {
			Get();
			LexString(buff);
			*obj=*symbol_table::insert(1,new string(""),symbol_table::floatType);
			//*obj=*new Obj(0,new string(""),symbol_table::floatType); 
			//obj->val = stof(buff->c_str());
			f_node = const_float_node(stof(buff->c_str()));
			//cout<<"float "<<stof(buff->c_str())<<endl;
			set_obj(f_node,obj);
			
			//string * resr = new string("dq fc_ ");
			//resr->append(buff->c_str());
			//data_section->add(new DInstruccion(resr->c_str()));
			//visitor_generator->assembly->get_program()->section(Sections::data);
			
			break;
		}
		case _stringConst: {
			Get();
			LexString(buff);
			//*obj=*symbol_table::insert(0,new string(""),symbol_table::stringType);
			*obj=*new Obj(0,new string(""),symbol_table::stringType); 
			//make_ref(obj);
			//string * key = sl->add(buff);
			
			//obj->val = stof(buff->c_str());
			//f_node = const_string_node(key);
			//cout<<"float "<<stof(buff->c_str())<<endl;
			//set_obj(f_node,obj);
			
			break;
		}
		case _number: {
			Get();
			LexString(buff);  
			*obj=*new Obj(0,new string(""),symbol_table::intType); 
			
			obj->val = atoi(buff->c_str());
			f_node = const_int_node(obj->val);
			set_obj(f_node,obj);
			
			break;
		}
		case 15 /* "(" */: {
			Get();
			Expr(f_node);
			Expect(16 /* ")" */);
			break;
		}
		case 28 /* "extern" */: case 29 /* "fun" */: {
			FuncDecl(f_node);
			break;
		}
		default: SynErr(64); break;
		}
		while (la->kind == 15 /* "(" */) {
			ActParams(f_node,true);
			cout << " ;call "<<*get_obj(f_node)->name<<endl; 
		}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movl $0x48, %edi
callq 0x5290
movq %rax, %r15
movb $0x1, 0x4(%rax)
xorl %r13d, %r13d
movb %r13b, 0x10(%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rax)
movb %r13b, 0x28(%rax)
movl $0xffffffff, 0x30(%rax) # imm = 0xFFFFFFFF
movl $0x20, %edi
callq 0x5290
leaq 0x10(%rax), %rcx
movq %rcx, (%rax)
movq %r13, 0x8(%rax)
movb %r13b, 0x10(%rax)
movl $0x20, %edi
callq 0x5290
movq %rax, %r12
addq $0x10, %rax
movq %rax, (%r12)
movq %r13, 0x8(%r12)
movb %r13b, 0x10(%r12)
movq 0x30(%r14), %rax
movl (%rax), %eax
cmpl $0x1b, %eax
jg 0xd532
decl %eax
cmpl $0xe, %eax
ja 0xd936
leaq 0xc43f(%rip), %rcx      # 0x19958
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %r14, %rdi
movq %rbx, %rsi
callq 0xc91c
jmp 0xd8a2
leal -0x1c(%rax), %ecx
cmpl $0x2, %ecx
jb 0xd5ad
cmpl $0x2f, %eax
je 0xd830
cmpl $0x30, %eax
jne 0xd936
movq %r14, %rdi
callq 0xbdc0
movl $0x48, %edi
callq 0x5290
movq %rax, %r12
movl $0x20, %edi
callq 0x5290
movq %rax, %rcx
addq $0x10, %rcx
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x19810(%rip), %rcx     # 0x26d98
movq (%rcx), %rcx
movq %r12, %rdi
xorl %esi, %esi
movq %rax, %rdx
callq 0x10f64
movl $0x9, %ecx
movq %r15, %rdi
movq %r12, %rsi
rep  movsq (%rsi), %es:(%rdi)
xorl %edi, %edi
jmp 0xd88f
movq %r14, %rdi
movq %rbx, %rsi
callq 0xccd4
jmp 0xd8a2
movq %r14, %rdi
callq 0xbdc0
movq %r14, %rdi
movq %r12, %rsi
callq 0xee9c
movl $0x20, %edi
callq 0x5290
leaq 0x10(%rax), %rcx
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x197c4(%rip), %rcx     # 0x26db8
movq (%rcx), %rdx
movl $0x1, %edi
movq %rax, %rsi
callq 0x10fba
movl $0x9, %ecx
movq %r15, %rdi
movq %rax, %rsi
rep  movsq (%rsi), %es:(%rdi)
movq (%r12), %rsi
leaq 0x10(%rsp), %rdi
leaq 0xb(%rsp), %rdx
callq 0xeba0
movq 0x10(%rsp), %r13
callq 0x5060
movq %rax, %r12
movl (%rax), %eax
movl %eax, 0xc(%rsp)
movl $0x0, (%r12)
leaq 0x30(%rsp), %rbp
movq %r13, %rdi
movq %rbp, %rsi
callq 0x5380
cmpq %r13, (%rbp)
je 0xd97f
movl (%r12), %eax
testl %eax, %eax
je 0xd948
cmpl $0x22, %eax
jne 0xd950
leaq 0xc73e(%rip), %rdi      # 0x19db4
callq 0x53b0
movq %r14, %rdi
callq 0xbdc0
movq %r14, %rdi
movq %r12, %rsi
callq 0xee9c
movl $0x48, %edi
callq 0x5290
movq %rax, %r12
movl $0x20, %edi
callq 0x5290
movq %rax, %rcx
addq $0x10, %rcx
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x19706(%rip), %rcx     # 0x26dc8
movq (%rcx), %rcx
movq %r12, %rdi
xorl %esi, %esi
movq %rax, %rdx
callq 0x10f64
movl $0x9, %ecx
movq %r15, %rdi
movq %r12, %rsi
rep  movsq (%rsi), %es:(%rdi)
jmp 0xd8a2
movq %r14, %rdi
callq 0xbdc0
movq %r14, %rdi
movq %rbx, %rsi
callq 0xd486
movq 0x188d9(%rip), %r15     # 0x25fd8
leaq 0xc616(%rip), %rsi      # 0x19d1c
movl $0xe, %edx
movq %r15, %rdi
callq 0x5300
movq (%rbx), %rdi
callq 0x8d62
movq 0x8(%rax), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
movq %r15, %rdi
callq 0x5300
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x5260
movsbl %al, %esi
movq %r15, %rdi
callq 0x5050
movq %rax, %rdi
callq 0x51a0
movq (%rbx), %rdi
callq 0x8d62
movq %rax, %r15
movq 0x18(%rax), %r12
movl $0x30, %edi
callq 0x5290
xorl %ecx, %ecx
movq %rcx, (%rax)
movl $0x0, 0xc(%rax)
movq %rcx, 0x28(%rax)
movq %rax, 0x18(%r15)
movl $0xc, 0x10(%rax)
movq %r12, 0x18(%rax)
jmp 0xd8a2
movq %r14, %rdi
callq 0xbdc0
movq %r14, %rdi
movq %r12, %rsi
callq 0xee9c
movl $0x48, %edi
callq 0x5290
movq %rax, %r13
movl $0x20, %edi
callq 0x5290
movq %rax, %rcx
addq $0x10, %rcx
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x195cc(%rip), %rcx     # 0x26da8
movq (%rcx), %rcx
movq %r13, %rdi
xorl %esi, %esi
movq %rax, %rdx
callq 0x10f64
movl $0x9, %ecx
movq %r15, %rdi
movq %r13, %rsi
rep  movsq (%rsi), %es:(%rdi)
movq (%r12), %rdi
callq 0x5410
movl %eax, 0x2c(%r15)
movl %eax, %edi
jmp 0xd88f
movq %r14, %rdi
callq 0xbdc0
movq %r14, %rdi
movq %rbx, %rsi
callq 0xe47c
movq %r14, %rdi
movl $0x10, %esi
callq 0xbe34
jmp 0xd8a2
movq %r14, %rdi
callq 0xbdc0
movl $0x48, %edi
callq 0x5290
movq %rax, %r12
movl $0x20, %edi
callq 0x5290
movq %rax, %rcx
addq $0x10, %rcx
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x1952c(%rip), %rcx     # 0x26d98
movq (%rcx), %rcx
movq %r12, %rdi
xorl %esi, %esi
movq %rax, %rdx
callq 0x10f64
movl $0x9, %ecx
movq %r15, %rdi
movq %r12, %rsi
rep  movsq (%rsi), %es:(%rdi)
movl $0x1, %edi
callq 0x8e47
movq %rax, (%rbx)
movq %rax, %rdi
movq %r15, %rsi
callq 0x8d67
movq 0x30(%r14), %rax
cmpl $0xf, (%rax)
jne 0xd927
movq 0x18726(%rip), %r15     # 0x25fd8
leaq 0xc472(%rip), %r12      # 0x19d2b
movq %r14, %rdi
movq %rbx, %rsi
movl $0x1, %edx
callq 0xcbb0
movl $0x7, %edx
movq %r15, %rdi
movq %r12, %rsi
callq 0x5300
movq (%rbx), %rdi
callq 0x8d62
movq 0x8(%rax), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
movq %r15, %rdi
callq 0x5300
movq %rax, %r13
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x5260
movsbl %al, %esi
movq %r13, %rdi
callq 0x5050
movq %rax, %rdi
callq 0x51a0
movq 0x30(%r14), %rax
cmpl $0xf, (%rax)
je 0xd8b9
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r14, %rdi
movl $0x40, %esi
callq 0xba20
jmp 0xd8a2
movl 0xc(%rsp), %eax
movl %eax, (%r12)
callq 0x8e84
movq %rax, (%rbx)
leaq 0x20(%rsp), %rcx
movq -0x10(%rcx), %rdi
cmpq %rcx, %rdi
je 0xd897
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x52a0
movq (%rbx), %rax
jmp 0xd897
leaq 0xc42e(%rip), %rdi      # 0x19db4
callq 0x5180
jmp 0xd9a9
jmp 0xd9a9
jmp 0xd9a9
jmp 0xd9a9
movq %rax, %rbx
jmp 0xd9d8
jmp 0xd99c
jmp 0xd9a9
movq %rax, %rbx
movl $0x48, %esi
movq %r13, %rdi
jmp 0xd9b4
movq %rax, %rbx
movl $0x48, %esi
movq %r12, %rdi
callq 0x52a0
movq %rbx, %rdi
callq 0x5470
movq %rax, %rbx
jmp 0xd9b9
movq %rax, %rbx
cmpl $0x0, (%r12)
jne 0xd9d8
movl 0xc(%rsp), %eax
movl %eax, (%r12)
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xd9b9
movq 0x20(%rsp), %rsi
incq %rsi
jmp 0xd9b4