#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 */
scalar_t__ str_ends_with(char const *, int, char *);
int is_ignored_file(const char *s, int len) {
  return str_ends_with(s, len, "include/generated/autoconf.h") ||
         str_ends_with(s, len, "include/generated/autoksyms.h") ||
         str_ends_with(s, len, "arch/um/include/uml-config.h") ||
         str_ends_with(s, len, "include/linux/kconfig.h") ||
         str_ends_with(s, len, ".ver");
}


x86 assembly (clang, -O0):
<is_ignored_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
lea    0xed3(%rip),%rdx
call   1030 <str_ends_with@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0xd(%rbp)
jne    11d0 <is_ignored_file+0xc0>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
lea    0xecb(%rip),%rdx
call   1030 <str_ends_with@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0xd(%rbp)
jne    11d0 <is_ignored_file+0xc0>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
lea    0xec4(%rip),%rdx
call   1030 <str_ends_with@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0xd(%rbp)
jne    11d0 <is_ignored_file+0xc0>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
lea    0xebc(%rip),%rdx
call   1030 <str_ends_with@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0xd(%rbp)
jne    11d0 <is_ignored_file+0xc0>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
lea    0xeaf(%rip),%rdx
call   1030 <str_ends_with@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_ignored_file>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%ebp
mov    %rdi,%rbx
lea    0xee0(%rip),%rdx
call   1030 <str_ends_with@plt>
mov    $0x1,%r14d
test   %rax,%rax
jne    118d <is_ignored_file+0x7d>
lea    0xee6(%rip),%rdx
mov    %rbx,%rdi
mov    %ebp,%esi
call   1030 <str_ends_with@plt>
test   %rax,%rax
jne    118d <is_ignored_file+0x7d>
lea    0xeee(%rip),%rdx
mov    %rbx,%rdi
mov    %ebp,%esi
call   1030 <str_ends_with@plt>
test   %rax,%rax
jne    118d <is_ignored_file+0x7d>
lea    0xef5(%rip),%rdx
mov    %rbx,%rdi
mov    %ebp,%esi
call   1030 <str_ends_with@plt>
test   %rax,%rax
jne    118d <is_ignored_file+0x7d>
lea    0xef7(%rip),%rdx
mov    %rbx,%rdi
mov    %ebp,%esi
call   1030 <str_ends_with@plt>
xor    %r14d,%r14d
test   %rax,%rax
setne  %r14b
mov    %r14d,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [29 x i8] c"include/generated/autoconf.h\00"
@.str.1 = [30 x i8] c"include/generated/autoksyms.h\00"
@.str.2 = [29 x i8] c"arch/um/include/uml-config.h\00"
@.str.3 = [24 x i8] c"include/linux/kconfig.h\00"
@.str.4 = [5 x i8] c".ver\00"
define i32 @is_ignored_file(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* %4
%7 = call i64 @str_ends_with(i8* %5, i32 %6, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
%8 = icmp ne i64 %7, 0
br i1 %8, label %29, label %9
9: ; preds = %2
%10 = load i8*, i8** %3
%11 = load i32, i32* %4
%12 = call i64 @str_ends_with(i8* %10, i32 %11, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
%13 = icmp ne i64 %12, 0
br i1 %13, label %29, label %14
14: ; preds = %9
%15 = load i8*, i8** %3
%16 = load i32, i32* %4
%17 = call i64 @str_ends_with(i8* %15, i32 %16, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0))
%18 = icmp ne i64 %17, 0
br i1 %18, label %29, label %19
19: ; preds = %14
%20 = load i8*, i8** %3
%21 = load i32, i32* %4
%22 = call i64 @str_ends_with(i8* %20, i32 %21, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.3, i64 0, i64 0))
%23 = icmp ne i64 %22, 0
br i1 %23, label %29, label %24
24: ; preds = %19
%25 = load i8*, i8** %3
%26 = load i32, i32* %4
%27 = call i64 @str_ends_with(i8* %25, i32 %26, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
%28 = icmp ne i64 %27, 0
br label %29
29: ; preds = %24, %19, %14, %9, %2
%30 = phi i1 [ true, %19 ], [ true, %14 ], [ true, %9 ], [ true, %2 ], [ %28, %24 ]
%31 = zext i1 %30 to i32
ret i32 %31
}

LLVM IR (-O2):
@.str = [29 x i8] c"include/generated/autoconf.h\00"
@.str.1 = [30 x i8] c"include/generated/autoksyms.h\00"
@.str.2 = [29 x i8] c"arch/um/include/uml-config.h\00"
@.str.3 = [24 x i8] c"include/linux/kconfig.h\00"
@.str.4 = [5 x i8] c".ver\00"
define i32 @is_ignored_file(i8* %0, i32 %1) {
%3 = tail call i64 @str_ends_with(i8* %0, i32 %1, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %18
5: ; preds = %2
%6 = tail call i64 @str_ends_with(i8* %0, i32 %1, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %18
8: ; preds = %5
%9 = tail call i64 @str_ends_with(i8* %0, i32 %1, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0))
%10 = icmp eq i64 %9, 0
br i1 %10, label %11, label %18
11: ; preds = %8
%12 = tail call i64 @str_ends_with(i8* %0, i32 %1, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.3, i64 0, i64 0))
%13 = icmp eq i64 %12, 0
br i1 %13, label %14, label %18
14: ; preds = %11
%15 = tail call i64 @str_ends_with(i8* %0, i32 %1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
%16 = icmp ne i64 %15, 0
%17 = zext i1 %16 to i32
br label %18
18: ; preds = %14, %11, %8, %5, %2
%19 = phi i32 [ 1, %11 ], [ 1, %8 ], [ 1, %5 ], [ 1, %2 ], [ %17, %14 ]
ret i32 %19
}