#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*/ vp8_filter_block2d_bil_first_pass(unsigned char *,
                                                     unsigned short *,
                                                     unsigned int, int, int,
                                                     int, int const *);
int /*<<< orphan*/ vp8_filter_block2d_bil_second_pass(unsigned short *,
                                                      unsigned char *,
                                                      unsigned int, int, int,
                                                      int, int, int const *);
void vp8_filter_block2d_bil(unsigned char *src_ptr, unsigned char *output_ptr,
                            unsigned int src_pixels_per_line,
                            unsigned int dst_pitch, const int *HFilter,
                            const int *VFilter, int Width, int Height) {
  unsigned short FData[17 * 16];
  vp8_filter_block2d_bil_first_pass(src_ptr, FData, src_pixels_per_line, 1,
                                    Height + 1, Width, HFilter);
  vp8_filter_block2d_bil_second_pass(FData, output_ptr, dst_pitch, Width, Width,
                                     Height, Width, VFilter);
}


x86 assembly (clang, -O0):
<vp8_filter_block2d_bil>:
push   %rbp
mov    %rsp,%rbp
sub    $0x260,%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),%r8d
add    $0x1,%r8d
mov    0x10(%rbp),%r9d
mov    -0x20(%rbp),%rax
mov    $0x1,%ecx
mov    %rax,(%rsp)
call   1030 <vp8_filter_block2d_bil_first_pass@plt>
lea    -0x250(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%edx
mov    0x10(%rbp),%ecx
mov    0x10(%rbp),%r8d
mov    0x18(%rbp),%r9d
mov    0x10(%rbp),%r10d
mov    -0x28(%rbp),%rax
mov    %r10d,(%rsp)
mov    %rax,0x8(%rsp)
call   1040 <vp8_filter_block2d_bil_second_pass@plt>
add    $0x260,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @vp8_filter_block2d_bil(i8* %0, i8* %1, i32 %2, i32 %3, i32* %4, i32* %5, i32 %6, i32 %7) {
%9 = alloca i8*
%10 = alloca i8*
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32*
%14 = alloca i32*
%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 i32* %4, i32** %13
store i32* %5, i32** %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 i32*, i32** %13
%25 = call i32 @vp8_filter_block2d_bil_first_pass(i8* %18, i16* %19, i32 %20, i32 1, i32 %22, i32 %23, i32* %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* %15
%30 = load i32, i32* %15
%31 = load i32, i32* %16
%32 = load i32, i32* %15
%33 = load i32*, i32** %14
%34 = call i32 @vp8_filter_block2d_bil_second_pass(i16* %26, i8* %27, i32 %28, i32 %29, i32 %30, i32 %31, i32 %32, i32* %33)
ret void
}

LLVM IR (-O2):
define void @vp8_filter_block2d_bil(i8* %0, i8* %1, i32 %2, i32 %3, i32* %4, i32* %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 @vp8_filter_block2d_bil_first_pass(i8* %0, i16* %11, i32 %2, i32 1, i32 %12, i32 %6, i32* %4)
%14 = call i32 @vp8_filter_block2d_bil_second_pass(i16* %11, i8* %1, i32 %3, i32 %6, i32 %6, i32 %7, i32 %6, i32* %5)
ret void
}