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

/* Variables and functions */
int hb_mixdown_to_mode(uint32_t mixdown) {
  switch (mixdown) {
  case 0x01000001:
    return 0;
  case 0x02002022:
    return 1;
  case 0x042070A2:
    return 8;
  case 0x084094A2:
    return 9;
  case 0x10089176:
    return 6 | 0x10;
  default:
    return 1;
  }
}


x86 assembly (clang, -O0):
<hb_mixdown_to_mode>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
sub    $0x1000001,%eax
je     1169 <hb_mixdown_to_mode+0x69>
jmp    111d <hb_mixdown_to_mode+0x1d>
mov    -0xc(%rbp),%eax
sub    $0x2002022,%eax
je     1175 <hb_mixdown_to_mode+0x75>
jmp    1130 <hb_mixdown_to_mode+0x30>
mov    -0xc(%rbp),%eax
sub    $0x42070a2,%eax
je     1181 <hb_mixdown_to_mode+0x81>
jmp    1143 <hb_mixdown_to_mode+0x43>
mov    -0xc(%rbp),%eax
sub    $0x84094a2,%eax
je     118d <hb_mixdown_to_mode+0x8d>
jmp    1156 <hb_mixdown_to_mode+0x56>
mov    -0xc(%rbp),%eax
sub    $0x10089176,%eax
je     1199 <hb_mixdown_to_mode+0x99>
jmp    11a5 <hb_mixdown_to_mode+0xa5>
movl   $0x0,-0x4(%rbp)
jmp    11ac <hb_mixdown_to_mode+0xac>
movl   $0x1,-0x4(%rbp)
jmp    11ac <hb_mixdown_to_mode+0xac>
movl   $0x8,-0x4(%rbp)
jmp    11ac <hb_mixdown_to_mode+0xac>
movl   $0x9,-0x4(%rbp)
jmp    11ac <hb_mixdown_to_mode+0xac>
movl   $0x16,-0x4(%rbp)
jmp    11ac <hb_mixdown_to_mode+0xac>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hb_mixdown_to_mode>:
cmp    $0x42070a1,%edi
jle    1126 <hb_mixdown_to_mode+0x26>
cmp    $0x42070a2,%edi
je     113c <hb_mixdown_to_mode+0x3c>
cmp    $0x84094a2,%edi
je     1142 <hb_mixdown_to_mode+0x42>
cmp    $0x10089176,%edi
jne    1136 <hb_mixdown_to_mode+0x36>
mov    $0x16,%eax
ret
xor    %eax,%eax
cmp    $0x1000001,%edi
je     1147 <hb_mixdown_to_mode+0x47>
cmp    $0x2002022,%edi
mov    $0x1,%eax
ret
mov    $0x8,%eax
ret
mov    $0x9,%eax
ret

LLVM IR (-O0):
define i32 @hb_mixdown_to_mode(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %10 [
i32 16777217, label %5
i32 33562658, label %6
i32 69234850, label %7
i32 138450082, label %8
i32 268996982, label %9
]
5: ; preds = %1
store i32 0, i32* %2
br label %11
6: ; preds = %1
store i32 1, i32* %2
br label %11
7: ; preds = %1
store i32 8, i32* %2
br label %11
8: ; preds = %1
store i32 9, i32* %2
br label %11
9: ; preds = %1
store i32 22, i32* %2
br label %11
10: ; preds = %1
store i32 1, i32* %2
br label %11
11: ; preds = %10, %9, %8, %7, %6, %5
%12 = load i32, i32* %2
ret i32 %12
}

LLVM IR (-O2):
define i32 @hb_mixdown_to_mode(i32 %0) {
switch i32 %0, label %6 [
i32 16777217, label %7
i32 33562658, label %2
i32 69234850, label %3
i32 138450082, label %4
i32 268996982, label %5
]
2: ; preds = %1
br label %7
3: ; preds = %1
br label %7
4: ; preds = %1
br label %7
5: ; preds = %1
br label %7
6: ; preds = %1
br label %7
7: ; preds = %1, %6, %5, %4, %3, %2
%8 = phi i32 [ 1, %6 ], [ 22, %5 ], [ 9, %4 ], [ 8, %3 ], [ 1, %2 ], [ 0, %1 ]
ret i32 %8
}