// File: /workspace/github_cpp_makefile_star2_O1/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 0x4711(%rip), %r14      # 0xafd8
leaq 0x1a0a(%rip), %r15      # 0x82d8
movl $0x1, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x21e0
leaq 0x1c52(%rip), %rsi      # 0x8537
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 0x1a0b(%rip), %rsi      # 0x834b
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 0x18fc(%rip), %xmm0     # 0x8280
movsd 0x1904(%rip), %xmm2     # 0x8290
movsd 0x8(%rsp), %xmm1
callq 0x6fee
movq %rbx, %rdi
callq 0x2b8a
movq 0x4632(%rip), %rdi      # 0xafd8
leaq 0x192b(%rip), %rsi      # 0x82d8
movl $0x1, %edx
callq 0x21e0
movq 0x461a(%rip), %r14      # 0xafd8
leaq 0x199b(%rip), %rsi      # 0x8360
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 0x45e8(%rip), %rdi      # 0xafd8
callq 0x2040
movq %rax, %rdi
callq 0x2120
leaq 0x18(%rsp), %rdi
leaq 0xc8(%rsp), %rsi
movsd 0x1646(%rip), %xmm0     # 0x8058
movsd 0x18ae(%rip), %xmm2     # 0x82c8
movapd %xmm0, %xmm1
movl $0x1, %edx
callq 0x6e1e
movq %rbx, %rdi
callq 0x2b8a
movq 0x45a1(%rip), %rdi      # 0xafd8
leaq 0x189a(%rip), %rsi      # 0x82d8
movl $0x1, %edx
callq 0x21e0
movq 0x4589(%rip), %r14      # 0xafd8
leaq 0x19ab(%rip), %rsi      # 0x8401
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 0x4557(%rip), %rdi      # 0xafd8
callq 0x2040
movq %rax, %rdi
callq 0x2120
movq 0x4543(%rip), %r14      # 0xafd8
leaq 0x1860(%rip), %rsi      # 0x82fc
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 0x4511(%rip), %rdi      # 0xafd8
callq 0x2040
movq %rax, %rdi
callq 0x2120
movsd 0x30(%rsp), %xmm0
movsd %xmm0, 0x8(%rsp)
movq 0x44f1(%rip), %rdi      # 0xafd8
leaq 0x192b(%rip), %rsi      # 0x8419
movl $0xb, %edx
callq 0x21e0
movq 0x44d9(%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 0x4414
movq 0x4493(%rip), %rdi      # 0xafd8
leaq 0x18d9(%rip), %rsi      # 0x8425
movl $0x14, %edx
callq 0x21e0
movq 0x447b(%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 0x1731(%rip), %xmm1     # 0x82d0
movsd 0x10(%rsp), %xmm0
divsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
movl %eax, 0x40(%rsp)
movq 0x4420(%rip), %rdi      # 0xafd8
leaq 0x17e7(%rip), %rsi      # 0x83a6
movl $0x12, %edx
callq 0x21e0
movl 0x40(%rsp), %esi
movq 0x4404(%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 0x3fae
movq %rbx, %rdi
callq 0x2b8a
leaq 0x410e(%rip), %rax      # 0xad30
addq $0x10, %rax
leaq 0xa0(%rsp), %rdi
movq %rax, -0x88(%rdi)
callq 0x3008
leaq 0x90(%rsp), %rdi
callq 0x3008
leaq 0x80(%rsp), %rbx
movq %rbx, %rdi
callq 0x3008
leaq 0x4142(%rip), %rax      # 0xada0
movq %rax, -0x68(%rbx)
movq -0x38(%rbx), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x6c75
callq 0x21b0
leaq 0x410c(%rip), %rax      # 0xad88
leaq 0x108(%rsp), %rdi
movq %rax, -0x40(%rdi)
callq 0x3008
leaq 0xf8(%rsp), %rdi
callq 0x3008
leaq 0xe8(%rsp), %rdi
callq 0x3008
addq $0x150, %rsp            # imm = 0x150
popq %rbx
popq %r14
popq %r15
retq
jmp 0x6cba
jmp 0x6cc1
jmp 0x6cc1
movq %rax, %rbx
jmp 0x6cce
jmp 0x6cc1
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x6f4a
leaq 0xc8(%rsp), %rdi
callq 0x7042
movq %rbx, %rdi
callq 0x22b0
nop