// File: /workspace/github_cpp_makefile_star2_O2/joraso[P]Glassius/Protocol.cpp
// Function: Protocol::KobAndersonTest(double, double, int, Stopwatch*)
void Protocol::KobAndersonTest(double Temp, double relax, int record,
                               Stopwatch* timer){
    /* Set to mimick the tests run in LAMMPS */

    std::cout <<"\n"<< "Testing Kob-Anderson Glass" <<"\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 << "Density = " << rho << std::endl;
    std::cout << "Boxlength = 9.4" << std::endl;
    
    std::cout << "\n" << "Setting up System..." << std::endl;
    Glass System(rho, 5.0, 10);
    timer->StampComplete();
    
    std::cout << "\n" << "Setting up Simulation..." << std::endl;
    Verlet verlet(&System, 5.0, 0.005, record);
    verlet.SetEnergyFile("Data/Equilibration.csv");
    timer->StampComplete();
    
    std::cout << "\n" << "Mixing at T = 5.0" << std::endl;
    std::cout << "Running for t = 20" << std::endl;
    std::cout << "Timestep = " << verlet.Getdt() << std::endl;
    std::cout << "Steps = 4000" << std::endl;
    std::cout << "Recording every = " << verlet.GetRecord() << std::endl;
    std::cout << "Thermostating every 500 timesteps" << std::endl;
    verlet.Equilibrate(20, 500);
    timer->StampComplete();
 
    std::cout << "\n" << "Equilibrating at T = " << Temp << std::endl;
    std::cout << "Running for t = " << relax << std::endl;
    std::cout << "Timestep = " << verlet.Getdt() << std::endl;
    std::cout << "Steps = " << relax/verlet.Getdt() << std::endl;
    std::cout << "Recording every = " << verlet.GetRecord() << std::endl;
    std::cout << "Thermostating every 500 timesteps" << std::endl;
    verlet.SetTemp(0.5);
    System.Thermalize(0.5);
    verlet.Equilibrate(relax, 500);
    timer->StampComplete();
 
    std::cout << "\n" << "Begining Production Run" << std::endl;
    std::cout << "Running for t = " << 1.5*relax << std::endl;
    std::cout << "Timestep = " << verlet.Getdt() << std::endl;
    std::cout << "Steps = " << (1.5*relax)/verlet.Getdt() << std::endl;
    std::cout << "Recording every = " << verlet.GetRecord() << std::endl;
    verlet.SetTime(0);
    verlet.SetEnergyFile("Data/Energies.csv");
    verlet.RecordTrajectory(true);
    verlet.Run(1.5*relax);
    timer->StampComplete();
    
    return;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x148, %rsp            # imm = 0x148
movq %rsi, %rbx
movl %edi, %ebp
movsd %xmm1, 0x10(%rsp)
movsd %xmm0, 0x18(%rsp)
movq 0x4a2d(%rip), %r14      # 0x8fd0
leaq 0x1d36(%rip), %r15      # 0x62e0
movq %r14, %rdi
movq %r15, %rsi
callq 0x2150
leaq 0x1e86(%rip), %rsi      # 0x6442
movq %rax, %rdi
callq 0x2150
movq %rax, %rdi
movq %r15, %rsi
callq 0x2150
movq %rax, %rdi
callq 0x20c0
leaq 0x1d26(%rip), %rsi      # 0x6304
movq %r14, %rdi
callq 0x2150
movq %rax, %rdi
callq 0x20c0
leaq 0x1d30(%rip), %rsi      # 0x6325
movq %r14, %rdi
callq 0x2150
movq %rax, %rdi
movsd 0x10(%rsp), %xmm0
callq 0x21c0
movq %rax, %rdi
callq 0x20c0
leaq 0x1d1e(%rip), %rsi      # 0x6338
movq %r14, %rdi
callq 0x2150
movsd 0x1c56(%rip), %xmm0     # 0x6280
movq %rax, %rdi
callq 0x21c0
movq %rax, %rdi
callq 0x20c0
leaq 0x1d02(%rip), %rsi      # 0x6343
movq %r14, %rdi
callq 0x2150
movq %rax, %rdi
callq 0x20c0
movq %r14, %rdi
movq %r15, %rsi
callq 0x2150
leaq 0x1cf0(%rip), %rsi      # 0x6353
movq %rax, %rdi
callq 0x2150
movq %rax, %rdi
callq 0x20c0
leaq 0xb8(%rsp), %rdi
movsd 0x1c05(%rip), %xmm1     # 0x6288
movsd 0x1c05(%rip), %xmm2     # 0x6290
movsd 0x1bed(%rip), %xmm0     # 0x6280
callq 0x5646
movq %rbx, %rdi
callq 0x294a
movq 0x4929(%rip), %rdi      # 0x8fd0
leaq 0x1c32(%rip), %rsi      # 0x62e0
callq 0x2150
leaq 0x1cae(%rip), %rsi      # 0x6368
movq %rax, %rdi
callq 0x2150
movq %rax, %rdi
callq 0x20c0
leaq 0x20(%rsp), %rdi
leaq 0xb8(%rsp), %rsi
movsd 0x1ba9(%rip), %xmm0     # 0x6288
movsd 0x1bd9(%rip), %xmm1     # 0x62c0
movl %ebp, %edx
callq 0x56ba
leaq 0x1d68(%rip), %rsi      # 0x645d
leaq 0x98(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x2090
leaq 0x50(%rsp), %r14
leaq 0x98(%rsp), %rsi
movq %r14, %rdi
callq 0x20e0
leaq 0x98(%rsp), %rdi
callq 0x20a0
movq %rbx, %rdi
callq 0x294a
movq 0x4898(%rip), %rdi      # 0x8fd0
leaq 0x1ba1(%rip), %rsi      # 0x62e0
callq 0x2150
leaq 0x1d29(%rip), %rsi      # 0x6474
movq %rax, %rdi
callq 0x2150
movq %rax, %rdi
callq 0x20c0
movq 0x486e(%rip), %rdi      # 0x8fd0
leaq 0x1d1d(%rip), %rsi      # 0x6486
callq 0x2150
movq %rax, %rdi
callq 0x20c0
movq 0x4853(%rip), %rdi      # 0x8fd0
leaq 0x1c9d(%rip), %rsi      # 0x6421
callq 0x2150
movsd 0x38(%rsp), %xmm0
movq %rax, %rdi
callq 0x21c0
movq %rax, %rdi
callq 0x20c0
movq 0x482a(%rip), %rdi      # 0x8fd0
leaq 0x1cec(%rip), %rsi      # 0x6499
callq 0x2150
movq %rax, %rdi
callq 0x20c0
movq 0x480f(%rip), %rdi      # 0x8fd0
leaq 0x1be6(%rip), %rsi      # 0x63ae
callq 0x2150
movl 0x48(%rsp), %esi
movq %rax, %rdi
callq 0x21e0
movq %rax, %rdi
callq 0x20c0
movq 0x47e8(%rip), %rdi      # 0x8fd0
leaq 0x1cb7(%rip), %rsi      # 0x64a6
callq 0x2150
movq %rax, %rdi
callq 0x20c0
leaq 0x20(%rsp), %rdi
movsd 0x1abf(%rip), %xmm0     # 0x62c8
movl $0x1f4, %esi            # imm = 0x1F4
callq 0x3968
movq %rbx, %rdi
callq 0x294a
movq 0x47ae(%rip), %rdi      # 0x8fd0
leaq 0x1ab7(%rip), %rsi      # 0x62e0
callq 0x2150
leaq 0x1bad(%rip), %rsi      # 0x63e2
movq %rax, %rdi
callq 0x2150
movq %rax, %rdi
movsd 0x18(%rsp), %xmm0
callq 0x21c0
movq %rax, %rdi
callq 0x20c0
movq 0x4776(%rip), %rdi      # 0x8fd0
leaq 0x1b97(%rip), %rsi      # 0x63f8
callq 0x2150
movq %rax, %rdi
movsd 0x10(%rsp), %xmm0
callq 0x21c0
movq %rax, %rdi
callq 0x20c0
movq 0x474d(%rip), %rdi      # 0x8fd0
leaq 0x1b97(%rip), %rsi      # 0x6421
callq 0x2150
movsd 0x38(%rsp), %xmm0
movq %rax, %rdi
callq 0x21c0
movq %rax, %rdi
callq 0x20c0
movq 0x4724(%rip), %rdi      # 0x8fd0
leaq 0x1c15(%rip), %rsi      # 0x64c8
callq 0x2150
movsd 0x10(%rsp), %xmm0
divsd 0x38(%rsp), %xmm0
movq %rax, %rdi
callq 0x21c0
movq %rax, %rdi
callq 0x20c0
movq 0x46f5(%rip), %rdi      # 0x8fd0
leaq 0x1acc(%rip), %rsi      # 0x63ae
callq 0x2150
movl 0x48(%rsp), %esi
movq %rax, %rdi
callq 0x21e0
movq %rax, %rdi
callq 0x20c0
movq 0x46ce(%rip), %rdi      # 0x8fd0
leaq 0x1b9d(%rip), %rsi      # 0x64a6
callq 0x2150
movq %rax, %rdi
callq 0x20c0
movabsq $0x3fe0000000000000, %rax # imm = 0x3FE0000000000000
movq %rax, 0x30(%rsp)
leaq 0xb8(%rsp), %rdi
movsd 0x17d3(%rip), %xmm0     # 0x6108
callq 0x321c
leaq 0x20(%rsp), %rdi
movsd 0x10(%rsp), %xmm0
movl $0x1f4, %esi            # imm = 0x1F4
callq 0x3968
movq %rbx, %rdi
callq 0x294a
movq 0x4672(%rip), %rdi      # 0x8fd0
leaq 0x197b(%rip), %rsi      # 0x62e0
callq 0x2150
leaq 0x1a98(%rip), %rsi      # 0x6409
movq %rax, %rdi
callq 0x2150
movq %rax, %rdi
callq 0x20c0
movq 0x4648(%rip), %rdi      # 0x8fd0
leaq 0x1a69(%rip), %rsi      # 0x63f8
callq 0x2150
movsd 0x10(%rsp), %xmm0
mulsd 0x176e(%rip), %xmm0     # 0x6110
movq %rax, %rdi
movsd %xmm0, 0x10(%rsp)
callq 0x21c0
movq %rax, %rdi
callq 0x20c0
movq 0x4611(%rip), %rdi      # 0x8fd0
leaq 0x1a5b(%rip), %rsi      # 0x6421
callq 0x2150
movsd 0x38(%rsp), %xmm0
movq %rax, %rdi
callq 0x21c0
movq %rax, %rdi
callq 0x20c0
movq 0x45e8(%rip), %rdi      # 0x8fd0
leaq 0x1ad9(%rip), %rsi      # 0x64c8
callq 0x2150
movsd 0x10(%rsp), %xmm0
divsd 0x38(%rsp), %xmm0
movq %rax, %rdi
callq 0x21c0
movq %rax, %rdi
callq 0x20c0
movq 0x45b9(%rip), %rdi      # 0x8fd0
leaq 0x1990(%rip), %rsi      # 0x63ae
callq 0x2150
movl 0x48(%rsp), %esi
movq %rax, %rdi
callq 0x21e0
movq %rax, %rdi
callq 0x20c0
movq 0x28(%rsp), %rax
andq $0x0, 0x70(%rax)
leaq 0x1a89(%rip), %rsi      # 0x64d1
leaq 0x78(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x2090
leaq 0x78(%rsp), %rsi
movq %r14, %rdi
callq 0x20e0
leaq 0x78(%rsp), %rdi
callq 0x20a0
leaq 0x20(%rsp), %rdi
movb $0x1, 0x50(%rdi)
movsd 0x10(%rsp), %xmm0
callq 0x3b24
movq %rbx, %rdi
callq 0x294a
leaq 0x20(%rsp), %rdi
callq 0x56f8
leaq 0xb8(%rsp), %rdi
callq 0x589c
addq $0x148, %rsp            # imm = 0x148
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x78(%rsp), %rdi
jmp 0x4ac6
jmp 0x4ad6
movq %rax, %rbx
leaq 0x98(%rsp), %rdi
callq 0x20a0
jmp 0x4ad9
jmp 0x4ad6
jmp 0x4ad1
movq %rax, %rbx
jmp 0x4ae3
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x56f8
leaq 0xb8(%rsp), %rdi
callq 0x589c
movq %rbx, %rdi
callq 0x2200