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

/* Variables and functions */
int /*<<< orphan*/ *fgets(char *, int, int /*<<< orphan*/ *);
void *malloc(int);
int /*<<< orphan*/ memset(char *, int /*<<< orphan*/, int);
int /*<<< orphan*/ printUniqueWords(char **, int *, int *);
int /*<<< orphan*/ rewind(int /*<<< orphan*/ *);
scalar_t__ strcmp(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
char *strdup(char *);
int strlen(char *);
void processFile(FILE *filename) {
  char lineArray[1024];
  int maxLines = 0;
  while (fgets(lineArray, sizeof(lineArray), filename) != NULL) {
    int index = 0;
    maxLines++;
    if (lineArray[index++] == '\n') {
      maxLines--;
    }
  }
  char **data;
  data = malloc(maxLines * sizeof(char));
  int *charNums;
  charNums = malloc(maxLines * sizeof(int));
  int *hasSeen;
  hasSeen = malloc(maxLines * sizeof(int));
  for (int i = 0; i < maxLines; i++) {
    charNums[i] = 0;
    hasSeen[i] = 0;
  }
  int dataNumber = 0;
  memset(lineArray, 0, 1024);
  rewind(filename);
  while (fgets(lineArray, sizeof(lineArray), filename) != NULL) {
    int length = 0;
    data[dataNumber] = strdup(lineArray);
    if (dataNumber < maxLines - 1) {
      length = strlen(data[dataNumber] - 1);
      data[dataNumber][length] = '\0';
    } else {
      length = strlen(data[dataNumber]);
      data[dataNumber][length] = '\n';
      data[dataNumber][length + 1] = '\0';
    }
    charNums[dataNumber] = length;
    dataNumber++;
  }
  char **results;
  results = malloc(maxLines * sizeof(char));
  int *numSeen;
  numSeen = malloc(maxLines * sizeof(int));
  for (int i = 0; i < maxLines; i++) {
    results[i] = malloc(charNums[i] * sizeof(char));
    numSeen[i] = 0;
  }
  int resultNumber = 0;
  int dataNumber2 = 0;
  memset(lineArray, 0, 1024);
  rewind(filename);
  while (fgets(lineArray, sizeof(lineArray), filename) != NULL) {
    int wordFrequency = 0;
    if (hasSeen[dataNumber2] == 1) {
      dataNumber2++;
      continue;
    }
    if (hasSeen[dataNumber2] == 0) {
      strcpy(results[resultNumber], data[dataNumber2]);
      for (int i = 0; i < maxLines; i++) {
        if (strcmp(results[resultNumber], data[i]) == 0) {
          hasSeen[i] = 1;
          wordFrequency += 1;
        } else {
          continue;
        }
      }
      numSeen[resultNumber] = wordFrequency;
      resultNumber++;
      dataNumber2++;
    }
  }
  printUniqueWords(results, &resultNumber, numSeen);
}


x86 assembly (clang, -O0):
<processFile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x470,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0x414(%rbp)
lea    -0x410(%rbp),%rdi
mov    -0x8(%rbp),%rdx
mov    $0x400,%esi
call   1080 <fgets@plt>
cmp    $0x0,%rax
je     1219 <processFile+0x89>
movl   $0x0,-0x418(%rbp)
mov    -0x414(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x414(%rbp)
mov    -0x418(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x418(%rbp)
cltq
movsbl -0x410(%rbp,%rax,1),%eax
ff
cmp    $0xa,%eax
jne    1214 <processFile+0x84>
mov    -0x414(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x414(%rbp)
jmp    11a9 <processFile+0x19>
movslq -0x414(%rbp),%rax
shl    $0x0,%rax
mov    %eax,%edi
call   10a0 <malloc@plt>
mov    %rax,-0x420(%rbp)
movslq -0x414(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edi
call   10a0 <malloc@plt>
mov    %rax,-0x428(%rbp)
movslq -0x414(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edi
call   10a0 <malloc@plt>
mov    %rax,-0x430(%rbp)
movl   $0x0,-0x434(%rbp)
mov    -0x434(%rbp),%eax
cmp    -0x414(%rbp),%eax
jge    12be <processFile+0x12e>
mov    -0x428(%rbp),%rax
movslq -0x434(%rbp),%rcx
movl   $0x0,(%rax,%rcx,4)
mov    -0x430(%rbp),%rax
movslq -0x434(%rbp),%rcx
movl   $0x0,(%rax,%rcx,4)
mov    -0x434(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x434(%rbp)
jmp    126e <processFile+0xde>
movl   $0x0,-0x438(%rbp)
lea    -0x410(%rbp),%rdi
xor    %esi,%esi
mov    $0x400,%edx
call   1070 <memset@plt>
mov    -0x8(%rbp),%rdi
call   1060 <rewind@plt>
lea    -0x410(%rbp),%rdi
mov    -0x8(%rbp),%rdx
mov    $0x400,%esi
call   1080 <fgets@plt>
cmp    $0x0,%rax
je     140f <processFile+0x27f>
movl   $0x0,-0x43c(%rbp)
lea    -0x410(%rbp),%rdi
call   10b0 <strdup@plt>
mov    %rax,%rdx
mov    -0x420(%rbp),%rax
movslq -0x438(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
mov    -0x438(%rbp),%eax
mov    -0x414(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    1388 <processFile+0x1f8>
mov    -0x420(%rbp),%rax
movslq -0x438(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
add    $0xffffffffffffffff,%rdi
call   1040 <strlen@plt>
mov    %eax,-0x43c(%rbp)
mov    -0x420(%rbp),%rax
movslq -0x438(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x43c(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
jmp    13e4 <processFile+0x254>
mov    -0x420(%rbp),%rax
movslq -0x438(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1040 <strlen@plt>
mov    %eax,-0x43c(%rbp)
mov    -0x420(%rbp),%rax
movslq -0x438(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x43c(%rbp),%rcx
movb   $0xa,(%rax,%rcx,1)
mov    -0x420(%rbp),%rax
movslq -0x438(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    -0x43c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x43c(%rbp),%edx
mov    -0x428(%rbp),%rax
movslq -0x438(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x438(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x438(%rbp)
jmp    12e4 <processFile+0x154>
movslq -0x414(%rbp),%rax
shl    $0x0,%rax
mov    %eax,%edi
call   10a0 <malloc@plt>
mov    %rax,-0x448(%rbp)
movslq -0x414(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edi
call   10a0 <malloc@plt>
mov    %rax,-0x450(%rbp)
movl   $0x0,-0x454(%rbp)
mov    -0x454(%rbp),%eax
cmp    -0x414(%rbp),%eax
jge    14b8 <processFile+0x328>
mov    -0x428(%rbp),%rax
movslq -0x454(%rbp),%rcx
movslq (%rax,%rcx,4),%rax
shl    $0x0,%rax
mov    %eax,%edi
call   10a0 <malloc@plt>
mov    %rax,%rdx
mov    -0x448(%rbp),%rax
movslq -0x454(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
mov    -0x450(%rbp),%rax
movslq -0x454(%rbp),%rcx
movl   $0x0,(%rax,%rcx,4)
mov    -0x454(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x454(%rbp)
jmp    144b <processFile+0x2bb>
movl   $0x0,-0x458(%rbp)
movl   $0x0,-0x45c(%rbp)
lea    -0x410(%rbp),%rdi
xor    %esi,%esi
mov    $0x400,%edx
call   1070 <memset@plt>
mov    -0x8(%rbp),%rdi
call   1060 <rewind@plt>
lea    -0x410(%rbp),%rdi
mov    -0x8(%rbp),%rdx
mov    $0x400,%esi
call   1080 <fgets@plt>
cmp    $0x0,%rax
je     164e <processFile+0x4be>
movl   $0x0,-0x460(%rbp)
mov    -0x430(%rbp),%rax
movslq -0x45c(%rbp),%rcx
cmpl   $0x1,(%rax,%rcx,4)
jne    153d <processFile+0x3ad>
mov    -0x45c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x45c(%rbp)
jmp    14e8 <processFile+0x358>
mov    -0x430(%rbp),%rax
movslq -0x45c(%rbp),%rcx
cmpl   $0x0,(%rax,%rcx,4)
jne    1649 <processFile+0x4b9>
mov    -0x448(%rbp),%rax
movslq -0x458(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
mov    -0x420(%rbp),%rax
movslq -0x45c(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
call   1030 <strcpy@plt>
movl   $0x0,-0x464(%rbp)
mov    -0x464(%rbp),%eax
cmp    -0x414(%rbp),%eax
jge    1614 <processFile+0x484>
mov    -0x448(%rbp),%rax
movslq -0x458(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
mov    -0x420(%rbp),%rax
movslq -0x464(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%rax
jne    15f6 <processFile+0x466>
mov    -0x430(%rbp),%rax
movslq -0x464(%rbp),%rcx
movl   $0x1,(%rax,%rcx,4)
mov    -0x460(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x460(%rbp)
jmp    15fb <processFile+0x46b>
jmp    1600 <processFile+0x470>
jmp    1600 <processFile+0x470>
mov    -0x464(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x464(%rbp)
jmp    1588 <processFile+0x3f8>
mov    -0x460(%rbp),%edx
mov    -0x450(%rbp),%rax
movslq -0x458(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x458(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x458(%rbp)
mov    -0x45c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x45c(%rbp)
jmp    14e8 <processFile+0x358>
mov    -0x448(%rbp),%rdi
mov    -0x450(%rbp),%rdx
lea    -0x458(%rbp),%rsi
call   1050 <printUniqueWords@plt>
add    $0x470,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<processFile>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x448,%rsp
mov    %rdi,%rbx
lea    0x40(%rsp),%rdi
mov    $0x400,%esi
mov    %rbx,%rdx
call   1080 <fgets@plt>
xor    %ebp,%ebp
test   %rax,%rax
je     11f1 <processFile+0x61>
lea    0x40(%rsp),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
xor    %eax,%eax
cmpb   $0xa,0x40(%rsp)
setne  %al
add    %eax,%ebp
mov    %r14,%rdi
mov    $0x400,%esi
mov    %rbx,%rdx
call   1080 <fgets@plt>
test   %rax,%rax
jne    11d0 <processFile+0x40>
mov    %ebp,%edi
call   10a0 <malloc@plt>
mov    %rax,%r15
lea    0x0(,%rbp,4),%r14d
mov    %r14d,%edi
call   10a0 <malloc@plt>
mov    %rax,%r13
mov    %r14d,0x8(%rsp)
mov    %r14d,%edi
call   10a0 <malloc@plt>
mov    %rax,%r14
mov    %ebp,%r12d
mov    %rbp,0x18(%rsp)
test   %ebp,%ebp
je     124c <processFile+0xbc>
lea    0x0(,%r12,4),%rbp
mov    %r13,%rdi
xor    %esi,%esi
mov    %rbp,%rdx
call   1070 <memset@plt>
mov    %r14,%rdi
xor    %esi,%esi
mov    %rbp,%rdx
call   1070 <memset@plt>
mov    %r13,(%rsp)
mov    %r14,0x30(%rsp)
lea    0x40(%rsp),%rbp
mov    %rbp,%rdi
xor    %esi,%esi
mov    $0x400,%edx
call   1070 <memset@plt>
mov    %rbx,%rdi
call   1060 <rewind@plt>
mov    %rbp,%rdi
mov    $0x400,%esi
mov    %rbx,%rdx
call   1080 <fgets@plt>
test   %rax,%rax
mov    %rbx,0x38(%rsp)
je     1312 <processFile+0x182>
mov    0x18(%rsp),%rax
add    $0xffffffff,%eax
cltq
mov    %rax,0x20(%rsp)
xor    %r13d,%r13d
lea    0x40(%rsp),%rbp
mov    0x38(%rsp),%rbx
jmp    12ec <processFile+0x15c>
nopl   (%rax)
mov    %r14,%rdi
call   1040 <strlen@plt>
movslq %eax,%rcx
movb   $0xa,(%r14,%rcx,1)
add    $0x1,%ecx
movslq %ecx,%rcx
movb   $0x0,(%r14,%rcx,1)
mov    (%rsp),%rcx
mov    %eax,(%rcx,%r13,4)
add    $0x1,%r13
mov    %rbp,%rdi
mov    $0x400,%esi
mov    %rbx,%rdx
call   1080 <fgets@plt>
test   %rax,%rax
je     1312 <processFile+0x182>
mov    %rbp,%rdi
call   10b0 <strdup@plt>
mov    %rax,%r14
mov    %rax,(%r15,%r13,8)
cmp    0x20(%rsp),%r13
jge    12b0 <processFile+0x120>
mov    %r14,%rdi
add    $0xffffffffffffffff,%rdi
call   1040 <strlen@plt>
mov    %eax,%ecx
jmp    12c3 <processFile+0x133>
mov    0x18(%rsp),%rbp
mov    %ebp,%edi
call   10a0 <malloc@plt>
mov    %rax,%r13
mov    0x8(%rsp),%edi
call   10a0 <malloc@plt>
mov    %rax,0x8(%rsp)
test   %ebp,%ebp
mov    (%rsp),%r14
je     1367 <processFile+0x1d7>
lea    0x0(,%r12,4),%rdx
xor    %ebp,%ebp
mov    0x8(%rsp),%rdi
xor    %esi,%esi
call   1070 <memset@plt>
nopl   (%rax)
mov    (%r14,%rbp,4),%edi
call   10a0 <malloc@plt>
mov    %rax,0x0(%r13,%rbp,8)
add    $0x1,%rbp
cmp    %rbp,%r12
jne    1350 <processFile+0x1c0>
movl   $0x0,0x14(%rsp)
mov    %r13,0x28(%rsp)
lea    0x40(%rsp),%r13
xor    %r14d,%r14d
mov    %r13,%rdi
xor    %esi,%esi
mov    $0x400,%edx
call   1070 <memset@plt>
mov    %rbx,%rdi
call   1060 <rewind@plt>
mov    %r13,%rdi
mov    0x28(%rsp),%r13
mov    $0x400,%esi
mov    %rbx,%rdx
call   1080 <fgets@plt>
test   %rax,%rax
je     147b <processFile+0x2eb>
lea    0x40(%rsp),%rbp
movl   $0x0,(%rsp)
jmp    1404 <processFile+0x274>
xor    %r14d,%r14d
mov    0x8(%rsp),%rax
mov    0x20(%rsp),%rcx
mov    %r14d,(%rax,%rcx,4)
mov    %rcx,%r14
add    $0x1,%r14d
mov    %r14d,0x14(%rsp)
addl   $0x1,(%rsp)
mov    0x38(%rsp),%rbx
mov    0x28(%rsp),%r13
lea    0x40(%rsp),%rbp
mov    %rbp,%rdi
mov    $0x400,%esi
mov    %rbx,%rdx
call   1080 <fgets@plt>
test   %rax,%rax
je     147b <processFile+0x2eb>
movslq (%rsp),%rax
mov    0x30(%rsp),%rcx
mov    (%rcx,%rax,4),%ecx
test   %ecx,%ecx
je     1420 <processFile+0x290>
cmp    $0x1,%ecx
jne    13ef <processFile+0x25f>
addl   $0x1,(%rsp)
jmp    13ef <processFile+0x25f>
nop
movslq %r14d,%r14
mov    0x0(%r13,%r14,8),%r13
mov    (%r15,%rax,8),%rsi
mov    %r13,%rdi
call   1030 <strcpy@plt>
cmpl   $0x0,0x18(%rsp)
mov    %r14,0x20(%rsp)
je     13bf <processFile+0x22f>
xor    %ebp,%ebp
xor    %r14d,%r14d
mov    0x30(%rsp),%rbx
jmp    145d <processFile+0x2cd>
add    $0x1,%rbp
cmp    %rbp,%r12
je     13c2 <processFile+0x232>
mov    (%r15,%rbp,8),%rsi
mov    %r13,%rdi
call   1090 <strcmp@plt>
test   %rax,%rax
jne    1450 <processFile+0x2c0>
movl   $0x1,(%rbx,%rbp,4)
add    $0x1,%r14d
jmp    1450 <processFile+0x2c0>
lea    0x14(%rsp),%rsi
mov    %r13,%rdi
mov    0x8(%rsp),%rdx
call   1050 <printUniqueWords@plt>
add    $0x448,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @processFile(i32* %0) {
%2 = alloca i32*
%3 = alloca [1024 x i8]
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8**
%7 = alloca i32*
%8 = alloca i32*
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i8**
%13 = alloca i32*
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
store i32* %0, i32** %2
store i32 0, i32* %4
br label %19
19: ; preds = %37, %1
%20 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%21 = load i32*, i32** %2
%22 = call i32* @fgets(i8* %20, i32 1024, i32* %21)
%23 = icmp ne i32* %22, null
br i1 %23, label %24, label %38
24: ; preds = %19
store i32 0, i32* %5
%25 = load i32, i32* %4
%26 = add nsw i32 %25, 1
store i32 %26, i32* %4
%27 = load i32, i32* %5
%28 = add nsw i32 %27, 1
store i32 %28, i32* %5
%29 = sext i32 %27 to i64
%30 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 %29
%31 = load i8, i8* %30
%32 = sext i8 %31 to i32
%33 = icmp eq i32 %32, 10
br i1 %33, label %34, label %37
34: ; preds = %24
%35 = load i32, i32* %4
%36 = add nsw i32 %35, -1
store i32 %36, i32* %4
br label %37
37: ; preds = %34, %24
br label %19
38: ; preds = %19
%39 = load i32, i32* %4
%40 = sext i32 %39 to i64
%41 = mul i64 %40, 1
%42 = trunc i64 %41 to i32
%43 = call i8* @malloc(i32 %42)
%44 = bitcast i8* %43 to i8**
store i8** %44, i8*** %6
%45 = load i32, i32* %4
%46 = sext i32 %45 to i64
%47 = mul i64 %46, 4
%48 = trunc i64 %47 to i32
%49 = call i8* @malloc(i32 %48)
%50 = bitcast i8* %49 to i32*
store i32* %50, i32** %7
%51 = load i32, i32* %4
%52 = sext i32 %51 to i64
%53 = mul i64 %52, 4
%54 = trunc i64 %53 to i32
%55 = call i8* @malloc(i32 %54)
%56 = bitcast i8* %55 to i32*
store i32* %56, i32** %8
store i32 0, i32* %9
br label %57
57: ; preds = %70, %38
%58 = load i32, i32* %9
%59 = load i32, i32* %4
%60 = icmp slt i32 %58, %59
br i1 %60, label %61, label %73
61: ; preds = %57
%62 = load i32*, i32** %7
%63 = load i32, i32* %9
%64 = sext i32 %63 to i64
%65 = getelementptr inbounds i32, i32* %62, i64 %64
store i32 0, i32* %65
%66 = load i32*, i32** %8
%67 = load i32, i32* %9
%68 = sext i32 %67 to i64
%69 = getelementptr inbounds i32, i32* %66, i64 %68
store i32 0, i32* %69
br label %70
70: ; preds = %61
%71 = load i32, i32* %9
%72 = add nsw i32 %71, 1
store i32 %72, i32* %9
br label %57
73: ; preds = %57
store i32 0, i32* %10
%74 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%75 = call i32 @memset(i8* %74, i32 0, i32 1024)
%76 = load i32*, i32** %2
%77 = call i32 @rewind(i32* %76)
br label %78
78: ; preds = %134, %73
%79 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%80 = load i32*, i32** %2
%81 = call i32* @fgets(i8* %79, i32 1024, i32* %80)
%82 = icmp ne i32* %81, null
br i1 %82, label %83, label %142
83: ; preds = %78
store i32 0, i32* %11
%84 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%85 = call i8* @strdup(i8* %84)
%86 = load i8**, i8*** %6
%87 = load i32, i32* %10
%88 = sext i32 %87 to i64
%89 = getelementptr inbounds i8*, i8** %86, i64 %88
store i8* %85, i8** %89
%90 = load i32, i32* %10
%91 = load i32, i32* %4
%92 = sub nsw i32 %91, 1
%93 = icmp slt i32 %90, %92
br i1 %93, label %94, label %110
94: ; preds = %83
%95 = load i8**, i8*** %6
%96 = load i32, i32* %10
%97 = sext i32 %96 to i64
%98 = getelementptr inbounds i8*, i8** %95, i64 %97
%99 = load i8*, i8** %98
%100 = getelementptr inbounds i8, i8* %99, i64 -1
%101 = call i32 @strlen(i8* %100)
store i32 %101, i32* %11
%102 = load i8**, i8*** %6
%103 = load i32, i32* %10
%104 = sext i32 %103 to i64
%105 = getelementptr inbounds i8*, i8** %102, i64 %104
%106 = load i8*, i8** %105
%107 = load i32, i32* %11
%108 = sext i32 %107 to i64
%109 = getelementptr inbounds i8, i8* %106, i64 %108
store i8 0, i8* %109
br label %134
110: ; preds = %83
%111 = load i8**, i8*** %6
%112 = load i32, i32* %10
%113 = sext i32 %112 to i64
%114 = getelementptr inbounds i8*, i8** %111, i64 %113
%115 = load i8*, i8** %114
%116 = call i32 @strlen(i8* %115)
store i32 %116, i32* %11
%117 = load i8**, i8*** %6
%118 = load i32, i32* %10
%119 = sext i32 %118 to i64
%120 = getelementptr inbounds i8*, i8** %117, i64 %119
%121 = load i8*, i8** %120
%122 = load i32, i32* %11
%123 = sext i32 %122 to i64
%124 = getelementptr inbounds i8, i8* %121, i64 %123
store i8 10, i8* %124
%125 = load i8**, i8*** %6
%126 = load i32, i32* %10
%127 = sext i32 %126 to i64
%128 = getelementptr inbounds i8*, i8** %125, i64 %127
%129 = load i8*, i8** %128
%130 = load i32, i32* %11
%131 = add nsw i32 %130, 1
%132 = sext i32 %131 to i64
%133 = getelementptr inbounds i8, i8* %129, i64 %132
store i8 0, i8* %133
br label %134
134: ; preds = %110, %94
%135 = load i32, i32* %11
%136 = load i32*, i32** %7
%137 = load i32, i32* %10
%138 = sext i32 %137 to i64
%139 = getelementptr inbounds i32, i32* %136, i64 %138
store i32 %135, i32* %139
%140 = load i32, i32* %10
%141 = add nsw i32 %140, 1
store i32 %141, i32* %10
br label %78
142: ; preds = %78
%143 = load i32, i32* %4
%144 = sext i32 %143 to i64
%145 = mul i64 %144, 1
%146 = trunc i64 %145 to i32
%147 = call i8* @malloc(i32 %146)
%148 = bitcast i8* %147 to i8**
store i8** %148, i8*** %12
%149 = load i32, i32* %4
%150 = sext i32 %149 to i64
%151 = mul i64 %150, 4
%152 = trunc i64 %151 to i32
%153 = call i8* @malloc(i32 %152)
%154 = bitcast i8* %153 to i32*
store i32* %154, i32** %13
store i32 0, i32* %14
br label %155
155: ; preds = %177, %142
%156 = load i32, i32* %14
%157 = load i32, i32* %4
%158 = icmp slt i32 %156, %157
br i1 %158, label %159, label %180
159: ; preds = %155
%160 = load i32*, i32** %7
%161 = load i32, i32* %14
%162 = sext i32 %161 to i64
%163 = getelementptr inbounds i32, i32* %160, i64 %162
%164 = load i32, i32* %163
%165 = sext i32 %164 to i64
%166 = mul i64 %165, 1
%167 = trunc i64 %166 to i32
%168 = call i8* @malloc(i32 %167)
%169 = load i8**, i8*** %12
%170 = load i32, i32* %14
%171 = sext i32 %170 to i64
%172 = getelementptr inbounds i8*, i8** %169, i64 %171
store i8* %168, i8** %172
%173 = load i32*, i32** %13
%174 = load i32, i32* %14
%175 = sext i32 %174 to i64
%176 = getelementptr inbounds i32, i32* %173, i64 %175
store i32 0, i32* %176
br label %177
177: ; preds = %159
%178 = load i32, i32* %14
%179 = add nsw i32 %178, 1
store i32 %179, i32* %14
br label %155
180: ; preds = %155
store i32 0, i32* %15
store i32 0, i32* %16
%181 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%182 = call i32 @memset(i8* %181, i32 0, i32 1024)
%183 = load i32*, i32** %2
%184 = call i32 @rewind(i32* %183)
br label %185
185: ; preds = %258, %197, %180
%186 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%187 = load i32*, i32** %2
%188 = call i32* @fgets(i8* %186, i32 1024, i32* %187)
%189 = icmp ne i32* %188, null
br i1 %189, label %190, label %259
190: ; preds = %185
store i32 0, i32* %17
%191 = load i32*, i32** %8
%192 = load i32, i32* %16
%193 = sext i32 %192 to i64
%194 = getelementptr inbounds i32, i32* %191, i64 %193
%195 = load i32, i32* %194
%196 = icmp eq i32 %195, 1
br i1 %196, label %197, label %200
197: ; preds = %190
%198 = load i32, i32* %16
%199 = add nsw i32 %198, 1
store i32 %199, i32* %16
br label %185
200: ; preds = %190
%201 = load i32*, i32** %8
%202 = load i32, i32* %16
%203 = sext i32 %202 to i64
%204 = getelementptr inbounds i32, i32* %201, i64 %203
%205 = load i32, i32* %204
%206 = icmp eq i32 %205, 0
br i1 %206, label %207, label %258
207: ; preds = %200
%208 = load i8**, i8*** %12
%209 = load i32, i32* %15
%210 = sext i32 %209 to i64
%211 = getelementptr inbounds i8*, i8** %208, i64 %210
%212 = load i8*, i8** %211
%213 = load i8**, i8*** %6
%214 = load i32, i32* %16
%215 = sext i32 %214 to i64
%216 = getelementptr inbounds i8*, i8** %213, i64 %215
%217 = load i8*, i8** %216
%218 = call i32 @strcpy(i8* %212, i8* %217)
store i32 0, i32* %18
br label %219
219: ; preds = %245, %207
%220 = load i32, i32* %18
%221 = load i32, i32* %4
%222 = icmp slt i32 %220, %221
br i1 %222, label %223, label %248
223: ; preds = %219
%224 = load i8**, i8*** %12
%225 = load i32, i32* %15
%226 = sext i32 %225 to i64
%227 = getelementptr inbounds i8*, i8** %224, i64 %226
%228 = load i8*, i8** %227
%229 = load i8**, i8*** %6
%230 = load i32, i32* %18
%231 = sext i32 %230 to i64
%232 = getelementptr inbounds i8*, i8** %229, i64 %231
%233 = load i8*, i8** %232
%234 = call i64 @strcmp(i8* %228, i8* %233)
%235 = icmp eq i64 %234, 0
br i1 %235, label %236, label %243
236: ; preds = %223
%237 = load i32*, i32** %8
%238 = load i32, i32* %18
%239 = sext i32 %238 to i64
%240 = getelementptr inbounds i32, i32* %237, i64 %239
store i32 1, i32* %240
%241 = load i32, i32* %17
%242 = add nsw i32 %241, 1
store i32 %242, i32* %17
br label %244
243: ; preds = %223
br label %245
244: ; preds = %236
br label %245
245: ; preds = %244, %243
%246 = load i32, i32* %18
%247 = add nsw i32 %246, 1
store i32 %247, i32* %18
br label %219
248: ; preds = %219
%249 = load i32, i32* %17
%250 = load i32*, i32** %13
%251 = load i32, i32* %15
%252 = sext i32 %251 to i64
%253 = getelementptr inbounds i32, i32* %250, i64 %252
store i32 %249, i32* %253
%254 = load i32, i32* %15
%255 = add nsw i32 %254, 1
store i32 %255, i32* %15
%256 = load i32, i32* %16
%257 = add nsw i32 %256, 1
store i32 %257, i32* %16
br label %258
258: ; preds = %248, %200
br label %185
259: ; preds = %185
%260 = load i8**, i8*** %12
%261 = load i32*, i32** %13
%262 = call i32 @printUniqueWords(i8** %260, i32* %15, i32* %261)
ret void
}

LLVM IR (-O2):
define void @processFile(i32* nocapture %0) {
%2 = alloca [1024 x i8]
%3 = alloca i32
%4 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 0
%5 = call i32* @fgets(i8* %4, i32 1024, i32* %0)
%6 = icmp eq i32* %5, null
br i1 %6, label %15, label %7
7: ; preds = %1, %7
%8 = phi i32 [ %12, %7 ], [ 0, %1 ]
%9 = load i8, i8* %4
%10 = icmp ne i8 %9, 10
%11 = zext i1 %10 to i32
%12 = add nuw nsw i32 %8, %11
%13 = call i32* @fgets(i8* %4, i32 1024, i32* %0)
%14 = icmp eq i32* %13, null
br i1 %14, label %15, label %7
15: ; preds = %7, %1
%16 = phi i32 [ 0, %1 ], [ %12, %7 ]
%17 = call i8* @malloc(i32 %16)
%18 = bitcast i8* %17 to i8**
%19 = shl i32 %16, 2
%20 = call i8* @malloc(i32 %19)
%21 = bitcast i8* %20 to i32*
%22 = call i8* @malloc(i32 %19)
%23 = bitcast i8* %22 to i32*
%24 = icmp eq i32 %16, 0
br i1 %24, label %28, label %25
25: ; preds = %15
%26 = zext i32 %16 to i64
%27 = shl nuw nsw i64 %26, 2
br label %28
28: ; preds = %25, %15
%29 = call i32 @memset(i8* %4, i32 0, i32 1024)
%30 = call i32 @rewind(i32* %0)
%31 = call i32* @fgets(i8* %4, i32 1024, i32* %0)
%32 = icmp eq i32* %31, null
br i1 %32, label %58, label %33
33: ; preds = %28
%34 = add nsw i32 %16, -1
%35 = sext i32 %34 to i64
br label %36
36: ; preds = %33, %49
%37 = phi i64 [ 0, %33 ], [ %55, %49 ]
%38 = call i8* @strdup(i8* %4)
%39 = getelementptr inbounds i8*, i8** %18, i64 %37
store i8* %38, i8** %39
%40 = icmp slt i64 %37, %35
br i1 %40, label %41, label %44
41: ; preds = %36
%42 = getelementptr inbounds i8, i8* %38, i64 -1
%43 = call i32 @strlen(i8* %42)
br label %49
44: ; preds = %36
%45 = call i32 @strlen(i8* %38)
%46 = sext i32 %45 to i64
%47 = getelementptr inbounds i8, i8* %38, i64 %46
store i8 10, i8* %47
%48 = add nsw i32 %45, 1
br label %49
49: ; preds = %44, %41
%50 = phi i32 [ %48, %44 ], [ %43, %41 ]
%51 = phi i32 [ %45, %44 ], [ %43, %41 ]
%52 = sext i32 %50 to i64
%53 = getelementptr inbounds i8, i8* %38, i64 %52
store i8 0, i8* %53
%54 = getelementptr inbounds i32, i32* %21, i64 %37
store i32 %51, i32* %54
%55 = add nuw i64 %37, 1
%56 = call i32* @fgets(i8* %4, i32 1024, i32* %0)
%57 = icmp eq i32* %56, null
br i1 %57, label %58, label %36
58: ; preds = %49, %28
%59 = call i8* @malloc(i32 %16)
%60 = bitcast i8* %59 to i8**
%61 = call i8* @malloc(i32 %19)
%62 = bitcast i8* %61 to i32*
br i1 %24, label %66, label %63
63: ; preds = %58
%64 = zext i32 %16 to i64
%65 = shl nuw nsw i64 %64, 2
br label %74
66: ; preds = %74, %58
%67 = bitcast i32* %3 to i8*
store i32 0, i32* %3
%68 = call i32 @memset(i8* %4, i32 0, i32 1024)
%69 = call i32 @rewind(i32* %0)
%70 = call i32* @fgets(i8* %4, i32 1024, i32* %0)
%71 = icmp eq i32* %70, null
br i1 %71, label %121, label %72
72: ; preds = %66
%73 = zext i32 %16 to i64
br label %82
74: ; preds = %63, %74
%75 = phi i64 [ 0, %63 ], [ %80, %74 ]
%76 = getelementptr inbounds i32, i32* %21, i64 %75
%77 = load i32, i32* %76
%78 = call i8* @malloc(i32 %77)
%79 = getelementptr inbounds i8*, i8** %60, i64 %75
store i8* %78, i8** %79
%80 = add nuw nsw i64 %75, 1
%81 = icmp eq i64 %80, %64
br i1 %81, label %66, label %74
82: ; preds = %72, %116
%83 = phi i32 [ 0, %72 ], [ %117, %116 ]
%84 = phi i32 [ 0, %72 ], [ %118, %116 ]
%85 = sext i32 %84 to i64
%86 = getelementptr inbounds i32, i32* %23, i64 %85
%87 = load i32, i32* %86
switch i32 %87, label %116 [
i32 1, label %88
i32 0, label %90
]
88: ; preds = %82
%89 = add nsw i32 %84, 1
br label %116
90: ; preds = %82
%91 = sext i32 %83 to i64
%92 = getelementptr inbounds i8*, i8** %60, i64 %91
%93 = load i8*, i8** %92
%94 = getelementptr inbounds i8*, i8** %18, i64 %85
%95 = load i8*, i8** %94
%96 = call i32 @strcpy(i8* %93, i8* %95)
br i1 %24, label %97, label %102
97: ; preds = %112, %90
%98 = phi i32 [ 0, %90 ], [ %113, %112 ]
%99 = getelementptr inbounds i32, i32* %62, i64 %91
store i32 %98, i32* %99
%100 = add nsw i32 %83, 1
store i32 %100, i32* %3
%101 = add nsw i32 %84, 1
br label %116
102: ; preds = %90, %112
%103 = phi i64 [ %114, %112 ], [ 0, %90 ]
%104 = phi i32 [ %113, %112 ], [ 0, %90 ]
%105 = getelementptr inbounds i8*, i8** %18, i64 %103
%106 = load i8*, i8** %105
%107 = call i64 @strcmp(i8* %93, i8* %106)
%108 = icmp eq i64 %107, 0
br i1 %108, label %109, label %112
109: ; preds = %102
%110 = getelementptr inbounds i32, i32* %23, i64 %103
store i32 1, i32* %110
%111 = add nsw i32 %104, 1
br label %112
112: ; preds = %102, %109
%113 = phi i32 [ %111, %109 ], [ %104, %102 ]
%114 = add nuw nsw i64 %103, 1
%115 = icmp eq i64 %114, %73
br i1 %115, label %97, label %102
116: ; preds = %97, %82, %88
%117 = phi i32 [ %83, %88 ], [ %100, %97 ], [ %83, %82 ]
%118 = phi i32 [ %89, %88 ], [ %101, %97 ], [ %84, %82 ]
%119 = call i32* @fgets(i8* %4, i32 1024, i32* %0)
%120 = icmp eq i32* %119, null
br i1 %120, label %121, label %82
121: ; preds = %116, %66
%122 = call i32 @printUniqueWords(i8** %60, i32* %3, i32* %62)
ret void
}