#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*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ tprints(char *);
void print_pixelformat(uint32_t fourcc) {
  union {
    uint32_t pixelformat;
    unsigned char cc[sizeof(uint32_t)];
  } u = {.pixelformat = fourcc};
  unsigned int i;
  tprints("v4l2_fourcc(");
  for (i = 0; i < sizeof(u.cc); ++i) {
    unsigned int c = u.cc[i];
    if (i)
      tprints(", ");
    if (c == ' ' || (c >= '0' && c <= '9') || (c >= 'A' && c <= 'Z') ||
        (c >= 'a' && c <= 'z')) {
      char sym[] = {'\'', u.cc[i], '\''};
      tprints(sym);
    } else {
      char hex[] = {'\'',
                    '\\',
                    'x',
                    "0123456789abcdef"[c >> 4],
                    "0123456789abcdef"[c & 0xf],
                    '\'',
                    '\0'};
      tprints(hex);
    }
  }
  tprints(")");
}


x86 assembly (clang, -O0):
<print_pixelformat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
lea    0xed8(%rip),%rdi
call   1030 <tprints@plt>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    $0x4,%rax
jae    1226 <print_pixelformat+0x116>
mov    -0xc(%rbp),%eax
movzbl -0x8(%rbp,%rax,1),%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1162 <print_pixelformat+0x52>
lea    0xeb0(%rip),%rdi
call   1030 <tprints@plt>
cmpl   $0x20,-0x10(%rbp)
je     11a8 <print_pixelformat+0x98>
cmpl   $0x30,-0x10(%rbp)
jb     1180 <print_pixelformat+0x70>
cmpl   $0x39,-0x10(%rbp)
jbe    11a8 <print_pixelformat+0x98>
cmpl   $0x41,-0x10(%rbp)
jb     1194 <print_pixelformat+0x84>
cmpl   $0x5a,-0x10(%rbp)
jbe    11a8 <print_pixelformat+0x98>
cmpl   $0x61,-0x10(%rbp)
jb     11c8 <print_pixelformat+0xb8>
cmpl   $0x7a,-0x10(%rbp)
ja     11c8 <print_pixelformat+0xb8>
movb   $0x27,-0x13(%rbp)
mov    -0xc(%rbp),%eax
mov    -0x8(%rbp,%rax,1),%al
mov    %al,-0x12(%rbp)
movb   $0x27,-0x11(%rbp)
lea    -0x13(%rbp),%rdi
call   1030 <tprints@plt>
jmp    1213 <print_pixelformat+0x103>
movb   $0x27,-0x1a(%rbp)
movb   $0x5c,-0x19(%rbp)
movb   $0x78,-0x18(%rbp)
mov    -0x10(%rbp),%eax
shr    $0x4,%eax
mov    %eax,%eax
mov    %eax,%ecx
lea    0xe2b(%rip),%rax
mov    (%rax,%rcx,1),%al
mov    %al,-0x17(%rbp)
mov    -0x10(%rbp),%eax
and    $0xf,%eax
mov    %eax,%eax
mov    %eax,%ecx
lea    0xe14(%rip),%rax
mov    (%rax,%rcx,1),%al
mov    %al,-0x16(%rbp)
movb   $0x27,-0x15(%rbp)
movb   $0x0,-0x14(%rbp)
lea    -0x1a(%rbp),%rdi
call   1030 <tprints@plt>
jmp    1218 <print_pixelformat+0x108>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1134 <print_pixelformat+0x24>
lea    0xdf4(%rip),%rdi
call   1030 <tprints@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_pixelformat>:
push   %rbx
sub    $0x20,%rsp
mov    %edi,%ebx
mov    %edi,0x18(%rsp)
lea    0xede(%rip),%rdi
call   1030 <tprints@plt>
mov    %ebx,%eax
and    $0xdf,%al
add    $0xbf,%al
cmp    $0x1a,%al
jb     1177 <print_pixelformat+0x67>
cmp    $0x20,%bl
je     1177 <print_pixelformat+0x67>
lea    -0x30(%rbx),%eax
cmp    $0xa,%al
jb     1177 <print_pixelformat+0x67>
movw   $0x5c27,0x11(%rsp)
movb   $0x78,0x13(%rsp)
mov    %ebx,%eax
shr    $0x4,%eax
and    $0xf,%eax
lea    0xeb8(%rip),%rcx
mov    (%rax,%rcx,1),%al
mov    %al,0x14(%rsp)
and    $0xf,%ebx
mov    (%rbx,%rcx,1),%al
mov    %al,0x15(%rsp)
movw   $0x27,0x16(%rsp)
lea    0x11(%rsp),%rdi
jmp    118a <print_pixelformat+0x7a>
movb   $0x27,0xe(%rsp)
mov    %bl,0xf(%rsp)
movb   $0x27,0x10(%rsp)
lea    0xe(%rsp),%rdi
call   1030 <tprints@plt>
mov    0x19(%rsp),%bl
lea    0xe73(%rip),%rdi
call   1030 <tprints@plt>
lea    -0x41(%rbx),%eax
cmp    $0x1a,%al
jb     11f5 <print_pixelformat+0xe5>
cmp    $0x20,%bl
je     11f5 <print_pixelformat+0xe5>
lea    -0x30(%rbx),%eax
cmp    $0xa,%al
jb     11f5 <print_pixelformat+0xe5>
lea    -0x61(%rbx),%eax
cmp    $0x19,%al
jbe    11f5 <print_pixelformat+0xe5>
movzbl %bl,%eax
movw   $0x5c27,0x11(%rsp)
movb   $0x78,0x13(%rsp)
mov    %rax,%rcx
shr    $0x4,%rcx
lea    0xe3a(%rip),%rdx
mov    (%rcx,%rdx,1),%cl
mov    %cl,0x14(%rsp)
and    $0xf,%eax
mov    (%rax,%rdx,1),%al
mov    %al,0x15(%rsp)
movw   $0x27,0x16(%rsp)
lea    0x11(%rsp),%rdi
jmp    1208 <print_pixelformat+0xf8>
movb   $0x27,0xe(%rsp)
mov    %bl,0xf(%rsp)
movb   $0x27,0x10(%rsp)
lea    0xe(%rsp),%rdi
call   1030 <tprints@plt>
mov    0x1a(%rsp),%bl
lea    0xdf5(%rip),%rdi
call   1030 <tprints@plt>
lea    -0x41(%rbx),%eax
cmp    $0x1a,%al
jb     1273 <print_pixelformat+0x163>
cmp    $0x20,%bl
je     1273 <print_pixelformat+0x163>
lea    -0x30(%rbx),%eax
cmp    $0xa,%al
jb     1273 <print_pixelformat+0x163>
lea    -0x61(%rbx),%eax
cmp    $0x1a,%al
jb     1273 <print_pixelformat+0x163>
movzbl %bl,%eax
movw   $0x5c27,0x11(%rsp)
movb   $0x78,0x13(%rsp)
mov    %rax,%rcx
shr    $0x4,%rcx
lea    0xdbc(%rip),%rdx
mov    (%rcx,%rdx,1),%cl
mov    %cl,0x14(%rsp)
and    $0xf,%eax
mov    (%rax,%rdx,1),%al
mov    %al,0x15(%rsp)
movw   $0x27,0x16(%rsp)
lea    0x11(%rsp),%rdi
jmp    1286 <print_pixelformat+0x176>
movb   $0x27,0xe(%rsp)
mov    %bl,0xf(%rsp)
movb   $0x27,0x10(%rsp)
lea    0xe(%rsp),%rdi
call   1030 <tprints@plt>
mov    0x1b(%rsp),%bl
lea    0xd77(%rip),%rdi
call   1030 <tprints@plt>
lea    -0x41(%rbx),%eax
cmp    $0x1a,%al
jb     12f1 <print_pixelformat+0x1e1>
cmp    $0x20,%bl
je     12f1 <print_pixelformat+0x1e1>
lea    -0x30(%rbx),%eax
cmp    $0xa,%al
jb     12f1 <print_pixelformat+0x1e1>
lea    -0x61(%rbx),%eax
cmp    $0x1a,%al
jb     12f1 <print_pixelformat+0x1e1>
movzbl %bl,%eax
movw   $0x5c27,0x11(%rsp)
movb   $0x78,0x13(%rsp)
mov    %rax,%rcx
shr    $0x4,%rcx
lea    0xd3e(%rip),%rdx
mov    (%rcx,%rdx,1),%cl
mov    %cl,0x14(%rsp)
and    $0xf,%eax
mov    (%rax,%rdx,1),%al
mov    %al,0x15(%rsp)
movw   $0x27,0x16(%rsp)
lea    0x11(%rsp),%rdi
jmp    1304 <print_pixelformat+0x1f4>
movb   $0x27,0xe(%rsp)
mov    %bl,0xf(%rsp)
movb   $0x27,0x10(%rsp)
lea    0xe(%rsp),%rdi
call   1030 <tprints@plt>
lea    0xd11(%rip),%rdi
call   1030 <tprints@plt>
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%union.anon = type { i32 }
@.str = [13 x i8] c"v4l2_fourcc(\00"
@.str.1 = [3 x i8] c", \00"
@.str.2 = [17 x i8] c"0123456789abcdef\00"
@.str.3 = [2 x i8] c")\00"
define void @print_pixelformat(i32 %0) {
%2 = alloca i32
%3 = alloca %union.anon
%4 = alloca i32
%5 = alloca i32
%6 = alloca [3 x i8]
%7 = alloca [7 x i8]
store i32 %0, i32* %2
%8 = bitcast %union.anon* %3 to i32*
%9 = load i32, i32* %2
store i32 %9, i32* %8
%10 = call i32 @tprints(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %4
br label %11
11: ; preds = %79, %1
%12 = load i32, i32* %4
%13 = zext i32 %12 to i64
%14 = icmp ult i64 %13, 4
br i1 %14, label %15, label %82
15: ; preds = %11
%16 = bitcast %union.anon* %3 to [4 x i8]*
%17 = load i32, i32* %4
%18 = zext i32 %17 to i64
%19 = getelementptr inbounds [4 x i8], [4 x i8]* %16, i64 0, i64 %18
%20 = load i8, i8* %19
%21 = zext i8 %20 to i32
store i32 %21, i32* %5
%22 = load i32, i32* %4
%23 = icmp ne i32 %22, 0
br i1 %23, label %24, label %26
24: ; preds = %15
%25 = call i32 @tprints(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
br label %26
26: ; preds = %24, %15
%27 = load i32, i32* %5
%28 = icmp eq i32 %27, 32
br i1 %28, label %47, label %29
29: ; preds = %26
%30 = load i32, i32* %5
%31 = icmp uge i32 %30, 48
br i1 %31, label %32, label %35
32: ; preds = %29
%33 = load i32, i32* %5
%34 = icmp ule i32 %33, 57
br i1 %34, label %47, label %35
35: ; preds = %32, %29
%36 = load i32, i32* %5
%37 = icmp uge i32 %36, 65
br i1 %37, label %38, label %41
38: ; preds = %35
%39 = load i32, i32* %5
%40 = icmp ule i32 %39, 90
br i1 %40, label %47, label %41
41: ; preds = %38, %35
%42 = load i32, i32* %5
%43 = icmp uge i32 %42, 97
br i1 %43, label %44, label %58
44: ; preds = %41
%45 = load i32, i32* %5
%46 = icmp ule i32 %45, 122
br i1 %46, label %47, label %58
47: ; preds = %44, %38, %32, %26
%48 = getelementptr inbounds [3 x i8], [3 x i8]* %6, i64 0, i64 0
store i8 39, i8* %48
%49 = getelementptr inbounds i8, i8* %48, i64 1
%50 = bitcast %union.anon* %3 to [4 x i8]*
%51 = load i32, i32* %4
%52 = zext i32 %51 to i64
%53 = getelementptr inbounds [4 x i8], [4 x i8]* %50, i64 0, i64 %52
%54 = load i8, i8* %53
store i8 %54, i8* %49
%55 = getelementptr inbounds i8, i8* %49, i64 1
store i8 39, i8* %55
%56 = getelementptr inbounds [3 x i8], [3 x i8]* %6, i64 0, i64 0
%57 = call i32 @tprints(i8* %56)
br label %78
58: ; preds = %44, %41
%59 = getelementptr inbounds [7 x i8], [7 x i8]* %7, i64 0, i64 0
store i8 39, i8* %59
%60 = getelementptr inbounds i8, i8* %59, i64 1
store i8 92, i8* %60
%61 = getelementptr inbounds i8, i8* %60, i64 1
store i8 120, i8* %61
%62 = getelementptr inbounds i8, i8* %61, i64 1
%63 = load i32, i32* %5
%64 = lshr i32 %63, 4
%65 = zext i32 %64 to i64
%66 = getelementptr inbounds [17 x i8], [17 x i8]* @.str.2, i64 0, i64 %65
%67 = load i8, i8* %66
store i8 %67, i8* %62
%68 = getelementptr inbounds i8, i8* %62, i64 1
%69 = load i32, i32* %5
%70 = and i32 %69, 15
%71 = zext i32 %70 to i64
%72 = getelementptr inbounds [17 x i8], [17 x i8]* @.str.2, i64 0, i64 %71
%73 = load i8, i8* %72
store i8 %73, i8* %68
%74 = getelementptr inbounds i8, i8* %68, i64 1
store i8 39, i8* %74
%75 = getelementptr inbounds i8, i8* %74, i64 1
store i8 0, i8* %75
%76 = getelementptr inbounds [7 x i8], [7 x i8]* %7, i64 0, i64 0
%77 = call i32 @tprints(i8* %76)
br label %78
78: ; preds = %58, %47
br label %79
79: ; preds = %78
%80 = load i32, i32* %4
%81 = add i32 %80, 1
store i32 %81, i32* %4
br label %11
82: ; preds = %11
%83 = call i32 @tprints(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
%union.anon = type { i32 }
@.str = [13 x i8] c"v4l2_fourcc(\00"
@.str.1 = [3 x i8] c", \00"
@.str.2 = [17 x i8] c"0123456789abcdef\00"
@.str.3 = [2 x i8] c")\00"
define void @print_pixelformat(i32 %0) {
%2 = alloca %union.anon
%3 = alloca [3 x i8]
%4 = alloca [7 x i8]
%5 = bitcast %union.anon* %2 to i8*
%6 = getelementptr inbounds %union.anon, %union.anon* %2, i64 0, i32 0
store i32 %0, i32* %6
%7 = tail call i32 @tprints(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%8 = bitcast %union.anon* %2 to [4 x i8]*
%9 = getelementptr inbounds [7 x i8], [7 x i8]* %4, i64 0, i64 0
%10 = getelementptr inbounds [7 x i8], [7 x i8]* %4, i64 0, i64 1
%11 = getelementptr inbounds [7 x i8], [7 x i8]* %4, i64 0, i64 2
%12 = getelementptr inbounds [7 x i8], [7 x i8]* %4, i64 0, i64 3
%13 = getelementptr inbounds [7 x i8], [7 x i8]* %4, i64 0, i64 4
%14 = getelementptr inbounds [7 x i8], [7 x i8]* %4, i64 0, i64 5
%15 = getelementptr inbounds [7 x i8], [7 x i8]* %4, i64 0, i64 6
%16 = getelementptr inbounds [3 x i8], [3 x i8]* %3, i64 0, i64 0
%17 = getelementptr inbounds [3 x i8], [3 x i8]* %3, i64 0, i64 1
%18 = getelementptr inbounds [3 x i8], [3 x i8]* %3, i64 0, i64 2
%19 = trunc i32 %0 to i8
%20 = icmp eq i8 %19, 32
%21 = add i8 %19, -48
%22 = icmp ult i8 %21, 10
%23 = or i1 %20, %22
%24 = and i8 %19, -33
%25 = add i8 %24, -65
%26 = icmp ult i8 %25, 26
%27 = or i1 %26, %23
br i1 %27, label %39, label %28
28: ; preds = %1
store i8 39, i8* %9
store i8 92, i8* %10
store i8 120, i8* %11
%29 = lshr i32 %0, 4
%30 = and i32 %29, 15
%31 = zext i32 %30 to i64
%32 = getelementptr inbounds [17 x i8], [17 x i8]* @.str.2, i64 0, i64 %31
%33 = load i8, i8* %32
store i8 %33, i8* %12
%34 = and i32 %0, 15
%35 = zext i32 %34 to i64
%36 = getelementptr inbounds [17 x i8], [17 x i8]* @.str.2, i64 0, i64 %35
%37 = load i8, i8* %36
store i8 %37, i8* %13
store i8 39, i8* %14
store i8 0, i8* %15
%38 = call i32 @tprints(i8* %9)
br label %41
39: ; preds = %1
store i8 39, i8* %16
store i8 %19, i8* %17
store i8 39, i8* %18
%40 = call i32 @tprints(i8* %16)
br label %41
41: ; preds = %39, %28
%42 = getelementptr inbounds [4 x i8], [4 x i8]* %8, i64 0, i64 1
%43 = load i8, i8* %42
%44 = zext i8 %43 to i32
%45 = call i32 @tprints(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%46 = icmp eq i8 %43, 32
%47 = add i8 %43, -48
%48 = icmp ult i8 %47, 10
%49 = or i1 %46, %48
%50 = add i8 %43, -65
%51 = icmp ult i8 %50, 26
%52 = or i1 %51, %49
%53 = add i8 %43, -97
%54 = icmp ult i8 %53, 26
%55 = select i1 %52, i1 true, i1 %54
br i1 %55, label %56, label %58
56: ; preds = %41
store i8 39, i8* %16
store i8 %43, i8* %17
store i8 39, i8* %18
%57 = call i32 @tprints(i8* %16)
br label %68
58: ; preds = %41
store i8 39, i8* %9
store i8 92, i8* %10
store i8 120, i8* %11
%59 = lshr i32 %44, 4
%60 = zext i32 %59 to i64
%61 = getelementptr inbounds [17 x i8], [17 x i8]* @.str.2, i64 0, i64 %60
%62 = load i8, i8* %61
store i8 %62, i8* %12
%63 = and i32 %44, 15
%64 = zext i32 %63 to i64
%65 = getelementptr inbounds [17 x i8], [17 x i8]* @.str.2, i64 0, i64 %64
%66 = load i8, i8* %65
store i8 %66, i8* %13
store i8 39, i8* %14
store i8 0, i8* %15
%67 = call i32 @tprints(i8* %9)
br label %68
68: ; preds = %58, %56
%69 = getelementptr inbounds [4 x i8], [4 x i8]* %8, i64 0, i64 2
%70 = load i8, i8* %69
%71 = zext i8 %70 to i32
%72 = call i32 @tprints(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%73 = icmp eq i8 %70, 32
%74 = add i8 %70, -48
%75 = icmp ult i8 %74, 10
%76 = or i1 %73, %75
%77 = add i8 %70, -65
%78 = icmp ult i8 %77, 26
%79 = or i1 %78, %76
%80 = add i8 %70, -97
%81 = icmp ult i8 %80, 26
%82 = select i1 %79, i1 true, i1 %81
br i1 %82, label %93, label %83
83: ; preds = %68
store i8 39, i8* %9
store i8 92, i8* %10
store i8 120, i8* %11
%84 = lshr i32 %71, 4
%85 = zext i32 %84 to i64
%86 = getelementptr inbounds [17 x i8], [17 x i8]* @.str.2, i64 0, i64 %85
%87 = load i8, i8* %86
store i8 %87, i8* %12
%88 = and i32 %71, 15
%89 = zext i32 %88 to i64
%90 = getelementptr inbounds [17 x i8], [17 x i8]* @.str.2, i64 0, i64 %89
%91 = load i8, i8* %90
store i8 %91, i8* %13
store i8 39, i8* %14
store i8 0, i8* %15
%92 = call i32 @tprints(i8* %9)
br label %95
93: ; preds = %68
store i8 39, i8* %16
store i8 %70, i8* %17
store i8 39, i8* %18
%94 = call i32 @tprints(i8* %16)
br label %95
95: ; preds = %93, %83
%96 = getelementptr inbounds [4 x i8], [4 x i8]* %8, i64 0, i64 3
%97 = load i8, i8* %96
%98 = zext i8 %97 to i32
%99 = call i32 @tprints(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%100 = icmp eq i8 %97, 32
%101 = add i8 %97, -48
%102 = icmp ult i8 %101, 10
%103 = or i1 %100, %102
%104 = add i8 %97, -65
%105 = icmp ult i8 %104, 26
%106 = or i1 %105, %103
%107 = add i8 %97, -97
%108 = icmp ult i8 %107, 26
%109 = select i1 %106, i1 true, i1 %108
br i1 %109, label %120, label %110
110: ; preds = %95
store i8 39, i8* %9
store i8 92, i8* %10
store i8 120, i8* %11
%111 = lshr i32 %98, 4
%112 = zext i32 %111 to i64
%113 = getelementptr inbounds [17 x i8], [17 x i8]* @.str.2, i64 0, i64 %112
%114 = load i8, i8* %113
store i8 %114, i8* %12
%115 = and i32 %98, 15
%116 = zext i32 %115 to i64
%117 = getelementptr inbounds [17 x i8], [17 x i8]* @.str.2, i64 0, i64 %116
%118 = load i8, i8* %117
store i8 %118, i8* %13
store i8 39, i8* %14
store i8 0, i8* %15
%119 = call i32 @tprints(i8* %9)
br label %122
120: ; preds = %95
store i8 39, i8* %16
store i8 %97, i8* %17
store i8 39, i8* %18
%121 = call i32 @tprints(i8* %16)
br label %122
122: ; preds = %120, %110
%123 = call i32 @tprints(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
ret void
}