#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 /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int pin_num_check(int pin_num) {
  if (pin_num != 0 && pin_num != 1 && pin_num != 2 && pin_num != 7 &&
      pin_num != 13 && pin_num != 14 && pin_num != 15 && pin_num != 16 &&
      pin_num != 17 && pin_num != 18 && pin_num != 19 && pin_num != 20 &&
      pin_num != 21 && pin_num != 23 && pin_num != 24 && pin_num != 25 &&
      pin_num != 26) {
    printf("Error: Invalid pin number!\n");
    printf("The valid pin numbers are:\n");
    printf("0, 1, 2, 7, 13, 14, 15, 16, 17, 18, 19, 20, 21, 23, 24, 25, 26\n");
    exit(0);
  }
}


x86 assembly (clang, -O0):
<pin_num_check>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     1200 <pin_num_check+0xe0>
cmpl   $0x1,-0x8(%rbp)
je     1200 <pin_num_check+0xe0>
cmpl   $0x2,-0x8(%rbp)
je     1200 <pin_num_check+0xe0>
cmpl   $0x7,-0x8(%rbp)
je     1200 <pin_num_check+0xe0>
cmpl   $0xd,-0x8(%rbp)
je     1200 <pin_num_check+0xe0>
cmpl   $0xe,-0x8(%rbp)
je     1200 <pin_num_check+0xe0>
cmpl   $0xf,-0x8(%rbp)
je     1200 <pin_num_check+0xe0>
cmpl   $0x10,-0x8(%rbp)
je     1200 <pin_num_check+0xe0>
cmpl   $0x11,-0x8(%rbp)
je     1200 <pin_num_check+0xe0>
cmpl   $0x12,-0x8(%rbp)
je     1200 <pin_num_check+0xe0>
cmpl   $0x13,-0x8(%rbp)
je     1200 <pin_num_check+0xe0>
cmpl   $0x14,-0x8(%rbp)
je     1200 <pin_num_check+0xe0>
cmpl   $0x15,-0x8(%rbp)
je     1200 <pin_num_check+0xe0>
cmpl   $0x17,-0x8(%rbp)
je     1200 <pin_num_check+0xe0>
cmpl   $0x18,-0x8(%rbp)
je     1200 <pin_num_check+0xe0>
cmpl   $0x19,-0x8(%rbp)
je     1200 <pin_num_check+0xe0>
cmpl   $0x1a,-0x8(%rbp)
je     1200 <pin_num_check+0xe0>
lea    0xe24(%rip),%rdi
call   1030 <printf@plt>
lea    0xe34(%rip),%rdi
call   1030 <printf@plt>
lea    0xe44(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pin_num_check>:
lea    -0x16(%rdi),%eax
cmp    $0xfffffff6,%eax
ja     1137 <pin_num_check+0x17>
cmp    $0x1a,%edi
ja     1138 <pin_num_check+0x18>
mov    $0x7800087,%eax
bt     %edi,%eax
jae    1138 <pin_num_check+0x18>
ret
push   %rax
lea    0xec0(%rip),%rdi
call   1030 <puts@plt>
lea    0xecf(%rip),%rdi
call   1030 <puts@plt>
lea    0xede(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [28 x i8] c"Error: Invalid pin number!\0A\00"
@.str.1 = [28 x i8] c"The valid pin numbers are:\0A\00"
@.str.2 = [64 x i8] c"0, 1, 2, 7, 13, 14, 15, 16, 17, 18, 19, 20, 21, 23, 24, 25, 26\0A\00"
define i32 @pin_num_check(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp ne i32 %4, 0
br i1 %5, label %6, label %59
6: ; preds = %1
%7 = load i32, i32* %3
%8 = icmp ne i32 %7, 1
br i1 %8, label %9, label %59
9: ; preds = %6
%10 = load i32, i32* %3
%11 = icmp ne i32 %10, 2
br i1 %11, label %12, label %59
12: ; preds = %9
%13 = load i32, i32* %3
%14 = icmp ne i32 %13, 7
br i1 %14, label %15, label %59
15: ; preds = %12
%16 = load i32, i32* %3
%17 = icmp ne i32 %16, 13
br i1 %17, label %18, label %59
18: ; preds = %15
%19 = load i32, i32* %3
%20 = icmp ne i32 %19, 14
br i1 %20, label %21, label %59
21: ; preds = %18
%22 = load i32, i32* %3
%23 = icmp ne i32 %22, 15
br i1 %23, label %24, label %59
24: ; preds = %21
%25 = load i32, i32* %3
%26 = icmp ne i32 %25, 16
br i1 %26, label %27, label %59
27: ; preds = %24
%28 = load i32, i32* %3
%29 = icmp ne i32 %28, 17
br i1 %29, label %30, label %59
30: ; preds = %27
%31 = load i32, i32* %3
%32 = icmp ne i32 %31, 18
br i1 %32, label %33, label %59
33: ; preds = %30
%34 = load i32, i32* %3
%35 = icmp ne i32 %34, 19
br i1 %35, label %36, label %59
36: ; preds = %33
%37 = load i32, i32* %3
%38 = icmp ne i32 %37, 20
br i1 %38, label %39, label %59
39: ; preds = %36
%40 = load i32, i32* %3
%41 = icmp ne i32 %40, 21
br i1 %41, label %42, label %59
42: ; preds = %39
%43 = load i32, i32* %3
%44 = icmp ne i32 %43, 23
br i1 %44, label %45, label %59
45: ; preds = %42
%46 = load i32, i32* %3
%47 = icmp ne i32 %46, 24
br i1 %47, label %48, label %59
48: ; preds = %45
%49 = load i32, i32* %3
%50 = icmp ne i32 %49, 25
br i1 %50, label %51, label %59
51: ; preds = %48
%52 = load i32, i32* %3
%53 = icmp ne i32 %52, 26
br i1 %53, label %54, label %59
54: ; preds = %51
%55 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%56 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0))
%57 = call i32 @printf(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.2, i64 0, i64 0))
%58 = call i32 @exit(i32 0)
unreachable
59: ; preds = %51, %48, %45, %42, %39, %36, %33, %30, %27, %24, %21, %18, %15, %12, %9, %6, %1
%60 = load i32, i32* %2
ret i32 %60
}

LLVM IR (-O2):
@str = [27 x i8] c"Error: Invalid pin number!\00"
@str.3 = [27 x i8] c"The valid pin numbers are:\00"
@str.4 = [63 x i8] c"0, 1, 2, 7, 13, 14, 15, 16, 17, 18, 19, 20, 21, 23, 24, 25, 26\00"
define i32 @pin_num_check(i32 %0) {
%2 = add i32 %0, -22
%3 = icmp ult i32 %2, -9
br i1 %3, label %4, label %10
4: ; preds = %1
switch i32 %0, label %5 [
i32 26, label %10
i32 25, label %10
i32 24, label %10
i32 23, label %10
i32 7, label %10
i32 2, label %10
i32 1, label %10
i32 0, label %10
]
5: ; preds = %4
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str.3, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([63 x i8], [63 x i8]* @str.4, i64 0, i64 0))
%9 = tail call i32 @exit(i32 0)
unreachable
10: ; preds = %4, %4, %4, %4, %4, %4, %4, %4, %1
ret i32 undef
}