#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);
    fgets(seq, 2000000000, fIn);
    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     151e <main+0x34e>
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>
mov    -0x20(%rbp),%rdi
mov    -0x38(%rbp),%rdx
lea    0xde9(%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     13ba <main+0x1ea>
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    13cd <main+0x1fd>
jmp    141c <main+0x24c>
movsbl -0x39(%rbp),%edi
call   10c0 <isupper@plt>
cmp    $0x0,%rax
jne    13f3 <main+0x223>
movsbl -0x39(%rbp),%edi
call   1030 <islower@plt>
cmp    $0x0,%rax
je     140b <main+0x23b>
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    138e <main+0x1be>
mov    -0x30(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x28(%rbp)
cmpl   $0x0,-0x28(%rbp)
jl     14f1 <main+0x321>
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     14c1 <main+0x2f1>
mov    -0x7a1250(%rbp),%rax
lea    0xba2(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movb   $0x54,-0x3a(%rbp)
jmp    14cf <main+0x2ff>
movb   $0x47,-0x3a(%rbp)
jmp    14cf <main+0x2ff>
movb   $0x43,-0x3a(%rbp)
jmp    14cf <main+0x2ff>
movb   $0x41,-0x3a(%rbp)
jmp    14cf <main+0x2ff>
movb   $0x41,-0x3a(%rbp)
jmp    14cf <main+0x2ff>
movb   $0x74,-0x3a(%rbp)
jmp    14cf <main+0x2ff>
movb   $0x67,-0x3a(%rbp)
jmp    14cf <main+0x2ff>
movb   $0x63,-0x3a(%rbp)
jmp    14cf <main+0x2ff>
movb   $0x61,-0x3a(%rbp)
jmp    14cf <main+0x2ff>
movb   $0x61,-0x3a(%rbp)
jmp    14cf <main+0x2ff>
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    1425 <main+0x255>
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,%r12
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    %r15d,%r15d
mov    $0x7a1200,%edx
xor    %esi,%esi
call   1060 <memset@plt>
mov    %r12,%rdi
call   1070 <fgetc@plt>
mov    %eax,%ebx
mov    %r12,%rdi
call   10b0 <feof@plt>
test   %eax,%eax
mov    0x8(%rsp),%rbp
je     12d6 <main+0xf6>
mov    %r12,%rdi
call   1040 <fclose@plt>
mov    %rbp,%rdi
call   1040 <fclose@plt>
xor    %eax,%eax
add    $0x7a1228,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    %r12,%rdi
call   1070 <fgetc@plt>
mov    %eax,%ebx
mov    %r12,%rdi
call   10b0 <feof@plt>
test   %eax,%eax
jne    12f6 <main+0x116>
cmp    $0x3e,%bl
jne    12c0 <main+0xe0>
mov    %r12,%rdi
call   10a0 <ftell@plt>
add    $0xffffffff,%eax
cltq
movslq %r15d,%rcx
add    $0x1,%r15d
mov    %rax,0x20(%rsp,%rcx,8)
jmp    12c0 <main+0xe0>
test   %r15d,%r15d
mov    0x8(%rsp),%rbp
jle    129c <main+0xbc>
mov    %r15d,%eax
lea    0xcf6(%rip),%r13
jmp    132e <main+0x14e>
nopl   0x0(%rax)
mov    $0xa,%edi
mov    %rbp,%rsi
call   1080 <fputc@plt>
cmpq   $0x1,0x10(%rsp)
mov    0x18(%rsp),%rax
jle    129c <main+0xbc>
mov    %rax,0x10(%rsp)
add    $0xffffffffffffffff,%rax
mov    %rax,0x18(%rsp)
mov    %eax,%eax
mov    0x20(%rsp,%rax,8),%rsi
mov    0x2c96(%rip),%rax
mov    (%rax),%edx
mov    %r12,%rdi
call   10d0 <fseek@plt>
mov    %r14,%rdi
mov    $0x77359400,%esi
mov    %r12,%rdx
call   1090 <fgets@plt>
mov    %r14,%rdi
mov    %rbp,%rsi
call   1050 <fputs@plt>
mov    %r12,%rdi
call   1070 <fgetc@plt>
cmp    $0x3e,%al
je     1310 <main+0x130>
mov    %eax,%ebx
xor    %r15d,%r15d
jmp    13ae <main+0x1ce>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movslq %r15d,%rax
add    $0x1,%r15d
mov    %bl,(%r14,%rax,1)
mov    0x8(%rsp),%rbp
mov    %r12,%rdi
call   1070 <fgetc@plt>
mov    %eax,%ebx
cmp    $0x3e,%al
je     13e0 <main+0x200>
mov    %r12,%rdi
call   10b0 <feof@plt>
test   %eax,%eax
jne    13e0 <main+0x200>
movsbl %bl,%ebp
mov    %ebp,%edi
call   10e0 <isupper@plt>
test   %rax,%rax
jne    1390 <main+0x1b0>
mov    %ebp,%edi
call   1030 <islower@plt>
test   %rax,%rax
jne    1390 <main+0x1b0>
jmp    139b <main+0x1bb>
nopw   0x0(%rax,%rax,1)
test   %r15d,%r15d
jle    1310 <main+0x130>
mov    %r15d,%ebx
add    $0x1,%rbx
jmp    1419 <main+0x239>
mov    $0x61,%al
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsbl %al,%edi
mov    %rbp,%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     1439 <main+0x259>
mov    $0x54,%al
movslq 0x0(%r13,%rdx,4),%rdx
add    %r13,%rdx
jmp    *%rdx
mov    $0x41,%al
jmp    1400 <main+0x220>
mov    %ecx,%eax
jmp    1400 <main+0x220>
mov    $0x47,%al
jmp    1400 <main+0x220>
mov    $0x43,%al
jmp    1400 <main+0x220>
mov    $0x74,%al
jmp    1400 <main+0x220>
mov    $0x67,%al
jmp    1400 <main+0x220>
mov    $0x63,%al
jmp    1400 <main+0x220>

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 = [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 = %166, %77
%81 = load i32, i32* %8
%82 = icmp sge i32 %81, 0
br i1 %82, label %83, label %169
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 = load i32*, i32** %7
%95 = load i8*, i8** %12
%96 = call i32 @fprintf(i32* %94, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i8* %95)
%97 = load i32*, i32** %6
%98 = call signext i8 @fgetc(i32* %97)
store i8 %98, i8* %13
br label %99
99: ; preds = %125, %83
%100 = load i8, i8* %13
%101 = sext i8 %100 to i32
%102 = icmp ne i32 %101, 62
br i1 %102, label %103, label %108
103: ; preds = %99
%104 = load i32*, i32** %6
%105 = call i32 @feof(i32* %104)
%106 = icmp ne i32 %105, 0
%107 = xor i1 %106, true
br label %108
108: ; preds = %103, %99
%109 = phi i1 [ false, %99 ], [ %107, %103 ]
br i1 %109, label %110, label %128
110: ; preds = %108
%111 = load i8, i8* %13
%112 = call i64 @isupper(i8 signext %111)
%113 = icmp ne i64 %112, 0
br i1 %113, label %118, label %114
114: ; preds = %110
%115 = load i8, i8* %13
%116 = call i64 @islower(i8 signext %115)
%117 = icmp ne i64 %116, 0
br i1 %117, label %118, label %125
118: ; preds = %114, %110
%119 = load i8, i8* %13
%120 = load i8*, i8** %12
%121 = load i32, i32* %11
%122 = add nsw i32 %121, 1
store i32 %122, i32* %11
%123 = sext i32 %121 to i64
%124 = getelementptr inbounds i8, i8* %120, i64 %123
store i8 %119, i8* %124
br label %125
125: ; preds = %118, %114
%126 = load i32*, i32** %6
%127 = call signext i8 @fgetc(i32* %126)
store i8 %127, i8* %13
br label %99
128: ; preds = %108
%129 = load i32, i32* %11
%130 = sub nsw i32 %129, 1
store i32 %130, i32* %9
br label %131
131: ; preds = %160, %128
%132 = load i32, i32* %9
%133 = icmp sge i32 %132, 0
br i1 %133, label %134, label %163
134: ; preds = %131
%135 = load i8*, i8** %12
%136 = load i32, i32* %9
%137 = sext i32 %136 to i64
%138 = getelementptr inbounds i8, i8* %135, i64 %137
%139 = load i8, i8* %138
%140 = sext i8 %139 to i32
switch i32 %140, label %151 [
i32 65, label %141
i32 67, label %142
i32 71, label %143
i32 84, label %144
i32 85, label %145
i32 97, label %146
i32 99, label %147
i32 103, label %148
i32 116, label %149
i32 117, label %150
]
141: ; preds = %134
store i8 84, i8* %14
br label %157
142: ; preds = %134
store i8 71, i8* %14
br label %157
143: ; preds = %134
store i8 67, i8* %14
br label %157
144: ; preds = %134
store i8 65, i8* %14
br label %157
145: ; preds = %134
store i8 65, i8* %14
br label %157
146: ; preds = %134
store i8 116, i8* %14
br label %157
147: ; preds = %134
store i8 103, i8* %14
br label %157
148: ; preds = %134
store i8 99, i8* %14
br label %157
149: ; preds = %134
store i8 97, i8* %14
br label %157
150: ; preds = %134
store i8 97, i8* %14
br label %157
151: ; preds = %134
%152 = load i8*, i8** %12
%153 = load i32, i32* %9
%154 = sext i32 %153 to i64
%155 = getelementptr inbounds i8, i8* %152, i64 %154
%156 = load i8, i8* %155
store i8 %156, i8* %14
br label %157
157: ; preds = %151, %150, %149, %148, %147, %146, %145, %144, %143, %142, %141
%158 = load i32*, i32** %7
%159 = call i32 @fwrite(i8* %14, i32 1, i32 1, i32* %158)
br label %160
160: ; preds = %157
%161 = load i32, i32* %9
%162 = add nsw i32 %161, -1
store i32 %162, i32* %9
br label %131
163: ; preds = %131
store i8 10, i8* %14
%164 = load i32*, i32** %7
%165 = call i32 @fwrite(i8* %14, i32 1, i32 1, i32* %164)
store i32 0, i32* %11
br label %166
166: ; preds = %163
%167 = load i32, i32* %8
%168 = add nsw i32 %167, -1
store i32 %168, i32* %8
br label %80
169: ; preds = %80
%170 = load i32*, i32** %6
%171 = call i32 @fclose(i32* %170)
%172 = load i32*, i32** %7
%173 = call i32 @fclose(i32* %172)
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
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 %113
32: ; preds = %47
%33 = icmp sgt i32 %48, 0
br i1 %33, label %34, label %113
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, %110
%53 = phi i64 [ %35, %34 ], [ %54, %110 ]
%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 = tail call i32 @fputs(i8* %10, i32* %24)
%62 = tail call signext i8 @fgetc(i32* %17)
%63 = icmp eq i8 %62, 62
br i1 %63, label %110, label %64
64: ; preds = %52, %79
%65 = phi i8 [ %81, %79 ], [ %62, %52 ]
%66 = phi i32 [ %80, %79 ], [ 0, %52 ]
%67 = tail call i32 @feof(i32* %17)
%68 = icmp eq i32 %67, 0
br i1 %68, label %69, label %83
69: ; preds = %64
%70 = tail call i64 @isupper(i8 signext %65)
%71 = icmp eq i64 %70, 0
br i1 %71, label %72, label %75
72: ; preds = %69
%73 = tail call i64 @islower(i8 signext %65)
%74 = icmp eq i64 %73, 0
br i1 %74, label %79, label %75
75: ; preds = %72, %69
%76 = add nsw i32 %66, 1
%77 = sext i32 %66 to i64
%78 = getelementptr inbounds i8, i8* %10, i64 %77
store i8 %65, i8* %78
br label %79
79: ; preds = %75, %72
%80 = phi i32 [ %76, %75 ], [ %66, %72 ]
%81 = tail call signext i8 @fgetc(i32* %17)
%82 = icmp eq i8 %81, 62
br i1 %82, label %83, label %64
83: ; preds = %64, %79
%84 = phi i32 [ %66, %64 ], [ %80, %79 ]
%85 = icmp sgt i32 %84, 0
br i1 %85, label %86, label %110
86: ; preds = %83
%87 = zext i32 %84 to i64
br label %88
88: ; preds = %86, %105
%89 = phi i64 [ %87, %86 ], [ %90, %105 ]
%90 = add nsw i64 %89, -1
%91 = and i64 %90, 4294967295
%92 = getelementptr inbounds i8, i8* %10, i64 %91
%93 = load i8, i8* %92
%94 = sext i8 %93 to i32
switch i32 %94, label %104 [
i32 65, label %105
i32 67, label %95
i32 71, label %96
i32 84, label %97
i32 85, label %98
i32 97, label %99
i32 99, label %100
i32 103, label %101
i32 116, label %102
i32 117, label %103
]
95: ; preds = %88
br label %105
96: ; preds = %88
br label %105
97: ; preds = %88
br label %105
98: ; preds = %88
br label %105
99: ; preds = %88
br label %105
100: ; preds = %88
br label %105
101: ; preds = %88
br label %105
102: ; preds = %88
br label %105
103: ; preds = %88
br label %105
104: ; preds = %88
br label %105
105: ; preds = %88, %104, %103, %102, %101, %100, %99, %98, %97, %96, %95
%106 = phi i8 [ %93, %104 ], [ 97, %103 ], [ 97, %102 ], [ 99, %101 ], [ 103, %100 ], [ 116, %99 ], [ 65, %98 ], [ 65, %97 ], [ 67, %96 ], [ 71, %95 ], [ 84, %88 ]
%107 = sext i8 %106 to i32
%108 = tail call i32 @fputc(i32 %107, i32* %24)
%109 = icmp ugt i64 %89, 1
br i1 %109, label %88, label %110
110: ; preds = %105, %52, %83
%111 = tail call i32 @fputc(i32 10, i32* %24)
%112 = icmp sgt i64 %53, 1
br i1 %112, label %52, label %113
113: ; preds = %110, %28, %32
%114 = tail call i32 @fclose(i32* %17)
%115 = tail call i32 @fclose(i32* %24)
ret i32 0
}