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


x86 assembly (clang, -O0):
<pin_to_input_group4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
sub    $0x1000004,%eax
je     11f8 <pin_to_input_group4+0xd8>
jmp    1141 <pin_to_input_group4+0x21>
mov    -0xc(%rbp),%eax
sub    $0x1000040,%eax
je     1204 <pin_to_input_group4+0xe4>
jmp    1154 <pin_to_input_group4+0x34>
mov    -0xc(%rbp),%eax
sub    $0x2000004,%eax
je     1210 <pin_to_input_group4+0xf0>
jmp    1167 <pin_to_input_group4+0x47>
mov    -0xc(%rbp),%eax
sub    $0x3000001,%eax
je     121c <pin_to_input_group4+0xfc>
jmp    117a <pin_to_input_group4+0x5a>
mov    -0xc(%rbp),%eax
sub    $0x3000020,%eax
je     1228 <pin_to_input_group4+0x108>
jmp    118d <pin_to_input_group4+0x6d>
mov    -0xc(%rbp),%eax
sub    $0x4000100,%eax
je     1234 <pin_to_input_group4+0x114>
jmp    11a0 <pin_to_input_group4+0x80>
mov    -0xc(%rbp),%eax
sub    $0x5000004,%eax
je     1240 <pin_to_input_group4+0x120>
jmp    11b3 <pin_to_input_group4+0x93>
mov    -0xc(%rbp),%eax
sub    $0x5000008,%eax
je     124c <pin_to_input_group4+0x12c>
jmp    11c6 <pin_to_input_group4+0xa6>
mov    -0xc(%rbp),%eax
sub    $0x6000200,%eax
je     1258 <pin_to_input_group4+0x138>
jmp    11d9 <pin_to_input_group4+0xb9>
mov    0x2e00(%rip),%rax
mov    (%rax),%edi
lea    0xe17(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>
movl   $0x7,-0x4(%rbp)
jmp    125f <pin_to_input_group4+0x13f>
movl   $0x5,-0x4(%rbp)
jmp    125f <pin_to_input_group4+0x13f>
movl   $0xc,-0x4(%rbp)
jmp    125f <pin_to_input_group4+0x13f>
movl   $0x3,-0x4(%rbp)
jmp    125f <pin_to_input_group4+0x13f>
movl   $0x6,-0x4(%rbp)
jmp    125f <pin_to_input_group4+0x13f>
movl   $0xd,-0x4(%rbp)
jmp    125f <pin_to_input_group4+0x13f>
movl   $0xb,-0x4(%rbp)
jmp    125f <pin_to_input_group4+0x13f>
movl   $0x8,-0x4(%rbp)
jmp    125f <pin_to_input_group4+0x13f>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pin_to_input_group4>:
cmp    $0x300001f,%edi
jle    114e <pin_to_input_group4+0x2e>
cmp    $0x5000003,%edi
jle    1171 <pin_to_input_group4+0x51>
cmp    $0x5000004,%edi
je     119d <pin_to_input_group4+0x7d>
cmp    $0x5000008,%edi
je     11a3 <pin_to_input_group4+0x83>
cmp    $0x6000200,%edi
jne    11b5 <pin_to_input_group4+0x95>
mov    $0x1,%eax
ret
cmp    $0x2000003,%edi
jg     1187 <pin_to_input_group4+0x67>
mov    $0x7,%eax
cmp    $0x1000004,%edi
je     114d <pin_to_input_group4+0x2d>
cmp    $0x1000040,%edi
jne    11b5 <pin_to_input_group4+0x95>
mov    $0x5,%eax
ret
cmp    $0x3000020,%edi
je     11a9 <pin_to_input_group4+0x89>
cmp    $0x4000100,%edi
jne    11b5 <pin_to_input_group4+0x95>
mov    $0xd,%eax
ret
cmp    $0x2000004,%edi
je     11af <pin_to_input_group4+0x8f>
cmp    $0x3000001,%edi
jne    11b5 <pin_to_input_group4+0x95>
mov    $0x3,%eax
ret
mov    $0xb,%eax
ret
mov    $0x8,%eax
ret
mov    $0x6,%eax
ret
mov    $0xc,%eax
ret
push   %rax
mov    0x2e23(%rip),%rax
mov    (%rax),%edi
lea    0xe3a(%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_group4(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %5 [
i32 16777220, label %9
i32 16777280, label %10
i32 33554436, label %11
i32 50331649, label %12
i32 50331680, label %13
i32 67109120, label %14
i32 83886084, label %15
i32 83886088, label %16
i32 100663808, label %17
]
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 7, i32* %2
br label %18
10: ; preds = %1
store i32 5, i32* %2
br label %18
11: ; preds = %1
store i32 12, i32* %2
br label %18
12: ; preds = %1
store i32 3, i32* %2
br label %18
13: ; preds = %1
store i32 6, i32* %2
br label %18
14: ; preds = %1
store i32 13, i32* %2
br label %18
15: ; preds = %1
store i32 11, i32* %2
br label %18
16: ; preds = %1
store i32 8, i32* %2
br label %18
17: ; preds = %1
store i32 1, i32* %2
br label %18
18: ; preds = %17, %16, %15, %14, %13, %12, %11, %10, %9
%19 = load i32, i32* %2
ret i32 %19
}

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_group4(i32 %0) {
switch i32 %0, label %2 [
i32 16777220, label %14
i32 16777280, label %6
i32 33554436, label %7
i32 50331649, label %8
i32 50331680, label %9
i32 67109120, label %10
i32 83886084, label %11
i32 83886088, label %12
i32 100663808, label %13
]
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 %14
7: ; preds = %1
br label %14
8: ; preds = %1
br label %14
9: ; preds = %1
br label %14
10: ; preds = %1
br label %14
11: ; preds = %1
br label %14
12: ; preds = %1
br label %14
13: ; preds = %1
br label %14
14: ; preds = %1, %13, %12, %11, %10, %9, %8, %7, %6
%15 = phi i32 [ 1, %13 ], [ 8, %12 ], [ 11, %11 ], [ 13, %10 ], [ 6, %9 ], [ 3, %8 ], [ 12, %7 ], [ 5, %6 ], [ 7, %1 ]
ret i32 %15
}