#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*/ puts(char *);
char read_stdin();
void stdin_stats_protein() {
  char in[3] = {'\0', '\0', '\0'};
  int cont = 1;
  while (cont == 1) {
    in[0] = read_stdin();
    in[1] = read_stdin();
    in[2] = read_stdin();
    char out = bioseq_dna_codon_protein(in[0], in[1], in[2]);
    if (out == '?' || out == '\0')
      cont = 0;
  }
  puts("");
}


x86 assembly (clang, -O0):
<stdin_stats_protein>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x3(%rbp),%rdi
xor    %esi,%esi
mov    $0x3,%edx
call   1040 <memset@plt>
movl   $0x1,-0x8(%rbp)
cmpl   $0x1,-0x8(%rbp)
jne    11c5 <stdin_stats_protein+0x85>
mov    $0x0,%al
call   1060 <read_stdin@plt>
mov    %al,-0x3(%rbp)
mov    $0x0,%al
call   1060 <read_stdin@plt>
mov    %al,-0x2(%rbp)
mov    $0x0,%al
call   1060 <read_stdin@plt>
mov    %al,-0x1(%rbp)
mov    -0x3(%rbp),%cl
mov    -0x2(%rbp),%al
movsbl %cl,%edi
movsbl %al,%esi
movsbl -0x1(%rbp),%edx
call   1050 <bioseq_dna_codon_protein@plt>
mov    %al,-0x9(%rbp)
movsbl -0x9(%rbp),%eax
cmp    $0x3f,%eax
je     11b9 <stdin_stats_protein+0x79>
movsbl -0x9(%rbp),%eax
cmp    $0x0,%eax
jne    11c0 <stdin_stats_protein+0x80>
movl   $0x0,-0x8(%rbp)
jmp    115f <stdin_stats_protein+0x1f>
lea    0xe34(%rip),%rdi
call   1030 <puts@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stdin_stats_protein>:
push   %rbp
push   %rbx
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
xor    %eax,%eax
call   1050 <read_stdin@plt>
mov    %eax,%ebp
xor    %eax,%eax
call   1050 <read_stdin@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1050 <read_stdin@plt>
movsbl %bpl,%edi
movsbl %bl,%esi
movsbl %al,%edx
call   1040 <bioseq_dna_codon_protein@plt>
cmp    $0x3f,%al
je     1170 <stdin_stats_protein+0x40>
test   %al,%al
jne    1140 <stdin_stats_protein+0x10>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <putchar@plt>

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

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