#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*/ mp_msg_c(int, char *, int);
int af_format_decode(int ifmt) {
  int ofmt = ~0;
  switch (ifmt) {
  case (0x00000008):
    ofmt = (1 << 0) | (1 << 1);
    break;
  case (0x00000040):
    ofmt = (1 << 0) | (0 << 1);
    break;
  case (0x00000010):
    ofmt = (1 << 0) | (0 << 1);
    break;
  case (0x00000020):
    ofmt = (0 << 0) | (0 << 1);
    break;
  case (0x00000080):
    ofmt = (1 << 0) | (1 << 1);
    break;
  case (0x00000100):
    ofmt = (0 << 0) | (1 << 1);
    break;
  case (0x00000800):
    ofmt = (1 << 0) | (0 << 1);
    break;
  case (0x00001000):
    ofmt = (0 << 0) | (0 << 1);
    break;
  case (0x00002000):
    ofmt = (1 << 0) | (1 << 1);
    break;
  case (0x00004000):
    ofmt = (0 << 0) | (1 << 1);
    break;
  case (0x00008000):
    ofmt = (1 << 0) | (0 << 1);
    break;
  case (0x00010000):
    ofmt = (0 << 0) | (0 << 1);
    break;
  case (0x00020000):
    ofmt = (1 << 0) | (1 << 1);
    break;
  case (0x00040000):
    ofmt = (0 << 0) | (1 << 1);
    break;
  case (0x00000004):
    ofmt = (1 << 0) | (0 << 1);
    break;
  case (0x00000001):
    ofmt = (1 << 3);
    break;
  case (0x00000002):
    ofmt = (2 << 3);
    break;
  case (0x00000200):
    ofmt = (3 << 3);
    break;
  case (0x00000400):
    ofmt = (4 << 3);
    break;
  case (0x00100000):
    ofmt = (1 << 2) | (1 << 0);
    break;
  default:
    if ((ifmt & 0x70000000) == 0x70000000) {
      ofmt = ifmt & ~0x70000000;
      break;
    }
    mp_msg_c(((37) << 8) |
                 ((((-3) < 0) ? ((-3) + 3) : (((-3) == 0) ? 4 : ((-3) + 5)))),
             "Unrecognized input audio format %i\n", ifmt);
    break;
  }
  return ofmt;
}


