#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*/ bug(char *);
int parse_comment_specif(char c) {
  switch (c) {
  case 'I':
  case 'i':
    return 0x40;
  case 'c':
    return 0;
  case 's':
    return (0x1 | 0x2);
  case 'q':
    return 0x1;
  case 'S':
    return (0x1 | 0x2) | 0x4;
  case 'Q':
    return 0x1 | 0x4;
  case 'C':
    return 0 | 0x4;
  default:
    bug("Invalid comment/string modifier");
    return 0;
  }
}


x86 assembly (clang, -O0):
<parse_comment_specif>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
add    $0xffffffbd,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x30,%eax
ja     119c <parse_comment_specif+0x8c>
mov    -0x10(%rbp),%rax
lea    0xec1(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x40,-0x4(%rbp)
jmp    11af <parse_comment_specif+0x9f>
movl   $0x0,-0x4(%rbp)
jmp    11af <parse_comment_specif+0x9f>
movl   $0x3,-0x4(%rbp)
jmp    11af <parse_comment_specif+0x9f>
movl   $0x1,-0x4(%rbp)
jmp    11af <parse_comment_specif+0x9f>
movl   $0x7,-0x4(%rbp)
jmp    11af <parse_comment_specif+0x9f>
movl   $0x5,-0x4(%rbp)
jmp    11af <parse_comment_specif+0x9f>
movl   $0x4,-0x4(%rbp)
jmp    11af <parse_comment_specif+0x9f>
lea    0xf21(%rip),%rdi
call   1030 <bug@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parse_comment_specif>:
push   %rax
add    $0xffffffbd,%edi
cmp    $0x30,%edi
ja     1137 <parse_comment_specif+0x27>
mov    $0x40,%eax
lea    0xedb(%rip),%rcx
movslq (%rcx,%rdi,4),%rdx
add    %rcx,%rdx
jmp    *%rdx
pop    %rcx
ret
mov    $0x4,%eax
pop    %rcx
ret
lea    0xf86(%rip),%rdi
call   1030 <bug@plt>
xor    %eax,%eax
pop    %rcx
ret
mov    $0x5,%eax
pop    %rcx
ret
mov    $0x7,%eax
pop    %rcx
ret
mov    $0x1,%eax
pop    %rcx
ret
mov    $0x3,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [32 x i8] c"Invalid comment/string modifier\00"
define i32 @parse_comment_specif(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
switch i32 %5, label %13 [
i32 73, label %6
i32 105, label %6
i32 99, label %7
i32 115, label %8
i32 113, label %9
i32 83, label %10
i32 81, label %11
i32 67, label %12
]
6: ; preds = %1, %1
store i32 64, i32* %2
br label %15
7: ; preds = %1
store i32 0, i32* %2
br label %15
8: ; preds = %1
store i32 3, i32* %2
br label %15
9: ; preds = %1
store i32 1, i32* %2
br label %15
10: ; preds = %1
store i32 7, i32* %2
br label %15
11: ; preds = %1
store i32 5, i32* %2
br label %15
12: ; preds = %1
store i32 4, i32* %2
br label %15
13: ; preds = %1
%14 = call i32 @bug(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %2
br label %15
15: ; preds = %13, %12, %11, %10, %9, %8, %7, %6
%16 = load i32, i32* %2
ret i32 %16
}

LLVM IR (-O2):
@.str = [32 x i8] c"Invalid comment/string modifier\00"
define i32 @parse_comment_specif(i8 signext %0) {
%2 = sext i8 %0 to i32
switch i32 %2, label %9 [
i32 73, label %11
i32 105, label %11
i32 99, label %3
i32 115, label %4
i32 113, label %5
i32 83, label %6
i32 81, label %7
i32 67, label %8
]
3: ; preds = %1
br label %11
4: ; preds = %1
br label %11
5: ; preds = %1
br label %11
6: ; preds = %1
br label %11
7: ; preds = %1
br label %11
8: ; preds = %1
br label %11
9: ; preds = %1
%10 = tail call i32 @bug(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
br label %11
11: ; preds = %1, %1, %9, %8, %7, %6, %5, %4, %3
%12 = phi i32 [ 0, %9 ], [ 4, %8 ], [ 5, %7 ], [ 7, %6 ], [ 1, %5 ], [ 3, %4 ], [ 0, %3 ], [ 64, %1 ], [ 64, %1 ]
ret i32 %12
}