#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 */
int /*<<< orphan*/ filter_block2d_bil_first_pass(unsigned char *,
                                                 unsigned short *, unsigned int,
                                                 int, int, short const *);
int /*<<< orphan*/ filter_block2d_bil_second_pass(unsigned short *,
                                                  unsigned char *, unsigned int,
                                                  int, int, short const *);
void filter_block2d_bil(unsigned char *src_ptr, unsigned char *dst_ptr,
                        unsigned int src_pitch, unsigned int dst_pitch,
                        const short *HFilter, const short *VFilter, int Width,
                        int Height) {
  unsigned short FData[17 * 16];
  filter_block2d_bil_first_pass(src_ptr, FData, src_pitch, Height + 1, Width,
                                HFilter);
  filter_block2d_bil_second_pass(FData, dst_ptr, dst_pitch, Height, Width,
                                 VFilter);
}


x86 assembly (clang, -O0):
<filter_block2d_bil>:
push   %rbp
mov    %rsp,%rbp
sub    $0x250,%rsp
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%eax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x250(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    0x18(%rbp),%ecx
add    $0x1,%ecx
mov    0x10(%rbp),%r8d
mov    -0x20(%rbp),%r9
call   1040 <filter_block2d_bil_first_pass@plt>
lea    -0x250(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%edx
mov    0x18(%rbp),%ecx
mov    0x10(%rbp),%r8d
mov    -0x28(%rbp),%r9
call   1030 <filter_block2d_bil_second_pass@plt>
add    $0x250,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<filter_block2d_bil>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x228,%rsp
mov    %r9,%r14
mov    %r8,%r9
mov    %ecx,%ebp
mov    %rsi,%rbx
mov    0x260(%rsp),%r15d
mov    0x268(%rsp),%r12d
lea    0x1(%r12),%ecx
mov    %rsp,%r13
mov    %r13,%rsi
mov    %r15d,%r8d
call   1040 <filter_block2d_bil_first_pass@plt>
mov    %r13,%rdi
mov    %rbx,%rsi
mov    %ebp,%edx
mov    %r12d,%ecx
mov    %r15d,%r8d
mov    %r14,%r9
call   1030 <filter_block2d_bil_second_pass@plt>
add    $0x228,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @filter_block2d_bil(i8* %0, i8* %1, i32 %2, i32 %3, i16* %4, i16* %5, i32 %6, i32 %7) {
%9 = alloca i8*
%10 = alloca i8*
%11 = alloca i32
%12 = alloca i32
%13 = alloca i16*
%14 = alloca i16*
%15 = alloca i32
%16 = alloca i32
%17 = alloca [272 x i16]
store i8* %0, i8** %9
store i8* %1, i8** %10
store i32 %2, i32* %11
store i32 %3, i32* %12
store i16* %4, i16** %13
store i16* %5, i16** %14
store i32 %6, i32* %15
store i32 %7, i32* %16
%18 = load i8*, i8** %9
%19 = getelementptr inbounds [272 x i16], [272 x i16]* %17, i64 0, i64 0
%20 = load i32, i32* %11
%21 = load i32, i32* %16
%22 = add nsw i32 %21, 1
%23 = load i32, i32* %15
%24 = load i16*, i16** %13
%25 = call i32 @filter_block2d_bil_first_pass(i8* %18, i16* %19, i32 %20, i32 %22, i32 %23, i16* %24)
%26 = getelementptr inbounds [272 x i16], [272 x i16]* %17, i64 0, i64 0
%27 = load i8*, i8** %10
%28 = load i32, i32* %12
%29 = load i32, i32* %16
%30 = load i32, i32* %15
%31 = load i16*, i16** %14
%32 = call i32 @filter_block2d_bil_second_pass(i16* %26, i8* %27, i32 %28, i32 %29, i32 %30, i16* %31)
ret void
}

LLVM IR (-O2):
define void @filter_block2d_bil(i8* %0, i8* %1, i32 %2, i32 %3, i16* %4, i16* %5, i32 %6, i32 %7) {
%9 = alloca [272 x i16]
%10 = bitcast [272 x i16]* %9 to i8*
%11 = getelementptr inbounds [272 x i16], [272 x i16]* %9, i64 0, i64 0
%12 = add nsw i32 %7, 1
%13 = call i32 @filter_block2d_bil_first_pass(i8* %0, i16* %11, i32 %2, i32 %12, i32 %6, i16* %4)
%14 = call i32 @filter_block2d_bil_second_pass(i16* %11, i8* %1, i32 %3, i32 %7, i32 %6, i16* %5)
ret void
}