int flt_add(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_sum((unsigned int *)a, bh & 0x7fffffff, bl, ch & 0x7fffffff, cl);
      ((int *)a)[0] ^= 0x80000000;
    } else
      ok = flt_difference((unsigned int *)a, ch, cl, bh & 0x7fffffff, bl);
  } else if (ch & 0x80000000)
    ok = flt_difference((unsigned int *)a, bh, bl, ch & 0x7fffffff, cl);
  else
    ok = flt_sum((unsigned int *)a, bh, bl, ch, cl);
  return ok;
}


x86 assembly (clang, -O0):
<flt_add>:
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_add+0xbc>
mov    -0x24(%rbp),%eax
and    $0x80000000,%eax
cmp    $0x0,%eax
je     11b6 <flt_add+0x96>
mov    -0x8(%rbp),%rdi
mov    -0x1c(%rbp),%esi
and    $0x7fffffff,%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)
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
xor    $0x80000000,%ecx
mov    %ecx,(%rax)
jmp    11d7 <flt_add+0xb7>
mov    -0x8(%rbp),%rdi
mov    -0x24(%rbp),%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    1233 <flt_add+0x113>
mov    -0x24(%rbp),%eax
and    $0x80000000,%eax
cmp    $0x0,%eax
je     1213 <flt_add+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   1030 <flt_difference@plt>
mov    %eax,-0x2c(%rbp)
jmp    122e <flt_add+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   1040 <flt_sum@plt>
mov    %eax,-0x2c(%rbp)
jmp    1233 <flt_add+0x113>
mov    -0x2c(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @flt_add(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 %50
35: ; preds = %31
%36 = load double*, double** %4
%37 = bitcast double* %36 to i32*
%38 = load i32, i32* %7
%39 = and i32 %38, 2147483647
%40 = load i32, i32* %8
%41 = load i32, i32* %9
%42 = and i32 %41, 2147483647
%43 = load i32, i32* %10
%44 = call i32 (i32*, i32, i32, i32, i32, ...) bitcast (i32 (...)* @flt_sum to i32 (i32*, i32, i32, i32, i32, ...)*)(i32* %37, i32 %39, i32 %40, i32 %42, i32 %43)
store i32 %44, i32* %11
%45 = load double*, double** %4
%46 = bitcast double* %45 to i32*
%47 = getelementptr inbounds i32, i32* %46, i64 0
%48 = load i32, i32* %47
%49 = xor i32 %48, -2147483648
store i32 %49, i32* %47
br label %59
50: ; preds = %31
%51 = load double*, double** %4
%52 = bitcast double* %51 to i32*
%53 = load i32, i32* %9
%54 = load i32, i32* %10
%55 = load i32, i32* %7
%56 = and i32 %55, 2147483647
%57 = load i32, i32* %8
%58 = call i32 (i32*, i32, i32, i32, i32, ...) bitcast (i32 (...)* @flt_difference to i32 (i32*, i32, i32, i32, i32, ...)*)(i32* %52, i32 %53, i32 %54, i32 %56, i32 %57)
store i32 %58, i32* %11
br label %59
59: ; preds = %50, %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_difference 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_sum 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_add(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 %24, label %15
15: ; preds = %3
%16 = and i32 %5, 2147483647
br i1 %13, label %22, label %17
17: ; preds = %15
%18 = and i32 %9, 2147483647
%19 = tail call i32 (i32*, i32, i32, i32, i32, ...) bitcast (i32 (...)* @flt_sum to i32 (i32*, i32, i32, i32, i32, ...)*)(i32* %14, i32 %16, i32 %7, i32 %18, i32 %11)
%20 = load i32, i32* %14
%21 = xor i32 %20, -2147483648
store i32 %21, i32* %14
br label %30
22: ; preds = %15
%23 = tail call i32 (i32*, i32, i32, i32, i32, ...) bitcast (i32 (...)* @flt_difference to i32 (i32*, i32, i32, i32, i32, ...)*)(i32* %14, i32 %9, i32 %11, i32 %16, i32 %7)
br label %30
24: ; preds = %3
br i1 %13, label %28, label %25
25: ; preds = %24
%26 = and i32 %9, 2147483647
%27 = 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 %26, i32 %11)
br label %30
28: ; preds = %24
%29 = 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 %9, i32 %11)
br label %30
30: ; preds = %25, %28, %17, %22
%31 = phi i32 [ %19, %17 ], [ %23, %22 ], [ %27, %25 ], [ %29, %28 ]
ret i32 %31
}