#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*/ assert(int /*<<< orphan*/ *);
int /*<<< orphan*/ exit(int);
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 *);
scalar_t__ isalpha(char);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ stderr;
int main(int argc, char **argv) {
  FILE *file;
  int i, written = 0;
  char buffer[1024], ch;
  if (argc == 1) {
    fprintf(stderr, "Usage:\n\nseqmerge fasta_file1 fasta_file2 ...\n");
    exit(1);
  }
  for (i = 1; i < argc; i++) {
    file = fopen(argv[i], "r");
    assert(file);
    fgets(buffer, 1024, file);
    if (i == 1)
      printf("%s", buffer);
    while (!feof(file)) {
      ch = fgetc(file);
      if (ch == '>')
        break;
      if (isalpha(ch) || ch == '.' || ch == '-') {
        printf("%c", ch);
        written++;
        if (written % 60 == 0)
          printf("\n");
      }
    }
    fclose(file);
  }
  if (written ^ 60 != 0)
    printf("\n");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x430,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x20(%rbp)
cmpl   $0x1,-0x8(%rbp)
jne    11e9 <main+0x49>
mov    0x2e0f(%rip),%rax
mov    (%rax),%edi
lea    0xe26(%rip),%rsi
call   1080 <fprintf@plt>
mov    $0x1,%edi
call   10c0 <exit@plt>
movl   $0x1,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1333 <main+0x193>
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xe1f(%rip),%rsi
call   10b0 <fopen@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1070 <assert@plt>
lea    -0x420(%rbp),%rdi
mov    -0x18(%rbp),%rdx
mov    $0x400,%esi
call   1060 <fgets@plt>
cmpl   $0x1,-0x1c(%rbp)
jne    1255 <main+0xb5>
lea    -0x420(%rbp),%rsi
lea    0xde2(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    125a <main+0xba>
mov    -0x18(%rbp),%rdi
call   1090 <feof@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    1278 <main+0xd8>
jmp    131c <main+0x17c>
mov    -0x18(%rbp),%rdi
call   1050 <fgetc@plt>
mov    %al,-0x421(%rbp)
movsbl -0x421(%rbp),%eax
cmp    $0x3e,%eax
jne    129c <main+0xfc>
jmp    131c <main+0x17c>
movsbl -0x421(%rbp),%edi
call   10a0 <isalpha@plt>
cmp    $0x0,%rax
jne    12d2 <main+0x132>
movsbl -0x421(%rbp),%eax
cmp    $0x2e,%eax
je     12d2 <main+0x132>
movsbl -0x421(%rbp),%eax
cmp    $0x2d,%eax
jne    1317 <main+0x177>
movsbl -0x421(%rbp),%esi
lea    0xd53(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
mov    -0x20(%rbp),%eax
mov    $0x3c,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1312 <main+0x172>
lea    0xd21(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1317 <main+0x177>
jmp    125a <main+0xba>
mov    -0x18(%rbp),%rdi
call   1030 <fclose@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    11f0 <main+0x50>
mov    -0x20(%rbp),%eax
xor    $0x1,%eax
cmp    $0x0,%eax
je     1350 <main+0x1b0>
lea    0xce3(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x430,%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,0x8(%rsp)
cmp    $0x1,%edi
je     12ef <main+0x13f>
jle    12d1 <main+0x121>
mov    %edi,%r14d
mov    $0x1,%r15d
xor    %r13d,%r13d
jmp    1205 <main+0x55>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %rbx,%rdi
call   1040 <fclose@plt>
add    $0x1,%r15
cmp    %r14,%r15
je     12cb <main+0x11b>
mov    0x8(%rsp),%rax
mov    (%rax,%r15,8),%rdi
lea    0xe19(%rip),%rsi
call   10c0 <fopen@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1080 <assert@plt>
lea    0x10(%rsp),%rdi
mov    $0x400,%esi
mov    %rbx,%rdx
call   1070 <fgets@plt>
cmp    $0x1,%r15
jne    1281 <main+0xd1>
lea    0xdec(%rip),%rdi
lea    0x10(%rsp),%rsi
xor    %eax,%eax
call   1050 <printf@plt>
jmp    1281 <main+0xd1>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %ebp,%edi
call   1030 <putchar@plt>
add    $0x1,%r13d
imul   $0xeeeeeeef,%r13d,%eax
add    $0x8888888,%eax
ror    $0x2,%eax
cmp    $0x4444444,%eax
jbe    12bf <main+0x10f>
mov    %rbx,%rdi
call   10a0 <feof@plt>
test   %eax,%eax
jne    11f0 <main+0x40>
mov    %rbx,%rdi
call   1060 <fgetc@plt>
cmp    $0x3e,%al
je     11f0 <main+0x40>
mov    %eax,%r12d
movsbl %al,%ebp
mov    %ebp,%edi
call   10b0 <isalpha@plt>
add    $0xd3,%r12b
cmp    $0x2,%r12b
jb     1260 <main+0xb0>
test   %rax,%rax
je     1281 <main+0xd1>
jmp    1260 <main+0xb0>
mov    $0xa,%edi
call   1030 <putchar@plt>
jmp    1281 <main+0xd1>
cmp    $0x1,%r13d
je     12db <main+0x12b>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
add    $0x418,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x2cea(%rip),%rax
mov    (%rax),%edi
lea    0xd01(%rip),%rsi
call   1090 <fprintf@plt>
mov    $0x1,%edi
call   10d0 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [46 x i8] c"Usage:\0A\0Aseqmerge fasta_file1 fasta_file2 ...\0A\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [3 x i8] c"%s\00"
@.str.3 = [3 x i8] c"%c\00"
@.str.4 = [2 x i8] c"\0A\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 [1024 x i8]
%10 = alloca i8
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %8
%11 = load i32, i32* %4
%12 = icmp eq i32 %11, 1
br i1 %12, label %13, label %17
13: ; preds = %2
%14 = load i32, i32* @stderr
%15 = call i32 @fprintf(i32 %14, i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
%16 = call i32 @exit(i32 1)
unreachable
17: ; preds = %2
store i32 1, i32* %7
br label %18
18: ; preds = %80, %17
%19 = load i32, i32* %7
%20 = load i32, i32* %4
%21 = icmp slt i32 %19, %20
br i1 %21, label %22, label %83
22: ; preds = %18
%23 = load i8**, i8*** %5
%24 = load i32, i32* %7
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds i8*, i8** %23, i64 %25
%27 = load i8*, i8** %26
%28 = call i32* @fopen(i8* %27, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %28, i32** %6
%29 = load i32*, i32** %6
%30 = call i32 @assert(i32* %29)
%31 = getelementptr inbounds [1024 x i8], [1024 x i8]* %9, i64 0, i64 0
%32 = load i32*, i32** %6
%33 = call i32 @fgets(i8* %31, i32 1024, i32* %32)
%34 = load i32, i32* %7
%35 = icmp eq i32 %34, 1
br i1 %35, label %36, label %39
36: ; preds = %22
%37 = getelementptr inbounds [1024 x i8], [1024 x i8]* %9, i64 0, i64 0
%38 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %37)
br label %39
39: ; preds = %36, %22
br label %40
40: ; preds = %76, %39
%41 = load i32*, i32** %6
%42 = call i32 @feof(i32* %41)
%43 = icmp ne i32 %42, 0
%44 = xor i1 %43, true
br i1 %44, label %45, label %77
45: ; preds = %40
%46 = load i32*, i32** %6
%47 = call signext i8 @fgetc(i32* %46)
store i8 %47, i8* %10
%48 = load i8, i8* %10
%49 = sext i8 %48 to i32
%50 = icmp eq i32 %49, 62
br i1 %50, label %51, label %52
51: ; preds = %45
br label %77
52: ; preds = %45
%53 = load i8, i8* %10
%54 = call i64 @isalpha(i8 signext %53)
%55 = icmp ne i64 %54, 0
br i1 %55, label %64, label %56
56: ; preds = %52
%57 = load i8, i8* %10
%58 = sext i8 %57 to i32
%59 = icmp eq i32 %58, 46
br i1 %59, label %64, label %60
60: ; preds = %56
%61 = load i8, i8* %10
%62 = sext i8 %61 to i32
%63 = icmp eq i32 %62, 45
br i1 %63, label %64, label %76
64: ; preds = %60, %56, %52
%65 = load i8, i8* %10
%66 = sext i8 %65 to i32
%67 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32 %66)
%68 = load i32, i32* %8
%69 = add nsw i32 %68, 1
store i32 %69, i32* %8
%70 = load i32, i32* %8
%71 = srem i32 %70, 60
%72 = icmp eq i32 %71, 0
br i1 %72, label %73, label %75
73: ; preds = %64
%74 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
br label %75
75: ; preds = %73, %64
br label %76
76: ; preds = %75, %60
br label %40
77: ; preds = %51, %40
%78 = load i32*, i32** %6
%79 = call i32 @fclose(i32* %78)
br label %80
80: ; preds = %77
%81 = load i32, i32* %7
%82 = add nsw i32 %81, 1
store i32 %82, i32* %7
br label %18
83: ; preds = %18
%84 = load i32, i32* %8
%85 = xor i32 %84, 1
%86 = icmp ne i32 %85, 0
br i1 %86, label %87, label %89
87: ; preds = %83
%88 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
br label %89
89: ; preds = %87, %83
%90 = load i32, i32* %3
ret i32 %90
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [46 x i8] c"Usage:\0A\0Aseqmerge fasta_file1 fasta_file2 ...\0A\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [3 x i8] c"%s\00"
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 = icmp eq i32 %0, 1
br i1 %5, label %10, label %6
6: ; preds = %2
%7 = icmp sgt i32 %0, 1
br i1 %7, label %8, label %57
8: ; preds = %6
%9 = zext i32 %0 to i64
br label %14
10: ; preds = %2
%11 = load i32, i32* @stderr
%12 = tail call i32 @fprintf(i32 %11, i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
%13 = tail call i32 @exit(i32 1)
unreachable
14: ; preds = %8, %50
%15 = phi i64 [ 1, %8 ], [ %53, %50 ]
%16 = phi i32 [ 0, %8 ], [ %51, %50 ]
%17 = getelementptr inbounds i8*, i8** %1, i64 %15
%18 = load i8*, i8** %17
%19 = call i32* @fopen(i8* %18, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%20 = call i32 @assert(i32* %19)
%21 = call i32 @fgets(i8* %4, i32 1024, i32* %19)
%22 = icmp eq i64 %15, 1
br i1 %22, label %23, label %25
23: ; preds = %14
%24 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %4)
br label %25
25: ; preds = %23, %14
%26 = call i32 @feof(i32* %19)
%27 = icmp eq i32 %26, 0
br i1 %27, label %28, label %50
28: ; preds = %25, %46
%29 = phi i32 [ %47, %46 ], [ %16, %25 ]
%30 = call signext i8 @fgetc(i32* %19)
%31 = sext i8 %30 to i32
%32 = icmp eq i8 %30, 62
br i1 %32, label %50, label %33
33: ; preds = %28
%34 = call i64 @isalpha(i8 signext %30)
%35 = icmp ne i64 %34, 0
%36 = add i8 %30, -45
%37 = icmp ult i8 %36, 2
%38 = or i1 %37, %35
br i1 %38, label %39, label %46
39: ; preds = %33
%40 = call i32 @putchar(i32 %31)
%41 = add nsw i32 %29, 1
%42 = srem i32 %41, 60
%43 = icmp eq i32 %42, 0
br i1 %43, label %44, label %46
44: ; preds = %39
%45 = call i32 @putchar(i32 10)
br label %46
46: ; preds = %39, %44, %33
%47 = phi i32 [ %41, %44 ], [ %41, %39 ], [ %29, %33 ]
%48 = call i32 @feof(i32* %19)
%49 = icmp eq i32 %48, 0
br i1 %49, label %28, label %50
50: ; preds = %46, %28, %25
%51 = phi i32 [ %16, %25 ], [ %29, %28 ], [ %47, %46 ]
%52 = call i32 @fclose(i32* %19)
%53 = add nuw nsw i64 %15, 1
%54 = icmp eq i64 %53, %9
br i1 %54, label %55, label %14
55: ; preds = %50
%56 = icmp eq i32 %51, 1
br i1 %56, label %59, label %57
57: ; preds = %6, %55
%58 = call i32 @putchar(i32 10)
br label %59
59: ; preds = %57, %55
ret i32 0
}