void set_bicubic_weights(double iw, double jw, double wgts[4][4]) {
  wgts[0][0] =
      (1. - jw * jw * (3. - 2. * jw)) * (1. - iw * iw * (3. - 2. * iw));
  wgts[1][0] = (1. - jw * jw * (3. - 2. * jw)) * iw * iw * (3. - 2. * iw);
  wgts[2][0] = jw * jw * (3. - 2. * jw) * iw * iw * (3. - 2. * iw);
  wgts[3][0] = jw * jw * (3. - 2. * jw) * (1. - iw * iw * (3. - 2. * iw));
  wgts[0][1] = (1. - jw * jw * (3. - 2. * jw)) * iw * (iw - 1.) * (iw - 1.);
  wgts[1][1] = (1. - jw * jw * (3. - 2. * jw)) * iw * iw * (iw - 1.);
  wgts[2][1] = jw * jw * (3. - 2. * jw) * iw * iw * (iw - 1.);
  wgts[3][1] = jw * jw * (3. - 2. * jw) * iw * (iw - 1.) * (iw - 1.);
  wgts[0][2] = jw * (jw - 1.) * (jw - 1.) * (1. - iw * iw * (3. - 2. * iw));
  wgts[1][2] = jw * (jw - 1.) * (jw - 1.) * iw * iw * (3. - 2. * iw);
  wgts[2][2] = jw * jw * (jw - 1.) * iw * iw * (3. - 2. * iw);
  wgts[3][2] = jw * jw * (jw - 1.) * (1. - iw * iw * (3. - 2. * iw));
  wgts[0][3] = iw * (iw - 1.) * (iw - 1.) * jw * (jw - 1.) * (jw - 1.);
  wgts[1][3] = iw * iw * (iw - 1.) * jw * (jw - 1.) * (jw - 1.);
  wgts[2][3] = iw * iw * (iw - 1.) * jw * jw * (jw - 1.);
  wgts[3][3] = iw * (iw - 1.) * (iw - 1.) * jw * jw * (jw - 1.);
}


