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

    std::cout <<"\n"<< "Diffusion Testing Brownian Integrator" <<"\n"<< std::endl;
    
    double rho = 1000 / (9.4*9.4*9.4);
    //double rho = 1;
    
    std::cout << "\n" << "Setting up System..." << std::endl;
    Free System(rho, Temp, 10);
    timer->StampComplete();
    
    std::cout << "\n" << "Setting up Simulation..." << std::endl;
    Brownian Simulation(&System, 1.0, 1.0, 0.00005, 1);
    timer->StampComplete();
    
    std::cout << "\n" << "Begining Production Run" << std::endl;
    std::cout << "Using Parameters:" << std::endl;
    double dt = Simulation.Getdt();
    std::cout << "Timestep = " << dt << std::endl;
    Simulation.Propigate();
    int Npoints = 100;
    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 $0x150, %rsp            # imm = 0x150
movq %rdi, %rbx
movsd %xmm1, 0x10(%rsp)
movsd %xmm0, 0x8(%rsp)
movq 0x46f3(%rip), %r14      # 0xafd8
leaq 0x19f4(%rip), %r15      # 0x82e0
movl $0x1, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x21e0
leaq 0x1c3c(%rip), %rsi      # 0x853f
movl $0x25, %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
movl $0x1, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x21e0
leaq 0x19f5(%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 0xc8(%rsp), %rdi
movsd 0x18de(%rip), %xmm0     # 0x8280
movsd 0x18e6(%rip), %xmm2     # 0x8290
movsd 0x8(%rsp), %xmm1
callq 0x700c
movq %rbx, %rdi
callq 0x2b8a
movq 0x4614(%rip), %rdi      # 0xafd8
leaq 0x1915(%rip), %rsi      # 0x82e0
movl $0x1, %edx
callq 0x21e0
movq 0x45fc(%rip), %r14      # 0xafd8
leaq 0x1985(%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 0x45ca(%rip), %rdi      # 0xafd8
callq 0x2040
movq %rax, %rdi
callq 0x2120
leaq 0x18(%rsp), %rdi
leaq 0xc8(%rsp), %rsi
movsd 0x1628(%rip), %xmm0     # 0x8058
movsd 0x1898(%rip), %xmm2     # 0x82d0
movapd %xmm0, %xmm1
movl $0x1, %edx
callq 0x6e3c
movq %rbx, %rdi
callq 0x2b8a
movq 0x4583(%rip), %rdi      # 0xafd8
leaq 0x1884(%rip), %rsi      # 0x82e0
movl $0x1, %edx
callq 0x21e0
movq 0x456b(%rip), %r14      # 0xafd8
leaq 0x1995(%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 0x4539(%rip), %rdi      # 0xafd8
callq 0x2040
movq %rax, %rdi
callq 0x2120
movq 0x4525(%rip), %r14      # 0xafd8
leaq 0x184a(%rip), %rsi      # 0x8304
movl $0x11, %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 0x44f3(%rip), %rdi      # 0xafd8
callq 0x2040
movq %rax, %rdi
callq 0x2120
movsd 0x30(%rsp), %xmm0
movsd %xmm0, 0x8(%rsp)
movq 0x44d3(%rip), %rdi      # 0xafd8
leaq 0x1915(%rip), %rsi      # 0x8421
movl $0xb, %edx
callq 0x21e0
movq 0x44bb(%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
leaq 0x18(%rsp), %rdi
callq 0x4428
movq 0x4475(%rip), %rdi      # 0xafd8
leaq 0x18c3(%rip), %rsi      # 0x842d
movl $0x14, %edx
callq 0x21e0
movq 0x445d(%rip), %rdi      # 0xafd8
movl $0x64, %esi
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 0x8(%rsp), %xmm1
mulsd 0x171b(%rip), %xmm1     # 0x82d8
movsd 0x10(%rsp), %xmm0
divsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
movl %eax, 0x40(%rsp)
movq 0x4402(%rip), %rdi      # 0xafd8
leaq 0x17d1(%rip), %rsi      # 0x83ae
movl $0x12, %edx
callq 0x21e0
movl 0x40(%rsp), %esi
movq 0x43e6(%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 0x18(%rsp), %rdi
movsd 0x10(%rsp), %xmm0
callq 0x3fc6
movq %rbx, %rdi
callq 0x2b8a
leaq 0x40f0(%rip), %rax      # 0xad30
addq $0x10, %rax
leaq 0xa0(%rsp), %rdi
movq %rax, -0x88(%rdi)
callq 0x300a
leaq 0x90(%rsp), %rdi
callq 0x300a
leaq 0x80(%rsp), %rbx
movq %rbx, %rdi
callq 0x300a
leaq 0x4124(%rip), %rax      # 0xada0
movq %rax, -0x68(%rbx)
movq -0x38(%rbx), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x6c93
callq 0x21b0
leaq 0x40ee(%rip), %rax      # 0xad88
leaq 0x108(%rsp), %rdi
movq %rax, -0x40(%rdi)
callq 0x300a
leaq 0xf8(%rsp), %rdi
callq 0x300a
leaq 0xe8(%rsp), %rdi
callq 0x300a
addq $0x150, %rsp            # imm = 0x150
popq %rbx
popq %r14
popq %r15
retq
jmp 0x6cd8
jmp 0x6cdf
jmp 0x6cdf
movq %rax, %rbx
jmp 0x6cec
jmp 0x6cdf
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x6f68
leaq 0xc8(%rsp), %rdi
callq 0x7060
movq %rbx, %rdi
callq 0x22b0
nop