#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) {
  int m1, m2, m3;
  if (class != 'S' && class != 'W' && class != 'A' && class != 'B' &&
      class != 'C') {
    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    $0x20,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
movsbl -0x9(%rbp),%eax
cmp    $0x53,%eax
je     118d <write_is_info+0x6d>
movsbl -0x9(%rbp),%eax
cmp    $0x57,%eax
je     118d <write_is_info+0x6d>
movsbl -0x9(%rbp),%eax
cmp    $0x41,%eax
je     118d <write_is_info+0x6d>
movsbl -0x9(%rbp),%eax
cmp    $0x42,%eax
je     118d <write_is_info+0x6d>
movsbl -0x9(%rbp),%eax
cmp    $0x43,%eax
je     118d <write_is_info+0x6d>
lea    0xe86(%rip),%rdi
movsbl -0x9(%rbp),%esi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_is_info>:
lea    -0x41(%rsi),%eax
cmp    $0x16,%al
ja     1136 <write_is_info+0x16>
movzbl %al,%eax
mov    $0x440007,%ecx
bt     %rax,%rcx
jae    1136 <write_is_info+0x16>
ret
push   %rax
movsbl %sil,%esi
lea    0xebe(%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
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32* %0, i32** %3
store i8 %1, i8* %4
%8 = load i8, i8* %4
%9 = sext i8 %8 to i32
%10 = icmp ne i32 %9, 83
br i1 %10, label %11, label %31
11: ; preds = %2
%12 = load i8, i8* %4
%13 = sext i8 %12 to i32
%14 = icmp ne i32 %13, 87
br i1 %14, label %15, label %31
15: ; preds = %11
%16 = load i8, i8* %4
%17 = sext i8 %16 to i32
%18 = icmp ne i32 %17, 65
br i1 %18, label %19, label %31
19: ; preds = %15
%20 = load i8, i8* %4
%21 = sext i8 %20 to i32
%22 = icmp ne i32 %21, 66
br i1 %22, label %23, label %31
23: ; preds = %19
%24 = load i8, i8* %4
%25 = sext i8 %24 to i32
%26 = icmp ne i32 %25, 67
br i1 %26, label %27, label %31
27: ; preds = %23
%28 = load i8, i8* %4
%29 = call i32 @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0), i8 signext %28)
%30 = call i32 @exit(i32 1)
unreachable
31: ; preds = %23, %19, %15, %11, %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 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
ret void
}