#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 */
typedef int /*<<< orphan*/ stop_words;

/* Variables and functions */
scalar_t__ strncmp(char *, char *, int);
int is_stop_word(char *word) {
  char *stop_words[] = {"the", "and", "a"};
  int stop_words_len = sizeof(stop_words) / sizeof(char *);
  int i;
  for (i = 0; i < stop_words_len; i++) {
    if (strncmp(stop_words[i], word, 100) == 0) {
      return 1;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<is_stop_word>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x10(%rbp)
mov    0x2cdd(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0x2cda(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0x2cd7(%rip),%rax
mov    %rax,-0x20(%rbp)
movl   $0x3,-0x34(%rbp)
movl   $0x0,-0x38(%rbp)
mov    -0x38(%rbp),%eax
cmp    -0x34(%rbp),%eax
jge    1197 <is_stop_word+0x87>
movslq -0x38(%rbp),%rax
mov    -0x30(%rbp,%rax,8),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x64,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    1184 <is_stop_word+0x74>
movl   $0x1,-0x4(%rbp)
jmp    119e <is_stop_word+0x8e>
jmp    1189 <is_stop_word+0x79>
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    114b <is_stop_word+0x3b>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_stop_word>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
lea    0xee3(%rip),%rdi
mov    %rbx,%rsi
mov    $0x64,%edx
call   1030 <strncmp@plt>
mov    $0x1,%ebp
test   %rax,%rax
je     116a <is_stop_word+0x5a>
lea    0xec9(%rip),%rdi
mov    %rbx,%rsi
mov    $0x64,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     116a <is_stop_word+0x5a>
lea    0xeb4(%rip),%rdi
mov    %rbx,%rsi
mov    $0x64,%edx
call   1030 <strncmp@plt>
xor    %ebp,%ebp
test   %rax,%rax
sete   %bpl
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [4 x i8] c"the\00"
@.str.1 = [4 x i8] c"and\00"
@.str.2 = [2 x i8] c"a\00"
@__const.is_stop_word.stop_words = [3 x i8*] [i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i32 0, i32 0)]
define i32 @is_stop_word(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca [3 x i8*]
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %3
%7 = bitcast [3 x i8*]* %4 to i8*
store i32 3, i32* %5
store i32 0, i32* %6
br label %8
8: ; preds = %22, %1
%9 = load i32, i32* %6
%10 = load i32, i32* %5
%11 = icmp slt i32 %9, %10
br i1 %11, label %12, label %25
12: ; preds = %8
%13 = load i32, i32* %6
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds [3 x i8*], [3 x i8*]* %4, i64 0, i64 %14
%16 = load i8*, i8** %15
%17 = load i8*, i8** %3
%18 = call i64 @strncmp(i8* %16, i8* %17, i32 100)
%19 = icmp eq i64 %18, 0
br i1 %19, label %20, label %21
20: ; preds = %12
store i32 1, i32* %2
br label %26
21: ; preds = %12
br label %22
22: ; preds = %21
%23 = load i32, i32* %6
%24 = add nsw i32 %23, 1
store i32 %24, i32* %6
br label %8
25: ; preds = %8
store i32 0, i32* %2
br label %26
26: ; preds = %25, %20
%27 = load i32, i32* %2
ret i32 %27
}

LLVM IR (-O2):
@.str = [4 x i8] c"the\00"
@.str.1 = [4 x i8] c"and\00"
@.str.2 = [2 x i8] c"a\00"
define i32 @is_stop_word(i8* %0) {
%2 = tail call i64 @strncmp(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0, i32 100)
%3 = icmp eq i64 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1
%5 = tail call i64 @strncmp(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %0, i32 100)
%6 = icmp eq i64 %5, 0
br i1 %6, label %11, label %7
7: ; preds = %4
%8 = tail call i64 @strncmp(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), i8* %0, i32 100)
%9 = icmp eq i64 %8, 0
%10 = zext i1 %9 to i32
br label %11
11: ; preds = %7, %4, %1
%12 = phi i32 [ 1, %1 ], [ 1, %4 ], [ %10, %7 ]
ret i32 %12
}