// File: joraso[P]Glassius/Protocol.cpp
// Function: Protocol::LennardJonesTest(double, double, Stopwatch*)
void Protocol::LennardJonesTest(double Temp, double relax, Stopwatch* timer){

    std::cout <<"\n"<< "Testing Lennard-Jones Fluid" <<"\n"<< std::endl;
    std::cout << "Using Parameters:" << std::endl;
    std::cout << "Temperature = " << Temp << std::endl;
    std::cout << "RelaxationTime =  " << relax << std::endl;
    
    double rho = 1000 / (9.4*9.4*9.4);
    
    std::cout << "\n" << "Setting up System..." << std::endl;
    Fluid System(rho, Temp, 10);
    timer->StampComplete();
    
    std::cout << "\n" << "Setting up Simulation..." << std::endl;
    Verlet Simulation(&System, Temp, 0.01, 1);
    timer->StampComplete();
    
    std::cout << "\n" << "Equilibrating at T = " << Temp << std::endl;
    std::cout << "Thermostating every 100 timesteps" << std::endl;
    Simulation.Equilibrate(relax, 100);
    timer->StampComplete();
    
    std::cout << "\n" << "Begining Production Run" << std::endl;
    std::cout << "Using Parameters:" << std::endl;
    double dt = Simulation.Getdt();
    std::cout << "Timestep = " << dt << std::endl;
    int Npoints = 100;
    std::cout << "Total Data Points = " << Npoints << std::endl;
    int Nrec = int( relax / (dt*Npoints) );
    Simulation.SetRecord(Nrec);
    std::cout << "Recording every = " << Simulation.GetRecord() << std::endl;
    Simulation.Run(relax);
    timer->StampComplete();
    
    return;
}

