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

/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ feof(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char const *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ free(long long *);
int /*<<< orphan*/ fscanf(int /*<<< orphan*/ *, char *, long long *);
scalar_t__ malloc(int);
int /*<<< orphan*/ memset(long long *, int /*<<< orphan*/, int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int main(int argv, const char **args) {
  time_t start;
  start = time(NULL);
  if (argv != 3) {
    printf("\nUsage: intersect_kmer_lists [readkmerlist1] [refkmerlist2]\n\n");
    exit(1);
  }
  FILE *fListFile1;
  FILE *fListFile2;
  if ((fListFile1 = fopen(args[1], "r")) == NULL) {
    fprintf(stderr, "Can't open file: %s\n\n", args[1]);
    exit(1);
  }
  if ((fListFile2 = fopen(args[2], "r")) == NULL) {
    fprintf(stderr, "Can't open file: %s\n\n", args[2]);
    exit(1);
  }
  long long *laList1;
  long long *laList2;
  if ((laList1 = (long long *)malloc(sizeof(long long) * 20000000)) == NULL) {
    fprintf(stderr, "Memory allocation failed\n");
    exit(2);
  }
  if ((laList2 = (long long *)malloc(sizeof(long long) * 20000000)) == NULL) {
    fprintf(stderr, "Memory allocation failed\n");
    exit(2);
  }
  memset(laList1, 0, sizeof(long long) * 20000000);
  memset(laList2, 0, sizeof(long long) * 20000000);
  long long llLen1 = 0, llLen2 = 0;
  while (!feof(fListFile1)) {
    fscanf(fListFile1, "%lld\n", &laList1[llLen1]);
    llLen1++;
  }
  while (!feof(fListFile2)) {
    fscanf(fListFile2, "%lld\n", &laList2[llLen2]);
    llLen2++;
  }
  long long i = 0, j = 0, c = 0, u = 0;
  while (i < llLen1 && j < llLen2) {
    u++;
    if (laList1[i] == laList2[j]) {
      i++;
      j++;
      c++;
      continue;
    }
    if (laList1[i] > laList2[j]) {
      j++;
    } else {
      i++;
    }
  }
  u += (llLen1 - i);
  u += (llLen2 - j);
  long double flJacc = 0.0;
  flJacc = (long double)c / (long double)u;
  printf("%Lf\t%s\t%s\n", flJacc, args[1], args[2]);
  free(laList1);
  free(laList2);
  fclose(fListFile1);
  fclose(fListFile2);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xb0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   10a0 <time@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x3,-0x8(%rbp)
je     11f7 <main+0x47>
lea    0xe1a(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    $0x1,%edi
call   10d0 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe38(%rip),%rsi
call   10c0 <fopen@plt>
mov    %rax,-0x20(%rbp)
cmp    $0x0,%rax
jne    1242 <main+0x92>
mov    0x2dc0(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdx
lea    0xe0f(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
mov    $0x1,%edi
call   10d0 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
lea    0xded(%rip),%rsi
call   10c0 <fopen@plt>
mov    %rax,-0x28(%rbp)
cmp    $0x0,%rax
jne    128d <main+0xdd>
mov    0x2d75(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdx
lea    0xdc4(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
mov    $0x1,%edi
call   10d0 <exit@plt>
mov    $0x9896800,%edi
call   10b0 <malloc@plt>
mov    %rax,-0x30(%rbp)
cmp    $0x0,%rax
jne    12c6 <main+0x116>
mov    0x2d34(%rip),%rax
mov    (%rax),%edi
lea    0xda1(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
mov    $0x2,%edi
call   10d0 <exit@plt>
mov    $0x9896800,%edi
call   10b0 <malloc@plt>
mov    %rax,-0x38(%rbp)
cmp    $0x0,%rax
jne    12ff <main+0x14f>
mov    0x2cfb(%rip),%rax
mov    (%rax),%edi
lea    0xd68(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
mov    $0x2,%edi
call   10d0 <exit@plt>
mov    -0x30(%rbp),%rdi
xor    %esi,%esi
mov    $0x9896800,%edx
call   1060 <memset@plt>
mov    -0x38(%rbp),%rdi
xor    %esi,%esi
mov    $0x9896800,%edx
call   1060 <memset@plt>
movq   $0x0,-0x40(%rbp)
movq   $0x0,-0x48(%rbp)
mov    -0x20(%rbp),%rdi
call   1090 <feof@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    134d <main+0x19d>
jmp    137d <main+0x1cd>
mov    -0x20(%rbp),%rdi
mov    -0x30(%rbp),%rdx
mov    -0x40(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rdx
lea    0xd09(%rip),%rsi
call   1070 <fscanf@plt>
mov    -0x40(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x40(%rbp)
jmp    132f <main+0x17f>
jmp    1382 <main+0x1d2>
mov    -0x28(%rbp),%rdi
call   1090 <feof@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    13a0 <main+0x1f0>
jmp    13d0 <main+0x220>
mov    -0x28(%rbp),%rdi
mov    -0x38(%rbp),%rdx
mov    -0x48(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rdx
lea    0xcb6(%rip),%rsi
call   1070 <fscanf@plt>
mov    -0x48(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x48(%rbp)
jmp    1382 <main+0x1d2>
movq   $0x0,-0x50(%rbp)
movq   $0x0,-0x58(%rbp)
movq   $0x0,-0x60(%rbp)
movq   $0x0,-0x68(%rbp)
mov    -0x50(%rbp),%rcx
xor    %eax,%eax
cmp    -0x40(%rbp),%rcx
mov    %al,-0x91(%rbp)
jge    1417 <main+0x267>
mov    -0x58(%rbp),%rax
cmp    -0x48(%rbp),%rax
setl   %al
mov    %al,-0x91(%rbp)
mov    -0x91(%rbp),%al
test   $0x1,%al
jne    142a <main+0x27a>
jmp    14bd <main+0x30d>
mov    -0x68(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x68(%rbp)
mov    -0x30(%rbp),%rax
mov    -0x50(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    -0x38(%rbp),%rcx
mov    -0x58(%rbp),%rdx
cmp    (%rcx,%rdx,8),%rax
jne    147d <main+0x2cd>
mov    -0x50(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x50(%rbp)
mov    -0x58(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x58(%rbp)
mov    -0x60(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x60(%rbp)
jmp    13f0 <main+0x240>
mov    -0x30(%rbp),%rax
mov    -0x50(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    -0x38(%rbp),%rcx
mov    -0x58(%rbp),%rdx
cmp    (%rcx,%rdx,8),%rax
jle    14ac <main+0x2fc>
mov    -0x58(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x58(%rbp)
jmp    14b8 <main+0x308>
mov    -0x50(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x50(%rbp)
jmp    13f0 <main+0x240>
mov    -0x40(%rbp),%rcx
mov    -0x50(%rbp),%rax
sub    %rax,%rcx
mov    -0x68(%rbp),%rax
add    %rcx,%rax
mov    %rax,-0x68(%rbp)
mov    -0x48(%rbp),%rcx
mov    -0x58(%rbp),%rax
sub    %rax,%rcx
mov    -0x68(%rbp),%rax
add    %rcx,%rax
mov    %rax,-0x68(%rbp)
fldz
fstpt  -0x80(%rbp)
mov    -0x60(%rbp),%rax
mov    %rax,-0x88(%rbp)
fildll -0x88(%rbp)
mov    -0x68(%rbp),%rax
mov    %rax,-0x90(%rbp)
fildll -0x90(%rbp)
fdivrp %st,%st(1)
fstpt  -0x80(%rbp)
fldt   -0x80(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdx
mov    %rsp,%rax
fstpt  (%rax)
lea    0xb42(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    -0x30(%rbp),%rdi
call   1030 <free@plt>
mov    -0x38(%rbp),%rdi
call   1030 <free@plt>
mov    -0x20(%rbp),%rdi
call   1040 <fclose@plt>
mov    -0x28(%rbp),%rdi
call   1040 <fclose@plt>
xor    %eax,%eax
add    $0xb0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
mov    %rsi,%r12
mov    %edi,%ebx
xor    %edi,%edi
call   10b0 <time@plt>
cmp    $0x3,%ebx
jne    1442 <main+0x282>
mov    0x8(%r12),%rdi
lea    0xe11(%rip),%rsi
call   10d0 <fopen@plt>
test   %rax,%rax
je     1458 <main+0x298>
mov    %rax,%r15
mov    0x10(%r12),%rdi
lea    0xdf4(%rip),%rsi
call   10d0 <fopen@plt>
test   %rax,%rax
je     1468 <main+0x2a8>
mov    %rax,%r14
mov    $0x9896800,%edi
call   10c0 <malloc@plt>
test   %rax,%rax
je     1421 <main+0x261>
mov    %rax,%rbx
mov    $0x9896800,%edi
call   10c0 <malloc@plt>
test   %rax,%rax
je     1421 <main+0x261>
mov    %rax,%rbp
mov    %r12,0x10(%rsp)
xor    %r13d,%r13d
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x9896800,%edx
call   1070 <memset@plt>
mov    %rbp,0x18(%rsp)
mov    %rbp,%rdi
xor    %esi,%esi
mov    $0x9896800,%edx
call   1070 <memset@plt>
mov    %r15,%rdi
call   10a0 <feof@plt>
test   %eax,%eax
mov    %rbx,0x20(%rsp)
jne    12b2 <main+0xf2>
xor    %r13d,%r13d
lea    0xda3(%rip),%rbp
nop
mov    %r15,%rdi
mov    %rbp,%rsi
mov    %rbx,%rdx
call   1080 <fscanf@plt>
add    $0x1,%r13
mov    %r15,%rdi
call   10a0 <feof@plt>
add    $0x8,%rbx
test   %eax,%eax
je     1290 <main+0xd0>
mov    %r14,%rdi
call   10a0 <feof@plt>
test   %eax,%eax
je     1344 <main+0x184>
xor    %r9d,%r9d
xor    %r8d,%r8d
xor    %edx,%edx
xor    %edi,%edi
xor    %ecx,%ecx
mov    0x10(%rsp),%r10
mov    0x20(%rsp),%r12
add    %rdi,%rdx
add    %r13,%r9
sub    %rdx,%r9
add    %rcx,%r9
mov    %r8,0x28(%rsp)
fildll 0x28(%rsp)
mov    %r9,0x30(%rsp)
fildll 0x30(%rsp)
fdivrp %st,%st(1)
mov    0x8(%r10),%rsi
mov    0x10(%r10),%rdx
fstpt  (%rsp)
lea    0xd2e(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %r12,%rdi
call   1030 <free@plt>
mov    0x18(%rsp),%rdi
call   1030 <free@plt>
mov    %r15,%rdi
call   1050 <fclose@plt>
mov    %r14,%rdi
call   1050 <fclose@plt>
xor    %eax,%eax
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    $0xffffffffffffffff,%rbp
lea    0xce0(%rip),%r12
mov    0x18(%rsp),%rbx
nopw   0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %r12,%rsi
mov    %rbx,%rdx
call   1080 <fscanf@plt>
mov    %r14,%rdi
call   10a0 <feof@plt>
add    $0x1,%rbp
add    $0x8,%rbx
test   %eax,%eax
je     1360 <main+0x1a0>
lea    0x1(%rbp),%r9
test   %r13,%r13
mov    0x20(%rsp),%r12
jle    140e <main+0x24e>
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %ebx,%ebx
xor    %edx,%edx
mov    0x10(%rsp),%r10
mov    0x18(%rsp),%r11
add    $0x1,%rcx
mov    %rcx,%rsi
mov    %rbx,%rdi
nopl   (%rax)
mov    %rsi,%rcx
mov    (%r11,%rdi,8),%rsi
cmp    %rsi,(%r12,%rdx,8)
je     13f0 <main+0x230>
setg   %bl
setle  %al
movzbl %al,%eax
add    %rax,%rdx
movzbl %bl,%eax
add    %rax,%rdi
cmp    %rdx,%r13
jle    12d8 <main+0x118>
lea    0x1(%rcx),%rsi
cmp    %rdi,%rbp
jge    13b0 <main+0x1f0>
jmp    12d8 <main+0x118>
cs nopw 0x0(%rax,%rax,1)
add    $0x1,%rdx
lea    0x1(%rdi),%rbx
add    $0x1,%r8
cmp    %rdx,%r13
jle    1406 <main+0x246>
cmp    %rdi,%rbp
jg     13a3 <main+0x1e3>
mov    %rbx,%rdi
jmp    12d8 <main+0x118>
xor    %r8d,%r8d
xor    %edx,%edx
xor    %edi,%edi
xor    %ecx,%ecx
mov    0x10(%rsp),%r10
jmp    12d8 <main+0x118>
mov    0x2bb8(%rip),%rax
mov    (%rax),%edi
lea    0xbe7(%rip),%rsi
xor    %eax,%eax
call   1090 <fprintf@plt>
mov    $0x2,%edi
call   10e0 <exit@plt>
lea    0xbfa(%rip),%rdi
call   1040 <puts@plt>
mov    $0x1,%edi
call   10e0 <exit@plt>
mov    0x2b81(%rip),%rax
mov    (%rax),%edi
mov    0x8(%r12),%rdx
jmp    1476 <main+0x2b6>
mov    0x2b71(%rip),%rax
mov    (%rax),%edi
mov    0x10(%r12),%rdx
lea    0xb85(%rip),%rsi
xor    %eax,%eax
call   1090 <fprintf@plt>
mov    $0x1,%edi
call   10e0 <exit@plt>

LLVM IR (-O0):
@.str = [62 x i8] c"\0AUsage: intersect_kmer_lists [readkmerlist1] [refkmerlist2]\0A\0A\00"
@.str.1 = [2 x i8] c"r\00"
@stderr = global i32 0
@.str.2 = [22 x i8] c"Can't open file: %s\0A\0A\00"
@.str.3 = [26 x i8] c"Memory allocation failed\0A\00"
@.str.4 = [6 x i8] c"%lld\0A\00"
@.str.5 = [11 x i8] c"%Lf\09%s\09%s\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32*
%8 = alloca i32*
%9 = alloca i64*
%10 = alloca i64*
%11 = alloca i64
%12 = alloca i64
%13 = alloca i64
%14 = alloca i64
%15 = alloca i64
%16 = alloca i64
%17 = alloca x86_fp80
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%18 = call i32 @time(i32* null)
store i32 %18, i32* %6
%19 = load i32, i32* %4
%20 = icmp ne i32 %19, 3
br i1 %20, label %21, label %24
21: ; preds = %2
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str, i64 0, i64 0))
%23 = call i32 @exit(i32 1)
unreachable
24: ; preds = %2
%25 = load i8**, i8*** %5
%26 = getelementptr inbounds i8*, i8** %25, i64 1
%27 = load i8*, i8** %26
%28 = call i32* @fopen(i8* %27, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %28, i32** %7
%29 = icmp eq i32* %28, null
br i1 %29, label %30, label %37
30: ; preds = %24
%31 = load i32, i32* @stderr
%32 = load i8**, i8*** %5
%33 = getelementptr inbounds i8*, i8** %32, i64 1
%34 = load i8*, i8** %33
%35 = call i32 (i32, i8*, ...) @fprintf(i32 %31, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0), i8* %34)
%36 = call i32 @exit(i32 1)
unreachable
37: ; preds = %24
%38 = load i8**, i8*** %5
%39 = getelementptr inbounds i8*, i8** %38, i64 2
%40 = load i8*, i8** %39
%41 = call i32* @fopen(i8* %40, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %41, i32** %8
%42 = icmp eq i32* %41, null
br i1 %42, label %43, label %50
43: ; preds = %37
%44 = load i32, i32* @stderr
%45 = load i8**, i8*** %5
%46 = getelementptr inbounds i8*, i8** %45, i64 2
%47 = load i8*, i8** %46
%48 = call i32 (i32, i8*, ...) @fprintf(i32 %44, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0), i8* %47)
%49 = call i32 @exit(i32 1)
unreachable
50: ; preds = %37
%51 = call i64 @malloc(i32 160000000)
%52 = inttoptr i64 %51 to i64*
store i64* %52, i64** %9
%53 = icmp eq i64* %52, null
br i1 %53, label %54, label %58
54: ; preds = %50
%55 = load i32, i32* @stderr
%56 = call i32 (i32, i8*, ...) @fprintf(i32 %55, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.3, i64 0, i64 0))
%57 = call i32 @exit(i32 2)
unreachable
58: ; preds = %50
%59 = call i64 @malloc(i32 160000000)
%60 = inttoptr i64 %59 to i64*
store i64* %60, i64** %10
%61 = icmp eq i64* %60, null
br i1 %61, label %62, label %66
62: ; preds = %58
%63 = load i32, i32* @stderr
%64 = call i32 (i32, i8*, ...) @fprintf(i32 %63, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.3, i64 0, i64 0))
%65 = call i32 @exit(i32 2)
unreachable
66: ; preds = %58
%67 = load i64*, i64** %9
%68 = call i32 @memset(i64* %67, i32 0, i32 160000000)
%69 = load i64*, i64** %10
%70 = call i32 @memset(i64* %69, i32 0, i32 160000000)
store i64 0, i64* %11
store i64 0, i64* %12
br label %71
71: ; preds = %76, %66
%72 = load i32*, i32** %7
%73 = call i32 @feof(i32* %72)
%74 = icmp ne i32 %73, 0
%75 = xor i1 %74, true
br i1 %75, label %76, label %84
76: ; preds = %71
%77 = load i32*, i32** %7
%78 = load i64*, i64** %9
%79 = load i64, i64* %11
%80 = getelementptr inbounds i64, i64* %78, i64 %79
%81 = call i32 @fscanf(i32* %77, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i64* %80)
%82 = load i64, i64* %11
%83 = add nsw i64 %82, 1
store i64 %83, i64* %11
br label %71
84: ; preds = %71
br label %85
85: ; preds = %90, %84
%86 = load i32*, i32** %8
%87 = call i32 @feof(i32* %86)
%88 = icmp ne i32 %87, 0
%89 = xor i1 %88, true
br i1 %89, label %90, label %98
90: ; preds = %85
%91 = load i32*, i32** %8
%92 = load i64*, i64** %10
%93 = load i64, i64* %12
%94 = getelementptr inbounds i64, i64* %92, i64 %93
%95 = call i32 @fscanf(i32* %91, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i64* %94)
%96 = load i64, i64* %12
%97 = add nsw i64 %96, 1
store i64 %97, i64* %12
br label %85
98: ; preds = %85
store i64 0, i64* %13
store i64 0, i64* %14
store i64 0, i64* %15
store i64 0, i64* %16
br label %99
99: ; preds = %144, %121, %98
%100 = load i64, i64* %13
%101 = load i64, i64* %11
%102 = icmp slt i64 %100, %101
br i1 %102, label %103, label %107
103: ; preds = %99
%104 = load i64, i64* %14
%105 = load i64, i64* %12
%106 = icmp slt i64 %104, %105
br label %107
107: ; preds = %103, %99
%108 = phi i1 [ false, %99 ], [ %106, %103 ]
br i1 %108, label %109, label %145
109: ; preds = %107
%110 = load i64, i64* %16
%111 = add nsw i64 %110, 1
store i64 %111, i64* %16
%112 = load i64*, i64** %9
%113 = load i64, i64* %13
%114 = getelementptr inbounds i64, i64* %112, i64 %113
%115 = load i64, i64* %114
%116 = load i64*, i64** %10
%117 = load i64, i64* %14
%118 = getelementptr inbounds i64, i64* %116, i64 %117
%119 = load i64, i64* %118
%120 = icmp eq i64 %115, %119
br i1 %120, label %121, label %128
121: ; preds = %109
%122 = load i64, i64* %13
%123 = add nsw i64 %122, 1
store i64 %123, i64* %13
%124 = load i64, i64* %14
%125 = add nsw i64 %124, 1
store i64 %125, i64* %14
%126 = load i64, i64* %15
%127 = add nsw i64 %126, 1
store i64 %127, i64* %15
br label %99
128: ; preds = %109
%129 = load i64*, i64** %9
%130 = load i64, i64* %13
%131 = getelementptr inbounds i64, i64* %129, i64 %130
%132 = load i64, i64* %131
%133 = load i64*, i64** %10
%134 = load i64, i64* %14
%135 = getelementptr inbounds i64, i64* %133, i64 %134
%136 = load i64, i64* %135
%137 = icmp sgt i64 %132, %136
br i1 %137, label %138, label %141
138: ; preds = %128
%139 = load i64, i64* %14
%140 = add nsw i64 %139, 1
store i64 %140, i64* %14
br label %144
141: ; preds = %128
%142 = load i64, i64* %13
%143 = add nsw i64 %142, 1
store i64 %143, i64* %13
br label %144
144: ; preds = %141, %138
br label %99
145: ; preds = %107
%146 = load i64, i64* %11
%147 = load i64, i64* %13
%148 = sub nsw i64 %146, %147
%149 = load i64, i64* %16
%150 = add nsw i64 %149, %148
store i64 %150, i64* %16
%151 = load i64, i64* %12
%152 = load i64, i64* %14
%153 = sub nsw i64 %151, %152
%154 = load i64, i64* %16
%155 = add nsw i64 %154, %153
store i64 %155, i64* %16
store x86_fp80 0xK00000000000000000000, x86_fp80* %17
%156 = load i64, i64* %15
%157 = sitofp i64 %156 to x86_fp80
%158 = load i64, i64* %16
%159 = sitofp i64 %158 to x86_fp80
%160 = fdiv x86_fp80 %157, %159
store x86_fp80 %160, x86_fp80* %17
%161 = load x86_fp80, x86_fp80* %17
%162 = load i8**, i8*** %5
%163 = getelementptr inbounds i8*, i8** %162, i64 1
%164 = load i8*, i8** %163
%165 = load i8**, i8*** %5
%166 = getelementptr inbounds i8*, i8** %165, i64 2
%167 = load i8*, i8** %166
%168 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.5, i64 0, i64 0), x86_fp80 %161, i8* %164, i8* %167)
%169 = load i64*, i64** %9
%170 = call i32 @free(i64* %169)
%171 = load i64*, i64** %10
%172 = call i32 @free(i64* %171)
%173 = load i32*, i32** %7
%174 = call i32 @fclose(i32* %173)
%175 = load i32*, i32** %8
%176 = call i32 @fclose(i32* %175)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [2 x i8] c"r\00"
@stderr = global i32 0
@.str.2 = [22 x i8] c"Can't open file: %s\0A\0A\00"
@.str.3 = [26 x i8] c"Memory allocation failed\0A\00"
@.str.4 = [6 x i8] c"%lld\0A\00"
@.str.5 = [11 x i8] c"%Lf\09%s\09%s\0A\00"
@str = [61 x i8] c"\0AUsage: intersect_kmer_lists [readkmerlist1] [refkmerlist2]\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = tail call i32 @time(i32* null)
%4 = icmp eq i32 %0, 3
br i1 %4, label %8, label %5
5: ; preds = %2
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([61 x i8], [61 x i8]* @str, i64 0, i64 0))
%7 = tail call i32 @exit(i32 1)
unreachable
8: ; preds = %2
%9 = getelementptr inbounds i8*, i8** %1, i64 1
%10 = load i8*, i8** %9
%11 = tail call i32* @fopen(i8* %10, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%12 = icmp eq i32* %11, null
br i1 %12, label %13, label %18
13: ; preds = %8
%14 = load i32, i32* @stderr
%15 = load i8*, i8** %9
%16 = tail call i32 (i32, i8*, ...) @fprintf(i32 %14, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0), i8* %15)
%17 = tail call i32 @exit(i32 1)
unreachable
18: ; preds = %8
%19 = getelementptr inbounds i8*, i8** %1, i64 2
%20 = load i8*, i8** %19
%21 = tail call i32* @fopen(i8* %20, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%22 = icmp eq i32* %21, null
br i1 %22, label %23, label %28
23: ; preds = %18
%24 = load i32, i32* @stderr
%25 = load i8*, i8** %19
%26 = tail call i32 (i32, i8*, ...) @fprintf(i32 %24, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0), i8* %25)
%27 = tail call i32 @exit(i32 1)
unreachable
28: ; preds = %18
%29 = tail call i64 @malloc(i32 160000000)
%30 = inttoptr i64 %29 to i64*
%31 = icmp eq i64 %29, 0
br i1 %31, label %32, label %36
32: ; preds = %28
%33 = load i32, i32* @stderr
%34 = tail call i32 (i32, i8*, ...) @fprintf(i32 %33, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.3, i64 0, i64 0))
%35 = tail call i32 @exit(i32 2)
unreachable
36: ; preds = %28
%37 = tail call i64 @malloc(i32 160000000)
%38 = inttoptr i64 %37 to i64*
%39 = icmp eq i64 %37, 0
br i1 %39, label %40, label %44
40: ; preds = %36
%41 = load i32, i32* @stderr
%42 = tail call i32 (i32, i8*, ...) @fprintf(i32 %41, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.3, i64 0, i64 0))
%43 = tail call i32 @exit(i32 2)
unreachable
44: ; preds = %36
%45 = tail call i32 @memset(i64* %30, i32 0, i32 160000000)
%46 = tail call i32 @memset(i64* %38, i32 0, i32 160000000)
%47 = tail call i32 @feof(i32* %11)
%48 = icmp eq i32 %47, 0
br i1 %48, label %53, label %49
49: ; preds = %53, %44
%50 = phi i64 [ 0, %44 ], [ %57, %53 ]
%51 = tail call i32 @feof(i32* %21)
%52 = icmp eq i32 %51, 0
br i1 %52, label %62, label %101
53: ; preds = %44, %53
%54 = phi i64 [ %57, %53 ], [ 0, %44 ]
%55 = getelementptr inbounds i64, i64* %30, i64 %54
%56 = tail call i32 @fscanf(i32* %11, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i64* %55)
%57 = add nuw nsw i64 %54, 1
%58 = tail call i32 @feof(i32* %11)
%59 = icmp eq i32 %58, 0
br i1 %59, label %53, label %49
60: ; preds = %62
%61 = icmp sgt i64 %50, 0
br i1 %61, label %86, label %101
62: ; preds = %49, %62
%63 = phi i64 [ %66, %62 ], [ 0, %49 ]
%64 = getelementptr inbounds i64, i64* %38, i64 %63
%65 = tail call i32 @fscanf(i32* %21, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i64* %64)
%66 = add nuw nsw i64 %63, 1
%67 = tail call i32 @feof(i32* %21)
%68 = icmp eq i32 %67, 0
br i1 %68, label %62, label %60
69: ; preds = %86, %91
%70 = phi i64 [ %87, %86 ], [ %73, %91 ]
%71 = phi i64 [ %89, %86 ], [ %97, %91 ]
%72 = phi i64 [ %90, %86 ], [ %95, %91 ]
%73 = add nsw i64 %70, 1
%74 = getelementptr inbounds i64, i64* %30, i64 %72
%75 = load i64, i64* %74
%76 = getelementptr inbounds i64, i64* %38, i64 %71
%77 = load i64, i64* %76
%78 = icmp eq i64 %75, %77
br i1 %78, label %79, label %91
79: ; preds = %69
%80 = add nsw i64 %72, 1
%81 = add nsw i64 %71, 1
%82 = add nuw nsw i64 %88, 1
%83 = icmp sgt i64 %50, %80
%84 = icmp sgt i64 %63, %71
%85 = select i1 %83, i1 %84, i1 false
br i1 %85, label %86, label %101
86: ; preds = %60, %79
%87 = phi i64 [ %73, %79 ], [ 0, %60 ]
%88 = phi i64 [ %82, %79 ], [ 0, %60 ]
%89 = phi i64 [ %81, %79 ], [ 0, %60 ]
%90 = phi i64 [ %80, %79 ], [ 0, %60 ]
br label %69
91: ; preds = %69
%92 = icmp sgt i64 %75, %77
%93 = xor i1 %92, true
%94 = zext i1 %93 to i64
%95 = add nsw i64 %72, %94
%96 = zext i1 %92 to i64
%97 = add nsw i64 %71, %96
%98 = icmp sgt i64 %50, %95
%99 = icmp sge i64 %63, %97
%100 = select i1 %98, i1 %99, i1 false
br i1 %100, label %69, label %101
101: ; preds = %79, %91, %49, %60
%102 = phi i64 [ %66, %60 ], [ 0, %49 ], [ %66, %91 ], [ %66, %79 ]
%103 = phi i64 [ 0, %60 ], [ 0, %49 ], [ %88, %91 ], [ %82, %79 ]
%104 = phi i64 [ 0, %60 ], [ 0, %49 ], [ %95, %91 ], [ %80, %79 ]
%105 = phi i64 [ 0, %60 ], [ 0, %49 ], [ %97, %91 ], [ %81, %79 ]
%106 = phi i64 [ 0, %60 ], [ 0, %49 ], [ %73, %91 ], [ %73, %79 ]
%107 = add i64 %102, %50
%108 = add i64 %104, %105
%109 = sub i64 %107, %108
%110 = add i64 %109, %106
%111 = sitofp i64 %103 to x86_fp80
%112 = sitofp i64 %110 to x86_fp80
%113 = fdiv x86_fp80 %111, %112
%114 = load i8*, i8** %9
%115 = load i8*, i8** %19
%116 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.5, i64 0, i64 0), x86_fp80 %113, i8* %114, i8* %115)
%117 = tail call i32 @free(i64* %30)
%118 = tail call i32 @free(i64* %38)
%119 = tail call i32 @fclose(i32* %11)
%120 = tail call i32 @fclose(i32* %21)
ret i32 0
}