// File: /workspace/github_cpp_makefile_star2_O2/joraso[P]Glassius/Protocol.cpp
// Function: Protocol::SzamelTest(double, double, int, Stopwatch*)
void Protocol::SzamelTest(double Temp, double relax, int record,
                               Stopwatch* timer){

    std::cout <<"\n"<< "Testing Szamel Brownian 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();

    Brownian brownian(&System, Temp, 1.0, 0.00005, record);
    brownian.SetEnergyFile("Data/Equilibration.csv");

    std::cout << "\n" << "Equilibrating at T = " << Temp << std::endl;
    std::cout << "Running for t = " << relax << std::endl;
    std::cout << "Timestep = " << brownian.Getdt() << std::endl;
    std::cout << "Steps = " << relax/brownian.Getdt() << std::endl;
    std::cout << "Recording every = " << brownian.GetRecord() << std::endl;
    brownian.Run(relax);
    timer->StampComplete();
 
    std::cout << "\n" << "Begining Production Run" << std::endl;
    std::cout << "Running for t = " << 1.5*relax << std::endl;
    std::cout << "Timestep = " << brownian.Getdt() << std::endl;
    std::cout << "Steps = " << (1.5*relax)/brownian.Getdt() << std::endl;
    std::cout << "Recording every = " << brownian.GetRecord() << std::endl;
    brownian.SetTime(0);
    brownian.SetEnergyFile("Data/Energies.csv");
    brownian.RecordTrajectory(true);
    brownian.Run(1.5*relax);
    timer->StampComplete();
    
    return;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x218, %rsp            # imm = 0x218
movq %rsi, %rbx
movl %edi, %ebp
movsd %xmm1, 0x10(%rsp)
movsd %xmm0, 0x18(%rsp)
movq 0x44b3(%rip), %r14      # 0x8fd0
leaq 0x17bc(%rip), %r15      # 0x62e0
movq %r14, %rdi
movq %r15, %rsi
callq 0x2150
leaq 0x19ad(%rip), %rsi      # 0x64e3
movq %rax, %rdi
callq 0x2150
movq %rax, %rdi
movq %r15, %rsi
callq 0x2150
movq %rax, %rdi
callq 0x20c0
leaq 0x17ac(%rip), %rsi      # 0x6304
movq %r14, %rdi
callq 0x2150
movq %rax, %rdi
callq 0x20c0
leaq 0x17b6(%rip), %rsi      # 0x6325
movq %r14, %rdi
callq 0x2150
movq %rax, %rdi
movsd 0x10(%rsp), %xmm0
callq 0x21c0
movq %rax, %rdi
callq 0x20c0
leaq 0x17a4(%rip), %rsi      # 0x6338
movq %r14, %rdi
callq 0x2150
movsd 0x16dc(%rip), %xmm0     # 0x6280
movq %rax, %rdi
callq 0x21c0
movq %rax, %rdi
callq 0x20c0
leaq 0x1788(%rip), %rsi      # 0x6343
movq %r14, %rdi
callq 0x2150
movq %rax, %rdi
callq 0x20c0
movq %r14, %rdi
movq %r15, %rsi
callq 0x2150
leaq 0x1776(%rip), %rsi      # 0x6353
movq %rax, %rdi
callq 0x2150
movq %rax, %rdi
callq 0x20c0
leaq 0x188(%rsp), %rdi
movsd 0x168b(%rip), %xmm1     # 0x6288
movsd 0x168b(%rip), %xmm2     # 0x6290
movsd 0x1673(%rip), %xmm0     # 0x6280
callq 0x5646
movq %rbx, %rdi
callq 0x294a
movq 0x43af(%rip), %rdi      # 0x8fd0
leaq 0x16b8(%rip), %rsi      # 0x62e0
callq 0x2150
leaq 0x1734(%rip), %rsi      # 0x6368
movq %rax, %rdi
callq 0x2150
movq %rax, %rdi
callq 0x20c0
leaq 0x130(%rsp), %rdi
leaq 0x188(%rsp), %rsi
movsd 0x162c(%rip), %xmm0     # 0x6288
movsd 0x165c(%rip), %xmm1     # 0x62c0
movl %ebp, %edx
callq 0x56ba
leaq 0x17eb(%rip), %rsi      # 0x645d
leaq 0x60(%rsp), %rdi
leaq 0x80(%rsp), %rdx
callq 0x2090
leaq 0x160(%rsp), %rdi
leaq 0x60(%rsp), %rsi
callq 0x20e0
leaq 0x60(%rsp), %rdi
callq 0x20a0
movq %rbx, %rdi
callq 0x294a
movq 0x4321(%rip), %rdi      # 0x8fd0
leaq 0x162a(%rip), %rsi      # 0x62e0
callq 0x2150
leaq 0x17b2(%rip), %rsi      # 0x6474
movq %rax, %rdi
callq 0x2150
movq %rax, %rdi
callq 0x20c0
movq 0x42f7(%rip), %rdi      # 0x8fd0
leaq 0x17a6(%rip), %rsi      # 0x6486
callq 0x2150
movq %rax, %rdi
callq 0x20c0
movq 0x42dc(%rip), %rdi      # 0x8fd0
leaq 0x1726(%rip), %rsi      # 0x6421
callq 0x2150
movsd 0x148(%rsp), %xmm0
movq %rax, %rdi
callq 0x21c0
movq %rax, %rdi
callq 0x20c0
movq 0x42b0(%rip), %rdi      # 0x8fd0
leaq 0x1772(%rip), %rsi      # 0x6499
callq 0x2150
movq %rax, %rdi
callq 0x20c0
movq 0x4295(%rip), %rdi      # 0x8fd0
leaq 0x166c(%rip), %rsi      # 0x63ae
callq 0x2150
movl 0x158(%rsp), %esi
movq %rax, %rdi
callq 0x21e0
movq %rax, %rdi
callq 0x20c0
movq 0x426b(%rip), %rdi      # 0x8fd0
leaq 0x173a(%rip), %rsi      # 0x64a6
callq 0x2150
movq %rax, %rdi
callq 0x20c0
leaq 0x130(%rsp), %rdi
movsd 0x153f(%rip), %xmm0     # 0x62c8
movl $0x1f4, %esi            # imm = 0x1F4
callq 0x3968
movq %rbx, %rdi
callq 0x294a
leaq 0x80(%rsp), %rdi
leaq 0x188(%rsp), %rsi
movsd 0x12a5(%rip), %xmm1     # 0x6058
movsd 0x1515(%rip), %xmm2     # 0x62d0
movsd 0x18(%rsp), %xmm0
movl %ebp, %edx
callq 0x570c
leaq 0x168e(%rip), %rsi      # 0x645d
leaq 0x40(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x2090
leaq 0xb0(%rsp), %r14
leaq 0x40(%rsp), %rsi
movq %r14, %rdi
callq 0x20e0
leaq 0x40(%rsp), %rdi
callq 0x20a0
movq 0x41cc(%rip), %rdi      # 0x8fd0
leaq 0x14d5(%rip), %rsi      # 0x62e0
callq 0x2150
leaq 0x15cb(%rip), %rsi      # 0x63e2
movq %rax, %rdi
callq 0x2150
movq %rax, %rdi
movsd 0x18(%rsp), %xmm0
callq 0x21c0
movq %rax, %rdi
callq 0x20c0
movq 0x4194(%rip), %rdi      # 0x8fd0
leaq 0x15b5(%rip), %rsi      # 0x63f8
callq 0x2150
movq %rax, %rdi
movsd 0x10(%rsp), %xmm0
callq 0x21c0
movq %rax, %rdi
callq 0x20c0
movq 0x416b(%rip), %rdi      # 0x8fd0
leaq 0x15b5(%rip), %rsi      # 0x6421
callq 0x2150
movsd 0x98(%rsp), %xmm0
movq %rax, %rdi
callq 0x21c0
movq %rax, %rdi
callq 0x20c0
movq 0x413f(%rip), %rdi      # 0x8fd0
leaq 0x1630(%rip), %rsi      # 0x64c8
callq 0x2150
movsd 0x10(%rsp), %xmm0
divsd 0x98(%rsp), %xmm0
movq %rax, %rdi
callq 0x21c0
movq %rax, %rdi
callq 0x20c0
movq 0x410d(%rip), %rdi      # 0x8fd0
leaq 0x14e4(%rip), %rsi      # 0x63ae
callq 0x2150
movl 0xa8(%rsp), %esi
movq %rax, %rdi
callq 0x21e0
movq %rax, %rdi
callq 0x20c0
leaq 0x80(%rsp), %rdi
movsd 0x10(%rsp), %xmm0
callq 0x3b24
movq %rbx, %rdi
callq 0x294a
movq 0x40c8(%rip), %rdi      # 0x8fd0
leaq 0x13d1(%rip), %rsi      # 0x62e0
callq 0x2150
leaq 0x14ee(%rip), %rsi      # 0x6409
movq %rax, %rdi
callq 0x2150
movq %rax, %rdi
callq 0x20c0
movq 0x409e(%rip), %rdi      # 0x8fd0
leaq 0x14bf(%rip), %rsi      # 0x63f8
callq 0x2150
movsd 0x10(%rsp), %xmm0
mulsd 0x11c4(%rip), %xmm0     # 0x6110
movq %rax, %rdi
movsd %xmm0, 0x10(%rsp)
callq 0x21c0
movq %rax, %rdi
callq 0x20c0
movq 0x4067(%rip), %rdi      # 0x8fd0
leaq 0x14b1(%rip), %rsi      # 0x6421
callq 0x2150
movsd 0x98(%rsp), %xmm0
movq %rax, %rdi
callq 0x21c0
movq %rax, %rdi
callq 0x20c0
movq 0x403b(%rip), %rdi      # 0x8fd0
leaq 0x152c(%rip), %rsi      # 0x64c8
callq 0x2150
movsd 0x10(%rsp), %xmm0
divsd 0x98(%rsp), %xmm0
movq %rax, %rdi
callq 0x21c0
movq %rax, %rdi
callq 0x20c0
movq 0x4009(%rip), %rdi      # 0x8fd0
leaq 0x13e0(%rip), %rsi      # 0x63ae
callq 0x2150
movl 0xa8(%rsp), %esi
movq %rax, %rdi
callq 0x21e0
movq %rax, %rdi
callq 0x20c0
movq 0x88(%rsp), %rax
andq $0x0, 0x70(%rax)
leaq 0x14d3(%rip), %rsi      # 0x64d1
leaq 0x20(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x2090
leaq 0x20(%rsp), %rsi
movq %r14, %rdi
callq 0x20e0
leaq 0x20(%rsp), %rdi
callq 0x20a0
leaq 0x80(%rsp), %rdi
movb $0x1, 0x50(%rdi)
movsd 0x10(%rsp), %xmm0
callq 0x3b24
movq %rbx, %rdi
callq 0x294a
leaq 0x80(%rsp), %rdi
callq 0x57ba
leaq 0x130(%rsp), %rdi
callq 0x56f8
leaq 0x188(%rsp), %rdi
callq 0x589c
addq $0x218, %rsp            # imm = 0x218
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
jmp 0x508c
jmp 0x50b4
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x20a0
jmp 0x50b7
jmp 0x50b4
jmp 0x50af
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0x20a0
jmp 0x50c4
jmp 0x50af
jmp 0x50aa
movq %rax, %rbx
jmp 0x50d1
movq %rax, %rbx
jmp 0x50c4
movq %rax, %rbx
leaq 0x80(%rsp), %rdi
callq 0x57ba
leaq 0x130(%rsp), %rdi
callq 0x56f8
leaq 0x188(%rsp), %rdi
callq 0x589c
movq %rbx, %rdi
callq 0x2200