// File: mehrangoli[P]Static-Data-Extractor/SCmain.cpp
// Function: ScMain::set_func_localVar(std::basic_ifstream<char, std::char_traits<char>>&)
void ScMain::set_func_localVar(ifstream &debugSymbol){
	unordered_map<string, vector<NT>> func_temp;
	vector<string> vect_decod;
	string temp, line;
	vector<NT> Vect_NameType;
	unsigned int lineNum = 0;
	
	for (auto i: static_data_final){
		func_temp = i.get_func_data();
		for (auto j: func_temp){
			lineNum = 0;
			vect_decod = split(j.first,'+');
			temp = "function " + i.get_name() + "::" + vect_decod[0]; 
			GotoLine(debugSymbol, lineNum); //-------start from begining of file
			if (debugSymbol.is_open()){
				while (getline(debugSymbol, line)) {
					lineNum++;
					if (string_finder (line, temp)){
						Vect_NameType = find_localVar_elements (debugSymbol, lineNum);
						update_localVar(i.get_name(),j.first, Vect_NameType);
						break;
					}		
				}
			}
			else
				cout << "\033[1;31mUnable to open Debug Symbol file\033[0m\n";	
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x360, %rsp            # imm = 0x360
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x330(%rbp)
leaq -0x48(%rbp), %rdi
callq 0xdfa0
leaq -0x60(%rbp), %rdi
callq 0xdfc0
leaq -0x80(%rbp), %rdi
callq 0x3340
leaq -0xa0(%rbp), %rdi
callq 0x3340
leaq -0xb8(%rbp), %rdi
callq 0xdfe0
movq -0x330(%rbp), %rax
movl $0x0, -0xbc(%rbp)
movq %rax, -0xc8(%rbp)
movq -0xc8(%rbp), %rdi
callq 0xdce0
movq %rax, -0xd0(%rbp)
movq -0xc8(%rbp), %rdi
callq 0xdd10
movq %rax, -0xd8(%rbp)
leaq -0xd0(%rbp), %rdi
leaq -0xd8(%rbp), %rsi
callq 0xdd40
testb $0x1, %al
jne 0x834b
jmp 0x8882
leaq -0xd0(%rbp), %rdi
callq 0xdd80
movq %rax, %rsi
leaq -0x148(%rbp), %rdi
callq 0xdda0
jmp 0x8368
leaq -0x190(%rbp), %rdi
leaq -0x148(%rbp), %rsi
callq 0x14670
jmp 0x837d
leaq -0x48(%rbp), %rdi
leaq -0x190(%rbp), %rsi
callq 0xe000
leaq -0x190(%rbp), %rdi
callq 0x6610
leaq -0x48(%rbp), %rax
movq %rax, -0x198(%rbp)
movq -0x198(%rbp), %rdi
callq 0xe030
movq %rax, -0x1a0(%rbp)
movq -0x198(%rbp), %rdi
callq 0xe060
movq %rax, -0x1a8(%rbp)
leaq -0x1a0(%rbp), %rdi
leaq -0x1a8(%rbp), %rsi
callq 0xe090
testb $0x1, %al
jne 0x83e6
jmp 0x8857
leaq -0x1a0(%rbp), %rdi
callq 0xe0c0
movq %rax, %rsi
leaq -0x1e0(%rbp), %rdi
callq 0xe0f0
jmp 0x8403
movl $0x0, -0xbc(%rbp)
leaq -0x1f8(%rbp), %rdi
leaq -0x1e0(%rbp), %rsi
movl $0x2b, %edx
callq 0x10ec0
jmp 0x8427
leaq -0x60(%rbp), %rdi
leaq -0x1f8(%rbp), %rsi
movq %rsi, -0x338(%rbp)
callq 0xe150
movq -0x338(%rbp), %rdi
callq 0x6270
leaq -0x278(%rbp), %rdi
leaq -0x148(%rbp), %rsi
callq 0x13600
jmp 0x845f
leaq 0xee1b(%rip), %rsi      # 0x17281
leaq -0x258(%rbp), %rdi
leaq -0x278(%rbp), %rdx
callq 0xe220
jmp 0x847b
leaq 0xee4f(%rip), %rdx      # 0x172d1
leaq -0x238(%rbp), %rdi
leaq -0x258(%rbp), %rsi
callq 0xe1d0
jmp 0x8497
xorl %eax, %eax
movl %eax, %esi
leaq -0x60(%rbp), %rdi
callq 0xe270
movq %rax, %rdx
leaq -0x218(%rbp), %rdi
leaq -0x238(%rbp), %rsi
callq 0xe180
jmp 0x84bc
leaq -0x80(%rbp), %rdi
leaq -0x218(%rbp), %rsi
movq %rsi, -0x340(%rbp)
callq 0x32d0
movq -0x340(%rbp), %rdi
callq 0x3190
leaq -0x238(%rbp), %rdi
callq 0x3190
leaq -0x258(%rbp), %rdi
callq 0x3190
leaq -0x278(%rbp), %rdi
callq 0x3190
movq -0x10(%rbp), %rdi
movl -0xbc(%rbp), %esi
callq 0x10e50
jmp 0x8514
movq -0x10(%rbp), %rdi
callq 0x33c0
movb %al, -0x341(%rbp)
jmp 0x8525
movb -0x341(%rbp), %al
testb $0x1, %al
jne 0x8534
jmp 0x8815
jmp 0x8536
movq -0x10(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
callq 0x3070
movq %rax, -0x350(%rbp)
jmp 0x854f
movq -0x350(%rbp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x32f0
movb %al, -0x351(%rbp)
jmp 0x856d
movb -0x351(%rbp), %al
testb $0x1, %al
jne 0x857c
jmp 0x8813
movl -0xbc(%rbp), %eax
incl %eax
movl %eax, -0xbc(%rbp)
leaq -0x298(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
callq 0x3120
jmp 0x859f
leaq -0x2b8(%rbp), %rdi
leaq -0x80(%rbp), %rsi
callq 0x3120
jmp 0x85b1
leaq -0x298(%rbp), %rdi
leaq -0x2b8(%rbp), %rsi
callq 0x10e10
movb %al, -0x352(%rbp)
jmp 0x85cc
leaq -0x2b8(%rbp), %rdi
callq 0x3190
leaq -0x298(%rbp), %rdi
callq 0x3190
movb -0x352(%rbp), %al
testb $0x1, %al
jne 0x85f3
jmp 0x880e
movq -0x330(%rbp), %rsi
movq -0x10(%rbp), %rdx
movl -0xbc(%rbp), %ecx
leaq -0x2d0(%rbp), %rdi
callq 0x8900
jmp 0x8612
leaq -0xb8(%rbp), %rdi
leaq -0x2d0(%rbp), %rsi
movq %rsi, -0x360(%rbp)
callq 0xe290
movq -0x360(%rbp), %rdi
callq 0x65b0
leaq -0x2f0(%rbp), %rdi
leaq -0x148(%rbp), %rsi
callq 0x13600
jmp 0x864d
leaq -0x310(%rbp), %rdi
leaq -0x1e0(%rbp), %rsi
callq 0x3120
jmp 0x8662
leaq -0x328(%rbp), %rdi
leaq -0xb8(%rbp), %rsi
callq 0xdeb0
jmp 0x8677
movq -0x330(%rbp), %rdi
leaq -0x2f0(%rbp), %rsi
leaq -0x310(%rbp), %rdx
leaq -0x328(%rbp), %rcx
callq 0x80b0
jmp 0x869a
leaq -0x328(%rbp), %rdi
callq 0x65b0
leaq -0x310(%rbp), %rdi
callq 0x3190
leaq -0x2f0(%rbp), %rdi
callq 0x3190
jmp 0x8813
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x150(%rbp)
movl %eax, -0x154(%rbp)
jmp 0x88be
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x150(%rbp)
movl %eax, -0x154(%rbp)
jmp 0x8874
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x150(%rbp)
movl %eax, -0x154(%rbp)
jmp 0x8849
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x150(%rbp)
movl %eax, -0x154(%rbp)
jmp 0x875a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x150(%rbp)
movl %eax, -0x154(%rbp)
jmp 0x874e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x150(%rbp)
movl %eax, -0x154(%rbp)
leaq -0x238(%rbp), %rdi
callq 0x3190
leaq -0x258(%rbp), %rdi
callq 0x3190
leaq -0x278(%rbp), %rdi
callq 0x3190
jmp 0x8849
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x150(%rbp)
movl %eax, -0x154(%rbp)
jmp 0x879d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x150(%rbp)
movl %eax, -0x154(%rbp)
leaq -0x2b8(%rbp), %rdi
callq 0x3190
leaq -0x298(%rbp), %rdi
callq 0x3190
jmp 0x8849
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x150(%rbp)
movl %eax, -0x154(%rbp)
jmp 0x8800
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x150(%rbp)
movl %eax, -0x154(%rbp)
jmp 0x87f4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x150(%rbp)
movl %eax, -0x154(%rbp)
leaq -0x328(%rbp), %rdi
callq 0x65b0
leaq -0x310(%rbp), %rdi
callq 0x3190
leaq -0x2f0(%rbp), %rdi
callq 0x3190
jmp 0x8849
jmp 0x8536
jmp 0x882c
movq 0x167b4(%rip), %rdi     # 0x1efd0
leaq 0xea68(%rip), %rsi      # 0x1728b
callq 0x3240
jmp 0x882a
jmp 0x882c
leaq -0x1e0(%rbp), %rdi
callq 0x6b20
leaq -0x1a0(%rbp), %rdi
callq 0xe2c0
jmp 0x83ca
leaq -0x1e0(%rbp), %rdi
callq 0x6b20
jmp 0x8874
leaq -0x148(%rbp), %rdi
callq 0x6570
leaq -0xd0(%rbp), %rdi
callq 0xde40
jmp 0x832f
leaq -0x148(%rbp), %rdi
callq 0x6570
jmp 0x88be
leaq -0xb8(%rbp), %rdi
callq 0x65b0
leaq -0xa0(%rbp), %rdi
callq 0x3190
leaq -0x80(%rbp), %rdi
callq 0x3190
leaq -0x60(%rbp), %rdi
callq 0x6270
leaq -0x48(%rbp), %rdi
callq 0x6610
addq $0x360, %rsp            # imm = 0x360
popq %rbp
retq
leaq -0xb8(%rbp), %rdi
callq 0x65b0
leaq -0xa0(%rbp), %rdi
callq 0x3190
leaq -0x80(%rbp), %rdi
callq 0x3190
leaq -0x60(%rbp), %rdi
callq 0x6270
leaq -0x48(%rbp), %rdi
callq 0x6610
movq -0x150(%rbp), %rdi
callq 0x3420
nopl (%rax)