// File: /workspace/github_cpp_makefile_star2_O2/mehrangoli[P]Static-Data-Extractor/SCmain.cpp
// Function: ScMain::find_module(std::basic_ifstream<char, std::char_traits<char>>&, unsigned int)
void ScMain::find_module (ifstream &debugSymbol, unsigned int lineNum){
	GotoLine(debugSymbol, lineNum);
	string line, module_name;
	vector<string> split_line;
	
	if (debugSymbol.is_open()){
		while (getline(debugSymbol, line)) {
			lineNum++;
			if((string_finder(line, STRUCT)) && (string_finder(line, SCMODULE)) &&  (!string_finder(line, "::_")) && (!string_finder(line, BLOCK)) &&  (!string_finder(line, CONSTRUCT)) &&  (!string_finder(line, "*"))){
					
				split_line = split(line,' ');
				remove_element_vector(split_line, "");
					
				if (string_finder(line, ">")) //--- for template type
					module_name = split_line[1]+" "+split_line[2];
				else
					module_name = split_line[1];
					
				if ((!string_finder(module_name, CLASS)) && (!string_finder(module_name, CONST)) && (!string_finder(module_name, SCCORE))){ //---ignoring pre-defined systemc module and function
					find_module_elements(debugSymbol,lineNum, module_name);
					GotoLine(debugSymbol, lineNum); //------------------return back to the line number where module defined

				}
			}
		}
	}
	else 
		cout << "\033[1;31mUnable to open Debug Symbol file\033[0m\n";	
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x378, %rsp            # imm = 0x378
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
movq %rsi, %rdi
movl %edx, %esi
callq 0x7641
leaq 0x208(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
xorl %ecx, %ecx
leaq 0x40(%rsp), %rdx
movq %rdx, -0x10(%rdx)
andq $0x0, -0x8(%rdx)
movb %cl, (%rax)
movb %cl, (%rdx)
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
andq $0x0, 0x20(%rsp)
leaq 0x78(%r14), %rdi
callq 0x2070
testb %al, %al
je 0x6146
movq %r14, 0x8(%rsp)
movq %r15, 0x50(%rsp)
incl %ebx
leaq 0x1f8(%rsp), %r12
leaq 0x358(%rsp), %r13
movq 0x8(%rsp), %rdi
movq %r12, %rsi
callq 0x2050
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x6159
movq %r13, %rdi
movq %r12, %rsi
callq 0x2260
leaq 0x98(%rsp), %r14
movq %r14, %rdi
leaq 0x481e(%rip), %rsi      # 0xa465
leaq 0xf8(%rsp), %rdx
callq 0x31b8
movq %r13, %rdi
movq %r14, %rsi
callq 0x7630
testb %al, %al
je 0x5d15
leaq 0x78(%rsp), %rdi
movq %r12, %rsi
callq 0x2260
leaq 0x138(%rsp), %rbp
movq %rbp, %rdi
leaq 0x462e(%rip), %rsi      # 0xa2b4
leaq 0x178(%rsp), %rdx
callq 0x31b8
leaq 0x78(%rsp), %rdi
movq %rbp, %rsi
callq 0x7630
testb %al, %al
je 0x5cfe
leaq 0x118(%rsp), %rdi
movq %r12, %rsi
callq 0x2260
leaq 0x1d8(%rsp), %rbp
movq %rbp, %rdi
leaq 0x4798(%rip), %rsi      # 0xa45e
leaq 0x4(%rsp), %rdx
callq 0x31b8
leaq 0x118(%rsp), %rdi
movq %rbp, %rsi
callq 0x7630
testb %al, %al
je 0x5d31
leaq 0x1d8(%rsp), %rdi
callq 0x2110
leaq 0x118(%rsp), %rdi
callq 0x2110
leaq 0x138(%rsp), %rdi
callq 0x2110
leaq 0x78(%rsp), %rdi
callq 0x2110
leaq 0x98(%rsp), %rdi
callq 0x2110
movq %r13, %rdi
callq 0x2110
incl %ebx
jmp 0x5c0b
leaq 0x1b8(%rsp), %rdi
movq %r12, %rsi
callq 0x2260
leaq 0x2b8(%rsp), %rbp
movq %rbp, %rdi
leaq 0x45a1(%rip), %rsi      # 0xa2f4
leaq 0x7(%rsp), %rdx
callq 0x31b8
leaq 0x1b8(%rsp), %rdi
movq %rbp, %rsi
callq 0x7630
testb %al, %al
je 0x5d78
xorl %ebp, %ebp
jmp 0x5e2b
leaq 0x198(%rsp), %rdi
movq %r12, %rsi
callq 0x2260
leaq 0x298(%rsp), %r14
movq %r14, %rdi
leaq 0x46c8(%rip), %rsi      # 0xa462
leaq 0x6(%rsp), %rdx
callq 0x31b8
leaq 0x198(%rsp), %rdi
movq %r14, %rsi
callq 0x7630
testb %al, %al
je 0x5dbc
xorl %ebp, %ebp
jmp 0x5e11
leaq 0x278(%rsp), %rdi
movq %r12, %rsi
callq 0x2260
leaq 0x338(%rsp), %r15
movq %r15, %rdi
leaq 0x451e(%rip), %rsi      # 0xa2fc
leaq 0x5(%rsp), %rdx
callq 0x31b8
leaq 0x278(%rsp), %r14
movq %r14, %rdi
movq %r15, %rsi
callq 0x7630
movl %eax, %ebp
xorb $0x1, %bpl
movq %r15, %rdi
callq 0x2110
movq %r14, %rdi
callq 0x2110
leaq 0x298(%rsp), %rdi
callq 0x2110
leaq 0x198(%rsp), %rdi
callq 0x2110
leaq 0x2b8(%rsp), %rdi
callq 0x2110
leaq 0x1b8(%rsp), %rdi
callq 0x2110
leaq 0x1d8(%rsp), %rdi
callq 0x2110
leaq 0x118(%rsp), %rdi
callq 0x2110
leaq 0x138(%rsp), %rdi
callq 0x2110
leaq 0x78(%rsp), %rdi
callq 0x2110
leaq 0x98(%rsp), %rdi
callq 0x2110
movq %r13, %rdi
callq 0x2110
testb %bpl, %bpl
je 0x5d2a
movq %r13, %r15
leaq 0xf8(%rsp), %rbp
movq %rbp, %rdi
movq %r12, %rsi
pushq $0x20
popq %rdx
callq 0x7696
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rbp, %rsi
callq 0x722e
movq %rbp, %rdi
callq 0x322e
leaq 0x318(%rsp), %r13
movq %r13, %rdi
leaq 0x4615(%rip), %rsi      # 0xa4ec
movq %rbp, %rdx
callq 0x31b8
movq %r14, %rdi
movq %r13, %rsi
callq 0x7928
movq %r13, %rdi
callq 0x2110
leaq 0x258(%rsp), %rdi
movq %r12, %rsi
callq 0x2260
movq %r15, %r13
leaq 0x2f8(%rsp), %r15
movq %r15, %rdi
leaq 0x462e(%rip), %rsi      # 0xa545
leaq 0xf8(%rsp), %rdx
callq 0x31b8
leaq 0x258(%rsp), %r14
movq %r14, %rdi
movq %r15, %rsi
callq 0x7630
movl %eax, %ebp
movq %r15, %rdi
callq 0x2110
movq %r14, %rdi
callq 0x2110
testb %bpl, %bpl
je 0x5fa9
movq 0x10(%rsp), %rsi
addq $0x20, %rsi
leaq 0x178(%rsp), %r14
movq %r14, %rdi
leaq 0x4542(%rip), %rdx      # 0xa4ab
callq 0x6ddd
movq 0x10(%rsp), %rdx
addq $0x40, %rdx
leaq 0xf8(%rsp), %rbp
movq %rbp, %rdi
movq %r14, %rsi
callq 0x6cc2
leaq 0x30(%rsp), %rdi
movq %rbp, %rsi
callq 0x2210
movq %rbp, %rdi
callq 0x2110
movq %r14, %rdi
callq 0x2110
jmp 0x5fbc
movq 0x10(%rsp), %rsi
addq $0x20, %rsi
leaq 0x30(%rsp), %rdi
callq 0x2140
leaq 0x58(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x2260
leaq 0xd8(%rsp), %r14
movq %r14, %rdi
leaq 0x42e1(%rip), %rsi      # 0xa2be
leaq 0xf8(%rsp), %rdx
callq 0x31b8
leaq 0x58(%rsp), %rdi
movq %r14, %rsi
callq 0x7630
testb %al, %al
jne 0x605a
leaq 0xb8(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x2260
leaq 0x158(%rsp), %r14
movq %r14, %rdi
leaq 0x444d(%rip), %rsi      # 0xa46c
leaq 0x178(%rsp), %rdx
callq 0x31b8
leaq 0xb8(%rsp), %rdi
movq %r14, %rsi
callq 0x7630
testb %al, %al
je 0x6071
leaq 0x158(%rsp), %rdi
callq 0x2110
leaq 0xb8(%rsp), %rdi
callq 0x2110
leaq 0xd8(%rsp), %rdi
callq 0x2110
leaq 0x58(%rsp), %rdi
jmp 0x5d25
leaq 0x238(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x2260
leaq 0x2d8(%rsp), %r15
movq %r15, %rdi
leaq 0x422f(%rip), %rsi      # 0xa2c4
leaq 0x4(%rsp), %rdx
callq 0x31b8
leaq 0x238(%rsp), %r14
movq %r14, %rdi
movq %r15, %rsi
callq 0x7630
movl %eax, %ebp
movq %r15, %rdi
callq 0x2110
movq %r14, %rdi
callq 0x2110
leaq 0x158(%rsp), %rdi
callq 0x2110
leaq 0xb8(%rsp), %rdi
callq 0x2110
leaq 0xd8(%rsp), %rdi
callq 0x2110
leaq 0x58(%rsp), %rdi
callq 0x2110
testb %bpl, %bpl
jne 0x5d2a
leaq 0x218(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x2260
movq 0x50(%rsp), %rdi
movq 0x8(%rsp), %r14
movq %r14, %rsi
movl %ebx, %edx
leaq 0x218(%rsp), %r15
movq %r15, %rcx
callq 0x635a
movq %r15, %rdi
callq 0x2110
movq %r14, %rdi
movl %ebx, %esi
callq 0x7641
jmp 0x5d2a
movq 0x8e83(%rip), %rdi      # 0xefd0
leaq 0x4131(%rip), %rsi      # 0xa285
callq 0x21d0
leaq 0x10(%rsp), %rdi
callq 0x322e
leaq 0x30(%rsp), %rdi
callq 0x2110
leaq 0x1f8(%rsp), %rdi
callq 0x2110
addq $0x378, %rsp            # imm = 0x378
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x218(%rsp), %rdi
jmp 0x6327
movq %rax, %rbx
leaq 0x2d8(%rsp), %rdi
callq 0x2110
jmp 0x61b1
movq %rax, %rbx
leaq 0x238(%rsp), %rdi
callq 0x2110
jmp 0x6206
movq %rax, %rbx
jmp 0x61e5
movq %rax, %rbx
leaq 0x178(%rsp), %rdi
jmp 0x6327
movq %rax, %rbx
leaq 0x338(%rsp), %rdi
callq 0x2110
leaq 0x278(%rsp), %rdi
callq 0x2110
jmp 0x626b
movq %rax, %rbx
jmp 0x6213
jmp 0x632e
jmp 0x632e
movq %rax, %rbx
leaq 0x158(%rsp), %rdi
callq 0x2110
leaq 0xb8(%rsp), %rdi
callq 0x2110
jmp 0x628a
jmp 0x632e
movq %rax, %rbx
jmp 0x625b
movq %rax, %rbx
jmp 0x6297
movq %rax, %rbx
leaq 0x318(%rsp), %rdi
jmp 0x6327
jmp 0x632e
movq %rax, %rbx
jmp 0x6278
movq %rax, %rbx
leaq 0x2f8(%rsp), %rdi
callq 0x2110
leaq 0x258(%rsp), %rdi
jmp 0x6327
movq %rax, %rbx
leaq 0x298(%rsp), %rdi
callq 0x2110
leaq 0x198(%rsp), %rdi
callq 0x2110
jmp 0x62a9
movq %rax, %rbx
leaq 0xd8(%rsp), %rdi
callq 0x2110
leaq 0x58(%rsp), %rdi
jmp 0x6327
movq %rax, %rbx
jmp 0x62b6
movq %rax, %rbx
leaq 0x2b8(%rsp), %rdi
callq 0x2110
leaq 0x1b8(%rsp), %rdi
callq 0x2110
jmp 0x62cd
movq %rax, %rbx
jmp 0x62da
movq %rax, %rbx
leaq 0x1d8(%rsp), %rdi
callq 0x2110
leaq 0x118(%rsp), %rdi
callq 0x2110
jmp 0x62f1
movq %rax, %rbx
jmp 0x62fe
movq %rax, %rbx
leaq 0x138(%rsp), %rdi
callq 0x2110
leaq 0x78(%rsp), %rdi
callq 0x2110
jmp 0x6312
movq %rax, %rbx
jmp 0x631f
movq %rax, %rbx
leaq 0x98(%rsp), %rdi
callq 0x2110
leaq 0x358(%rsp), %rdi
callq 0x2110
jmp 0x6331
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x322e
leaq 0x30(%rsp), %rdi
callq 0x2110
leaq 0x1f8(%rsp), %rdi
callq 0x2110
movq %rbx, %rdi
callq 0x2300