#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 *);
int /*<<< orphan*/ strcat(char *, char *);
scalar_t__ strcmp(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
void read_fasta_seq3(FILE *file_handle, char *info, char *seq) {
  char txtline[10000];
  int n_chars = 10000;
  char c[10];
  char temp[10000];
  sprintf(info, "");
  sprintf(c, "");
  sprintf(txtline, "");
  sprintf(seq, "");
  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(info, temp);
    } else {
      if (feof(file_handle) == 0)
        strcat(seq, temp);
    }
  }
}


x86 assembly (clang, -O0):
<read_fasta_seq3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x4e60,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movl   $0x2710,-0x2734(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xe55(%rip),%rsi
call   10a0 <sprintf@plt>
lea    -0x273e(%rbp),%rdi
lea    0xe42(%rip),%rsi
call   10a0 <sprintf@plt>
lea    -0x2730(%rbp),%rdi
lea    0xe2f(%rip),%rsi
call   10a0 <sprintf@plt>
mov    -0x18(%rbp),%rdi
lea    0xe1f(%rip),%rsi
call   10a0 <sprintf@plt>
lea    -0x273e(%rbp),%rdi
lea    0xe0b(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
setne  %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4e54(%rbp)
mov    -0x8(%rbp),%rdi
call   1060 <feof@plt>
mov    %rax,%rcx
mov    -0x4e54(%rbp),%eax
cmp    $0x0,%rcx
sete   %cl
and    $0x1,%cl
movzbl %cl,%ecx
and    %ecx,%eax
cmp    $0x0,%eax
je     12d6 <read_fasta_seq3+0x156>
lea    -0x2730(%rbp),%rdi
mov    -0x2734(%rbp),%esi
mov    -0x8(%rbp),%rdx
call   1040 <fgets@plt>
lea    -0x4e50(%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    0xd7b(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
jne    12a9 <read_fasta_seq3+0x129>
mov    -0x10(%rbp),%rdi
lea    -0x4e50(%rbp),%rsi
call   1030 <strcpy@plt>
jmp    12d1 <read_fasta_seq3+0x151>
mov    -0x8(%rbp),%rdi
call   1060 <feof@plt>
cmp    $0x0,%rax
jne    12cc <read_fasta_seq3+0x14c>
mov    -0x18(%rbp),%rdi
lea    -0x4e50(%rbp),%rsi
call   1090 <strcat@plt>
jmp    12d1 <read_fasta_seq3+0x151>
jmp    11e7 <read_fasta_seq3+0x67>
add    $0x4e60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_fasta_seq3>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x4e48,%rsp
mov    %rdi,%rbx
mov    %rsi,0x18(%rsp)
movb   $0x0,(%rsi)
movb   $0x0,0x6(%rsp)
movb   $0x0,0x20(%rsp)
mov    %rdx,0x10(%rsp)
movb   $0x0,(%rdx)
lea    0xe5b(%rip),%rsi
lea    0x6(%rsp),%rdi
call   1050 <strcmp@plt>
mov    %rax,%rbp
mov    %rbx,%rdi
call   1060 <feof@plt>
test   %rbp,%rbp
je     1281 <read_fasta_seq3+0x111>
test   %rax,%rax
jne    1281 <read_fasta_seq3+0x111>
lea    0x20(%rsp),%r12
lea    0x2730(%rsp),%r13
lea    0x6(%rsp),%rbp
lea    0xe1b(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nop
mov    %r12,%rdi
mov    $0x2710,%esi
mov    %rbx,%rdx
call   1040 <fgets@plt>
mov    %r13,%rdi
mov    %r12,%rsi
call   1070 <remove_carriage_return@plt>
mov    %rbp,%rdi
mov    %r12,%rsi
mov    $0x1,%edx
call   1080 <StrnCpy@plt>
mov    %rbp,%rdi
mov    %r14,%rsi
call   1050 <strcmp@plt>
test   %rax,%rax
je     1250 <read_fasta_seq3+0xe0>
mov    %rbx,%rdi
call   1060 <feof@plt>
test   %rax,%rax
jne    125d <read_fasta_seq3+0xed>
mov    0x10(%rsp),%rdi
mov    %r13,%rsi
call   1090 <strcat@plt>
jmp    125d <read_fasta_seq3+0xed>
nopw   0x0(%rax,%rax,1)
mov    0x18(%rsp),%rdi
mov    %r13,%rsi
call   1030 <strcpy@plt>
mov    %rbp,%rdi
mov    %r14,%rsi
call   1050 <strcmp@plt>
mov    %rax,%r15
mov    %rbx,%rdi
call   1060 <feof@plt>
test   %r15,%r15
je     1281 <read_fasta_seq3+0x111>
test   %rax,%rax
je     11f0 <read_fasta_seq3+0x80>
add    $0x4e48,%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"
define void @read_fasta_seq3(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]
store i32* %0, i32** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
store i32 10000, i32* %8
%11 = load i8*, i8** %5
%12 = call i32 @sprintf(i8* %11, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%13 = getelementptr inbounds [10 x i8], [10 x i8]* %9, i64 0, i64 0
%14 = call i32 @sprintf(i8* %13, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%15 = getelementptr inbounds [10000 x i8], [10000 x i8]* %7, i64 0, i64 0
%16 = call i32 @sprintf(i8* %15, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%17 = load i8*, i8** %6
%18 = call i32 @sprintf(i8* %17, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
br label %19
19: ; preds = %57, %3
%20 = getelementptr inbounds [10 x i8], [10 x i8]* %9, i64 0, i64 0
%21 = call i64 @strcmp(i8* %20, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%22 = icmp ne i64 %21, 0
%23 = zext i1 %22 to i32
%24 = load i32*, i32** %4
%25 = call i64 @feof(i32* %24)
%26 = icmp eq i64 %25, 0
%27 = zext i1 %26 to i32
%28 = and i32 %23, %27
%29 = icmp ne i32 %28, 0
br i1 %29, label %30, label %58
30: ; preds = %19
%31 = getelementptr inbounds [10000 x i8], [10000 x i8]* %7, i64 0, i64 0
%32 = load i32, i32* %8
%33 = load i32*, i32** %4
%34 = call i32 @fgets(i8* %31, i32 %32, i32* %33)
%35 = getelementptr inbounds [10000 x i8], [10000 x i8]* %10, i64 0, i64 0
%36 = getelementptr inbounds [10000 x i8], [10000 x i8]* %7, i64 0, i64 0
%37 = call i32 @remove_carriage_return(i8* %35, i8* %36)
%38 = getelementptr inbounds [10 x i8], [10 x i8]* %9, i64 0, i64 0
%39 = getelementptr inbounds [10000 x i8], [10000 x i8]* %7, i64 0, i64 0
%40 = call i32 @StrnCpy(i8* %38, i8* %39, i32 1)
%41 = getelementptr inbounds [10 x i8], [10 x i8]* %9, i64 0, i64 0
%42 = call i64 @strcmp(i8* %41, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%43 = icmp eq i64 %42, 0
br i1 %43, label %44, label %48
44: ; preds = %30
%45 = load i8*, i8** %5
%46 = getelementptr inbounds [10000 x i8], [10000 x i8]* %10, i64 0, i64 0
%47 = call i32 @strcpy(i8* %45, i8* %46)
br label %57
48: ; preds = %30
%49 = load i32*, i32** %4
%50 = call i64 @feof(i32* %49)
%51 = icmp eq i64 %50, 0
br i1 %51, label %52, label %56
52: ; preds = %48
%53 = load i8*, i8** %6
%54 = getelementptr inbounds [10000 x i8], [10000 x i8]* %10, i64 0, i64 0
%55 = call i32 @strcat(i8* %53, i8* %54)
br label %56
56: ; preds = %52, %48
br label %57
57: ; preds = %56, %44
br label %19
58: ; preds = %19
ret void
}

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