#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') {
    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     119c <write_is_info+0x7c>
movsbl -0xd(%rbp),%eax
cmp    $0x57,%eax
je     119c <write_is_info+0x7c>
movsbl -0xd(%rbp),%eax
cmp    $0x41,%eax
je     119c <write_is_info+0x7c>
movsbl -0xd(%rbp),%eax
cmp    $0x42,%eax
je     119c <write_is_info+0x7c>
movsbl -0xd(%rbp),%eax
cmp    $0x43,%eax
je     119c <write_is_info+0x7c>
movsbl -0xd(%rbp),%eax
cmp    $0x44,%eax
je     119c <write_is_info+0x7c>
lea    0xe77(%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    $0x4,%al
jb     1131 <write_is_info+0x11>
cmp    $0x53,%dl
je     1131 <write_is_info+0x11>
cmp    $0x57,%dl
jne    1132 <write_is_info+0x12>
ret
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 %34
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 %34
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 %34
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 %34
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 %34
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 %34
30: ; preds = %26
%31 = load i8, i8* %6
%32 = call i32 @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0), i8 signext %31)
%33 = call i32 @exit(i32 1)
unreachable
34: ; preds = %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 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
ret void
}