// File: /workspace/github_cpp_makefile_star2_O3/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 0x2ed4(%rip), %rdi      # 0x7103
callq 0x2120
xorl %r14d, %r14d
leaq 0x63f2(%rip), %r15      # 0xa630
leaq 0x2f01(%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 0x4245
movq 0x5d5e(%rip), %rbx      # 0x9fd0
leaq 0x2ef1(%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), %r12
movq 0x5d25(%rip), %r13      # 0x9fe0
movl $0x10, %edx
movq %rbx, %rdi
leaq 0x2ed5(%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 0x2eab(%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 0x2e9a(%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 0x439d
cmpl $0x2, %eax
je 0x4393
cmpl $0x3, %eax
jne 0x42bb
jmp 0x4aaa
callq 0x3586
jmp 0x42bb
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 -0x1d8(%rbp), %rdi
callq 0x5036
movq (%r13), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x20(%r13,%rax)
jne 0x4895
movq (%r13), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x20(%r13,%rax)
jne 0x4589
movl $0xe, %edx
movq %rbx, %rdi
leaq 0x2de1(%rip), %rsi      # 0x71e1
callq 0x2180
movq %r13, %rdi
leaq -0x68(%rbp), %rsi
callq 0x21b0
movq -0x60(%rbp), %r14
testq %r14, %r14
je 0x4437
movq -0x68(%rbp), %r15
xorl %r12d, %r12d
movsbl (%r15,%r12), %edi
callq 0x2250
movb %al, (%r15,%r12)
incq %r12
cmpq %r12, %r14
jne 0x4421
leaq -0x68(%rbp), %rdi
leaq 0x2dae(%rip), %rsi      # 0x71f0
callq 0x2060
testl %eax, %eax
je 0x4a89
movq -0x60(%rbp), %rdx
cmpq $0x1, %rdx
leaq -0x2f8(%rbp), %r12
jne 0x44c1
leaq -0x140(%rbp), %rax
movq %rax, -0x150(%rbp)
movq -0x68(%rbp), %rsi
leaq 0x1(%rsi), %rdx
leaq -0x150(%rbp), %rdi
callq 0x54a8
leaq 0x9bcf(%rip), %rdi      # 0xe058
leaq -0x150(%rbp), %rsi
callq 0x60de
movq %rax, %r15
testq %rax, %rax
setne %r14b
movq -0x150(%rbp), %rdi
leaq -0x140(%rbp), %rax
cmpq %rax, %rdi
je 0x4509
callq 0x2140
testq %r15, %r15
je 0x450e
jmp 0x4589
leaq -0x120(%rbp), %rax
movq %rax, -0x130(%rbp)
movq -0x68(%rbp), %rsi
addq %rsi, %rdx
leaq -0x130(%rbp), %rdi
callq 0x54a8
leaq -0x130(%rbp), %rdi
callq 0x3dea
movl %eax, %r14d
movq -0x130(%rbp), %rdi
leaq -0x120(%rbp), %rax
cmpq %rax, %rdi
je 0x4509
callq 0x2140
testb %r14b, %r14b
jne 0x4589
movl $0x15, %edx
movq %rbx, %rdi
leaq 0x2cd5(%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 0x43dd
movl $0x16, %edx
movq %rbx, %rdi
leaq 0x2cb9(%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 0x46bf
movl $0xd, %edx
movq %rbx, %rdi
leaq 0x2c5c(%rip), %rsi      # 0x7208
callq 0x2180
movq %r13, %rdi
leaq -0x48(%rbp), %rsi
callq 0x21b0
movq -0x40(%rbp), %r14
testq %r14, %r14
je 0x45e3
movq -0x48(%rbp), %r15
xorl %r12d, %r12d
movsbl (%r15,%r12), %edi
callq 0x2250
movb %al, (%r15,%r12)
incq %r12
cmpq %r12, %r14
jne 0x45cd
leaq -0x48(%rbp), %rdi
leaq 0x2c02(%rip), %rsi      # 0x71f0
callq 0x2060
testl %eax, %eax
je 0x4a97
movq -0x40(%rbp), %rdx
cmpq $0x1, %rdx
leaq -0x2f8(%rbp), %r12
jne 0x466e
leaq -0x100(%rbp), %rax
movq %rax, -0x110(%rbp)
movq -0x48(%rbp), %rsi
leaq 0x1(%rsi), %rdx
leaq -0x110(%rbp), %rdi
callq 0x54a8
leaq 0x9a23(%rip), %rdi      # 0xe058
leaq -0x110(%rbp), %rsi
callq 0x60de
movq %rax, %r15
testq %rax, %rax
setne %r14b
movq -0x110(%rbp), %rdi
leaq -0x100(%rbp), %rax
cmpq %rax, %rdi
je 0x46b6
callq 0x2140
testq %r15, %r15
je 0x454e
jmp 0x46bf
leaq -0xe0(%rbp), %rax
movq %rax, -0xf0(%rbp)
movq -0x48(%rbp), %rsi
addq %rsi, %rdx
leaq -0xf0(%rbp), %rdi
callq 0x54a8
leaq -0xf0(%rbp), %rdi
callq 0x3dea
movl %eax, %r14d
movq -0xf0(%rbp), %rdi
leaq -0xe0(%rbp), %rax
cmpq %rax, %rdi
je 0x46b6
callq 0x2140
testb %r14b, %r14b
je 0x454e
leaq -0xc0(%rbp), %rax
movq %rax, -0xd0(%rbp)
movq -0x68(%rbp), %rsi
movq -0x60(%rbp), %rdx
addq %rsi, %rdx
leaq -0xd0(%rbp), %rdi
callq 0x54a8
leaq -0x1e8(%rbp), %rax
movq %rax, -0x1f8(%rbp)
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
addq %rsi, %rdx
leaq -0x1f8(%rbp), %r14
movq %r14, %rdi
callq 0x54a8
leaq -0x308(%rbp), %r15
movq %r15, %rdi
leaq -0xd0(%rbp), %rsi
movq %r14, %rdx
callq 0x3a9a
leaq -0x1d8(%rbp), %rdi
movq %r15, %rsi
callq 0x21a0
leaq -0x1b8(%rbp), %rdi
leaq -0x2e8(%rbp), %rsi
callq 0x21a0
leaq -0x198(%rbp), %rdi
leaq -0x2c8(%rbp), %rsi
callq 0x21a0
movsd -0x2a8(%rbp), %xmm0
movsd %xmm0, -0x178(%rbp)
leaq -0x170(%rbp), %rdi
leaq -0x2a0(%rbp), %rsi
callq 0x21a0
movq -0x2a0(%rbp), %rdi
leaq -0x290(%rbp), %rax
cmpq %rax, %rdi
je 0x4795
callq 0x2140
movq -0x2c8(%rbp), %rdi
leaq -0x2b8(%rbp), %rax
cmpq %rax, %rdi
je 0x47ad
callq 0x2140
movq -0x2e8(%rbp), %rdi
leaq -0x2d8(%rbp), %rax
cmpq %rax, %rdi
je 0x47c5
callq 0x2140
movq -0x308(%rbp), %rdi
cmpq %r12, %rdi
je 0x47d6
callq 0x2140
movq -0x1f8(%rbp), %rdi
leaq -0x1e8(%rbp), %rax
cmpq %rax, %rdi
je 0x47ee
callq 0x2140
movq -0xd0(%rbp), %rdi
leaq -0xc0(%rbp), %rax
cmpq %rax, %rdi
je 0x4806
callq 0x2140
movq %r12, -0x308(%rbp)
movq -0x1d8(%rbp), %rsi
movq -0x1d0(%rbp), %rdx
addq %rsi, %rdx
leaq -0x308(%rbp), %r14
movq %r14, %rdi
callq 0x54a8
movq %r14, %rdi
leaq 0x29f6(%rip), %rsi      # 0x722d
callq 0x2060
movl %eax, %r14d
movq -0x308(%rbp), %rdi
cmpq %r12, %rdi
je 0x4850
callq 0x2140
testl %r14d, %r14d
jne 0x4895
movl $0x1b, %edx
movq %rbx, %rdi
leaq 0x29cd(%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 0x43c9
leaq -0xa0(%rbp), %rax
movq %rax, -0xb0(%rbp)
movq -0x68(%rbp), %rsi
movq -0x60(%rbp), %rdx
addq %rsi, %rdx
leaq -0xb0(%rbp), %rdi
callq 0x54a8
leaq -0x80(%rbp), %rax
movq %rax, -0x90(%rbp)
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
addq %rsi, %rdx
leaq -0x90(%rbp), %rdi
callq 0x54a8
leaq -0x270(%rbp), %rax
movq %rax, -0x280(%rbp)
movq -0x1d8(%rbp), %rsi
movq -0x1d0(%rbp), %rdx
addq %rsi, %rdx
leaq -0x280(%rbp), %rdi
callq 0x54a8
leaq -0x260(%rbp), %rdi
leaq -0x1b8(%rbp), %rsi
callq 0x518a
movsd -0x178(%rbp), %xmm0
movsd %xmm0, -0x220(%rbp)
leaq -0x208(%rbp), %rax
movq %rax, -0x218(%rbp)
movq -0x170(%rbp), %rsi
movq -0x168(%rbp), %rdx
addq %rsi, %rdx
leaq -0x218(%rbp), %rdi
callq 0x54a8
leaq -0xb0(%rbp), %rdi
leaq -0x90(%rbp), %rsi
leaq -0x280(%rbp), %rdx
callq 0x3ee8
movq -0x218(%rbp), %rdi
leaq -0x208(%rbp), %rax
cmpq %rax, %rdi
je 0x4987
callq 0x2140
movq -0x240(%rbp), %rdi
leaq -0x230(%rbp), %rax
cmpq %rax, %rdi
je 0x499f
callq 0x2140
movq -0x260(%rbp), %rdi
leaq -0x250(%rbp), %rax
cmpq %rax, %rdi
je 0x49b7
callq 0x2140
movq -0x280(%rbp), %rdi
leaq -0x270(%rbp), %rax
cmpq %rax, %rdi
je 0x49cf
callq 0x2140
movq -0x90(%rbp), %rdi
leaq -0x80(%rbp), %rax
cmpq %rax, %rdi
je 0x49e4
callq 0x2140
movq -0xb0(%rbp), %rdi
leaq -0xa0(%rbp), %rax
cmpq %rax, %rdi
je 0x49fc
callq 0x2140
movq -0x170(%rbp), %rdi
leaq -0x160(%rbp), %rax
cmpq %rax, %rdi
je 0x4a14
callq 0x2140
movq -0x198(%rbp), %rdi
leaq -0x188(%rbp), %rax
cmpq %rax, %rdi
je 0x4a2c
callq 0x2140
movq -0x1b8(%rbp), %rdi
leaq -0x1a8(%rbp), %rax
cmpq %rax, %rdi
je 0x4a44
callq 0x2140
movq -0x1d8(%rbp), %rdi
leaq -0x1c8(%rbp), %rax
cmpq %rax, %rdi
je 0x4a5c
callq 0x2140
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x4a6e
callq 0x2140
movq -0x68(%rbp), %rdi
leaq -0x58(%rbp), %rax
cmpq %rax, %rdi
je 0x42bb
callq 0x2140
jmp 0x42bb
leaq 0x2673(%rip), %rdi      # 0x7103
callq 0x2120
jmp 0x4aa3
leaq 0x2665(%rip), %rdi      # 0x7103
callq 0x2120
xorl %edi, %edi
callq 0x2190
leaq 0x2652(%rip), %rdi      # 0x7103
callq 0x2120
jmp 0x4aa3
movq %rax, %rbx
leaq -0x280(%rbp), %rdi
callq 0x4d7c
jmp 0x4afa
movq %rax, %rbx
leaq -0x260(%rbp), %rdi
callq 0x4f26
jmp 0x4add
movq %rax, %rbx
movq -0x280(%rbp), %rdi
leaq -0x270(%rbp), %rax
cmpq %rax, %rdi
je 0x4afa
callq 0x2140
jmp 0x4afa
movq %rax, %rbx
movq -0x90(%rbp), %rdi
leaq -0x80(%rbp), %rax
cmpq %rax, %rdi
je 0x4b14
callq 0x2140
jmp 0x4b14
movq %rax, %rbx
movq -0xb0(%rbp), %rdi
leaq -0xa0(%rbp), %rax
jmp 0x4bb7
jmp 0x4bc7
movq %rax, %rbx
jmp 0x4c2a
jmp 0x4bc7
movq %rax, %rbx
movq -0x1f8(%rbp), %rdi
leaq -0x1e8(%rbp), %rax
cmpq %rax, %rdi
je 0x4b59
callq 0x2140
jmp 0x4b59
movq %rax, %rbx
movq -0xd0(%rbp), %rdi
leaq -0xc0(%rbp), %rax
jmp 0x4bb7
jmp 0x4bc7
jmp 0x4bc7
movq %rax, %rbx
movq -0x110(%rbp), %rdi
leaq -0x100(%rbp), %rax
jmp 0x4bb7
movq %rax, %rbx
movq -0xf0(%rbp), %rdi
leaq -0xe0(%rbp), %rax
jmp 0x4bb7
movq %rax, %rbx
movq -0x150(%rbp), %rdi
leaq -0x140(%rbp), %rax
jmp 0x4bb7
movq %rax, %rbx
movq -0x130(%rbp), %rdi
leaq -0x120(%rbp), %rax
cmpq %rax, %rdi
je 0x4bca
callq 0x2140
jmp 0x4bca
jmp 0x4bc7
jmp 0x4bc7
movq %rax, %rbx
movq -0x170(%rbp), %rdi
leaq -0x160(%rbp), %rax
cmpq %rax, %rdi
je 0x4be2
callq 0x2140
movq -0x198(%rbp), %rdi
leaq -0x188(%rbp), %rax
cmpq %rax, %rdi
je 0x4bfa
callq 0x2140
movq -0x1b8(%rbp), %rdi
leaq -0x1a8(%rbp), %rax
cmpq %rax, %rdi
je 0x4c12
callq 0x2140
movq -0x1d8(%rbp), %rdi
leaq -0x1c8(%rbp), %rax
cmpq %rax, %rdi
je 0x4c2a
callq 0x2140
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x4c3c
callq 0x2140
movq -0x68(%rbp), %rdi
leaq -0x58(%rbp), %rax
cmpq %rax, %rdi
je 0x4c4e
callq 0x2140
movq %rbx, %rdi
callq 0x2230