double _Complex mul_double_cc(double _Complex a, double _Complex b) {
  return a * b;
}


x86 assembly (clang, -O0):
<mul_double_cc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movsd  %xmm0,-0x20(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  %xmm2,-0x30(%rbp)
movsd  %xmm3,-0x28(%rbp)
movsd  -0x20(%rbp),%xmm1
movsd  %xmm1,-0x70(%rbp)
movsd  -0x18(%rbp),%xmm2
movsd  %xmm2,-0x68(%rbp)
movsd  -0x30(%rbp),%xmm4
movsd  %xmm4,-0x60(%rbp)
movsd  -0x28(%rbp),%xmm5
movsd  %xmm5,-0x58(%rbp)
movaps %xmm1,%xmm0
mulsd  %xmm4,%xmm0
movaps %xmm2,%xmm3
mulsd  %xmm5,%xmm3
mulsd  %xmm5,%xmm1
mulsd  %xmm4,%xmm2
subsd  %xmm3,%xmm0
movsd  %xmm0,-0x50(%rbp)
addsd  %xmm2,%xmm1
movsd  %xmm1,-0x48(%rbp)
ucomisd %xmm0,%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  %xmm1,-0x38(%rbp)
jnp    11c1 <mul_double_cc+0xc1>
movsd  -0x48(%rbp),%xmm1
movsd  -0x50(%rbp),%xmm0
ucomisd %xmm1,%xmm1
movsd  %xmm0,-0x40(%rbp)
movsd  %xmm1,-0x38(%rbp)
jnp    11c1 <mul_double_cc+0xc1>
movsd  -0x58(%rbp),%xmm3
movsd  -0x60(%rbp),%xmm2
movsd  -0x68(%rbp),%xmm1
movsd  -0x70(%rbp),%xmm0
call   11f0 <__muldc3>
movsd  %xmm0,-0x40(%rbp)
movsd  %xmm1,-0x38(%rbp)
movsd  -0x40(%rbp),%xmm1
movsd  -0x38(%rbp),%xmm0
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm0,-0x8(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
add    $0x70,%rsp
pop    %rbp
ret
cs nopw 0x0(%rax,%rax,1)
nop

x86 assembly (clang, -O2):
<mul_double_cc>:
movapd %xmm0,%xmm5
mulsd  %xmm2,%xmm0
movapd %xmm1,%xmm4
mulsd  %xmm3,%xmm4
subsd  %xmm4,%xmm0
movapd %xmm5,%xmm6
mulsd  %xmm3,%xmm6
movapd %xmm1,%xmm4
mulsd  %xmm2,%xmm4
addsd  %xmm6,%xmm4
ucomisd %xmm0,%xmm0
jp     1133 <mul_double_cc+0x33>
movapd %xmm4,%xmm1
ret
ucomisd %xmm4,%xmm4
jnp    112e <mul_double_cc+0x2e>
push   %rax
movapd %xmm5,%xmm0
call   1150 <__muldc3>
movapd %xmm1,%xmm4
add    $0x8,%rsp
movapd %xmm4,%xmm1
ret

LLVM IR (-O0):
define { double, double } @mul_double_cc(double %0, double %1, double %2, double %3) {
%5 = alloca { double, double }
%6 = alloca { double, double }
%7 = alloca { double, double }
%8 = getelementptr inbounds { double, double }, { double, double }* %6, i32 0, i32 0
store double %0, double* %8
%9 = getelementptr inbounds { double, double }, { double, double }* %6, i32 0, i32 1
store double %1, double* %9
%10 = getelementptr inbounds { double, double }, { double, double }* %7, i32 0, i32 0
store double %2, double* %10
%11 = getelementptr inbounds { double, double }, { double, double }* %7, i32 0, i32 1
store double %3, double* %11
%12 = getelementptr inbounds { double, double }, { double, double }* %6, i32 0, i32 0
%13 = load double, double* %12
%14 = getelementptr inbounds { double, double }, { double, double }* %6, i32 0, i32 1
%15 = load double, double* %14
%16 = getelementptr inbounds { double, double }, { double, double }* %7, i32 0, i32 0
%17 = load double, double* %16
%18 = getelementptr inbounds { double, double }, { double, double }* %7, i32 0, i32 1
%19 = load double, double* %18
%20 = fmul double %13, %17
%21 = fmul double %15, %19
%22 = fmul double %13, %19
%23 = fmul double %15, %17
%24 = fsub double %20, %21
%25 = fadd double %22, %23
%26 = fcmp uno double %24, %24
br i1 %26, label %27, label %33
27: ; preds = %4
%28 = fcmp uno double %25, %25
br i1 %28, label %29, label %33
29: ; preds = %27
%30 = call { double, double } @__muldc3(double %13, double %15, double %17, double %19)
%31 = extractvalue { double, double } %30, 0
%32 = extractvalue { double, double } %30, 1
br label %33
33: ; preds = %29, %27, %4
%34 = phi double [ %24, %4 ], [ %24, %27 ], [ %31, %29 ]
%35 = phi double [ %25, %4 ], [ %25, %27 ], [ %32, %29 ]
%36 = getelementptr inbounds { double, double }, { double, double }* %5, i32 0, i32 0
%37 = getelementptr inbounds { double, double }, { double, double }* %5, i32 0, i32 1
store double %34, double* %36
store double %35, double* %37
%38 = load { double, double }, { double, double }* %5
ret { double, double } %38
}

LLVM IR (-O2):
define { double, double } @mul_double_cc(double %0, double %1, double %2, double %3) {
%5 = fmul double %0, %2
%6 = fmul double %1, %3
%7 = fmul double %0, %3
%8 = fmul double %1, %2
%9 = fsub double %5, %6
%10 = fadd double %8, %7
%11 = fcmp uno double %9, 0.000000e+00
br i1 %11, label %12, label %18
12: ; preds = %4
%13 = fcmp uno double %10, 0.000000e+00
br i1 %13, label %14, label %18
14: ; preds = %12
%15 = tail call { double, double } @__muldc3(double %0, double %1, double %2, double %3)
%16 = extractvalue { double, double } %15, 0
%17 = extractvalue { double, double } %15, 1
br label %18
18: ; preds = %14, %12, %4
%19 = phi double [ %9, %4 ], [ %9, %12 ], [ %16, %14 ]
%20 = phi double [ %10, %4 ], [ %10, %12 ], [ %17, %14 ]
%21 = insertvalue { double, double } poison, double %19, 0
%22 = insertvalue { double, double } %21, double %20, 1
ret { double, double } %22
}