int BinUpdate(double *block, double *offset, double *ltm, double *ltv,
              double *cd, double *crpix) {
  extern int status;
  double off[2];
  if (block[0] == 0. || block[1] == 0.)
    return (status = 1991);
  if (block[0] > 1.)
    off[0] = offset[0];
  else
    off[0] = offset[0] * block[0];
  cd[0] *= block[0];
  cd[2] *= block[0];
  ltm[0] /= block[0];
  ltv[0] = (ltv[0] - offset[0] + (block[0] - 1.) / 2.) / block[0];
  crpix[0] = (crpix[0] - offset[0] + (block[0] - 1.) / 2.) / block[0];
  if (block[1] > 1.)
    off[1] = offset[1];
  else
    off[1] = offset[1] * block[1];
  cd[1] *= block[1];
  cd[3] *= block[1];
  ltm[1] /= block[1];
  ltv[1] = (ltv[1] - offset[1] + (block[1] - 1.) / 2.) / block[1];
  crpix[1] = (crpix[1] - offset[1] + (block[1] - 1.) / 2.) / block[1];
  return (status);
}


x86 assembly (clang, -O0):
<BinUpdate>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    %r8,-0x30(%rbp)
mov    %r9,-0x38(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    113c <BinUpdate+0x3c>
jp     113c <BinUpdate+0x3c>
jmp    1158 <BinUpdate+0x58>
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1171 <BinUpdate+0x71>
jp     1171 <BinUpdate+0x71>
mov    0x2e89(%rip),%rax
movl   $0x7c7,(%rax)
movl   $0x7c7,-0x4(%rbp)
jmp    13a8 <BinUpdate+0x2a8>
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
movsd  0xe7f(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    119d <BinUpdate+0x9d>
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x50(%rbp)
jmp    11b2 <BinUpdate+0xb2>
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
mulsd  (%rax),%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x30(%rbp),%rax
mulsd  (%rax),%xmm0
movsd  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x30(%rbp),%rax
mulsd  0x10(%rax),%xmm0
movsd  %xmm0,0x10(%rax)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,(%rax)
mov    -0x28(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x18(%rbp),%rax
subsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm1
movsd  0xdec(%rip),%xmm2
subsd  %xmm2,%xmm1
movsd  0xde8(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
mov    -0x10(%rbp),%rax
divsd  (%rax),%xmm0
mov    -0x28(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x38(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x18(%rbp),%rax
subsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm1
movsd  0xda8(%rip),%xmm2
subsd  %xmm2,%xmm1
movsd  0xda4(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
mov    -0x10(%rbp),%rax
divsd  (%rax),%xmm0
mov    -0x38(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  0xd73(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    12aa <BinUpdate+0x1aa>
mov    -0x18(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x48(%rbp)
jmp    12c1 <BinUpdate+0x1c1>
mov    -0x18(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x10(%rbp),%rax
mulsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x30(%rbp),%rax
mulsd  0x8(%rax),%xmm0
movsd  %xmm0,0x8(%rax)
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x30(%rbp),%rax
mulsd  0x18(%rax),%xmm0
movsd  %xmm0,0x18(%rax)
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm1
mov    -0x20(%rbp),%rax
movsd  0x8(%rax),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,0x8(%rax)
mov    -0x28(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x18(%rbp),%rax
subsd  0x8(%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm1
movsd  0xcd3(%rip),%xmm2
subsd  %xmm2,%xmm1
movsd  0xccf(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
mov    -0x10(%rbp),%rax
divsd  0x8(%rax),%xmm0
mov    -0x28(%rbp),%rax
movsd  %xmm0,0x8(%rax)
mov    -0x38(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x18(%rbp),%rax
subsd  0x8(%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm1
movsd  0xc8a(%rip),%xmm2
subsd  %xmm2,%xmm1
movsd  0xc86(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
mov    -0x10(%rbp),%rax
divsd  0x8(%rax),%xmm0
mov    -0x38(%rbp),%rax
movsd  %xmm0,0x8(%rax)
mov    0x2c45(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<BinUpdate>:
movsd  (%rdi),%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1110 <BinUpdate+0x10>
jnp    111d <BinUpdate+0x1d>
movsd  0x8(%rdi),%xmm2
ucomisd %xmm1,%xmm2
jne    1130 <BinUpdate+0x30>
jp     1130 <BinUpdate+0x30>
mov    0x2ec4(%rip),%rax
movl   $0x7c7,(%rax)
mov    $0x7c7,%eax
ret
mulsd  (%r8),%xmm0
movsd  %xmm0,(%r8)
movsd  (%rdi),%xmm0
mulsd  0x10(%r8),%xmm0
movsd  %xmm0,0x10(%r8)
movsd  (%rdx),%xmm0
divsd  (%rdi),%xmm0
movsd  %xmm0,(%rdx)
movsd  (%rcx),%xmm2
subsd  (%rsi),%xmm2
movsd  (%rdi),%xmm3
movsd  0xe96(%rip),%xmm0
movapd %xmm3,%xmm4
addsd  %xmm0,%xmm4
movsd  0xe8e(%rip),%xmm1
mulsd  %xmm1,%xmm4
addsd  %xmm2,%xmm4
divsd  %xmm3,%xmm4
movsd  %xmm4,(%rcx)
movsd  (%r9),%xmm2
subsd  (%rsi),%xmm2
movsd  (%rdi),%xmm3
movapd %xmm3,%xmm4
addsd  %xmm0,%xmm4
mulsd  %xmm1,%xmm4
addsd  %xmm2,%xmm4
divsd  %xmm3,%xmm4
movsd  %xmm4,(%r9)
movsd  0x8(%rdi),%xmm2
mulsd  0x8(%r8),%xmm2
movsd  %xmm2,0x8(%r8)
movsd  0x8(%rdi),%xmm2
mulsd  0x18(%r8),%xmm2
movsd  %xmm2,0x18(%r8)
movsd  0x8(%rdx),%xmm2
divsd  0x8(%rdi),%xmm2
movsd  %xmm2,0x8(%rdx)
movsd  0x8(%rcx),%xmm2
subsd  0x8(%rsi),%xmm2
movsd  0x8(%rdi),%xmm3
movapd %xmm3,%xmm4
addsd  %xmm0,%xmm4
mulsd  %xmm1,%xmm4
addsd  %xmm2,%xmm4
divsd  %xmm3,%xmm4
movsd  %xmm4,0x8(%rcx)
movsd  0x8(%r9),%xmm2
subsd  0x8(%rsi),%xmm2
movsd  0x8(%rdi),%xmm3
addsd  %xmm3,%xmm0
mulsd  %xmm1,%xmm0
addsd  %xmm2,%xmm0
divsd  %xmm3,%xmm0
movsd  %xmm0,0x8(%r9)
mov    0x2db2(%rip),%rax
mov    (%rax),%eax
ret

LLVM IR (-O0):
@status = external global i32
define i32 @BinUpdate(double* %0, double* %1, double* %2, double* %3, double* %4, double* %5) {
%7 = alloca i32
%8 = alloca double*
%9 = alloca double*
%10 = alloca double*
%11 = alloca double*
%12 = alloca double*
%13 = alloca double*
%14 = alloca [2 x double]
store double* %0, double** %8
store double* %1, double** %9
store double* %2, double** %10
store double* %3, double** %11
store double* %4, double** %12
store double* %5, double** %13
%15 = load double*, double** %8
%16 = getelementptr inbounds double, double* %15, i64 0
%17 = load double, double* %16
%18 = fcmp oeq double %17, 0.000000e+00
br i1 %18, label %24, label %19
19: ; preds = %6
%20 = load double*, double** %8
%21 = getelementptr inbounds double, double* %20, i64 1
%22 = load double, double* %21
%23 = fcmp oeq double %22, 0.000000e+00
br i1 %23, label %24, label %25
24: ; preds = %19, %6
store i32 1991, i32* @status
store i32 1991, i32* %7
br label %183
25: ; preds = %19
%26 = load double*, double** %8
%27 = getelementptr inbounds double, double* %26, i64 0
%28 = load double, double* %27
%29 = fcmp ogt double %28, 1.000000e+00
br i1 %29, label %30, label %35
30: ; preds = %25
%31 = load double*, double** %9
%32 = getelementptr inbounds double, double* %31, i64 0
%33 = load double, double* %32
%34 = getelementptr inbounds [2 x double], [2 x double]* %14, i64 0, i64 0
store double %33, double* %34
br label %44
35: ; preds = %25
%36 = load double*, double** %9
%37 = getelementptr inbounds double, double* %36, i64 0
%38 = load double, double* %37
%39 = load double*, double** %8
%40 = getelementptr inbounds double, double* %39, i64 0
%41 = load double, double* %40
%42 = fmul double %38, %41
%43 = getelementptr inbounds [2 x double], [2 x double]* %14, i64 0, i64 0
store double %42, double* %43
br label %44
44: ; preds = %35, %30
%45 = load double*, double** %8
%46 = getelementptr inbounds double, double* %45, i64 0
%47 = load double, double* %46
%48 = load double*, double** %12
%49 = getelementptr inbounds double, double* %48, i64 0
%50 = load double, double* %49
%51 = fmul double %50, %47
store double %51, double* %49
%52 = load double*, double** %8
%53 = getelementptr inbounds double, double* %52, i64 0
%54 = load double, double* %53
%55 = load double*, double** %12
%56 = getelementptr inbounds double, double* %55, i64 2
%57 = load double, double* %56
%58 = fmul double %57, %54
store double %58, double* %56
%59 = load double*, double** %8
%60 = getelementptr inbounds double, double* %59, i64 0
%61 = load double, double* %60
%62 = load double*, double** %10
%63 = getelementptr inbounds double, double* %62, i64 0
%64 = load double, double* %63
%65 = fdiv double %64, %61
store double %65, double* %63
%66 = load double*, double** %11
%67 = getelementptr inbounds double, double* %66, i64 0
%68 = load double, double* %67
%69 = load double*, double** %9
%70 = getelementptr inbounds double, double* %69, i64 0
%71 = load double, double* %70
%72 = fsub double %68, %71
%73 = load double*, double** %8
%74 = getelementptr inbounds double, double* %73, i64 0
%75 = load double, double* %74
%76 = fsub double %75, 1.000000e+00
%77 = fdiv double %76, 2.000000e+00
%78 = fadd double %72, %77
%79 = load double*, double** %8
%80 = getelementptr inbounds double, double* %79, i64 0
%81 = load double, double* %80
%82 = fdiv double %78, %81
%83 = load double*, double** %11
%84 = getelementptr inbounds double, double* %83, i64 0
store double %82, double* %84
%85 = load double*, double** %13
%86 = getelementptr inbounds double, double* %85, i64 0
%87 = load double, double* %86
%88 = load double*, double** %9
%89 = getelementptr inbounds double, double* %88, i64 0
%90 = load double, double* %89
%91 = fsub double %87, %90
%92 = load double*, double** %8
%93 = getelementptr inbounds double, double* %92, i64 0
%94 = load double, double* %93
%95 = fsub double %94, 1.000000e+00
%96 = fdiv double %95, 2.000000e+00
%97 = fadd double %91, %96
%98 = load double*, double** %8
%99 = getelementptr inbounds double, double* %98, i64 0
%100 = load double, double* %99
%101 = fdiv double %97, %100
%102 = load double*, double** %13
%103 = getelementptr inbounds double, double* %102, i64 0
store double %101, double* %103
%104 = load double*, double** %8
%105 = getelementptr inbounds double, double* %104, i64 1
%106 = load double, double* %105
%107 = fcmp ogt double %106, 1.000000e+00
br i1 %107, label %108, label %113
108: ; preds = %44
%109 = load double*, double** %9
%110 = getelementptr inbounds double, double* %109, i64 1
%111 = load double, double* %110
%112 = getelementptr inbounds [2 x double], [2 x double]* %14, i64 0, i64 1
store double %111, double* %112
br label %122
113: ; preds = %44
%114 = load double*, double** %9
%115 = getelementptr inbounds double, double* %114, i64 1
%116 = load double, double* %115
%117 = load double*, double** %8
%118 = getelementptr inbounds double, double* %117, i64 1
%119 = load double, double* %118
%120 = fmul double %116, %119
%121 = getelementptr inbounds [2 x double], [2 x double]* %14, i64 0, i64 1
store double %120, double* %121
br label %122
122: ; preds = %113, %108
%123 = load double*, double** %8
%124 = getelementptr inbounds double, double* %123, i64 1
%125 = load double, double* %124
%126 = load double*, double** %12
%127 = getelementptr inbounds double, double* %126, i64 1
%128 = load double, double* %127
%129 = fmul double %128, %125
store double %129, double* %127
%130 = load double*, double** %8
%131 = getelementptr inbounds double, double* %130, i64 1
%132 = load double, double* %131
%133 = load double*, double** %12
%134 = getelementptr inbounds double, double* %133, i64 3
%135 = load double, double* %134
%136 = fmul double %135, %132
store double %136, double* %134
%137 = load double*, double** %8
%138 = getelementptr inbounds double, double* %137, i64 1
%139 = load double, double* %138
%140 = load double*, double** %10
%141 = getelementptr inbounds double, double* %140, i64 1
%142 = load double, double* %141
%143 = fdiv double %142, %139
store double %143, double* %141
%144 = load double*, double** %11
%145 = getelementptr inbounds double, double* %144, i64 1
%146 = load double, double* %145
%147 = load double*, double** %9
%148 = getelementptr inbounds double, double* %147, i64 1
%149 = load double, double* %148
%150 = fsub double %146, %149
%151 = load double*, double** %8
%152 = getelementptr inbounds double, double* %151, i64 1
%153 = load double, double* %152
%154 = fsub double %153, 1.000000e+00
%155 = fdiv double %154, 2.000000e+00
%156 = fadd double %150, %155
%157 = load double*, double** %8
%158 = getelementptr inbounds double, double* %157, i64 1
%159 = load double, double* %158
%160 = fdiv double %156, %159
%161 = load double*, double** %11
%162 = getelementptr inbounds double, double* %161, i64 1
store double %160, double* %162
%163 = load double*, double** %13
%164 = getelementptr inbounds double, double* %163, i64 1
%165 = load double, double* %164
%166 = load double*, double** %9
%167 = getelementptr inbounds double, double* %166, i64 1
%168 = load double, double* %167
%169 = fsub double %165, %168
%170 = load double*, double** %8
%171 = getelementptr inbounds double, double* %170, i64 1
%172 = load double, double* %171
%173 = fsub double %172, 1.000000e+00
%174 = fdiv double %173, 2.000000e+00
%175 = fadd double %169, %174
%176 = load double*, double** %8
%177 = getelementptr inbounds double, double* %176, i64 1
%178 = load double, double* %177
%179 = fdiv double %175, %178
%180 = load double*, double** %13
%181 = getelementptr inbounds double, double* %180, i64 1
store double %179, double* %181
%182 = load i32, i32* @status
store i32 %182, i32* %7
br label %183
183: ; preds = %122, %24
%184 = load i32, i32* %7
ret i32 %184
}

LLVM IR (-O2):
@status = external global i32
define i32 @BinUpdate(double* nocapture %0, double* nocapture %1, double* nocapture %2, double* nocapture %3, double* nocapture %4, double* nocapture %5) {
%7 = load double, double* %0
%8 = fcmp oeq double %7, 0.000000e+00
br i1 %8, label %13, label %9
9: ; preds = %6
%10 = getelementptr inbounds double, double* %0, i64 1
%11 = load double, double* %10
%12 = fcmp oeq double %11, 0.000000e+00
br i1 %12, label %13, label %14
13: ; preds = %9, %6
store i32 1991, i32* @status
br label %72
14: ; preds = %9
%15 = load double, double* %4
%16 = fmul double %7, %15
store double %16, double* %4
%17 = load double, double* %0
%18 = getelementptr inbounds double, double* %4, i64 2
%19 = load double, double* %18
%20 = fmul double %17, %19
store double %20, double* %18
%21 = load double, double* %0
%22 = load double, double* %2
%23 = fdiv double %22, %21
store double %23, double* %2
%24 = load double, double* %3
%25 = load double, double* %1
%26 = fsub double %24, %25
%27 = load double, double* %0
%28 = fadd double %27, -1.000000e+00
%29 = fmul double %28, 5.000000e-01
%30 = fadd double %26, %29
%31 = fdiv double %30, %27
store double %31, double* %3
%32 = load double, double* %5
%33 = load double, double* %1
%34 = fsub double %32, %33
%35 = load double, double* %0
%36 = fadd double %35, -1.000000e+00
%37 = fmul double %36, 5.000000e-01
%38 = fadd double %34, %37
%39 = fdiv double %38, %35
store double %39, double* %5
%40 = load double, double* %10
%41 = getelementptr inbounds double, double* %4, i64 1
%42 = load double, double* %41
%43 = fmul double %40, %42
store double %43, double* %41
%44 = load double, double* %10
%45 = getelementptr inbounds double, double* %4, i64 3
%46 = load double, double* %45
%47 = fmul double %44, %46
store double %47, double* %45
%48 = load double, double* %10
%49 = getelementptr inbounds double, double* %2, i64 1
%50 = load double, double* %49
%51 = fdiv double %50, %48
store double %51, double* %49
%52 = getelementptr inbounds double, double* %3, i64 1
%53 = load double, double* %52
%54 = getelementptr inbounds double, double* %1, i64 1
%55 = load double, double* %54
%56 = fsub double %53, %55
%57 = load double, double* %10
%58 = fadd double %57, -1.000000e+00
%59 = fmul double %58, 5.000000e-01
%60 = fadd double %56, %59
%61 = fdiv double %60, %57
store double %61, double* %52
%62 = getelementptr inbounds double, double* %5, i64 1
%63 = load double, double* %62
%64 = load double, double* %54
%65 = fsub double %63, %64
%66 = load double, double* %10
%67 = fadd double %66, -1.000000e+00
%68 = fmul double %67, 5.000000e-01
%69 = fadd double %65, %68
%70 = fdiv double %69, %66
store double %70, double* %62
%71 = load i32, i32* @status
br label %72
72: ; preds = %14, %13
%73 = phi i32 [ 1991, %13 ], [ %71, %14 ]
ret i32 %73
}