#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 has_suffix(char const *, char *, char *, char *, char *, char *, char *,
               char *, char *, char *);
int has_prog_suffix(const char *s) {
  return (has_suffix(s, ".c", ".h", ".s", ".cc", ".C", ".H", ".S", ".CC",
                     (char *)NULL));
}


x86 assembly (clang, -O0):
<has_prog_suffix>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
sub    $0x28,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xed8(%rip),%rsi
lea    0xed4(%rip),%rdx
lea    0xed0(%rip),%rcx
lea    0xecc(%rip),%r8
lea    0xec9(%rip),%r9
lea    0xec5(%rip),%r11
lea    0xec1(%rip),%r10
lea    0xebd(%rip),%rax
xor    %ebx,%ebx
mov    %r11,(%rsp)
mov    %r10,0x8(%rsp)
mov    %rax,0x10(%rsp)
movq   $0x0,0x18(%rsp)
call   1030 <has_suffix@plt>
add    $0x28,%rsp
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<has_prog_suffix>:
push   %rax
lea    0xefe(%rip),%rax
lea    0xef4(%rip),%r10
lea    0xeea(%rip),%r11
lea    0xed3(%rip),%rsi
lea    0xecf(%rip),%rdx
lea    0xecb(%rip),%rcx
lea    0xec7(%rip),%r8
lea    0xec4(%rip),%r9
push   $0x0
push   %rax
push   %r10
push   %r11
call   1030 <has_suffix@plt>
add    $0x20,%rsp
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c".c\00"
@.str.1 = [3 x i8] c".h\00"
@.str.2 = [3 x i8] c".s\00"
@.str.3 = [4 x i8] c".cc\00"
@.str.4 = [3 x i8] c".C\00"
@.str.5 = [3 x i8] c".H\00"
@.str.6 = [3 x i8] c".S\00"
@.str.7 = [4 x i8] c".CC\00"
define i32 @has_prog_suffix(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @has_suffix(i8* %3, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i8* null)
ret i32 %4
}

LLVM IR (-O2):
@.str = [3 x i8] c".c\00"
@.str.1 = [3 x i8] c".h\00"
@.str.2 = [3 x i8] c".s\00"
@.str.3 = [4 x i8] c".cc\00"
@.str.4 = [3 x i8] c".C\00"
@.str.5 = [3 x i8] c".H\00"
@.str.6 = [3 x i8] c".S\00"
@.str.7 = [4 x i8] c".CC\00"
define i32 @has_prog_suffix(i8* %0) {
%2 = tail call i32 @has_suffix(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i8* null)
ret i32 %2
}