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

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

	/*
	 * (2) set potential
	 */
	RRCE RRCE_;
	if (opts.table != "") {
		RRCE_ = RRCE(opts.table.c_str(), opts.dmax);
	}

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

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

	return 0;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x330, %rsp            # imm = 0x330
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0x78(%rbp), %rax
movq %rax, -0x2e0(%rbp)
leaq -0x79(%rbp), %rdi
movq %rdi, -0x2d8(%rbp)
callq 0x3470
movq -0x2e0(%rbp), %rdi
movq -0x2d8(%rbp), %rdx
leaq 0x2d14(%rip), %rsi      # 0x2e06d
callq 0x13dc0
jmp 0x2b360
movb $0x1, -0x90(%rbp)
leaq -0x58(%rbp), %rax
movq %rax, -0x2f0(%rbp)
leaq -0x8d(%rbp), %rdi
movq %rdi, -0x2e8(%rbp)
callq 0x3470
movq -0x2f0(%rbp), %rdi
movq -0x2e8(%rbp), %rdx
leaq 0x2cd3(%rip), %rsi      # 0x2e06d
callq 0x13dc0
jmp 0x2b3a1
movb $0x1, -0x8f(%rbp)
leaq -0x38(%rbp), %rax
movq %rax, -0x300(%rbp)
leaq -0x8e(%rbp), %rdi
movq %rdi, -0x2f8(%rbp)
callq 0x3470
movq -0x300(%rbp), %rdi
movq -0x2f8(%rbp), %rdx
leaq 0x2c92(%rip), %rsi      # 0x2e06d
callq 0x13dc0
jmp 0x2b3e2
movabsq $0x401f333333333333, %rax # imm = 0x401F333333333333
movq %rax, -0x18(%rbp)
movb $0x0, -0x8f(%rbp)
movb $0x0, -0x90(%rbp)
leaq -0x8e(%rbp), %rdi
callq 0x32e0
leaq -0x8d(%rbp), %rdi
callq 0x32e0
leaq -0x79(%rbp), %rdi
callq 0x32e0
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
leaq -0x78(%rbp), %rdx
callq 0x13b50
movb %al, -0x301(%rbp)
jmp 0x2b437
movb -0x301(%rbp), %al
testb $0x1, %al
jne 0x2b5a6
jmp 0x2b447
leaq -0xb1(%rbp), %rdi
movq %rdi, -0x310(%rbp)
callq 0x3470
movq -0x310(%rbp), %rdx
leaq 0xf7a0(%rip), %rsi      # 0x3ac08
leaq -0xb0(%rbp), %rdi
callq 0x13dc0
jmp 0x2b476
leaq -0xb0(%rbp), %rdi
movsd 0xde7b(%rip), %xmm0     # 0x39300
callq 0x13ac0
jmp 0x2b48c
leaq -0xb0(%rbp), %rdi
callq 0x3190
leaq -0xb1(%rbp), %rdi
callq 0x32e0
movl $0x1, -0x4(%rbp)
movl $0x1, -0xb8(%rbp)
jmp 0x2b815
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
jmp 0x2b53e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
jmp 0x2b519
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
leaq -0x8e(%rbp), %rdi
callq 0x32e0
testb $0x1, -0x8f(%rbp)
jne 0x2b50b
jmp 0x2b517
movq -0x2f0(%rbp), %rdi
callq 0x3190
jmp 0x2b519
leaq -0x8d(%rbp), %rdi
callq 0x32e0
testb $0x1, -0x90(%rbp)
jne 0x2b530
jmp 0x2b53c
movq -0x2e0(%rbp), %rdi
callq 0x3190
jmp 0x2b53e
leaq -0x79(%rbp), %rdi
callq 0x32e0
jmp 0x2b833
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
jmp 0x2b82a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
jmp 0x2b595
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
leaq -0xb0(%rbp), %rdi
callq 0x3190
leaq -0xb1(%rbp), %rdi
callq 0x32e0
jmp 0x2b82a
leaq -0xf0(%rbp), %rdi
callq 0x22730
jmp 0x2b5b4
leaq -0x38(%rbp), %rdi
leaq 0x2aae(%rip), %rsi      # 0x2e06d
callq 0x2b840
movb %al, -0x311(%rbp)
jmp 0x2b5cc
movb -0x311(%rbp), %al
testb $0x1, %al
jne 0x2b5d8
jmp 0x2b654
leaq -0x38(%rbp), %rdi
callq 0x3110
movq %rax, %rsi
movsd -0x18(%rbp), %xmm0
leaq -0x128(%rbp), %rdi
callq 0x22690
jmp 0x2b5f7
leaq -0xf0(%rbp), %rdi
leaq -0x128(%rbp), %rsi
callq 0x229c0
jmp 0x2b60c
leaq -0x128(%rbp), %rdi
callq 0x22910
jmp 0x2b654
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
jmp 0x2b807
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
leaq -0x128(%rbp), %rdi
callq 0x22910
jmp 0x2b807
leaq -0x58(%rbp), %rdi
leaq 0x2a0e(%rip), %rsi      # 0x2e06d
callq 0x13e70
movb %al, -0x312(%rbp)
jmp 0x2b66c
movb -0x312(%rbp), %al
testb $0x1, %al
jne 0x2b678
jmp 0x2b6f3
leaq -0x78(%rbp), %rdi
callq 0x3110
movq %rax, %rsi
leaq -0x1a0(%rbp), %rdi
callq 0x14690
jmp 0x2b692
leaq -0xf0(%rbp), %rdi
leaq -0x1a0(%rbp), %rsi
callq 0x22bb0
movsd %xmm0, -0x320(%rbp)
jmp 0x2b6af
movsd -0x320(%rbp), %xmm0
movsd %xmm0, -0x130(%rbp)
leaq -0x1a0(%rbp), %rdi
callq 0x15c40
jmp 0x2b782
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
leaq -0x1a0(%rbp), %rdi
callq 0x15c40
jmp 0x2b807
leaq -0x78(%rbp), %rdi
callq 0x3110
movq %rax, -0x328(%rbp)
leaq -0x58(%rbp), %rdi
callq 0x3110
movq -0x328(%rbp), %rsi
movq %rax, %rdx
leaq -0x2b0(%rbp), %rdi
callq 0x26970
jmp 0x2b724
leaq -0xf0(%rbp), %rdi
leaq -0x2b0(%rbp), %rsi
callq 0x22d50
movsd %xmm0, -0x330(%rbp)
jmp 0x2b741
movsd -0x330(%rbp), %xmm0
movsd %xmm0, -0x130(%rbp)
leaq -0x2b0(%rbp), %rdi
callq 0x26a50
jmp 0x2b782
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
leaq -0x2b0(%rbp), %rdi
callq 0x26a50
jmp 0x2b807
leaq -0x2d0(%rbp), %rdi
leaq -0xf0(%rbp), %rsi
callq 0x22ab0
jmp 0x2b797
leaq -0x2d0(%rbp), %rdi
callq 0x3110
movq %rax, %rsi
movsd -0x130(%rbp), %xmm0
leaq 0xf45a(%rip), %rdi      # 0x3ac0f
movb $0x1, %al
callq 0x3070
jmp 0x2b7be
leaq -0x2d0(%rbp), %rdi
callq 0x3190
movl $0x0, -0x4(%rbp)
movl $0x1, -0xb8(%rbp)
leaq -0xf0(%rbp), %rdi
callq 0x22910
jmp 0x2b815
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
leaq -0x2d0(%rbp), %rdi
callq 0x3190
leaq -0xf0(%rbp), %rdi
callq 0x22910
jmp 0x2b82a
leaq -0x78(%rbp), %rdi
callq 0x2b870
movl -0x4(%rbp), %eax
addq $0x330, %rsp            # imm = 0x330
popq %rbp
retq
leaq -0x78(%rbp), %rdi
callq 0x2b870
movq -0x88(%rbp), %rdi
callq 0x3460
nop