#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*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ StrnCpy(char *, char *, int);
scalar_t__ feof(int /*<<< orphan*/ *);
int /*<<< orphan*/ fgets(char *, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ remove_carriage_return(char *, char *);
int /*<<< orphan*/ sprintf(char *, char *, ...);
scalar_t__ strcmp(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
void read_fasta_seq(FILE *file_handle, char *info, char *seq) {
  char txtline[10000];
  int n_chars = 10000;
  char c[10];
  char linfo[10000];
  char lseq[1000000];
  char temp[10000];
  char temp2[1000000];
  sprintf(lseq, "");
  sprintf(linfo, "");
  sprintf(info, "");
  sprintf(c, "");
  sprintf(txtline, "");
  while ((strcmp(c, ">") != 0) & (feof(file_handle) == 0)) {
    fgets(txtline, n_chars, file_handle);
    remove_carriage_return(temp, txtline);
    StrnCpy(c, txtline, 1);
    if (strcmp(c, ">") == 0) {
      strcpy(linfo, temp);
    } else {
      sprintf(temp2, "%s%s", lseq, temp);
      strcpy(lseq, temp2);
      sprintf(temp, "");
      sprintf(temp2, "");
    }
  }
  sprintf(info, "%s", linfo);
  strcpy(seq, lseq);
}


x86 assembly (clang, -O0):
<read_fasta_seq>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1ef9f0,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movl   $0x2710,-0x2734(%rbp)
lea    -0xf9090(%rbp),%rdi
lea    0xe62(%rip),%rsi
mov    $0x0,%al
call   1090 <sprintf@plt>
lea    -0x4e50(%rbp),%rdi
lea    0xe4d(%rip),%rsi
mov    $0x0,%al
call   1090 <sprintf@plt>
mov    -0x10(%rbp),%rdi
lea    0xe3b(%rip),%rsi
mov    $0x0,%al
call   1090 <sprintf@plt>
lea    -0x273e(%rbp),%rdi
lea    0xe26(%rip),%rsi
mov    $0x0,%al
call   1090 <sprintf@plt>
lea    -0x2730(%rbp),%rdi
lea    0xe11(%rip),%rsi
mov    $0x0,%al
call   1090 <sprintf@plt>
lea    -0x273e(%rbp),%rdi
lea    0xdfb(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
setne  %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x1ef9e4(%rbp)
mov    -0x8(%rbp),%rdi
call   1060 <feof@plt>
mov    %rax,%rcx
mov    -0x1ef9e4(%rbp),%eax
cmp    $0x0,%rcx
sete   %cl
and    $0x1,%cl
movzbl %cl,%ecx
and    %ecx,%eax
cmp    $0x0,%eax
je     1321 <read_fasta_seq+0x1b1>
lea    -0x2730(%rbp),%rdi
mov    -0x2734(%rbp),%esi
mov    -0x8(%rbp),%rdx
call   1040 <fgets@plt>
lea    -0xfb7a0(%rbp),%rdi
lea    -0x2730(%rbp),%rsi
call   1070 <remove_carriage_return@plt>
lea    -0x273e(%rbp),%rdi
lea    -0x2730(%rbp),%rsi
mov    $0x1,%edx
call   1080 <StrnCpy@plt>
lea    -0x273e(%rbp),%rdi
lea    0xd6b(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
jne    12bc <read_fasta_seq+0x14c>
lea    -0x4e50(%rbp),%rdi
lea    -0xfb7a0(%rbp),%rsi
call   1030 <strcpy@plt>
jmp    131c <read_fasta_seq+0x1ac>
lea    -0x1ef9e0(%rbp),%rdi
lea    -0xf9090(%rbp),%rdx
lea    -0xfb7a0(%rbp),%rcx
lea    0xd2a(%rip),%rsi
mov    $0x0,%al
call   1090 <sprintf@plt>
lea    -0xf9090(%rbp),%rdi
lea    -0x1ef9e0(%rbp),%rsi
call   1030 <strcpy@plt>
lea    -0xfb7a0(%rbp),%rdi
lea    0xd01(%rip),%rsi
mov    $0x0,%al
call   1090 <sprintf@plt>
lea    -0x1ef9e0(%rbp),%rdi
lea    0xcec(%rip),%rsi
mov    $0x0,%al
call   1090 <sprintf@plt>
jmp    11f7 <read_fasta_seq+0x87>
mov    -0x10(%rbp),%rdi
lea    -0x4e50(%rbp),%rdx
lea    0xcd1(%rip),%rsi
mov    $0x0,%al
call   1090 <sprintf@plt>
mov    -0x18(%rbp),%rdi
lea    -0xf9090(%rbp),%rsi
call   1030 <strcpy@plt>
add    $0x1ef9f0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_fasta_seq>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x1ef9d8,%rsp
mov    %rdx,0x18(%rsp)
mov    %rdi,%r14
movb   $0x0,0x7550(%rsp)
movb   $0x0,0x2730(%rsp)
mov    %rsi,0x10(%rsp)
movb   $0x0,(%rsi)
movb   $0x0,0x6(%rsp)
movb   $0x0,0x4e40(%rsp)
lea    0xe4b(%rip),%rsi
lea    0x6(%rsp),%rdi
call   1050 <strcmp@plt>
mov    %rax,%rbp
mov    %r14,%rdi
call   1060 <feof@plt>
test   %rbp,%rbp
je     12b9 <read_fasta_seq+0x149>
test   %rax,%rax
jne    12b9 <read_fasta_seq+0x149>
lea    0x20(%rsp),%rbx
lea    0x6(%rsp),%r13
lea    0xe13(%rip),%r12
nopl   (%rax)
lea    0x4e40(%rsp),%rbp
mov    %rbp,%rdi
mov    $0x2710,%esi
mov    %r14,%rdx
call   1040 <fgets@plt>
mov    %rbx,%rdi
mov    %rbp,%rsi
call   1070 <remove_carriage_return@plt>
mov    %r13,%rdi
mov    %rbp,%rsi
mov    $0x1,%edx
call   1080 <StrnCpy@plt>
mov    %r13,%rdi
mov    %r12,%rsi
call   1050 <strcmp@plt>
test   %rax,%rax
je     1280 <read_fasta_seq+0x110>
mov    %r12,%r15
lea    0xfb790(%rsp),%rbp
mov    %rbp,%rdi
lea    0xdba(%rip),%rsi
lea    0x7550(%rsp),%r12
mov    %r12,%rdx
mov    %rbx,%rcx
xor    %eax,%eax
call   1090 <sprintf@plt>
mov    %r12,%rdi
mov    %rbp,%rsi
mov    %r15,%r12
call   1030 <strcpy@plt>
movb   $0x0,0x20(%rsp)
movb   $0x0,0xfb790(%rsp)
jmp    1290 <read_fasta_seq+0x120>
nopw   0x0(%rax,%rax,1)
lea    0x2730(%rsp),%rdi
mov    %rbx,%rsi
call   1030 <strcpy@plt>
mov    %r13,%rdi
mov    %r12,%rsi
call   1050 <strcmp@plt>
mov    %rax,%r15
mov    %r14,%rdi
call   1060 <feof@plt>
test   %r15,%r15
lea    0x20(%rsp),%rbx
je     12b9 <read_fasta_seq+0x149>
test   %rax,%rax
je     11f0 <read_fasta_seq+0x80>
lea    0x2730(%rsp),%rsi
mov    0x10(%rsp),%rdi
call   1030 <strcpy@plt>
lea    0x7550(%rsp),%rsi
mov    0x18(%rsp),%rdi
call   1030 <strcpy@plt>
add    $0x1ef9d8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
@.str.1 = [2 x i8] c">\00"
@.str.2 = [5 x i8] c"%s%s\00"
@.str.3 = [3 x i8] c"%s\00"
define void @read_fasta_seq(i32* %0, i8* %1, i8* %2) {
%4 = alloca i32*
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca [10000 x i8]
%8 = alloca i32
%9 = alloca [10 x i8]
%10 = alloca [10000 x i8]
%11 = alloca [1000000 x i8]
%12 = alloca [10000 x i8]
%13 = alloca [1000000 x i8]
store i32* %0, i32** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
store i32 10000, i32* %8
%14 = getelementptr inbounds [1000000 x i8], [1000000 x i8]* %11, i64 0, i64 0
%15 = call i32 (i8*, i8*, ...) @sprintf(i8* %14, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%16 = getelementptr inbounds [10000 x i8], [10000 x i8]* %10, i64 0, i64 0
%17 = call i32 (i8*, i8*, ...) @sprintf(i8* %16, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%18 = load i8*, i8** %5
%19 = call i32 (i8*, i8*, ...) @sprintf(i8* %18, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%20 = getelementptr inbounds [10 x i8], [10 x i8]* %9, i64 0, i64 0
%21 = call i32 (i8*, i8*, ...) @sprintf(i8* %20, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%22 = getelementptr inbounds [10000 x i8], [10000 x i8]* %7, i64 0, i64 0
%23 = call i32 (i8*, i8*, ...) @sprintf(i8* %22, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
br label %24
24: ; preds = %65, %3
%25 = getelementptr inbounds [10 x i8], [10 x i8]* %9, i64 0, i64 0
%26 = call i64 @strcmp(i8* %25, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%27 = icmp ne i64 %26, 0
%28 = zext i1 %27 to i32
%29 = load i32*, i32** %4
%30 = call i64 @feof(i32* %29)
%31 = icmp eq i64 %30, 0
%32 = zext i1 %31 to i32
%33 = and i32 %28, %32
%34 = icmp ne i32 %33, 0
br i1 %34, label %35, label %66
35: ; preds = %24
%36 = getelementptr inbounds [10000 x i8], [10000 x i8]* %7, i64 0, i64 0
%37 = load i32, i32* %8
%38 = load i32*, i32** %4
%39 = call i32 @fgets(i8* %36, i32 %37, i32* %38)
%40 = getelementptr inbounds [10000 x i8], [10000 x i8]* %12, i64 0, i64 0
%41 = getelementptr inbounds [10000 x i8], [10000 x i8]* %7, i64 0, i64 0
%42 = call i32 @remove_carriage_return(i8* %40, i8* %41)
%43 = getelementptr inbounds [10 x i8], [10 x i8]* %9, i64 0, i64 0
%44 = getelementptr inbounds [10000 x i8], [10000 x i8]* %7, i64 0, i64 0
%45 = call i32 @StrnCpy(i8* %43, i8* %44, i32 1)
%46 = getelementptr inbounds [10 x i8], [10 x i8]* %9, i64 0, i64 0
%47 = call i64 @strcmp(i8* %46, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%48 = icmp eq i64 %47, 0
br i1 %48, label %49, label %53
49: ; preds = %35
%50 = getelementptr inbounds [10000 x i8], [10000 x i8]* %10, i64 0, i64 0
%51 = getelementptr inbounds [10000 x i8], [10000 x i8]* %12, i64 0, i64 0
%52 = call i32 @strcpy(i8* %50, i8* %51)
br label %65
53: ; preds = %35
%54 = getelementptr inbounds [1000000 x i8], [1000000 x i8]* %13, i64 0, i64 0
%55 = getelementptr inbounds [1000000 x i8], [1000000 x i8]* %11, i64 0, i64 0
%56 = getelementptr inbounds [10000 x i8], [10000 x i8]* %12, i64 0, i64 0
%57 = call i32 (i8*, i8*, ...) @sprintf(i8* %54, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8* %55, i8* %56)
%58 = getelementptr inbounds [1000000 x i8], [1000000 x i8]* %11, i64 0, i64 0
%59 = getelementptr inbounds [1000000 x i8], [1000000 x i8]* %13, i64 0, i64 0
%60 = call i32 @strcpy(i8* %58, i8* %59)
%61 = getelementptr inbounds [10000 x i8], [10000 x i8]* %12, i64 0, i64 0
%62 = call i32 (i8*, i8*, ...) @sprintf(i8* %61, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%63 = getelementptr inbounds [1000000 x i8], [1000000 x i8]* %13, i64 0, i64 0
%64 = call i32 (i8*, i8*, ...) @sprintf(i8* %63, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
br label %65
65: ; preds = %53, %49
br label %24
66: ; preds = %24
%67 = load i8*, i8** %5
%68 = getelementptr inbounds [10000 x i8], [10000 x i8]* %10, i64 0, i64 0
%69 = call i32 (i8*, i8*, ...) @sprintf(i8* %67, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* %68)
%70 = load i8*, i8** %6
%71 = getelementptr inbounds [1000000 x i8], [1000000 x i8]* %11, i64 0, i64 0
%72 = call i32 @strcpy(i8* %70, i8* %71)
ret void
}

LLVM IR (-O2):
@.str.1 = [2 x i8] c">\00"
@.str.2 = [5 x i8] c"%s%s\00"
define void @read_fasta_seq(i32* nocapture %0, i8* %1, i8* %2) {
%4 = alloca [10000 x i8]
%5 = alloca [10 x i8]
%6 = alloca [10000 x i8]
%7 = alloca [1000000 x i8]
%8 = alloca [10000 x i8]
%9 = alloca [1000000 x i8]
%10 = getelementptr inbounds [10000 x i8], [10000 x i8]* %4, i64 0, i64 0
%11 = getelementptr inbounds [10 x i8], [10 x i8]* %5, i64 0, i64 0
%12 = getelementptr inbounds [10000 x i8], [10000 x i8]* %6, i64 0, i64 0
%13 = getelementptr inbounds [1000000 x i8], [1000000 x i8]* %7, i64 0, i64 0
%14 = getelementptr inbounds [10000 x i8], [10000 x i8]* %8, i64 0, i64 0
%15 = getelementptr inbounds [1000000 x i8], [1000000 x i8]* %9, i64 0, i64 0
store i8 0, i8* %13
store i8 0, i8* %12
store i8 0, i8* %1
store i8 0, i8* %11
store i8 0, i8* %10
%16 = call i64 @strcmp(i8* %11, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%17 = icmp ne i64 %16, 0
%18 = call i64 @feof(i32* %0)
%19 = icmp eq i64 %18, 0
%20 = and i1 %17, %19
br i1 %20, label %21, label %38
21: ; preds = %3, %32
%22 = call i32 @fgets(i8* %10, i32 10000, i32* %0)
%23 = call i32 @remove_carriage_return(i8* %14, i8* %10)
%24 = call i32 @StrnCpy(i8* %11, i8* %10, i32 1)
%25 = call i64 @strcmp(i8* %11, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%26 = icmp eq i64 %25, 0
br i1 %26, label %27, label %29
27: ; preds = %21
%28 = call i32 @strcpy(i8* %12, i8* %14)
br label %32
29: ; preds = %21
%30 = call i32 (i8*, i8*, ...) @sprintf(i8* %15, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8* %13, i8* %14)
%31 = call i32 @strcpy(i8* %13, i8* %15)
store i8 0, i8* %14
store i8 0, i8* %15
br label %32
32: ; preds = %29, %27
%33 = call i64 @strcmp(i8* %11, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%34 = icmp ne i64 %33, 0
%35 = call i64 @feof(i32* %0)
%36 = icmp eq i64 %35, 0
%37 = and i1 %34, %36
br i1 %37, label %21, label %38
38: ; preds = %32, %3
%39 = call i8* bitcast (i32 (i8*, i8*)* @strcpy to i8* (i8*, i8*)*)(i8* %1, i8* %12)
%40 = call i32 @strcpy(i8* %2, i8* %13)
ret void
}