// File: kaityo256[P]lj_simd/force_soa.cpp
// Function: force_sorted()
void
force_sorted(void) {
  const int pn = particle_number;
  const int *__restrict sorted_list2 = sorted_list;
  for (int i = 0; i < pn; i++) {
    const double qix = q[X][i];
    const double qiy = q[Y][i];
    const double qiz = q[Z][i];
    const int np = number_of_partners[i];
    double pfx = 0;
    double pfy = 0;
    double pfz = 0;
    const int kp = pointer[i];
    for (int k = 0; k < np; k++) {
      const int j = sorted_list2[kp + k];
      double dx = q[X][j] - qix;
      double dy = q[Y][j] - qiy;
      double dz = q[Z][j] - qiz;
      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;
      pfx += df * dx;
      pfy += df * dy;
      pfz += df * dz;
      p[X][j] -= df * dx;
      p[Y][j] -= df * dy;
      p[Z][j] -= df * dz;
    }
    p[X][i] += pfx;
    p[Y][i] += pfy;
    p[Z][i] += pfz;
  }
}

// Assembly:
subq $0x10, %rsp
movl 0x19f7996(%rip), %eax   # 0x19fab10
movl %eax, 0xc(%rsp)
leaq 0x7a18f9b(%rip), %rax   # 0x7a1c120
movq %rax, (%rsp)
movl $0x0, -0x4(%rsp)
movl -0x4(%rsp), %eax
cmpl 0xc(%rsp), %eax
jge 0x3537
movslq -0x4(%rsp), %rcx
leaq 0x18d965(%rip), %rax    # 0x190b10
vmovsd (%rax,%rcx,8), %xmm0
vmovsd %xmm0, -0x10(%rsp)
movslq -0x4(%rsp), %rcx
leaq 0x18d94e(%rip), %rax    # 0x190b10
vmovsd 0x30d400(%rax,%rcx,8), %xmm0
vmovsd %xmm0, -0x18(%rsp)
movslq -0x4(%rsp), %rcx
leaq 0x18d933(%rip), %rax    # 0x190b10
vmovsd 0x61a800(%rax,%rcx,8), %xmm0
vmovsd %xmm0, -0x20(%rsp)
movslq -0x4(%rsp), %rcx
leaq 0x19f7928(%rip), %rax   # 0x19fab20
movl (%rax,%rcx,4), %eax
movl %eax, -0x24(%rsp)
vpxor %xmm0, %xmm0, %xmm0
vmovsd %xmm0, -0x30(%rsp)
vpxor %xmm0, %xmm0, %xmm0
vmovsd %xmm0, -0x38(%rsp)
vpxor %xmm0, %xmm0, %xmm0
vmovsd %xmm0, -0x40(%rsp)
movslq -0x4(%rsp), %rcx
leaq 0x770baf7(%rip), %rax   # 0x770ed20
movl (%rax,%rcx,4), %eax
movl %eax, -0x44(%rsp)
movl $0x0, -0x48(%rsp)
movl -0x48(%rsp), %eax
cmpl -0x24(%rsp), %eax
jge 0x34ae
movq (%rsp), %rax
movl -0x44(%rsp), %ecx
addl -0x48(%rsp), %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x4c(%rsp)
movslq -0x4c(%rsp), %rcx
leaq 0x18d8a8(%rip), %rax    # 0x190b10
vmovsd (%rax,%rcx,8), %xmm0
vsubsd -0x10(%rsp), %xmm0, %xmm0
vmovsd %xmm0, -0x58(%rsp)
movslq -0x4c(%rsp), %rcx
leaq 0x18d88b(%rip), %rax    # 0x190b10
vmovsd 0x30d400(%rax,%rcx,8), %xmm0
vsubsd -0x18(%rsp), %xmm0, %xmm0
vmovsd %xmm0, -0x60(%rsp)
movslq -0x4c(%rsp), %rcx
leaq 0x18d86a(%rip), %rax    # 0x190b10
vmovsd 0x61a800(%rax,%rcx,8), %xmm0
vsubsd -0x20(%rsp), %xmm0, %xmm0
vmovsd %xmm0, -0x68(%rsp)
vmovsd -0x58(%rsp), %xmm0
vmovsd -0x58(%rsp), %xmm2
vmovsd -0x60(%rsp), %xmm1
vmulsd -0x60(%rsp), %xmm1, %xmm1
vfmadd213sd %xmm1, %xmm0, %xmm2 # xmm2 = (xmm0 * xmm2) + xmm1
vmovsd -0x68(%rsp), %xmm1
vmovsd -0x68(%rsp), %xmm0
vfmadd213sd %xmm2, %xmm1, %xmm0 # xmm0 = (xmm1 * xmm0) + xmm2
vmovsd %xmm0, -0x70(%rsp)
vmovsd -0x70(%rsp), %xmm0
vmulsd -0x70(%rsp), %xmm0, %xmm0
vmulsd -0x70(%rsp), %xmm0, %xmm0
vmovsd %xmm0, -0x78(%rsp)
vmovsd -0x78(%rsp), %xmm1
vmovsd 0x4d2b(%rip), %xmm2     # 0x8040
vmovsd 0x4d2b(%rip), %xmm0     # 0x8048
vfmadd213sd %xmm2, %xmm1, %xmm0 # xmm0 = (xmm1 * xmm0) + xmm2
vmovsd -0x78(%rsp), %xmm1
vmulsd -0x78(%rsp), %xmm1, %xmm1
vmulsd -0x70(%rsp), %xmm1, %xmm1
vdivsd %xmm1, %xmm0, %xmm0
vmovsd 0x4cf8(%rip), %xmm1     # 0x8038
vmulsd %xmm1, %xmm0, %xmm0
vmovsd %xmm0, -0x80(%rsp)
vmovsd -0x70(%rsp), %xmm0
vmovsd 0x4cd8(%rip), %xmm1     # 0x8030
vucomisd %xmm1, %xmm0
jbe 0x3368
vpxor %xmm0, %xmm0, %xmm0
vmovsd %xmm0, -0x80(%rsp)
vmovsd -0x80(%rsp), %xmm1
vmovsd -0x58(%rsp), %xmm0
vmovsd -0x30(%rsp), %xmm2
vfmadd213sd %xmm2, %xmm1, %xmm0 # xmm0 = (xmm1 * xmm0) + xmm2
vmovsd %xmm0, -0x30(%rsp)
vmovsd -0x80(%rsp), %xmm1
vmovsd -0x60(%rsp), %xmm0
vmovsd -0x38(%rsp), %xmm2
vfmadd213sd %xmm2, %xmm1, %xmm0 # xmm0 = (xmm1 * xmm0) + xmm2
vmovsd %xmm0, -0x38(%rsp)
vmovsd -0x80(%rsp), %xmm1
vmovsd -0x68(%rsp), %xmm0
vmovsd -0x40(%rsp), %xmm2
vfmadd213sd %xmm2, %xmm1, %xmm0 # xmm0 = (xmm1 * xmm0) + xmm2
vmovsd %xmm0, -0x40(%rsp)
vmovsd -0x80(%rsp), %xmm1
vmovsd -0x58(%rsp), %xmm0
movslq -0x4c(%rsp), %rcx
leaq 0xdc2739(%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 0xdc2711(%rip), %rax    # 0xdc5b10
vmovsd %xmm0, (%rax,%rcx,8)
vmovsd -0x80(%rsp), %xmm1
vmovsd -0x60(%rsp), %xmm0
movslq -0x4c(%rsp), %rcx
leaq 0xdc26f4(%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 0xdc26c8(%rip), %rax    # 0xdc5b10
vmovsd %xmm0, 0x30d400(%rax,%rcx,8)
vmovsd -0x80(%rsp), %xmm1
vmovsd -0x68(%rsp), %xmm0
movslq -0x4c(%rsp), %rcx
leaq 0xdc26a7(%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 0xdc267b(%rip), %rax    # 0xdc5b10
vmovsd %xmm0, 0x61a800(%rax,%rcx,8)
movl -0x48(%rsp), %eax
addl $0x1, %eax
movl %eax, -0x48(%rsp)
jmp 0x3238
vmovsd -0x30(%rsp), %xmm0
movslq -0x4(%rsp), %rcx
leaq 0xdc2650(%rip), %rax    # 0xdc5b10
vaddsd (%rax,%rcx,8), %xmm0, %xmm0
leaq 0xdc2644(%rip), %rax    # 0xdc5b10
vmovsd %xmm0, (%rax,%rcx,8)
vmovsd -0x38(%rsp), %xmm0
movslq -0x4(%rsp), %rcx
leaq 0xdc262d(%rip), %rax    # 0xdc5b10
vaddsd 0x30d400(%rax,%rcx,8), %xmm0, %xmm0
leaq 0xdc261d(%rip), %rax    # 0xdc5b10
vmovsd %xmm0, 0x30d400(%rax,%rcx,8)
vmovsd -0x40(%rsp), %xmm0
movslq -0x4(%rsp), %rcx
leaq 0xdc2602(%rip), %rax    # 0xdc5b10
vaddsd 0x61a800(%rax,%rcx,8), %xmm0, %xmm0
leaq 0xdc25f2(%rip), %rax    # 0xdc5b10
vmovsd %xmm0, 0x61a800(%rax,%rcx,8)
movl -0x4(%rsp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rsp)
jmp 0x3191
addq $0x10, %rsp
retq
nopl (%rax)