#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 */
int /*<<< orphan*/ DecodeSpeech(char *);
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ *fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ stdin;
int /*<<< orphan*/ stdout;
int main(int argc, char *argv[]) {
  char string[1000];
  fflush(stdin);
  while (fgets(string, 1000, stdin) != NULL) {
    DecodeSpeech(string);
    fputs(string, stdout);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x400,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2e88(%rip),%rax
mov    (%rax),%edi
call   1050 <fflush@plt>
lea    -0x400(%rbp),%rdi
mov    0x2e73(%rip),%rax
mov    (%rax),%edx
mov    $0x3e8,%esi
call   1040 <fgets@plt>
cmp    $0x0,%rax
je     11b1 <main+0x71>
lea    -0x400(%rbp),%rdi
call   1060 <DecodeSpeech@plt>
lea    -0x400(%rbp),%rdi
mov    0x2e33(%rip),%rax
mov    (%rax),%esi
call   1030 <fputs@plt>
jmp    1167 <main+0x27>
xor    %eax,%eax
add    $0x400,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x3f0,%rsp
mov    0x2e95(%rip),%r14
mov    (%r14),%edi
call   1050 <fflush@plt>
mov    (%r14),%edx
mov    %rsp,%rdi
mov    $0x3e8,%esi
call   1040 <fgets@plt>
test   %rax,%rax
je     11a8 <main+0x68>
mov    %rsp,%rbx
mov    0x2e5e(%rip),%r15
nopw   0x0(%rax,%rax,1)
mov    %rbx,%rdi
call   1060 <DecodeSpeech@plt>
mov    (%r15),%esi
mov    %rbx,%rdi
call   1030 <fputs@plt>
mov    (%r14),%edx
mov    %rbx,%rdi
mov    $0x3e8,%esi
call   1040 <fgets@plt>
test   %rax,%rax
jne    1180 <main+0x40>
xor    %eax,%eax
add    $0x3f0,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@stdin = global i32 0
@stdout = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [1000 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i32, i32* @stdin
%8 = call i32 @fflush(i32 %7)
br label %9
9: ; preds = %14, %2
%10 = getelementptr inbounds [1000 x i8], [1000 x i8]* %6, i64 0, i64 0
%11 = load i32, i32* @stdin
%12 = call i32* @fgets(i8* %10, i32 1000, i32 %11)
%13 = icmp ne i32* %12, null
br i1 %13, label %14, label %20
14: ; preds = %9
%15 = getelementptr inbounds [1000 x i8], [1000 x i8]* %6, i64 0, i64 0
%16 = call i32 @DecodeSpeech(i8* %15)
%17 = getelementptr inbounds [1000 x i8], [1000 x i8]* %6, i64 0, i64 0
%18 = load i32, i32* @stdout
%19 = call i32 @fputs(i8* %17, i32 %18)
br label %9
20: ; preds = %9
ret i32 0
}

LLVM IR (-O2):
@stdin = global i32 0
@stdout = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [1000 x i8]
%4 = getelementptr inbounds [1000 x i8], [1000 x i8]* %3, i64 0, i64 0
%5 = load i32, i32* @stdin
%6 = tail call i32 @fflush(i32 %5)
%7 = load i32, i32* @stdin
%8 = call i32* @fgets(i8* %4, i32 1000, i32 %7)
%9 = icmp eq i32* %8, null
br i1 %9, label %17, label %10
10: ; preds = %2, %10
%11 = call i32 @DecodeSpeech(i8* %4)
%12 = load i32, i32* @stdout
%13 = call i32 @fputs(i8* %4, i32 %12)
%14 = load i32, i32* @stdin
%15 = call i32* @fgets(i8* %4, i32 1000, i32 %14)
%16 = icmp eq i32* %15, null
br i1 %16, label %17, label %10
17: ; preds = %10, %2
ret i32 0
}