// File: /workspace/github_cpp_makefile_star2_O2/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 0x3bc3(%rip), %r14      # 0x8fd0
leaq 0xecc(%rip), %r15       # 0x62e0
movq %r14, %rdi
movq %r15, %rsi
callq 0x2150
leaq 0x1119(%rip), %rsi      # 0x653f
movq %rax, %rdi
callq 0x2150
movq %rax, %rdi
movq %r15, %rsi
callq 0x2150
movq %rax, %rdi
callq 0x20c0
movq %r14, %rdi
movq %r15, %rsi
callq 0x2150
leaq 0xf00(%rip), %rsi       # 0x6353
movq %rax, %rdi
callq 0x2150
movq %rax, %rdi
callq 0x20c0
leaq 0xc8(%rsp), %rdi
movsd 0xe0d(%rip), %xmm0      # 0x6280
movsd 0xe15(%rip), %xmm2      # 0x6290
movsd 0x8(%rsp), %xmm1
callq 0x5848
movq %rbx, %rdi
callq 0x294a
movq 0x3b3b(%rip), %rdi      # 0x8fd0
leaq 0xe44(%rip), %rsi       # 0x62e0
callq 0x2150
leaq 0xec0(%rip), %rsi       # 0x6368
movq %rax, %rdi
callq 0x2150
movq %rax, %rdi
callq 0x20c0
leaq 0x18(%rsp), %rdi
leaq 0xc8(%rsp), %rsi
movsd 0xb8b(%rip), %xmm0      # 0x6058
movsd 0xdfb(%rip), %xmm2      # 0x62d0
pushq $0x1
popq %rdx
movapd %xmm0, %xmm1
callq 0x570c
movq %rbx, %rdi
callq 0x294a
movq 0x3ae0(%rip), %rdi      # 0x8fd0
leaq 0xde9(%rip), %rsi       # 0x62e0
callq 0x2150
leaq 0xf06(%rip), %rsi       # 0x6409
movq %rax, %rdi
callq 0x2150
movq %rax, %rdi
callq 0x20c0
movq 0x3ab6(%rip), %rdi      # 0x8fd0
leaq 0xde3(%rip), %rsi       # 0x6304
callq 0x2150
movq %rax, %rdi
callq 0x20c0
movsd 0x30(%rsp), %xmm0
movsd %xmm0, 0x8(%rsp)
movq 0x3a8f(%rip), %rdi      # 0x8fd0
leaq 0xed9(%rip), %rsi       # 0x6421
callq 0x2150
movq %rax, %rdi
movsd 0x8(%rsp), %xmm0
callq 0x21c0
movq %rax, %rdi
callq 0x20c0
leaq 0x18(%rsp), %rdi
callq 0x3f18
movq 0x3a5c(%rip), %rdi      # 0x8fd0
leaq 0xeb2(%rip), %rsi       # 0x642d
callq 0x2150
pushq $0x64
popq %rsi
movq %rax, %rdi
callq 0x21e0
movq %rax, %rdi
callq 0x20c0
movsd 0x8(%rsp), %xmm1
mulsd 0xd37(%rip), %xmm1      # 0x62d8
movsd 0x10(%rsp), %xmm0
divsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
movl %eax, 0x40(%rsp)
movq 0x3a16(%rip), %rdi      # 0x8fd0
leaq 0xded(%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 0x57ba
leaq 0xc8(%rsp), %rdi
callq 0x589c
addq $0x150, %rsp            # imm = 0x150
popq %rbx
popq %r14
popq %r15
retq
jmp 0x561c
jmp 0x5623
jmp 0x5623
movq %rax, %rbx
jmp 0x5630
jmp 0x5623
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x57ba
leaq 0xc8(%rsp), %rdi
callq 0x589c
movq %rbx, %rdi
callq 0x2200
nop