#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, ".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    1186 <is_ignored_file+0x76>
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    1186 <is_ignored_file+0x76>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
lea    0xec4(%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,%r14d
mov    %rdi,%rbx
lea    0xedf(%rip),%rdx
call   1030 <str_ends_with@plt>
mov    $0x1,%ebp
test   %rax,%rax
jne    1162 <is_ignored_file+0x52>
lea    0xee6(%rip),%rdx
mov    %rbx,%rdi
mov    %r14d,%esi
call   1030 <str_ends_with@plt>
test   %rax,%rax
jne    1162 <is_ignored_file+0x52>
lea    0xeed(%rip),%rdx
mov    %rbx,%rdi
mov    %r14d,%esi
call   1030 <str_ends_with@plt>
xor    %ebp,%ebp
test   %rax,%rax
setne  %bpl
mov    %ebp,%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 = [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 %19, 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 %19, 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 ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%18 = icmp ne i64 %17, 0
br label %19
19: ; preds = %14, %9, %2
%20 = phi i1 [ true, %9 ], [ true, %2 ], [ %18, %14 ]
%21 = zext i1 %20 to i32
ret i32 %21
}

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 = [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 %12
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 %12
8: ; preds = %5
%9 = tail call i64 @str_ends_with(i8* %0, i32 %1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%10 = icmp ne i64 %9, 0
%11 = zext i1 %10 to i32
br label %12
12: ; preds = %8, %5, %2
%13 = phi i32 [ 1, %5 ], [ 1, %2 ], [ %11, %8 ]
ret i32 %13
}