// File: /workspace/github_cpp_makefile_star2_O2/Blaze2305[P]Compiler-Design-2021-Assignment/src/SymTab/SymTab.cpp
// Function: SymbolTable::showSymbolTable()
void SymbolTable::showSymbolTable(){
	std::string line = std::string(70,'-');
	std::ostringstream out ;
	out<<line<<"\n";
	out<<std::setw(40)<<"SYMBOL TABLE\n\n";
	// out<<std::setw(15)<<"Symbol Name"<<std::setw(15)<<"Type"<<std::setw(15)<<"Value"<<std::setw(20)<<"Line Number\n";
	out<<std::setw(15)<<"Symbol Name"<<std::setw(15)<<"Type"<<std::setw(20)<<"Line Number\n";
	out<<line<<"\n";
	for(auto const& [key,value] : SymbolTableMap){
		// out<<std::setw(15)<<value.symbolName<<std::setw(15)<<value.type<<std::setw(15)<<value.attribute<<std::setw(20)<<value.lineNumber<<"\n";
		out<<std::setw(15)<<value.symbolName<<std::setw(15)<<value.type<<std::setw(20)<<value.lineNumber<<"\n";
	}
	out<<line<<"\n";
	std::cout<<out.str()<<std::endl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x1c0, %rsp            # imm = 0x1C0
movq %rdi, %rbx
leaq -0x30(%rbp), %rax
movq %rax, -0x10(%rax)
leaq -0x40(%rbp), %rdi
pushq $0x46
popq %rsi
pushq $0x2d
popq %rdx
callq 0x2210
leaq -0x1d8(%rbp), %rdi
callq 0x2280
leaq -0x1d8(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x21c0
leaq 0x1dd9(%rip), %rsi      # 0xa432
movq %rax, %rdi
callq 0x21d0
leaq -0x1d8(%rbp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
movq $0x28, -0x1c8(%rbp,%rax)
leaq 0x1da3(%rip), %rsi      # 0xa425
callq 0x21d0
leaq -0x1d8(%rbp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
movq $0xf, -0x1c8(%rbp,%rax)
leaq 0x1d8c(%rip), %rsi      # 0xa434
callq 0x21d0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movq $0xf, 0x10(%rax,%rcx)
leaq 0x1c1c(%rip), %rsi      # 0xa2e0
movq %rax, %rdi
callq 0x21d0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movq $0x14, 0x10(%rax,%rcx)
leaq 0x1d5d(%rip), %rsi      # 0xa440
movq %rax, %rdi
callq 0x21d0
leaq -0x1d8(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x21c0
leaq 0x1d30(%rip), %rsi      # 0xa432
movq %rax, %rdi
callq 0x21d0
movq 0x18(%rbx), %r15
addq $0x8, %rbx
leaq -0x1d8(%rbp), %r14
leaq 0x1d12(%rip), %r12      # 0xa432
cmpq %rbx, %r15
je 0x879b
leaq 0x40(%r15), %rsi
movq -0x1d8(%rbp), %rax
movq -0x18(%rax), %rax
movq $0xf, -0x1c8(%rbp,%rax)
movq %r14, %rdi
callq 0x21c0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movq $0xf, 0x10(%rax,%rcx)
leaq 0x60(%r15), %rsi
movq %rax, %rdi
callq 0x21c0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movq $0x14, 0x10(%rax,%rcx)
movl 0xa0(%r15), %esi
movq %rax, %rdi
callq 0x2360
movq %rax, %rdi
movq %r12, %rsi
callq 0x21d0
movq %r15, %rdi
callq 0x2150
movq %rax, %r15
jmp 0x8720
leaq -0x1d8(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x21c0
leaq 0x1c80(%rip), %rsi      # 0xa432
movq %rax, %rdi
callq 0x21d0
leaq -0x1d0(%rbp), %rsi
leaq -0x60(%rbp), %rdi
callq 0x2300
movq 0x67ff(%rip), %rdi      # 0xefd0
leaq -0x60(%rbp), %rsi
callq 0x21c0
movq %rax, %rdi
callq 0x2110
leaq -0x60(%rbp), %rdi
callq 0x23b8
leaq -0x1d8(%rbp), %rdi
callq 0x20a0
leaq -0x40(%rbp), %rdi
callq 0x23b8
addq $0x1c0, %rsp            # imm = 0x1C0
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x8827
movq %rax, %rbx
jmp 0x8836
movq %rax, %rbx
leaq -0x60(%rbp), %rdi
callq 0x23b8
jmp 0x882a
jmp 0x8827
movq %rax, %rbx
leaq -0x1d8(%rbp), %rdi
callq 0x20a0
leaq -0x40(%rbp), %rdi
callq 0x23b8
movq %rbx, %rdi
callq 0x2370
nop