// File: /workspace/github_cpp_makefile_star2_O1/JoshCplusplus[P]Chemistry-Atom-Simulator-/main.cc
// Function: main
int main(){
	system("clear");
	for(int i = 0; i < y_size*x_size; i++){
		board[i] = "*";
	}
	//	print_board();
	cout << "Welcome to Chemistry Simulation, Enter your choice: " << endl;
	int choice;
	while(true){
		cout << "1)Simulate atoms" << endl;
		cout << "2)Check list of available atoms/molecules" << endl;
		cout << "3)Quit" << endl;
		cin >> choice;
		if(choice == 1){
			string name1, name2;
			bool check;
			molecule mol_check;
			while(cin){
				while(cin){
					cout << "Enter Atom 1: ";
					cin >> name1;
					for(auto& c: name1) c = toupper(c);
					if(name1 == "Q") die();
					if(name1.size() == 1) check = check_atom(name1);
					else check = check_mol(name1);
					if(check) break;
					else cout << "Invalid Atom/Molecule" << endl;
				}
				while(cin){
					cout << "Enter Atom2: ";
					cin >> name2;
					for(auto & c: name2) c = toupper(c);
					if(name2 == "Q") die();
					if(name2.size() == 1) check = check_atom(name2);
					else check = check_mol(name2);
					if(check) break;
					else cout << "Invalid Atom/Moleculue" << endl;
				}
				mol_check = find_mol(name1,name2);
				if(mol_check.get_name() == "BAD"){
					cout << "Bad pair of atoms/molecules" << endl;
				}
				else break;
			}
			sim_board(name1, name2,mol_check);

		}
		else if(choice ==2){
			//print list of available atoms/moleculues	
			print_atoms();
		}
		else if(choice == 3){
			die();
		}
	}
	/*	for(int i = 0; i <y_size; i++){
		for(int j =0; j < x_size; j++){
		cout << board[i][j];
		}
		cout << endl;
		}*/
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2e8, %rsp            # imm = 0x2E8
leaq 0x2ed0(%rip), %rdi      # 0x7103
callq 0x2120
xorl %r14d, %r14d
leaq 0x63ee(%rip), %r15      # 0xa630
leaq 0x2efd(%rip), %rbx      # 0x7146
leaq (%r15,%r14), %rdi
movq 0x8(%r14,%r15), %rdx
movl $0x1, %r8d
xorl %esi, %esi
movq %rbx, %rcx
callq 0x2200
addq $0x20, %r14
cmpq $0x3a20, %r14           # imm = 0x3A20
jne 0x4249
movq 0x5d5a(%rip), %rbx      # 0x9fd0
leaq 0x2eed(%rip), %rsi      # 0x716a
movl $0x34, %edx
movq %rbx, %rdi
callq 0x2180
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2150
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20d0
leaq -0x2f8(%rbp), %r15
movq 0x5d21(%rip), %r13      # 0x9fe0
leaq -0x90(%rbp), %r12
movl $0x10, %edx
movq %rbx, %rdi
leaq 0x2eca(%rip), %rsi      # 0x719f
callq 0x2180
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2150
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20d0
movl $0x29, %edx
movq %rbx, %rdi
leaq 0x2ea0(%rip), %rsi      # 0x71b0
callq 0x2180
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2150
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20d0
movl $0x6, %edx
movq %rbx, %rdi
leaq 0x2e8f(%rip), %rsi      # 0x71da
callq 0x2180
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2150
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20d0
movq %r13, %rdi
leaq -0x6c(%rbp), %rsi
callq 0x20c0
movl -0x6c(%rbp), %eax
cmpl $0x1, %eax
je 0x43a8
cmpl $0x2, %eax
je 0x439e
cmpl $0x3, %eax
jne 0x42c6
jmp 0x4a88
callq 0x3576
jmp 0x42c6
leaq -0x58(%rbp), %rax
movq %rax, -0x68(%rbp)
xorl %ecx, %ecx
movq %rcx, -0x60(%rbp)
movb %cl, -0x58(%rbp)
leaq -0x38(%rbp), %rax
movq %rax, -0x48(%rbp)
movq %rcx, -0x40(%rbp)
movb %cl, -0x38(%rbp)
leaq -0x1f8(%rbp), %rdi
callq 0x5014
movq (%r13), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x20(%r13,%rax)
jne 0x486d
movq (%r13), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x20(%r13,%rax)
jne 0x4585
movl $0xe, %edx
movq %rbx, %rdi
leaq 0x2dd6(%rip), %rsi      # 0x71e1
callq 0x2180
movq %r13, %rdi
leaq -0x68(%rbp), %rsi
callq 0x21b0
movq -0x60(%rbp), %r14
testq %r14, %r14
je 0x4442
movq -0x68(%rbp), %r15
xorl %r12d, %r12d
movsbl (%r15,%r12), %edi
callq 0x2250
movb %al, (%r15,%r12)
incq %r12
cmpq %r12, %r14
jne 0x442c
leaq -0x68(%rbp), %rdi
leaq 0x2da3(%rip), %rsi      # 0x71f0
callq 0x2060
testl %eax, %eax
je 0x4a67
movq -0x60(%rbp), %rdx
cmpq $0x1, %rdx
leaq -0x2f8(%rbp), %r15
leaq -0x90(%rbp), %r12
jne 0x44bd
leaq -0x160(%rbp), %rax
movq %rax, -0x170(%rbp)
movq -0x68(%rbp), %rsi
addq %rsi, %rdx
leaq -0x170(%rbp), %rdi
callq 0x5486
leaq 0x9bbe(%rip), %rdi      # 0xe058
leaq -0x170(%rbp), %rsi
callq 0x60b8
testq %rax, %rax
setne %r14b
movq -0x170(%rbp), %rdi
leaq -0x160(%rbp), %rax
jmp 0x44fb
leaq -0x140(%rbp), %rax
movq %rax, -0x150(%rbp)
movq -0x68(%rbp), %rsi
addq %rsi, %rdx
leaq -0x150(%rbp), %rdi
callq 0x5486
leaq -0x150(%rbp), %rdi
callq 0x3ded
movl %eax, %r14d
movq -0x150(%rbp), %rdi
leaq -0x140(%rbp), %rax
cmpq %rax, %rdi
je 0x4505
callq 0x2140
testb %r14b, %r14b
jne 0x4585
movl $0x15, %edx
movq %rbx, %rdi
leaq 0x2cd9(%rip), %rsi      # 0x71f2
callq 0x2180
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2150
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20d0
jmp 0x43e8
movl $0x16, %edx
movq %rbx, %rdi
leaq 0x2cbd(%rip), %rsi      # 0x7216
callq 0x2180
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2150
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20d0
movq (%r13), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x20(%r13,%rax)
jne 0x46ab
movl $0xd, %edx
movq %rbx, %rdi
leaq 0x2c60(%rip), %rsi      # 0x7208
callq 0x2180
movq %r13, %rdi
leaq -0x48(%rbp), %rsi
callq 0x21b0
movq -0x40(%rbp), %r14
testq %r14, %r14
je 0x45df
movq -0x48(%rbp), %r15
xorl %r12d, %r12d
movsbl (%r15,%r12), %edi
callq 0x2250
movb %al, (%r15,%r12)
incq %r12
cmpq %r12, %r14
jne 0x45c9
leaq -0x48(%rbp), %rdi
leaq 0x2c06(%rip), %rsi      # 0x71f0
callq 0x2060
testl %eax, %eax
je 0x4a75
movq -0x40(%rbp), %rdx
cmpq $0x1, %rdx
leaq -0x2f8(%rbp), %r15
leaq -0x90(%rbp), %r12
jne 0x465a
leaq -0x120(%rbp), %rax
movq %rax, -0x130(%rbp)
movq -0x48(%rbp), %rsi
addq %rsi, %rdx
leaq -0x130(%rbp), %rdi
callq 0x5486
leaq 0x9a21(%rip), %rdi      # 0xe058
leaq -0x130(%rbp), %rsi
callq 0x60b8
testq %rax, %rax
setne %r14b
movq -0x130(%rbp), %rdi
leaq -0x120(%rbp), %rax
jmp 0x4698
leaq -0x100(%rbp), %rax
movq %rax, -0x110(%rbp)
movq -0x48(%rbp), %rsi
addq %rsi, %rdx
leaq -0x110(%rbp), %rdi
callq 0x5486
leaq -0x110(%rbp), %rdi
callq 0x3ded
movl %eax, %r14d
movq -0x110(%rbp), %rdi
leaq -0x100(%rbp), %rax
cmpq %rax, %rdi
je 0x46a2
callq 0x2140
testb %r14b, %r14b
je 0x454a
leaq -0xe0(%rbp), %rax
movq %rax, -0xf0(%rbp)
movq -0x68(%rbp), %rsi
movq -0x60(%rbp), %rdx
addq %rsi, %rdx
leaq -0xf0(%rbp), %rdi
callq 0x5486
leaq -0x80(%rbp), %rax
movq %rax, -0x90(%rbp)
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
addq %rsi, %rdx
movq %r12, %rdi
callq 0x5486
leaq -0x308(%rbp), %r14
movq %r14, %rdi
leaq -0xf0(%rbp), %rsi
movq %r12, %rdx
callq 0x3a99
leaq -0x1f8(%rbp), %rdi
movq %r14, %rsi
callq 0x21a0
leaq -0x1d8(%rbp), %rdi
leaq -0x2e8(%rbp), %rsi
callq 0x21a0
leaq -0x1b8(%rbp), %rdi
leaq -0x2c8(%rbp), %rsi
callq 0x21a0
movsd -0x2a8(%rbp), %xmm0
movsd %xmm0, -0x198(%rbp)
leaq -0x190(%rbp), %rdi
leaq -0x2a0(%rbp), %rsi
callq 0x21a0
movq -0x2a0(%rbp), %rdi
leaq -0x290(%rbp), %rax
cmpq %rax, %rdi
je 0x4777
callq 0x2140
movq -0x2c8(%rbp), %rdi
leaq -0x2b8(%rbp), %rax
cmpq %rax, %rdi
je 0x478f
callq 0x2140
movq -0x2e8(%rbp), %rdi
leaq -0x2d8(%rbp), %rax
cmpq %rax, %rdi
je 0x47a7
callq 0x2140
movq -0x308(%rbp), %rdi
cmpq %r15, %rdi
je 0x47b8
callq 0x2140
movq -0x90(%rbp), %rdi
leaq -0x80(%rbp), %rax
cmpq %rax, %rdi
je 0x47cd
callq 0x2140
movq -0xf0(%rbp), %rdi
leaq -0xe0(%rbp), %rax
cmpq %rax, %rdi
je 0x47e5
callq 0x2140
movq %r15, -0x308(%rbp)
movq -0x1f8(%rbp), %rsi
movq -0x1f0(%rbp), %rdx
addq %rsi, %rdx
movq %r14, %rdi
callq 0x5486
movq %r14, %rdi
leaq 0x2a1e(%rip), %rsi      # 0x722d
callq 0x2060
movl %eax, %r14d
movq -0x308(%rbp), %rdi
cmpq %r15, %rdi
je 0x4828
callq 0x2140
testl %r14d, %r14d
jne 0x486d
movl $0x1b, %edx
movq %rbx, %rdi
leaq 0x29f5(%rip), %rsi      # 0x7231
callq 0x2180
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2150
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20d0
jmp 0x43d4
leaq -0xc0(%rbp), %rax
movq %rax, -0xd0(%rbp)
movq -0x68(%rbp), %rsi
movq -0x60(%rbp), %rdx
addq %rsi, %rdx
leaq -0xd0(%rbp), %rdi
callq 0x5486
leaq -0xa0(%rbp), %rax
movq %rax, -0xb0(%rbp)
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
addq %rsi, %rdx
leaq -0xb0(%rbp), %rdi
callq 0x5486
leaq -0x270(%rbp), %rax
movq %rax, -0x280(%rbp)
movq -0x1f8(%rbp), %rsi
movq -0x1f0(%rbp), %rdx
addq %rsi, %rdx
leaq -0x280(%rbp), %rdi
callq 0x5486
leaq -0x260(%rbp), %rdi
leaq -0x1d8(%rbp), %rsi
callq 0x5168
movsd -0x198(%rbp), %xmm0
movsd %xmm0, -0x220(%rbp)
leaq -0x208(%rbp), %rax
movq %rax, -0x218(%rbp)
movq -0x190(%rbp), %rsi
movq -0x188(%rbp), %rdx
addq %rsi, %rdx
leaq -0x218(%rbp), %rdi
callq 0x5486
leaq -0xd0(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
leaq -0x280(%rbp), %rdx
callq 0x3eec
movq -0x218(%rbp), %rdi
leaq -0x208(%rbp), %rax
cmpq %rax, %rdi
je 0x4962
callq 0x2140
movq -0x240(%rbp), %rdi
leaq -0x230(%rbp), %rax
cmpq %rax, %rdi
je 0x497a
callq 0x2140
movq -0x260(%rbp), %rdi
leaq -0x250(%rbp), %rax
cmpq %rax, %rdi
je 0x4992
callq 0x2140
movq -0x280(%rbp), %rdi
leaq -0x270(%rbp), %rax
cmpq %rax, %rdi
je 0x49aa
callq 0x2140
movq -0xb0(%rbp), %rdi
leaq -0xa0(%rbp), %rax
cmpq %rax, %rdi
je 0x49c2
callq 0x2140
movq -0xd0(%rbp), %rdi
leaq -0xc0(%rbp), %rax
cmpq %rax, %rdi
je 0x49da
callq 0x2140
movq -0x190(%rbp), %rdi
leaq -0x180(%rbp), %rax
cmpq %rax, %rdi
je 0x49f2
callq 0x2140
movq -0x1b8(%rbp), %rdi
leaq -0x1a8(%rbp), %rax
cmpq %rax, %rdi
je 0x4a0a
callq 0x2140
movq -0x1d8(%rbp), %rdi
leaq -0x1c8(%rbp), %rax
cmpq %rax, %rdi
je 0x4a22
callq 0x2140
movq -0x1f8(%rbp), %rdi
leaq -0x1e8(%rbp), %rax
cmpq %rax, %rdi
je 0x4a3a
callq 0x2140
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x4a4c
callq 0x2140
movq -0x68(%rbp), %rdi
leaq -0x58(%rbp), %rax
cmpq %rax, %rdi
je 0x42c6
callq 0x2140
jmp 0x42c6
leaq 0x2695(%rip), %rdi      # 0x7103
callq 0x2120
jmp 0x4a81
leaq 0x2687(%rip), %rdi      # 0x7103
callq 0x2120
xorl %edi, %edi
callq 0x2190
leaq 0x2674(%rip), %rdi      # 0x7103
callq 0x2120
jmp 0x4a81
movq %rax, %rbx
leaq -0x280(%rbp), %rdi
callq 0x4d5a
jmp 0x4ad8
movq %rax, %rbx
leaq -0x260(%rbp), %rdi
callq 0x4f04
jmp 0x4abb
movq %rax, %rbx
movq -0x280(%rbp), %rdi
leaq -0x270(%rbp), %rax
cmpq %rax, %rdi
je 0x4ad8
callq 0x2140
jmp 0x4ad8
movq %rax, %rbx
movq -0xb0(%rbp), %rdi
leaq -0xa0(%rbp), %rax
cmpq %rax, %rdi
je 0x4af5
callq 0x2140
jmp 0x4af5
movq %rax, %rbx
movq -0xd0(%rbp), %rdi
leaq -0xc0(%rbp), %rax
jmp 0x4b95
jmp 0x4ba5
movq %rax, %rbx
jmp 0x4c08
jmp 0x4ba5
movq %rax, %rbx
movq -0x90(%rbp), %rdi
leaq -0x80(%rbp), %rax
cmpq %rax, %rdi
je 0x4b37
callq 0x2140
jmp 0x4b37
movq %rax, %rbx
movq -0xf0(%rbp), %rdi
leaq -0xe0(%rbp), %rax
jmp 0x4b95
jmp 0x4ba5
jmp 0x4ba5
movq %rax, %rbx
movq -0x130(%rbp), %rdi
leaq -0x120(%rbp), %rax
jmp 0x4b95
movq %rax, %rbx
movq -0x110(%rbp), %rdi
leaq -0x100(%rbp), %rax
jmp 0x4b95
movq %rax, %rbx
movq -0x170(%rbp), %rdi
leaq -0x160(%rbp), %rax
jmp 0x4b95
movq %rax, %rbx
movq -0x150(%rbp), %rdi
leaq -0x140(%rbp), %rax
cmpq %rax, %rdi
je 0x4ba8
callq 0x2140
jmp 0x4ba8
jmp 0x4ba5
jmp 0x4ba5
movq %rax, %rbx
movq -0x190(%rbp), %rdi
leaq -0x180(%rbp), %rax
cmpq %rax, %rdi
je 0x4bc0
callq 0x2140
movq -0x1b8(%rbp), %rdi
leaq -0x1a8(%rbp), %rax
cmpq %rax, %rdi
je 0x4bd8
callq 0x2140
movq -0x1d8(%rbp), %rdi
leaq -0x1c8(%rbp), %rax
cmpq %rax, %rdi
je 0x4bf0
callq 0x2140
movq -0x1f8(%rbp), %rdi
leaq -0x1e8(%rbp), %rax
cmpq %rax, %rdi
je 0x4c08
callq 0x2140
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x4c1a
callq 0x2140
movq -0x68(%rbp), %rdi
leaq -0x58(%rbp), %rax
cmpq %rax, %rdi
je 0x4c2c
callq 0x2140
movq %rbx, %rdi
callq 0x2230