x86 assembly (clang, -O0):
<af_format_decode>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0xffffffff,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
sub    $0x1,%eax
je     1347 <af_format_decode+0x237>
jmp    1136 <af_format_decode+0x26>
mov    -0xc(%rbp),%eax
sub    $0x2,%eax
je     1353 <af_format_decode+0x243>
jmp    1147 <af_format_decode+0x37>
mov    -0xc(%rbp),%eax
sub    $0x4,%eax
je     133b <af_format_decode+0x22b>
jmp    1158 <af_format_decode+0x48>
mov    -0xc(%rbp),%eax
sub    $0x8,%eax
je     1293 <af_format_decode+0x183>
jmp    1169 <af_format_decode+0x59>
mov    -0xc(%rbp),%eax
sub    $0x10,%eax
je     12ab <af_format_decode+0x19b>
jmp    117a <af_format_decode+0x6a>
mov    -0xc(%rbp),%eax
sub    $0x20,%eax
je     12b7 <af_format_decode+0x1a7>
jmp    118b <af_format_decode+0x7b>
mov    -0xc(%rbp),%eax
sub    $0x40,%eax
je     129f <af_format_decode+0x18f>
jmp    119c <af_format_decode+0x8c>
mov    -0xc(%rbp),%eax
sub    $0x80,%eax
je     12c3 <af_format_decode+0x1b3>
jmp    11af <af_format_decode+0x9f>
mov    -0xc(%rbp),%eax
sub    $0x100,%eax
je     12cf <af_format_decode+0x1bf>
jmp    11c2 <af_format_decode+0xb2>
mov    -0xc(%rbp),%eax
sub    $0x200,%eax
je     135f <af_format_decode+0x24f>
jmp    11d5 <af_format_decode+0xc5>
mov    -0xc(%rbp),%eax
sub    $0x400,%eax
je     136b <af_format_decode+0x25b>
jmp    11e8 <af_format_decode+0xd8>
mov    -0xc(%rbp),%eax
sub    $0x800,%eax
je     12db <af_format_decode+0x1cb>
jmp    11fb <af_format_decode+0xeb>
mov    -0xc(%rbp),%eax
sub    $0x1000,%eax
je     12e7 <af_format_decode+0x1d7>
jmp    120e <af_format_decode+0xfe>
mov    -0xc(%rbp),%eax
sub    $0x2000,%eax
je     12f3 <af_format_decode+0x1e3>
jmp    1221 <af_format_decode+0x111>
mov    -0xc(%rbp),%eax
sub    $0x4000,%eax
je     12ff <af_format_decode+0x1ef>
jmp    1234 <af_format_decode+0x124>
mov    -0xc(%rbp),%eax
sub    $0x8000,%eax
je     130b <af_format_decode+0x1fb>
jmp    1247 <af_format_decode+0x137>
mov    -0xc(%rbp),%eax
sub    $0x10000,%eax
je     1317 <af_format_decode+0x207>
jmp    125a <af_format_decode+0x14a>
mov    -0xc(%rbp),%eax
sub    $0x20000,%eax
je     1323 <af_format_decode+0x213>
jmp    126d <af_format_decode+0x15d>
mov    -0xc(%rbp),%eax
sub    $0x40000,%eax
je     132f <af_format_decode+0x21f>
jmp    1280 <af_format_decode+0x170>
mov    -0xc(%rbp),%eax
sub    $0x100000,%eax
je     1377 <af_format_decode+0x267>
jmp    1383 <af_format_decode+0x273>
movl   $0x3,-0x8(%rbp)
jmp    13ba <af_format_decode+0x2aa>
movl   $0x1,-0x8(%rbp)
jmp    13ba <af_format_decode+0x2aa>
movl   $0x1,-0x8(%rbp)
jmp    13ba <af_format_decode+0x2aa>
movl   $0x0,-0x8(%rbp)
jmp    13ba <af_format_decode+0x2aa>
movl   $0x3,-0x8(%rbp)
jmp    13ba <af_format_decode+0x2aa>
movl   $0x2,-0x8(%rbp)
jmp    13ba <af_format_decode+0x2aa>
movl   $0x1,-0x8(%rbp)
jmp    13ba <af_format_decode+0x2aa>
movl   $0x0,-0x8(%rbp)
jmp    13ba <af_format_decode+0x2aa>
movl   $0x3,-0x8(%rbp)
jmp    13ba <af_format_decode+0x2aa>
movl   $0x2,-0x8(%rbp)
jmp    13ba <af_format_decode+0x2aa>
movl   $0x1,-0x8(%rbp)
jmp    13ba <af_format_decode+0x2aa>
movl   $0x0,-0x8(%rbp)
jmp    13ba <af_format_decode+0x2aa>
movl   $0x3,-0x8(%rbp)
jmp    13ba <af_format_decode+0x2aa>
movl   $0x2,-0x8(%rbp)
jmp    13ba <af_format_decode+0x2aa>
movl   $0x1,-0x8(%rbp)
jmp    13ba <af_format_decode+0x2aa>
movl   $0x8,-0x8(%rbp)
jmp    13ba <af_format_decode+0x2aa>
movl   $0x10,-0x8(%rbp)
jmp    13ba <af_format_decode+0x2aa>
movl   $0x18,-0x8(%rbp)
jmp    13ba <af_format_decode+0x2aa>
movl   $0x20,-0x8(%rbp)
jmp    13ba <af_format_decode+0x2aa>
movl   $0x5,-0x8(%rbp)
jmp    13ba <af_format_decode+0x2aa>
mov    -0x4(%rbp),%eax
and    $0x70000000,%eax
cmp    $0x70000000,%eax
jne    13a6 <af_format_decode+0x296>
mov    -0x4(%rbp),%eax
and    $0x8fffffff,%eax
mov    %eax,-0x8(%rbp)
jmp    13ba <af_format_decode+0x2aa>
mov    -0x4(%rbp),%edx
mov    $0x2500,%edi
lea    0xc4b(%rip),%rsi
call   1030 <mp_msg_c@plt>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<af_format_decode>:
push   %rax
mov    %edi,%edx
mov    $0x3,%eax
cmp    $0x3ff,%edi
jg     114c <af_format_decode+0x3c>
cmp    $0x7f,%edx
jg     11ac <af_format_decode+0x9c>
lea    -0x1(%rdx),%ecx
cmp    $0x3f,%ecx
ja     1211 <af_format_decode+0x101>
lea    0xec4(%rip),%rsi
movslq (%rsi,%rcx,4),%rcx
add    %rsi,%rcx
jmp    *%rcx
mov    $0x8,%eax
pop    %rcx
ret
cmp    $0x7fff,%edx
jg     1181 <af_format_decode+0x71>
cmp    $0xfff,%edx
jle    11d6 <af_format_decode+0xc6>
cmp    $0x1000,%edx
je     11f8 <af_format_decode+0xe8>
cmp    $0x2000,%edx
je     123c <af_format_decode+0x12c>
cmp    $0x4000,%edx
je     11cf <af_format_decode+0xbf>
jmp    1211 <af_format_decode+0x101>
cmp    $0x1ffff,%edx
jle    11e8 <af_format_decode+0xd8>
cmp    $0x20000,%edx
je     123c <af_format_decode+0x12c>
cmp    $0x40000,%edx
je     11cf <af_format_decode+0xbf>
cmp    $0x100000,%edx
jne    1211 <af_format_decode+0x101>
mov    $0x5,%eax
pop    %rcx
ret
cmp    $0x80,%edx
je     123c <af_format_decode+0x12c>
cmp    $0x100,%edx
je     11cf <af_format_decode+0xbf>
cmp    $0x200,%edx
jne    1211 <af_format_decode+0x101>
mov    $0x18,%eax
pop    %rcx
ret
mov    $0x2,%eax
pop    %rcx
ret
cmp    $0x400,%edx
je     120a <af_format_decode+0xfa>
cmp    $0x800,%edx
je     11fc <af_format_decode+0xec>
jmp    1211 <af_format_decode+0x101>
cmp    $0x8000,%edx
je     11fc <af_format_decode+0xec>
cmp    $0x10000,%edx
jne    1211 <af_format_decode+0x101>
xor    %eax,%eax
pop    %rcx
ret
mov    $0x1,%eax
pop    %rcx
ret
mov    $0x10,%eax
pop    %rcx
ret
mov    $0x20,%eax
pop    %rcx
ret
mov    %edx,%eax
not    %eax
test   $0x70000000,%eax
jne    1226 <af_format_decode+0x116>
and    $0x8fffffff,%edx
mov    %edx,%eax
pop    %rcx
ret
lea    0xed3(%rip),%rsi
mov    $0x2500,%edi
call   1030 <mp_msg_c@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [36 x i8] c"Unrecognized input audio format %i\0A\00"
define i32 @af_format_decode(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 -1, i32* %3
%4 = load i32, i32* %2
switch i32 %4, label %25 [
i32 8, label %5
i32 64, label %6
i32 16, label %7
i32 32, label %8
i32 128, label %9
i32 256, label %10
i32 2048, label %11
i32 4096, label %12
i32 8192, label %13
i32 16384, label %14
i32 32768, label %15
i32 65536, label %16
i32 131072, label %17
i32 262144, label %18
i32 4, label %19
i32 1, label %20
i32 2, label %21
i32 512, label %22
i32 1024, label %23
i32 1048576, label %24
]
5: ; preds = %1
store i32 3, i32* %3
br label %35
6: ; preds = %1
store i32 1, i32* %3
br label %35
7: ; preds = %1
store i32 1, i32* %3
br label %35
8: ; preds = %1
store i32 0, i32* %3
br label %35
9: ; preds = %1
store i32 3, i32* %3
br label %35
10: ; preds = %1
store i32 2, i32* %3
br label %35
11: ; preds = %1
store i32 1, i32* %3
br label %35
12: ; preds = %1
store i32 0, i32* %3
br label %35
13: ; preds = %1
store i32 3, i32* %3
br label %35
14: ; preds = %1
store i32 2, i32* %3
br label %35
15: ; preds = %1
store i32 1, i32* %3
br label %35
16: ; preds = %1
store i32 0, i32* %3
br label %35
17: ; preds = %1
store i32 3, i32* %3
br label %35
18: ; preds = %1
store i32 2, i32* %3
br label %35
19: ; preds = %1
store i32 1, i32* %3
br label %35
20: ; preds = %1
store i32 8, i32* %3
br label %35
21: ; preds = %1
store i32 16, i32* %3
br label %35
22: ; preds = %1
store i32 24, i32* %3
br label %35
23: ; preds = %1
store i32 32, i32* %3
br label %35
24: ; preds = %1
store i32 5, i32* %3
br label %35
25: ; preds = %1
%26 = load i32, i32* %2
%27 = and i32 %26, 1879048192
%28 = icmp eq i32 %27, 1879048192
br i1 %28, label %29, label %32
29: ; preds = %25
%30 = load i32, i32* %2
%31 = and i32 %30, -1879048193
store i32 %31, i32* %3
br label %35
32: ; preds = %25
%33 = load i32, i32* %2
%34 = call i32 @mp_msg_c(i32 9472, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i32 %33)
br label %35
35: ; preds = %32, %29, %24, %23, %22, %21, %20, %19, %18, %17, %16, %15, %14, %13, %12, %11, %10, %9, %8, %7, %6, %5
%36 = load i32, i32* %3
ret i32 %36
}

