#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*/ transpose(unsigned char **, int, unsigned char **, int, int);
int /*<<< orphan*/ vpx_lpf_horizontal_8(unsigned char *, int,
                                        unsigned char const *,
                                        unsigned char const *,
                                        unsigned char const *);
void vpx_lpf_vertical_8_sse2(unsigned char *s, int pitch,
                             const unsigned char *blimit,
                             const unsigned char *limit,
                             const unsigned char *thresh) {
  unsigned char t_dst[8 * 8] __attribute__((aligned(8)));
  unsigned char *src[1];
  unsigned char *dst[1];
  src[0] = s - 4;
  dst[0] = t_dst;
  transpose(src, pitch, dst, 8, 1);
  vpx_lpf_horizontal_8(t_dst + 4 * 8, 8, blimit, limit, thresh);
  src[0] = t_dst;
  dst[0] = s - 4;
  transpose(src, 8, dst, pitch, 1);
}


x86 assembly (clang, -O0):
<vpx_lpf_vertical_8_sse2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x8(%rbp),%rax
add    $0xfffffffffffffffc,%rax
mov    %rax,-0x70(%rbp)
lea    -0x68(%rbp),%rax
mov    %rax,-0x78(%rbp)
lea    -0x70(%rbp),%rdi
mov    -0xc(%rbp),%esi
lea    -0x78(%rbp),%rdx
mov    $0x8,%ecx
mov    $0x1,%r8d
call   1030 <transpose@plt>
lea    -0x68(%rbp),%rdi
add    $0x20,%rdi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
mov    $0x8,%esi
call   1040 <vpx_lpf_horizontal_8@plt>
lea    -0x68(%rbp),%rax
mov    %rax,-0x70(%rbp)
mov    -0x8(%rbp),%rax
add    $0xfffffffffffffffc,%rax
mov    %rax,-0x78(%rbp)
lea    -0x70(%rbp),%rdi
lea    -0x78(%rbp),%rdx
mov    -0xc(%rbp),%ecx
mov    $0x8,%esi
mov    $0x1,%r8d
call   1030 <transpose@plt>
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vpx_lpf_vertical_8_sse2>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x58,%rsp
mov    %r8,%r14
mov    %rcx,%r15
mov    %rdx,%r12
mov    %esi,%ebp
mov    %rdi,%rbx
add    $0xfffffffffffffffc,%rbx
mov    %rbx,0x10(%rsp)
lea    0x18(%rsp),%rax
mov    %rax,0x8(%rsp)
lea    0x10(%rsp),%r13
lea    0x8(%rsp),%rdx
mov    %r13,%rdi
mov    $0x8,%ecx
mov    $0x1,%r8d
call   1030 <transpose@plt>
lea    0x38(%rsp),%rdi
mov    $0x8,%esi
mov    %r12,%rdx
mov    %r15,%rcx
mov    %r14,%r8
call   1040 <vpx_lpf_horizontal_8@plt>
lea    0x18(%rsp),%rax
mov    %rax,0x10(%rsp)
mov    %rbx,0x8(%rsp)
mov    %r13,%rdi
mov    $0x8,%esi
lea    0x8(%rsp),%rdx
mov    %ebp,%ecx
mov    $0x1,%r8d
call   1030 <transpose@plt>
add    $0x58,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @vpx_lpf_vertical_8_sse2(i8* %0, i32 %1, i8* %2, i8* %3, i8* %4) {
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i8*
%11 = alloca [64 x i8]
%12 = alloca [1 x i8*]
%13 = alloca [1 x i8*]
store i8* %0, i8** %6
store i32 %1, i32* %7
store i8* %2, i8** %8
store i8* %3, i8** %9
store i8* %4, i8** %10
%14 = load i8*, i8** %6
%15 = getelementptr inbounds i8, i8* %14, i64 -4
%16 = getelementptr inbounds [1 x i8*], [1 x i8*]* %12, i64 0, i64 0
store i8* %15, i8** %16
%17 = getelementptr inbounds [64 x i8], [64 x i8]* %11, i64 0, i64 0
%18 = getelementptr inbounds [1 x i8*], [1 x i8*]* %13, i64 0, i64 0
store i8* %17, i8** %18
%19 = getelementptr inbounds [1 x i8*], [1 x i8*]* %12, i64 0, i64 0
%20 = load i32, i32* %7
%21 = getelementptr inbounds [1 x i8*], [1 x i8*]* %13, i64 0, i64 0
%22 = call i32 @transpose(i8** %19, i32 %20, i8** %21, i32 8, i32 1)
%23 = getelementptr inbounds [64 x i8], [64 x i8]* %11, i64 0, i64 0
%24 = getelementptr inbounds i8, i8* %23, i64 32
%25 = load i8*, i8** %8
%26 = load i8*, i8** %9
%27 = load i8*, i8** %10
%28 = call i32 @vpx_lpf_horizontal_8(i8* %24, i32 8, i8* %25, i8* %26, i8* %27)
%29 = getelementptr inbounds [64 x i8], [64 x i8]* %11, i64 0, i64 0
%30 = getelementptr inbounds [1 x i8*], [1 x i8*]* %12, i64 0, i64 0
store i8* %29, i8** %30
%31 = load i8*, i8** %6
%32 = getelementptr inbounds i8, i8* %31, i64 -4
%33 = getelementptr inbounds [1 x i8*], [1 x i8*]* %13, i64 0, i64 0
store i8* %32, i8** %33
%34 = getelementptr inbounds [1 x i8*], [1 x i8*]* %12, i64 0, i64 0
%35 = getelementptr inbounds [1 x i8*], [1 x i8*]* %13, i64 0, i64 0
%36 = load i32, i32* %7
%37 = call i32 @transpose(i8** %34, i32 8, i8** %35, i32 %36, i32 1)
ret void
}

LLVM IR (-O2):
define void @vpx_lpf_vertical_8_sse2(i8* %0, i32 %1, i8* %2, i8* %3, i8* %4) {
%6 = alloca [64 x i8]
%7 = alloca [1 x i8*]
%8 = alloca [1 x i8*]
%9 = getelementptr inbounds [64 x i8], [64 x i8]* %6, i64 0, i64 0
%10 = bitcast [1 x i8*]* %7 to i8*
%11 = bitcast [1 x i8*]* %8 to i8*
%12 = getelementptr inbounds i8, i8* %0, i64 -4
%13 = getelementptr inbounds [1 x i8*], [1 x i8*]* %7, i64 0, i64 0
store i8* %12, i8** %13
%14 = getelementptr inbounds [1 x i8*], [1 x i8*]* %8, i64 0, i64 0
store i8* %9, i8** %14
%15 = call i32 @transpose(i8** %13, i32 %1, i8** %14, i32 8, i32 1)
%16 = getelementptr inbounds [64 x i8], [64 x i8]* %6, i64 0, i64 32
%17 = call i32 @vpx_lpf_horizontal_8(i8* %16, i32 8, i8* %2, i8* %3, i8* %4)
store i8* %9, i8** %13
store i8* %12, i8** %14
%18 = call i32 @transpose(i8** %13, i32 8, i8** %14, i32 %1, i32 1)
ret void
}