__complex__ double xcexp(__complex__ double x) {
  double r;
  r = g0(__real__ x);
  __real__ x = r * g1(__imag__ x);
  __imag__ x = r * g2(__imag__ x);
  return x;
}


x86 assembly (clang, -O0):
<xcexp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movsd  %xmm0,-0x20(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  -0x20(%rbp),%xmm0
mov    $0x1,%al
mov    %al,-0x31(%rbp)
call   1040 <g0@plt>
mov    %eax,%ecx
mov    -0x31(%rbp),%al
cvtsi2sd %ecx,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x18(%rbp),%xmm0
call   1030 <g1@plt>
movsd  -0x40(%rbp),%xmm0
mov    %eax,%ecx
mov    -0x31(%rbp),%al
cvtsi2sd %ecx,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x18(%rbp),%xmm0
call   1050 <g2@plt>
movsd  -0x30(%rbp),%xmm0
cvtsi2sd %eax,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x20(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm0
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm0,-0x8(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xcexp>:
sub    $0x18,%rsp
movsd  %xmm1,0x8(%rsp)
mov    $0x1,%al
call   1040 <g0@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,(%rsp)
movsd  0x8(%rsp),%xmm0
mov    $0x1,%al
call   1030 <g1@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  (%rsp),%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  0x8(%rsp),%xmm0
mov    $0x1,%al
call   1050 <g2@plt>
xorps  %xmm1,%xmm1
cvtsi2sd %eax,%xmm1
mulsd  (%rsp),%xmm1
movsd  0x10(%rsp),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define { double, double } @xcexp(double %0, double %1) {
%3 = alloca { double, double }
%4 = alloca { double, double }
%5 = alloca double
%6 = getelementptr inbounds { double, double }, { double, double }* %4, i32 0, i32 0
store double %0, double* %6
%7 = getelementptr inbounds { double, double }, { double, double }* %4, i32 0, i32 1
store double %1, double* %7
%8 = getelementptr inbounds { double, double }, { double, double }* %4, i32 0, i32 0
%9 = load double, double* %8
%10 = call i32 (double, ...) bitcast (i32 (...)* @g0 to i32 (double, ...)*)(double %9)
%11 = sitofp i32 %10 to double
store double %11, double* %5
%12 = load double, double* %5
%13 = getelementptr inbounds { double, double }, { double, double }* %4, i32 0, i32 1
%14 = load double, double* %13
%15 = call i32 (double, ...) bitcast (i32 (...)* @g1 to i32 (double, ...)*)(double %14)
%16 = sitofp i32 %15 to double
%17 = fmul double %12, %16
%18 = getelementptr inbounds { double, double }, { double, double }* %4, i32 0, i32 0
store double %17, double* %18
%19 = load double, double* %5
%20 = getelementptr inbounds { double, double }, { double, double }* %4, i32 0, i32 1
%21 = load double, double* %20
%22 = call i32 (double, ...) bitcast (i32 (...)* @g2 to i32 (double, ...)*)(double %21)
%23 = sitofp i32 %22 to double
%24 = fmul double %19, %23
%25 = getelementptr inbounds { double, double }, { double, double }* %4, i32 0, i32 1
store double %24, double* %25
%26 = getelementptr inbounds { double, double }, { double, double }* %4, i32 0, i32 0
%27 = load double, double* %26
%28 = getelementptr inbounds { double, double }, { double, double }* %4, i32 0, i32 1
%29 = load double, double* %28
%30 = getelementptr inbounds { double, double }, { double, double }* %3, i32 0, i32 0
%31 = getelementptr inbounds { double, double }, { double, double }* %3, i32 0, i32 1
store double %27, double* %30
store double %29, double* %31
%32 = load { double, double }, { double, double }* %3
ret { double, double } %32
}

LLVM IR (-O2):
define { double, double } @xcexp(double %0, double %1) {
%3 = tail call i32 (double, ...) bitcast (i32 (...)* @g0 to i32 (double, ...)*)(double %0)
%4 = sitofp i32 %3 to double
%5 = tail call i32 (double, ...) bitcast (i32 (...)* @g1 to i32 (double, ...)*)(double %1)
%6 = sitofp i32 %5 to double
%7 = fmul double %4, %6
%8 = tail call i32 (double, ...) bitcast (i32 (...)* @g2 to i32 (double, ...)*)(double %1)
%9 = sitofp i32 %8 to double
%10 = fmul double %4, %9
%11 = insertvalue { double, double } poison, double %7, 0
%12 = insertvalue { double, double } %11, double %10, 1
ret { double, double } %12
}