#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 */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ int16_t;

/* Variables and functions */
int /*<<< orphan*/ p264_sub8x8_dct_mmxext(int /*<<< orphan*/ ***,
                                          int /*<<< orphan*/ *, int,
                                          int /*<<< orphan*/ *, int);
void p264_sub16x16_dct_mmxext(int16_t dct[16][4][4], uint8_t *pix1, int i_pix1,
                              uint8_t *pix2, int i_pix2) {
  p264_sub8x8_dct_mmxext(&dct[0], &pix1[0], i_pix1, &pix2[0], i_pix2);
  p264_sub8x8_dct_mmxext(&dct[4], &pix1[8], i_pix1, &pix2[8], i_pix2);
  p264_sub8x8_dct_mmxext(&dct[8], &pix1[8 * i_pix1], i_pix1, &pix2[8 * i_pix2],
                         i_pix2);
  p264_sub8x8_dct_mmxext(&dct[12], &pix1[8 * i_pix1 + 8], i_pix1,
                         &pix2[8 * i_pix2 + 8], i_pix2);
}


x86 assembly (clang, -O0):
<p264_sub16x16_dct_mmxext>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x20(%rbp),%rcx
mov    -0x24(%rbp),%r8d
call   1030 <p264_sub8x8_dct_mmxext@plt>
mov    -0x8(%rbp),%rdi
add    $0x100,%rdi
mov    -0x10(%rbp),%rsi
add    $0x20,%rsi
mov    -0x14(%rbp),%edx
mov    -0x20(%rbp),%rcx
add    $0x20,%rcx
mov    -0x24(%rbp),%r8d
call   1030 <p264_sub8x8_dct_mmxext@plt>
mov    -0x8(%rbp),%rdi
add    $0x200,%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%eax
shl    $0x3,%eax
cltq
shl    $0x2,%rax
add    %rax,%rsi
mov    -0x14(%rbp),%edx
mov    -0x20(%rbp),%rcx
mov    -0x24(%rbp),%eax
shl    $0x3,%eax
cltq
shl    $0x2,%rax
add    %rax,%rcx
mov    -0x24(%rbp),%r8d
call   1030 <p264_sub8x8_dct_mmxext@plt>
mov    -0x8(%rbp),%rdi
add    $0x300,%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%eax
shl    $0x3,%eax
add    $0x8,%eax
cltq
shl    $0x2,%rax
add    %rax,%rsi
mov    -0x14(%rbp),%edx
mov    -0x20(%rbp),%rcx
mov    -0x24(%rbp),%eax
shl    $0x3,%eax
add    $0x8,%eax
cltq
shl    $0x2,%rax
add    %rax,%rcx
mov    -0x24(%rbp),%r8d
call   1030 <p264_sub8x8_dct_mmxext@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<p264_sub16x16_dct_mmxext>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %r8d,%r14d
mov    %rcx,%r15
mov    %edx,%r12d
mov    %rsi,%r13
mov    %rdi,%rbx
call   1030 <p264_sub8x8_dct_mmxext@plt>
lea    0x100(%rbx),%rdi
lea    0x20(%r13),%rsi
lea    0x20(%r15),%rcx
mov    %r12d,%edx
mov    %r14d,%r8d
call   1030 <p264_sub8x8_dct_mmxext@plt>
lea    0x200(%rbx),%rdi
lea    0x0(,%r12,8),%eax
cltq
mov    %rax,(%rsp)
lea    0x0(%r13,%rax,4),%rsi
lea    0x0(,%r14,8),%eax
movslq %eax,%rbp
lea    (%r15,%rbp,4),%rcx
mov    %r12d,%edx
mov    %r14d,%r8d
call   1030 <p264_sub8x8_dct_mmxext@plt>
add    $0x300,%rbx
mov    (%rsp),%rax
lea    0x20(,%rax,4),%rsi
add    %r13,%rsi
lea    0x20(%r15,%rbp,4),%rcx
mov    %rbx,%rdi
mov    %r12d,%edx
mov    %r14d,%r8d
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <p264_sub8x8_dct_mmxext@plt>

