// File: /workspace/github_cpp_makefile_star2_O1/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 %r12
pushq %rbx
subq $0x140, %rsp            # imm = 0x140
movq %rsi, %rbx
movl %edi, %ebp
movsd %xmm1, 0x8(%rsp)
movsd %xmm0, 0x10(%rsp)
movq 0x6161(%rip), %r14      # 0xafd8
leaq 0x345a(%rip), %r15      # 0x82d8
movl $0x1, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x21e0
leaq 0x35a5(%rip), %rsi      # 0x843a
movl $0x1a, %edx
movq %r14, %rdi
callq 0x21e0
movl $0x1, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x21e0
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x21d0
movsbl %al, %esi
movq %r14, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2120
leaq 0x341c(%rip), %rsi      # 0x82fc
movl $0x11, %edx
movq %r14, %rdi
callq 0x21e0
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x21d0
movsbl %al, %esi
movq %r14, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2120
leaq 0x3402(%rip), %rsi      # 0x831d
movl $0x12, %edx
movq %r14, %rdi
callq 0x21e0
movq %r14, %rdi
movsd 0x8(%rsp), %xmm0
callq 0x2260
movq %rax, %r12
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x21d0
movsbl %al, %esi
movq %r12, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2120
leaq 0x33c9(%rip), %rsi      # 0x8330
movl $0xa, %edx
movq %r14, %rdi
callq 0x21e0
movsd 0x3304(%rip), %xmm0     # 0x8280
movq %r14, %rdi
callq 0x2260
movq %rax, %r12
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x21d0
movsbl %al, %esi
movq %r12, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2120
leaq 0x3386(%rip), %rsi      # 0x833b
movl $0xf, %edx
movq %r14, %rdi
callq 0x21e0
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x21d0
movsbl %al, %esi
movq %r14, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2120
movl $0x1, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x21e0
leaq 0x334b(%rip), %rsi      # 0x834b
movl $0x14, %edx
movq %r14, %rdi
callq 0x21e0
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x21d0
movsbl %al, %esi
movq %r14, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2120
leaq 0xb0(%rsp), %rdi
movsd 0x3244(%rip), %xmm1     # 0x8288
movsd 0x3244(%rip), %xmm2     # 0x8290
movsd 0x322c(%rip), %xmm0     # 0x8280
callq 0x6ce4
movq %rbx, %rdi
callq 0x2b8a
movq 0x5f70(%rip), %rdi      # 0xafd8
leaq 0x3269(%rip), %rsi      # 0x82d8
movl $0x1, %edx
callq 0x21e0
movq 0x5f58(%rip), %r14      # 0xafd8
leaq 0x32d9(%rip), %rsi      # 0x8360
movl $0x18, %edx
movq %r14, %rdi
callq 0x21e0
movq (%r14), %rax
addq -0x18(%rax), %r14
movq %r14, %rdi
movl $0xa, %esi
callq 0x21d0
movsbl %al, %esi
movq 0x5f26(%rip), %rdi      # 0xafd8
callq 0x2040
movq %rax, %rdi
callq 0x2120
leaq 0x18(%rsp), %rdi
leaq 0xb0(%rsp), %rsi
movsd 0x31b4(%rip), %xmm0     # 0x8288
movsd 0x31dc(%rip), %xmm1     # 0x82b8
movl %ebp, %edx
callq 0x6d5c
leaq 0xa0(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x335f(%rip), %rsi      # 0x8455
leaq 0x336e(%rip), %rdx      # 0x846b
leaq 0x90(%rsp), %rdi
callq 0x7120
leaq 0x48(%rsp), %r14
leaq 0x90(%rsp), %rsi
movq %r14, %rdi
callq 0x2100
movq 0x90(%rsp), %rdi
cmpq %r15, %rdi
je 0x5131
callq 0x21b0
movq %rbx, %rdi
callq 0x2b8a
movq 0x5e98(%rip), %rdi      # 0xafd8
leaq 0x3191(%rip), %rsi      # 0x82d8
movl $0x1, %edx
callq 0x21e0
movq 0x5e80(%rip), %r15      # 0xafd8
leaq 0x330d(%rip), %rsi      # 0x846c
movl $0x11, %edx
movq %r15, %rdi
callq 0x21e0
movq (%r15), %rax
addq -0x18(%rax), %r15
movq %r15, %rdi
movl $0xa, %esi
callq 0x21d0
movsbl %al, %esi
movq 0x5e4e(%rip), %rdi      # 0xafd8
callq 0x2040
movq %rax, %rdi
callq 0x2120
movq 0x5e3a(%rip), %r15      # 0xafd8
leaq 0x32d9(%rip), %rsi      # 0x847e
movl $0x12, %edx
movq %r15, %rdi
callq 0x21e0
movq (%r15), %rax
addq -0x18(%rax), %r15
movq %r15, %rdi
movl $0xa, %esi
callq 0x21d0
movsbl %al, %esi
movq 0x5e08(%rip), %rdi      # 0xafd8
callq 0x2040
movq %rax, %rdi
callq 0x2120
movq 0x5df4(%rip), %rdi      # 0xafd8
leaq 0x322e(%rip), %rsi      # 0x8419
movl $0xb, %edx
callq 0x21e0
movsd 0x30(%rsp), %xmm0
movq 0x5dd6(%rip), %rdi      # 0xafd8
callq 0x2260
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x21d0
movsbl %al, %esi
movq %r15, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2120
movq 0x5da0(%rip), %r15      # 0xafd8
leaq 0x3252(%rip), %rsi      # 0x8491
movl $0xc, %edx
movq %r15, %rdi
callq 0x21e0
movq (%r15), %rax
addq -0x18(%rax), %r15
movq %r15, %rdi
movl $0xa, %esi
callq 0x21d0
movsbl %al, %esi
movq 0x5d6e(%rip), %rdi      # 0xafd8
callq 0x2040
movq %rax, %rdi
callq 0x2120
movq 0x5d5a(%rip), %rdi      # 0xafd8
leaq 0x3121(%rip), %rsi      # 0x83a6
movl $0x12, %edx
callq 0x21e0
movl 0x40(%rsp), %esi
movq 0x5d3e(%rip), %rdi      # 0xafd8
callq 0x2290
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x21d0
movsbl %al, %esi
movq %r15, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2120
movq 0x5d08(%rip), %r15      # 0xafd8
leaq 0x31c7(%rip), %rsi      # 0x849e
movl $0x21, %edx
movq %r15, %rdi
callq 0x21e0
movq (%r15), %rax
addq -0x18(%rax), %r15
movq %r15, %rdi
movl $0xa, %esi
callq 0x21d0
movsbl %al, %esi
movq 0x5cd6(%rip), %rdi      # 0xafd8
callq 0x2040
movq %rax, %rdi
callq 0x2120
leaq 0x18(%rsp), %rdi
movsd 0x2fa4(%rip), %xmm0     # 0x82c0
movl $0x1f4, %esi            # imm = 0x1F4
callq 0x3d80
movq %rbx, %rdi
callq 0x2b8a
movq 0x5ca3(%rip), %rdi      # 0xafd8
leaq 0x2f9c(%rip), %rsi      # 0x82d8
movl $0x1, %edx
callq 0x21e0
movq 0x5c8b(%rip), %rdi      # 0xafd8
leaq 0x3086(%rip), %rsi      # 0x83da
movl $0x15, %edx
callq 0x21e0
movq 0x5c73(%rip), %rdi      # 0xafd8
movsd 0x10(%rsp), %xmm0
callq 0x2260
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x21d0
movsbl %al, %esi
movq %r15, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2120
movq 0x5c37(%rip), %rdi      # 0xafd8
leaq 0x3048(%rip), %rsi      # 0x83f0
movl $0x10, %edx
callq 0x21e0
movq 0x5c1f(%rip), %rdi      # 0xafd8
movsd 0x8(%rsp), %xmm0
callq 0x2260
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x21d0
movsbl %al, %esi
movq %r15, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2120
movq 0x5be3(%rip), %rdi      # 0xafd8
leaq 0x301d(%rip), %rsi      # 0x8419
movl $0xb, %edx
callq 0x21e0
movsd 0x30(%rsp), %xmm0
movq 0x5bc5(%rip), %rdi      # 0xafd8
callq 0x2260
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x21d0
movsbl %al, %esi
movq %r15, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2120
movq 0x5b8f(%rip), %rdi      # 0xafd8
leaq 0x3070(%rip), %rsi      # 0x84c0
movl $0x8, %edx
callq 0x21e0
movsd 0x8(%rsp), %xmm0
divsd 0x30(%rsp), %xmm0
movq 0x5b6b(%rip), %rdi      # 0xafd8
callq 0x2260
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x21d0
movsbl %al, %esi
movq %r15, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2120
movq 0x5b35(%rip), %rdi      # 0xafd8
leaq 0x2efc(%rip), %rsi      # 0x83a6
movl $0x12, %edx
callq 0x21e0
movl 0x40(%rsp), %esi
movq 0x5b19(%rip), %rdi      # 0xafd8
callq 0x2290
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x21d0
movsbl %al, %esi
movq %r15, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2120
movq 0x5ae3(%rip), %r15      # 0xafd8
leaq 0x2fa2(%rip), %rsi      # 0x849e
movl $0x21, %edx
movq %r15, %rdi
callq 0x21e0
movq (%r15), %rax
addq -0x18(%rax), %r15
movq %r15, %rdi
movl $0xa, %esi
callq 0x21d0
movsbl %al, %esi
movq 0x5ab1(%rip), %rdi      # 0xafd8
callq 0x2040
movq %rax, %rdi
callq 0x2120
movabsq $0x3fe0000000000000, %rax # imm = 0x3FE0000000000000
movq %rax, 0x28(%rsp)
leaq 0xb0(%rsp), %rdi
movsd 0x2bad(%rip), %xmm0     # 0x8100
callq 0x3630
leaq 0x18(%rsp), %rdi
movsd 0x8(%rsp), %xmm0
movl $0x1f4, %esi            # imm = 0x1F4
callq 0x3d80
movq %rbx, %rdi
callq 0x2b8a
movq 0x5a5c(%rip), %rdi      # 0xafd8
leaq 0x2d55(%rip), %rsi      # 0x82d8
movl $0x1, %edx
callq 0x21e0
movq 0x5a44(%rip), %r15      # 0xafd8
leaq 0x2e66(%rip), %rsi      # 0x8401
movl $0x17, %edx
movq %r15, %rdi
callq 0x21e0
movq (%r15), %rax
addq -0x18(%rax), %r15
movq %r15, %rdi
movl $0xa, %esi
callq 0x21d0
movsbl %al, %esi
movq 0x5a12(%rip), %rdi      # 0xafd8
callq 0x2040
movq %rax, %rdi
callq 0x2120
movq 0x59fe(%rip), %rdi      # 0xafd8
leaq 0x2e0f(%rip), %rsi      # 0x83f0
movl $0x10, %edx
callq 0x21e0
movsd 0x8(%rsp), %xmm0
mulsd 0x2b17(%rip), %xmm0     # 0x8110
movq 0x59d8(%rip), %rdi      # 0xafd8
movsd %xmm0, 0x8(%rsp)
callq 0x2260
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x21d0
movsbl %al, %esi
movq %r15, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2120
movq 0x599c(%rip), %rdi      # 0xafd8
leaq 0x2dd6(%rip), %rsi      # 0x8419
movl $0xb, %edx
callq 0x21e0
movsd 0x30(%rsp), %xmm0
movq 0x597e(%rip), %rdi      # 0xafd8
callq 0x2260
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x21d0
movsbl %al, %esi
movq %r15, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2120
movq 0x5948(%rip), %rdi      # 0xafd8
leaq 0x2e29(%rip), %rsi      # 0x84c0
movl $0x8, %edx
callq 0x21e0
movsd 0x8(%rsp), %xmm0
divsd 0x30(%rsp), %xmm0
movq 0x5924(%rip), %rdi      # 0xafd8
callq 0x2260
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x21d0
movsbl %al, %esi
movq %r15, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2120
movq 0x58ee(%rip), %rdi      # 0xafd8
leaq 0x2cb5(%rip), %rsi      # 0x83a6
movl $0x12, %edx
callq 0x21e0
movl 0x40(%rsp), %esi
movq 0x58d2(%rip), %rdi      # 0xafd8
callq 0x2290
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x21d0
movsbl %al, %esi
movq %r15, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2120
movq 0x20(%rsp), %rax
movq $0x0, 0x70(%rax)
leaq 0x80(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x2d74(%rip), %rsi      # 0x84c9
leaq 0x2d7e(%rip), %rdx      # 0x84da
leaq 0x70(%rsp), %rdi
callq 0x7120
leaq 0x70(%rsp), %rsi
movq %r14, %rdi
callq 0x2100
movq 0x70(%rsp), %rdi
cmpq %r15, %rdi
je 0x5782
callq 0x21b0
leaq 0x18(%rsp), %rdi
movb $0x1, 0x50(%rdi)
movsd 0x8(%rsp), %xmm0
callq 0x3fae
movq %rbx, %rdi
callq 0x2b8a
leaq 0x55fb(%rip), %rax      # 0xada0
leaq 0x58(%rsp), %rcx
movq %rax, -0x40(%rcx)
movq -0x10(%rcx), %rdi
cmpq %rcx, %rdi
je 0x57bc
callq 0x21b0
leaq 0x55c5(%rip), %rax      # 0xad88
leaq 0xf0(%rsp), %rdi
movq %rax, -0x40(%rdi)
callq 0x3008
leaq 0xe0(%rsp), %rdi
callq 0x3008
leaq 0xd0(%rsp), %rdi
callq 0x3008
addq $0x140, %rsp            # imm = 0x140
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x70(%rsp), %rdi
jmp 0x5815
jmp 0x582a
movq %rax, %rbx
movq 0x90(%rsp), %rdi
cmpq %r15, %rdi
je 0x582d
callq 0x21b0
jmp 0x582d
jmp 0x582a
jmp 0x5825
movq %rax, %rbx
jmp 0x584b
movq %rax, %rbx
leaq 0x556c(%rip), %rax      # 0xada0
leaq 0x58(%rsp), %rcx
movq %rax, -0x40(%rcx)
movq -0x10(%rcx), %rdi
cmpq %rcx, %rdi
je 0x584b
callq 0x21b0
leaq 0xb0(%rsp), %rdi
callq 0x7042
movq %rbx, %rdi
callq 0x22b0