LLVM IR (-O2):
@.str = [36 x i8] c"Unrecognized input audio format %i\0A\00"
define i32 @af_format_decode(i32 %0) {
switch i32 %0, label %18 [
i32 8, label %25
i32 64, label %2
i32 16, label %3
i32 32, label %4
i32 128, label %25
i32 256, label %5
i32 2048, label %6
i32 4096, label %7
i32 8192, label %25
i32 16384, label %8
i32 32768, label %9
i32 65536, label %10
i32 131072, label %25
i32 262144, label %11
i32 4, label %12
i32 1, label %13
i32 2, label %14
i32 512, label %15
i32 1024, label %16
i32 1048576, label %17
]
2: ; preds = %1
br label %25
3: ; preds = %1
br label %25
4: ; preds = %1
br label %25
5: ; preds = %1
br label %25
6: ; preds = %1
br label %25
7: ; preds = %1
br label %25
8: ; preds = %1
br label %25
9: ; preds = %1
br label %25
10: ; preds = %1
br label %25
11: ; preds = %1
br label %25
12: ; preds = %1
br label %25
13: ; preds = %1
br label %25
14: ; preds = %1
br label %25
15: ; preds = %1
br label %25
16: ; preds = %1
br label %25
17: ; preds = %1
br label %25
18: ; preds = %1
%19 = and i32 %0, 1879048192
%20 = icmp eq i32 %19, 1879048192
br i1 %20, label %21, label %23
21: ; preds = %18
%22 = and i32 %0, -1879048193
br label %25
23: ; preds = %18
%24 = tail call i32 @mp_msg_c(i32 9472, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i32 %0)
br label %25
25: ; preds = %1, %1, %1, %1, %23, %21, %17, %16, %15, %14, %13, %12, %11, %10, %9, %8, %7, %6, %5, %4, %3, %2
%26 = phi i32 [ %22, %21 ], [ -1, %23 ], [ 5, %17 ], [ 32, %16 ], [ 24, %15 ], [ 16, %14 ], [ 8, %13 ], [ 1, %12 ], [ 2, %11 ], [ 0, %10 ], [ 1, %9 ], [ 2, %8 ], [ 0, %7 ], [ 1, %6 ], [ 2, %5 ], [ 0, %4 ], [ 1, %3 ], [ 1, %2 ], [ 3, %1 ], [ 3, %1 ], [ 3, %1 ], [ 3, %1 ]
ret i32 %26
}