#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*/ system(char *);
int /*<<< orphan*/ wordExist(int, int, int, int, char *);
int main(void) {
  char word[34] = {'\0'};
  for (int i = 0; i < 4; i++) {
    for (int j = 0; j < 4; j++) {
      for (int d = 0; d < 8; d++) {
        for (int n = 1; n <= ((4) > (4) ? (4) : (4)); n++) {
          wordExist(i, j, d, n, word);
        }
      }
    }
  }
  system("pause");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x30(%rbp),%rdi
xor    %esi,%esi
mov    $0x22,%edx
call   1040 <memset@plt>
movl   $0x0,-0x34(%rbp)
cmpl   $0x4,-0x34(%rbp)
jge    11ef <main+0xbf>
movl   $0x0,-0x38(%rbp)
cmpl   $0x4,-0x38(%rbp)
jge    11dc <main+0xac>
movl   $0x0,-0x3c(%rbp)
cmpl   $0x8,-0x3c(%rbp)
jge    11c9 <main+0x99>
movl   $0x1,-0x40(%rbp)
cmpl   $0x4,-0x40(%rbp)
jg     11b6 <main+0x86>
mov    -0x34(%rbp),%edi
mov    -0x38(%rbp),%esi
mov    -0x3c(%rbp),%edx
mov    -0x40(%rbp),%ecx
lea    -0x30(%rbp),%r8
call   1050 <wordExist@plt>
mov    -0x40(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x40(%rbp)
jmp    1189 <main+0x59>
jmp    11bb <main+0x8b>
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    1178 <main+0x48>
jmp    11ce <main+0x9e>
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    1167 <main+0x37>
jmp    11e1 <main+0xb1>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1156 <main+0x26>
lea    0xe0a(%rip),%rdi
call   1030 <system@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
sub    $0x30,%rsp
xorps  %xmm0,%xmm0
movaps %xmm0,0x10(%rsp)
movaps %xmm0,(%rsp)
movw   $0x0,0x20(%rsp)
xor    %ebx,%ebx
mov    %rsp,%r14
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %ebx,%edi
xor    %esi,%esi
mov    %ebp,%edx
mov    $0x1,%ecx
mov    %r14,%r8
call   1040 <wordExist@plt>
mov    %ebx,%edi
xor    %esi,%esi
mov    %ebp,%edx
mov    $0x2,%ecx
mov    %r14,%r8
call   1040 <wordExist@plt>
mov    %ebx,%edi
xor    %esi,%esi
mov    %ebp,%edx
mov    $0x3,%ecx
mov    %r14,%r8
call   1040 <wordExist@plt>
mov    %ebx,%edi
xor    %esi,%esi
mov    %ebp,%edx
mov    $0x4,%ecx
mov    %r14,%r8
call   1040 <wordExist@plt>
add    $0x1,%ebp
cmp    $0x8,%ebp
jne    1150 <main+0x30>
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
mov    %ebx,%edi
mov    $0x1,%esi
mov    %ebp,%edx
mov    $0x1,%ecx
mov    %r14,%r8
call   1040 <wordExist@plt>
mov    %ebx,%edi
mov    $0x1,%esi
mov    %ebp,%edx
mov    $0x2,%ecx
mov    %r14,%r8
call   1040 <wordExist@plt>
mov    %ebx,%edi
mov    $0x1,%esi
mov    %ebp,%edx
mov    $0x3,%ecx
mov    %r14,%r8
call   1040 <wordExist@plt>
mov    %ebx,%edi
mov    $0x1,%esi
mov    %ebp,%edx
mov    $0x4,%ecx
mov    %r14,%r8
call   1040 <wordExist@plt>
add    $0x1,%ebp
cmp    $0x8,%ebp
jne    11b0 <main+0x90>
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %ebx,%edi
mov    $0x2,%esi
mov    %ebp,%edx
mov    $0x1,%ecx
mov    %r14,%r8
call   1040 <wordExist@plt>
mov    %ebx,%edi
mov    $0x2,%esi
mov    %ebp,%edx
mov    $0x2,%ecx
mov    %r14,%r8
call   1040 <wordExist@plt>
mov    %ebx,%edi
mov    $0x2,%esi
mov    %ebp,%edx
mov    $0x3,%ecx
mov    %r14,%r8
call   1040 <wordExist@plt>
mov    %ebx,%edi
mov    $0x2,%esi
mov    %ebp,%edx
mov    $0x4,%ecx
mov    %r14,%r8
call   1040 <wordExist@plt>
add    $0x1,%ebp
cmp    $0x8,%ebp
jne    1220 <main+0x100>
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %ebx,%edi
mov    $0x3,%esi
mov    %ebp,%edx
mov    $0x1,%ecx
mov    %r14,%r8
call   1040 <wordExist@plt>
mov    %ebx,%edi
mov    $0x3,%esi
mov    %ebp,%edx
mov    $0x2,%ecx
mov    %r14,%r8
call   1040 <wordExist@plt>
mov    %ebx,%edi
mov    $0x3,%esi
mov    %ebp,%edx
mov    $0x3,%ecx
mov    %r14,%r8
call   1040 <wordExist@plt>
mov    %ebx,%edi
mov    $0x3,%esi
mov    %ebp,%edx
mov    $0x4,%ecx
mov    %r14,%r8
call   1040 <wordExist@plt>
add    $0x1,%ebp
cmp    $0x8,%ebp
jne    1290 <main+0x170>
add    $0x1,%ebx
cmp    $0x4,%ebx
jne    1140 <main+0x20>
lea    0xcfd(%rip),%rdi
call   1030 <system@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [6 x i8] c"pause\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [34 x i8]
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 0, i32* %1
%7 = bitcast [34 x i8]* %2 to i8*
store i32 0, i32* %3
br label %8
8: ; preds = %42, %0
%9 = load i32, i32* %3
%10 = icmp slt i32 %9, 4
br i1 %10, label %11, label %45
11: ; preds = %8
store i32 0, i32* %4
br label %12
12: ; preds = %38, %11
%13 = load i32, i32* %4
%14 = icmp slt i32 %13, 4
br i1 %14, label %15, label %41
15: ; preds = %12
store i32 0, i32* %5
br label %16
16: ; preds = %34, %15
%17 = load i32, i32* %5
%18 = icmp slt i32 %17, 8
br i1 %18, label %19, label %37
19: ; preds = %16
store i32 1, i32* %6
br label %20
20: ; preds = %30, %19
%21 = load i32, i32* %6
%22 = icmp sle i32 %21, 4
br i1 %22, label %23, label %33
23: ; preds = %20
%24 = load i32, i32* %3
%25 = load i32, i32* %4
%26 = load i32, i32* %5
%27 = load i32, i32* %6
%28 = getelementptr inbounds [34 x i8], [34 x i8]* %2, i64 0, i64 0
%29 = call i32 @wordExist(i32 %24, i32 %25, i32 %26, i32 %27, i8* %28)
br label %30
30: ; preds = %23
%31 = load i32, i32* %6
%32 = add nsw i32 %31, 1
store i32 %32, i32* %6
br label %20
33: ; preds = %20
br label %34
34: ; preds = %33
%35 = load i32, i32* %5
%36 = add nsw i32 %35, 1
store i32 %36, i32* %5
br label %16
37: ; preds = %16
br label %38
38: ; preds = %37
%39 = load i32, i32* %4
%40 = add nsw i32 %39, 1
store i32 %40, i32* %4
br label %12
41: ; preds = %12
br label %42
42: ; preds = %41
%43 = load i32, i32* %3
%44 = add nsw i32 %43, 1
store i32 %44, i32* %3
br label %8
45: ; preds = %8
%46 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"pause\00"
define i32 @main() {
%1 = alloca [34 x i8]
%2 = getelementptr inbounds [34 x i8], [34 x i8]* %1, i64 0, i64 0
br label %3
3: ; preds = %0, %39
%4 = phi i32 [ 0, %0 ], [ %40, %39 ]
br label %7
5: ; preds = %39
%6 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret i32 0
7: ; preds = %3, %7
%8 = phi i32 [ 0, %3 ], [ %13, %7 ]
%9 = call i32 @wordExist(i32 %4, i32 0, i32 %8, i32 1, i8* %2)
%10 = call i32 @wordExist(i32 %4, i32 0, i32 %8, i32 2, i8* %2)
%11 = call i32 @wordExist(i32 %4, i32 0, i32 %8, i32 3, i8* %2)
%12 = call i32 @wordExist(i32 %4, i32 0, i32 %8, i32 4, i8* %2)
%13 = add nuw nsw i32 %8, 1
%14 = icmp eq i32 %13, 8
br i1 %14, label %15, label %7
15: ; preds = %7, %15
%16 = phi i32 [ %21, %15 ], [ 0, %7 ]
%17 = call i32 @wordExist(i32 %4, i32 1, i32 %16, i32 1, i8* %2)
%18 = call i32 @wordExist(i32 %4, i32 1, i32 %16, i32 2, i8* %2)
%19 = call i32 @wordExist(i32 %4, i32 1, i32 %16, i32 3, i8* %2)
%20 = call i32 @wordExist(i32 %4, i32 1, i32 %16, i32 4, i8* %2)
%21 = add nuw nsw i32 %16, 1
%22 = icmp eq i32 %21, 8
br i1 %22, label %23, label %15
23: ; preds = %15, %23
%24 = phi i32 [ %29, %23 ], [ 0, %15 ]
%25 = call i32 @wordExist(i32 %4, i32 2, i32 %24, i32 1, i8* %2)
%26 = call i32 @wordExist(i32 %4, i32 2, i32 %24, i32 2, i8* %2)
%27 = call i32 @wordExist(i32 %4, i32 2, i32 %24, i32 3, i8* %2)
%28 = call i32 @wordExist(i32 %4, i32 2, i32 %24, i32 4, i8* %2)
%29 = add nuw nsw i32 %24, 1
%30 = icmp eq i32 %29, 8
br i1 %30, label %31, label %23
31: ; preds = %23, %31
%32 = phi i32 [ %37, %31 ], [ 0, %23 ]
%33 = call i32 @wordExist(i32 %4, i32 3, i32 %32, i32 1, i8* %2)
%34 = call i32 @wordExist(i32 %4, i32 3, i32 %32, i32 2, i8* %2)
%35 = call i32 @wordExist(i32 %4, i32 3, i32 %32, i32 3, i8* %2)
%36 = call i32 @wordExist(i32 %4, i32 3, i32 %32, i32 4, i8* %2)
%37 = add nuw nsw i32 %32, 1
%38 = icmp eq i32 %37, 8
br i1 %38, label %39, label %31
39: ; preds = %31
%40 = add nuw nsw i32 %4, 1
%41 = icmp eq i32 %40, 4
br i1 %41, label %5, label %3
}