int flt_subtract(a, b, c)
double *a;
double *b;
double *c;
{
  unsigned int bh = ((unsigned int *)b)[0];
  unsigned int bl = ((unsigned int *)b)[1];
  unsigned int ch = ((unsigned int *)c)[0];
  unsigned int cl = ((unsigned int *)c)[1];
  int ok;
  if (bh & 0x80000000) {
    if (ch & 0x80000000)
      ok = flt_difference((unsigned int *)a, ch & 0x7fffffff, cl,
                          bh & 0x7fffffff, bl);
    else {
      ok = flt_sum((unsigned int *)a, bh & 0x7fffffff, bl, ch, cl);
      ((unsigned int *)a)[0] ^= 0x80000000;
    }
  } else if (ch & 0x80000000)
    ok = flt_sum((unsigned int *)a, bh, bl, ch & 0x7fffffff, cl);
  else
    ok = flt_difference((unsigned int *)a, bh, bl, ch, cl);
  return ok;
}


x86 assembly (clang, -O0):
<flt_subtract>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%rax
mov    0x4(%rax),%eax
mov    %eax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x24(%rbp)
mov    -0x18(%rbp),%rax
mov    0x4(%rax),%eax
mov    %eax,-0x28(%rbp)
mov    -0x1c(%rbp),%eax
and    $0x80000000,%eax
cmp    $0x0,%eax
je     11dc <flt_subtract+0xbc>
mov    -0x24(%rbp),%eax
and    $0x80000000,%eax
cmp    $0x0,%eax
je     11a8 <flt_subtract+0x88>
mov    -0x8(%rbp),%rdi
mov    -0x24(%rbp),%esi
and    $0x7fffffff,%esi
mov    -0x28(%rbp),%edx
mov    -0x1c(%rbp),%ecx
and    $0x7fffffff,%ecx
mov    -0x20(%rbp),%r8d
mov    $0x0,%al
call   1030 <flt_difference@plt>
mov    %eax,-0x2c(%rbp)
jmp    11d7 <flt_subtract+0xb7>
mov    -0x8(%rbp),%rdi
mov    -0x1c(%rbp),%esi
and    $0x7fffffff,%esi
mov    -0x20(%rbp),%edx
mov    -0x24(%rbp),%ecx
mov    -0x28(%rbp),%r8d
mov    $0x0,%al
call   1040 <flt_sum@plt>
mov    %eax,-0x2c(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
xor    $0x80000000,%ecx
mov    %ecx,(%rax)
jmp    1233 <flt_subtract+0x113>
mov    -0x24(%rbp),%eax
and    $0x80000000,%eax
cmp    $0x0,%eax
je     1213 <flt_subtract+0xf3>
mov    -0x8(%rbp),%rdi
mov    -0x1c(%rbp),%esi
mov    -0x20(%rbp),%edx
mov    -0x24(%rbp),%ecx
and    $0x7fffffff,%ecx
mov    -0x28(%rbp),%r8d
mov    $0x0,%al
call   1040 <flt_sum@plt>
mov    %eax,-0x2c(%rbp)
jmp    122e <flt_subtract+0x10e>
mov    -0x8(%rbp),%rdi
mov    -0x1c(%rbp),%esi
mov    -0x20(%rbp),%edx
mov    -0x24(%rbp),%ecx
mov    -0x28(%rbp),%r8d
mov    $0x0,%al
call   1030 <flt_difference@plt>
mov    %eax,-0x2c(%rbp)
jmp    1233 <flt_subtract+0x113>
mov    -0x2c(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<flt_subtract>:
push   %rbx
mov    %rdi,%rbx
mov    (%rsi),%eax
mov    0x4(%rsi),%r9d
mov    (%rdx),%ecx
mov    0x4(%rdx),%r8d
test   %eax,%eax
js     1142 <flt_subtract+0x22>
test   %ecx,%ecx
js     1160 <flt_subtract+0x40>
mov    %rbx,%rdi
mov    %eax,%esi
mov    %r9d,%edx
jmp    118e <flt_subtract+0x6e>
test   %ecx,%ecx
js     1176 <flt_subtract+0x56>
and    $0x7fffffff,%eax
mov    %rbx,%rdi
mov    %eax,%esi
mov    %r9d,%edx
xor    %eax,%eax
call   1040 <flt_sum@plt>
xorb   $0x80,0x3(%rbx)
pop    %rbx
ret
and    $0x7fffffff,%ecx
mov    %rbx,%rdi
mov    %eax,%esi
mov    %r9d,%edx
xor    %eax,%eax
pop    %rbx
jmp    1040 <flt_sum@plt>
and    $0x7fffffff,%ecx
and    $0x7fffffff,%eax
mov    %rbx,%rdi
mov    %ecx,%esi
mov    %r8d,%edx
mov    %eax,%ecx
mov    %r9d,%r8d
xor    %eax,%eax
pop    %rbx
jmp    1030 <flt_difference@plt>

LLVM IR (-O0):
define i32 @flt_subtract(double* %0, double* %1, double* %2) {
%4 = alloca double*
%5 = alloca double*
%6 = alloca double*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
store double* %0, double** %4
store double* %1, double** %5
store double* %2, double** %6
%12 = load double*, double** %5
%13 = bitcast double* %12 to i32*
%14 = getelementptr inbounds i32, i32* %13, i64 0
%15 = load i32, i32* %14
store i32 %15, i32* %7
%16 = load double*, double** %5
%17 = bitcast double* %16 to i32*
%18 = getelementptr inbounds i32, i32* %17, i64 1
%19 = load i32, i32* %18
store i32 %19, i32* %8
%20 = load double*, double** %6
%21 = bitcast double* %20 to i32*
%22 = getelementptr inbounds i32, i32* %21, i64 0
%23 = load i32, i32* %22
store i32 %23, i32* %9
%24 = load double*, double** %6
%25 = bitcast double* %24 to i32*
%26 = getelementptr inbounds i32, i32* %25, i64 1
%27 = load i32, i32* %26
store i32 %27, i32* %10
%28 = load i32, i32* %7
%29 = and i32 %28, -2147483648
%30 = icmp ne i32 %29, 0
br i1 %30, label %31, label %60
31: ; preds = %3
%32 = load i32, i32* %9
%33 = and i32 %32, -2147483648
%34 = icmp ne i32 %33, 0
br i1 %34, label %35, label %45
35: ; preds = %31
%36 = load double*, double** %4
%37 = bitcast double* %36 to i32*
%38 = load i32, i32* %9
%39 = and i32 %38, 2147483647
%40 = load i32, i32* %10
%41 = load i32, i32* %7
%42 = and i32 %41, 2147483647
%43 = load i32, i32* %8
%44 = call i32 (i32*, i32, i32, i32, i32, ...) bitcast (i32 (...)* @flt_difference to i32 (i32*, i32, i32, i32, i32, ...)*)(i32* %37, i32 %39, i32 %40, i32 %42, i32 %43)
store i32 %44, i32* %11
br label %59
45: ; preds = %31
%46 = load double*, double** %4
%47 = bitcast double* %46 to i32*
%48 = load i32, i32* %7
%49 = and i32 %48, 2147483647
%50 = load i32, i32* %8
%51 = load i32, i32* %9
%52 = load i32, i32* %10
%53 = call i32 (i32*, i32, i32, i32, i32, ...) bitcast (i32 (...)* @flt_sum to i32 (i32*, i32, i32, i32, i32, ...)*)(i32* %47, i32 %49, i32 %50, i32 %51, i32 %52)
store i32 %53, i32* %11
%54 = load double*, double** %4
%55 = bitcast double* %54 to i32*
%56 = getelementptr inbounds i32, i32* %55, i64 0
%57 = load i32, i32* %56
%58 = xor i32 %57, -2147483648
store i32 %58, i32* %56
br label %59
59: ; preds = %45, %35
br label %82
60: ; preds = %3
%61 = load i32, i32* %9
%62 = and i32 %61, -2147483648
%63 = icmp ne i32 %62, 0
br i1 %63, label %64, label %73
64: ; preds = %60
%65 = load double*, double** %4
%66 = bitcast double* %65 to i32*
%67 = load i32, i32* %7
%68 = load i32, i32* %8
%69 = load i32, i32* %9
%70 = and i32 %69, 2147483647
%71 = load i32, i32* %10
%72 = call i32 (i32*, i32, i32, i32, i32, ...) bitcast (i32 (...)* @flt_sum to i32 (i32*, i32, i32, i32, i32, ...)*)(i32* %66, i32 %67, i32 %68, i32 %70, i32 %71)
store i32 %72, i32* %11
br label %81
73: ; preds = %60
%74 = load double*, double** %4
%75 = bitcast double* %74 to i32*
%76 = load i32, i32* %7
%77 = load i32, i32* %8
%78 = load i32, i32* %9
%79 = load i32, i32* %10
%80 = call i32 (i32*, i32, i32, i32, i32, ...) bitcast (i32 (...)* @flt_difference to i32 (i32*, i32, i32, i32, i32, ...)*)(i32* %75, i32 %76, i32 %77, i32 %78, i32 %79)
store i32 %80, i32* %11
br label %81
81: ; preds = %73, %64
br label %82
82: ; preds = %81, %59
%83 = load i32, i32* %11
ret i32 %83
}

LLVM IR (-O2):
define i32 @flt_subtract(double* %0, double* nocapture %1, double* nocapture %2) {
%4 = bitcast double* %1 to i32*
%5 = load i32, i32* %4
%6 = getelementptr inbounds i32, i32* %4, i64 1
%7 = load i32, i32* %6
%8 = bitcast double* %2 to i32*
%9 = load i32, i32* %8
%10 = getelementptr inbounds i32, i32* %8, i64 1
%11 = load i32, i32* %10
%12 = icmp sgt i32 %5, -1
%13 = icmp sgt i32 %9, -1
%14 = bitcast double* %0 to i32*
br i1 %12, label %25, label %15
15: ; preds = %3
br i1 %13, label %20, label %16
16: ; preds = %15
%17 = and i32 %9, 2147483647
%18 = and i32 %5, 2147483647
%19 = tail call i32 (i32*, i32, i32, i32, i32, ...) bitcast (i32 (...)* @flt_difference to i32 (i32*, i32, i32, i32, i32, ...)*)(i32* %14, i32 %17, i32 %11, i32 %18, i32 %7)
br label %31
20: ; preds = %15
%21 = and i32 %5, 2147483647
%22 = tail call i32 (i32*, i32, i32, i32, i32, ...) bitcast (i32 (...)* @flt_sum to i32 (i32*, i32, i32, i32, i32, ...)*)(i32* %14, i32 %21, i32 %7, i32 %9, i32 %11)
%23 = load i32, i32* %14
%24 = xor i32 %23, -2147483648
store i32 %24, i32* %14
br label %31
25: ; preds = %3
br i1 %13, label %29, label %26
26: ; preds = %25
%27 = and i32 %9, 2147483647
%28 = tail call i32 (i32*, i32, i32, i32, i32, ...) bitcast (i32 (...)* @flt_sum to i32 (i32*, i32, i32, i32, i32, ...)*)(i32* %14, i32 %5, i32 %7, i32 %27, i32 %11)
br label %31
29: ; preds = %25
%30 = tail call i32 (i32*, i32, i32, i32, i32, ...) bitcast (i32 (...)* @flt_difference to i32 (i32*, i32, i32, i32, i32, ...)*)(i32* %14, i32 %5, i32 %7, i32 %9, i32 %11)
br label %31
31: ; preds = %26, %29, %16, %20
%32 = phi i32 [ %19, %16 ], [ %22, %20 ], [ %28, %26 ], [ %30, %29 ]
ret i32 %32
}