// File: /workspace/github_cpp_makefile_star2_O3/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 %r12
pushq %rbx
subq $0xf8, %rsp
movq %rdi, %rbx
movsd %xmm1, 0x8(%rsp)
movsd %xmm0, (%rsp)
movq 0x69bd(%rip), %r14      # 0xafd8
leaq 0x3cbe(%rip), %r15      # 0x82e0
movl $0x1, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x21e0
leaq 0x3ca9(%rip), %rsi      # 0x82e2
movl $0x21, %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 0x3c80(%rip), %rsi      # 0x8304
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 0x3c57(%rip), %rsi      # 0x8316
movl $0xe, %edx
movq %r14, %rdi
callq 0x21e0
movq %r14, %rdi
movsd (%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 0x3c1b(%rip), %rsi      # 0x8325
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 0x3be2(%rip), %rsi      # 0x8338
movl $0xa, %edx
movq %r14, %rdi
callq 0x21e0
movsd 0x3b15(%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 0x3b9f(%rip), %rsi      # 0x8343
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 0x3b64(%rip), %rsi      # 0x8353
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 0x68(%rsp), %rdi
movsd 0x3a58(%rip), %xmm1     # 0x8288
movsd 0x3a58(%rip), %xmm2     # 0x8290
movsd 0x3a40(%rip), %xmm0     # 0x8280
callq 0x6d02
movq %rbx, %rdi
callq 0x2b8a
movq 0x6784(%rip), %rdi      # 0xafd8
leaq 0x3a85(%rip), %rsi      # 0x82e0
movl $0x1, %edx
callq 0x21e0
movq 0x676c(%rip), %r14      # 0xafd8
leaq 0x3af5(%rip), %rsi      # 0x8368
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 0x673a(%rip), %rdi      # 0xafd8
callq 0x2040
movq %rax, %rdi
callq 0x2120
leaq 0x10(%rsp), %rdi
leaq 0x68(%rsp), %rsi
movsd 0x39cb(%rip), %xmm0     # 0x8288
movsd 0x39d3(%rip), %xmm1     # 0x8298
movl $0xa, %edx
callq 0x6d7a
movq %rbx, %rdi
callq 0x2b8a
movq 0x66fa(%rip), %rdi      # 0xafd8
leaq 0x39fb(%rip), %rsi      # 0x82e0
movl $0x1, %edx
callq 0x21e0
movq 0x66e2(%rip), %r14      # 0xafd8
leaq 0x3a84(%rip), %rsi      # 0x8381
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 0x66b0(%rip), %rdi      # 0xafd8
callq 0x2040
movq %rax, %rdi
callq 0x2120
movq 0x669c(%rip), %r14      # 0xafd8
leaq 0x3a57(%rip), %rsi      # 0x839a
movl $0x13, %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 0x666a(%rip), %rdi      # 0xafd8
callq 0x2040
movq %rax, %rdi
callq 0x2120
movq 0x6656(%rip), %rdi      # 0xafd8
leaq 0x3a25(%rip), %rsi      # 0x83ae
movl $0x12, %edx
callq 0x21e0
movl 0x38(%rsp), %esi
movq 0x663a(%rip), %rdi      # 0xafd8
callq 0x2290
movq %rax, %r14
movq (%rax), %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
movq 0x6604(%rip), %r14      # 0xafd8
leaq 0x39e6(%rip), %rsi      # 0x83c1
movl $0x20, %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 0x65d2(%rip), %rdi      # 0xafd8
callq 0x2040
movq %rax, %rdi
callq 0x2120
leaq 0x10(%rsp), %rdi
movsd 0x3880(%rip), %xmm0     # 0x82a0
movl $0x32, %esi
callq 0x3d98
movq %rbx, %rdi
callq 0x2b8a
movq 0x659f(%rip), %rdi      # 0xafd8
leaq 0x38a0(%rip), %rsi      # 0x82e0
movl $0x1, %edx
callq 0x21e0
movq 0x6587(%rip), %rdi      # 0xafd8
leaq 0x398a(%rip), %rsi      # 0x83e2
movl $0x15, %edx
callq 0x21e0
movq 0x656f(%rip), %rdi      # 0xafd8
movsd (%rsp), %xmm0
callq 0x2260
movq %rax, %r14
movq (%rax), %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
movq 0x6534(%rip), %rdi      # 0xafd8
leaq 0x394d(%rip), %rsi      # 0x83f8
movl $0x10, %edx
callq 0x21e0
movq 0x651c(%rip), %rdi      # 0xafd8
movsd 0x8(%rsp), %xmm0
callq 0x2260
movq %rax, %r14
movq (%rax), %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
movq 0x64e0(%rip), %rdi      # 0xafd8
leaq 0x38af(%rip), %rsi      # 0x83ae
movl $0x12, %edx
callq 0x21e0
movl 0x38(%rsp), %esi
movq 0x64c4(%rip), %rdi      # 0xafd8
callq 0x2290
movq %rax, %r14
movq (%rax), %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
movq 0x648e(%rip), %r14      # 0xafd8
leaq 0x3870(%rip), %rsi      # 0x83c1
movl $0x20, %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 0x645c(%rip), %rdi      # 0xafd8
callq 0x2040
movq %rax, %rdi
callq 0x2120
movsd (%rsp), %xmm0
movsd %xmm0, 0x20(%rsp)
leaq 0x68(%rsp), %rdi
callq 0x3636
leaq 0x10(%rsp), %rdi
movsd 0x8(%rsp), %xmm0
movl $0x32, %esi
callq 0x3d98
movq %rbx, %rdi
callq 0x2b8a
movq 0x6416(%rip), %rdi      # 0xafd8
leaq 0x3717(%rip), %rsi      # 0x82e0
movl $0x1, %edx
callq 0x21e0
movq 0x63fe(%rip), %r14      # 0xafd8
leaq 0x3828(%rip), %rsi      # 0x8409
movl $0x17, %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 0x63cc(%rip), %rdi      # 0xafd8
callq 0x2040
movq %rax, %rdi
callq 0x2120
movq 0x63b8(%rip), %rdi      # 0xafd8
leaq 0x37d1(%rip), %rsi      # 0x83f8
movl $0x10, %edx
callq 0x21e0
movq 0x63a0(%rip), %rdi      # 0xafd8
movsd 0x8(%rsp), %xmm0
callq 0x2260
movq %rax, %r14
movq (%rax), %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
movsd 0x33e3(%rip), %xmm0     # 0x8058
ucomisd (%rsp), %xmm0
jbe 0x4c95
movabsq $0x3f947ae147ae147b, %rax # imm = 0x3F947AE147AE147B
movq %rax, 0x28(%rsp)
movsd 0x3615(%rip), %xmm0     # 0x82a8
jmp 0x4c9b
movsd 0x28(%rsp), %xmm0
movsd %xmm0, (%rsp)
movq 0x6331(%rip), %rdi      # 0xafd8
leaq 0x3773(%rip), %rsi      # 0x8421
movl $0xb, %edx
callq 0x21e0
movq 0x6319(%rip), %rdi      # 0xafd8
movsd (%rsp), %xmm0
callq 0x2260
movq %rax, %r14
movq (%rax), %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
movq 0x62de(%rip), %rdi      # 0xafd8
leaq 0x372c(%rip), %rsi      # 0x842d
movl $0x14, %edx
callq 0x21e0
movq 0x62c6(%rip), %rdi      # 0xafd8
movl $0x2710, %esi           # imm = 0x2710
callq 0x2290
movq %rax, %r14
movq (%rax), %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
movsd (%rsp), %xmm1
mulsd 0x355d(%rip), %xmm1     # 0x82b0
movsd 0x8(%rsp), %xmm0
divsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
movl %eax, 0x38(%rsp)
movq 0x626c(%rip), %rdi      # 0xafd8
leaq 0x363b(%rip), %rsi      # 0x83ae
movl $0x12, %edx
callq 0x21e0
movl 0x38(%rsp), %esi
movq 0x6250(%rip), %rdi      # 0xafd8
callq 0x2290
movq %rax, %r14
movq (%rax), %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 0x10(%rsp), %rdi
movsd 0x8(%rsp), %xmm0
callq 0x3fc6
movq %rbx, %rdi
callq 0x2b8a
leaq 0x5fca(%rip), %rax      # 0xada0
leaq 0x50(%rsp), %rcx
movq %rax, -0x40(%rcx)
movq -0x10(%rcx), %rdi
cmpq %rcx, %rdi
je 0x4ded
callq 0x21b0
leaq 0x5f94(%rip), %rax      # 0xad88
leaq 0xa8(%rsp), %rdi
movq %rax, -0x40(%rdi)
callq 0x300a
leaq 0x98(%rsp), %rdi
callq 0x300a
leaq 0x88(%rsp), %rdi
callq 0x300a
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0x4e34
jmp 0x4e3b
jmp 0x4e3b
movq %rax, %rbx
jmp 0x4e5c
jmp 0x4e3b
movq %rax, %rbx
leaq 0x5f5b(%rip), %rax      # 0xada0
leaq 0x50(%rsp), %rcx
movq %rax, -0x40(%rcx)
movq -0x10(%rcx), %rdi
cmpq %rcx, %rdi
je 0x4e5c
callq 0x21b0
leaq 0x68(%rsp), %rdi
callq 0x7060
movq %rbx, %rdi
callq 0x22b0