// File: /workspace/github_cpp_makefile_star2_O2/gjoni[P]iPot/src/aace18.cpp
// Function: main
int main(int argc, char *argv[]) {

	/*
	 * (0) default energies (dmax=6.8A, kmin=5)
	 */
	const std::vector<double> h = {
		-1.60823e+00, -1.50102e+00, -1.47335e+00, -1.82202e+00, -1.75968e+00, -7.72545e-01, 6.04329e-01, 2.55978e-01, -4.19681e-01, -1.01144e+00, 4.42831e+00, 1.12513e+00, 7.39351e-01, 5.13158e-01, 7.03065e-01, -4.79007e-03, 1.23034e-01, 1.88040e+00
		};
	const std::vector<std::vector<double> > J = {
		{5.14494e-01, 2.32982e-01, -1.18825e-02, -4.79267e-01, -2.60971e-01, 7.92265e-03, 7.65882e-02, 3.00580e-02, 2.19054e-02, 5.83614e-02, -1.36975e-01, 1.96902e-01, 9.23782e-03, -2.08941e-02, 6.00891e-02, 1.23249e-01, -4.56176e-02, -8.81898e-03 }, 
		{2.32982e-01, -2.00039e-01, -6.56869e-02, 2.70771e-01, -2.92405e-01, -1.29688e-03, 2.66237e-02, 2.78053e-02, 4.34264e-02, 9.09723e-02, -3.18841e-03, -1.84093e-01, 1.75533e-02, 4.55108e-03, 4.44661e-03, 8.85454e-02, -5.36141e-03, -2.89657e-03 }, 
		{-1.18825e-02, -6.56869e-02, -3.58054e-03, 1.61754e-02, 1.01122e-01, -5.20250e-02, 1.47322e-02, -7.77877e-03, 2.93541e-02, 6.68389e-02, -3.44028e-02, -3.95784e-02, -9.05682e-03, -6.92520e-02, 8.67456e-02, 3.06997e-02, 2.63688e-02, -7.55891e-02 }, 
		{-4.79267e-01, 2.70771e-01, 1.61754e-02, -7.34460e-02, 4.22984e-01, -4.73875e-03, 1.43135e-02, -1.76282e-02, -7.93952e-03, 7.52781e-02, -1.01343e-01, 1.66995e-01, -1.17393e-02, -3.35176e-02, 4.17009e-02, 3.22659e-02, -2.99271e-02, -2.45088e-02 }, 
		{-2.60971e-01, -2.92405e-01, 1.01122e-01, 4.22984e-01, 1.36008e-01, -7.13044e-03, -7.48668e-03, -4.55776e-03, -7.20017e-03, 7.64353e-02, -1.09748e-01, -2.75419e-01, -8.12165e-03, -1.61199e-02, 6.78784e-02, 3.29076e-02, 1.26425e-02, -4.97552e-02 }, 
		{7.92265e-03, -1.29688e-03, -5.20250e-02, -4.73875e-03, -7.13044e-03, -1.05435e-01, -3.19825e-02, 1.00205e-03, 1.33486e-02, 2.53556e-02, -8.93222e-02, 2.00271e-02, -3.76764e-02, -1.29922e-01, 1.39732e-02, 4.12190e-02, -2.60661e-03, -9.08305e-02 }, 
		{7.65882e-02, 2.66237e-02, 1.47322e-02, 1.43135e-02, -7.48668e-03, -3.19825e-02, 6.23459e-02, 8.37308e-02, -4.59253e-03, -2.63784e-01, 5.51613e-02, -1.71107e-02, 2.27089e-03, 2.19795e-02, 2.54067e-01, 2.69225e-01, -1.72442e-02, -8.22190e-02 }, 
		{3.00580e-02, 2.78053e-02, -7.77877e-03, -1.76282e-02, -4.55776e-03, 1.00205e-03, 8.37308e-02, 1.56708e-02, -9.66613e-03, -2.53002e-01, 1.37543e-01, 7.54680e-03, -7.22425e-03, 7.30337e-02, 2.41662e-01, 1.82912e-01, -1.14706e-02, -7.38459e-02 }, 
		{2.19054e-02, 4.34264e-02, 2.93541e-02, -7.93952e-03, -7.20017e-03, 1.33486e-02, -4.59253e-03, -9.66613e-03, -8.89144e-02, -4.49119e-02, 1.13148e-01, -1.74796e-02, -2.83279e-02, 9.27447e-02, 7.43568e-03, -2.85799e-02, -5.86095e-02, -5.35649e-02 }, 
		{5.83614e-02, 9.09723e-02, 6.68389e-02, 7.52781e-02, 7.64353e-02, 2.53556e-02, -2.63784e-01, -2.53002e-01, -4.49119e-02, 1.21987e-01, 1.30581e-01, -5.94875e-03, -1.52840e-01, 1.10914e-01, -3.08656e-01, -3.40476e-01, -8.70755e-02, -9.98389e-02 }, 
		{-1.36975e-01, -3.18841e-03, -3.44028e-02, -1.01343e-01, -1.09748e-01, -8.93222e-02, 5.51613e-02, 1.37543e-01, 1.13148e-01, 1.30581e-01, -1.16021e+00, 1.89012e-01, -7.49936e-02, -8.24475e-02, 2.10707e-01, 1.61511e-01, 8.90165e-02, -5.08981e-02 }, 
		{1.96902e-01, -1.84093e-01, -3.95784e-02, 1.66995e-01, -2.75419e-01, 2.00271e-02, -1.71107e-02, 7.54680e-03, -1.74796e-02, -5.94875e-03, 1.89012e-01, -2.76854e-01, -1.09103e-02, 1.42503e-01, 1.03347e-01, -2.61694e-02, -1.89722e-02, -1.13523e-02 }, 
		{9.23782e-03, 1.75533e-02, -9.05682e-03, -1.17393e-02, -8.12165e-03, -3.76764e-02, 2.27089e-03, -7.22425e-03, -2.83279e-02, -1.52840e-01, -7.49936e-02, -1.09103e-02, -1.45362e-01, 1.86466e-02, 8.87609e-02, 6.51157e-02, -7.00287e-02, -1.05835e-01 }, 
		{-2.08941e-02, 4.55108e-03, -6.92520e-02, -3.35176e-02, -1.61199e-02, -1.29922e-01, 2.19795e-02, 7.30337e-02, 9.27447e-02, 1.10914e-01, -8.24475e-02, 1.42503e-01, 1.86466e-02, -2.57466e-01, 8.46647e-02, 1.38211e-01, 3.62556e-02, -1.05258e-01 }, 
		{6.00891e-02, 4.44661e-03, 8.67456e-02, 4.17009e-02, 6.78784e-02, 1.39732e-02, 2.54067e-01, 2.41662e-01, 7.43568e-03, -3.08656e-01, 2.10707e-01, 1.03347e-01, 8.87609e-02, 8.46647e-02, 3.68852e-01, 3.06581e-01, 3.14345e-02, -1.34007e-01 }, 
		{1.23249e-01, 8.85454e-02, 3.06997e-02, 3.22659e-02, 3.29076e-02, 4.12190e-02, 2.69225e-01, 1.82912e-01, -2.85799e-02, -3.40476e-01, 1.61511e-01, -2.61694e-02, 6.51157e-02, 1.38211e-01, 3.06581e-01, 1.85065e-01, -4.92545e-02, -1.02915e-01 }, 
		{-4.56176e-02, -5.36141e-03, 2.63688e-02, -2.99271e-02, 1.26425e-02, -2.60661e-03, -1.72442e-02, -1.14706e-02, -5.86095e-02, -8.70755e-02, 8.90165e-02, -1.89722e-02, -7.00287e-02, 3.62556e-02, 3.14345e-02, -4.92545e-02, -4.79142e-02, -2.83613e-02 }, 
		{-8.81898e-03, -2.89657e-03, -7.55891e-02, -2.45088e-02, -4.97552e-02, -9.08305e-02, -8.22190e-02, -7.38459e-02, -5.35649e-02, -9.98389e-02, -5.08981e-02, -1.13523e-02, -1.05835e-01, -1.05258e-01, -1.34007e-01, -1.02915e-01, -2.83613e-02, -1.01090e-01 }, 
		};

	/*
	 * (1) process arguments
	 */
	OPTS opts = { "", "", "", DMAX };
	if (!GetOpts(argc, argv, opts)) {
		PrintOpts("aace18", DMAX);
		return 1;
	}

	/*
	 * (2) set potential
	 */
	AACE AACE_;
	if (opts.table != "") {
		AACE_ = AACE(AACE18_GROUPS, opts.dmax, opts.table);
	} else {
		AACE_ = AACE(AACE18_GROUPS, h, J, opts.dmax, "AACE18_6.8A_k5");
	}

	/*
	 * (2) get AACE energy
	 */
	double E;
	if (opts.lig == "") {
		E = AACE_.GetEnergy(Chain(opts.rec.c_str()));
	} else {
		E = AACE_.GetEnergy(Complex(opts.rec.c_str(), opts.lig.c_str()));
	}

	printf("E(%s)= %.5e\n", AACE_.GetName().c_str(), E);

	return 0;

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xc30, %rsp            # imm = 0xC30
movq %rsi, %r15
movl %edi, %ebp
leaq 0xac2d(%rip), %rsi      # 0x18af0
leaq 0x58(%rsp), %rbx
movl $0x90, %edx
movq %rbx, %rdi
callq 0x21b0
leaq 0x40(%rsp), %rdi
pushq $0x12
popq %r14
leaq 0x298(%rsp), %rcx
movq %rbx, %rsi
movq %r14, %rdx
callq 0xe6c8
leaq 0xac88(%rip), %rsi      # 0x18b80
leaq 0x298(%rsp), %r12
movl $0x90, %edx
movq %r12, %rdi
callq 0x21b0
leaq 0x58(%rsp), %rbx
leaq 0x1f(%rsp), %rcx
movq %rbx, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0xe6c8
leaq 0x70(%rsp), %r14
leaq 0xacdf(%rip), %rsi      # 0x18c10
leaq 0x208(%rsp), %r12
movl $0x90, %edx
movq %r12, %rdi
callq 0x21b0
pushq $0x12
popq %rdx
leaq 0x1e(%rsp), %rcx
movq %r14, %rdi
movq %r12, %rsi
callq 0xe6c8
leaq 0x88(%rsp), %r14
leaq 0xad38(%rip), %rsi      # 0x18ca0
leaq 0x330(%rsp), %r12
movl $0x90, %edx
movq %r12, %rdi
callq 0x21b0
pushq $0x12
popq %rdx
leaq 0x1d(%rsp), %rcx
movq %r14, %rdi
movq %r12, %rsi
callq 0xe6c8
leaq 0xa0(%rsp), %r14
leaq 0xad91(%rip), %rsi      # 0x18d30
leaq 0x3c0(%rsp), %r12
movl $0x90, %edx
movq %r12, %rdi
callq 0x21b0
pushq $0x12
popq %rdx
leaq 0x1c(%rsp), %rcx
movq %r14, %rdi
movq %r12, %rsi
callq 0xe6c8
leaq 0xb8(%rsp), %r14
leaq 0xadea(%rip), %rsi      # 0x18dc0
leaq 0xba0(%rsp), %r12
movl $0x90, %edx
movq %r12, %rdi
callq 0x21b0
pushq $0x12
popq %rdx
leaq 0x1b(%rsp), %rcx
movq %r14, %rdi
movq %r12, %rsi
callq 0xe6c8
leaq 0xd0(%rsp), %r14
leaq 0xae43(%rip), %rsi      # 0x18e50
leaq 0xb10(%rsp), %r12
movl $0x90, %edx
movq %r12, %rdi
callq 0x21b0
pushq $0x12
popq %rdx
leaq 0x1a(%rsp), %rcx
movq %r14, %rdi
movq %r12, %rsi
callq 0xe6c8
leaq 0xe8(%rsp), %r14
leaq 0xae9c(%rip), %rsi      # 0x18ee0
leaq 0xa80(%rsp), %r12
movl $0x90, %edx
movq %r12, %rdi
callq 0x21b0
pushq $0x12
popq %rdx
leaq 0x19(%rsp), %rcx
movq %r14, %rdi
movq %r12, %rsi
callq 0xe6c8
leaq 0x100(%rsp), %r14
leaq 0xaef5(%rip), %rsi      # 0x18f70
leaq 0x9f0(%rsp), %r12
movl $0x90, %edx
movq %r12, %rdi
callq 0x21b0
pushq $0x12
popq %rdx
leaq 0x18(%rsp), %rcx
movq %r14, %rdi
movq %r12, %rsi
callq 0xe6c8
leaq 0x118(%rsp), %r14
leaq 0xaf4e(%rip), %rsi      # 0x19000
leaq 0x960(%rsp), %r12
movl $0x90, %edx
movq %r12, %rdi
callq 0x21b0
pushq $0x12
popq %rdx
leaq 0x17(%rsp), %rcx
movq %r14, %rdi
movq %r12, %rsi
callq 0xe6c8
leaq 0x130(%rsp), %r14
leaq 0xafa7(%rip), %rsi      # 0x19090
leaq 0x8d0(%rsp), %r12
movl $0x90, %edx
movq %r12, %rdi
callq 0x21b0
pushq $0x12
popq %rdx
leaq 0x16(%rsp), %rcx
movq %r14, %rdi
movq %r12, %rsi
callq 0xe6c8
leaq 0x148(%rsp), %r14
leaq 0xb000(%rip), %rsi      # 0x19120
leaq 0x840(%rsp), %r12
movl $0x90, %edx
movq %r12, %rdi
callq 0x21b0
pushq $0x12
popq %rdx
leaq 0x15(%rsp), %rcx
movq %r14, %rdi
movq %r12, %rsi
callq 0xe6c8
leaq 0x160(%rsp), %r14
leaq 0xb059(%rip), %rsi      # 0x191b0
leaq 0x7b0(%rsp), %r12
movl $0x90, %edx
movq %r12, %rdi
callq 0x21b0
pushq $0x12
popq %rdx
leaq 0x14(%rsp), %rcx
movq %r14, %rdi
movq %r12, %rsi
callq 0xe6c8
leaq 0x178(%rsp), %r14
leaq 0xb0b2(%rip), %rsi      # 0x19240
leaq 0x720(%rsp), %r12
movl $0x90, %edx
movq %r12, %rdi
callq 0x21b0
pushq $0x12
popq %rdx
leaq 0x13(%rsp), %rcx
movq %r14, %rdi
movq %r12, %rsi
callq 0xe6c8
leaq 0x190(%rsp), %r14
leaq 0xb10b(%rip), %rsi      # 0x192d0
leaq 0x690(%rsp), %r12
movl $0x90, %edx
movq %r12, %rdi
callq 0x21b0
pushq $0x12
popq %rdx
leaq 0x12(%rsp), %rcx
movq %r14, %rdi
movq %r12, %rsi
callq 0xe6c8
leaq 0x1a8(%rsp), %r14
leaq 0xb164(%rip), %rsi      # 0x19360
leaq 0x600(%rsp), %r12
movl $0x90, %edx
movq %r12, %rdi
callq 0x21b0
pushq $0x12
popq %rdx
leaq 0x11(%rsp), %rcx
movq %r14, %rdi
movq %r12, %rsi
callq 0xe6c8
leaq 0x1c0(%rsp), %r14
leaq 0xb1bd(%rip), %rsi      # 0x193f0
leaq 0x570(%rsp), %r12
movl $0x90, %edx
movq %r12, %rdi
callq 0x21b0
pushq $0x12
popq %rdx
leaq 0x10(%rsp), %rcx
movq %r14, %rdi
movq %r12, %rsi
callq 0xe6c8
leaq 0x1d8(%rsp), %r14
leaq 0xb216(%rip), %rsi      # 0x19480
leaq 0x4e0(%rsp), %r12
movl $0x90, %edx
movq %r12, %rdi
callq 0x21b0
pushq $0x12
popq %rdx
leaq 0xf(%rsp), %rcx
movq %r14, %rdi
movq %r12, %rsi
callq 0xe6c8
leaq 0x1f0(%rsp), %r14
leaq 0xb26f(%rip), %rsi      # 0x19510
leaq 0x450(%rsp), %r12
movl $0x90, %edx
movq %r12, %rdi
callq 0x21b0
pushq $0x12
popq %rdx
leaq 0xe(%rsp), %rcx
movq %r14, %rdi
movq %r12, %rsi
callq 0xe6c8
leaq 0x28(%rsp), %rdi
leaq 0x58(%rsp), %rsi
pushq $0x12
popq %rdx
leaq 0xd(%rsp), %rcx
callq 0xe6fe
movl $0x198, %ebx            # imm = 0x198
leaq (%rsp,%rbx), %rdi
addq $0x58, %rdi
callq 0xea80
addq $-0x18, %rbx
cmpq $-0x18, %rbx
jne 0xe2e5
leaq 0x8d4a(%rip), %rsi      # 0x1704d
leaq 0x208(%rsp), %rdi
leaq 0x58(%rsp), %rdx
callq 0xdbd4
leaq 0x228(%rsp), %rbx
leaq 0x8d29(%rip), %rsi      # 0x1704d
leaq 0x298(%rsp), %rdx
movq %rbx, %rdi
callq 0xdbd4
leaq 0x248(%rsp), %r14
leaq 0x8d0a(%rip), %rsi      # 0x1704d
leaq 0x330(%rsp), %rdx
movq %r14, %rdi
callq 0xdbd4
movabsq $0x401b333333333333, %rax # imm = 0x401B333333333333
leaq 0x208(%rsp), %rdx
movq %rax, 0x60(%rdx)
movl %ebp, %edi
movq %r15, %rsi
callq 0xdaa5
testb %al, %al
je 0xe3d5
leaq 0x298(%rsp), %rdi
callq 0x119fe
leaq 0x8cc2(%rip), %rsi      # 0x1704d
movq %r14, %rdi
callq 0xea4c
testb %al, %al
je 0xe412
movsd 0x268(%rsp), %xmm0
leaq 0x1dee1(%rip), %rsi     # 0x2c288
leaq 0x58(%rsp), %rdi
movq %r14, %rdx
callq 0x11320
leaq 0x298(%rsp), %rdi
leaq 0x58(%rsp), %rsi
callq 0x11af2
leaq 0x58(%rsp), %rdi
callq 0x11a78
jmp 0xe48f
leaq 0xb760(%rip), %rsi      # 0x19b3c
leaq 0x58(%rsp), %rdi
leaq 0x298(%rsp), %rdx
callq 0xdbd4
leaq 0x58(%rsp), %rdi
movsd 0x8ded(%rip), %xmm0     # 0x171e8
callq 0xda3c
leaq 0x58(%rsp), %rdi
callq 0x2100
pushq $0x1
popq %rbx
jmp 0xe559
movsd 0x268(%rsp), %xmm0
movsd %xmm0, 0x20(%rsp)
leaq 0xb71b(%rip), %rsi      # 0x19b43
leaq 0x330(%rsp), %rdi
leaq 0x3c0(%rsp), %rdx
callq 0xdbd4
leaq 0x1de44(%rip), %rsi     # 0x2c288
leaq 0x58(%rsp), %rdi
leaq 0x40(%rsp), %rdx
leaq 0x28(%rsp), %rcx
leaq 0x330(%rsp), %r8
movsd 0x20(%rsp), %xmm0
callq 0x11068
leaq 0x298(%rsp), %rdi
leaq 0x58(%rsp), %rsi
callq 0x11af2
leaq 0x58(%rsp), %rdi
callq 0x11a78
leaq 0x330(%rsp), %rdi
callq 0x2100
leaq 0x8bb7(%rip), %rsi      # 0x1704d
movq %rbx, %rdi
callq 0xdc0f
testb %al, %al
je 0xe4d8
movq 0x208(%rsp), %rsi
leaq 0x58(%rsp), %rdi
callq 0xef5e
leaq 0x298(%rsp), %rdi
leaq 0x58(%rsp), %rsi
callq 0x11ea0
movsd %xmm0, 0x20(%rsp)
leaq 0x58(%rsp), %rdi
callq 0xfc90
jmp 0xe514
movq 0x208(%rsp), %rsi
movq 0x228(%rsp), %rdx
leaq 0x58(%rsp), %rdi
callq 0x14b2c
leaq 0x298(%rsp), %rdi
leaq 0x58(%rsp), %rsi
callq 0x12082
movsd %xmm0, 0x20(%rsp)
leaq 0x58(%rsp), %rdi
callq 0x14b8e
leaq 0x58(%rsp), %rdi
leaq 0x298(%rsp), %rsi
callq 0x12114
leaq 0x58(%rsp), %rbx
movq (%rbx), %rsi
leaq 0xb61d(%rip), %rdi      # 0x19b52
movsd 0x20(%rsp), %xmm0
movb $0x1, %al
callq 0x2050
movq %rbx, %rdi
callq 0x2100
leaq 0x298(%rsp), %rdi
callq 0x11a78
xorl %ebx, %ebx
leaq 0x208(%rsp), %rdi
callq 0xea56
leaq 0x28(%rsp), %rdi
callq 0xe738
leaq 0x40(%rsp), %rdi
callq 0xea80
movl %ebx, %eax
addq $0xc30, %rsp            # imm = 0xC30
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r15
leaq 0x58(%rsp), %rdi
callq 0x14b8e
jmp 0xe5f6
movq %rax, %r15
leaq 0x58(%rsp), %rdi
callq 0xfc90
jmp 0xe5f6
jmp 0xe5f3
jmp 0xe5f3
movq %rax, %r15
leaq 0x58(%rsp), %rdi
callq 0x11a78
jmp 0xe5c0
movq %rax, %r15
leaq 0x330(%rsp), %rdi
callq 0x2100
jmp 0xe5f6
movq %rax, %r15
leaq 0x58(%rsp), %rdi
callq 0x11a78
jmp 0xe5f6
jmp 0xe5f3
jmp 0xe5f3
jmp 0xe5f3
movq %rax, %r15
leaq 0x58(%rsp), %rdi
callq 0x2100
jmp 0xe60c
movq %rax, %r15
leaq 0x298(%rsp), %rdi
callq 0x11a78
jmp 0xe60c
jmp 0xe609
jmp 0xe609
movq %rax, %r15
leaq 0x208(%rsp), %rdi
callq 0xea56
jmp 0xe63d
movq %rax, %r15
movq %rbx, %rdi
callq 0x2100
jmp 0xe62b
movq %rax, %r15
leaq 0x208(%rsp), %rdi
callq 0x2100
jmp 0xe63d
movq %rax, %r15
leaq 0x28(%rsp), %rdi
callq 0xe738
jmp 0xe6b1
movq %rax, %r15
movl $0x198, %r12d           # imm = 0x198
leaq (%rsp,%r12), %rdi
addq $0x58, %rdi
callq 0xea80
addq $-0x18, %r12
cmpq $-0x18, %r12
jne 0xe652
movb $0x1, %al
jmp 0xe692
jmp 0xe68d
jmp 0xe68d
jmp 0xe68d
jmp 0xe68d
jmp 0xe68d
jmp 0xe68d
jmp 0xe68d
jmp 0xe68d
jmp 0xe68d
jmp 0xe68d
jmp 0xe68d
jmp 0xe68d
jmp 0xe68d
jmp 0xe68d
jmp 0xe68d
jmp 0xe68d
movq %rax, %r15
xorl %eax, %eax
cmpq %r14, %rbx
sete %cl
testb %al, %al
jne 0xe6b1
testb %cl, %cl
jne 0xe6b1
addq $-0x18, %r14
movq %r14, %rdi
callq 0xea80
cmpq %rbx, %r14
jne 0xe6a0
leaq 0x40(%rsp), %rdi
callq 0xea80
movq %r15, %rdi
callq 0x23a0
movq %rax, %r15
jmp 0xe6b1