// File: /workspace/github_cpp_makefile_star2_O2/Luthaf[P]zeopp/geometry.cc
// Function: project_onto_plane(XYZ, XYZ, XYZ, XYZ)
XYZ project_onto_plane(XYZ initial, XYZ line_start, XYZ line_end, XYZ third) {
  XYZ projection_1 = project_onto_line(initial, line_start, line_end);
  XYZ projection_third = project_onto_line(third, line_start, line_end);
  XYZ projection_third_to_projection_1_vector = get_vector_from_to(projection_third, projection_1);
  XYZ adjusted_third = third+projection_third_to_projection_1_vector;
  XYZ projection_2 = project_onto_line(initial, adjusted_third, projection_1);
  return projection_2;
}

// Assembly:
movq %rdi, %rax
movsd 0x8(%rsp), %xmm3
movsd 0x10(%rsp), %xmm2
movsd 0x18(%rsp), %xmm1
movsd 0x30(%rsp), %xmm5
movsd 0x48(%rsp), %xmm6
subsd %xmm5, %xmm6
movsd 0x60(%rsp), %xmm4
movupd 0x20(%rsp), %xmm7
movapd 0x38(%rsp), %xmm9
subpd %xmm7, %xmm9
movapd %xmm9, %xmm0
mulpd %xmm9, %xmm0
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
movapd %xmm9, %xmm8
mulsd %xmm9, %xmm8
addsd %xmm0, %xmm8
movapd %xmm6, %xmm0
mulsd %xmm6, %xmm0
addsd %xmm8, %xmm0
sqrtsd %xmm0, %xmm8
mulsd %xmm8, %xmm8
movupd 0x50(%rsp), %xmm11
unpcklpd %xmm5, %xmm5            # xmm5 = xmm5[0,0]
movapd %xmm1, %xmm10
unpcklpd %xmm4, %xmm10           # xmm10 = xmm10[0],xmm4[0]
movapd %xmm5, %xmm0
subpd %xmm10, %xmm0
movapd %xmm7, %xmm10
unpcklpd %xmm7, %xmm10           # xmm10 = xmm10[0],xmm7[0]
movapd %xmm3, %xmm12
unpcklpd %xmm11, %xmm12          # xmm12 = xmm12[0],xmm11[0]
subpd %xmm12, %xmm10
movapd %xmm7, %xmm12
unpckhpd %xmm7, %xmm12           # xmm12 = xmm12[1],xmm7[1]
movapd %xmm11, %xmm13
movsd %xmm2, %xmm13           # xmm13 = xmm2[0],xmm13[1]
subpd %xmm13, %xmm12
movapd %xmm9, %xmm13
unpckhpd %xmm9, %xmm13           # xmm13 = xmm13[1],xmm9[1]
mulpd %xmm12, %xmm13
movapd %xmm9, %xmm12
unpcklpd %xmm9, %xmm12           # xmm12 = xmm12[0],xmm9[0]
mulpd %xmm10, %xmm12
addpd %xmm13, %xmm12
unpcklpd %xmm6, %xmm6            # xmm6 = xmm6[0,0]
mulpd %xmm6, %xmm0
addpd %xmm12, %xmm0
movapd 0x9c07d(%rip), %xmm10   # 0x1005d0
xorpd %xmm10, %xmm0
unpcklpd %xmm8, %xmm8            # xmm8 = xmm8[0,0]
divpd %xmm8, %xmm0
movapd %xmm0, %xmm8
unpcklpd %xmm0, %xmm8            # xmm8 = xmm8[0],xmm0[0]
mulpd %xmm9, %xmm8
addpd %xmm7, %xmm8
movapd %xmm0, %xmm12
unpckhpd %xmm0, %xmm12           # xmm12 = xmm12[1],xmm0[1]
mulpd %xmm9, %xmm12
addpd %xmm7, %xmm12
mulpd %xmm6, %xmm0
addpd %xmm5, %xmm0
movapd %xmm8, %xmm6
subpd %xmm12, %xmm6
movapd %xmm0, %xmm7
unpckhpd %xmm0, %xmm7            # xmm7 = xmm7[1],xmm0[1]
movapd %xmm0, %xmm5
subsd %xmm7, %xmm5
addpd %xmm11, %xmm6
addsd %xmm4, %xmm5
movapd %xmm6, %xmm4
subsd %xmm3, %xmm4
movapd %xmm6, %xmm3
unpckhpd %xmm6, %xmm3            # xmm3 = xmm3[1],xmm6[1]
subsd %xmm2, %xmm3
movapd %xmm5, %xmm2
subsd %xmm1, %xmm2
subpd %xmm6, %xmm8
subsd %xmm5, %xmm0
movapd %xmm8, %xmm1
unpckhpd %xmm8, %xmm1            # xmm1 = xmm1[1],xmm8[1]
mulsd %xmm1, %xmm3
mulsd %xmm1, %xmm1
movapd %xmm8, %xmm7
mulsd %xmm8, %xmm7
addsd %xmm1, %xmm7
movapd %xmm0, %xmm1
mulsd %xmm0, %xmm1
addsd %xmm7, %xmm1
sqrtsd %xmm1, %xmm1
mulsd %xmm8, %xmm4
addsd %xmm3, %xmm4
mulsd %xmm0, %xmm2
addsd %xmm4, %xmm2
xorpd %xmm10, %xmm2
mulsd %xmm1, %xmm1
divsd %xmm1, %xmm2
movapd %xmm2, %xmm1
unpcklpd %xmm2, %xmm1            # xmm1 = xmm1[0],xmm2[0]
mulpd %xmm8, %xmm1
addpd %xmm6, %xmm1
movupd %xmm1, (%rdi)
mulsd %xmm0, %xmm2
addsd %xmm5, %xmm2
movsd %xmm2, 0x10(%rdi)
retq