#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
float catmullrom_filter(float, float, float, float, float);
float clamp2d(float const *, size_t, size_t, size_t, size_t, size_t);
float floorf(float);
float catmullrom_interp(const float *pixels, size_t width, size_t height,
                        float u, float v, size_t a) {
  u -= 0.5f;
  v -= 0.5f;
  float px = floorf(u);
  float py = floorf(v);
  float fx = u - px;
  float fy = v - py;
  size_t ipx = (size_t)px;
  size_t ipy = (size_t)py;
  return catmullrom_filter(
      fy,
      catmullrom_filter(fx, clamp2d(pixels, width, height, ipx - 1, ipy - 1, a),
                        clamp2d(pixels, width, height, ipx, ipy - 1, a),
                        clamp2d(pixels, width, height, ipx + 1, ipy - 1, a),
                        clamp2d(pixels, width, height, ipx + 2, ipy - 1, a)),
      catmullrom_filter(fx, clamp2d(pixels, width, height, ipx - 1, ipy, a),
                        clamp2d(pixels, width, height, ipx, ipy, a),
                        clamp2d(pixels, width, height, ipx + 1, ipy, a),
                        clamp2d(pixels, width, height, ipx + 2, ipy, a)),
      catmullrom_filter(fx, clamp2d(pixels, width, height, ipx - 1, ipy + 1, a),
                        clamp2d(pixels, width, height, ipx, ipy + 1, a),
                        clamp2d(pixels, width, height, ipx + 1, ipy + 1, a),
                        clamp2d(pixels, width, height, ipx + 2, ipy + 1, a)),
      catmullrom_filter(fx, clamp2d(pixels, width, height, ipx - 1, ipy + 2, a),
                        clamp2d(pixels, width, height, ipx, ipy + 2, a),
                        clamp2d(pixels, width, height, ipx + 1, ipy + 2, a),
                        clamp2d(pixels, width, height, ipx + 2, ipy + 2, a)));
}