x86 assembly (clang, -O0):
<set_bicubic_weights>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
mov    %rdi,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm2
addsd  %xmm2,%xmm2
movsd  0xedb(%rip),%xmm1
subsd  %xmm2,%xmm1
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm1,%xmm0
movsd  0xeac(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  -0x8(%rbp),%xmm1
mulsd  -0x8(%rbp),%xmm1
movsd  -0x8(%rbp),%xmm3
addsd  %xmm3,%xmm3
movsd  0xe95(%rip),%xmm2
subsd  %xmm3,%xmm2
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm1
movsd  0xe66(%rip),%xmm2
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x10(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm2
addsd  %xmm2,%xmm2
movsd  0xe43(%rip),%xmm1
subsd  %xmm2,%xmm1
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm1,%xmm0
movsd  0xe14(%rip),%xmm1
addsd  %xmm1,%xmm0
mulsd  -0x8(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm2
addsd  %xmm2,%xmm2
movsd  0xdfd(%rip),%xmm1
subsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,0x20(%rax)
movsd  -0x10(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm2
addsd  %xmm2,%xmm2
movsd  0xdd1(%rip),%xmm1
subsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
mulsd  -0x8(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm2
addsd  %xmm2,%xmm2
movsd  0xdae(%rip),%xmm1
subsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,0x40(%rax)
movsd  -0x10(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm2
addsd  %xmm2,%xmm2
movsd  0xd82(%rip),%xmm1
subsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  -0x8(%rbp),%xmm1
mulsd  -0x8(%rbp),%xmm1
movsd  -0x8(%rbp),%xmm3
addsd  %xmm3,%xmm3
movsd  0xd5f(%rip),%xmm2
subsd  %xmm3,%xmm2
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm1
movsd  0xd30(%rip),%xmm2
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,0x60(%rax)
movsd  -0x10(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm2
addsd  %xmm2,%xmm2
movsd  0xd0c(%rip),%xmm1
subsd  %xmm2,%xmm1
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm1,%xmm0
movsd  0xcdd(%rip),%xmm1
addsd  %xmm1,%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
movsd  0xcc7(%rip),%xmm2
subsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  -0x8(%rbp),%xmm1
movsd  0xcb2(%rip),%xmm2
subsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,0x8(%rax)
movsd  -0x10(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm2
addsd  %xmm2,%xmm2
movsd  0xc8e(%rip),%xmm1
subsd  %xmm2,%xmm1
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm1,%xmm0
movsd  0xc5f(%rip),%xmm1
addsd  %xmm1,%xmm0
mulsd  -0x8(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
movsd  0xc44(%rip),%xmm2
subsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,0x28(%rax)
movsd  -0x10(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm2
addsd  %xmm2,%xmm2
movsd  0xc20(%rip),%xmm1
subsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
mulsd  -0x8(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
movsd  0xbf9(%rip),%xmm2
subsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,0x48(%rax)
movsd  -0x10(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm2
addsd  %xmm2,%xmm2
movsd  0xbd5(%rip),%xmm1
subsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
movsd  0xbb3(%rip),%xmm2
subsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  -0x8(%rbp),%xmm1
movsd  0xb9e(%rip),%xmm2
subsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,0x68(%rax)
movsd  -0x10(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  0xb7b(%rip),%xmm2
subsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  0xb66(%rip),%xmm2
subsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  -0x8(%rbp),%xmm1
mulsd  -0x8(%rbp),%xmm1
movsd  -0x8(%rbp),%xmm3
addsd  %xmm3,%xmm3
movsd  0xb4b(%rip),%xmm2
subsd  %xmm3,%xmm2
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm1
movsd  0xb1c(%rip),%xmm2
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,0x10(%rax)
movsd  -0x10(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  0xaf9(%rip),%xmm2
subsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  0xae4(%rip),%xmm2
subsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
mulsd  -0x8(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm2
addsd  %xmm2,%xmm2
movsd  0xac9(%rip),%xmm1
subsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,0x30(%rax)
movsd  -0x10(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  0xa99(%rip),%xmm2
subsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
mulsd  -0x8(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm2
addsd  %xmm2,%xmm2
movsd  0xa7e(%rip),%xmm1
subsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,0x50(%rax)
movsd  -0x10(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  0xa4e(%rip),%xmm2
subsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  -0x8(%rbp),%xmm1
mulsd  -0x8(%rbp),%xmm1
movsd  -0x8(%rbp),%xmm3
addsd  %xmm3,%xmm3
movsd  0xa33(%rip),%xmm2
subsd  %xmm3,%xmm2
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm1
movsd  0xa04(%rip),%xmm2
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,0x70(%rax)
movsd  -0x8(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
movsd  0x9e1(%rip),%xmm2
subsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  -0x8(%rbp),%xmm1
movsd  0x9cc(%rip),%xmm2
subsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  0x9b2(%rip),%xmm2
subsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  0x99d(%rip),%xmm2
subsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,0x18(%rax)
movsd  -0x8(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
movsd  0x975(%rip),%xmm2
subsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  0x95b(%rip),%xmm2
subsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  0x946(%rip),%xmm2
subsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,0x38(%rax)
movsd  -0x8(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
movsd  0x91e(%rip),%xmm2
subsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
mulsd  -0x10(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  0x8ff(%rip),%xmm2
subsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,0x58(%rax)
movsd  -0x8(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
movsd  0x8dc(%rip),%xmm2
subsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  -0x8(%rbp),%xmm1
movsd  0x8c7(%rip),%xmm2
subsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
mulsd  -0x10(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  0x8a8(%rip),%xmm2
subsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,0x78(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_bicubic_weights>:
movapd %xmm1,%xmm8
unpcklpd %xmm0,%xmm8
movapd 0xefd(%rip),%xmm10
addpd  %xmm8,%xmm10
movapd %xmm1,%xmm5
movapd %xmm1,%xmm12
movapd %xmm10,%xmm11
unpcklpd %xmm1,%xmm11
movapd %xmm0,%xmm9
unpcklpd %xmm1,%xmm9
movapd %xmm1,%xmm2
addsd  %xmm1,%xmm2
movsd  0xeba(%rip),%xmm13
movapd %xmm13,%xmm1
subsd  %xmm2,%xmm1
movapd %xmm10,%xmm4
unpckhpd %xmm10,%xmm4
movapd %xmm4,%xmm2
mulsd  %xmm0,%xmm2
mulsd  %xmm4,%xmm2
unpcklpd %xmm5,%xmm5
unpcklpd %xmm2,%xmm12
mulpd  %xmm5,%xmm12
mulsd  %xmm12,%xmm1
movsd  0xe87(%rip),%xmm14
movapd %xmm14,%xmm5
subsd  %xmm1,%xmm5
movapd %xmm0,%xmm2
addsd  %xmm0,%xmm2
subsd  %xmm2,%xmm13
movapd %xmm10,%xmm3
unpcklpd %xmm0,%xmm3
mulpd  %xmm8,%xmm3
movapd %xmm3,%xmm2
unpckhpd %xmm3,%xmm2
mulsd  %xmm13,%xmm2
subsd  %xmm2,%xmm14
movapd %xmm5,%xmm2
mulsd  %xmm0,%xmm2
movapd %xmm1,%xmm6
mulsd  %xmm0,%xmm6
movapd %xmm6,%xmm7
mulsd  %xmm0,%xmm7
mulsd  %xmm4,%xmm6
mulsd  %xmm2,%xmm4
mulsd  %xmm0,%xmm2
movapd %xmm10,%xmm8
movsd  %xmm14,%xmm8
unpcklpd %xmm4,%xmm5
mulpd  %xmm8,%xmm5
movupd %xmm5,(%rdi)
movapd %xmm10,%xmm4
movsd  %xmm13,%xmm4
unpcklpd %xmm2,%xmm2
mulpd  %xmm4,%xmm2
movupd %xmm2,0x20(%rdi)
unpcklpd %xmm7,%xmm7
mulpd  %xmm4,%xmm7
movupd %xmm7,0x40(%rdi)
unpcklpd %xmm6,%xmm1
mulpd  %xmm8,%xmm1
movupd %xmm1,0x60(%rdi)
mulpd  %xmm10,%xmm3
movapd %xmm14,%xmm1
mulsd  %xmm3,%xmm1
movsd  %xmm1,0x10(%rdi)
mulpd  %xmm12,%xmm11
unpcklpd %xmm10,%xmm14
mulpd  %xmm11,%xmm14
mulsd  %xmm0,%xmm11
unpckhpd %xmm12,%xmm12
mulsd  %xmm10,%xmm12
mulsd  %xmm10,%xmm12
movsd  %xmm12,0x18(%rdi)
mulpd  %xmm9,%xmm3
unpcklpd %xmm10,%xmm0
mulpd  %xmm3,%xmm0
unpcklpd %xmm10,%xmm13
mulpd  %xmm13,%xmm0
movupd %xmm0,0x30(%rdi)
movsd  %xmm11,%xmm3
mulpd  %xmm9,%xmm3
mulpd  %xmm13,%xmm3
movupd %xmm3,0x50(%rdi)
movupd %xmm14,0x70(%rdi)
ret

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

LLVM IR (-O2):
define void @set_bicubic_weights(double %0, double %1, [4 x double]* nocapture writeonly %2) {
%4 = tail call double @llvm.fmuladd.f64(double %1, double -2.000000e+00, double 3.000000e+00)
%5 = insertelement <2 x double> poison, double %1, i64 0
%6 = insertelement <2 x double> %5, double %0, i64 1
%7 = fadd <2 x double> %6, <double -1.000000e+00, double -1.000000e+00>
%8 = extractelement <2 x double> %7, i64 1
%9 = fmul double %8, %0
%10 = fmul double %8, %9
%11 = shufflevector <2 x double> %5, <2 x double> poison, <2 x i32> zeroinitializer
%12 = insertelement <2 x double> %5, double %10, i64 1
%13 = fmul <2 x double> %11, %12
%14 = extractelement <2 x double> %13, i64 0
%15 = fneg double %14
%16 = tail call double @llvm.fmuladd.f64(double %15, double %4, double 1.000000e+00)
%17 = tail call double @llvm.fmuladd.f64(double %0, double -2.000000e+00, double 3.000000e+00)
%18 = insertelement <2 x double> %7, double %0, i64 1
%19 = fmul <2 x double> %18, %6
%20 = extractelement <2 x double> %19, i64 1
%21 = fneg double %20
%22 = tail call double @llvm.fmuladd.f64(double %21, double %17, double 1.000000e+00)
%23 = fmul double %16, %0
%24 = fmul double %23, %0
%25 = getelementptr inbounds [4 x double], [4 x double]* %2, i64 1, i64 0
%26 = fmul double %14, %4
%27 = fmul double %26, %0
%28 = fmul double %27, %0
%29 = getelementptr inbounds [4 x double], [4 x double]* %2, i64 2, i64 0
%30 = getelementptr inbounds [4 x double], [4 x double]* %2, i64 3, i64 0
%31 = fmul double %8, %23
%32 = insertelement <2 x double> poison, double %22, i64 0
%33 = insertelement <2 x double> %7, double %22, i64 0
%34 = insertelement <2 x double> poison, double %16, i64 0
%35 = insertelement <2 x double> %34, double %31, i64 1
%36 = fmul <2 x double> %33, %35
%37 = bitcast [4 x double]* %2 to <2 x double>*
store <2 x double> %36, <2 x double>* %37
%38 = insertelement <2 x double> poison, double %17, i64 0
%39 = insertelement <2 x double> %7, double %17, i64 0
%40 = insertelement <2 x double> poison, double %24, i64 0
%41 = shufflevector <2 x double> %40, <2 x double> poison, <2 x i32> zeroinitializer
%42 = fmul <2 x double> %39, %41
%43 = bitcast double* %25 to <2 x double>*
store <2 x double> %42, <2 x double>* %43
%44 = insertelement <2 x double> poison, double %28, i64 0
%45 = shufflevector <2 x double> %44, <2 x double> poison, <2 x i32> zeroinitializer
%46 = fmul <2 x double> %39, %45
%47 = bitcast double* %29 to <2 x double>*
store <2 x double> %46, <2 x double>* %47
%48 = fmul double %8, %27
%49 = insertelement <2 x double> poison, double %26, i64 0
%50 = insertelement <2 x double> %49, double %48, i64 1
%51 = fmul <2 x double> %33, %50
%52 = bitcast double* %30 to <2 x double>*
store <2 x double> %51, <2 x double>* %52
%53 = fmul <2 x double> %7, %19
%54 = extractelement <2 x double> %53, i64 0
%55 = fmul double %22, %54
%56 = getelementptr inbounds [4 x double], [4 x double]* %2, i64 0, i64 2
store double %55, double* %56
%57 = getelementptr inbounds [4 x double], [4 x double]* %2, i64 1, i64 2
%58 = insertelement <2 x double> %7, double %1, i64 1
%59 = fmul <2 x double> %13, %58
%60 = extractelement <2 x double> %59, i64 0
%61 = fmul double %60, %0
%62 = getelementptr inbounds [4 x double], [4 x double]* %2, i64 2, i64 2
%63 = getelementptr inbounds [4 x double], [4 x double]* %2, i64 3, i64 2
%64 = shufflevector <2 x double> %13, <2 x double> poison, <2 x i32> <i32 1, i32 undef>
%65 = fmul <2 x double> %7, %64
%66 = fmul <2 x double> %7, %65
%67 = extractelement <2 x double> %66, i64 0
%68 = getelementptr inbounds [4 x double], [4 x double]* %2, i64 0, i64 3
store double %67, double* %68
%69 = insertelement <2 x double> poison, double %0, i64 0
%70 = insertelement <2 x double> %69, double %1, i64 1
%71 = fmul <2 x double> %53, %70
%72 = shufflevector <2 x double> %69, <2 x double> %7, <2 x i32> <i32 0, i32 2>
%73 = fmul <2 x double> %71, %72
%74 = shufflevector <2 x double> %38, <2 x double> %7, <2 x i32> <i32 0, i32 2>
%75 = fmul <2 x double> %74, %73
%76 = bitcast double* %57 to <2 x double>*
store <2 x double> %75, <2 x double>* %76
%77 = insertelement <2 x double> %71, double %61, i64 0
%78 = fmul <2 x double> %77, %70
%79 = fmul <2 x double> %74, %78
%80 = bitcast double* %62 to <2 x double>*
store <2 x double> %79, <2 x double>* %80
%81 = shufflevector <2 x double> %32, <2 x double> %7, <2 x i32> <i32 0, i32 2>
%82 = fmul <2 x double> %81, %59
%83 = bitcast double* %63 to <2 x double>*
store <2 x double> %82, <2 x double>* %83
ret void
}