// File: /workspace/github_cpp_makefile_star2_O1/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 0xd496
decl %eax
cmpl $0xe, %eax
ja 0xd804
leaq 0xc48b(%rip), %rcx      # 0x19908
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %r14, %rdi
movq %rbx, %rsi
callq 0xc94e
jmp 0xd849
leal -0x1c(%rax), %ecx
cmpl $0x2, %ecx
jb 0xd511
cmpl $0x2f, %eax
je 0xd798
cmpl $0x30, %eax
jne 0xd804
movq %r14, %rdi
callq 0xbde8
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 0x198ac(%rip), %rcx     # 0x26d98
movq (%rcx), %rcx
movq %r12, %rdi
xorl %esi, %esi
movq %rax, %rdx
callq 0x10f84
movl $0x9, %ecx
movq %r15, %rdi
movq %r12, %rsi
rep  movsq (%rsi), %es:(%rdi)
xorl %edi, %edi
jmp 0xd7f7
movq %r14, %rdi
movq %rbx, %rsi
callq 0xcd06
jmp 0xd849
movq %r14, %rdi
callq 0xbde8
movq %r14, %rdi
movq %r12, %rsi
callq 0xec0a
movl $0x20, %edi
callq 0x5290
leaq 0x10(%rax), %rcx
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x19860(%rip), %rcx     # 0x26db8
movq (%rcx), %rdx
movl $0x1, %edi
movq %rax, %rsi
callq 0x10fda
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 0xe90c
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 0xd8dd
movl (%r12), %eax
testl %eax, %eax
je 0xd813
cmpl $0x22, %eax
jne 0xd81b
leaq 0xc78a(%rip), %rdi      # 0x19d64
callq 0x53b0
movq %r14, %rdi
callq 0xbde8
movq %r14, %rdi
movq %r12, %rsi
callq 0xec0a
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 0x197a2(%rip), %rcx     # 0x26dc8
movq (%rcx), %rcx
movq %r12, %rdi
xorl %esi, %esi
movq %rax, %rdx
callq 0x10f84
movl $0x9, %ecx
movq %r15, %rdi
movq %r12, %rsi
rep  movsq (%rsi), %es:(%rdi)
jmp 0xd849
movq %r14, %rdi
callq 0xbde8
movq %r14, %rdi
movq %rbx, %rsi
callq 0xd3ea
movq 0x18975(%rip), %r15     # 0x25fd8
leaq 0xc662(%rip), %rsi      # 0x19ccc
movl $0xe, %edx
movq %r15, %rdi
callq 0x5300
movq (%rbx), %rdi
callq 0x8d76
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 0x8d76
movq %rax, %r15
movq 0x18(%rax), %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 %rax, 0x18(%r15)
movl $0xc, 0x10(%rax)
movq %r12, 0x18(%rax)
jmp 0xd849
movq %r14, %rdi
callq 0xbde8
movq %r14, %rdi
movq %r12, %rsi
callq 0xec0a
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 0x19667(%rip), %rcx     # 0x26da8
movq (%rcx), %rcx
movq %r13, %rdi
xorl %esi, %esi
movq %rax, %rdx
callq 0x10f84
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 0xd7f7
movq %r14, %rdi
callq 0xbde8
movq %r14, %rdi
movq %rbx, %rsi
callq 0xe1e2
movq %r14, %rdi
movl $0x10, %esi
callq 0xbe68
jmp 0xd849
movq %r14, %rdi
callq 0xbde8
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 0x195c4(%rip), %rcx     # 0x26d98
movq (%rcx), %rcx
movq %r12, %rdi
xorl %esi, %esi
movq %rax, %rdx
callq 0x10f84
movl $0x9, %ecx
movq %r15, %rdi
movq %r12, %rsi
rep  movsq (%rsi), %es:(%rdi)
movl $0x1, %edi
callq 0x8e5b
movq %rax, (%rbx)
movq %rax, %rdi
jmp 0xd841
movq %r14, %rdi
movl $0x40, %esi
callq 0xba44
jmp 0xd849
movl 0xc(%rsp), %eax
movl %eax, (%r12)
callq 0x8e98
movq %rax, (%rbx)
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xd83e
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x52a0
movq (%rbx), %rdi
movq %r15, %rsi
callq 0x8d7b
movq 0x30(%r14), %rax
cmpl $0xf, (%rax)
jne 0xd8ce
movq 0x1877f(%rip), %r15     # 0x25fd8
leaq 0xc47b(%rip), %r12      # 0x19cdb
movq %r14, %rdi
movq %rbx, %rsi
movl $0x1, %edx
callq 0xcbe2
movl $0x7, %edx
movq %r15, %rdi
movq %r12, %rsi
callq 0x5300
movq (%rbx), %rdi
callq 0x8d76
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 0xd860
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xc480(%rip), %rdi      # 0x19d64
callq 0x5180
jmp 0xd907
jmp 0xd907
jmp 0xd907
jmp 0xd907
movq %rax, %rbx
jmp 0xd936
jmp 0xd8fa
jmp 0xd907
movq %rax, %rbx
movl $0x48, %esi
movq %r13, %rdi
jmp 0xd912
movq %rax, %rbx
movl $0x48, %esi
movq %r12, %rdi
callq 0x52a0
movq %rbx, %rdi
callq 0x5470
movq %rax, %rbx
jmp 0xd917
movq %rax, %rbx
cmpl $0x0, (%r12)
jne 0xd936
movl 0xc(%rsp), %eax
movl %eax, (%r12)
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xd917
movq 0x20(%rsp), %rsi
incq %rsi
jmp 0xd912