void achtds(v1, v2, npix, direction, hasscale, dirale, bzero) double *v1;
short *v2;
int npix;
int direction;
int hasscale;
double dirale;
double bzero;
{
  if (hasscale) {
    if (direction) {
      while (npix--)
        v1[npix] = v2[npix] * dirale + bzero;
    } else {
      while (npix--)
        v1[npix] = (v2[npix] - bzero) / dirale;
    }
  } else {
    while (npix--)
      v1[npix] = v2[npix];
  }
}


x86 assembly (clang, -O0):
<achtds>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    %r8d,-0x1c(%rbp)
movsd  %xmm0,-0x28(%rbp)
movsd  %xmm1,-0x30(%rbp)
cmpl   $0x0,-0x1c(%rbp)
je     11d5 <achtds+0xd5>
cmpl   $0x0,-0x18(%rbp)
je     1186 <achtds+0x86>
jmp    1139 <achtds+0x39>
mov    -0x14(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x14(%rbp)
cmp    $0x0,%eax
je     1181 <achtds+0x81>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movswl (%rax,%rcx,2),%eax
cvtsi2sd %eax,%xmm0
movsd  -0x28(%rbp),%xmm2
movsd  -0x30(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
jmp    1139 <achtds+0x39>
jmp    11d0 <achtds+0xd0>
jmp    118b <achtds+0x8b>
mov    -0x14(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x14(%rbp)
cmp    $0x0,%eax
je     11cb <achtds+0xcb>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movswl (%rax,%rcx,2),%eax
cvtsi2sd %eax,%xmm0
subsd  -0x30(%rbp),%xmm0
divsd  -0x28(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
jmp    118b <achtds+0x8b>
jmp    11d0 <achtds+0xd0>
jmp    1215 <achtds+0x115>
jmp    11da <achtds+0xda>
mov    -0x14(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x14(%rbp)
cmp    $0x0,%eax
je     1210 <achtds+0x110>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movswl (%rax,%rcx,2),%eax
cvtsi2sd %eax,%xmm0
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
jmp    11da <achtds+0xda>
jmp    1215 <achtds+0x115>
pop    %rbp
ret

x86 assembly (clang, -O2):
<achtds>:
push   %rbx
test   %r8d,%r8d
je     112d <achtds+0x2d>
test   %ecx,%ecx
je     1292 <achtds+0x192>
test   %edx,%edx
je     1495 <achtds+0x395>
movslq %edx,%rcx
add    $0xffffffff,%edx
cmp    $0x3,%edx
jae    13ca <achtds+0x2ca>
mov    %rcx,%rax
jmp    1470 <achtds+0x370>
test   %edx,%edx
je     1495 <achtds+0x395>
movslq %edx,%rax
add    $0xffffffff,%edx
cmp    $0x3,%edx
jb     1270 <achtds+0x170>
add    $0x1,%rdx
mov    %rdx,%r8
and    $0xfffffffffffffffc,%r8
lea    -0x4(%r8),%rcx
mov    %rcx,%r9
shr    $0x2,%r9
add    $0x1,%r9
test   %rcx,%rcx
je     1497 <achtds+0x397>
mov    %r9,%r10
and    $0xfffffffffffffffe,%r10
lea    (%rdi,%rax,8),%r11
add    $0xfffffffffffffff0,%r11
lea    (%rsi,%rax,2),%rbx
add    $0xfffffffffffffffc,%rbx
mov    $0xfffffffffffffffe,%rcx
cs nopw 0x0(%rax,%rax,1)
nop
movd   0x4(%rbx,%rcx,2),%xmm0
movd   (%rbx,%rcx,2),%xmm1
pshuflw $0x24,%xmm0,%xmm0
psrad  $0x10,%xmm0
cvtdq2pd %xmm0,%xmm0
pshuflw $0x24,%xmm1,%xmm1
psrad  $0x10,%xmm1
cvtdq2pd %xmm1,%xmm1
shufps $0x4e,%xmm0,%xmm0
movups %xmm0,0x10(%r11,%rcx,8)
shufps $0x4e,%xmm1,%xmm1
movups %xmm1,(%r11,%rcx,8)
movd   -0x4(%rbx,%rcx,2),%xmm0
movd   -0x8(%rbx,%rcx,2),%xmm1
pshuflw $0x24,%xmm0,%xmm0
psrad  $0x10,%xmm0
cvtdq2pd %xmm0,%xmm0
pshuflw $0x24,%xmm1,%xmm1
psrad  $0x10,%xmm1
cvtdq2pd %xmm1,%xmm1
shufpd $0x1,%xmm0,%xmm0
movupd %xmm0,-0x10(%r11,%rcx,8)
shufpd $0x1,%xmm1,%xmm1
movupd %xmm1,-0x20(%r11,%rcx,8)
add    $0xfffffffffffffff8,%rcx
add    $0xfffffffffffffffe,%r10
jne    1190 <achtds+0x90>
add    $0x1,%rcx
test   $0x1,%r9b
je     1263 <achtds+0x163>
add    %rax,%rcx
movd   -0x2(%rsi,%rcx,2),%xmm0
movd   -0x6(%rsi,%rcx,2),%xmm1
pshuflw $0x24,%xmm0,%xmm0
psrad  $0x10,%xmm0
cvtdq2pd %xmm0,%xmm0
pshuflw $0x24,%xmm1,%xmm1
psrad  $0x10,%xmm1
cvtdq2pd %xmm1,%xmm1
shufpd $0x1,%xmm0,%xmm0
movupd %xmm0,-0x8(%rdi,%rcx,8)
shufpd $0x1,%xmm1,%xmm1
movupd %xmm1,-0x18(%rdi,%rcx,8)
cmp    %r8,%rdx
je     1495 <achtds+0x395>
sub    %r8,%rax
nop
movswl -0x2(%rsi,%rax,2),%ecx
xorps  %xmm0,%xmm0
cvtsi2sd %ecx,%xmm0
movsd  %xmm0,-0x8(%rdi,%rax,8)
lea    -0x1(%rax),%rcx
mov    %rcx,%rax
test   %ecx,%ecx
jne    1270 <achtds+0x170>
jmp    1495 <achtds+0x395>
test   %edx,%edx
je     1495 <achtds+0x395>
movslq %edx,%rax
add    $0xffffffff,%edx
je     13a0 <achtds+0x2a0>
add    $0x1,%rdx
movabs $0x1fffffffc,%r8
or     $0x2,%r8
and    %rdx,%r8
movapd %xmm1,%xmm2
unpcklpd %xmm1,%xmm2
movapd %xmm0,%xmm3
unpcklpd %xmm0,%xmm3
lea    -0x2(%r8),%rcx
mov    %rcx,%r9
shr    %r9
add    $0x1,%r9
test   %rcx,%rcx
je     14ad <achtds+0x3ad>
mov    %r9,%rbx
and    $0xfffffffffffffffe,%rbx
lea    (%rdi,%rax,8),%r10
lea    (%rsi,%rax,2),%r11
mov    $0xfffffffffffffffe,%rcx
nopl   0x0(%rax,%rax,1)
movd   (%r11,%rcx,2),%xmm4
pshuflw $0x24,%xmm4,%xmm4
psrad  $0x10,%xmm4
cvtdq2pd %xmm4,%xmm4
subpd  %xmm2,%xmm4
divpd  %xmm3,%xmm4
shufpd $0x1,%xmm4,%xmm4
movupd %xmm4,(%r10,%rcx,8)
movd   -0x4(%r11,%rcx,2),%xmm4
pshuflw $0x24,%xmm4,%xmm4
psrad  $0x10,%xmm4
cvtdq2pd %xmm4,%xmm4
subpd  %xmm2,%xmm4
divpd  %xmm3,%xmm4
shufpd $0x1,%xmm4,%xmm4
movupd %xmm4,-0x10(%r10,%rcx,8)
add    $0xfffffffffffffffc,%rcx
add    $0xfffffffffffffffe,%rbx
jne    1300 <achtds+0x200>
add    $0x1,%rcx
test   $0x1,%r9b
je     138e <achtds+0x28e>
add    %rax,%rcx
movd   -0x2(%rsi,%rcx,2),%xmm4
pshuflw $0x24,%xmm4,%xmm4
psrad  $0x10,%xmm4
cvtdq2pd %xmm4,%xmm4
subpd  %xmm2,%xmm4
divpd  %xmm3,%xmm4
shufpd $0x1,%xmm4,%xmm4
movupd %xmm4,-0x8(%rdi,%rcx,8)
cmp    %r8,%rdx
je     1495 <achtds+0x395>
sub    %r8,%rax
nopw   0x0(%rax,%rax,1)
movswl -0x2(%rsi,%rax,2),%ecx
xorps  %xmm2,%xmm2
cvtsi2sd %ecx,%xmm2
subsd  %xmm1,%xmm2
divsd  %xmm0,%xmm2
movsd  %xmm2,-0x8(%rdi,%rax,8)
lea    -0x1(%rax),%rcx
mov    %rcx,%rax
test   %ecx,%ecx
jne    13a0 <achtds+0x2a0>
jmp    1495 <achtds+0x395>
add    $0x1,%rdx
mov    %rdx,%r8
and    $0xfffffffffffffffc,%r8
mov    %rcx,%rax
sub    %r8,%rax
movapd %xmm0,%xmm2
unpcklpd %xmm0,%xmm2
movapd %xmm1,%xmm3
unpcklpd %xmm1,%xmm3
lea    (%rsi,%rcx,2),%r10
add    $0xfffffffffffffffc,%r10
lea    (%rdi,%rcx,8),%rcx
add    $0xfffffffffffffff0,%rcx
mov    %r8,%r9
neg    %r9
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movd   (%r10,%rbx,2),%xmm4
movd   -0x4(%r10,%rbx,2),%xmm5
pshuflw $0x24,%xmm4,%xmm4
psrad  $0x10,%xmm4
cvtdq2pd %xmm4,%xmm4
pshuflw $0x24,%xmm5,%xmm5
psrad  $0x10,%xmm5
cvtdq2pd %xmm5,%xmm5
mulpd  %xmm2,%xmm4
addpd  %xmm3,%xmm4
mulpd  %xmm2,%xmm5
addpd  %xmm3,%xmm5
shufpd $0x1,%xmm4,%xmm4
movupd %xmm4,(%rcx,%rbx,8)
shufpd $0x1,%xmm5,%xmm5
movupd %xmm5,-0x10(%rcx,%rbx,8)
add    $0xfffffffffffffffc,%rbx
cmp    %rbx,%r9
jne    1410 <achtds+0x310>
cmp    %r8,%rdx
je     1495 <achtds+0x395>
nopl   0x0(%rax)
movswl -0x2(%rsi,%rax,2),%ecx
xorps  %xmm2,%xmm2
cvtsi2sd %ecx,%xmm2
mulsd  %xmm0,%xmm2
addsd  %xmm1,%xmm2
movsd  %xmm2,-0x8(%rdi,%rax,8)
lea    -0x1(%rax),%rcx
mov    %rcx,%rax
test   %ecx,%ecx
jne    1470 <achtds+0x370>
pop    %rbx
ret
mov    $0xffffffffffffffff,%rcx
test   $0x1,%r9b
jne    1222 <achtds+0x122>
jmp    1263 <achtds+0x163>
mov    $0xffffffffffffffff,%rcx
test   $0x1,%r9b
jne    1364 <achtds+0x264>
jmp    138e <achtds+0x28e>

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

LLVM IR (-O2):
define void @achtds(double* nocapture writeonly %0, i16* nocapture %1, i32 %2, i32 %3, i32 %4, double %5, double %6) {
%8 = icmp eq i32 %4, 0
br i1 %8, label %9, label %108
9: ; preds = %7
%10 = icmp eq i32 %2, 0
br i1 %10, label %269, label %11
11: ; preds = %9
%12 = sext i32 %2 to i64
%13 = add i32 %2, -1
%14 = zext i32 %13 to i64
%15 = add nuw nsw i64 %14, 1
%16 = icmp ult i32 %13, 3
br i1 %16, label %106, label %17
17: ; preds = %11
%18 = and i64 %15, 8589934588
%19 = sub nsw i64 %12, %18
%20 = add nsw i64 %18, -4
%21 = lshr exact i64 %20, 2
%22 = add nuw nsw i64 %21, 1
%23 = and i64 %22, 1
%24 = icmp eq i64 %20, 0
br i1 %24, label %79, label %25
25: ; preds = %17
%26 = and i64 %22, 9223372036854775806
br label %27
27: ; preds = %27, %25
%28 = phi i64 [ 0, %25 ], [ %74, %27 ]
%29 = phi i64 [ 0, %25 ], [ %75, %27 ]
%30 = xor i64 %28, -1
%31 = add i64 %30, %12
%32 = getelementptr inbounds i16, i16* %1, i64 %31
%33 = getelementptr inbounds i16, i16* %32, i64 -1
%34 = bitcast i16* %33 to <2 x i16>*
%35 = load <2 x i16>, <2 x i16>* %34
%36 = shufflevector <2 x i16> %35, <2 x i16> poison, <2 x i32> <i32 1, i32 0>
%37 = getelementptr inbounds i16, i16* %32, i64 -2
%38 = getelementptr inbounds i16, i16* %37, i64 -1
%39 = bitcast i16* %38 to <2 x i16>*
%40 = load <2 x i16>, <2 x i16>* %39
%41 = shufflevector <2 x i16> %40, <2 x i16> poison, <2 x i32> <i32 1, i32 0>
%42 = sitofp <2 x i16> %36 to <2 x double>
%43 = sitofp <2 x i16> %41 to <2 x double>
%44 = getelementptr inbounds double, double* %0, i64 %31
%45 = shufflevector <2 x double> %42, <2 x double> poison, <2 x i32> <i32 1, i32 0>
%46 = getelementptr inbounds double, double* %44, i64 -1
%47 = bitcast double* %46 to <2 x double>*
store <2 x double> %45, <2 x double>* %47
%48 = shufflevector <2 x double> %43, <2 x double> poison, <2 x i32> <i32 1, i32 0>
%49 = getelementptr inbounds double, double* %44, i64 -2
%50 = getelementptr inbounds double, double* %49, i64 -1
%51 = bitcast double* %50 to <2 x double>*
store <2 x double> %48, <2 x double>* %51
%52 = sub nuw nsw i64 -5, %28
%53 = add i64 %52, %12
%54 = getelementptr inbounds i16, i16* %1, i64 %53
%55 = getelementptr inbounds i16, i16* %54, i64 -1
%56 = bitcast i16* %55 to <2 x i16>*
%57 = load <2 x i16>, <2 x i16>* %56
%58 = shufflevector <2 x i16> %57, <2 x i16> poison, <2 x i32> <i32 1, i32 0>
%59 = getelementptr inbounds i16, i16* %54, i64 -2
%60 = getelementptr inbounds i16, i16* %59, i64 -1
%61 = bitcast i16* %60 to <2 x i16>*
%62 = load <2 x i16>, <2 x i16>* %61
%63 = shufflevector <2 x i16> %62, <2 x i16> poison, <2 x i32> <i32 1, i32 0>
%64 = sitofp <2 x i16> %58 to <2 x double>
%65 = sitofp <2 x i16> %63 to <2 x double>
%66 = getelementptr inbounds double, double* %0, i64 %53
%67 = shufflevector <2 x double> %64, <2 x double> poison, <2 x i32> <i32 1, i32 0>
%68 = getelementptr inbounds double, double* %66, i64 -1
%69 = bitcast double* %68 to <2 x double>*
store <2 x double> %67, <2 x double>* %69
%70 = shufflevector <2 x double> %65, <2 x double> poison, <2 x i32> <i32 1, i32 0>
%71 = getelementptr inbounds double, double* %66, i64 -2
%72 = getelementptr inbounds double, double* %71, i64 -1
%73 = bitcast double* %72 to <2 x double>*
store <2 x double> %70, <2 x double>* %73
%74 = add nuw i64 %28, 8
%75 = add i64 %29, 2
%76 = icmp eq i64 %75, %26
br i1 %76, label %77, label %27
77: ; preds = %27
%78 = sub i64 -9, %28
br label %79
79: ; preds = %77, %17
%80 = phi i64 [ -1, %17 ], [ %78, %77 ]
%81 = icmp eq i64 %23, 0
br i1 %81, label %104, label %82
82: ; preds = %79
%83 = add i64 %80, %12
%84 = getelementptr inbounds i16, i16* %1, i64 %83
%85 = getelementptr inbounds i16, i16* %84, i64 -1
%86 = bitcast i16* %85 to <2 x i16>*
%87 = load <2 x i16>, <2 x i16>* %86
%88 = shufflevector <2 x i16> %87, <2 x i16> poison, <2 x i32> <i32 1, i32 0>
%89 = getelementptr inbounds i16, i16* %84, i64 -2
%90 = getelementptr inbounds i16, i16* %89, i64 -1
%91 = bitcast i16* %90 to <2 x i16>*
%92 = load <2 x i16>, <2 x i16>* %91
%93 = shufflevector <2 x i16> %92, <2 x i16> poison, <2 x i32> <i32 1, i32 0>
%94 = sitofp <2 x i16> %88 to <2 x double>
%95 = sitofp <2 x i16> %93 to <2 x double>
%96 = getelementptr inbounds double, double* %0, i64 %83
%97 = shufflevector <2 x double> %94, <2 x double> poison, <2 x i32> <i32 1, i32 0>
%98 = getelementptr inbounds double, double* %96, i64 -1
%99 = bitcast double* %98 to <2 x double>*
store <2 x double> %97, <2 x double>* %99
%100 = shufflevector <2 x double> %95, <2 x double> poison, <2 x i32> <i32 1, i32 0>
%101 = getelementptr inbounds double, double* %96, i64 -2
%102 = getelementptr inbounds double, double* %101, i64 -1
%103 = bitcast double* %102 to <2 x double>*
store <2 x double> %100, <2 x double>* %103
br label %104
104: ; preds = %79, %82
%105 = icmp eq i64 %15, %18
br i1 %105, label %269, label %106
106: ; preds = %11, %104
%107 = phi i64 [ %12, %11 ], [ %19, %104 ]
br label %260
108: ; preds = %7
%109 = icmp eq i32 %3, 0
%110 = icmp eq i32 %2, 0
br i1 %109, label %161, label %111
111: ; preds = %108
br i1 %110, label %269, label %112
112: ; preds = %111
%113 = sext i32 %2 to i64
%114 = add i32 %2, -1
%115 = zext i32 %114 to i64
%116 = add nuw nsw i64 %115, 1
%117 = icmp ult i32 %114, 3
br i1 %117, label %159, label %118
118: ; preds = %112
%119 = and i64 %116, 8589934588
%120 = sub nsw i64 %113, %119
%121 = insertelement <2 x double> poison, double %5, i64 0
%122 = shufflevector <2 x double> %121, <2 x double> poison, <2 x i32> zeroinitializer
%123 = insertelement <2 x double> poison, double %6, i64 0
%124 = shufflevector <2 x double> %123, <2 x double> poison, <2 x i32> zeroinitializer
%125 = insertelement <2 x double> poison, double %5, i64 0
%126 = shufflevector <2 x double> %125, <2 x double> poison, <2 x i32> zeroinitializer
%127 = insertelement <2 x double> poison, double %6, i64 0
%128 = shufflevector <2 x double> %127, <2 x double> poison, <2 x i32> zeroinitializer
br label %129
129: ; preds = %129, %118
%130 = phi i64 [ 0, %118 ], [ %155, %129 ]
%131 = xor i64 %130, -1
%132 = add i64 %131, %113
%133 = getelementptr inbounds i16, i16* %1, i64 %132
%134 = getelementptr inbounds i16, i16* %133, i64 -1
%135 = bitcast i16* %134 to <2 x i16>*
%136 = load <2 x i16>, <2 x i16>* %135
%137 = shufflevector <2 x i16> %136, <2 x i16> poison, <2 x i32> <i32 1, i32 0>
%138 = getelementptr inbounds i16, i16* %133, i64 -2
%139 = getelementptr inbounds i16, i16* %138, i64 -1
%140 = bitcast i16* %139 to <2 x i16>*
%141 = load <2 x i16>, <2 x i16>* %140
%142 = shufflevector <2 x i16> %141, <2 x i16> poison, <2 x i32> <i32 1, i32 0>
%143 = sitofp <2 x i16> %137 to <2 x double>
%144 = sitofp <2 x i16> %142 to <2 x double>
%145 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %143, <2 x double> %122, <2 x double> %124)
%146 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %144, <2 x double> %126, <2 x double> %128)
%147 = getelementptr inbounds double, double* %0, i64 %132
%148 = shufflevector <2 x double> %145, <2 x double> poison, <2 x i32> <i32 1, i32 0>
%149 = getelementptr inbounds double, double* %147, i64 -1
%150 = bitcast double* %149 to <2 x double>*
store <2 x double> %148, <2 x double>* %150
%151 = shufflevector <2 x double> %146, <2 x double> poison, <2 x i32> <i32 1, i32 0>
%152 = getelementptr inbounds double, double* %147, i64 -2
%153 = getelementptr inbounds double, double* %152, i64 -1
%154 = bitcast double* %153 to <2 x double>*
store <2 x double> %151, <2 x double>* %154
%155 = add nuw i64 %130, 4
%156 = icmp eq i64 %155, %119
br i1 %156, label %157, label %129
157: ; preds = %129
%158 = icmp eq i64 %116, %119
br i1 %158, label %269, label %159
159: ; preds = %112, %157
%160 = phi i64 [ %113, %112 ], [ %120, %157 ]
br label %239
161: ; preds = %108
br i1 %110, label %269, label %162
162: ; preds = %161
%163 = sext i32 %2 to i64
%164 = add i32 %2, -1
%165 = zext i32 %164 to i64
%166 = add nuw nsw i64 %165, 1
%167 = icmp eq i32 %164, 0
br i1 %167, label %237, label %168
168: ; preds = %162
%169 = and i64 %166, 8589934590
%170 = sub nsw i64 %163, %169
%171 = insertelement <2 x double> poison, double %6, i64 0
%172 = shufflevector <2 x double> %171, <2 x double> poison, <2 x i32> zeroinitializer
%173 = insertelement <2 x double> poison, double %5, i64 0
%174 = shufflevector <2 x double> %173, <2 x double> poison, <2 x i32> zeroinitializer
%175 = add nsw i64 %169, -2
%176 = lshr exact i64 %175, 1
%177 = add nuw i64 %176, 1
%178 = and i64 %177, 1
%179 = icmp eq i64 %175, 0
br i1 %179, label %218, label %180
180: ; preds = %168
%181 = and i64 %177, -2
%182 = getelementptr inbounds i16, i16* %1, i64 -1
%183 = getelementptr inbounds double, double* %0, i64 -1
%184 = getelementptr inbounds i16, i16* %1, i64 -1
%185 = getelementptr inbounds double, double* %0, i64 -1
br label %186
186: ; preds = %186, %180
%187 = phi i64 [ 0, %180 ], [ %213, %186 ]
%188 = phi i64 [ 0, %180 ], [ %214, %186 ]
%189 = xor i64 %187, -1
%190 = add i64 %189, %163
%191 = getelementptr inbounds i16, i16* %182, i64 %190
%192 = bitcast i16* %191 to <2 x i16>*
%193 = load <2 x i16>, <2 x i16>* %192
%194 = shufflevector <2 x i16> %193, <2 x i16> poison, <2 x i32> <i32 1, i32 0>
%195 = sitofp <2 x i16> %194 to <2 x double>
%196 = fsub <2 x double> %195, %172
%197 = fdiv <2 x double> %196, %174
%198 = shufflevector <2 x double> %197, <2 x double> poison, <2 x i32> <i32 1, i32 0>
%199 = getelementptr inbounds double, double* %183, i64 %190
%200 = bitcast double* %199 to <2 x double>*
store <2 x double> %198, <2 x double>* %200
%201 = sub nuw nsw i64 -3, %187
%202 = add i64 %201, %163
%203 = getelementptr inbounds i16, i16* %184, i64 %202
%204 = bitcast i16* %203 to <2 x i16>*
%205 = load <2 x i16>, <2 x i16>* %204
%206 = shufflevector <2 x i16> %205, <2 x i16> poison, <2 x i32> <i32 1, i32 0>
%207 = sitofp <2 x i16> %206 to <2 x double>
%208 = fsub <2 x double> %207, %172
%209 = fdiv <2 x double> %208, %174
%210 = shufflevector <2 x double> %209, <2 x double> poison, <2 x i32> <i32 1, i32 0>
%211 = getelementptr inbounds double, double* %185, i64 %202
%212 = bitcast double* %211 to <2 x double>*
store <2 x double> %210, <2 x double>* %212
%213 = add nuw i64 %187, 4
%214 = add nuw i64 %188, 2
%215 = icmp eq i64 %214, %181
br i1 %215, label %216, label %186
216: ; preds = %186
%217 = sub i64 -5, %187
br label %218
218: ; preds = %216, %168
%219 = phi i64 [ -1, %168 ], [ %217, %216 ]
%220 = icmp eq i64 %178, 0
br i1 %220, label %235, label %221
221: ; preds = %218
%222 = add i64 %219, %163
%223 = getelementptr inbounds i16, i16* %1, i64 -1
%224 = getelementptr inbounds i16, i16* %223, i64 %222
%225 = bitcast i16* %224 to <2 x i16>*
%226 = load <2 x i16>, <2 x i16>* %225
%227 = shufflevector <2 x i16> %226, <2 x i16> poison, <2 x i32> <i32 1, i32 0>
%228 = sitofp <2 x i16> %227 to <2 x double>
%229 = fsub <2 x double> %228, %172
%230 = fdiv <2 x double> %229, %174
%231 = getelementptr inbounds double, double* %0, i64 -1
%232 = shufflevector <2 x double> %230, <2 x double> poison, <2 x i32> <i32 1, i32 0>
%233 = getelementptr inbounds double, double* %231, i64 %222
%234 = bitcast double* %233 to <2 x double>*
store <2 x double> %232, <2 x double>* %234
br label %235
235: ; preds = %218, %221
%236 = icmp eq i64 %166, %169
br i1 %236, label %269, label %237
237: ; preds = %162, %235
%238 = phi i64 [ %163, %162 ], [ %170, %235 ]
br label %249
239: ; preds = %159, %239
%240 = phi i64 [ %241, %239 ], [ %160, %159 ]
%241 = add nsw i64 %240, -1
%242 = getelementptr inbounds i16, i16* %1, i64 %241
%243 = load i16, i16* %242
%244 = sitofp i16 %243 to double
%245 = tail call double @llvm.fmuladd.f64(double %244, double %5, double %6)
%246 = getelementptr inbounds double, double* %0, i64 %241
store double %245, double* %246
%247 = trunc i64 %241 to i32
%248 = icmp eq i32 %247, 0
br i1 %248, label %269, label %239
249: ; preds = %237, %249
%250 = phi i64 [ %251, %249 ], [ %238, %237 ]
%251 = add nsw i64 %250, -1
%252 = getelementptr inbounds i16, i16* %1, i64 %251
%253 = load i16, i16* %252
%254 = sitofp i16 %253 to double
%255 = fsub double %254, %6
%256 = fdiv double %255, %5
%257 = getelementptr inbounds double, double* %0, i64 %251
store double %256, double* %257
%258 = trunc i64 %251 to i32
%259 = icmp eq i32 %258, 0
br i1 %259, label %269, label %249
260: ; preds = %106, %260
%261 = phi i64 [ %262, %260 ], [ %107, %106 ]
%262 = add nsw i64 %261, -1
%263 = getelementptr inbounds i16, i16* %1, i64 %262
%264 = load i16, i16* %263
%265 = sitofp i16 %264 to double
%266 = getelementptr inbounds double, double* %0, i64 %262
store double %265, double* %266
%267 = trunc i64 %262 to i32
%268 = icmp eq i32 %267, 0
br i1 %268, label %269, label %260
269: ; preds = %239, %249, %260, %157, %235, %104, %111, %161, %9
ret void
}