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

/* Variables and functions */
char EOF;
int /*<<< orphan*/ SEEK_SET;
int atol(char *);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
char fgetc(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fgets(char *, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
scalar_t__ fseeko(int /*<<< orphan*/ *, int, int /*<<< orphan*/);
int ftello(int /*<<< orphan*/ *);
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ putc(char, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ stdout;
int strlen(char *);
int main(int argc, char *argv[]) {
  char buf[1024];
  FILE *fa;
  off_t start, stop;
  off_t from, to;
  off_t beginning;
  int linewidth;
  char c;
  if (sizeof(off_t) < 8) {
    fprintf(stderr, "WARNING: Not compiled with large file support\n");
  }
  if (argc != 4) {
    fprintf(stderr, "Usage: %s fasta_file start stop\n", argv[0]);
    return 1;
  }
  if ((fa = fopen(argv[1], "r")) == NULL) {
    perror(argv[1]);
    return 2;
  }
  start = atol(argv[2]);
  stop = atol(argv[3]);
  if (start > stop) {
    from = start;
    start = stop;
    stop = from;
  }
  if (fgets(buf, 1023, fa) == NULL) {
    perror(argv[1]);
    return 2;
  }
  if (buf[0] != '>') {
    fprintf(stderr, "%s: Not a fasta file\n", argv[1]);
    return 1;
  }
  beginning = ftello(fa);
  if (fgets(buf, 1023, fa) == NULL) {
    perror(argv[1]);
    return 2;
  }
  linewidth = strlen(buf) - 1;
  if (buf[linewidth] != '\n') {
    fprintf(stderr, "ERROR: FASTA sequence lines are too wide\n");
    return 1;
  }
  from = beginning + start + ((start - 1) / linewidth) - 1;
  to = beginning + stop + ((stop - 1) / linewidth) - 1;
  if (fseeko(fa, to, SEEK_SET) < 0) {
    perror("Seek error");
    return 1;
  }
  fseeko(fa, from, SEEK_SET);
  while (from++ <= to) {
    c = fgetc(fa);
    if (c != '\n') {
      if (c == '>' || c == EOF) {
        fprintf(stderr, "WARNING: %d is past the end of the sequence\n", stop);
        break;
      }
      putc(c, stdout);
    }
  }
  fclose(fa);
  putc('\n', stdout);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x440,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2e08(%rip),%rax
mov    (%rax),%edi
lea    0xe27(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
cmpl   $0x4,-0x8(%rbp)
je     1214 <main+0x64>
mov    0x2de7(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
lea    0xe2e(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    154f <main+0x39f>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe76(%rip),%rsi
call   10c0 <fopen@plt>
mov    %rax,-0x418(%rbp)
cmp    $0x0,%rax
jne    1252 <main+0xa2>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   10d0 <perror@plt>
movl   $0x2,-0x4(%rbp)
jmp    154f <main+0x39f>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
call   10a0 <atol@plt>
mov    %eax,-0x41c(%rbp)
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rdi
call   10a0 <atol@plt>
mov    %eax,-0x420(%rbp)
mov    -0x41c(%rbp),%eax
cmp    -0x420(%rbp),%eax
jle    12ae <main+0xfe>
mov    -0x41c(%rbp),%eax
mov    %eax,-0x424(%rbp)
mov    -0x420(%rbp),%eax
mov    %eax,-0x41c(%rbp)
mov    -0x424(%rbp),%eax
mov    %eax,-0x420(%rbp)
lea    -0x410(%rbp),%rdi
mov    -0x418(%rbp),%rdx
mov    $0x3ff,%esi
call   1070 <fgets@plt>
cmp    $0x0,%rax
jne    12e9 <main+0x139>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   10d0 <perror@plt>
movl   $0x2,-0x4(%rbp)
jmp    154f <main+0x39f>
movsbl -0x410(%rbp),%eax
cmp    $0x3e,%eax
je     1324 <main+0x174>
mov    0x2cd8(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdx
lea    0xd3f(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    154f <main+0x39f>
mov    -0x418(%rbp),%rdi
call   1030 <ftello@plt>
mov    %eax,-0x42c(%rbp)
lea    -0x410(%rbp),%rdi
mov    -0x418(%rbp),%rdx
mov    $0x3ff,%esi
call   1070 <fgets@plt>
cmp    $0x0,%rax
jne    1371 <main+0x1c1>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   10d0 <perror@plt>
movl   $0x2,-0x4(%rbp)
jmp    154f <main+0x39f>
lea    -0x410(%rbp),%rdi
call   1050 <strlen@plt>
sub    $0x1,%eax
mov    %eax,-0x430(%rbp)
movslq -0x430(%rbp),%rax
movsbl -0x410(%rbp,%rax,1),%eax
ff
cmp    $0xa,%eax
je     13c1 <main+0x211>
mov    0x2c33(%rip),%rax
mov    (%rax),%edi
lea    0xcb8(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    154f <main+0x39f>
mov    -0x42c(%rbp),%eax
add    -0x41c(%rbp),%eax
mov    %eax,-0x43c(%rbp)
mov    -0x41c(%rbp),%eax
sub    $0x1,%eax
cltd
idivl  -0x430(%rbp)
mov    %eax,%ecx
mov    -0x43c(%rbp),%eax
add    %ecx,%eax
sub    $0x1,%eax
mov    %eax,-0x424(%rbp)
mov    -0x42c(%rbp),%eax
add    -0x420(%rbp),%eax
mov    %eax,-0x438(%rbp)
mov    -0x420(%rbp),%eax
sub    $0x1,%eax
cltd
idivl  -0x430(%rbp)
mov    %eax,%ecx
mov    -0x438(%rbp),%eax
add    %ecx,%eax
sub    $0x1,%eax
mov    %eax,-0x428(%rbp)
mov    -0x418(%rbp),%rdi
mov    -0x428(%rbp),%esi
mov    0x2b91(%rip),%rax
mov    (%rax),%edx
call   10b0 <fseeko@plt>
cmp    $0x0,%rax
jge    1468 <main+0x2b8>
lea    0xc39(%rip),%rdi
call   10d0 <perror@plt>
movl   $0x1,-0x4(%rbp)
jmp    154f <main+0x39f>
mov    -0x418(%rbp),%rdi
mov    -0x424(%rbp),%esi
mov    0x2b54(%rip),%rax
mov    (%rax),%edx
call   10b0 <fseeko@plt>
mov    -0x424(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x424(%rbp)
cmp    -0x428(%rbp),%eax
jg     1529 <main+0x379>
mov    -0x418(%rbp),%rdi
call   1060 <fgetc@plt>
mov    %al,-0x431(%rbp)
movsbl -0x431(%rbp),%eax
cmp    $0xa,%eax
je     1524 <main+0x374>
movsbl -0x431(%rbp),%eax
cmp    $0x3e,%eax
je     14eb <main+0x33b>
movsbl -0x431(%rbp),%eax
mov    0x2b08(%rip),%rcx
movsbl (%rcx),%ecx
cmp    %ecx,%eax
jne    150d <main+0x35d>
mov    0x2ae6(%rip),%rax
mov    (%rax),%edi
mov    -0x420(%rbp),%edx
lea    0xb9a(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
jmp    1529 <main+0x379>
mov    -0x431(%rbp),%al
mov    0x2aae(%rip),%rcx
mov    (%rcx),%esi
movsbl %al,%edi
call   1080 <putc@plt>
jmp    1483 <main+0x2d3>
mov    -0x418(%rbp),%rdi
call   1040 <fclose@plt>
mov    0x2a8c(%rip),%rax
mov    (%rax),%esi
mov    $0xa,%edi
call   1080 <putc@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x440,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x418,%rsp
mov    %rsi,%rbx
mov    %edi,%ebp
mov    0x2e0b(%rip),%r13
mov    0x0(%r13),%edi
lea    0xe28(%rip),%rsi
xor    %eax,%eax
call   1090 <fprintf@plt>
cmp    $0x4,%ebp
jne    134c <main+0x19c>
mov    0x8(%rbx),%rdi
lea    0xea6(%rip),%rsi
call   10c0 <fopen@plt>
test   %rax,%rax
je     139d <main+0x1ed>
mov    %rax,%r15
mov    0x10(%rbx),%rdi
call   10a0 <atol@plt>
mov    %eax,%r12d
mov    0x18(%rbx),%rdi
call   10a0 <atol@plt>
cmp    %eax,%r12d
mov    %eax,%r14d
cmovg  %r12d,%r14d
cmovg  %eax,%r12d
lea    0x10(%rsp),%rdi
mov    $0x3ff,%esi
mov    %r15,%rdx
call   1070 <fgets@plt>
test   %rax,%rax
je     139d <main+0x1ed>
cmpb   $0x3e,0x10(%rsp)
jne    135c <main+0x1ac>
mov    %r15,%rdi
call   1030 <ftello@plt>
mov    %eax,%ebp
lea    0x10(%rsp),%rdi
mov    $0x3ff,%esi
mov    %r15,%rdx
call   1070 <fgets@plt>
test   %rax,%rax
je     139d <main+0x1ed>
lea    0x10(%rsp),%rdi
call   1050 <strlen@plt>
movslq %eax,%rcx
cmpb   $0xa,0xf(%rsp,%rcx,1)
jne    1389 <main+0x1d9>
add    $0xffffffffffffffff,%rcx
lea    -0x1(%r12),%eax
cltd
idiv   %ecx
mov    %eax,0xc(%rsp)
lea    (%r14,%rbp,1),%r13d
lea    -0x1(%r14),%eax
cltd
idiv   %ecx
mov    %eax,%ebx
lea    (%rbx,%r13,1),%esi
add    $0xffffffff,%esi
mov    0x2d1b(%rip),%rax
mov    (%rax),%edx
mov    %r15,%rdi
call   10b0 <fseeko@plt>
test   %rax,%rax
js     13e1 <main+0x231>
add    %r12d,%ebp
add    $0xffffffff,%ebp
add    0xc(%rsp),%ebp
add    %ebx,%r13d
mov    0x2cf4(%rip),%rax
mov    (%rax),%edx
mov    %r15,%rdi
mov    %ebp,%esi
call   10b0 <fseeko@plt>
cmp    %r13d,%ebp
mov    0x2ce6(%rip),%r13
jge    13c2 <main+0x212>
add    %r14d,%ebx
mov    0xc(%rsp),%eax
add    %r12d,%eax
sub    %eax,%ebx
add    $0x1,%ebx
mov    0x2cda(%rip),%rbp
mov    0x2cb3(%rip),%r12
jmp    1329 <main+0x179>
nopw   0x0(%rax,%rax,1)
add    $0xffffffff,%ebx
je     13c2 <main+0x212>
mov    %r15,%rdi
call   1060 <fgetc@plt>
cmp    $0xa,%al
je     1320 <main+0x170>
cmp    $0x3e,%al
je     13ad <main+0x1fd>
cmp    0x0(%rbp),%al
je     13ad <main+0x1fd>
mov    (%r12),%esi
movsbl %al,%edi
call   1080 <putc@plt>
jmp    1320 <main+0x170>
mov    0x0(%r13),%edi
mov    (%rbx),%rdx
lea    0xcd5(%rip),%rsi
jmp    136b <main+0x1bb>
mov    0x0(%r13),%edi
mov    0x8(%rbx),%rdx
lea    0xce5(%rip),%rsi
xor    %eax,%eax
call   1090 <fprintf@plt>
mov    $0x1,%eax
add    $0x418,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x0(%r13),%edi
lea    0xcd2(%rip),%rsi
xor    %eax,%eax
call   1090 <fprintf@plt>
jmp    1372 <main+0x1c2>
mov    0x8(%rbx),%rdi
call   10d0 <perror@plt>
mov    $0x2,%eax
jmp    1377 <main+0x1c7>
mov    0x0(%r13),%edi
lea    0xce3(%rip),%rsi
mov    %r14d,%edx
xor    %eax,%eax
call   1090 <fprintf@plt>
mov    %r15,%rdi
call   1040 <fclose@plt>
mov    0x2bf7(%rip),%rax
mov    (%rax),%esi
mov    $0xa,%edi
call   1080 <putc@plt>
xor    %eax,%eax
jmp    1377 <main+0x1c7>
lea    0xca8(%rip),%rdi
call   10d0 <perror@plt>
jmp    1372 <main+0x1c2>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [47 x i8] c"WARNING: Not compiled with large file support\0A\00"
@.str.1 = [33 x i8] c"Usage: %s fasta_file start stop\0A\00"
@.str.2 = [2 x i8] c"r\00"
@.str.3 = [22 x i8] c"%s: Not a fasta file\0A\00"
@.str.4 = [42 x i8] c"ERROR: FASTA sequence lines are too wide\0A\00"
@SEEK_SET = global i32 0
@.str.5 = [11 x i8] c"Seek error\00"
@EOF = global i8 0
@.str.6 = [45 x i8] c"WARNING: %d is past the end of the sequence\0A\00"
@stdout = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [1024 x i8]
%7 = alloca i32*
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i8
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%15 = load i32, i32* @stderr
%16 = call i32 (i32, i8*, ...) @fprintf(i32 %15, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
%17 = load i32, i32* %4
%18 = icmp ne i32 %17, 4
br i1 %18, label %19, label %25
19: ; preds = %2
%20 = load i32, i32* @stderr
%21 = load i8**, i8*** %5
%22 = getelementptr inbounds i8*, i8** %21, i64 0
%23 = load i8*, i8** %22
%24 = call i32 (i32, i8*, ...) @fprintf(i32 %20, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0), i8* %23)
store i32 1, i32* %3
br label %164
25: ; preds = %2
%26 = load i8**, i8*** %5
%27 = getelementptr inbounds i8*, i8** %26, i64 1
%28 = load i8*, i8** %27
%29 = call i32* @fopen(i8* %28, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
store i32* %29, i32** %7
%30 = icmp eq i32* %29, null
br i1 %30, label %31, label %36
31: ; preds = %25
%32 = load i8**, i8*** %5
%33 = getelementptr inbounds i8*, i8** %32, i64 1
%34 = load i8*, i8** %33
%35 = call i32 @perror(i8* %34)
store i32 2, i32* %3
br label %164
36: ; preds = %25
%37 = load i8**, i8*** %5
%38 = getelementptr inbounds i8*, i8** %37, i64 2
%39 = load i8*, i8** %38
%40 = call i32 @atol(i8* %39)
store i32 %40, i32* %8
%41 = load i8**, i8*** %5
%42 = getelementptr inbounds i8*, i8** %41, i64 3
%43 = load i8*, i8** %42
%44 = call i32 @atol(i8* %43)
store i32 %44, i32* %9
%45 = load i32, i32* %8
%46 = load i32, i32* %9
%47 = icmp sgt i32 %45, %46
br i1 %47, label %48, label %52
48: ; preds = %36
%49 = load i32, i32* %8
store i32 %49, i32* %10
%50 = load i32, i32* %9
store i32 %50, i32* %8
%51 = load i32, i32* %10
store i32 %51, i32* %9
br label %52
52: ; preds = %48, %36
%53 = getelementptr inbounds [1024 x i8], [1024 x i8]* %6, i64 0, i64 0
%54 = load i32*, i32** %7
%55 = call i32* @fgets(i8* %53, i32 1023, i32* %54)
%56 = icmp eq i32* %55, null
br i1 %56, label %57, label %62
57: ; preds = %52
%58 = load i8**, i8*** %5
%59 = getelementptr inbounds i8*, i8** %58, i64 1
%60 = load i8*, i8** %59
%61 = call i32 @perror(i8* %60)
store i32 2, i32* %3
br label %164
62: ; preds = %52
%63 = getelementptr inbounds [1024 x i8], [1024 x i8]* %6, i64 0, i64 0
%64 = load i8, i8* %63
%65 = sext i8 %64 to i32
%66 = icmp ne i32 %65, 62
br i1 %66, label %67, label %73
67: ; preds = %62
%68 = load i32, i32* @stderr
%69 = load i8**, i8*** %5
%70 = getelementptr inbounds i8*, i8** %69, i64 1
%71 = load i8*, i8** %70
%72 = call i32 (i32, i8*, ...) @fprintf(i32 %68, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0), i8* %71)
store i32 1, i32* %3
br label %164
73: ; preds = %62
%74 = load i32*, i32** %7
%75 = call i32 @ftello(i32* %74)
store i32 %75, i32* %12
%76 = getelementptr inbounds [1024 x i8], [1024 x i8]* %6, i64 0, i64 0
%77 = load i32*, i32** %7
%78 = call i32* @fgets(i8* %76, i32 1023, i32* %77)
%79 = icmp eq i32* %78, null
br i1 %79, label %80, label %85
80: ; preds = %73
%81 = load i8**, i8*** %5
%82 = getelementptr inbounds i8*, i8** %81, i64 1
%83 = load i8*, i8** %82
%84 = call i32 @perror(i8* %83)
store i32 2, i32* %3
br label %164
85: ; preds = %73
%86 = getelementptr inbounds [1024 x i8], [1024 x i8]* %6, i64 0, i64 0
%87 = call i32 @strlen(i8* %86)
%88 = sub nsw i32 %87, 1
store i32 %88, i32* %13
%89 = load i32, i32* %13
%90 = sext i32 %89 to i64
%91 = getelementptr inbounds [1024 x i8], [1024 x i8]* %6, i64 0, i64 %90
%92 = load i8, i8* %91
%93 = sext i8 %92 to i32
%94 = icmp ne i32 %93, 10
br i1 %94, label %95, label %98
95: ; preds = %85
%96 = load i32, i32* @stderr
%97 = call i32 (i32, i8*, ...) @fprintf(i32 %96, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.4, i64 0, i64 0))
store i32 1, i32* %3
br label %164
98: ; preds = %85
%99 = load i32, i32* %12
%100 = load i32, i32* %8
%101 = add nsw i32 %99, %100
%102 = load i32, i32* %8
%103 = sub nsw i32 %102, 1
%104 = load i32, i32* %13
%105 = sdiv i32 %103, %104
%106 = add nsw i32 %101, %105
%107 = sub nsw i32 %106, 1
store i32 %107, i32* %10
%108 = load i32, i32* %12
%109 = load i32, i32* %9
%110 = add nsw i32 %108, %109
%111 = load i32, i32* %9
%112 = sub nsw i32 %111, 1
%113 = load i32, i32* %13
%114 = sdiv i32 %112, %113
%115 = add nsw i32 %110, %114
%116 = sub nsw i32 %115, 1
store i32 %116, i32* %11
%117 = load i32*, i32** %7
%118 = load i32, i32* %11
%119 = load i32, i32* @SEEK_SET
%120 = call i64 @fseeko(i32* %117, i32 %118, i32 %119)
%121 = icmp slt i64 %120, 0
br i1 %121, label %122, label %124
122: ; preds = %98
%123 = call i32 @perror(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.5, i64 0, i64 0))
store i32 1, i32* %3
br label %164
124: ; preds = %98
%125 = load i32*, i32** %7
%126 = load i32, i32* %10
%127 = load i32, i32* @SEEK_SET
%128 = call i64 @fseeko(i32* %125, i32 %126, i32 %127)
br label %129
129: ; preds = %158, %124
%130 = load i32, i32* %10
%131 = add nsw i32 %130, 1
store i32 %131, i32* %10
%132 = load i32, i32* %11
%133 = icmp sle i32 %130, %132
br i1 %133, label %134, label %159
134: ; preds = %129
%135 = load i32*, i32** %7
%136 = call signext i8 @fgetc(i32* %135)
store i8 %136, i8* %14
%137 = load i8, i8* %14
%138 = sext i8 %137 to i32
%139 = icmp ne i32 %138, 10
br i1 %139, label %140, label %158
140: ; preds = %134
%141 = load i8, i8* %14
%142 = sext i8 %141 to i32
%143 = icmp eq i32 %142, 62
br i1 %143, label %150, label %144
144: ; preds = %140
%145 = load i8, i8* %14
%146 = sext i8 %145 to i32
%147 = load i8, i8* @EOF
%148 = sext i8 %147 to i32
%149 = icmp eq i32 %146, %148
br i1 %149, label %150, label %154
150: ; preds = %144, %140
%151 = load i32, i32* @stderr
%152 = load i32, i32* %9
%153 = call i32 (i32, i8*, ...) @fprintf(i32 %151, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.6, i64 0, i64 0), i32 %152)
br label %159
154: ; preds = %144
%155 = load i8, i8* %14
%156 = load i32, i32* @stdout
%157 = call i32 @putc(i8 signext %155, i32 %156)
br label %158
158: ; preds = %154, %134
br label %129
159: ; preds = %150, %129
%160 = load i32*, i32** %7
%161 = call i32 @fclose(i32* %160)
%162 = load i32, i32* @stdout
%163 = call i32 @putc(i8 signext 10, i32 %162)
store i32 0, i32* %3
br label %164
164: ; preds = %159, %122, %95, %80, %67, %57, %31, %19
%165 = load i32, i32* %3
ret i32 %165
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [47 x i8] c"WARNING: Not compiled with large file support\0A\00"
@.str.1 = [33 x i8] c"Usage: %s fasta_file start stop\0A\00"
@.str.2 = [2 x i8] c"r\00"
@.str.3 = [22 x i8] c"%s: Not a fasta file\0A\00"
@.str.4 = [42 x i8] c"ERROR: FASTA sequence lines are too wide\0A\00"
@SEEK_SET = global i32 0
@.str.5 = [11 x i8] c"Seek error\00"
@EOF = global i8 0
@.str.6 = [45 x i8] c"WARNING: %d is past the end of the sequence\0A\00"
@stdout = global i32 0
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [1024 x i8]
%4 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%5 = load i32, i32* @stderr
%6 = tail call i32 (i32, i8*, ...) @fprintf(i32 %5, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
%7 = icmp eq i32 %0, 4
br i1 %7, label %12, label %8
8: ; preds = %2
%9 = load i32, i32* @stderr
%10 = load i8*, i8** %1
%11 = tail call i32 (i32, i8*, ...) @fprintf(i32 %9, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0), i8* %10)
br label %97
12: ; preds = %2
%13 = getelementptr inbounds i8*, i8** %1, i64 1
%14 = load i8*, i8** %13
%15 = tail call i32* @fopen(i8* %14, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%16 = icmp eq i32* %15, null
br i1 %16, label %17, label %20
17: ; preds = %12
%18 = load i8*, i8** %13
%19 = tail call i32 @perror(i8* %18)
br label %97
20: ; preds = %12
%21 = getelementptr inbounds i8*, i8** %1, i64 2
%22 = load i8*, i8** %21
%23 = tail call i32 @atol(i8* %22)
%24 = getelementptr inbounds i8*, i8** %1, i64 3
%25 = load i8*, i8** %24
%26 = tail call i32 @atol(i8* %25)
%27 = icmp sgt i32 %23, %26
%28 = select i1 %27, i32 %23, i32 %26
%29 = select i1 %27, i32 %26, i32 %23
%30 = call i32* @fgets(i8* %4, i32 1023, i32* %15)
%31 = icmp eq i32* %30, null
br i1 %31, label %32, label %35
32: ; preds = %20
%33 = load i8*, i8** %13
%34 = call i32 @perror(i8* %33)
br label %97
35: ; preds = %20
%36 = load i8, i8* %4
%37 = icmp eq i8 %36, 62
br i1 %37, label %42, label %38
38: ; preds = %35
%39 = load i32, i32* @stderr
%40 = load i8*, i8** %13
%41 = call i32 (i32, i8*, ...) @fprintf(i32 %39, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0), i8* %40)
br label %97
42: ; preds = %35
%43 = call i32 @ftello(i32* %15)
%44 = call i32* @fgets(i8* %4, i32 1023, i32* %15)
%45 = icmp eq i32* %44, null
br i1 %45, label %46, label %49
46: ; preds = %42
%47 = load i8*, i8** %13
%48 = call i32 @perror(i8* %47)
br label %97
49: ; preds = %42
%50 = call i32 @strlen(i8* %4)
%51 = add nsw i32 %50, -1
%52 = sext i32 %51 to i64
%53 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 %52
%54 = load i8, i8* %53
%55 = icmp eq i8 %54, 10
br i1 %55, label %59, label %56
56: ; preds = %49
%57 = load i32, i32* @stderr
%58 = call i32 (i32, i8*, ...) @fprintf(i32 %57, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.4, i64 0, i64 0))
br label %97
59: ; preds = %49
%60 = add i32 %29, -1
%61 = sdiv i32 %60, %51
%62 = add i32 %60, %43
%63 = add i32 %62, %61
%64 = add nsw i32 %43, %28
%65 = add nsw i32 %28, -1
%66 = sdiv i32 %65, %51
%67 = add nsw i32 %64, %66
%68 = add nsw i32 %67, -1
%69 = load i32, i32* @SEEK_SET
%70 = call i64 @fseeko(i32* %15, i32 %68, i32 %69)
%71 = icmp slt i64 %70, 0
br i1 %71, label %72, label %74
72: ; preds = %59
%73 = call i32 @perror(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.5, i64 0, i64 0))
br label %97
74: ; preds = %59
%75 = load i32, i32* @SEEK_SET
%76 = call i64 @fseeko(i32* %15, i32 %63, i32 %75)
%77 = icmp slt i32 %63, %67
br i1 %77, label %78, label %93
78: ; preds = %74, %91
%79 = phi i32 [ %80, %91 ], [ %63, %74 ]
%80 = add i32 %79, 1
%81 = call signext i8 @fgetc(i32* %15)
switch i8 %81, label %82 [
i8 10, label %91
i8 62, label %85
]
82: ; preds = %78
%83 = load i8, i8* @EOF
%84 = icmp eq i8 %81, %83
br i1 %84, label %85, label %88
85: ; preds = %78, %82
%86 = load i32, i32* @stderr
%87 = call i32 (i32, i8*, ...) @fprintf(i32 %86, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.6, i64 0, i64 0), i32 %28)
br label %93
88: ; preds = %82
%89 = load i32, i32* @stdout
%90 = call i32 @putc(i8 signext %81, i32 %89)
br label %91
91: ; preds = %78, %88
%92 = icmp eq i32 %80, %67
br i1 %92, label %93, label %78
93: ; preds = %91, %74, %85
%94 = call i32 @fclose(i32* %15)
%95 = load i32, i32* @stdout
%96 = call i32 @putc(i8 signext 10, i32 %95)
br label %97
97: ; preds = %93, %72, %56, %46, %38, %32, %17, %8
%98 = phi i32 [ 1, %8 ], [ 2, %17 ], [ 2, %32 ], [ 1, %38 ], [ 2, %46 ], [ 1, %56 ], [ 1, %72 ], [ 0, %93 ]
ret i32 %98
}