// File: Davidc2525[P]Leaf/parser/Parser.cpp
// Function: Parser::Designator(LEAF::AST::NODEU*&)
void Parser::Designator(ASTU&d_ast) {
		Obj*obj = new Obj();  string * ns=new string(""); Obj * oex = new Obj(); 
		if (la->kind == _name) {
			Get();
			LexString(ns); 
			*obj=*symbol_table::find(ns); 
			ASTU nc = ident(ns); 
			set_obj(nc,obj); 
			d_ast=nc;
			//cout<<"; load "<<*get_obj(nc)->name<<", adr "<<get_obj(nc)->adr<<endl; 
			
		} else if (la->kind == _t_pointer) {
			Get();
			Factor(d_ast);
			d_ast = (d_ast); cout<<"; desreferenciar "<<*get_obj(d_ast)->name<<endl; un_pointer(get_obj(d_ast)); dump(get_obj(d_ast)->type,2); 
		} else SynErr(55);
		if (StartOf(3)) {
			while (la->kind == 49 /* "." */) {
				Get();
				Expect(_name);
				LexString(ns); *obj=*symbol_table::findField(ns,obj->type); cout<<"; load "<<*obj->name<<endl; 
			}
		} else if (la->kind == 26 /* "[" */) {
			Get();
			Expr(d_ast);
			Expect(27 /* "]" */);
			un_pointer(obj); 
			while (la->kind == 26 /* "[" */) {
				Get();
				Expr(d_ast);
				Expect(27 /* "]" */);
				un_pointer(obj); 
			}
		} else SynErr(56);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x58(%rbp)
movl $0x48, %edi
callq 0x62e0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x50(%rbp)
callq 0x17930
jmp 0x14376
movq -0x50(%rbp), %rax
movq %rax, -0x18(%rbp)
movl $0x20, %edi
callq 0x62e0
movq %rax, -0x68(%rbp)
movq %rax, -0x70(%rbp)
movb $0x1, -0x32(%rbp)
leaq -0x31(%rbp), %rdi
movq %rdi, -0x60(%rbp)
callq 0x6500
movq -0x68(%rbp), %rdi
movq -0x60(%rbp), %rdx
leaq 0x217bd(%rip), %rsi     # 0x35b6d
callq 0xada0
jmp 0x143b7
movb $0x0, -0x32(%rbp)
leaq -0x31(%rbp), %rdi
callq 0x6340
movq -0x70(%rbp), %rax
movq %rax, -0x30(%rbp)
movl $0x48, %edi
callq 0x62e0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x78(%rbp)
callq 0x17930
jmp 0x143e7
movq -0x58(%rbp), %rax
movq -0x78(%rbp), %rcx
movq %rcx, -0x40(%rbp)
movq 0x30(%rax), %rax
cmpl $0x4, (%rax)
jne 0x144c8
movq -0x58(%rbp), %rdi
callq 0x132b0
movq -0x58(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x17810
movq -0x30(%rbp), %rdi
callq 0x20020
movq %rax, %rsi
movq -0x18(%rbp), %rdi
movl $0x48, %edx
callq 0x6230
movq -0x30(%rbp), %rdi
callq 0xe3f0
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0xe300
movq -0x48(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
jmp 0x14584
movq -0x50(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
movl $0x48, %esi
callq 0x62f0
jmp 0x146c5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x31(%rbp), %rdi
callq 0x6340
testb $0x1, -0x32(%rbp)
jne 0x14496
jmp 0x144a4
movq -0x70(%rbp), %rdi
movl $0x20, %esi
callq 0x62f0
jmp 0x146c5
movq -0x78(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
movl $0x48, %esi
callq 0x62f0
jmp 0x146c5
movq -0x58(%rbp), %rax
movq 0x30(%rax), %rax
cmpl $0x1, (%rax)
jne 0x14574
movq -0x58(%rbp), %rdi
callq 0x132b0
movq -0x58(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x151d0
movq -0x10(%rbp), %rax
movq (%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq 0x35acc(%rip), %rdi     # 0x49fd0
leaq 0x20520(%rip), %rsi     # 0x34a2b
callq 0x62c0
movq %rax, -0x80(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0xe2e0
movq -0x80(%rbp), %rdi
movq 0x8(%rax), %rsi
callq 0x6280
movq %rax, %rdi
movq 0x35a79(%rip), %rsi     # 0x49fb0
callq 0x6320
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0xe2e0
movq -0x58(%rbp), %rdi
movq %rax, %rsi
callq 0x17970
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0xe2e0
movq -0x58(%rbp), %rdi
movq 0x18(%rax), %rsi
movl $0x2, %edx
callq 0x17670
jmp 0x14582
movq -0x58(%rbp), %rdi
movl $0x37, %esi
callq 0x12be0
jmp 0x14584
movq -0x58(%rbp), %rdi
movl $0x3, %esi
callq 0x13450
testb $0x1, %al
jne 0x1459b
jmp 0x1462c
jmp 0x1459d
movq -0x58(%rbp), %rax
movq 0x30(%rax), %rax
cmpl $0x31, (%rax)
jne 0x14627
movq -0x58(%rbp), %rdi
callq 0x132b0
movq -0x58(%rbp), %rdi
movl $0x4, %esi
callq 0x133a0
movq -0x58(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x17810
movq -0x30(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rsi
callq 0x200f0
movq %rax, %rsi
movq -0x18(%rbp), %rdi
movl $0x48, %edx
callq 0x6230
movq 0x359d9(%rip), %rdi     # 0x49fd0
leaq 0x2043f(%rip), %rsi     # 0x34a3d
callq 0x62c0
movq %rax, %rdi
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x6280
movq %rax, %rdi
movq 0x35993(%rip), %rsi     # 0x49fb0
callq 0x6320
jmp 0x1459d
jmp 0x146bc
movq -0x58(%rbp), %rax
movq 0x30(%rax), %rax
cmpl $0x1a, (%rax)
jne 0x146ac
movq -0x58(%rbp), %rdi
callq 0x132b0
movq -0x58(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x146d0
movq -0x58(%rbp), %rdi
movl $0x1b, %esi
callq 0x133a0
movq -0x58(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x17970
movq -0x58(%rbp), %rax
movq 0x30(%rax), %rax
cmpl $0x1a, (%rax)
jne 0x146aa
movq -0x58(%rbp), %rdi
callq 0x132b0
movq -0x58(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x146d0
movq -0x58(%rbp), %rdi
movl $0x1b, %esi
callq 0x133a0
movq -0x58(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x17970
jmp 0x1466a
jmp 0x146ba
movq -0x58(%rbp), %rdi
movl $0x38, %esi
callq 0x12be0
jmp 0x146bc
addq $0x80, %rsp
popq %rbp
retq
movq -0x20(%rbp), %rdi
callq 0x64f0
nop