// Assembly:
subq $0x1c8, %rsp            # imm = 0x1C8
movsd %xmm0, 0x1c0(%rsp)
movsd %xmm1, 0x1b8(%rsp)
movq %rdi, 0x1b0(%rsp)
movq 0x43c8(%rip), %rdi      # 0xbfd0
movq %rdi, 0x90(%rsp)
leaq 0x1679(%rip), %rsi      # 0x9290
movq %rsi, 0x98(%rsp)
callq 0x2140
movq %rax, %rdi
leaq 0x1883(%rip), %rsi      # 0x94b1
callq 0x2140
movq 0x98(%rsp), %rsi
movq %rax, %rdi
callq 0x2140
movq %rax, %rdi
movq 0x436b(%rip), %rsi      # 0xbfb8
movq %rsi, 0xa0(%rsp)
callq 0x2150
movq 0x90(%rsp), %rdi
leaq 0x164b(%rip), %rsi      # 0x92b4
callq 0x2140
movq 0xa0(%rsp), %rsi
movq %rax, %rdi
callq 0x2150
movq 0x90(%rsp), %rdi
leaq 0x1639(%rip), %rsi      # 0x92c6
callq 0x2140
movq %rax, %rdi
movsd 0x1c0(%rsp), %xmm0
callq 0x2240
movq 0xa0(%rsp), %rsi
movq %rax, %rdi
callq 0x2150
movq 0x90(%rsp), %rdi
leaq 0x1613(%rip), %rsi      # 0x92d5
callq 0x2140
movq %rax, %rdi
movsd 0x1b8(%rsp), %xmm0
callq 0x2240
movq 0xa0(%rsp), %rsi
movq %rax, %rdi
callq 0x2150
movq 0x90(%rsp), %rdi
movq 0x98(%rsp), %rsi
movabsq $0x3ff343784bba4763, %rax # imm = 0x3FF343784BBA4763
movq %rax, 0x1a8(%rsp)
callq 0x2140
movq %rax, %rdi
leaq 0x15ea(%rip), %rsi      # 0x9303
callq 0x2140
movq 0xa0(%rsp), %rsi
movq %rax, %rdi
callq 0x2150
movsd 0x1a8(%rsp), %xmm0
movsd 0x1c0(%rsp), %xmm1
leaq 0x120(%rsp), %rdi
movsd 0x1500(%rip), %xmm2     # 0x9250
callq 0x88f0
movq 0x1b0(%rsp), %rdi
callq 0x30c0
jmp 0x7d64
movq 0x4265(%rip), %rdi      # 0xbfd0
leaq 0x151e(%rip), %rsi      # 0x9290
callq 0x2140
movq %rax, 0x88(%rsp)
jmp 0x7d81
movq 0x88(%rsp), %rdi
leaq 0x1588(%rip), %rsi      # 0x9318
callq 0x2140
movq %rax, 0x80(%rsp)
jmp 0x7d9f
movq 0x80(%rsp), %rdi
movq 0x420a(%rip), %rsi      # 0xbfb8
callq 0x2150
jmp 0x7db5
movsd 0x1c0(%rsp), %xmm0
leaq 0xb8(%rsp), %rdi
leaq 0x120(%rsp), %rsi
movsd 0x1482(%rip), %xmm1     # 0x9258
movl $0x1, %edx
callq 0x85b0
jmp 0x7de2
movq 0x1b0(%rsp), %rdi
callq 0x30c0
jmp 0x7df1
movq 0x41d8(%rip), %rdi      # 0xbfd0
leaq 0x1491(%rip), %rsi      # 0x9290
callq 0x2140
movq %rax, 0x78(%rsp)
jmp 0x7e0b
movq 0x78(%rsp), %rdi
leaq 0x157b(%rip), %rsi      # 0x9392
callq 0x2140
movq %rax, 0x70(%rsp)
jmp 0x7e23
movq 0x70(%rsp), %rdi
movsd 0x1c0(%rsp), %xmm0
callq 0x2240
movq %rax, 0x68(%rsp)
jmp 0x7e3d
movq 0x68(%rsp), %rdi
movq 0x416f(%rip), %rsi      # 0xbfb8
callq 0x2150
jmp 0x7e50
movq 0x4179(%rip), %rdi      # 0xbfd0
leaq 0x166f(%rip), %rsi      # 0x94cd
callq 0x2140
movq %rax, 0x60(%rsp)
jmp 0x7e6a
movq 0x60(%rsp), %rdi
movq 0x4142(%rip), %rsi      # 0xbfb8
callq 0x2150
jmp 0x7e7d
movsd 0x1b8(%rsp), %xmm0
leaq 0xb8(%rsp), %rdi
movl $0x64, %esi
callq 0x4f10
jmp 0x7e9a
movq 0x1b0(%rsp), %rdi
callq 0x30c0
jmp 0x7ea9
movq 0x4120(%rip), %rdi      # 0xbfd0
leaq 0x13d9(%rip), %rsi      # 0x9290
callq 0x2140
movq %rax, 0x58(%rsp)
jmp 0x7ec3
movq 0x58(%rsp), %rdi
leaq 0x14ea(%rip), %rsi      # 0x93b9
callq 0x2140
movq %rax, 0x50(%rsp)
jmp 0x7edb
movq 0x50(%rsp), %rdi
movq 0x40d1(%rip), %rsi      # 0xbfb8
callq 0x2150
jmp 0x7eee
movq 0x40db(%rip), %rdi      # 0xbfd0
leaq 0x13b8(%rip), %rsi      # 0x92b4
callq 0x2140
movq %rax, 0x48(%rsp)
jmp 0x7f08
movq 0x48(%rsp), %rdi
movq 0x40a4(%rip), %rsi      # 0xbfb8
callq 0x2150
jmp 0x7f1b
leaq 0xb8(%rsp), %rdi
callq 0x8690
movsd %xmm0, 0x40(%rsp)
jmp 0x7f30
movsd 0x40(%rsp), %xmm0
movsd %xmm0, 0xb0(%rsp)
movq 0x408a(%rip), %rdi      # 0xbfd0
leaq 0x1484(%rip), %rsi      # 0x93d1
callq 0x2140
movq %rax, 0x38(%rsp)
jmp 0x7f59
movq 0x38(%rsp), %rdi
movsd 0xb0(%rsp), %xmm0
callq 0x2240
movq %rax, 0x30(%rsp)
jmp 0x7f73
movq 0x30(%rsp), %rdi
movq 0x4039(%rip), %rsi      # 0xbfb8
callq 0x2150
jmp 0x7f86
movl $0x64, 0xac(%rsp)
movq 0x4038(%rip), %rdi      # 0xbfd0
leaq 0x143e(%rip), %rsi      # 0x93dd
callq 0x2140
movq %rax, 0x28(%rsp)
jmp 0x7fab
movq 0x28(%rsp), %rdi
movl 0xac(%rsp), %esi
callq 0x21f0
movq %rax, 0x20(%rsp)
jmp 0x7fc3
movq 0x20(%rsp), %rdi
movq 0x3fe9(%rip), %rsi      # 0xbfb8
callq 0x2150
jmp 0x7fd6
movsd 0x1b8(%rsp), %xmm0
movsd 0xb0(%rsp), %xmm1
cvtsi2sdl 0xac(%rsp), %xmm2
mulsd %xmm2, %xmm1
divsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
movl %eax, 0xa8(%rsp)
movl 0xa8(%rsp), %esi
leaq 0xb8(%rsp), %rdi
callq 0x86a0
jmp 0x801a
movq 0x3faf(%rip), %rdi      # 0xbfd0
leaq 0x1336(%rip), %rsi      # 0x935e
callq 0x2140
movq %rax, 0x18(%rsp)
jmp 0x8034
leaq 0xb8(%rsp), %rdi
callq 0x8640
movl %eax, 0x14(%rsp)
jmp 0x8047
movl 0x14(%rsp), %esi
movq 0x18(%rsp), %rdi
callq 0x21f0
movq %rax, 0x8(%rsp)
jmp 0x805c
movq 0x8(%rsp), %rdi
movq 0x3f50(%rip), %rsi      # 0xbfb8
callq 0x2150
jmp 0x806f
movsd 0x1b8(%rsp), %xmm0
leaq 0xb8(%rsp), %rdi
callq 0x5230
jmp 0x8087
movq 0x1b0(%rsp), %rdi
callq 0x30c0
jmp 0x8096
leaq 0xb8(%rsp), %rdi
callq 0x86c0
leaq 0x120(%rsp), %rdi
callq 0x8980
addq $0x1c8, %rsp            # imm = 0x1C8
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x118(%rsp)
movl %eax, 0x114(%rsp)
jmp 0x80ef
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x118(%rsp)
movl %eax, 0x114(%rsp)
leaq 0xb8(%rsp), %rdi
callq 0x86c0
leaq 0x120(%rsp), %rdi
callq 0x8980
movq 0x118(%rsp), %rdi
callq 0x2210
nopl (%rax)