x86 assembly (clang, -O0):
<catmullrom_interp>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movss  %xmm0,-0x1c(%rbp)
movss  %xmm1,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
movss  -0x1c(%rbp),%xmm0
movss  0xe9e(%rip),%xmm1
subss  %xmm1,%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  -0x20(%rbp),%xmm0
subss  %xmm1,%xmm0
movss  %xmm0,-0x20(%rbp)
movss  -0x1c(%rbp),%xmm0
call   1030 <floorf@plt>
movss  %xmm0,-0x2c(%rbp)
movss  -0x20(%rbp),%xmm0
call   1030 <floorf@plt>
movss  %xmm0,-0x30(%rbp)
movss  -0x1c(%rbp),%xmm0
movss  -0x2c(%rbp),%xmm1
subss  %xmm1,%xmm0
movss  %xmm0,-0x34(%rbp)
movss  -0x20(%rbp),%xmm0
movss  -0x30(%rbp),%xmm1
subss  %xmm1,%xmm0
movss  %xmm0,-0x38(%rbp)
movss  -0x2c(%rbp),%xmm0
movss  0xe3a(%rip),%xmm2
movaps %xmm0,%xmm1
subss  %xmm2,%xmm1
cvttss2si %xmm1,%rcx
cvttss2si %xmm0,%rax
mov    %rax,%rdx
sar    $0x3f,%rdx
and    %rdx,%rcx
or     %rcx,%rax
mov    %rax,-0x40(%rbp)
movss  -0x30(%rbp),%xmm0
movaps %xmm0,%xmm1
subss  %xmm2,%xmm1
cvttss2si %xmm1,%rcx
cvttss2si %xmm0,%rax
mov    %rax,%rdx
sar    $0x3f,%rdx
and    %rdx,%rcx
or     %rcx,%rax
mov    %rax,-0x48(%rbp)
movss  -0x38(%rbp),%xmm0
movss  %xmm0,-0x4c(%rbp)
movss  -0x34(%rbp),%xmm0
movss  %xmm0,-0x8c(%rbp)
ff
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x40(%rbp),%rcx
sub    $0x1,%rcx
mov    -0x48(%rbp),%r8
sub    $0x1,%r8
mov    -0x28(%rbp),%r9
call   1040 <clamp2d@plt>
movss  %xmm0,-0x98(%rbp)
ff
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x40(%rbp),%rcx
mov    -0x48(%rbp),%r8
sub    $0x1,%r8
mov    -0x28(%rbp),%r9
call   1040 <clamp2d@plt>
movss  %xmm0,-0x94(%rbp)
ff
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x40(%rbp),%rcx
add    $0x1,%rcx
mov    -0x48(%rbp),%r8
sub    $0x1,%r8
mov    -0x28(%rbp),%r9
call   1040 <clamp2d@plt>
movss  %xmm0,-0x90(%rbp)
ff
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x40(%rbp),%rcx
add    $0x2,%rcx
mov    -0x48(%rbp),%r8
sub    $0x1,%r8
mov    -0x28(%rbp),%r9
call   1040 <clamp2d@plt>
movss  -0x98(%rbp),%xmm1
ff
movss  -0x94(%rbp),%xmm2
ff
movss  -0x90(%rbp),%xmm3
ff
movaps %xmm0,%xmm4
movss  -0x8c(%rbp),%xmm0
ff
call   1050 <catmullrom_filter@plt>
movss  %xmm0,-0x58(%rbp)
movss  -0x34(%rbp),%xmm0
movss  %xmm0,-0x7c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x40(%rbp),%rcx
sub    $0x1,%rcx
mov    -0x48(%rbp),%r8
mov    -0x28(%rbp),%r9
call   1040 <clamp2d@plt>
movss  %xmm0,-0x88(%rbp)
ff
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x40(%rbp),%rcx
mov    -0x48(%rbp),%r8
mov    -0x28(%rbp),%r9
call   1040 <clamp2d@plt>
movss  %xmm0,-0x84(%rbp)
ff
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x40(%rbp),%rcx
add    $0x1,%rcx
mov    -0x48(%rbp),%r8
mov    -0x28(%rbp),%r9
call   1040 <clamp2d@plt>
movss  %xmm0,-0x80(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x40(%rbp),%rcx
add    $0x2,%rcx
mov    -0x48(%rbp),%r8
mov    -0x28(%rbp),%r9
call   1040 <clamp2d@plt>
movss  -0x88(%rbp),%xmm1
ff
movss  -0x84(%rbp),%xmm2
ff
movss  -0x80(%rbp),%xmm3
movaps %xmm0,%xmm4
movss  -0x7c(%rbp),%xmm0
call   1050 <catmullrom_filter@plt>
movss  %xmm0,-0x54(%rbp)
movss  -0x34(%rbp),%xmm0
movss  %xmm0,-0x6c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x40(%rbp),%rcx
sub    $0x1,%rcx
mov    -0x48(%rbp),%r8
add    $0x1,%r8
mov    -0x28(%rbp),%r9
call   1040 <clamp2d@plt>
movss  %xmm0,-0x78(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x40(%rbp),%rcx
mov    -0x48(%rbp),%r8
add    $0x1,%r8
mov    -0x28(%rbp),%r9
call   1040 <clamp2d@plt>
movss  %xmm0,-0x74(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x40(%rbp),%rcx
add    $0x1,%rcx
mov    -0x48(%rbp),%r8
add    $0x1,%r8
mov    -0x28(%rbp),%r9
call   1040 <clamp2d@plt>
movss  %xmm0,-0x70(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x40(%rbp),%rcx
add    $0x2,%rcx
mov    -0x48(%rbp),%r8
add    $0x1,%r8
mov    -0x28(%rbp),%r9
call   1040 <clamp2d@plt>
movss  -0x78(%rbp),%xmm1
movss  -0x74(%rbp),%xmm2
movss  -0x70(%rbp),%xmm3
movaps %xmm0,%xmm4
movss  -0x6c(%rbp),%xmm0
call   1050 <catmullrom_filter@plt>
movss  %xmm0,-0x50(%rbp)
movss  -0x34(%rbp),%xmm0
movss  %xmm0,-0x5c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x40(%rbp),%rcx
sub    $0x1,%rcx
mov    -0x48(%rbp),%r8
add    $0x2,%r8
mov    -0x28(%rbp),%r9
call   1040 <clamp2d@plt>
movss  %xmm0,-0x68(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x40(%rbp),%rcx
mov    -0x48(%rbp),%r8
add    $0x2,%r8
mov    -0x28(%rbp),%r9
call   1040 <clamp2d@plt>
movss  %xmm0,-0x64(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x40(%rbp),%rcx
add    $0x1,%rcx
mov    -0x48(%rbp),%r8
add    $0x2,%r8
mov    -0x28(%rbp),%r9
call   1040 <clamp2d@plt>
movss  %xmm0,-0x60(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x40(%rbp),%rcx
add    $0x2,%rcx
mov    -0x48(%rbp),%r8
add    $0x2,%r8
mov    -0x28(%rbp),%r9
call   1040 <clamp2d@plt>
movss  -0x68(%rbp),%xmm1
movss  -0x64(%rbp),%xmm2
movss  -0x60(%rbp),%xmm3
movaps %xmm0,%xmm4
movss  -0x5c(%rbp),%xmm0
call   1050 <catmullrom_filter@plt>
movss  -0x58(%rbp),%xmm1
movss  -0x54(%rbp),%xmm2
movss  -0x50(%rbp),%xmm3
movaps %xmm0,%xmm4
movss  -0x4c(%rbp),%xmm0
call   1050 <catmullrom_filter@plt>
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<catmullrom_interp>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x78,%rsp
mov    %rcx,0x60(%rsp)
mov    %rdx,%r12
mov    %rsi,%rbx
mov    %rdi,%r14
movss  0xeac(%rip),%xmm2
addss  %xmm2,%xmm0
movss  %xmm0,0xc(%rsp)
addss  %xmm1,%xmm2
movss  %xmm2,0x14(%rsp)
call   1030 <floorf@plt>
movaps %xmm0,0x30(%rsp)
movss  0x14(%rsp),%xmm0
call   1030 <floorf@plt>
movss  0xc(%rsp),%xmm1
movaps 0x30(%rsp),%xmm2
subss  %xmm2,%xmm1
movss  %xmm1,0xc(%rsp)
movss  0x14(%rsp),%xmm1
subss  %xmm0,%xmm1
movss  %xmm1,0x14(%rsp)
cvttss2si %xmm2,%rax
mov    %rax,%rcx
sar    $0x3f,%rcx
movss  0xe4e(%rip),%xmm1
subss  %xmm1,%xmm2
cvttss2si %xmm2,%rdx
and    %rcx,%rdx
or     %rax,%rdx
mov    %rdx,0x30(%rsp)
cvttss2si %xmm0,%rax
mov    %rax,%rcx
sar    $0x3f,%rcx
subss  %xmm1,%xmm0
cvttss2si %xmm0,%rsi
and    %rcx,%rsi
or     %rax,%rsi
mov    %rsi,0x70(%rsp)
lea    -0x1(%rdx),%rcx
mov    %rcx,0x28(%rsp)
lea    -0x1(%rsi),%r13
mov    %r14,%rdi
mov    %r14,0x58(%rsp)
mov    %rbx,%rsi
mov    %r12,%rdx
mov    %r13,%r8
mov    0x60(%rsp),%r15
mov    %r15,%r9
call   1040 <clamp2d@plt>
movss  %xmm0,0x1c(%rsp)
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %rbx,0x68(%rsp)
mov    %r12,%rdx
mov    0x30(%rsp),%rbp
mov    %rbp,%rcx
mov    %r13,%r8
mov    %r15,%r9
call   1040 <clamp2d@plt>
movss  %xmm0,0x10(%rsp)
lea    0x1(%rbp),%rcx
mov    %rcx,0x20(%rsp)
mov    0x58(%rsp),%r15
mov    %r15,%rdi
mov    %rbx,%rsi
mov    %r12,%rdx
mov    %r13,%r8
mov    0x60(%rsp),%r14
mov    %r14,%r9
call   1040 <clamp2d@plt>
movss  %xmm0,0x8(%rsp)
lea    0x2(%rbp),%rcx
mov    %rcx,0x48(%rsp)
mov    %r15,%rdi
mov    0x68(%rsp),%rbp
mov    %rbp,%rsi
mov    %r12,%rbx
mov    %r12,%rdx
mov    %r13,%r8
mov    %r14,%r9
call   1040 <clamp2d@plt>
movaps %xmm0,%xmm4
movss  0xc(%rsp),%xmm0
movss  0x1c(%rsp),%xmm1
movss  0x10(%rsp),%xmm2
movss  0x8(%rsp),%xmm3
call   1050 <catmullrom_filter@plt>
movss  %xmm0,0x1c(%rsp)
mov    %r15,%rdi
mov    %rbp,%rsi
mov    %r12,%rdx
mov    0x28(%rsp),%rcx
mov    0x70(%rsp),%r12
mov    %r12,%r8
mov    %r14,%r9
call   1040 <clamp2d@plt>
movss  %xmm0,0x10(%rsp)
mov    %r15,%rdi
mov    %rbp,%rsi
mov    %rbx,%rdx
mov    0x30(%rsp),%rcx
mov    %r12,%r8
mov    %r14,%r9
call   1040 <clamp2d@plt>
movss  %xmm0,0x8(%rsp)
mov    %r15,%rdi
mov    %rbp,%rsi
mov    %rbx,%rdx
mov    0x20(%rsp),%rcx
mov    %r12,%r8
mov    %r14,%r9
call   1040 <clamp2d@plt>
movss  %xmm0,0x18(%rsp)
mov    %r15,%rdi
mov    %rbp,%rsi
mov    %rbx,%rdx
mov    0x48(%rsp),%rcx
mov    %r12,%r8
mov    %r14,%r9
call   1040 <clamp2d@plt>
movaps %xmm0,%xmm4
movss  0xc(%rsp),%xmm0
movss  0x10(%rsp),%xmm1
movss  0x8(%rsp),%xmm2
movss  0x18(%rsp),%xmm3
call   1050 <catmullrom_filter@plt>
movss  %xmm0,0x10(%rsp)
lea    0x1(%r12),%r13
mov    %r15,%rdi
mov    %rbp,%rsi
mov    %rbx,%rdx
mov    0x28(%rsp),%rcx
mov    %r13,%r8
mov    %r14,%r9
call   1040 <clamp2d@plt>
movss  %xmm0,0x8(%rsp)
mov    %r15,%rdi
mov    %rbp,%rsi
mov    %rbx,%rdx
mov    0x30(%rsp),%rcx
mov    %r13,%r8
mov    %r14,%r9
call   1040 <clamp2d@plt>
movss  %xmm0,0x18(%rsp)
mov    %r15,%rdi
mov    %rbp,%rsi
mov    %rbx,%rdx
mov    0x20(%rsp),%rcx
mov    %r13,%r8
mov    %r14,%r9
call   1040 <clamp2d@plt>
movss  %xmm0,0x54(%rsp)
mov    %r15,%rdi
mov    %rbp,%rsi
mov    %rbp,%r15
mov    %rbx,%rdx
mov    %rbx,%rbp
mov    0x48(%rsp),%rcx
mov    %r13,%r8
mov    %r14,%r9
call   1040 <clamp2d@plt>
movaps %xmm0,%xmm4
movss  0xc(%rsp),%xmm0
movss  0x8(%rsp),%xmm1
movss  0x18(%rsp),%xmm2
movss  0x54(%rsp),%xmm3
call   1050 <catmullrom_filter@plt>
movss  %xmm0,0x8(%rsp)
add    $0x2,%r12
mov    0x58(%rsp),%rbx
mov    %rbx,%rdi
mov    %r15,%rsi
mov    %rbp,%rdx
mov    0x28(%rsp),%rcx
mov    %r12,%r8
mov    %r14,%r9
call   1040 <clamp2d@plt>
movss  %xmm0,0x28(%rsp)
mov    %rbx,%rdi
mov    %r15,%rsi
mov    %rbp,%rdx
mov    0x30(%rsp),%rcx
mov    %r12,%r8
mov    %r14,%r9
call   1040 <clamp2d@plt>
movss  %xmm0,0x30(%rsp)
mov    %rbx,%rdi
mov    %r15,%rsi
mov    %rbp,%rdx
mov    0x20(%rsp),%rcx
mov    %r12,%r8
mov    %r14,%r9
call   1040 <clamp2d@plt>
movss  %xmm0,0x20(%rsp)
mov    %rbx,%rdi
mov    %r15,%rsi
mov    %rbp,%rdx
mov    0x48(%rsp),%rcx
mov    %r12,%r8
mov    %r14,%r9
call   1040 <clamp2d@plt>
movaps %xmm0,%xmm4
movss  0xc(%rsp),%xmm0
movss  0x28(%rsp),%xmm1
movss  0x30(%rsp),%xmm2
movss  0x20(%rsp),%xmm3
call   1050 <catmullrom_filter@plt>
movaps %xmm0,%xmm4
movss  0x14(%rsp),%xmm0
movss  0x1c(%rsp),%xmm1
movss  0x10(%rsp),%xmm2
movss  0x8(%rsp),%xmm3
add    $0x78,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1050 <catmullrom_filter@plt>

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

LLVM IR (-O2):
define float @catmullrom_interp(float* %0, i64 %1, i64 %2, float %3, float %4, i64 %5) {
%7 = fadd float %3, -5.000000e-01
%8 = fadd float %4, -5.000000e-01
%9 = tail call float @llvm.floor.f32(float %7)
%10 = tail call float @llvm.floor.f32(float %8)
%11 = fsub float %7, %9
%12 = fsub float %8, %10
%13 = fptoui float %9 to i64
%14 = fptoui float %10 to i64
%15 = add i64 %13, -1
%16 = add i64 %14, -1
%17 = tail call float @clamp2d(float* %0, i64 %1, i64 %2, i64 %15, i64 %16, i64 %5)
%18 = tail call float @clamp2d(float* %0, i64 %1, i64 %2, i64 %13, i64 %16, i64 %5)
%19 = add i64 %13, 1
%20 = tail call float @clamp2d(float* %0, i64 %1, i64 %2, i64 %19, i64 %16, i64 %5)
%21 = add i64 %13, 2
%22 = tail call float @clamp2d(float* %0, i64 %1, i64 %2, i64 %21, i64 %16, i64 %5)
%23 = tail call float @catmullrom_filter(float %11, float %17, float %18, float %20, float %22)
%24 = tail call float @clamp2d(float* %0, i64 %1, i64 %2, i64 %15, i64 %14, i64 %5)
%25 = tail call float @clamp2d(float* %0, i64 %1, i64 %2, i64 %13, i64 %14, i64 %5)
%26 = tail call float @clamp2d(float* %0, i64 %1, i64 %2, i64 %19, i64 %14, i64 %5)
%27 = tail call float @clamp2d(float* %0, i64 %1, i64 %2, i64 %21, i64 %14, i64 %5)
%28 = tail call float @catmullrom_filter(float %11, float %24, float %25, float %26, float %27)
%29 = add i64 %14, 1
%30 = tail call float @clamp2d(float* %0, i64 %1, i64 %2, i64 %15, i64 %29, i64 %5)
%31 = tail call float @clamp2d(float* %0, i64 %1, i64 %2, i64 %13, i64 %29, i64 %5)
%32 = tail call float @clamp2d(float* %0, i64 %1, i64 %2, i64 %19, i64 %29, i64 %5)
%33 = tail call float @clamp2d(float* %0, i64 %1, i64 %2, i64 %21, i64 %29, i64 %5)
%34 = tail call float @catmullrom_filter(float %11, float %30, float %31, float %32, float %33)
%35 = add i64 %14, 2
%36 = tail call float @clamp2d(float* %0, i64 %1, i64 %2, i64 %15, i64 %35, i64 %5)
%37 = tail call float @clamp2d(float* %0, i64 %1, i64 %2, i64 %13, i64 %35, i64 %5)
%38 = tail call float @clamp2d(float* %0, i64 %1, i64 %2, i64 %19, i64 %35, i64 %5)
%39 = tail call float @clamp2d(float* %0, i64 %1, i64 %2, i64 %21, i64 %35, i64 %5)
%40 = tail call float @catmullrom_filter(float %11, float %36, float %37, float %38, float %39)
%41 = tail call float @catmullrom_filter(float %12, float %23, float %28, float %34, float %40)
ret float %41
}