__complex double __go_complex128_div(__complex double a, __complex double b) {
  if (__builtin_expect(b == 0 + 0i, 0)) {
    if (!__builtin_isinf(__real__ a) && !__builtin_isinf(__imag__ a) &&
        (__builtin_isnan(__real__ a) || __builtin_isnan(__imag__ a))) {
      return __builtin_nan("1") + __builtin_nan("1") * 1i;
    }
  }
  return a / b;
}


x86 assembly (clang, -O0):
<__go_complex128_div>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movsd  %xmm0,-0x20(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  %xmm2,-0x30(%rbp)
movsd  %xmm3,-0x28(%rbp)
movsd  -0x30(%rbp),%xmm1
movsd  -0x28(%rbp),%xmm0
xorps  %xmm2,%xmm2
ucomisd %xmm2,%xmm1
sete   %al
setnp  %cl
and    %cl,%al
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
sete   %cl
setnp  %dl
and    %dl,%cl
and    %cl,%al
and    $0x1,%al
movzbl %al,%eax
cltq
cmp    $0x0,%rax
je     1266 <__go_complex128_div+0x166>
movsd  -0x20(%rbp),%xmm0
movaps 0xebd(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  0xe91(%rip),%xmm1
ucomisd %xmm1,%xmm0
jne    1184 <__go_complex128_div+0x84>
jp     1184 <__go_complex128_div+0x84>
jmp    1261 <__go_complex128_div+0x161>
movsd  -0x18(%rbp),%xmm0
movaps 0xe90(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  0xe64(%rip),%xmm1
ucomisd %xmm1,%xmm0
jne    11b1 <__go_complex128_div+0xb1>
jp     11b1 <__go_complex128_div+0xb1>
jmp    1261 <__go_complex128_div+0x161>
movsd  -0x20(%rbp),%xmm0
ucomisd %xmm0,%xmm0
jp     11cf <__go_complex128_div+0xcf>
movsd  -0x18(%rbp),%xmm0
ucomisd %xmm0,%xmm0
jnp    1261 <__go_complex128_div+0x161>
movsd  0xe31(%rip),%xmm1
mov    $0x1,%al
test   $0x1,%al
movaps %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  %xmm1,-0x38(%rbp)
jne    11f3 <__go_complex128_div+0xf3>
jmp    123c <__go_complex128_div+0x13c>
movsd  0xe0d(%rip),%xmm1
mov    $0x1,%al
test   $0x1,%al
movaps %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  %xmm1,-0x38(%rbp)
jne    1217 <__go_complex128_div+0x117>
jmp    123c <__go_complex128_div+0x13c>
movsd  0xde9(%rip),%xmm0
xorps  %xmm2,%xmm2
movsd  0xde6(%rip),%xmm3
movaps %xmm2,%xmm1
call   12a0 <__muldc3>
movsd  %xmm0,-0x40(%rbp)
movsd  %xmm1,-0x38(%rbp)
movsd  -0x40(%rbp),%xmm2
movsd  -0x38(%rbp),%xmm0
movsd  0xdba(%rip),%xmm1
addsd  %xmm2,%xmm1
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm0,-0x8(%rbp)
jmp    1289 <__go_complex128_div+0x189>
jmp    1266 <__go_complex128_div+0x166>
movsd  -0x20(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  -0x30(%rbp),%xmm2
movsd  -0x28(%rbp),%xmm3
call   1560 <__divdc3>
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x8(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
add    $0x40,%rsp
pop    %rbp
ret
nopl   0x0(%rax)

x86 assembly (clang, -O2):
<__go_complex128_div>:
push   %rax
xorpd  %xmm4,%xmm4
ucomisd %xmm4,%xmm2
jne    1115 <__go_complex128_div+0x15>
jp     1115 <__go_complex128_div+0x15>
ucomisd %xmm4,%xmm3
jne    1115 <__go_complex128_div+0x15>
jnp    111c <__go_complex128_div+0x1c>
call   1440 <__divdc3>
pop    %rax
ret
ucomisd %xmm1,%xmm0
jnp    1115 <__go_complex128_div+0x15>
movapd 0xed6(%rip),%xmm4
movapd %xmm0,%xmm5
andpd  %xmm4,%xmm5
ucomisd 0xed6(%rip),%xmm5
jae    1115 <__go_complex128_div+0x15>
andpd  %xmm1,%xmm4
ucomisd 0xec8(%rip),%xmm4
jae    1115 <__go_complex128_div+0x15>
movsd  0xec6(%rip),%xmm0
movsd  0xec6(%rip),%xmm3
xorpd  %xmm1,%xmm1
xorpd  %xmm2,%xmm2
call   1180 <__muldc3>
movsd  0xea9(%rip),%xmm0
pop    %rax
ret
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)

LLVM IR (-O0):
define { double, double } @__go_complex128_div(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 }* %7, i32 0, i32 0
%13 = load double, double* %12
%14 = getelementptr inbounds { double, double }, { double, double }* %7, i32 0, i32 1
%15 = load double, double* %14
%16 = fcmp oeq double %13, 0.000000e+00
%17 = fcmp oeq double %15, 0.000000e+00
%18 = and i1 %16, %17
%19 = zext i1 %18 to i32
%20 = sext i32 %19 to i64
%21 = icmp ne i64 %20, 0
br i1 %21, label %22, label %53
22: ; preds = %4
%23 = getelementptr inbounds { double, double }, { double, double }* %6, i32 0, i32 0
%24 = load double, double* %23
%25 = call double @llvm.fabs.f64(double %24)
%26 = fcmp oeq double %25, 0x7FF0000000000000
br i1 %26, label %52, label %27
27: ; preds = %22
%28 = getelementptr inbounds { double, double }, { double, double }* %6, i32 0, i32 1
%29 = load double, double* %28
%30 = call double @llvm.fabs.f64(double %29)
%31 = fcmp oeq double %30, 0x7FF0000000000000
br i1 %31, label %52, label %32
32: ; preds = %27
%33 = getelementptr inbounds { double, double }, { double, double }* %6, i32 0, i32 0
%34 = load double, double* %33
%35 = fcmp uno double %34, %34
br i1 %35, label %40, label %36
36: ; preds = %32
%37 = getelementptr inbounds { double, double }, { double, double }* %6, i32 0, i32 1
%38 = load double, double* %37
%39 = fcmp uno double %38, %38
br i1 %39, label %40, label %52
40: ; preds = %36, %32
br i1 true, label %41, label %46
41: ; preds = %40
br i1 true, label %42, label %46
42: ; preds = %41
%43 = call { double, double } @__muldc3(double 0x7FF8000000000001, double 0.000000e+00, double 0.000000e+00, double 1.000000e+00)
%44 = extractvalue { double, double } %43, 0
%45 = extractvalue { double, double } %43, 1
br label %46
46: ; preds = %42, %41, %40
%47 = phi double [ 0x7FF8000000000001, %40 ], [ 0x7FF8000000000001, %41 ], [ %44, %42 ]
%48 = phi double [ 0x7FF8000000000001, %40 ], [ 0x7FF8000000000001, %41 ], [ %45, %42 ]
%49 = fadd double 0x7FF8000000000001, %47
%50 = getelementptr inbounds { double, double }, { double, double }* %5, i32 0, i32 0
%51 = getelementptr inbounds { double, double }, { double, double }* %5, i32 0, i32 1
store double %49, double* %50
store double %48, double* %51
br label %67
52: ; preds = %36, %27, %22
br label %53
53: ; preds = %52, %4
%54 = getelementptr inbounds { double, double }, { double, double }* %6, i32 0, i32 0
%55 = load double, double* %54
%56 = getelementptr inbounds { double, double }, { double, double }* %6, i32 0, i32 1
%57 = load double, double* %56
%58 = getelementptr inbounds { double, double }, { double, double }* %7, i32 0, i32 0
%59 = load double, double* %58
%60 = getelementptr inbounds { double, double }, { double, double }* %7, i32 0, i32 1
%61 = load double, double* %60
%62 = call { double, double } @__divdc3(double %55, double %57, double %59, double %61)
%63 = extractvalue { double, double } %62, 0
%64 = extractvalue { double, double } %62, 1
%65 = getelementptr inbounds { double, double }, { double, double }* %5, i32 0, i32 0
%66 = getelementptr inbounds { double, double }, { double, double }* %5, i32 0, i32 1
store double %63, double* %65
store double %64, double* %66
br label %67
67: ; preds = %53, %46
%68 = load { double, double }, { double, double }* %5
ret { double, double } %68
}

LLVM IR (-O2):
define { double, double } @__go_complex128_div(double %0, double %1, double %2, double %3) {
%5 = fcmp oeq double %2, 0.000000e+00
%6 = fcmp oeq double %3, 0.000000e+00
%7 = and i1 %5, %6
br i1 %7, label %8, label %18
8: ; preds = %4
%9 = tail call double @llvm.fabs.f64(double %0)
%10 = fcmp une double %9, 0x7FF0000000000000
%11 = tail call double @llvm.fabs.f64(double %1)
%12 = fcmp une double %11, 0x7FF0000000000000
%13 = select i1 %10, i1 %12, i1 false
%14 = fcmp uno double %0, %1
%15 = and i1 %14, %13
br i1 %15, label %16, label %18
16: ; preds = %8
%17 = tail call { double, double } @__muldc3(double 0x7FF8000000000001, double 0.000000e+00, double 0.000000e+00, double 1.000000e+00)
br label %21
18: ; preds = %8, %4
%19 = tail call { double, double } @__divdc3(double %0, double %1, double %2, double %3)
%20 = extractvalue { double, double } %19, 0
br label %21
21: ; preds = %18, %16
%22 = phi double [ %20, %18 ], [ 0x7FF8000000000001, %16 ]
%23 = phi { double, double } [ %19, %18 ], [ %17, %16 ]
%24 = extractvalue { double, double } %23, 1
%25 = insertvalue { double, double } poison, double %22, 0
%26 = insertvalue { double, double } %25, double %24, 1
ret { double, double } %26
}