void crosspoint(double a1, double b1, double c1, double a2, double b2,
                double c2, double *x, double *y) {
  *x = (c2 * b1 - c1 * b2) / (a1 * b2 - a2 * b1);
  *y = (c2 * a1 - c1 * a2) / (b1 * a2 - b2 * a1);
}


x86 assembly (clang, -O0):
<crosspoint>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  %xmm4,-0x28(%rbp)
movsd  %xmm5,-0x30(%rbp)
mov    %rdi,-0x38(%rbp)
mov    %rsi,-0x40(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm2
movsd  -0x18(%rbp),%xmm1
mulsd  -0x28(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  -0x8(%rbp),%xmm1
movsd  -0x28(%rbp),%xmm3
movsd  -0x20(%rbp),%xmm2
mulsd  -0x10(%rbp),%xmm2
movq   %xmm2,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm2
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
mov    -0x38(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x30(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm2
movsd  -0x18(%rbp),%xmm1
mulsd  -0x20(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm3
movsd  -0x28(%rbp),%xmm2
mulsd  -0x8(%rbp),%xmm2
movq   %xmm2,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm2
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
mov    -0x40(%rbp),%rax
movsd  %xmm0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<crosspoint>:
movapd %xmm2,%xmm6
mulsd  %xmm4,%xmm6
movapd %xmm5,%xmm7
mulsd  %xmm1,%xmm7
subsd  %xmm6,%xmm7
mulsd  %xmm0,%xmm4
mulsd  %xmm3,%xmm1
movapd %xmm4,%xmm6
subsd  %xmm1,%xmm6
divsd  %xmm6,%xmm7
movsd  %xmm7,(%rdi)
mulsd  %xmm3,%xmm2
mulsd  %xmm0,%xmm5
subsd  %xmm2,%xmm5
subsd  %xmm4,%xmm1
divsd  %xmm1,%xmm5
movsd  %xmm5,(%rsi)
ret

LLVM IR (-O0):
define void @crosspoint(double %0, double %1, double %2, double %3, double %4, double %5, double* %6, double* %7) {
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca double
%13 = alloca double
%14 = alloca double
%15 = alloca double*
%16 = alloca double*
store double %0, double* %9
store double %1, double* %10
store double %2, double* %11
store double %3, double* %12
store double %4, double* %13
store double %5, double* %14
store double* %6, double** %15
store double* %7, double** %16
%17 = load double, double* %14
%18 = load double, double* %10
%19 = load double, double* %11
%20 = load double, double* %13
%21 = fmul double %19, %20
%22 = fneg double %21
%23 = call double @llvm.fmuladd.f64(double %17, double %18, double %22)
%24 = load double, double* %9
%25 = load double, double* %13
%26 = load double, double* %12
%27 = load double, double* %10
%28 = fmul double %26, %27
%29 = fneg double %28
%30 = call double @llvm.fmuladd.f64(double %24, double %25, double %29)
%31 = fdiv double %23, %30
%32 = load double*, double** %15
store double %31, double* %32
%33 = load double, double* %14
%34 = load double, double* %9
%35 = load double, double* %11
%36 = load double, double* %12
%37 = fmul double %35, %36
%38 = fneg double %37
%39 = call double @llvm.fmuladd.f64(double %33, double %34, double %38)
%40 = load double, double* %10
%41 = load double, double* %12
%42 = load double, double* %13
%43 = load double, double* %9
%44 = fmul double %42, %43
%45 = fneg double %44
%46 = call double @llvm.fmuladd.f64(double %40, double %41, double %45)
%47 = fdiv double %39, %46
%48 = load double*, double** %16
store double %47, double* %48
ret void
}

LLVM IR (-O2):
define void @crosspoint(double %0, double %1, double %2, double %3, double %4, double %5, double* nocapture writeonly %6, double* nocapture writeonly %7) {
%9 = fneg double %2
%10 = fmul double %9, %4
%11 = tail call double @llvm.fmuladd.f64(double %5, double %1, double %10)
%12 = fneg double %3
%13 = fmul double %12, %1
%14 = tail call double @llvm.fmuladd.f64(double %0, double %4, double %13)
%15 = fdiv double %11, %14
store double %15, double* %6
%16 = fmul double %9, %3
%17 = tail call double @llvm.fmuladd.f64(double %5, double %0, double %16)
%18 = fneg double %4
%19 = fmul double %18, %0
%20 = tail call double @llvm.fmuladd.f64(double %1, double %3, double %19)
%21 = fdiv double %17, %20
store double %21, double* %7
ret void
}