#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 */
char *file_extension(char *);
int /*<<< orphan*/ strcmp(char *, char *);
int class_source(char *p) {
  char *ext = file_extension(p);
  return (!strcmp(ext, "d") || !strcmp(ext, "D") || !strcmp(ext, "dd") ||
          !strcmp(ext, "DD") || !strcmp(ext, "n") || !strcmp(ext, "N") ||
          !strcmp(ext, "nn") || !strcmp(ext, "NN") || !strcmp(ext, "i") ||
          !strcmp(ext, "ii") || !strcmp(ext, "I") || !strcmp(ext, "II"));
}


x86 assembly (clang, -O0):
<class_source>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <file_extension@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xebd(%rip),%rsi
call   1030 <strcmp@plt>
mov    %eax,%ecx
mov    $0x1,%al
cmp    $0x0,%ecx
mov    %al,-0x11(%rbp)
je     12b4 <class_source+0x194>
mov    -0x10(%rbp),%rdi
lea    0xea0(%rip),%rsi
call   1030 <strcmp@plt>
mov    %eax,%ecx
mov    $0x1,%al
cmp    $0x0,%ecx
mov    %al,-0x11(%rbp)
je     12b4 <class_source+0x194>
mov    -0x10(%rbp),%rdi
lea    0xe7c(%rip),%rsi
call   1030 <strcmp@plt>
mov    %eax,%ecx
mov    $0x1,%al
cmp    $0x0,%ecx
mov    %al,-0x11(%rbp)
je     12b4 <class_source+0x194>
mov    -0x10(%rbp),%rdi
lea    0xe5f(%rip),%rsi
call   1030 <strcmp@plt>
mov    %eax,%ecx
mov    $0x1,%al
cmp    $0x0,%ecx
mov    %al,-0x11(%rbp)
je     12b4 <class_source+0x194>
mov    -0x10(%rbp),%rdi
lea    0xe43(%rip),%rsi
call   1030 <strcmp@plt>
mov    %eax,%ecx
mov    $0x1,%al
cmp    $0x0,%ecx
mov    %al,-0x11(%rbp)
je     12b4 <class_source+0x194>
mov    -0x10(%rbp),%rdi
lea    0xe26(%rip),%rsi
call   1030 <strcmp@plt>
mov    %eax,%ecx
mov    $0x1,%al
cmp    $0x0,%ecx
mov    %al,-0x11(%rbp)
je     12b4 <class_source+0x194>
mov    -0x10(%rbp),%rdi
lea    0xe02(%rip),%rsi
call   1030 <strcmp@plt>
mov    %eax,%ecx
mov    $0x1,%al
cmp    $0x0,%ecx
mov    %al,-0x11(%rbp)
je     12b4 <class_source+0x194>
mov    -0x10(%rbp),%rdi
lea    0xde5(%rip),%rsi
call   1030 <strcmp@plt>
mov    %eax,%ecx
mov    $0x1,%al
cmp    $0x0,%ecx
mov    %al,-0x11(%rbp)
je     12b4 <class_source+0x194>
mov    -0x10(%rbp),%rdi
lea    0xdc9(%rip),%rsi
call   1030 <strcmp@plt>
mov    %eax,%ecx
mov    $0x1,%al
cmp    $0x0,%ecx
mov    %al,-0x11(%rbp)
je     12b4 <class_source+0x194>
mov    -0x10(%rbp),%rdi
lea    0xda8(%rip),%rsi
call   1030 <strcmp@plt>
mov    %eax,%ecx
mov    $0x1,%al
cmp    $0x0,%ecx
mov    %al,-0x11(%rbp)
je     12b4 <class_source+0x194>
mov    -0x10(%rbp),%rdi
lea    0xd8c(%rip),%rsi
call   1030 <strcmp@plt>
mov    %eax,%ecx
mov    $0x1,%al
cmp    $0x0,%ecx
mov    %al,-0x11(%rbp)
je     12b4 <class_source+0x194>
mov    -0x10(%rbp),%rdi
lea    0xd6b(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<class_source>:
push   %rbp
push   %rbx
push   %rax
call   1040 <file_extension@plt>
mov    %rax,%rbx
lea    0xecf(%rip),%rsi
mov    %rax,%rdi
call   1030 <strcmp@plt>
mov    $0x1,%ebp
test   %eax,%eax
je     122c <class_source+0x10c>
lea    0xeb6(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %eax,%eax
je     122c <class_source+0x10c>
lea    0xe9b(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %eax,%eax
je     122c <class_source+0x10c>
lea    0xe87(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %eax,%eax
je     122c <class_source+0x10c>
lea    0xe74(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %eax,%eax
je     122c <class_source+0x10c>
lea    0xe60(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %eax,%eax
je     122c <class_source+0x10c>
lea    0xe49(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %eax,%eax
je     122c <class_source+0x10c>
lea    0xe39(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %eax,%eax
je     122c <class_source+0x10c>
lea    0xe2a(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %eax,%eax
je     122c <class_source+0x10c>
lea    0xe16(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %eax,%eax
je     122c <class_source+0x10c>
lea    0xe07(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %eax,%eax
je     122c <class_source+0x10c>
lea    0xdf3(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
xor    %ebp,%ebp
test   %eax,%eax
sete   %bpl
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [2 x i8] c"d\00"
@.str.1 = [2 x i8] c"D\00"
@.str.2 = [3 x i8] c"dd\00"
@.str.3 = [3 x i8] c"DD\00"
@.str.4 = [2 x i8] c"n\00"
@.str.5 = [2 x i8] c"N\00"
@.str.6 = [3 x i8] c"nn\00"
@.str.7 = [3 x i8] c"NN\00"
@.str.8 = [2 x i8] c"i\00"
@.str.9 = [3 x i8] c"ii\00"
@.str.10 = [2 x i8] c"I\00"
@.str.11 = [3 x i8] c"II\00"
define i32 @class_source(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @file_extension(i8* %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = call i32 @strcmp(i8* %6, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %54
9: ; preds = %1
%10 = load i8*, i8** %3
%11 = call i32 @strcmp(i8* %10, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%12 = icmp ne i32 %11, 0
br i1 %12, label %13, label %54
13: ; preds = %9
%14 = load i8*, i8** %3
%15 = call i32 @strcmp(i8* %14, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%16 = icmp ne i32 %15, 0
br i1 %16, label %17, label %54
17: ; preds = %13
%18 = load i8*, i8** %3
%19 = call i32 @strcmp(i8* %18, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%20 = icmp ne i32 %19, 0
br i1 %20, label %21, label %54
21: ; preds = %17
%22 = load i8*, i8** %3
%23 = call i32 @strcmp(i8* %22, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%24 = icmp ne i32 %23, 0
br i1 %24, label %25, label %54
25: ; preds = %21
%26 = load i8*, i8** %3
%27 = call i32 @strcmp(i8* %26, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
%28 = icmp ne i32 %27, 0
br i1 %28, label %29, label %54
29: ; preds = %25
%30 = load i8*, i8** %3
%31 = call i32 @strcmp(i8* %30, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0))
%32 = icmp ne i32 %31, 0
br i1 %32, label %33, label %54
33: ; preds = %29
%34 = load i8*, i8** %3
%35 = call i32 @strcmp(i8* %34, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0))
%36 = icmp ne i32 %35, 0
br i1 %36, label %37, label %54
37: ; preds = %33
%38 = load i8*, i8** %3
%39 = call i32 @strcmp(i8* %38, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
%40 = icmp ne i32 %39, 0
br i1 %40, label %41, label %54
41: ; preds = %37
%42 = load i8*, i8** %3
%43 = call i32 @strcmp(i8* %42, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0))
%44 = icmp ne i32 %43, 0
br i1 %44, label %45, label %54
45: ; preds = %41
%46 = load i8*, i8** %3
%47 = call i32 @strcmp(i8* %46, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.10, i64 0, i64 0))
%48 = icmp ne i32 %47, 0
br i1 %48, label %49, label %54
49: ; preds = %45
%50 = load i8*, i8** %3
%51 = call i32 @strcmp(i8* %50, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.11, i64 0, i64 0))
%52 = icmp ne i32 %51, 0
%53 = xor i1 %52, true
br label %54
54: ; preds = %49, %45, %41, %37, %33, %29, %25, %21, %17, %13, %9, %1
%55 = phi i1 [ true, %45 ], [ true, %41 ], [ true, %37 ], [ true, %33 ], [ true, %29 ], [ true, %25 ], [ true, %21 ], [ true, %17 ], [ true, %13 ], [ true, %9 ], [ true, %1 ], [ %53, %49 ]
%56 = zext i1 %55 to i32
ret i32 %56
}

LLVM IR (-O2):
@.str = [2 x i8] c"d\00"
@.str.1 = [2 x i8] c"D\00"
@.str.2 = [3 x i8] c"dd\00"
@.str.3 = [3 x i8] c"DD\00"
@.str.4 = [2 x i8] c"n\00"
@.str.5 = [2 x i8] c"N\00"
@.str.6 = [3 x i8] c"nn\00"
@.str.7 = [3 x i8] c"NN\00"
@.str.8 = [2 x i8] c"i\00"
@.str.9 = [3 x i8] c"ii\00"
@.str.10 = [2 x i8] c"I\00"
@.str.11 = [3 x i8] c"II\00"
define i32 @class_source(i8* %0) {
%2 = tail call i8* @file_extension(i8* %0)
%3 = tail call i32 @strcmp(i8* dereferenceable(1) %2, i8* dereferenceable(2) getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%4 = icmp eq i32 %3, 0
br i1 %4, label %39, label %5
5: ; preds = %1
%6 = tail call i32 @strcmp(i8* dereferenceable(1) %2, i8* dereferenceable(2) getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%7 = icmp eq i32 %6, 0
br i1 %7, label %39, label %8
8: ; preds = %5
%9 = tail call i32 @strcmp(i8* dereferenceable(1) %2, i8* dereferenceable(3) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%10 = icmp eq i32 %9, 0
br i1 %10, label %39, label %11
11: ; preds = %8
%12 = tail call i32 @strcmp(i8* dereferenceable(1) %2, i8* dereferenceable(3) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%13 = icmp eq i32 %12, 0
br i1 %13, label %39, label %14
14: ; preds = %11
%15 = tail call i32 @strcmp(i8* dereferenceable(1) %2, i8* dereferenceable(2) getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%16 = icmp eq i32 %15, 0
br i1 %16, label %39, label %17
17: ; preds = %14
%18 = tail call i32 @strcmp(i8* dereferenceable(1) %2, i8* dereferenceable(2) getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
%19 = icmp eq i32 %18, 0
br i1 %19, label %39, label %20
20: ; preds = %17
%21 = tail call i32 @strcmp(i8* dereferenceable(1) %2, i8* dereferenceable(3) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0))
%22 = icmp eq i32 %21, 0
br i1 %22, label %39, label %23
23: ; preds = %20
%24 = tail call i32 @strcmp(i8* dereferenceable(1) %2, i8* dereferenceable(3) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0))
%25 = icmp eq i32 %24, 0
br i1 %25, label %39, label %26
26: ; preds = %23
%27 = tail call i32 @strcmp(i8* dereferenceable(1) %2, i8* dereferenceable(2) getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
%28 = icmp eq i32 %27, 0
br i1 %28, label %39, label %29
29: ; preds = %26
%30 = tail call i32 @strcmp(i8* dereferenceable(1) %2, i8* dereferenceable(3) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0))
%31 = icmp eq i32 %30, 0
br i1 %31, label %39, label %32
32: ; preds = %29
%33 = tail call i32 @strcmp(i8* dereferenceable(1) %2, i8* dereferenceable(2) getelementptr inbounds ([2 x i8], [2 x i8]* @.str.10, i64 0, i64 0))
%34 = icmp eq i32 %33, 0
br i1 %34, label %39, label %35
35: ; preds = %32
%36 = tail call i32 @strcmp(i8* dereferenceable(1) %2, i8* dereferenceable(3) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.11, i64 0, i64 0))
%37 = icmp eq i32 %36, 0
%38 = zext i1 %37 to i32
br label %39
39: ; preds = %35, %32, %29, %26, %23, %20, %17, %14, %11, %8, %5, %1
%40 = phi i32 [ 1, %32 ], [ 1, %29 ], [ 1, %26 ], [ 1, %23 ], [ 1, %20 ], [ 1, %17 ], [ 1, %14 ], [ 1, %11 ], [ 1, %8 ], [ 1, %5 ], [ 1, %1 ], [ %38, %35 ]
ret i32 %40
}