// File: /workspace/github_cpp_makefile_star2_O2/joraso[P]Glassius/Protocol.cpp
// Function: Protocol::KobAndersonReplication(double, double, Stopwatch*)
void Protocol::KobAndersonReplication(double Temp, double relax, Stopwatch* timer){
    /* Replication run of the 1995 Kob-Anderson paper. */
    
    std::cout <<"\n"<< "Replication of 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 Simulation(&System, 5, 0.01, 10);
    timer->StampComplete();
    
    
    std::cout << "\n" << "Equilibrating at T = 5.0" << std::endl;
     std::cout << "Running for t = 100" << std::endl;
    std::cout << "Recording every = " << Simulation.GetRecord() << std::endl;
    std::cout << "Thermostating every 50 timesteps" << std::endl;
    Simulation.Equilibrate(1000, 50);
    timer->StampComplete();
    
    std::cout << "\n" << "Equilibrating at T = " << Temp << std::endl;
    std::cout << "Running for t = " << relax << std::endl;
    std::cout << "Recording every = " << Simulation.GetRecord() << std::endl;
    std::cout << "Thermostating every 50 timesteps" << std::endl;
    Simulation.SetTemp(Temp);
    System.Thermalize(Temp);
    Simulation.Equilibrate(relax, 50);
    timer->StampComplete();
    
    std::cout << "\n" << "Begining Production Run" << std::endl;
    std::cout << "Running for t = " << relax << std::endl;
    if(Temp<1.0){
        Simulation.Setdt(0.02);
    }
    double dt = Simulation.Getdt();
    std::cout << "Timestep = " << dt << std::endl;
    int Npoints = 10000;
    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:
pushq %r15
pushq %r14
pushq %rbx
subq $0x100, %rsp            # imm = 0x100
movq %rdi, %rbx
movsd %xmm1, 0x10(%rsp)
movsd %xmm0, 0x8(%rsp)
movq 0x4ec2(%rip), %r14      # 0x8fd0
leaq 0x21cb(%rip), %r15      # 0x62e0
movq %r14, %rdi
movq %r15, %rsi
callq 0x2150
leaq 0x21bb(%rip), %rsi      # 0x62e2
movq %rax, %rdi
callq 0x2150
movq %rax, %rdi
movq %r15, %rsi
callq 0x2150
movq %rax, %rdi
callq 0x20c0
leaq 0x21bb(%rip), %rsi      # 0x6304
movq %r14, %rdi
callq 0x2150
movq %rax, %rdi
callq 0x20c0
leaq 0x21b6(%rip), %rsi      # 0x6316
movq %r14, %rdi
callq 0x2150
movq %rax, %rdi
movsd 0x8(%rsp), %xmm0
callq 0x21c0
movq %rax, %rdi
callq 0x20c0
leaq 0x21a0(%rip), %rsi      # 0x6325
movq %r14, %rdi
callq 0x2150
movq %rax, %rdi
movsd 0x10(%rsp), %xmm0
callq 0x21c0
movq %rax, %rdi
callq 0x20c0
leaq 0x218e(%rip), %rsi      # 0x6338
movq %r14, %rdi
callq 0x2150
movsd 0x20c6(%rip), %xmm0     # 0x6280
movq %rax, %rdi
callq 0x21c0
movq %rax, %rdi
callq 0x20c0
leaq 0x2172(%rip), %rsi      # 0x6343
movq %r14, %rdi
callq 0x2150
movq %rax, %rdi
callq 0x20c0
movq %r14, %rdi
movq %r15, %rsi
callq 0x2150
leaq 0x2160(%rip), %rsi      # 0x6353
movq %rax, %rdi
callq 0x2150
movq %rax, %rdi
callq 0x20c0
leaq 0x70(%rsp), %rdi
movsd 0x2078(%rip), %xmm1     # 0x6288
movsd 0x2078(%rip), %xmm2     # 0x6290
movsd 0x2060(%rip), %xmm0     # 0x6280
callq 0x5646
movq %rbx, %rdi
callq 0x294a
movq 0x4d9c(%rip), %rdi      # 0x8fd0
leaq 0x20a5(%rip), %rsi      # 0x62e0
callq 0x2150
leaq 0x2121(%rip), %rsi      # 0x6368
movq %rax, %rdi
callq 0x2150
movq %rax, %rdi
callq 0x20c0
leaq 0x18(%rsp), %rdi
leaq 0x70(%rsp), %rsi
movsd 0x201f(%rip), %xmm0     # 0x6288
movsd 0x2027(%rip), %xmm1     # 0x6298
pushq $0xa
popq %rdx
callq 0x56ba
movq %rbx, %rdi
callq 0x294a
movq 0x4d48(%rip), %rdi      # 0x8fd0
leaq 0x2051(%rip), %rsi      # 0x62e0
callq 0x2150
leaq 0x20e6(%rip), %rsi      # 0x6381
movq %rax, %rdi
callq 0x2150
movq %rax, %rdi
callq 0x20c0
movq 0x4d1e(%rip), %rdi      # 0x8fd0
leaq 0x20e1(%rip), %rsi      # 0x639a
callq 0x2150
movq %rax, %rdi
callq 0x20c0
movq 0x4d03(%rip), %rdi      # 0x8fd0
leaq 0x20da(%rip), %rsi      # 0x63ae
callq 0x2150
movl 0x40(%rsp), %esi
movq %rax, %rdi
callq 0x21e0
movq %rax, %rdi
callq 0x20c0
movq 0x4cdc(%rip), %rdi      # 0x8fd0
leaq 0x20c6(%rip), %rsi      # 0x63c1
callq 0x2150
movq %rax, %rdi
callq 0x20c0
leaq 0x18(%rsp), %rdi
movsd 0x1f8b(%rip), %xmm0     # 0x62a0
pushq $0x32
popq %rsi
callq 0x3968
movq %rbx, %rdi
callq 0x294a
movq 0x4ca4(%rip), %rdi      # 0x8fd0
leaq 0x1fad(%rip), %rsi      # 0x62e0
callq 0x2150
leaq 0x20a3(%rip), %rsi      # 0x63e2
movq %rax, %rdi
callq 0x2150
movq %rax, %rdi
movsd 0x8(%rsp), %xmm0
callq 0x21c0
movq %rax, %rdi
callq 0x20c0
movq 0x4c6c(%rip), %rdi      # 0x8fd0
leaq 0x208d(%rip), %rsi      # 0x63f8
callq 0x2150
movq %rax, %rdi
movsd 0x10(%rsp), %xmm0
callq 0x21c0
movq %rax, %rdi
callq 0x20c0
movq 0x4c43(%rip), %rdi      # 0x8fd0
leaq 0x201a(%rip), %rsi      # 0x63ae
callq 0x2150
movl 0x40(%rsp), %esi
movq %rax, %rdi
callq 0x21e0
movq %rax, %rdi
callq 0x20c0
movq 0x4c1c(%rip), %rdi      # 0x8fd0
leaq 0x2006(%rip), %rsi      # 0x63c1
callq 0x2150
movq %rax, %rdi
callq 0x20c0
movsd 0x8(%rsp), %xmm0
movsd %xmm0, 0x28(%rsp)
leaq 0x70(%rsp), %rdi
callq 0x321c
leaq 0x18(%rsp), %rdi
pushq $0x32
popq %rsi
movsd 0x10(%rsp), %xmm0
callq 0x3968
movq %rbx, %rdi
callq 0x294a
movq 0x4bd0(%rip), %rdi      # 0x8fd0
leaq 0x1ed9(%rip), %rsi      # 0x62e0
callq 0x2150
leaq 0x1ff6(%rip), %rsi      # 0x6409
movq %rax, %rdi
callq 0x2150
movq %rax, %rdi
callq 0x20c0
movq 0x4ba6(%rip), %rdi      # 0x8fd0
leaq 0x1fc7(%rip), %rsi      # 0x63f8
callq 0x2150
movq %rax, %rdi
movsd 0x10(%rsp), %xmm0
callq 0x21c0
movq %rax, %rdi
callq 0x20c0
movsd 0x1c04(%rip), %xmm0     # 0x6058
ucomisd 0x8(%rsp), %xmm0
jbe 0x4475
movabsq $0x3f947ae147ae147b, %rax # imm = 0x3F947AE147AE147B
movq %rax, 0x30(%rsp)
movsd 0x1e35(%rip), %xmm0     # 0x62a8
jmp 0x447b
movsd 0x30(%rsp), %xmm0
movsd %xmm0, 0x8(%rsp)
movq 0x4b48(%rip), %rdi      # 0x8fd0
leaq 0x1f92(%rip), %rsi      # 0x6421
callq 0x2150
movq %rax, %rdi
movsd 0x8(%rsp), %xmm0
callq 0x21c0
movq %rax, %rdi
callq 0x20c0
movq 0x4b1f(%rip), %rdi      # 0x8fd0
leaq 0x1f75(%rip), %rsi      # 0x642d
callq 0x2150
movq %rax, %rdi
movl $0x2710, %esi           # imm = 0x2710
callq 0x21e0
movq %rax, %rdi
callq 0x20c0
movsd 0x8(%rsp), %xmm1
mulsd 0x1dd0(%rip), %xmm1     # 0x62b0
movsd 0x10(%rsp), %xmm0
divsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
movl %eax, 0x40(%rsp)
movq 0x4ad7(%rip), %rdi      # 0x8fd0
leaq 0x1eae(%rip), %rsi      # 0x63ae
callq 0x2150
movl 0x40(%rsp), %esi
movq %rax, %rdi
callq 0x21e0
movq %rax, %rdi
callq 0x20c0
leaq 0x18(%rsp), %rdi
movsd 0x10(%rsp), %xmm0
callq 0x3b24
movq %rbx, %rdi
callq 0x294a
leaq 0x18(%rsp), %rdi
callq 0x56f8
leaq 0x70(%rsp), %rdi
callq 0x589c
addq $0x100, %rsp            # imm = 0x100
popq %rbx
popq %r14
popq %r15
retq
jmp 0x4558
jmp 0x455f
jmp 0x455f
movq %rax, %rbx
jmp 0x456c
jmp 0x455f
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x56f8
leaq 0x70(%rsp), %rdi
callq 0x589c
movq %rbx, %rdi
callq 0x2200