#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 librpip_pins_getpins_from_dt(int);
uint32_t librpip_pins_getpins(uint32_t fid) {
  switch (fid) {
  case 0x002:
    return 0b00000000000000001100000000000000;
    break;
  case 0x004:
    return 0b00000000000000001100000000000000;
    break;
  case 0x008:
  case 0x010:
  case 0x020:
  case 0x040:
  case 0x080:
  case 0x100:
    return librpip_pins_getpins_from_dt(fid);
  }
  return 0;
}


x86 assembly (clang, -O0):
<librpip_pins_getpins>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
sub    $0x2,%eax
je     11aa <librpip_pins_getpins+0x9a>
jmp    112f <librpip_pins_getpins+0x1f>
mov    -0xc(%rbp),%eax
sub    $0x4,%eax
je     11b6 <librpip_pins_getpins+0xa6>
jmp    1140 <librpip_pins_getpins+0x30>
mov    -0xc(%rbp),%eax
sub    $0x8,%eax
je     11c2 <librpip_pins_getpins+0xb2>
jmp    1151 <librpip_pins_getpins+0x41>
mov    -0xc(%rbp),%eax
sub    $0x10,%eax
je     11c2 <librpip_pins_getpins+0xb2>
jmp    1162 <librpip_pins_getpins+0x52>
mov    -0xc(%rbp),%eax
sub    $0x20,%eax
je     11c2 <librpip_pins_getpins+0xb2>
jmp    1173 <librpip_pins_getpins+0x63>
mov    -0xc(%rbp),%eax
sub    $0x40,%eax
je     11c2 <librpip_pins_getpins+0xb2>
jmp    1184 <librpip_pins_getpins+0x74>
mov    -0xc(%rbp),%eax
sub    $0x80,%eax
je     11c2 <librpip_pins_getpins+0xb2>
jmp    1197 <librpip_pins_getpins+0x87>
mov    -0xc(%rbp),%eax
sub    $0x100,%eax
je     11c2 <librpip_pins_getpins+0xb2>
jmp    11d2 <librpip_pins_getpins+0xc2>
movl   $0xc000,-0x4(%rbp)
jmp    11d9 <librpip_pins_getpins+0xc9>
movl   $0xc000,-0x4(%rbp)
jmp    11d9 <librpip_pins_getpins+0xc9>
mov    -0x8(%rbp),%edi
call   1030 <librpip_pins_getpins_from_dt@plt>
mov    %eax,-0x4(%rbp)
jmp    11d9 <librpip_pins_getpins+0xc9>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<librpip_pins_getpins>:
lea    -0x2(%rdi),%ecx
cmp    $0x3e,%ecx
ja     1139 <librpip_pins_getpins+0x29>
movabs $0x4000000040004040,%rax
bt     %rcx,%rax
jb     1149 <librpip_pins_getpins+0x39>
mov    $0xc000,%eax
mov    $0x5,%edx
bt     %rcx,%rdx
jae    1139 <librpip_pins_getpins+0x29>
ret
cmp    $0x100,%edi
je     1149 <librpip_pins_getpins+0x39>
cmp    $0x80,%edi
jne    114e <librpip_pins_getpins+0x3e>
jmp    1030 <librpip_pins_getpins_from_dt@plt>
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @librpip_pins_getpins(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %10 [
i32 2, label %5
i32 4, label %6
i32 8, label %7
i32 16, label %7
i32 32, label %7
i32 64, label %7
i32 128, label %7
i32 256, label %7
]
5: ; preds = %1
store i32 49152, i32* %2
br label %11
6: ; preds = %1
store i32 49152, i32* %2
br label %11
7: ; preds = %1, %1, %1, %1, %1, %1
%8 = load i32, i32* %3
%9 = call i32 @librpip_pins_getpins_from_dt(i32 %8)
store i32 %9, i32* %2
br label %11
10: ; preds = %1
store i32 0, i32* %2
br label %11
11: ; preds = %10, %7, %6, %5
%12 = load i32, i32* %2
ret i32 %12
}

LLVM IR (-O2):
define i32 @librpip_pins_getpins(i32 %0) {
switch i32 %0, label %4 [
i32 2, label %5
i32 4, label %5
i32 8, label %2
i32 16, label %2
i32 32, label %2
i32 64, label %2
i32 128, label %2
i32 256, label %2
]
2: ; preds = %1, %1, %1, %1, %1, %1
%3 = tail call i32 @librpip_pins_getpins_from_dt(i32 %0)
br label %5
4: ; preds = %1
br label %5
5: ; preds = %1, %1, %4, %2
%6 = phi i32 [ 0, %4 ], [ %3, %2 ], [ 49152, %1 ], [ 49152, %1 ]
ret i32 %6
}