#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*/ yuv420_rgb16(int /*<<< orphan*/ *,
                                int /*<<< orphan*/ const *,
                                int /*<<< orphan*/ const *,
                                int /*<<< orphan*/ const *, int, int, int, int,
                                int, int /*<<< orphan*/);
int /*<<< orphan*/ yuv420_rgb16_2(int /*<<< orphan*/ *,
                                  int /*<<< orphan*/ const *,
                                  int /*<<< orphan*/ const *,
                                  int /*<<< orphan*/ const *, int, int, int,
                                  int, int, int /*<<< orphan*/);
void mmxext_rgb16(uint8_t *image, const uint8_t *py, const uint8_t *pu,
                  const uint8_t *pv, int width, int height, int rgb_stride,
                  int y_stride, int uv_stride) {
  if (width < height)
    yuv420_rgb16_2(image, py, pu, pv, width, height, rgb_stride, y_stride,
                   uv_stride, 0);
  else
    yuv420_rgb16(image, py, pu, pv, width, height, rgb_stride, y_stride,
                 uv_stride, 0);
}


x86 assembly (clang, -O0):
<mmxext_rgb16>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
sub    $0x48,%rsp
mov    0x20(%rbp),%eax
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%eax
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    %r8d,-0x2c(%rbp)
mov    %r9d,-0x30(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x30(%rbp),%eax
jge    119a <mmxext_rgb16+0x7a>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    -0x28(%rbp),%rcx
mov    -0x2c(%rbp),%r8d
mov    -0x30(%rbp),%r9d
mov    0x10(%rbp),%r11d
mov    0x18(%rbp),%r10d
mov    0x20(%rbp),%eax
xor    %ebx,%ebx
mov    %r11d,(%rsp)
mov    %r10d,0x8(%rsp)
mov    %eax,0x10(%rsp)
movl   $0x0,0x18(%rsp)
call   1040 <yuv420_rgb16_2@plt>
jmp    11d9 <mmxext_rgb16+0xb9>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    -0x28(%rbp),%rcx
mov    -0x2c(%rbp),%r8d
mov    -0x30(%rbp),%r9d
mov    0x10(%rbp),%r11d
mov    0x18(%rbp),%r10d
mov    0x20(%rbp),%eax
xor    %ebx,%ebx
mov    %r11d,(%rsp)
mov    %r10d,0x8(%rsp)
mov    %eax,0x10(%rsp)
movl   $0x0,0x18(%rsp)
call   1030 <yuv420_rgb16@plt>
add    $0x48,%rsp
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<mmxext_rgb16>:
push   %rax
mov    0x20(%rsp),%eax
mov    0x18(%rsp),%r11d
mov    0x10(%rsp),%r10d
cmp    %r9d,%r8d
jge    1142 <mmxext_rgb16+0x22>
push   $0x0
push   %rax
push   %r11
push   %r10
call   1040 <yuv420_rgb16_2@plt>
jmp    114e <mmxext_rgb16+0x2e>
push   $0x0
push   %rax
push   %r11
push   %r10
call   1030 <yuv420_rgb16@plt>
add    $0x20,%rsp
pop    %rax
ret

LLVM IR (-O0):
define void @mmxext_rgb16(i32* %0, i32* %1, i32* %2, i32* %3, i32 %4, i32 %5, i32 %6, i32 %7, i32 %8) {
%10 = alloca i32*
%11 = alloca i32*
%12 = alloca i32*
%13 = alloca i32*
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
store i32* %0, i32** %10
store i32* %1, i32** %11
store i32* %2, i32** %12
store i32* %3, i32** %13
store i32 %4, i32* %14
store i32 %5, i32* %15
store i32 %6, i32* %16
store i32 %7, i32* %17
store i32 %8, i32* %18
%19 = load i32, i32* %14
%20 = load i32, i32* %15
%21 = icmp slt i32 %19, %20
br i1 %21, label %22, label %33
22: ; preds = %9
%23 = load i32*, i32** %10
%24 = load i32*, i32** %11
%25 = load i32*, i32** %12
%26 = load i32*, i32** %13
%27 = load i32, i32* %14
%28 = load i32, i32* %15
%29 = load i32, i32* %16
%30 = load i32, i32* %17
%31 = load i32, i32* %18
%32 = call i32 @yuv420_rgb16_2(i32* %23, i32* %24, i32* %25, i32* %26, i32 %27, i32 %28, i32 %29, i32 %30, i32 %31, i32 0)
br label %44
33: ; preds = %9
%34 = load i32*, i32** %10
%35 = load i32*, i32** %11
%36 = load i32*, i32** %12
%37 = load i32*, i32** %13
%38 = load i32, i32* %14
%39 = load i32, i32* %15
%40 = load i32, i32* %16
%41 = load i32, i32* %17
%42 = load i32, i32* %18
%43 = call i32 @yuv420_rgb16(i32* %34, i32* %35, i32* %36, i32* %37, i32 %38, i32 %39, i32 %40, i32 %41, i32 %42, i32 0)
br label %44
44: ; preds = %33, %22
ret void
}

LLVM IR (-O2):
define void @mmxext_rgb16(i32* %0, i32* %1, i32* %2, i32* %3, i32 %4, i32 %5, i32 %6, i32 %7, i32 %8) {
%10 = icmp slt i32 %4, %5
br i1 %10, label %11, label %13
11: ; preds = %9
%12 = tail call i32 @yuv420_rgb16_2(i32* %0, i32* %1, i32* %2, i32* %3, i32 %4, i32 %5, i32 %6, i32 %7, i32 %8, i32 0)
br label %15
13: ; preds = %9
%14 = tail call i32 @yuv420_rgb16(i32* %0, i32* %1, i32* %2, i32* %3, i32 %4, i32 %5, i32 %6, i32 %7, i32 %8, i32 0)
br label %15
15: ; preds = %13, %11
ret void
}