#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*/ YCbCrToRGB_888(unsigned char *, int, unsigned char *,
                                  unsigned char *, int, unsigned char *, int,
                                  int, int);
int YCbCrToRGB(unsigned char *Y, int xsize, unsigned char *Cb,
               unsigned char *Cr, int cxsize, unsigned char *rgbPixelPtr,
               int width, int height, int rgbOrientation, int colorFormat) {
  switch (colorFormat) {
  case 1:
    YCbCrToRGB_888(Y, xsize, Cb, Cr, cxsize, rgbPixelPtr, width, height,
                   rgbOrientation);
    return 0;
  default:
    return 1;
  }
}


x86 assembly (clang, -O0):
<YCbCrToRGB>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    0x28(%rbp),%eax
mov    0x20(%rbp),%eax
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%eax
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    %r8d,-0x2c(%rbp)
mov    %r9,-0x38(%rbp)
mov    0x28(%rbp),%eax
sub    $0x1,%eax
jne    118c <YCbCrToRGB+0x7c>
jmp    114c <YCbCrToRGB+0x3c>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x20(%rbp),%rdx
mov    -0x28(%rbp),%rcx
mov    -0x2c(%rbp),%r8d
mov    -0x38(%rbp),%r9
mov    0x10(%rbp),%r11d
mov    0x18(%rbp),%r10d
mov    0x20(%rbp),%eax
mov    %r11d,(%rsp)
mov    %r10d,0x8(%rsp)
mov    %eax,0x10(%rsp)
call   1030 <YCbCrToRGB_888@plt>
movl   $0x0,-0x4(%rbp)
jmp    1193 <YCbCrToRGB+0x83>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<YCbCrToRGB>:
push   %rax
mov    $0x1,%eax
cmpl   $0x1,0x28(%rsp)
jne    113f <YCbCrToRGB+0x2f>
mov    0x20(%rsp),%eax
mov    0x18(%rsp),%r10d
mov    0x10(%rsp),%r11d
sub    $0x8,%rsp
push   %rax
push   %r10
push   %r11
call   1030 <YCbCrToRGB_888@plt>
add    $0x20,%rsp
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @YCbCrToRGB(i8* %0, i32 %1, i8* %2, i8* %3, i32 %4, i8* %5, i32 %6, i32 %7, i32 %8, i32 %9) {
%11 = alloca i32
%12 = alloca i8*
%13 = alloca i32
%14 = alloca i8*
%15 = alloca i8*
%16 = alloca i32
%17 = alloca i8*
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32
%21 = alloca i32
store i8* %0, i8** %12
store i32 %1, i32* %13
store i8* %2, i8** %14
store i8* %3, i8** %15
store i32 %4, i32* %16
store i8* %5, i8** %17
store i32 %6, i32* %18
store i32 %7, i32* %19
store i32 %8, i32* %20
store i32 %9, i32* %21
%22 = load i32, i32* %21
switch i32 %22, label %34 [
i32 1, label %23
]
23: ; preds = %10
%24 = load i8*, i8** %12
%25 = load i32, i32* %13
%26 = load i8*, i8** %14
%27 = load i8*, i8** %15
%28 = load i32, i32* %16
%29 = load i8*, i8** %17
%30 = load i32, i32* %18
%31 = load i32, i32* %19
%32 = load i32, i32* %20
%33 = call i32 @YCbCrToRGB_888(i8* %24, i32 %25, i8* %26, i8* %27, i32 %28, i8* %29, i32 %30, i32 %31, i32 %32)
store i32 0, i32* %11
br label %35
34: ; preds = %10
store i32 1, i32* %11
br label %35
35: ; preds = %34, %23
%36 = load i32, i32* %11
ret i32 %36
}

LLVM IR (-O2):
define i32 @YCbCrToRGB(i8* %0, i32 %1, i8* %2, i8* %3, i32 %4, i8* %5, i32 %6, i32 %7, i32 %8, i32 %9) {
%11 = icmp eq i32 %9, 1
br i1 %11, label %12, label %14
12: ; preds = %10
%13 = tail call i32 @YCbCrToRGB_888(i8* %0, i32 %1, i8* %2, i8* %3, i32 %4, i8* %5, i32 %6, i32 %7, i32 %8)
br label %14
14: ; preds = %10, %12
%15 = phi i32 [ 0, %12 ], [ 1, %10 ]
ret i32 %15
}