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

/* Variables and functions */
char bioseq_dna_codon_protein(char, char, char);
int /*<<< orphan*/ close_infile();
int /*<<< orphan*/ open_infile();
int /*<<< orphan*/ puts(char *);
char read_infile();
void filein_stats_protein() {
  char in[3] = {'\0', '\0', '\0'};
  int cont = 1;
  open_infile();
  while (cont == 1) {
    in[0] = read_infile();
    in[1] = read_infile();
    in[2] = read_infile();
    char out = bioseq_dna_codon_protein(in[0], in[1], in[2]);
    if (out == '?' || out == '\0')
      cont = 0;
  }
  puts("");
  close_infile();
}


x86 assembly (clang, -O0):
<filein_stats_protein>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x3(%rbp),%rdi
xor    %esi,%esi
mov    $0x3,%edx
call   1060 <memset@plt>
movl   $0x1,-0x8(%rbp)
mov    $0x0,%al
call   1080 <open_infile@plt>
cmpl   $0x1,-0x8(%rbp)
jne    11ec <filein_stats_protein+0x8c>
mov    $0x0,%al
call   1050 <read_infile@plt>
mov    %al,-0x3(%rbp)
mov    $0x0,%al
call   1050 <read_infile@plt>
mov    %al,-0x2(%rbp)
mov    $0x0,%al
call   1050 <read_infile@plt>
mov    %al,-0x1(%rbp)
mov    -0x3(%rbp),%cl
mov    -0x2(%rbp),%al
movsbl %cl,%edi
movsbl %al,%esi
movsbl -0x1(%rbp),%edx
call   1070 <bioseq_dna_codon_protein@plt>
mov    %al,-0x9(%rbp)
movsbl -0x9(%rbp),%eax
cmp    $0x3f,%eax
je     11e0 <filein_stats_protein+0x80>
movsbl -0x9(%rbp),%eax
cmp    $0x0,%eax
jne    11e7 <filein_stats_protein+0x87>
movl   $0x0,-0x8(%rbp)
jmp    1186 <filein_stats_protein+0x26>
lea    0xe0d(%rip),%rdi
call   1040 <puts@plt>
mov    $0x0,%al
call   1030 <close_infile@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<filein_stats_protein>:
push   %rbp
push   %rbx
push   %rax
xor    %eax,%eax
call   1070 <open_infile@plt>
nopw   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1050 <read_infile@plt>
mov    %eax,%ebp
xor    %eax,%eax
call   1050 <read_infile@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1050 <read_infile@plt>
movsbl %bpl,%edi
movsbl %bl,%esi
movsbl %al,%edx
call   1060 <bioseq_dna_codon_protein@plt>
cmp    $0x3f,%al
je     1190 <filein_stats_protein+0x40>
test   %al,%al
jne    1160 <filein_stats_protein+0x10>
mov    $0xa,%edi
call   1040 <putchar@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <close_infile@plt>

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define void @filein_stats_protein() {
%1 = alloca [3 x i8]
%2 = alloca i32
%3 = alloca i8
%4 = bitcast [3 x i8]* %1 to i8*
store i32 1, i32* %2
%5 = call i32 (...) @open_infile()
br label %6
6: ; preds = %31, %0
%7 = load i32, i32* %2
%8 = icmp eq i32 %7, 1
br i1 %8, label %9, label %32
9: ; preds = %6
%10 = call signext i8 (...) @read_infile()
%11 = getelementptr inbounds [3 x i8], [3 x i8]* %1, i64 0, i64 0
store i8 %10, i8* %11
%12 = call signext i8 (...) @read_infile()
%13 = getelementptr inbounds [3 x i8], [3 x i8]* %1, i64 0, i64 1
store i8 %12, i8* %13
%14 = call signext i8 (...) @read_infile()
%15 = getelementptr inbounds [3 x i8], [3 x i8]* %1, i64 0, i64 2
store i8 %14, i8* %15
%16 = getelementptr inbounds [3 x i8], [3 x i8]* %1, i64 0, i64 0
%17 = load i8, i8* %16
%18 = getelementptr inbounds [3 x i8], [3 x i8]* %1, i64 0, i64 1
%19 = load i8, i8* %18
%20 = getelementptr inbounds [3 x i8], [3 x i8]* %1, i64 0, i64 2
%21 = load i8, i8* %20
%22 = call signext i8 @bioseq_dna_codon_protein(i8 signext %17, i8 signext %19, i8 signext %21)
store i8 %22, i8* %3
%23 = load i8, i8* %3
%24 = sext i8 %23 to i32
%25 = icmp eq i32 %24, 63
br i1 %25, label %30, label %26
26: ; preds = %9
%27 = load i8, i8* %3
%28 = sext i8 %27 to i32
%29 = icmp eq i32 %28, 0
br i1 %29, label %30, label %31
30: ; preds = %26, %9
store i32 0, i32* %2
br label %31
31: ; preds = %30, %26
br label %6
32: ; preds = %6
%33 = call i32 @puts(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%34 = call i32 (...) @close_infile()
ret void
}

LLVM IR (-O2):
define void @filein_stats_protein() {
%1 = tail call i32 (...) @open_infile()
br label %2
2: ; preds = %2, %0
%3 = tail call signext i8 (...) @read_infile()
%4 = tail call signext i8 (...) @read_infile()
%5 = tail call signext i8 (...) @read_infile()
%6 = tail call signext i8 @bioseq_dna_codon_protein(i8 signext %3, i8 signext %4, i8 signext %5)
switch i8 %6, label %2 [
i8 63, label %7
i8 0, label %7
]
7: ; preds = %2, %2
%8 = tail call i32 @putchar(i32 10)
%9 = tail call i32 (...) @close_infile()
ret void
}