// File: kaityo256[P]lj_simd/force_soa.cpp
// Function: force_pair()
void
force_pair(void) {
  for (int k = 0; k < number_of_pairs; k++) {
    const int i = i_particles[k];
    const int j = j_particles[k];
    double dx = q[X][j] - q[X][i];
    double dy = q[Y][j] - q[Y][i];
    double dz = q[Z][j] - q[Z][i];
    double r2 = (dx * dx + dy * dy + dz * dz);
    //if (r2 > CL2) continue;
    double r6 = r2 * r2 * r2;
    double df = ((24.0 * r6 - 48.0) / (r6 * r6 * r2)) * dt;
    if (r2 > CL2) df = 0.0;
    p[X][i] += df * dx;
    p[Y][i] += df * dy;
    p[Z][i] += df * dz;
    p[X][j] -= df * dx;
    p[Y][j] -= df * dy;
    p[Z][j] -= df * dz;
  }
}

// Assembly:
movl $0x0, -0x4(%rsp)
movl -0x4(%rsp), %eax
cmpl 0x19f7c92(%rip), %eax   # 0x19fab14
jge 0x316c
movslq -0x4(%rsp), %rcx
leaq 0x1b7e68c(%rip), %rax   # 0x1b81520
movl (%rax,%rcx,4), %eax
movl %eax, -0x8(%rsp)
movslq -0x4(%rsp), %rcx
leaq 0x4945279(%rip), %rax   # 0x4948120
movl (%rax,%rcx,4), %eax
movl %eax, -0xc(%rsp)
movslq -0xc(%rsp), %rcx
leaq 0x18dc56(%rip), %rax    # 0x190b10
vmovsd (%rax,%rcx,8), %xmm0
movslq -0x8(%rsp), %rcx
leaq 0x18dc45(%rip), %rax    # 0x190b10
vsubsd (%rax,%rcx,8), %xmm0, %xmm0
vmovsd %xmm0, -0x18(%rsp)
movslq -0xc(%rsp), %rcx
leaq 0x18dc2e(%rip), %rax    # 0x190b10
vmovsd 0x30d400(%rax,%rcx,8), %xmm0
movslq -0x8(%rsp), %rcx
leaq 0x18dc19(%rip), %rax    # 0x190b10
vsubsd 0x30d400(%rax,%rcx,8), %xmm0, %xmm0
vmovsd %xmm0, -0x20(%rsp)
movslq -0xc(%rsp), %rcx
leaq 0x18dbfe(%rip), %rax    # 0x190b10
vmovsd 0x61a800(%rax,%rcx,8), %xmm0
movslq -0x8(%rsp), %rcx
leaq 0x18dbe9(%rip), %rax    # 0x190b10
vsubsd 0x61a800(%rax,%rcx,8), %xmm0, %xmm0
vmovsd %xmm0, -0x28(%rsp)
vmovsd -0x18(%rsp), %xmm0
vmovsd -0x18(%rsp), %xmm2
vmovsd -0x20(%rsp), %xmm1
vmulsd -0x20(%rsp), %xmm1, %xmm1
vfmadd213sd %xmm1, %xmm0, %xmm2 # xmm2 = (xmm0 * xmm2) + xmm1
vmovsd -0x28(%rsp), %xmm1
vmovsd -0x28(%rsp), %xmm0
vfmadd213sd %xmm2, %xmm1, %xmm0 # xmm0 = (xmm1 * xmm0) + xmm2
vmovsd %xmm0, -0x30(%rsp)
vmovsd -0x30(%rsp), %xmm0
vmulsd -0x30(%rsp), %xmm0, %xmm0
vmulsd -0x30(%rsp), %xmm0, %xmm0
vmovsd %xmm0, -0x38(%rsp)
vmovsd -0x38(%rsp), %xmm1
vmovsd 0x50b0(%rip), %xmm2     # 0x8040
vmovsd 0x50b0(%rip), %xmm0     # 0x8048
vfmadd213sd %xmm2, %xmm1, %xmm0 # xmm0 = (xmm1 * xmm0) + xmm2
vmovsd -0x38(%rsp), %xmm1
vmulsd -0x38(%rsp), %xmm1, %xmm1
vmulsd -0x30(%rsp), %xmm1, %xmm1
vdivsd %xmm1, %xmm0, %xmm0
vmovsd 0x507d(%rip), %xmm1     # 0x8038
vmulsd %xmm1, %xmm0, %xmm0
vmovsd %xmm0, -0x40(%rsp)
vmovsd -0x30(%rsp), %xmm0
vmovsd 0x505d(%rip), %xmm1     # 0x8030
vucomisd %xmm1, %xmm0
jbe 0x2fe3
vpxor %xmm0, %xmm0, %xmm0
vmovsd %xmm0, -0x40(%rsp)
vmovsd -0x40(%rsp), %xmm1
vmovsd -0x18(%rsp), %xmm0
movslq -0x8(%rsp), %rcx
leaq 0xdc2b15(%rip), %rax    # 0xdc5b10
vmovsd (%rax,%rcx,8), %xmm2
vfmadd213sd %xmm2, %xmm1, %xmm0 # xmm0 = (xmm1 * xmm0) + xmm2
leaq 0xdc2b04(%rip), %rax    # 0xdc5b10
vmovsd %xmm0, (%rax,%rcx,8)
vmovsd -0x40(%rsp), %xmm1
vmovsd -0x20(%rsp), %xmm0
movslq -0x8(%rsp), %rcx
leaq 0xdc2ae7(%rip), %rax    # 0xdc5b10
vmovsd 0x30d400(%rax,%rcx,8), %xmm2
vfmadd213sd %xmm2, %xmm1, %xmm0 # xmm0 = (xmm1 * xmm0) + xmm2
leaq 0xdc2ad2(%rip), %rax    # 0xdc5b10
vmovsd %xmm0, 0x30d400(%rax,%rcx,8)
vmovsd -0x40(%rsp), %xmm1
vmovsd -0x28(%rsp), %xmm0
movslq -0x8(%rsp), %rcx
leaq 0xdc2ab1(%rip), %rax    # 0xdc5b10
vmovsd 0x61a800(%rax,%rcx,8), %xmm2
vfmadd213sd %xmm2, %xmm1, %xmm0 # xmm0 = (xmm1 * xmm0) + xmm2
leaq 0xdc2a9c(%rip), %rax    # 0xdc5b10
vmovsd %xmm0, 0x61a800(%rax,%rcx,8)
vmovsd -0x40(%rsp), %xmm1
vmovsd -0x18(%rsp), %xmm0
movslq -0xc(%rsp), %rcx
leaq 0xdc2a7b(%rip), %rax    # 0xdc5b10
vmovsd (%rax,%rcx,8), %xmm2
vmovq %xmm1, %rax
movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000
xorq %rdx, %rax
vmovq %rax, %xmm1
vfmadd213sd %xmm2, %xmm1, %xmm0 # xmm0 = (xmm1 * xmm0) + xmm2
leaq 0xdc2a53(%rip), %rax    # 0xdc5b10
vmovsd %xmm0, (%rax,%rcx,8)
vmovsd -0x40(%rsp), %xmm1
vmovsd -0x20(%rsp), %xmm0
movslq -0xc(%rsp), %rcx
leaq 0xdc2a36(%rip), %rax    # 0xdc5b10
vmovsd 0x30d400(%rax,%rcx,8), %xmm2
vmovq %xmm1, %rax
movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000
xorq %rdx, %rax
vmovq %rax, %xmm1
vfmadd213sd %xmm2, %xmm1, %xmm0 # xmm0 = (xmm1 * xmm0) + xmm2
leaq 0xdc2a0a(%rip), %rax    # 0xdc5b10
vmovsd %xmm0, 0x30d400(%rax,%rcx,8)
vmovsd -0x40(%rsp), %xmm1
vmovsd -0x28(%rsp), %xmm0
movslq -0xc(%rsp), %rcx
leaq 0xdc29e9(%rip), %rax    # 0xdc5b10
vmovsd 0x61a800(%rax,%rcx,8), %xmm2
vmovq %xmm1, %rax
movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000
xorq %rdx, %rax
vmovq %rax, %xmm1
vfmadd213sd %xmm2, %xmm1, %xmm0 # xmm0 = (xmm1 * xmm0) + xmm2
leaq 0xdc29bd(%rip), %rax    # 0xdc5b10
vmovsd %xmm0, 0x61a800(%rax,%rcx,8)
movl -0x4(%rsp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rsp)
jmp 0x2e78
retq
nopl (%rax)