int main() {
  char **dict;
  int N, i;
  scanf("%d\n", &N);
  dict = (char **)malloc(sizeof(char *) * N);
  get_dictionary(N, dict);
  check_word(N, dict);
  for (i = 0; i < N; i++)
    free(dict[i]);
  free(dict);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xe9a(%rip),%rdi
lea    -0x14(%rbp),%rsi
mov    $0x0,%al
call   1070 <scanf@plt>
movslq -0x14(%rbp),%rdi
shl    $0x3,%rdi
call   1060 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x14(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    $0x0,%al
call   1040 <get_dictionary@plt>
mov    -0x14(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    $0x0,%al
call   1050 <check_word@plt>
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    11d0 <main+0x80>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    11a5 <main+0x55>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
lea    0xea0(%rip),%rdi
lea    0xc(%rsp),%rsi
xor    %eax,%eax
call   1070 <scanf@plt>
movslq 0xc(%rsp),%r14
mov    %r14,%rdi
shl    $0x3,%rdi
call   1060 <malloc@plt>
mov    %rax,%r15
mov    %r14d,%edi
mov    %rax,%rsi
xor    %eax,%eax
call   1040 <get_dictionary@plt>
mov    0xc(%rsp),%edi
mov    %r15,%rsi
xor    %eax,%eax
call   1050 <check_word@plt>
cmpl   $0x0,0xc(%rsp)
jle    11c7 <main+0x77>
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    (%r15,%rbx,8),%rdi
call   1030 <free@plt>
add    $0x1,%rbx
movslq 0xc(%rsp),%rax
cmp    %rax,%rbx
jl     11b0 <main+0x60>
mov    %r15,%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8**
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32* %3)
%6 = load i32, i32* %3
%7 = sext i32 %6 to i64
%8 = mul i64 8, %7
%9 = call i8* @malloc(i64 %8)
%10 = bitcast i8* %9 to i8**
store i8** %10, i8*** %2
%11 = load i32, i32* %3
%12 = load i8**, i8*** %2
%13 = call i32 (i32, i8**, ...) bitcast (i32 (...)* @get_dictionary to i32 (i32, i8**, ...)*)(i32 %11, i8** %12)
%14 = load i32, i32* %3
%15 = load i8**, i8*** %2
%16 = call i32 (i32, i8**, ...) bitcast (i32 (...)* @check_word to i32 (i32, i8**, ...)*)(i32 %14, i8** %15)
store i32 0, i32* %4
br label %17
17: ; preds = %27, %0
%18 = load i32, i32* %4
%19 = load i32, i32* %3
%20 = icmp slt i32 %18, %19
br i1 %20, label %21, label %30
21: ; preds = %17
%22 = load i8**, i8*** %2
%23 = load i32, i32* %4
%24 = sext i32 %23 to i64
%25 = getelementptr inbounds i8*, i8** %22, i64 %24
%26 = load i8*, i8** %25
br label %27
27: ; preds = %21
%28 = load i32, i32* %4
%29 = add nsw i32 %28, 1
store i32 %29, i32* %4
br label %17
30: ; preds = %17
%31 = load i8**, i8*** %2
%32 = bitcast i8** %31 to i8*
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = sext i32 %4 to i64
%6 = shl nsw i64 %5, 3
%7 = call i8* @malloc(i64 %6)
%8 = bitcast i8* %7 to i8**
%9 = call i32 (i32, i8**, ...) bitcast (i32 (...)* @get_dictionary to i32 (i32, i8**, ...)*)(i32 %4, i8** %8)
%10 = load i32, i32* %1
%11 = call i32 (i32, i8**, ...) bitcast (i32 (...)* @check_word to i32 (i32, i8**, ...)*)(i32 %10, i8** %8)
%12 = load i32, i32* %1
%13 = icmp sgt i32 %12, 0
br i1 %13, label %14, label %22
14: ; preds = %0, %14
%15 = phi i64 [ %18, %14 ], [ 0, %0 ]
%16 = getelementptr inbounds i8*, i8** %8, i64 %15
%17 = load i8*, i8** %16
%18 = add nuw nsw i64 %15, 1
%19 = load i32, i32* %1
%20 = sext i32 %19 to i64
%21 = icmp slt i64 %18, %20
br i1 %21, label %14, label %22
22: ; preds = %14, %0
ret i32 0
}