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

/* Variables and functions */
int /*<<< orphan*/ SEEK_SET;
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ feof(int /*<<< orphan*/ *);
char fgetc(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fgets(char *, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char *);
int /*<<< orphan*/ fseek(int /*<<< orphan*/ *, long, int /*<<< orphan*/);
int ftell(int /*<<< orphan*/ *);
int /*<<< orphan*/ fwrite(char *, int, int, int /*<<< orphan*/ *);
scalar_t__ islower(char);
scalar_t__ isupper(char);
scalar_t__ malloc(int);
int /*<<< orphan*/ terror(char *);
int main(int ac, char **av) {
  FILE *fIn, *fOut;
  int64_t i, j, nR, seqLen = 0;
  char *seq, c, toW;
  long offset[1000000];
  if (ac != 3)
    terror("USE: reverseComplement seqFile.IN reverseComplementarySeq.OUT");
  if ((seq = (char *)malloc(2000000000)) == NULL)
    terror("memory for Seq");
  if ((fIn = fopen(av[1], "rt")) == NULL)
    terror("opening IN sequence FASTA file");
  if ((fOut = fopen(av[2], "wt")) == NULL)
    terror("opening OUT sequence Words file");
  for (i = 0; i < 1000000; i++) {
    offset[i] = 0;
  }
  nR = 0;
  c = fgetc(fIn);
  while (!feof(fIn)) {
    if (c == '>') {
      offset[nR++] = ftell(fIn) - 1;
    }
    c = fgetc(fIn);
  }
  for (i = nR - 1; i >= 0; i--) {
    fseek(fIn, offset[i], SEEK_SET);
    if (fgets(seq, 2000000000, fIn) == NULL) {
      terror("Empty file");
    }
    fprintf(fOut, "%s", seq);
    c = fgetc(fIn);
    while (c != '>' && !feof(fIn)) {
      if (isupper(c) || islower(c)) {
        seq[seqLen++] = c;
      }
      c = fgetc(fIn);
    }
    for (j = seqLen - 1; j >= 0; j--) {
      switch (seq[j]) {
      case 'A':
        toW = 'T';
        break;
      case 'C':
        toW = 'G';
        break;
      case 'G':
        toW = 'C';
        break;
      case 'T':
        toW = 'A';
        break;
      case 'U':
        toW = 'A';
        break;
      case 'a':
        toW = 't';
        break;
      case 'c':
        toW = 'g';
        break;
      case 'g':
        toW = 'c';
        break;
      case 't':
        toW = 'a';
        break;
      case 'u':
        toW = 'a';
        break;
      default:
        toW = seq[j];
        break;
      }
      fwrite(&toW, sizeof(char), 1, fOut);
    }
    toW = '\n';
    fwrite(&toW, sizeof(char), 1, fOut);
    seqLen = 0;
  }
  fclose(fIn);
  fclose(fOut);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x7a1250,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x30(%rbp)
cmpl   $0x3,-0x8(%rbp)
je     1206 <main+0x36>
lea    0xed3(%rip),%rdi
call   10d0 <terror@plt>
mov    $0x77359400,%edi
call   10a0 <malloc@plt>
mov    %rax,-0x38(%rbp)
cmp    $0x0,%rax
jne    122a <main+0x5a>
lea    0xeed(%rip),%rdi
call   10d0 <terror@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xee8(%rip),%rsi
call   10e0 <fopen@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
jne    1258 <main+0x88>
lea    0xed1(%rip),%rdi
call   10d0 <terror@plt>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
lea    0xedc(%rip),%rsi
call   10e0 <fopen@plt>
mov    %rax,-0x20(%rbp)
cmp    $0x0,%rax
jne    1286 <main+0xb6>
lea    0xec5(%rip),%rdi
call   10d0 <terror@plt>
movl   $0x0,-0x24(%rbp)
cmpl   $0xf4240,-0x24(%rbp)
jge    12b8 <main+0xe8>
movslq -0x24(%rbp),%rax
movq   $0x0,-0x7a1240(%rbp,%rax,8)
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    128d <main+0xbd>
movl   $0x0,-0x2c(%rbp)
mov    -0x18(%rbp),%rdi
call   1050 <fgetc@plt>
mov    %al,-0x39(%rbp)
mov    -0x18(%rbp),%rdi
call   1090 <feof@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    12e9 <main+0x119>
jmp    132b <main+0x15b>
movsbl -0x39(%rbp),%eax
cmp    $0x3e,%eax
jne    131a <main+0x14a>
mov    -0x18(%rbp),%rdi
call   1080 <ftell@plt>
sub    $0x1,%eax
movslq %eax,%rcx
mov    -0x2c(%rbp),%eax
mov    %eax,%edx
add    $0x1,%edx
mov    %edx,-0x2c(%rbp)
cltq
mov    %rcx,-0x7a1240(%rbp,%rax,8)
ff
mov    -0x18(%rbp),%rdi
call   1050 <fgetc@plt>
mov    %al,-0x39(%rbp)
jmp    12cb <main+0xfb>
mov    -0x2c(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x24(%rbp)
cmpl   $0x0,-0x24(%rbp)
jl     1534 <main+0x364>
mov    -0x18(%rbp),%rdi
movslq -0x24(%rbp),%rax
mov    -0x7a1240(%rbp,%rax,8),%rsi
ff
mov    0x2c8b(%rip),%rax
mov    (%rax),%edx
call   10b0 <fseek@plt>
mov    -0x38(%rbp),%rdi
mov    -0x18(%rbp),%rdx
mov    $0x77359400,%esi
call   1060 <fgets@plt>
cmp    $0x0,%rax
jne    1384 <main+0x1b4>
lea    0xde7(%rip),%rdi
call   10d0 <terror@plt>
mov    -0x20(%rbp),%rdi
mov    -0x38(%rbp),%rdx
lea    0xdde(%rip),%rsi
call   1070 <fprintf@plt>
mov    -0x18(%rbp),%rdi
call   1050 <fgetc@plt>
mov    %al,-0x39(%rbp)
movsbl -0x39(%rbp),%ecx
xor    %eax,%eax
cmp    $0x3e,%ecx
mov    %al,-0x7a1241(%rbp)
je     13d0 <main+0x200>
mov    -0x18(%rbp),%rdi
call   1090 <feof@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
mov    %al,-0x7a1241(%rbp)
mov    -0x7a1241(%rbp),%al
test   $0x1,%al
jne    13e3 <main+0x213>
jmp    1432 <main+0x262>
movsbl -0x39(%rbp),%edi
call   10c0 <isupper@plt>
cmp    $0x0,%rax
jne    1409 <main+0x239>
movsbl -0x39(%rbp),%edi
call   1030 <islower@plt>
cmp    $0x0,%rax
je     1421 <main+0x251>
mov    -0x39(%rbp),%dl
mov    -0x38(%rbp),%rax
mov    -0x30(%rbp),%ecx
mov    %ecx,%esi
add    $0x1,%esi
mov    %esi,-0x30(%rbp)
movslq %ecx,%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x18(%rbp),%rdi
call   1050 <fgetc@plt>
mov    %al,-0x39(%rbp)
jmp    13a4 <main+0x1d4>
mov    -0x30(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x28(%rbp)
cmpl   $0x0,-0x28(%rbp)
jl     1507 <main+0x337>
mov    -0x38(%rbp),%rax
movslq -0x28(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
add    $0xffffffbf,%eax
mov    %eax,%ecx
mov    %rcx,-0x7a1250(%rbp)
sub    $0x34,%eax
ja     14d7 <main+0x307>
mov    -0x7a1250(%rbp),%rax
lea    0xb8c(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movb   $0x54,-0x3a(%rbp)
jmp    14e5 <main+0x315>
movb   $0x47,-0x3a(%rbp)
jmp    14e5 <main+0x315>
movb   $0x43,-0x3a(%rbp)
jmp    14e5 <main+0x315>
movb   $0x41,-0x3a(%rbp)
jmp    14e5 <main+0x315>
movb   $0x41,-0x3a(%rbp)
jmp    14e5 <main+0x315>
movb   $0x74,-0x3a(%rbp)
jmp    14e5 <main+0x315>
movb   $0x67,-0x3a(%rbp)
jmp    14e5 <main+0x315>
movb   $0x63,-0x3a(%rbp)
jmp    14e5 <main+0x315>
movb   $0x61,-0x3a(%rbp)
jmp    14e5 <main+0x315>
movb   $0x61,-0x3a(%rbp)
jmp    14e5 <main+0x315>
mov    -0x38(%rbp),%rax
movslq -0x28(%rbp),%rcx
mov    (%rax,%rcx,1),%al
mov    %al,-0x3a(%rbp)
mov    -0x20(%rbp),%rcx
lea    -0x3a(%rbp),%rdi
mov    $0x1,%edx
mov    %edx,%esi
call   10f0 <fwrite@plt>
mov    -0x28(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x28(%rbp)
jmp    143b <main+0x26b>
movb   $0xa,-0x3a(%rbp)
mov    -0x20(%rbp),%rcx
lea    -0x3a(%rbp),%rdi
mov    $0x1,%edx
mov    %edx,%esi
call   10f0 <fwrite@plt>
movl   $0x0,-0x30(%rbp)
mov    -0x24(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x24(%rbp)
jmp    1334 <main+0x164>
mov    -0x18(%rbp),%rdi
call   1040 <fclose@plt>
mov    -0x20(%rbp),%rdi
call   1040 <fclose@plt>
xor    %eax,%eax
add    $0x7a1250,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x7a1228,%rsp
mov    %rsi,%rbx
cmp    $0x3,%edi
je     1205 <main+0x25>
lea    0xed4(%rip),%rdi
call   10f0 <terror@plt>
mov    $0x77359400,%edi
call   10c0 <malloc@plt>
mov    %rax,%r14
test   %rax,%rax
jne    1223 <main+0x43>
lea    0xef4(%rip),%rdi
call   10f0 <terror@plt>
mov    0x8(%rbx),%rdi
lea    0xef3(%rip),%rsi
call   1100 <fopen@plt>
mov    %rax,%r13
test   %rax,%rax
jne    1247 <main+0x67>
lea    0xee2(%rip),%rdi
call   10f0 <terror@plt>
mov    0x10(%rbx),%rdi
lea    0xef1(%rip),%rsi
call   1100 <fopen@plt>
mov    %rax,0x8(%rsp)
test   %rax,%rax
jne    126d <main+0x8d>
lea    0xede(%rip),%rdi
call   10f0 <terror@plt>
lea    0x20(%rsp),%rdi
xor    %ebp,%ebp
mov    $0x7a1200,%edx
xor    %esi,%esi
call   1060 <memset@plt>
mov    %r13,%rdi
call   1070 <fgetc@plt>
mov    %eax,%ebx
mov    %r13,%rdi
call   10b0 <feof@plt>
test   %eax,%eax
je     12d6 <main+0xf6>
mov    %r13,%rdi
call   1040 <fclose@plt>
mov    0x8(%rsp),%rdi
call   1040 <fclose@plt>
xor    %eax,%eax
add    $0x7a1228,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
nopl   0x0(%rax)
mov    %r13,%rdi
call   1070 <fgetc@plt>
mov    %eax,%ebx
mov    %r13,%rdi
call   10b0 <feof@plt>
test   %eax,%eax
jne    12f5 <main+0x115>
cmp    $0x3e,%bl
jne    12c0 <main+0xe0>
mov    %r13,%rdi
call   10a0 <ftell@plt>
add    $0xffffffff,%eax
cltq
movslq %ebp,%rcx
add    $0x1,%ebp
mov    %rax,0x20(%rsp,%rcx,8)
jmp    12c0 <main+0xe0>
test   %ebp,%ebp
jle    1296 <main+0xb6>
mov    %ebp,%eax
lea    0xcfe(%rip),%r12
jmp    1330 <main+0x150>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    $0xa,%edi
mov    0x8(%rsp),%rsi
call   1080 <fputc@plt>
cmpq   $0x1,0x10(%rsp)
mov    0x18(%rsp),%rax
jle    1296 <main+0xb6>
mov    %rax,0x10(%rsp)
add    $0xffffffffffffffff,%rax
mov    %rax,0x18(%rsp)
mov    %eax,%eax
mov    0x20(%rsp,%rax,8),%rsi
mov    0x2c94(%rip),%rax
mov    (%rax),%edx
mov    %r13,%rdi
call   10d0 <fseek@plt>
mov    %r14,%rdi
mov    $0x77359400,%esi
mov    %r13,%rdx
call   1090 <fgets@plt>
test   %rax,%rax
jne    1377 <main+0x197>
lea    0xdf4(%rip),%rdi
call   10f0 <terror@plt>
mov    %r14,%rdi
mov    0x8(%rsp),%rsi
call   1050 <fputs@plt>
mov    %r13,%rdi
call   1070 <fgetc@plt>
cmp    $0x3e,%al
je     1310 <main+0x130>
mov    %eax,%ebx
xor    %r15d,%r15d
jmp    13b9 <main+0x1d9>
nopw   0x0(%rax,%rax,1)
movslq %r15d,%rax
add    $0x1,%r15d
mov    %bl,(%r14,%rax,1)
mov    %r13,%rdi
call   1070 <fgetc@plt>
mov    %eax,%ebx
cmp    $0x3e,%al
je     13f0 <main+0x210>
mov    %r13,%rdi
call   10b0 <feof@plt>
test   %eax,%eax
jne    13f0 <main+0x210>
movsbl %bl,%ebp
mov    %ebp,%edi
call   10e0 <isupper@plt>
test   %rax,%rax
jne    13a0 <main+0x1c0>
mov    %ebp,%edi
call   1030 <islower@plt>
test   %rax,%rax
jne    13a0 <main+0x1c0>
jmp    13ab <main+0x1cb>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
test   %r15d,%r15d
jle    1310 <main+0x130>
mov    %r15d,%ebx
add    $0x1,%rbx
jmp    142b <main+0x24b>
mov    $0x61,%al
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsbl %al,%edi
mov    0x8(%rsp),%rsi
call   1080 <fputc@plt>
add    $0xffffffffffffffff,%rbx
cmp    $0x1,%rbx
jbe    1310 <main+0x130>
lea    -0x2(%rbx),%eax
movsbl (%r14,%rax,1),%ecx
lea    -0x41(%rcx),%edx
cmp    $0x34,%edx
ja     144a <main+0x26a>
mov    $0x54,%al
movslq (%r12,%rdx,4),%rdx
add    %r12,%rdx
jmp    *%rdx
mov    $0x41,%al
jmp    1410 <main+0x230>
mov    %ecx,%eax
jmp    1410 <main+0x230>
mov    $0x47,%al
jmp    1410 <main+0x230>
mov    $0x43,%al
jmp    1410 <main+0x230>
mov    $0x74,%al
jmp    1410 <main+0x230>
mov    $0x67,%al
jmp    1410 <main+0x230>
mov    $0x63,%al
jmp    1410 <main+0x230>

LLVM IR (-O0):
@.str = [62 x i8] c"USE: reverseComplement seqFile.IN reverseComplementarySeq.OUT\00"
@.str.1 = [15 x i8] c"memory for Seq\00"
@.str.2 = [3 x i8] c"rt\00"
@.str.3 = [31 x i8] c"opening IN sequence FASTA file\00"
@.str.4 = [3 x i8] c"wt\00"
@.str.5 = [32 x i8] c"opening OUT sequence Words file\00"
@SEEK_SET = global i32 0
@.str.6 = [11 x i8] c"Empty file\00"
@.str.7 = [3 x i8] c"%s\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 i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i8*
%13 = alloca i8
%14 = alloca i8
%15 = alloca [1000000 x i64]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %11
%16 = load i32, i32* %4
%17 = icmp ne i32 %16, 3
br i1 %17, label %18, label %20
18: ; preds = %2
%19 = call i32 @terror(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str, i64 0, i64 0))
br label %20
20: ; preds = %18, %2
%21 = call i64 @malloc(i32 2000000000)
%22 = inttoptr i64 %21 to i8*
store i8* %22, i8** %12
%23 = icmp eq i8* %22, null
br i1 %23, label %24, label %26
24: ; preds = %20
%25 = call i32 @terror(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
br label %26
26: ; preds = %24, %20
%27 = load i8**, i8*** %5
%28 = getelementptr inbounds i8*, i8** %27, i64 1
%29 = load i8*, i8** %28
%30 = call i32* @fopen(i8* %29, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
store i32* %30, i32** %6
%31 = icmp eq i32* %30, null
br i1 %31, label %32, label %34
32: ; preds = %26
%33 = call i32 @terror(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.3, i64 0, i64 0))
br label %34
34: ; preds = %32, %26
%35 = load i8**, i8*** %5
%36 = getelementptr inbounds i8*, i8** %35, i64 2
%37 = load i8*, i8** %36
%38 = call i32* @fopen(i8* %37, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
store i32* %38, i32** %7
%39 = icmp eq i32* %38, null
br i1 %39, label %40, label %42
40: ; preds = %34
%41 = call i32 @terror(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.5, i64 0, i64 0))
br label %42
42: ; preds = %40, %34
store i32 0, i32* %8
br label %43
43: ; preds = %50, %42
%44 = load i32, i32* %8
%45 = icmp slt i32 %44, 1000000
br i1 %45, label %46, label %53
46: ; preds = %43
%47 = load i32, i32* %8
%48 = sext i32 %47 to i64
%49 = getelementptr inbounds [1000000 x i64], [1000000 x i64]* %15, i64 0, i64 %48
store i64 0, i64* %49
br label %50
50: ; preds = %46
%51 = load i32, i32* %8
%52 = add nsw i32 %51, 1
store i32 %52, i32* %8
br label %43
53: ; preds = %43
store i32 0, i32* %10
%54 = load i32*, i32** %6
%55 = call signext i8 @fgetc(i32* %54)
store i8 %55, i8* %13
br label %56
56: ; preds = %74, %53
%57 = load i32*, i32** %6
%58 = call i32 @feof(i32* %57)
%59 = icmp ne i32 %58, 0
%60 = xor i1 %59, true
br i1 %60, label %61, label %77
61: ; preds = %56
%62 = load i8, i8* %13
%63 = sext i8 %62 to i32
%64 = icmp eq i32 %63, 62
br i1 %64, label %65, label %74
65: ; preds = %61
%66 = load i32*, i32** %6
%67 = call i32 @ftell(i32* %66)
%68 = sub nsw i32 %67, 1
%69 = sext i32 %68 to i64
%70 = load i32, i32* %10
%71 = add nsw i32 %70, 1
store i32 %71, i32* %10
%72 = sext i32 %70 to i64
%73 = getelementptr inbounds [1000000 x i64], [1000000 x i64]* %15, i64 0, i64 %72
store i64 %69, i64* %73
br label %74
74: ; preds = %65, %61
%75 = load i32*, i32** %6
%76 = call signext i8 @fgetc(i32* %75)
store i8 %76, i8* %13
br label %56
77: ; preds = %56
%78 = load i32, i32* %10
%79 = sub nsw i32 %78, 1
store i32 %79, i32* %8
br label %80
80: ; preds = %170, %77
%81 = load i32, i32* %8
%82 = icmp sge i32 %81, 0
br i1 %82, label %83, label %173
83: ; preds = %80
%84 = load i32*, i32** %6
%85 = load i32, i32* %8
%86 = sext i32 %85 to i64
%87 = getelementptr inbounds [1000000 x i64], [1000000 x i64]* %15, i64 0, i64 %86
%88 = load i64, i64* %87
%89 = load i32, i32* @SEEK_SET
%90 = call i32 @fseek(i32* %84, i64 %88, i32 %89)
%91 = load i8*, i8** %12
%92 = load i32*, i32** %6
%93 = call i32* @fgets(i8* %91, i32 2000000000, i32* %92)
%94 = icmp eq i32* %93, null
br i1 %94, label %95, label %97
95: ; preds = %83
%96 = call i32 @terror(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.6, i64 0, i64 0))
br label %97
97: ; preds = %95, %83
%98 = load i32*, i32** %7
%99 = load i8*, i8** %12
%100 = call i32 @fprintf(i32* %98, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0), i8* %99)
%101 = load i32*, i32** %6
%102 = call signext i8 @fgetc(i32* %101)
store i8 %102, i8* %13
br label %103
103: ; preds = %129, %97
%104 = load i8, i8* %13
%105 = sext i8 %104 to i32
%106 = icmp ne i32 %105, 62
br i1 %106, label %107, label %112
107: ; preds = %103
%108 = load i32*, i32** %6
%109 = call i32 @feof(i32* %108)
%110 = icmp ne i32 %109, 0
%111 = xor i1 %110, true
br label %112
112: ; preds = %107, %103
%113 = phi i1 [ false, %103 ], [ %111, %107 ]
br i1 %113, label %114, label %132
114: ; preds = %112
%115 = load i8, i8* %13
%116 = call i64 @isupper(i8 signext %115)
%117 = icmp ne i64 %116, 0
br i1 %117, label %122, label %118
118: ; preds = %114
%119 = load i8, i8* %13
%120 = call i64 @islower(i8 signext %119)
%121 = icmp ne i64 %120, 0
br i1 %121, label %122, label %129
122: ; preds = %118, %114
%123 = load i8, i8* %13
%124 = load i8*, i8** %12
%125 = load i32, i32* %11
%126 = add nsw i32 %125, 1
store i32 %126, i32* %11
%127 = sext i32 %125 to i64
%128 = getelementptr inbounds i8, i8* %124, i64 %127
store i8 %123, i8* %128
br label %129
129: ; preds = %122, %118
%130 = load i32*, i32** %6
%131 = call signext i8 @fgetc(i32* %130)
store i8 %131, i8* %13
br label %103
132: ; preds = %112
%133 = load i32, i32* %11
%134 = sub nsw i32 %133, 1
store i32 %134, i32* %9
br label %135
135: ; preds = %164, %132
%136 = load i32, i32* %9
%137 = icmp sge i32 %136, 0
br i1 %137, label %138, label %167
138: ; preds = %135
%139 = load i8*, i8** %12
%140 = load i32, i32* %9
%141 = sext i32 %140 to i64
%142 = getelementptr inbounds i8, i8* %139, i64 %141
%143 = load i8, i8* %142
%144 = sext i8 %143 to i32
switch i32 %144, label %155 [
i32 65, label %145
i32 67, label %146
i32 71, label %147
i32 84, label %148
i32 85, label %149
i32 97, label %150
i32 99, label %151
i32 103, label %152
i32 116, label %153
i32 117, label %154
]
145: ; preds = %138
store i8 84, i8* %14
br label %161
146: ; preds = %138
store i8 71, i8* %14
br label %161
147: ; preds = %138
store i8 67, i8* %14
br label %161
148: ; preds = %138
store i8 65, i8* %14
br label %161
149: ; preds = %138
store i8 65, i8* %14
br label %161
150: ; preds = %138
store i8 116, i8* %14
br label %161
151: ; preds = %138
store i8 103, i8* %14
br label %161
152: ; preds = %138
store i8 99, i8* %14
br label %161
153: ; preds = %138
store i8 97, i8* %14
br label %161
154: ; preds = %138
store i8 97, i8* %14
br label %161
155: ; preds = %138
%156 = load i8*, i8** %12
%157 = load i32, i32* %9
%158 = sext i32 %157 to i64
%159 = getelementptr inbounds i8, i8* %156, i64 %158
%160 = load i8, i8* %159
store i8 %160, i8* %14
br label %161
161: ; preds = %155, %154, %153, %152, %151, %150, %149, %148, %147, %146, %145
%162 = load i32*, i32** %7
%163 = call i32 @fwrite(i8* %14, i32 1, i32 1, i32* %162)
br label %164
164: ; preds = %161
%165 = load i32, i32* %9
%166 = add nsw i32 %165, -1
store i32 %166, i32* %9
br label %135
167: ; preds = %135
store i8 10, i8* %14
%168 = load i32*, i32** %7
%169 = call i32 @fwrite(i8* %14, i32 1, i32 1, i32* %168)
store i32 0, i32* %11
br label %170
170: ; preds = %167
%171 = load i32, i32* %8
%172 = add nsw i32 %171, -1
store i32 %172, i32* %8
br label %80
173: ; preds = %80
%174 = load i32*, i32** %6
%175 = call i32 @fclose(i32* %174)
%176 = load i32*, i32** %7
%177 = call i32 @fclose(i32* %176)
ret i32 0
}

LLVM IR (-O2):
@.str = [62 x i8] c"USE: reverseComplement seqFile.IN reverseComplementarySeq.OUT\00"
@.str.1 = [15 x i8] c"memory for Seq\00"
@.str.2 = [3 x i8] c"rt\00"
@.str.3 = [31 x i8] c"opening IN sequence FASTA file\00"
@.str.4 = [3 x i8] c"wt\00"
@.str.5 = [32 x i8] c"opening OUT sequence Words file\00"
@SEEK_SET = global i32 0
@.str.6 = [11 x i8] c"Empty file\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [1000000 x i64]
%4 = bitcast [1000000 x i64]* %3 to i8*
%5 = icmp eq i32 %0, 3
br i1 %5, label %8, label %6
6: ; preds = %2
%7 = tail call i32 @terror(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %6, %2
%9 = tail call i64 @malloc(i32 2000000000)
%10 = inttoptr i64 %9 to i8*
%11 = icmp eq i64 %9, 0
br i1 %11, label %12, label %14
12: ; preds = %8
%13 = tail call i32 @terror(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
br label %14
14: ; preds = %12, %8
%15 = getelementptr inbounds i8*, i8** %1, i64 1
%16 = load i8*, i8** %15
%17 = tail call i32* @fopen(i8* %16, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%18 = icmp eq i32* %17, null
br i1 %18, label %19, label %21
19: ; preds = %14
%20 = tail call i32 @terror(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.3, i64 0, i64 0))
br label %21
21: ; preds = %19, %14
%22 = getelementptr inbounds i8*, i8** %1, i64 2
%23 = load i8*, i8** %22
%24 = tail call i32* @fopen(i8* %23, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
%25 = icmp eq i32* %24, null
br i1 %25, label %26, label %28
26: ; preds = %21
%27 = tail call i32 @terror(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.5, i64 0, i64 0))
br label %28
28: ; preds = %26, %21
%29 = tail call signext i8 @fgetc(i32* %17)
%30 = tail call i32 @feof(i32* %17)
%31 = icmp eq i32 %30, 0
br i1 %31, label %36, label %117
32: ; preds = %47
%33 = icmp sgt i32 %48, 0
br i1 %33, label %34, label %117
34: ; preds = %32
%35 = zext i32 %48 to i64
br label %52
36: ; preds = %28, %47
%37 = phi i8 [ %49, %47 ], [ %29, %28 ]
%38 = phi i32 [ %48, %47 ], [ 0, %28 ]
%39 = icmp eq i8 %37, 62
br i1 %39, label %40, label %47
40: ; preds = %36
%41 = tail call i32 @ftell(i32* %17)
%42 = add nsw i32 %41, -1
%43 = sext i32 %42 to i64
%44 = add nsw i32 %38, 1
%45 = sext i32 %38 to i64
%46 = getelementptr inbounds [1000000 x i64], [1000000 x i64]* %3, i64 0, i64 %45
store i64 %43, i64* %46
br label %47
47: ; preds = %40, %36
%48 = phi i32 [ %44, %40 ], [ %38, %36 ]
%49 = tail call signext i8 @fgetc(i32* %17)
%50 = tail call i32 @feof(i32* %17)
%51 = icmp eq i32 %50, 0
br i1 %51, label %36, label %32
52: ; preds = %34, %114
%53 = phi i64 [ %35, %34 ], [ %54, %114 ]
%54 = add nsw i64 %53, -1
%55 = and i64 %54, 4294967295
%56 = getelementptr inbounds [1000000 x i64], [1000000 x i64]* %3, i64 0, i64 %55
%57 = load i64, i64* %56
%58 = load i32, i32* @SEEK_SET
%59 = tail call i32 @fseek(i32* %17, i64 %57, i32 %58)
%60 = tail call i32* @fgets(i8* %10, i32 2000000000, i32* %17)
%61 = icmp eq i32* %60, null
br i1 %61, label %62, label %64
62: ; preds = %52
%63 = tail call i32 @terror(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.6, i64 0, i64 0))
br label %64
64: ; preds = %62, %52
%65 = tail call i32 @fputs(i8* %10, i32* %24)
%66 = tail call signext i8 @fgetc(i32* %17)
%67 = icmp eq i8 %66, 62
br i1 %67, label %114, label %68
68: ; preds = %64, %83
%69 = phi i8 [ %85, %83 ], [ %66, %64 ]
%70 = phi i32 [ %84, %83 ], [ 0, %64 ]
%71 = tail call i32 @feof(i32* %17)
%72 = icmp eq i32 %71, 0
br i1 %72, label %73, label %87
73: ; preds = %68
%74 = tail call i64 @isupper(i8 signext %69)
%75 = icmp eq i64 %74, 0
br i1 %75, label %76, label %79
76: ; preds = %73
%77 = tail call i64 @islower(i8 signext %69)
%78 = icmp eq i64 %77, 0
br i1 %78, label %83, label %79
79: ; preds = %76, %73
%80 = add nsw i32 %70, 1
%81 = sext i32 %70 to i64
%82 = getelementptr inbounds i8, i8* %10, i64 %81
store i8 %69, i8* %82
br label %83
83: ; preds = %79, %76
%84 = phi i32 [ %80, %79 ], [ %70, %76 ]
%85 = tail call signext i8 @fgetc(i32* %17)
%86 = icmp eq i8 %85, 62
br i1 %86, label %87, label %68
87: ; preds = %68, %83
%88 = phi i32 [ %70, %68 ], [ %84, %83 ]
%89 = icmp sgt i32 %88, 0
br i1 %89, label %90, label %114
90: ; preds = %87
%91 = zext i32 %88 to i64
br label %92
92: ; preds = %90, %109
%93 = phi i64 [ %91, %90 ], [ %94, %109 ]
%94 = add nsw i64 %93, -1
%95 = and i64 %94, 4294967295
%96 = getelementptr inbounds i8, i8* %10, i64 %95
%97 = load i8, i8* %96
%98 = sext i8 %97 to i32
switch i32 %98, label %108 [
i32 65, label %109
i32 67, label %99
i32 71, label %100
i32 84, label %101
i32 85, label %102
i32 97, label %103
i32 99, label %104
i32 103, label %105
i32 116, label %106
i32 117, label %107
]
99: ; preds = %92
br label %109
100: ; preds = %92
br label %109
101: ; preds = %92
br label %109
102: ; preds = %92
br label %109
103: ; preds = %92
br label %109
104: ; preds = %92
br label %109
105: ; preds = %92
br label %109
106: ; preds = %92
br label %109
107: ; preds = %92
br label %109
108: ; preds = %92
br label %109
109: ; preds = %92, %108, %107, %106, %105, %104, %103, %102, %101, %100, %99
%110 = phi i8 [ %97, %108 ], [ 97, %107 ], [ 97, %106 ], [ 99, %105 ], [ 103, %104 ], [ 116, %103 ], [ 65, %102 ], [ 65, %101 ], [ 67, %100 ], [ 71, %99 ], [ 84, %92 ]
%111 = sext i8 %110 to i32
%112 = tail call i32 @fputc(i32 %111, i32* %24)
%113 = icmp ugt i64 %93, 1
br i1 %113, label %92, label %114
114: ; preds = %109, %64, %87
%115 = tail call i32 @fputc(i32 10, i32* %24)
%116 = icmp sgt i64 %53, 1
br i1 %116, label %52, label %117
117: ; preds = %114, %28, %32
%118 = tail call i32 @fclose(i32* %17)
%119 = tail call i32 @fclose(i32* %24)
ret i32 0
}