// File: kaityo256[P]lj_simd/force_aos.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[i][X];
    const double qiy = q[i][Y];
    const double qiz = q[i][Z];
    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[j][X] - qix;
      double dy = q[j][Y] - qiy;
      double dz = q[j][Z] - qiz;
      double r2 = (dx * dx + dy * dy + dz * dz);
      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[j][X] -= df * dx;
      p[j][Y] -= df * dy;
      p[j][Z] -= df * dz;
    }
    p[i][X] += pfx;
    p[i][Y] += pfy;
    p[i][Z] += pfz;
  }
}

// Assembly:
subq $0x10, %rsp
movl 0x3263766(%rip), %eax   # 0x3266b80
movl %eax, 0xc(%rsp)
leaq 0x90fe36b(%rip), %rax   # 0x9101790
movq %rax, (%rsp)
movl $0x0, -0x4(%rsp)
movl -0x4(%rsp), %eax
cmpl 0xc(%rsp), %eax
jge 0x37cb
movslq -0x4(%rsp), %rcx
leaq 0x18f705(%rip), %rax    # 0x192b50
shlq $0x5, %rcx
addq %rcx, %rax
vmovsd (%rax), %xmm0
vmovsd %xmm0, -0x10(%rsp)
movslq -0x4(%rsp), %rcx
leaq 0x18f6e8(%rip), %rax    # 0x192b50
shlq $0x5, %rcx
addq %rcx, %rax
vmovsd 0x8(%rax), %xmm0
vmovsd %xmm0, -0x18(%rsp)
movslq -0x4(%rsp), %rcx
leaq 0x18f6ca(%rip), %rax    # 0x192b50
shlq $0x5, %rcx
addq %rcx, %rax
vmovsd 0x10(%rax), %xmm0
vmovsd %xmm0, -0x20(%rsp)
movslq -0x4(%rsp), %rcx
leaq 0x32636ec(%rip), %rax   # 0x3266b90
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 0x8f778bb(%rip), %rax   # 0x8f7ad90
movl (%rax,%rcx,4), %eax
movl %eax, -0x44(%rsp)
movl $0x0, -0x48(%rsp)
movl -0x48(%rsp), %eax
cmpl -0x24(%rsp), %eax
jge 0x3754
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 0x18f63c(%rip), %rax    # 0x192b50
shlq $0x5, %rcx
addq %rcx, %rax
vmovsd (%rax), %xmm0
vsubsd -0x10(%rsp), %xmm0, %xmm0
vmovsd %xmm0, -0x58(%rsp)
movslq -0x4c(%rsp), %rcx
leaq 0x18f619(%rip), %rax    # 0x192b50
shlq $0x5, %rcx
addq %rcx, %rax
vmovsd 0x8(%rax), %xmm0
vsubsd -0x18(%rsp), %xmm0, %xmm0
vmovsd %xmm0, -0x60(%rsp)
movslq -0x4c(%rsp), %rcx
leaq 0x18f5f5(%rip), %rax    # 0x192b50
shlq $0x5, %rcx
addq %rcx, %rax
vmovsd 0x10(%rax), %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 0x6a73(%rip), %xmm2     # 0xa040
vmovsd 0x6a73(%rip), %xmm0     # 0xa048
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 0x6a40(%rip), %xmm1     # 0xa038
vmulsd %xmm1, %xmm0, %xmm0
vmovsd %xmm0, -0x80(%rsp)
vmovsd -0x70(%rsp), %xmm0
vmovsd 0x6a20(%rip), %xmm1     # 0xa030
vucomisd %xmm1, %xmm0
jbe 0x3620
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 0xdc44c1(%rip), %rax    # 0xdc7b50
shlq $0x5, %rcx
addq %rcx, %rax
vmovsd (%rax), %xmm2
vmovq %xmm1, %rcx
movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000
xorq %rdx, %rcx
vmovq %rcx, %xmm1
vfmadd213sd %xmm2, %xmm1, %xmm0 # xmm0 = (xmm1 * xmm0) + xmm2
vmovsd %xmm0, (%rax)
vmovsd -0x80(%rsp), %xmm1
vmovsd -0x60(%rsp), %xmm0
movslq -0x4c(%rsp), %rcx
leaq 0xdc447e(%rip), %rax    # 0xdc7b50
shlq $0x5, %rcx
addq %rcx, %rax
vmovsd 0x8(%rax), %xmm2
vmovq %xmm1, %rcx
movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000
xorq %rdx, %rcx
vmovq %rcx, %xmm1
vfmadd213sd %xmm2, %xmm1, %xmm0 # xmm0 = (xmm1 * xmm0) + xmm2
vmovsd %xmm0, 0x8(%rax)
vmovsd -0x80(%rsp), %xmm1
vmovsd -0x68(%rsp), %xmm0
movslq -0x4c(%rsp), %rcx
leaq 0xdc4439(%rip), %rax    # 0xdc7b50
shlq $0x5, %rcx
addq %rcx, %rax
vmovsd 0x10(%rax), %xmm2
vmovq %xmm1, %rcx
movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000
xorq %rdx, %rcx
vmovq %rcx, %xmm1
vfmadd213sd %xmm2, %xmm1, %xmm0 # xmm0 = (xmm1 * xmm0) + xmm2
vmovsd %xmm0, 0x10(%rax)
movl -0x48(%rsp), %eax
addl $0x1, %eax
movl %eax, -0x48(%rsp)
jmp 0x34e4
vmovsd -0x30(%rsp), %xmm0
movslq -0x4(%rsp), %rcx
leaq 0xdc43ea(%rip), %rax    # 0xdc7b50
shlq $0x5, %rcx
addq %rcx, %rax
vaddsd (%rax), %xmm0, %xmm0
vmovsd %xmm0, (%rax)
vmovsd -0x38(%rsp), %xmm0
movslq -0x4(%rsp), %rcx
leaq 0xdc43c9(%rip), %rax    # 0xdc7b50
shlq $0x5, %rcx
addq %rcx, %rax
vaddsd 0x8(%rax), %xmm0, %xmm0
vmovsd %xmm0, 0x8(%rax)
vmovsd -0x40(%rsp), %xmm0
movslq -0x4(%rsp), %rcx
leaq 0xdc43a6(%rip), %rax    # 0xdc7b50
shlq $0x5, %rcx
addq %rcx, %rax
vaddsd 0x10(%rax), %xmm0, %xmm0
vmovsd %xmm0, 0x10(%rax)
movl -0x4(%rsp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rsp)
jmp 0x3431
addq $0x10, %rsp
retq