// File: /workspace/github_cpp_makefile_star2_O1/dfrodriguezp[P]PiCM-cpp/functions.cc
// Function: boris(std::vector<std::valarray<double>, std::allocator<std::valarray<double>>>&, std::vector<double, std::allocator<double>> const&, std::vector<unsigned int, std::allocator<unsigned int>> const&, std::vector<std::valarray<double>, std::allocator<std::valarray<double>>> const&, std::valarray<double> const&, double const&, unsigned int const&)
void boris(VecArr &velocities,
           const std::vector<Real> &QoverM,
           const std::vector<Int> &moves,
           const VecArr &E, const Array &B,
           const Real &dt, const Int &N)
{
    Array t;
    Real t_2;
    Array s;
    Array v_minus;
    Array v_prime;
    Array v_plus;

    for (Int p = 0; p < N; ++p)
    {
        if (moves.at(p))
        {
            t = 0.5 * QoverM.at(p) * B * dt;
            t_2 = norm(t) * norm(t);
            s = (2.0 * t) / (1.0 + t_2);
            v_minus = velocities.at(p) + 0.5 * QoverM.at(p) * E[p] * dt;
            v_prime = v_minus + cross(v_minus, t);
            v_plus = v_minus + cross(v_prime, s);
            velocities.at(p) = v_plus + 0.5 * QoverM.at(p) * E[p] * dt;
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %r9, 0x70(%rsp)
movq %rcx, 0x80(%rsp)
movq %rdx, 0x98(%rsp)
movq %rsi, 0x78(%rsp)
movq %rdi, 0x88(%rsp)
movq 0xe0(%rsp), %rax
xorl %r12d, %r12d
movq %rax, 0x90(%rsp)
cmpl $0x0, (%rax)
je 0x9ef8
movq %r8, %r14
movq $0x0, 0x10(%rsp)
xorl %ebx, %ebx
xorl %ebp, %ebp
movq $0x0, 0x30(%rsp)
movq $0x0, 0x20(%rsp)
xorl %r13d, %r13d
movq $0x0, 0x50(%rsp)
movq $0x0, 0x28(%rsp)
movq $0x0, 0x8(%rsp)
xorl %r8d, %r8d
movq %r14, 0x48(%rsp)
movl %r12d, %r12d
movq 0x98(%rsp), %rcx
movq (%rcx), %rax
movq 0x8(%rcx), %rdx
subq %rax, %rdx
sarq $0x2, %rdx
cmpq %r12, %rdx
jbe 0x9f68
cmpl $0x0, (%rax,%r12,4)
je 0x9ee2
movq 0x78(%rsp), %rcx
movq (%rcx), %rax
movq 0x8(%rcx), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
cmpq %r12, %rdx
jbe 0x9f9b
movsd (%rax,%r12,8), %xmm1
mulsd 0x1847(%rip), %xmm1     # 0xb018
movq 0x70(%rsp), %rax
movsd (%rax), %xmm2
movq 0x30(%rsp), %rax
cmpq (%r14), %rax
movq %r8, 0x38(%rsp)
jne 0x981d
testq %rax, %rax
je 0x988f
movq 0x8(%r14), %rax
xorl %ecx, %ecx
movq 0x30(%rsp), %r14
movsd (%rax,%rcx,8), %xmm0
mulsd %xmm1, %xmm0
mulsd %xmm2, %xmm0
movsd %xmm0, (%rbp,%rcx,8)
incq %rcx
cmpq %rcx, %r14
jne 0x97fd
movq %rbp, %r15
jmp 0x9897
movsd %xmm2, 0x18(%rsp)
movsd %xmm1, 0x30(%rsp)
movq %r13, (%rsp)
testq %rbp, %rbp
je 0x983a
movq %rbp, %rdi
callq 0x3270
movq %r14, %r13
movq (%r14), %r14
leaq (,%r14,8), %rdi
callq 0x3290
movq %rax, %r15
movq %r14, %rdx
testq %r14, %r14
movsd 0x30(%rsp), %xmm1
movsd 0x18(%rsp), %xmm2
je 0x989e
movq 0x8(%r13), %rax
xorl %ecx, %ecx
movq %rdx, %r14
movq 0x20(%rsp), %rbp
movsd (%rax,%rcx,8), %xmm0
mulsd %xmm1, %xmm0
mulsd %xmm2, %xmm0
movsd %xmm0, (%r15,%rcx,8)
incq %rcx
cmpq %rcx, %r14
jne 0x9872
jmp 0x98a6
movq %rbp, %r15
movq 0x30(%rsp), %r14
movq 0x20(%rsp), %rbp
jmp 0x98aa
movq %rdx, %r14
movq 0x20(%rsp), %rbp
movq (%rsp), %r13
testq %r14, %r14
je 0x98df
movq %r14, %rax
movsd -0x8(%r15,%r14,8), %xmm0
mulsd %xmm0, %xmm0
decq %rax
je 0x98e3
movq %r14, %rax
movsd -0x10(%r15,%rax,8), %xmm1
mulsd %xmm1, %xmm1
addsd %xmm1, %xmm0
decq %rax
cmpq $0x1, %rax
jne 0x98c5
jmp 0x98e3
xorpd %xmm0, %xmm0
ucomisd 0x173d(%rip), %xmm0     # 0xb028
jb 0x98f6
xorps %xmm2, %xmm2
sqrtsd %xmm0, %xmm2
jmp 0x98ff
callq 0x3200
movapd %xmm0, %xmm2
testq %r14, %r14
je 0x9934
movq %r14, %rax
movsd -0x8(%r15,%r14,8), %xmm0
mulsd %xmm0, %xmm0
decq %rax
je 0x9938
movq %r14, %rax
movsd -0x10(%r15,%rax,8), %xmm1
mulsd %xmm1, %xmm1
addsd %xmm1, %xmm0
decq %rax
cmpq $0x1, %rax
jne 0x991a
jmp 0x9938
xorpd %xmm0, %xmm0
ucomisd 0x16e8(%rip), %xmm0     # 0xb028
jb 0x9948
sqrtsd %xmm0, %xmm0
jmp 0x9959
movsd %xmm2, 0x20(%rsp)
callq 0x3200
movsd 0x20(%rsp), %xmm2
mulsd %xmm0, %xmm2
addsd 0x16ab(%rip), %xmm2     # 0xb010
cmpq %r14, %rbp
movq %r14, 0x30(%rsp)
jne 0x9999
testq %rbp, %rbp
je 0x9993
xorl %eax, %eax
movsd (%r15,%rax,8), %xmm0
addsd %xmm0, %xmm0
divsd %xmm2, %xmm0
movsd %xmm0, (%r13,%rax,8)
incq %rax
cmpq %rax, %rbp
jne 0x9976
movq %r13, (%rsp)
jmp 0x99e8
movsd %xmm2, 0x20(%rsp)
testq %r13, %r13
je 0x99ac
movq %r13, %rdi
callq 0x3270
leaq (,%r14,8), %rdi
callq 0x3290
testq %r14, %r14
movsd 0x20(%rsp), %xmm1
movq %rax, (%rsp)
je 0x99e5
xorl %ecx, %ecx
movsd (%r15,%rcx,8), %xmm0
addsd %xmm0, %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, (%rax,%rcx,8)
incq %rcx
cmpq %rcx, %r14
jne 0x99ca
movq %r14, %rbp
movq 0x88(%rsp), %rax
movq (%rax), %r14
movq 0x8(%rax), %rdx
subq %r14, %rdx
sarq $0x4, %rdx
cmpq %r12, %rdx
jbe 0x9f8a
movq %rbp, 0x20(%rsp)
movq 0x78(%rsp), %rcx
movq (%rcx), %rax
movq 0x8(%rcx), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
cmpq %r12, %rdx
jbe 0x9f79
movq %r12, %rsi
shlq $0x4, %rsi
addq %rsi, %r14
movsd (%rax,%r12,8), %xmm1
mulsd 0x15d8(%rip), %xmm1     # 0xb018
movq 0x80(%rsp), %rax
movq (%rax), %rbp
addq %rsi, %rbp
movq 0x70(%rsp), %rax
movsd (%rax), %xmm2
cmpq (%r14), %rbx
movq %rsi, 0xa0(%rsp)
jne 0x9a9f
testq %rbx, %rbx
je 0x9b0b
movq 0x8(%r14), %rax
movq 0x8(%rbp), %rcx
xorl %edx, %edx
movq 0x10(%rsp), %r13
movsd (%rcx,%rdx,8), %xmm0
mulsd %xmm1, %xmm0
mulsd %xmm2, %xmm0
addsd (%rax,%rdx,8), %xmm0
movsd %xmm0, (%r13,%rdx,8)
incq %rdx
cmpq %rdx, %rbx
jne 0x9a7c
jmp 0x9b10
movsd %xmm2, 0x40(%rsp)
movsd %xmm1, 0x18(%rsp)
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x9aba
callq 0x3270
movq (%r14), %rbx
leaq (,%rbx,8), %rdi
callq 0x3290
movq %rax, %r13
testq %rbx, %rbx
movsd 0x18(%rsp), %xmm1
movsd 0x40(%rsp), %xmm2
je 0x9b10
movq 0x8(%r14), %rax
movq 0x8(%rbp), %rcx
xorl %edx, %edx
movsd (%rcx,%rdx,8), %xmm0
mulsd %xmm1, %xmm0
mulsd %xmm2, %xmm0
addsd (%rax,%rdx,8), %xmm0
movsd %xmm0, (%r13,%rdx,8)
incq %rdx
cmpq %rdx, %rbx
jne 0x9ae8
jmp 0x9b10
movq 0x10(%rsp), %r13
movq (%rsp), %rbp
movsd (%r13), %xmm0
movsd %xmm0, 0x10(%rsp)
movsd 0x8(%r13), %xmm0
movsd %xmm0, 0x18(%rsp)
movsd 0x10(%r15), %xmm0
movsd %xmm0, 0x60(%rsp)
movsd 0x10(%r13), %xmm0
movsd %xmm0, 0x40(%rsp)
movsd (%r15), %xmm0
movsd %xmm0, 0x58(%rsp)
movsd 0x8(%r15), %xmm0
movsd %xmm0, 0x68(%rsp)
movl $0x18, %edi
callq 0x3290
movq %rax, %r14
movsd 0x40(%rsp), %xmm3
movapd %xmm3, %xmm0
movsd 0x58(%rsp), %xmm6
mulsd %xmm6, %xmm0
movsd 0x18(%rsp), %xmm2
mulsd %xmm2, %xmm6
movsd 0x60(%rsp), %xmm5
mulsd %xmm5, %xmm2
movsd 0x10(%rsp), %xmm1
mulsd %xmm1, %xmm5
movsd 0x68(%rsp), %xmm4
mulsd %xmm4, %xmm1
subsd %xmm6, %xmm1
subsd %xmm5, %xmm0
mulsd %xmm3, %xmm4
subsd %xmm4, %xmm2
movsd %xmm2, (%rax)
movsd %xmm0, 0x8(%rax)
movsd %xmm1, 0x10(%rax)
movq 0x50(%rsp), %rcx
cmpq %rbx, %rcx
movq %rbp, (%rsp)
jne 0x9bfb
testq %rcx, %rcx
movq 0x28(%rsp), %rdx
je 0x9bf6
xorl %eax, %eax
movsd (%r13,%rax,8), %xmm0
addsd (%r14,%rax,8), %xmm0
movsd %xmm0, (%rdx,%rax,8)
incq %rax
cmpq %rax, %rcx
jne 0x9bdc
movq %rdx, %rbp
jmp 0x9c40
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x9c0a
callq 0x3270
leaq (,%rbx,8), %rdi
callq 0x3290
testq %rbx, %rbx
je 0x9c38
xorl %ecx, %ecx
movsd (%r13,%rcx,8), %xmm0
addsd (%r14,%rcx,8), %xmm0
movsd %xmm0, (%rax,%rcx,8)
incq %rcx
cmpq %rcx, %rbx
jne 0x9c1e
movq %rbx, 0x50(%rsp)
movq %rax, %rbp
movq %r14, %rdi
callq 0x3270
movsd (%rbp), %xmm0
movsd %xmm0, 0x10(%rsp)
movsd 0x8(%rbp), %xmm0
movsd %xmm0, 0x18(%rsp)
movq (%rsp), %rax
movsd 0x10(%rax), %xmm0
movsd %xmm0, 0x60(%rsp)
movq %rbp, 0x28(%rsp)
movsd 0x10(%rbp), %xmm0
movsd %xmm0, 0x40(%rsp)
movsd (%rax), %xmm0
movsd %xmm0, 0x58(%rsp)
movsd 0x8(%rax), %xmm0
movsd %xmm0, 0x68(%rsp)
movl $0x18, %edi
callq 0x3290
movq %rax, %rbp
movsd 0x40(%rsp), %xmm3
movapd %xmm3, %xmm0
movsd 0x58(%rsp), %xmm6
mulsd %xmm6, %xmm0
movsd 0x18(%rsp), %xmm2
mulsd %xmm2, %xmm6
movsd 0x60(%rsp), %xmm5
mulsd %xmm5, %xmm2
movsd 0x10(%rsp), %xmm1
mulsd %xmm1, %xmm5
movsd 0x68(%rsp), %xmm4
mulsd %xmm4, %xmm1
subsd %xmm6, %xmm1
subsd %xmm5, %xmm0
mulsd %xmm3, %xmm4
subsd %xmm4, %xmm2
movsd %xmm2, (%rax)
movsd %xmm0, 0x8(%rax)
movsd %xmm1, 0x10(%rax)
movq 0x38(%rsp), %rcx
cmpq %rbx, %rcx
jne 0x9d2c
testq %rcx, %rcx
je 0x9d74
xorl %eax, %eax
movq 0x8(%rsp), %r14
movsd (%r13,%rax,8), %xmm0
addsd (%rbp,%rax,8), %xmm0
movsd %xmm0, (%r14,%rax,8)
incq %rax
cmpq %rax, %rcx
jne 0x9d0f
jmp 0x9d79
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x9d3b
callq 0x3270
leaq (,%rbx,8), %rdi
callq 0x3290
movq %rax, %r14
testq %rbx, %rbx
je 0x9d6d
xorl %eax, %eax
movsd (%r13,%rax,8), %xmm0
addsd (%rbp,%rax,8), %xmm0
movsd %xmm0, (%r14,%rax,8)
incq %rax
cmpq %rax, %rbx
jne 0x9d52
movq %rbx, 0x38(%rsp)
jmp 0x9d79
movq 0x8(%rsp), %r14
movq %rbp, %rdi
callq 0x3270
movq 0x78(%rsp), %rcx
movq (%rcx), %rax
movq 0x8(%rcx), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
cmpq %r12, %rdx
jbe 0x9f57
movsd (%rax,%r12,8), %xmm1
mulsd 0x126d(%rip), %xmm1     # 0xb018
movq 0x88(%rsp), %rcx
movq (%rcx), %rax
movq 0x8(%rcx), %rdx
subq %rax, %rdx
sarq $0x4, %rdx
cmpq %r12, %rdx
jbe 0x9f57
movq %r12, 0x18(%rsp)
movq 0x80(%rsp), %rcx
movq (%rcx), %rbp
movq 0xa0(%rsp), %rdx
addq %rdx, %rbp
movq 0x70(%rsp), %rcx
movsd (%rcx), %xmm2
leaq (%rax,%rdx), %r12
movq (%rax,%rdx), %rax
movq 0x38(%rsp), %r8
cmpq %r8, %rax
jne 0x9e39
testq %rax, %rax
je 0x9ec7
movq 0x8(%r12), %rcx
movq 0x8(%rbp), %rdx
xorl %esi, %esi
movsd (%rdx,%rsi,8), %xmm0
mulsd %xmm1, %xmm0
mulsd %xmm2, %xmm0
addsd (%r14,%rsi,8), %xmm0
movsd %xmm0, (%rcx,%rsi,8)
incq %rsi
cmpq %rsi, %rax
jne 0x9e14
jmp 0x9ec7
movsd %xmm2, 0x8(%rsp)
movsd %xmm1, 0x10(%rsp)
movq 0x8(%r12), %rdi
testq %rdi, %rdi
je 0x9e59
callq 0x3270
movq 0x38(%rsp), %r8
movq %r8, (%r12)
leaq (,%r8,8), %rdi
callq 0x3290
movq %rax, 0x8(%r12)
movq (%r12), %rcx
testq %rcx, %rcx
movq 0x38(%rsp), %r8
movsd 0x10(%rsp), %xmm1
movsd 0x8(%rsp), %xmm2
je 0x9ec7
movq 0x8(%rbp), %rdx
xorl %esi, %esi
movq 0x18(%rsp), %r12
movsd (%rdx,%rsi,8), %xmm0
mulsd %xmm1, %xmm0
mulsd %xmm2, %xmm0
addsd (%r14,%rsi,8), %xmm0
movsd %xmm0, (%rax,%rsi,8)
incq %rsi
cmpq %rsi, %rcx
jne 0x9e94
movq %r13, 0x10(%rsp)
movq %r15, %rbp
movq %r14, 0x8(%rsp)
movq (%rsp), %r13
jmp 0x9edd
movq %r13, 0x10(%rsp)
movq %r15, %rbp
movq %r14, 0x8(%rsp)
movq (%rsp), %r13
movq 0x18(%rsp), %r12
movq 0x48(%rsp), %r14
incl %r12d
movq 0x90(%rsp), %rax
cmpl (%rax), %r12d
jb 0x977a
jmp 0x9f18
movq $0x0, 0x10(%rsp)
xorl %ebp, %ebp
movq $0x0, 0x8(%rsp)
movq $0x0, 0x28(%rsp)
xorl %r13d, %r13d
movq 0x8(%rsp), %rdi
callq 0x3270
movq 0x28(%rsp), %rdi
callq 0x3270
movq 0x10(%rsp), %rdi
callq 0x3270
movq %r13, %rdi
callq 0x3270
movq %rbp, %rdi
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3270
leaq 0x13f7(%rip), %rdi      # 0xb355
movq %r12, %rsi
xorl %eax, %eax
callq 0x3380
leaq 0x13e6(%rip), %rdi      # 0xb355
movq %r12, %rsi
xorl %eax, %eax
callq 0x3380
leaq 0x13d5(%rip), %rdi      # 0xb355
movq %r12, %rsi
xorl %eax, %eax
callq 0x3380
leaq 0x13c4(%rip), %rdi      # 0xb355
movq %r12, %rsi
xorl %eax, %eax
callq 0x3380
leaq 0x13b3(%rip), %rdi      # 0xb355
movq %r12, %rsi
xorl %eax, %eax
callq 0x3380
movq %rax, %rbx
movq %r14, %rdi
callq 0x3270
jmp 0x9fea
movq %rax, %rbx
movq %rbp, %rdi
callq 0x3270
jmp 0x9fde
jmp 0xa00d
movq %rax, %rbx
jmp 0x9ff2
jmp 0x9ff7
movq %rax, %rbx
movq 0x8(%rsp), %rdi
jmp 0xa01b
jmp 0xa003
movq %rax, %rbx
movq %r13, 0x10(%rsp)
jmp 0x9ffa
jmp 0x9ff7
movq %rax, %rbx
movq %r13, 0x10(%rsp)
movq %rbp, %r13
movq %r15, %rbp
jmp 0xa006
movq %rax, %rbx
movq %r15, %rbp
movq (%rsp), %r13
jmp 0xa006
movq %rax, %rbx
movq 0x8(%rsp), %rdi
jmp 0xa01f
movq %rax, %rbx
movq %r13, 0x10(%rsp)
movq %r15, %rbp
movq %r14, %rdi
movq (%rsp), %r13
callq 0x3270
movq 0x28(%rsp), %rdi
callq 0x3270
movq 0x10(%rsp), %rdi
callq 0x3270
movq %r13, %rdi
callq 0x3270
movq %rbp, %rdi
callq 0x3270
movq %rbx, %rdi
callq 0x3460