#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*/ ac_imgconvert_init_rgb_packed(int);
int /*<<< orphan*/ ac_imgconvert_init_yuv_mixed(int);
int /*<<< orphan*/ ac_imgconvert_init_yuv_packed(int);
int /*<<< orphan*/ ac_imgconvert_init_yuv_planar(int);
int /*<<< orphan*/ ac_imgconvert_init_yuv_rgb(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
int ac_imgconvert_init(int accel) {
  if (!ac_imgconvert_init_yuv_planar(accel) ||
      !ac_imgconvert_init_yuv_packed(accel) ||
      !ac_imgconvert_init_yuv_mixed(accel) ||
      !ac_imgconvert_init_yuv_rgb(accel) ||
      !ac_imgconvert_init_rgb_packed(accel)) {
    fprintf(stderr, "ac_imgconvert_init() failed");
    return 0;
  }
  return 1;
}


x86 assembly (clang, -O0):
<ac_imgconvert_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1050 <ac_imgconvert_init_yuv_planar@plt>
cmp    $0x0,%eax
je     11c0 <ac_imgconvert_init+0x60>
mov    -0x8(%rbp),%edi
call   1080 <ac_imgconvert_init_yuv_packed@plt>
cmp    $0x0,%eax
je     11c0 <ac_imgconvert_init+0x60>
mov    -0x8(%rbp),%edi
call   1070 <ac_imgconvert_init_yuv_mixed@plt>
cmp    $0x0,%eax
je     11c0 <ac_imgconvert_init+0x60>
mov    -0x8(%rbp),%edi
call   1040 <ac_imgconvert_init_yuv_rgb@plt>
cmp    $0x0,%eax
je     11c0 <ac_imgconvert_init+0x60>
mov    -0x8(%rbp),%edi
call   1030 <ac_imgconvert_init_rgb_packed@plt>
cmp    $0x0,%eax
jne    11e1 <ac_imgconvert_init+0x81>
mov    0x2e19(%rip),%rax
mov    (%rax),%edi
lea    0xe30(%rip),%rsi
call   1060 <fprintf@plt>
movl   $0x0,-0x4(%rbp)
jmp    11e8 <ac_imgconvert_init+0x88>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ac_imgconvert_init>:
push   %rbx
mov    %edi,%ebx
call   1050 <ac_imgconvert_init_yuv_planar@plt>
test   %eax,%eax
je     11a1 <ac_imgconvert_init+0x41>
mov    %ebx,%edi
call   1080 <ac_imgconvert_init_yuv_packed@plt>
test   %eax,%eax
je     11a1 <ac_imgconvert_init+0x41>
mov    %ebx,%edi
call   1070 <ac_imgconvert_init_yuv_mixed@plt>
test   %eax,%eax
je     11a1 <ac_imgconvert_init+0x41>
mov    %ebx,%edi
call   1040 <ac_imgconvert_init_yuv_rgb@plt>
test   %eax,%eax
je     11a1 <ac_imgconvert_init+0x41>
mov    %ebx,%edi
call   1030 <ac_imgconvert_init_rgb_packed@plt>
mov    %eax,%ecx
mov    $0x1,%eax
test   %ecx,%ecx
je     11a1 <ac_imgconvert_init+0x41>
pop    %rbx
ret
mov    0x2e38(%rip),%rax
mov    (%rax),%edi
lea    0xe4f(%rip),%rsi
call   1060 <fprintf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [28 x i8] c"ac_imgconvert_init() failed\00"
define i32 @ac_imgconvert_init(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = call i32 @ac_imgconvert_init_yuv_planar(i32 %4)
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %23
7: ; preds = %1
%8 = load i32, i32* %3
%9 = call i32 @ac_imgconvert_init_yuv_packed(i32 %8)
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %23
11: ; preds = %7
%12 = load i32, i32* %3
%13 = call i32 @ac_imgconvert_init_yuv_mixed(i32 %12)
%14 = icmp ne i32 %13, 0
br i1 %14, label %15, label %23
15: ; preds = %11
%16 = load i32, i32* %3
%17 = call i32 @ac_imgconvert_init_yuv_rgb(i32 %16)
%18 = icmp ne i32 %17, 0
br i1 %18, label %19, label %23
19: ; preds = %15
%20 = load i32, i32* %3
%21 = call i32 @ac_imgconvert_init_rgb_packed(i32 %20)
%22 = icmp ne i32 %21, 0
br i1 %22, label %26, label %23
23: ; preds = %19, %15, %11, %7, %1
%24 = load i32, i32* @stderr
%25 = call i32 @fprintf(i32 %24, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %2
br label %27
26: ; preds = %19
store i32 1, i32* %2
br label %27
27: ; preds = %26, %23
%28 = load i32, i32* %2
ret i32 %28
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [28 x i8] c"ac_imgconvert_init() failed\00"
define i32 @ac_imgconvert_init(i32 %0) {
%2 = tail call i32 @ac_imgconvert_init_yuv_planar(i32 %0)
%3 = icmp eq i32 %2, 0
br i1 %3, label %16, label %4
4: ; preds = %1
%5 = tail call i32 @ac_imgconvert_init_yuv_packed(i32 %0)
%6 = icmp eq i32 %5, 0
br i1 %6, label %16, label %7
7: ; preds = %4
%8 = tail call i32 @ac_imgconvert_init_yuv_mixed(i32 %0)
%9 = icmp eq i32 %8, 0
br i1 %9, label %16, label %10
10: ; preds = %7
%11 = tail call i32 @ac_imgconvert_init_yuv_rgb(i32 %0)
%12 = icmp eq i32 %11, 0
br i1 %12, label %16, label %13
13: ; preds = %10
%14 = tail call i32 @ac_imgconvert_init_rgb_packed(i32 %0)
%15 = icmp eq i32 %14, 0
br i1 %15, label %16, label %19
16: ; preds = %13, %10, %7, %4, %1
%17 = load i32, i32* @stderr
%18 = tail call i32 @fprintf(i32 %17, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
br label %19
19: ; preds = %13, %16
%20 = phi i32 [ 0, %16 ], [ 1, %13 ]
ret i32 %20
}