#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*/ printf(char *, ...);
void check_info(int type, char class) {
  if (class != 'S' && class != 'A' && class != 'B' && class != 'R' &&
      class != 'W' && class != 'C') {
    printf("setparams: Unknown benchmark class %c\n", class);
    printf("setparams: Allowed classes are \"S\", \"A\", \"B\" and \"C\"\n");
    exit(1);
  }
}


x86 assembly (clang, -O0):
<check_info>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %edi,-0x4(%rbp)
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x53,%eax
je     11a9 <check_info+0x89>
movsbl -0x5(%rbp),%eax
cmp    $0x41,%eax
je     11a9 <check_info+0x89>
movsbl -0x5(%rbp),%eax
cmp    $0x42,%eax
je     11a9 <check_info+0x89>
movsbl -0x5(%rbp),%eax
cmp    $0x52,%eax
je     11a9 <check_info+0x89>
movsbl -0x5(%rbp),%eax
cmp    $0x57,%eax
je     11a9 <check_info+0x89>
movsbl -0x5(%rbp),%eax
cmp    $0x43,%eax
je     11a9 <check_info+0x89>
movsbl -0x5(%rbp),%esi
lea    0xe76(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe8f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_info>:
lea    -0x41(%rsi),%eax
cmp    $0x16,%al
ja     1146 <check_info+0x16>
movzbl %al,%eax
mov    $0x460007,%ecx
bt     %rax,%rcx
jae    1146 <check_info+0x16>
ret
push   %rax
movsbl %sil,%esi
lea    0xeae(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xec7(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [39 x i8] c"setparams: Unknown benchmark class %c\0A\00"
@.str.1 = [54 x i8] c"setparams: Allowed classes are \22S\22, \22A\22, \22B\22 and \22C\22\0A\00"
define void @check_info(i32 %0, i8 signext %1) {
%3 = alloca i32
%4 = alloca i8
store i32 %0, i32* %3
store i8 %1, i8* %4
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = icmp ne i32 %6, 83
br i1 %7, label %8, label %34
8: ; preds = %2
%9 = load i8, i8* %4
%10 = sext i8 %9 to i32
%11 = icmp ne i32 %10, 65
br i1 %11, label %12, label %34
12: ; preds = %8
%13 = load i8, i8* %4
%14 = sext i8 %13 to i32
%15 = icmp ne i32 %14, 66
br i1 %15, label %16, label %34
16: ; preds = %12
%17 = load i8, i8* %4
%18 = sext i8 %17 to i32
%19 = icmp ne i32 %18, 82
br i1 %19, label %20, label %34
20: ; preds = %16
%21 = load i8, i8* %4
%22 = sext i8 %21 to i32
%23 = icmp ne i32 %22, 87
br i1 %23, label %24, label %34
24: ; preds = %20
%25 = load i8, i8* %4
%26 = sext i8 %25 to i32
%27 = icmp ne i32 %26, 67
br i1 %27, label %28, label %34
28: ; preds = %24
%29 = load i8, i8* %4
%30 = sext i8 %29 to i32
%31 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i32 %30)
%32 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.1, i64 0, i64 0))
%33 = call i32 @exit(i32 1)
unreachable
34: ; preds = %24, %20, %16, %12, %8, %2
ret void
}

LLVM IR (-O2):
@.str = [39 x i8] c"setparams: Unknown benchmark class %c\0A\00"
@str = [53 x i8] c"setparams: Allowed classes are \22S\22, \22A\22, \22B\22 and \22C\22\00"
define void @check_info(i32 %0, i8 signext %1) {
switch i8 %1, label %3 [
i8 87, label %8
i8 83, label %8
i8 82, label %8
i8 67, label %8
i8 66, label %8
i8 65, label %8
]
3: ; preds = %2
%4 = sext i8 %1 to i32
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @str, i64 0, i64 0))
%7 = tail call i32 @exit(i32 1)
unreachable
8: ; preds = %2, %2, %2, %2, %2, %2
ret void
}