#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) {
  int tmplog;
  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
%5 = alloca i32
store i32 %0, i32* %3
store i8 %1, i8* %4
%6 = load i8, i8* %4
%7 = sext i8 %6 to i32
%8 = icmp ne i32 %7, 83
br i1 %8, label %9, label %35
9: ; preds = %2
%10 = load i8, i8* %4
%11 = sext i8 %10 to i32
%12 = icmp ne i32 %11, 65
br i1 %12, label %13, label %35
13: ; preds = %9
%14 = load i8, i8* %4
%15 = sext i8 %14 to i32
%16 = icmp ne i32 %15, 66
br i1 %16, label %17, label %35
17: ; preds = %13
%18 = load i8, i8* %4
%19 = sext i8 %18 to i32
%20 = icmp ne i32 %19, 82
br i1 %20, label %21, label %35
21: ; preds = %17
%22 = load i8, i8* %4
%23 = sext i8 %22 to i32
%24 = icmp ne i32 %23, 87
br i1 %24, label %25, label %35
25: ; preds = %21
%26 = load i8, i8* %4
%27 = sext i8 %26 to i32
%28 = icmp ne i32 %27, 67
br i1 %28, label %29, label %35
29: ; preds = %25
%30 = load i8, i8* %4
%31 = sext i8 %30 to i32
%32 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i32 %31)
%33 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.1, i64 0, i64 0))
%34 = call i32 @exit(i32 1)
unreachable
35: ; preds = %25, %21, %17, %13, %9, %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
}