#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 /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, char);
void write_is_info(FILE *fp, char class) {
  if (class != 'S' && class != 'W' && class != 'A' && class != 'B' &&
      class != 'C' && class != 'D') {
    printf("setparams: Internal error: invalid class type %c\n", class);
    exit(1);
  }
}


x86 assembly (clang, -O0):
<write_is_info>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
movsbl -0x9(%rbp),%eax
cmp    $0x53,%eax
je     119a <write_is_info+0x7a>
movsbl -0x9(%rbp),%eax
cmp    $0x57,%eax
je     119a <write_is_info+0x7a>
movsbl -0x9(%rbp),%eax
cmp    $0x41,%eax
je     119a <write_is_info+0x7a>
movsbl -0x9(%rbp),%eax
cmp    $0x42,%eax
je     119a <write_is_info+0x7a>
movsbl -0x9(%rbp),%eax
cmp    $0x43,%eax
je     119a <write_is_info+0x7a>
movsbl -0x9(%rbp),%eax
cmp    $0x44,%eax
je     119a <write_is_info+0x7a>
lea    0xe79(%rip),%rdi
movsbl -0x9(%rbp),%esi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_is_info>:
lea    -0x41(%rsi),%eax
cmp    $0x4,%al
jb     1133 <write_is_info+0x13>
cmp    $0x53,%sil
je     1133 <write_is_info+0x13>
cmp    $0x57,%sil
jne    1134 <write_is_info+0x14>
ret
push   %rax
movsbl %sil,%esi
lea    0xec0(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [50 x i8] c"setparams: Internal error: invalid class type %c\0A\00"
define void @write_is_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 %32
8: ; preds = %2
%9 = load i8, i8* %4
%10 = sext i8 %9 to i32
%11 = icmp ne i32 %10, 87
br i1 %11, label %12, label %32
12: ; preds = %8
%13 = load i8, i8* %4
%14 = sext i8 %13 to i32
%15 = icmp ne i32 %14, 65
br i1 %15, label %16, label %32
16: ; preds = %12
%17 = load i8, i8* %4
%18 = sext i8 %17 to i32
%19 = icmp ne i32 %18, 66
br i1 %19, label %20, label %32
20: ; preds = %16
%21 = load i8, i8* %4
%22 = sext i8 %21 to i32
%23 = icmp ne i32 %22, 67
br i1 %23, label %24, label %32
24: ; preds = %20
%25 = load i8, i8* %4
%26 = sext i8 %25 to i32
%27 = icmp ne i32 %26, 68
br i1 %27, label %28, label %32
28: ; preds = %24
%29 = load i8, i8* %4
%30 = call i32 @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0), i8 signext %29)
%31 = call i32 @exit(i32 1)
unreachable
32: ; preds = %24, %20, %16, %12, %8, %2
ret void
}

LLVM IR (-O2):
@.str = [50 x i8] c"setparams: Internal error: invalid class type %c\0A\00"
define void @write_is_info(i32* nocapture readnone %0, i8 signext %1) {
switch i8 %1, label %3 [
i8 87, label %6
i8 83, label %6
i8 68, label %6
i8 67, label %6
i8 66, label %6
i8 65, label %6
]
3: ; preds = %2
%4 = tail call i32 @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0), i8 signext %1)
%5 = tail call i32 @exit(i32 1)
unreachable
6: ; preds = %2, %2, %2, %2, %2, %2
ret void
}