#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*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
int pin_to_input_group1(int pin) {
  switch (pin) {
  default:
    fprintf(stderr, "gpio: Wrong mode for this pin!\n");
    exit(-1);
    case ((('A' == 'A' ? 0x000 : 'A' == 'B' ? 0x100 : 'A' == 'C' ? 0x200 : 'A' == 'D' ? 0x300 : 'A' == 'E' ? 0x400 : 'A' == 'F' ? 0x500 : 'A' == 'G' ? 0x600 : 'A' == 'H' ? 0x700 : 'A' == 'J' ? 0x800 : 0x900) << 16) | (1 << 14)): return 13;
    case ((('B' == 'A' ? 0x000 : 'B' == 'B' ? 0x100 : 'B' == 'C' ? 0x200 : 'B' == 'D' ? 0x300 : 'B' == 'E' ? 0x400 : 'B' == 'F' ? 0x500 : 'B' == 'G' ? 0x600 : 'B' == 'H' ? 0x700 : 'B' == 'J' ? 0x800 : 0x900) << 16) | (1 << 10)): return 6;
    case ((('B' == 'A' ? 0x000 : 'B' == 'B' ? 0x100 : 'B' == 'C' ? 0x200 : 'B' == 'D' ? 0x300 : 'B' == 'E' ? 0x400 : 'B' == 'F' ? 0x500 : 'B' == 'G' ? 0x600 : 'B' == 'H' ? 0x700 : 'B' == 'J' ? 0x800 : 0x900) << 16) | (1 << 5)): return 8;
    case ((('B' == 'A' ? 0x000 : 'B' == 'B' ? 0x100 : 'B' == 'C' ? 0x200 : 'B' == 'D' ? 0x300 : 'B' == 'E' ? 0x400 : 'B' == 'F' ? 0x500 : 'B' == 'G' ? 0x600 : 'B' == 'H' ? 0x700 : 'B' == 'J' ? 0x800 : 0x900) << 16) | (1 << 9)): return 5;
    case ((('C' == 'A' ? 0x000 : 'C' == 'B' ? 0x100 : 'C' == 'C' ? 0x200 : 'C' == 'D' ? 0x300 : 'C' == 'E' ? 0x400 : 'C' == 'F' ? 0x500 : 'C' == 'G' ? 0x600 : 'C' == 'H' ? 0x700 : 'C' == 'J' ? 0x800 : 0x900) << 16) | (1 << 14)): return 7;
    case ((('C' == 'A' ? 0x000 : 'C' == 'B' ? 0x100 : 'C' == 'C' ? 0x200 : 'C' == 'D' ? 0x300 : 'C' == 'E' ? 0x400 : 'C' == 'F' ? 0x500 : 'C' == 'G' ? 0x600 : 'C' == 'H' ? 0x700 : 'C' == 'J' ? 0x800 : 0x900) << 16) | (1 << 1)): return 10;
    case ((('D' == 'A' ? 0x000 : 'D' == 'B' ? 0x100 : 'D' == 'C' ? 0x200 : 'D' == 'D' ? 0x300 : 'D' == 'E' ? 0x400 : 'D' == 'F' ? 0x500 : 'D' == 'G' ? 0x600 : 'D' == 'H' ? 0x700 : 'D' == 'J' ? 0x800 : 0x900) << 16) | (1 << 14)): return 11;
    case ((('D' == 'A' ? 0x000 : 'D' == 'B' ? 0x100 : 'D' == 'C' ? 0x200 : 'D' == 'D' ? 0x300 : 'D' == 'E' ? 0x400 : 'D' == 'F' ? 0x500 : 'D' == 'G' ? 0x600 : 'D' == 'H' ? 0x700 : 'D' == 'J' ? 0x800 : 0x900) << 16) | (1 << 2)): return 0;
    case ((('D' == 'A' ? 0x000 : 'D' == 'B' ? 0x100 : 'D' == 'C' ? 0x200 : 'D' == 'D' ? 0x300 : 'D' == 'E' ? 0x400 : 'D' == 'F' ? 0x500 : 'D' == 'G' ? 0x600 : 'D' == 'H' ? 0x700 : 'D' == 'J' ? 0x800 : 0x900) << 16) | (1 << 6)): return 14;
    case ((('F' == 'A' ? 0x000 : 'F' == 'B' ? 0x100 : 'F' == 'C' ? 0x200 : 'F' == 'D' ? 0x300 : 'F' == 'E' ? 0x400 : 'F' == 'F' ? 0x500 : 'F' == 'G' ? 0x600 : 'F' == 'H' ? 0x700 : 'F' == 'J' ? 0x800 : 0x900) << 16) | (1 << 1)): return 4;
    case ((('F' == 'A' ? 0x000 : 'F' == 'B' ? 0x100 : 'F' == 'C' ? 0x200 : 'F' == 'D' ? 0x300 : 'F' == 'E' ? 0x400 : 'F' == 'F' ? 0x500 : 'F' == 'G' ? 0x600 : 'F' == 'H' ? 0x700 : 'F' == 'J' ? 0x800 : 0x900) << 16) | (1 << 4)): return 2;
    case ((('G' == 'A' ? 0x000 : 'G' == 'B' ? 0x100 : 'G' == 'C' ? 0x200 : 'G' == 'D' ? 0x300 : 'G' == 'E' ? 0x400 : 'G' == 'F' ? 0x500 : 'G' == 'G' ? 0x600 : 'G' == 'H' ? 0x700 : 'G' == 'J' ? 0x800 : 0x900) << 16) | (1 << 1)): return 12;
    case ((('G' == 'A' ? 0x000 : 'G' == 'B' ? 0x100 : 'G' == 'C' ? 0x200 : 'G' == 'D' ? 0x300 : 'G' == 'E' ? 0x400 : 'G' == 'F' ? 0x500 : 'G' == 'G' ? 0x600 : 'G' == 'H' ? 0x700 : 'G' == 'J' ? 0x800 : 0x900) << 16) | (1 << 8)): return 1;
    }
}


