#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*/ fputc(char, int /*<<< orphan*/);
int /*<<< orphan*/ open_infile();
int /*<<< orphan*/ puts(char *);
char read_infile();
int /*<<< orphan*/ stdout;
void filein_stdout_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]);
    fputc(out, stdout);
    if (out == '?' || out == '\0')
      cont = 0;
  }
  puts("");
  close_infile();
}


x86 assembly (clang, -O0):
<filein_stdout_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   1090 <open_infile@plt>
cmpl   $0x1,-0x8(%rbp)
jne    1210 <filein_stdout_protein+0xa0>
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   1080 <bioseq_dna_codon_protein@plt>
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
mov    0x2e00(%rip),%rcx
mov    (%rcx),%esi
movsbl %al,%edi
call   1070 <fputc@plt>
movsbl -0x9(%rbp),%eax
cmp    $0x3f,%eax
je     1204 <filein_stdout_protein+0x94>
movsbl -0x9(%rbp),%eax
cmp    $0x0,%eax
jne    120b <filein_stdout_protein+0x9b>
movl   $0x0,-0x8(%rbp)
jmp    1196 <filein_stdout_protein+0x26>
lea    0xde9(%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_stdout_protein>:
push   %rbp
push   %r14
push   %rbx
xor    %eax,%eax
call   1080 <open_infile@plt>
mov    0x2e6e(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
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   1070 <bioseq_dna_codon_protein@plt>
mov    %eax,%ebx
mov    (%r14),%esi
movsbl %al,%ebp
mov    %ebp,%edi
call   1060 <fputc@plt>
cmp    $0x3f,%bpl
je     11c1 <filein_stdout_protein+0x61>
test   %bl,%bl
jne    1180 <filein_stdout_protein+0x20>
mov    $0xa,%edi
call   1040 <putchar@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <close_infile@plt>

LLVM IR (-O0):
@stdout = global i32 0
@.str = [1 x i8] zeroinitializer
define void @filein_stdout_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 = %34, %0
%7 = load i32, i32* %2
%8 = icmp eq i32 %7, 1
br i1 %8, label %9, label %35
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 = load i32, i32* @stdout
%25 = call i32 @fputc(i8 signext %23, i32 %24)
%26 = load i8, i8* %3
%27 = sext i8 %26 to i32
%28 = icmp eq i32 %27, 63
br i1 %28, label %33, label %29
29: ; preds = %9
%30 = load i8, i8* %3
%31 = sext i8 %30 to i32
%32 = icmp eq i32 %31, 0
br i1 %32, label %33, label %34
33: ; preds = %29, %9
store i32 0, i32* %2
br label %34
34: ; preds = %33, %29
br label %6
35: ; preds = %6
%36 = call i32 @puts(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%37 = call i32 (...) @close_infile()
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
define void @filein_stdout_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)
%7 = load i32, i32* @stdout
%8 = tail call i32 @fputc(i8 signext %6, i32 %7)
switch i8 %6, label %2 [
i8 63, label %9
i8 0, label %9
]
9: ; preds = %2, %2
%10 = tail call i32 @putchar(i32 10)
%11 = tail call i32 (...) @close_infile()
ret void
}