// File: kaityo256[P]lj_simd/force_aos.cpp
// Function: force_sorted_z()
void
force_sorted_z(void) {
  const int pn = particle_number;
  for (int i = 0; i < pn; i++) {
    const double qix = z[i][X];
    const double qiy = z[i][Y];
    const double qiz = z[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_list[kp + k];
      double dx = z[j][X] - qix;
      double dy = z[j][Y] - qiy;
      double dz = z[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;
      z[j][PX] -= df * dx;
      z[j][PY] -= df * dy;
      z[j][PZ] -= df * dz;
    }
    z[i][PX] += pfx;
    z[i][PY] += pfy;
    z[i][PZ] += pfz;
  }
}

// Assembly:
movl 0x32633aa(%rip), %eax   # 0x3266b80
movl %eax, -0x4(%rsp)
movl $0x0, -0x8(%rsp)
movl -0x8(%rsp), %eax
cmpl -0x4(%rsp), %eax
jge 0x3b83
movslq -0x8(%rsp), %rcx
leaq 0x19f9384(%rip), %rax   # 0x19fcb80
shlq $0x6, %rcx
addq %rcx, %rax
vmovsd (%rax), %xmm0
vmovsd %xmm0, -0x10(%rsp)
movslq -0x8(%rsp), %rcx
leaq 0x19f9367(%rip), %rax   # 0x19fcb80
shlq $0x6, %rcx
addq %rcx, %rax
vmovsd 0x8(%rax), %xmm0
vmovsd %xmm0, -0x18(%rsp)
movslq -0x8(%rsp), %rcx
leaq 0x19f9349(%rip), %rax   # 0x19fcb80
shlq $0x6, %rcx
addq %rcx, %rax
vmovsd 0x10(%rax), %xmm0
vmovsd %xmm0, -0x20(%rsp)
movslq -0x8(%rsp), %rcx
leaq 0x326333b(%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 -0x8(%rsp), %rcx
leaq 0x8f7750a(%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 0x3b0a
movl -0x44(%rsp), %eax
addl -0x48(%rsp), %eax
movslq %eax, %rcx
leaq 0x90fdedb(%rip), %rax   # 0x9101790
movl (%rax,%rcx,4), %eax
movl %eax, -0x4c(%rsp)
movslq -0x4c(%rsp), %rcx
leaq 0x19f92b8(%rip), %rax   # 0x19fcb80
shlq $0x6, %rcx
addq %rcx, %rax
vmovsd (%rax), %xmm0
vsubsd -0x10(%rsp), %xmm0, %xmm0
vmovsd %xmm0, -0x58(%rsp)
movslq -0x4c(%rsp), %rcx
leaq 0x19f9295(%rip), %rax   # 0x19fcb80
shlq $0x6, %rcx
addq %rcx, %rax
vmovsd 0x8(%rax), %xmm0
vsubsd -0x18(%rsp), %xmm0, %xmm0
vmovsd %xmm0, -0x60(%rsp)
movslq -0x4c(%rsp), %rcx
leaq 0x19f9271(%rip), %rax   # 0x19fcb80
shlq $0x6, %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 0x66bf(%rip), %xmm2     # 0xa040
vmovsd 0x66bf(%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 0x668c(%rip), %xmm1     # 0xa038
vmulsd %xmm1, %xmm0, %xmm0
vmovsd %xmm0, -0x80(%rsp)
vmovsd -0x70(%rsp), %xmm0
vmovsd 0x666c(%rip), %xmm1     # 0xa030
vucomisd %xmm1, %xmm0
jbe 0x39d4
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 0x19f913d(%rip), %rax   # 0x19fcb80
shlq $0x6, %rcx
addq %rcx, %rax
vmovsd 0x20(%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, 0x20(%rax)
vmovsd -0x80(%rsp), %xmm1
vmovsd -0x60(%rsp), %xmm0
movslq -0x4c(%rsp), %rcx
leaq 0x19f90f8(%rip), %rax   # 0x19fcb80
shlq $0x6, %rcx
addq %rcx, %rax
vmovsd 0x28(%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, 0x28(%rax)
vmovsd -0x80(%rsp), %xmm1
vmovsd -0x68(%rsp), %xmm0
movslq -0x4c(%rsp), %rcx
leaq 0x19f90b3(%rip), %rax   # 0x19fcb80
shlq $0x6, %rcx
addq %rcx, %rax
vmovsd 0x30(%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, 0x30(%rax)
movl -0x48(%rsp), %eax
addl $0x1, %eax
movl %eax, -0x48(%rsp)
jmp 0x3895
vmovsd -0x30(%rsp), %xmm0
movslq -0x8(%rsp), %rcx
leaq 0x19f9064(%rip), %rax   # 0x19fcb80
shlq $0x6, %rcx
addq %rcx, %rax
vaddsd 0x20(%rax), %xmm0, %xmm0
vmovsd %xmm0, 0x20(%rax)
vmovsd -0x38(%rsp), %xmm0
movslq -0x8(%rsp), %rcx
leaq 0x19f9041(%rip), %rax   # 0x19fcb80
shlq $0x6, %rcx
addq %rcx, %rax
vaddsd 0x28(%rax), %xmm0, %xmm0
vmovsd %xmm0, 0x28(%rax)
vmovsd -0x40(%rsp), %xmm0
movslq -0x8(%rsp), %rcx
leaq 0x19f901e(%rip), %rax   # 0x19fcb80
shlq $0x6, %rcx
addq %rcx, %rax
vaddsd 0x30(%rax), %xmm0, %xmm0
vmovsd %xmm0, 0x30(%rax)
movl -0x8(%rsp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rsp)
jmp 0x37e2
retq
nopw %cs:(%rax,%rax)