int main(int argc, char *argv[]) {
  char wordpuzzle[][4] = {"this", "wath", "oahg", "fgdt"};
  char *pword = "ha";
  int totalcol, totalrow, direct;
  totalrow = 4;
  totalcol = 4;
  direct = 1;
  if (findwordinpuzzle(wordpuzzle, pword, totalrow, totalcol, direct) != 1) {
    printf("Not Found!\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0xec3(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xec0(%rip),%rax
mov    %rax,-0x18(%rbp)
lea    0xebd(%rip),%rax
mov    %rax,-0x28(%rbp)
movl   $0x4,-0x30(%rbp)
movl   $0x4,-0x2c(%rbp)
movl   $0x1,-0x34(%rbp)
lea    -0x20(%rbp),%rdi
mov    -0x28(%rbp),%rsi
mov    -0x30(%rbp),%edx
mov    -0x2c(%rbp),%ecx
mov    -0x34(%rbp),%r8d
mov    $0x0,%al
call   1040 <findwordinpuzzle@plt>
cmp    $0x1,%eax
je     119c <main+0x7c>
lea    0xe7e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
movaps 0xed5(%rip),%xmm0
movaps %xmm0,(%rsp)
lea    0xeda(%rip),%rsi
mov    %rsp,%rdi
mov    $0x4,%edx
mov    $0x4,%ecx
mov    $0x1,%r8d
xor    %eax,%eax
call   1040 <findwordinpuzzle@plt>
cmp    $0x1,%eax
je     1161 <main+0x41>
lea    0xeb7(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@__const.main.wordpuzzle = [4 x [4 x i8]] [[4 x i8] c"this", [4 x i8] c"wath", [4 x i8] c"oahg", [4 x i8] c"fgdt"]
@.str = [3 x i8] c"ha\00"
@.str.1 = [12 x i8] c"Not Found!\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [4 x [4 x i8]]
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%11 = bitcast [4 x [4 x i8]]* %6 to i8*
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8** %7
store i32 4, i32* %9
store i32 4, i32* %8
store i32 1, i32* %10
%12 = getelementptr inbounds [4 x [4 x i8]], [4 x [4 x i8]]* %6, i64 0, i64 0
%13 = load i8*, i8** %7
%14 = load i32, i32* %9
%15 = load i32, i32* %8
%16 = load i32, i32* %10
%17 = call i32 ([4 x i8]*, i8*, i32, i32, i32, ...) bitcast (i32 (...)* @findwordinpuzzle to i32 ([4 x i8]*, i8*, i32, i32, i32, ...)*)([4 x i8]* %12, i8* %13, i32 %14, i32 %15, i32 %16)
%18 = icmp ne i32 %17, 1
br i1 %18, label %19, label %21
19: ; preds = %2
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
br label %21
21: ; preds = %19, %2
ret i32 0
}

LLVM IR (-O2):
@__const.main.wordpuzzle = [4 x [4 x i8]] [[4 x i8] c"this", [4 x i8] c"wath", [4 x i8] c"oahg", [4 x i8] c"fgdt"]
@.str = [3 x i8] c"ha\00"
@str = [11 x i8] c"Not Found!\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [4 x [4 x i8]]
%4 = getelementptr inbounds [4 x [4 x i8]], [4 x [4 x i8]]* %3, i64 0, i64 0, i64 0
%5 = getelementptr inbounds [4 x [4 x i8]], [4 x [4 x i8]]* %3, i64 0, i64 0
%6 = call i32 ([4 x i8]*, i8*, i32, i32, i32, ...) bitcast (i32 (...)* @findwordinpuzzle to i32 ([4 x i8]*, i8*, i32, i32, i32, ...)*)([4 x i8]* %5, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 4, i32 4, i32 1)
%7 = icmp eq i32 %6, 1
br i1 %7, label %10, label %8
8: ; preds = %2
%9 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str, i64 0, i64 0))
br label %10
10: ; preds = %8, %2
ret i32 0
}