x86 assembly (clang, -O0):
<pin_to_input_group1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
sub    $0x4000,%eax
je     1244 <pin_to_input_group1+0x124>
jmp    1141 <pin_to_input_group1+0x21>
mov    -0xc(%rbp),%eax
sub    $0x1000020,%eax
je     125c <pin_to_input_group1+0x13c>
jmp    1154 <pin_to_input_group1+0x34>
mov    -0xc(%rbp),%eax
sub    $0x1000200,%eax
je     1268 <pin_to_input_group1+0x148>
jmp    1167 <pin_to_input_group1+0x47>
mov    -0xc(%rbp),%eax
sub    $0x1000400,%eax
je     1250 <pin_to_input_group1+0x130>
jmp    117a <pin_to_input_group1+0x5a>
mov    -0xc(%rbp),%eax
sub    $0x2000002,%eax
je     1280 <pin_to_input_group1+0x160>
jmp    118d <pin_to_input_group1+0x6d>
mov    -0xc(%rbp),%eax
sub    $0x2004000,%eax
je     1274 <pin_to_input_group1+0x154>
jmp    11a0 <pin_to_input_group1+0x80>
mov    -0xc(%rbp),%eax
sub    $0x3000004,%eax
je     1298 <pin_to_input_group1+0x178>
jmp    11b3 <pin_to_input_group1+0x93>
mov    -0xc(%rbp),%eax
sub    $0x3000040,%eax
je     12a4 <pin_to_input_group1+0x184>
jmp    11c6 <pin_to_input_group1+0xa6>
mov    -0xc(%rbp),%eax
sub    $0x3004000,%eax
je     128c <pin_to_input_group1+0x16c>
jmp    11d9 <pin_to_input_group1+0xb9>
mov    -0xc(%rbp),%eax
sub    $0x5000002,%eax
je     12b0 <pin_to_input_group1+0x190>
jmp    11ec <pin_to_input_group1+0xcc>
mov    -0xc(%rbp),%eax
sub    $0x5000010,%eax
je     12bc <pin_to_input_group1+0x19c>
jmp    11ff <pin_to_input_group1+0xdf>
mov    -0xc(%rbp),%eax
sub    $0x6000002,%eax
je     12c8 <pin_to_input_group1+0x1a8>
jmp    1212 <pin_to_input_group1+0xf2>
mov    -0xc(%rbp),%eax
sub    $0x6000100,%eax
je     12d4 <pin_to_input_group1+0x1b4>
jmp    1225 <pin_to_input_group1+0x105>
mov    0x2db4(%rip),%rax
mov    (%rax),%edi
lea    0xdcb(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>
movl   $0xd,-0x4(%rbp)
jmp    12db <pin_to_input_group1+0x1bb>
movl   $0x6,-0x4(%rbp)
jmp    12db <pin_to_input_group1+0x1bb>
movl   $0x8,-0x4(%rbp)
jmp    12db <pin_to_input_group1+0x1bb>
movl   $0x5,-0x4(%rbp)
jmp    12db <pin_to_input_group1+0x1bb>
movl   $0x7,-0x4(%rbp)
jmp    12db <pin_to_input_group1+0x1bb>
movl   $0xa,-0x4(%rbp)
jmp    12db <pin_to_input_group1+0x1bb>
movl   $0xb,-0x4(%rbp)
jmp    12db <pin_to_input_group1+0x1bb>
movl   $0x0,-0x4(%rbp)
jmp    12db <pin_to_input_group1+0x1bb>
movl   $0xe,-0x4(%rbp)
jmp    12db <pin_to_input_group1+0x1bb>
movl   $0x4,-0x4(%rbp)
jmp    12db <pin_to_input_group1+0x1bb>
movl   $0x2,-0x4(%rbp)
jmp    12db <pin_to_input_group1+0x1bb>
movl   $0xc,-0x4(%rbp)
jmp    12db <pin_to_input_group1+0x1bb>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pin_to_input_group1>:
cmp    $0x3000003,%edi
jle    115a <pin_to_input_group1+0x3a>
cmp    $0x5000001,%edi
jle    1184 <pin_to_input_group1+0x64>
cmp    $0x6000001,%edi
jg     11c0 <pin_to_input_group1+0xa0>
cmp    $0x5000002,%edi
je     11d6 <pin_to_input_group1+0xb6>
cmp    $0x5000010,%edi
jne    1203 <pin_to_input_group1+0xe3>
mov    $0x2,%eax
ret
cmp    $0x10003ff,%edi
jg     11a2 <pin_to_input_group1+0x82>
cmp    $0x4000,%edi
je     11dc <pin_to_input_group1+0xbc>
cmp    $0x1000020,%edi
je     11e2 <pin_to_input_group1+0xc2>
cmp    $0x1000200,%edi
jne    1203 <pin_to_input_group1+0xe3>
mov    $0x5,%eax
ret
cmp    $0x3000004,%edi
je     11e8 <pin_to_input_group1+0xc8>
cmp    $0x3000040,%edi
je     11eb <pin_to_input_group1+0xcb>
cmp    $0x3004000,%edi
jne    1203 <pin_to_input_group1+0xe3>
mov    $0xb,%eax
ret
cmp    $0x1000400,%edi
je     11f1 <pin_to_input_group1+0xd1>
cmp    $0x2000002,%edi
je     11f7 <pin_to_input_group1+0xd7>
cmp    $0x2004000,%edi
jne    1203 <pin_to_input_group1+0xe3>
mov    $0x7,%eax
ret
cmp    $0x6000002,%edi
je     11fd <pin_to_input_group1+0xdd>
cmp    $0x6000100,%edi
jne    1203 <pin_to_input_group1+0xe3>
mov    $0x1,%eax
ret
mov    $0x4,%eax
ret
mov    $0xd,%eax
ret
mov    $0x8,%eax
ret
xor    %eax,%eax
ret
mov    $0xe,%eax
ret
mov    $0x6,%eax
ret
mov    $0xa,%eax
ret
mov    $0xc,%eax
ret
push   %rax
mov    0x2dd5(%rip),%rax
mov    (%rax),%edi
lea    0xdec(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [32 x i8] c"gpio: Wrong mode for this pin!\0A\00"
define i32 @pin_to_input_group1(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %5 [
i32 16384, label %9
i32 16778240, label %10
i32 16777248, label %11
i32 16777728, label %12
i32 33570816, label %13
i32 33554434, label %14
i32 50348032, label %15
i32 50331652, label %16
i32 50331712, label %17
i32 83886082, label %18
i32 83886096, label %19
i32 100663298, label %20
i32 100663552, label %21
]
5: ; preds = %1
%6 = load i32, i32* @stderr
%7 = call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @exit(i32 -1)
unreachable
9: ; preds = %1
store i32 13, i32* %2
br label %22
10: ; preds = %1
store i32 6, i32* %2
br label %22
11: ; preds = %1
store i32 8, i32* %2
br label %22
12: ; preds = %1
store i32 5, i32* %2
br label %22
13: ; preds = %1
store i32 7, i32* %2
br label %22
14: ; preds = %1
store i32 10, i32* %2
br label %22
15: ; preds = %1
store i32 11, i32* %2
br label %22
16: ; preds = %1
store i32 0, i32* %2
br label %22
17: ; preds = %1
store i32 14, i32* %2
br label %22
18: ; preds = %1
store i32 4, i32* %2
br label %22
19: ; preds = %1
store i32 2, i32* %2
br label %22
20: ; preds = %1
store i32 12, i32* %2
br label %22
21: ; preds = %1
store i32 1, i32* %2
br label %22
22: ; preds = %21, %20, %19, %18, %17, %16, %15, %14, %13, %12, %11, %10, %9
%23 = load i32, i32* %2
ret i32 %23
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [32 x i8] c"gpio: Wrong mode for this pin!\0A\00"
define i32 @pin_to_input_group1(i32 %0) {
switch i32 %0, label %2 [
i32 16384, label %18
i32 16778240, label %6
i32 16777248, label %7
i32 16777728, label %8
i32 33570816, label %9
i32 33554434, label %10
i32 50348032, label %11
i32 50331652, label %12
i32 50331712, label %13
i32 83886082, label %14
i32 83886096, label %15
i32 100663298, label %16
i32 100663552, label %17
]
2: ; preds = %1
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%5 = tail call i32 @exit(i32 -1)
unreachable
6: ; preds = %1
br label %18
7: ; preds = %1
br label %18
8: ; preds = %1
br label %18
9: ; preds = %1
br label %18
10: ; preds = %1
br label %18
11: ; preds = %1
br label %18
12: ; preds = %1
br label %18
13: ; preds = %1
br label %18
14: ; preds = %1
br label %18
15: ; preds = %1
br label %18
16: ; preds = %1
br label %18
17: ; preds = %1
br label %18
18: ; preds = %1, %17, %16, %15, %14, %13, %12, %11, %10, %9, %8, %7, %6
%19 = phi i32 [ 1, %17 ], [ 12, %16 ], [ 2, %15 ], [ 4, %14 ], [ 14, %13 ], [ 0, %12 ], [ 11, %11 ], [ 10, %10 ], [ 7, %9 ], [ 5, %8 ], [ 8, %7 ], [ 6, %6 ], [ 13, %1 ]
ret i32 %19
}