#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 /*<<< orphan*/ strcmp(char *, char *);
int in_wd_list(char *cur_word, char dict[5100][100], int k) {
  int i;
  for (i = 0; i < k; i++)
    if (!strcmp(cur_word, dict[i]))
      return 1;
  return 0;
}


x86 assembly (clang, -O0):
<in_wd_list>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    1176 <in_wd_list+0x66>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
movslq -0x20(%rbp),%rax
imul   $0x64,%rax,%rax
add    %rax,%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    1163 <in_wd_list+0x53>
movl   $0x1,-0x4(%rbp)
jmp    117d <in_wd_list+0x6d>
jmp    1168 <in_wd_list+0x58>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    112a <in_wd_list+0x1a>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<in_wd_list>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
xor    %r14d,%r14d
test   %edx,%edx
jle    1151 <in_wd_list+0x41>
mov    %rsi,%rbx
mov    %rdi,%r15
mov    %edx,%ebp
cs nopw 0x0(%rax,%rax,1)
mov    %r15,%rdi
mov    %rbx,%rsi
call   1030 <strcmp@plt>
test   %eax,%eax
je     114b <in_wd_list+0x3b>
add    $0x64,%rbx
add    $0xffffffffffffffff,%rbp
jne    1130 <in_wd_list+0x20>
jmp    1151 <in_wd_list+0x41>
mov    $0x1,%r14d
mov    %r14d,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @in_wd_list(i8* %0, [100 x i8]* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca [100 x i8]*
%7 = alloca i32
%8 = alloca i32
store i8* %0, i8** %5
store [100 x i8]* %1, [100 x i8]** %6
store i32 %2, i32* %7
store i32 0, i32* %8
br label %9
9: ; preds = %24, %3
%10 = load i32, i32* %8
%11 = load i32, i32* %7
%12 = icmp slt i32 %10, %11
br i1 %12, label %13, label %27
13: ; preds = %9
%14 = load i8*, i8** %5
%15 = load [100 x i8]*, [100 x i8]** %6
%16 = load i32, i32* %8
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds [100 x i8], [100 x i8]* %15, i64 %17
%19 = getelementptr inbounds [100 x i8], [100 x i8]* %18, i64 0, i64 0
%20 = call i32 @strcmp(i8* %14, i8* %19)
%21 = icmp ne i32 %20, 0
br i1 %21, label %23, label %22
22: ; preds = %13
store i32 1, i32* %4
br label %28
23: ; preds = %13
br label %24
24: ; preds = %23
%25 = load i32, i32* %8
%26 = add nsw i32 %25, 1
store i32 %26, i32* %8
br label %9
27: ; preds = %9
store i32 0, i32* %4
br label %28
28: ; preds = %27, %22
%29 = load i32, i32* %4
ret i32 %29
}

LLVM IR (-O2):
define i32 @in_wd_list(i8* nocapture %0, [100 x i8]* nocapture %1, i32 %2) {
%4 = icmp sgt i32 %2, 0
br i1 %4, label %5, label %15
5: ; preds = %3
%6 = zext i32 %2 to i64
br label %9
7: ; preds = %9
%8 = icmp eq i64 %14, %6
br i1 %8, label %15, label %9
9: ; preds = %5, %7
%10 = phi i64 [ 0, %5 ], [ %14, %7 ]
%11 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 %10, i64 0
%12 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(1) %11)
%13 = icmp eq i32 %12, 0
%14 = add nuw nsw i64 %10, 1
br i1 %13, label %15, label %7
15: ; preds = %9, %7, %3
%16 = phi i32 [ 0, %3 ], [ 0, %7 ], [ 1, %9 ]
ret i32 %16
}