#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 char uint32_t;
typedef int /*<<< orphan*/ cContainerTypes;

/* Variables and functions */
int is_type_container(uint32_t type) {
  const uint32_t cContainerTypes[] = {'moov', 'trak', 'edts', 'mdia', 'minf',
                                      'dinf', 'stbl', 'mvex', 'moof', 'traf',
                                      'mfra', 'udta', 'meta', 'ipro', 'sinf'};
  const int cContainerTypesCount = sizeof(cContainerTypes) / sizeof(uint32_t);
  for (int i = 0; i < cContainerTypesCount; i++) {
    if (cContainerTypes[i] == type) {
      return 1;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<is_type_container>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
mov    0xeef(%rip),%rax
mov    %rax,-0x14(%rbp)
mov    0xeed(%rip),%eax
mov    %eax,-0xc(%rbp)
mov    0xee7(%rip),%ax
mov    %ax,-0x8(%rbp)
mov    0xedf(%rip),%al
mov    %al,-0x6(%rbp)
movl   $0xf,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
cmpl   $0xf,-0x1c(%rbp)
jge    117e <is_type_container+0x7e>
movslq -0x1c(%rbp),%rax
movsbl -0x14(%rbp,%rax,1),%eax
movsbl -0x5(%rbp),%ecx
cmp    %ecx,%eax
jne    116b <is_type_container+0x6b>
movl   $0x1,-0x4(%rbp)
jmp    1185 <is_type_container+0x85>
jmp    1170 <is_type_container+0x70>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1140 <is_type_container+0x40>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_type_container>:
add    $0x9f,%dil
cmp    $0x17,%dil
ja     111f <is_type_container+0x1f>
mov    $0x1,%eax
movzbl %dil,%ecx
mov    $0xa44c21,%edx
bt     %rcx,%rdx
jae    111f <is_type_container+0x1f>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
@__const.is_type_container.cContainerTypes = [15 x i8] c"vksafflxffaaaof"
define i32 @is_type_container(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
%4 = alloca [15 x i8]
%5 = alloca i32
%6 = alloca i32
store i8 %0, i8* %3
%7 = bitcast [15 x i8]* %4 to i8*
store i32 15, i32* %5
store i32 0, i32* %6
br label %8
8: ; preds = %22, %1
%9 = load i32, i32* %6
%10 = icmp slt i32 %9, 15
br i1 %10, label %11, label %25
11: ; preds = %8
%12 = load i32, i32* %6
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds [15 x i8], [15 x i8]* %4, i64 0, i64 %13
%15 = load i8, i8* %14
%16 = sext i8 %15 to i32
%17 = load i8, i8* %3
%18 = sext i8 %17 to i32
%19 = icmp eq i32 %16, %18
br i1 %19, label %20, label %21
20: ; preds = %11
store i32 1, i32* %2
br label %26
21: ; preds = %11
br label %22
22: ; preds = %21
%23 = load i32, i32* %6
%24 = add nsw i32 %23, 1
store i32 %24, i32* %6
br label %8
25: ; preds = %8
store i32 0, i32* %2
br label %26
26: ; preds = %25, %20
%27 = load i32, i32* %2
ret i32 %27
}

LLVM IR (-O2):
define i32 @is_type_container(i8 signext %0) {
switch i8 %0, label %2 [
i8 118, label %3
i8 107, label %3
i8 115, label %3
i8 97, label %3
i8 102, label %3
i8 108, label %3
i8 120, label %3
i8 111, label %3
]
2: ; preds = %1
br label %3
3: ; preds = %1, %1, %1, %1, %1, %1, %1, %1, %2
%4 = phi i32 [ 1, %1 ], [ 0, %2 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %4
}