LLVM IR (-O0):
define void @p264_sub16x16_dct_mmxext([4 x [4 x i32]]* %0, i32* %1, i32 %2, i32* %3, i32 %4) {
%6 = alloca [4 x [4 x i32]]*
%7 = alloca i32*
%8 = alloca i32
%9 = alloca i32*
%10 = alloca i32
store [4 x [4 x i32]]* %0, [4 x [4 x i32]]** %6
store i32* %1, i32** %7
store i32 %2, i32* %8
store i32* %3, i32** %9
store i32 %4, i32* %10
%11 = load [4 x [4 x i32]]*, [4 x [4 x i32]]** %6
%12 = getelementptr inbounds [4 x [4 x i32]], [4 x [4 x i32]]* %11, i64 0
%13 = bitcast [4 x [4 x i32]]* %12 to i32***
%14 = load i32*, i32** %7
%15 = getelementptr inbounds i32, i32* %14, i64 0
%16 = load i32, i32* %8
%17 = load i32*, i32** %9
%18 = getelementptr inbounds i32, i32* %17, i64 0
%19 = load i32, i32* %10
%20 = call i32 @p264_sub8x8_dct_mmxext(i32*** %13, i32* %15, i32 %16, i32* %18, i32 %19)
%21 = load [4 x [4 x i32]]*, [4 x [4 x i32]]** %6
%22 = getelementptr inbounds [4 x [4 x i32]], [4 x [4 x i32]]* %21, i64 4
%23 = bitcast [4 x [4 x i32]]* %22 to i32***
%24 = load i32*, i32** %7
%25 = getelementptr inbounds i32, i32* %24, i64 8
%26 = load i32, i32* %8
%27 = load i32*, i32** %9
%28 = getelementptr inbounds i32, i32* %27, i64 8
%29 = load i32, i32* %10
%30 = call i32 @p264_sub8x8_dct_mmxext(i32*** %23, i32* %25, i32 %26, i32* %28, i32 %29)
%31 = load [4 x [4 x i32]]*, [4 x [4 x i32]]** %6
%32 = getelementptr inbounds [4 x [4 x i32]], [4 x [4 x i32]]* %31, i64 8
%33 = bitcast [4 x [4 x i32]]* %32 to i32***
%34 = load i32*, i32** %7
%35 = load i32, i32* %8
%36 = mul nsw i32 8, %35
%37 = sext i32 %36 to i64
%38 = getelementptr inbounds i32, i32* %34, i64 %37
%39 = load i32, i32* %8
%40 = load i32*, i32** %9
%41 = load i32, i32* %10
%42 = mul nsw i32 8, %41
%43 = sext i32 %42 to i64
%44 = getelementptr inbounds i32, i32* %40, i64 %43
%45 = load i32, i32* %10
%46 = call i32 @p264_sub8x8_dct_mmxext(i32*** %33, i32* %38, i32 %39, i32* %44, i32 %45)
%47 = load [4 x [4 x i32]]*, [4 x [4 x i32]]** %6
%48 = getelementptr inbounds [4 x [4 x i32]], [4 x [4 x i32]]* %47, i64 12
%49 = bitcast [4 x [4 x i32]]* %48 to i32***
%50 = load i32*, i32** %7
%51 = load i32, i32* %8
%52 = mul nsw i32 8, %51
%53 = add nsw i32 %52, 8
%54 = sext i32 %53 to i64
%55 = getelementptr inbounds i32, i32* %50, i64 %54
%56 = load i32, i32* %8
%57 = load i32*, i32** %9
%58 = load i32, i32* %10
%59 = mul nsw i32 8, %58
%60 = add nsw i32 %59, 8
%61 = sext i32 %60 to i64
%62 = getelementptr inbounds i32, i32* %57, i64 %61
%63 = load i32, i32* %10
%64 = call i32 @p264_sub8x8_dct_mmxext(i32*** %49, i32* %55, i32 %56, i32* %62, i32 %63)
ret void
}

LLVM IR (-O2):
define void @p264_sub16x16_dct_mmxext([4 x [4 x i32]]* %0, i32* %1, i32 %2, i32* %3, i32 %4) {
%6 = bitcast [4 x [4 x i32]]* %0 to i32***
%7 = tail call i32 @p264_sub8x8_dct_mmxext(i32*** %6, i32* %1, i32 %2, i32* %3, i32 %4)
%8 = getelementptr inbounds [4 x [4 x i32]], [4 x [4 x i32]]* %0, i64 4
%9 = bitcast [4 x [4 x i32]]* %8 to i32***
%10 = getelementptr inbounds i32, i32* %1, i64 8
%11 = getelementptr inbounds i32, i32* %3, i64 8
%12 = tail call i32 @p264_sub8x8_dct_mmxext(i32*** %9, i32* %10, i32 %2, i32* %11, i32 %4)
%13 = getelementptr inbounds [4 x [4 x i32]], [4 x [4 x i32]]* %0, i64 8
%14 = bitcast [4 x [4 x i32]]* %13 to i32***
%15 = shl nsw i32 %2, 3
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds i32, i32* %1, i64 %16
%18 = shl nsw i32 %4, 3
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds i32, i32* %3, i64 %19
%21 = tail call i32 @p264_sub8x8_dct_mmxext(i32*** %14, i32* %17, i32 %2, i32* %20, i32 %4)
%22 = getelementptr inbounds [4 x [4 x i32]], [4 x [4 x i32]]* %0, i64 12
%23 = bitcast [4 x [4 x i32]]* %22 to i32***
%24 = add nsw i32 %15, 8
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds i32, i32* %1, i64 %25
%27 = add nsw i32 %18, 8
%28 = sext i32 %27 to i64
%29 = getelementptr inbounds i32, i32* %3, i64 %28
%30 = tail call i32 @p264_sub8x8_dct_mmxext(i32*** %23, i32* %26, i32 %2, i32* %29, i32 %4)
ret void
}