#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;

/* Variables and functions */
int /*<<< orphan*/ x264_pixel_avg2_w16_altivec(int /*<<< orphan*/ *, int,
                                               int /*<<< orphan*/ *, int,
                                               int /*<<< orphan*/ *, int);
int /*<<< orphan*/ x264_pixel_avg2_w4_altivec(int /*<<< orphan*/ *, int,
                                              int /*<<< orphan*/ *, int,
                                              int /*<<< orphan*/ *, int);
void x264_pixel_avg2_w20_altivec(uint8_t *dst, int i_dst, uint8_t *src1,
                                 int i_src1, uint8_t *src2, int i_height) {
  x264_pixel_avg2_w16_altivec(dst, i_dst, src1, i_src1, src2, i_height);
  x264_pixel_avg2_w4_altivec(dst + 16, i_dst, src1 + 16, i_src1, src2 + 16,
                             i_height);
}


x86 assembly (clang, -O0):
<x264_pixel_avg2_w20_altivec>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9d,-0x2c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
mov    -0x28(%rbp),%r8
mov    -0x2c(%rbp),%r9d
call   1040 <x264_pixel_avg2_w16_altivec@plt>
mov    -0x8(%rbp),%rdi
add    $0x40,%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
add    $0x40,%rdx
mov    -0x1c(%rbp),%ecx
mov    -0x28(%rbp),%r8
add    $0x40,%r8
mov    -0x2c(%rbp),%r9d
call   1030 <x264_pixel_avg2_w4_altivec@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<x264_pixel_avg2_w20_altivec>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %r9d,%r14d
mov    %r8,%r13
mov    %ecx,%r15d
mov    %rdx,%rbp
mov    %esi,%r12d
mov    %rdi,%rbx
call   1040 <x264_pixel_avg2_w16_altivec@plt>
add    $0x40,%rbx
add    $0x40,%rbp
add    $0x40,%r13
mov    %rbx,%rdi
mov    %r12d,%esi
mov    %rbp,%rdx
mov    %r15d,%ecx
mov    %r13,%r8
mov    %r14d,%r9d
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <x264_pixel_avg2_w4_altivec@plt>

LLVM IR (-O0):
define void @x264_pixel_avg2_w20_altivec(i32* %0, i32 %1, i32* %2, i32 %3, i32* %4, i32 %5) {
%7 = alloca i32*
%8 = alloca i32
%9 = alloca i32*
%10 = alloca i32
%11 = alloca i32*
%12 = alloca i32
store i32* %0, i32** %7
store i32 %1, i32* %8
store i32* %2, i32** %9
store i32 %3, i32* %10
store i32* %4, i32** %11
store i32 %5, i32* %12
%13 = load i32*, i32** %7
%14 = load i32, i32* %8
%15 = load i32*, i32** %9
%16 = load i32, i32* %10
%17 = load i32*, i32** %11
%18 = load i32, i32* %12
%19 = call i32 @x264_pixel_avg2_w16_altivec(i32* %13, i32 %14, i32* %15, i32 %16, i32* %17, i32 %18)
%20 = load i32*, i32** %7
%21 = getelementptr inbounds i32, i32* %20, i64 16
%22 = load i32, i32* %8
%23 = load i32*, i32** %9
%24 = getelementptr inbounds i32, i32* %23, i64 16
%25 = load i32, i32* %10
%26 = load i32*, i32** %11
%27 = getelementptr inbounds i32, i32* %26, i64 16
%28 = load i32, i32* %12
%29 = call i32 @x264_pixel_avg2_w4_altivec(i32* %21, i32 %22, i32* %24, i32 %25, i32* %27, i32 %28)
ret void
}

LLVM IR (-O2):
define void @x264_pixel_avg2_w20_altivec(i32* %0, i32 %1, i32* %2, i32 %3, i32* %4, i32 %5) {
%7 = tail call i32 @x264_pixel_avg2_w16_altivec(i32* %0, i32 %1, i32* %2, i32 %3, i32* %4, i32 %5)
%8 = getelementptr inbounds i32, i32* %0, i64 16
%9 = getelementptr inbounds i32, i32* %2, i64 16
%10 = getelementptr inbounds i32, i32* %4, i64 16
%11 = tail call i32 @x264_pixel_avg2_w4_altivec(i32* %8, i32 %1, i32* %9, i32 %3, i32* %10, i32 %5)
ret void
}