#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, int nprocs, char class) {
  if (class != 'S' && class != 'W' && class != 'A' && class != 'B' &&
      class != 'C' && class != 'D' && class != 'E') {
    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    %dl,%al
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %al,-0xd(%rbp)
movsbl -0xd(%rbp),%eax
cmp    $0x53,%eax
je     11a9 <write_is_info+0x89>
movsbl -0xd(%rbp),%eax
cmp    $0x57,%eax
je     11a9 <write_is_info+0x89>
movsbl -0xd(%rbp),%eax
cmp    $0x41,%eax
je     11a9 <write_is_info+0x89>
movsbl -0xd(%rbp),%eax
cmp    $0x42,%eax
je     11a9 <write_is_info+0x89>
movsbl -0xd(%rbp),%eax
cmp    $0x43,%eax
je     11a9 <write_is_info+0x89>
movsbl -0xd(%rbp),%eax
cmp    $0x44,%eax
je     11a9 <write_is_info+0x89>
movsbl -0xd(%rbp),%eax
cmp    $0x45,%eax
je     11a9 <write_is_info+0x89>
lea    0xe6a(%rip),%rdi
movsbl -0xd(%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(%rdx),%eax
cmp    $0x5,%al
jae    1128 <write_is_info+0x8>
ret
cmp    $0x53,%dl
je     1127 <write_is_info+0x7>
cmp    $0x57,%dl
je     1127 <write_is_info+0x7>
push   %rax
movsbl %dl,%esi
lea    0xec3(%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, i32 %1, i8 signext %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i8
store i32* %0, i32** %4
store i32 %1, i32* %5
store i8 %2, i8* %6
%7 = load i8, i8* %6
%8 = sext i8 %7 to i32
%9 = icmp ne i32 %8, 83
br i1 %9, label %10, label %38
10: ; preds = %3
%11 = load i8, i8* %6
%12 = sext i8 %11 to i32
%13 = icmp ne i32 %12, 87
br i1 %13, label %14, label %38
14: ; preds = %10
%15 = load i8, i8* %6
%16 = sext i8 %15 to i32
%17 = icmp ne i32 %16, 65
br i1 %17, label %18, label %38
18: ; preds = %14
%19 = load i8, i8* %6
%20 = sext i8 %19 to i32
%21 = icmp ne i32 %20, 66
br i1 %21, label %22, label %38
22: ; preds = %18
%23 = load i8, i8* %6
%24 = sext i8 %23 to i32
%25 = icmp ne i32 %24, 67
br i1 %25, label %26, label %38
26: ; preds = %22
%27 = load i8, i8* %6
%28 = sext i8 %27 to i32
%29 = icmp ne i32 %28, 68
br i1 %29, label %30, label %38
30: ; preds = %26
%31 = load i8, i8* %6
%32 = sext i8 %31 to i32
%33 = icmp ne i32 %32, 69
br i1 %33, label %34, label %38
34: ; preds = %30
%35 = load i8, i8* %6
%36 = call i32 @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0), i8 signext %35)
%37 = call i32 @exit(i32 1)
unreachable
38: ; preds = %30, %26, %22, %18, %14, %10, %3
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, i32 %1, i8 signext %2) {
switch i8 %2, label %4 [
i8 87, label %7
i8 83, label %7
i8 69, label %7
i8 68, label %7
i8 67, label %7
i8 66, label %7
i8 65, label %7
]
4: ; preds = %3
%5 = tail call i32 @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0), i8 signext %2)
%6 = tail call i32 @exit(i32 1)
unreachable
7: ; preds = %3, %3, %3, %3, %3, %3, %3
ret void
}