#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*/ formatInput(char *);
int /*<<< orphan*/ printf(char *, char *);
int scanf(char *, char *);
scalar_t__ strcmp(char *, char *);
int main(int argc, char const *argv[]) {
  char str[200];
  while (scanf(" %200[^\n]", str), strcmp(str, "*") != 0) {
    formatInput(str);
    printf("%s\n", str);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xe0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0xe0(%rbp),%rsi
lea    0xe99(%rip),%rdi
call   1060 <scanf@plt>
lea    -0xe0(%rbp),%rdi
lea    0xe90(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
je     11ad <main+0x6d>
lea    -0xe0(%rbp),%rdi
call   1050 <formatInput@plt>
lea    -0xe0(%rbp),%rsi
lea    0xe69(%rip),%rdi
call   1030 <printf@plt>
jmp    1159 <main+0x19>
xor    %eax,%eax
add    $0xe0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0xc8,%rsp
lea    0xeab(%rip),%rdi
mov    %rsp,%rbx
mov    %rbx,%rsi
call   1060 <scanf@plt>
lea    0xea3(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcmp@plt>
test   %rax,%rax
je     11be <main+0x7e>
mov    %rsp,%rbx
lea    0xe8e(%rip),%r14
lea    0xe7b(%rip),%r15
lea    0xe7e(%rip),%r12
nopl   0x0(%rax)
mov    %rbx,%rdi
call   1050 <formatInput@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
call   1060 <scanf@plt>
mov    %rbx,%rdi
mov    %r12,%rsi
call   1040 <strcmp@plt>
test   %rax,%rax
jne    1190 <main+0x50>
xor    %eax,%eax
add    $0xc8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [10 x i8] c" %200[^\0A]\00"
@.str.1 = [2 x i8] c"*\00"
@.str.2 = [4 x i8] c"%s\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [200 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
br label %7
7: ; preds = %13, %2
%8 = getelementptr inbounds [200 x i8], [200 x i8]* %6, i64 0, i64 0
%9 = call i32 @scanf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* %8)
%10 = getelementptr inbounds [200 x i8], [200 x i8]* %6, i64 0, i64 0
%11 = call i64 @strcmp(i8* %10, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%12 = icmp ne i64 %11, 0
br i1 %12, label %13, label %18
13: ; preds = %7
%14 = getelementptr inbounds [200 x i8], [200 x i8]* %6, i64 0, i64 0
%15 = call i32 @formatInput(i8* %14)
%16 = getelementptr inbounds [200 x i8], [200 x i8]* %6, i64 0, i64 0
%17 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* %16)
br label %7
18: ; preds = %7
ret i32 0
}

LLVM IR (-O2):
@.str = [10 x i8] c" %200[^\0A]\00"
@.str.1 = [2 x i8] c"*\00"
@.str.2 = [4 x i8] c"%s\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [200 x i8]
%4 = getelementptr inbounds [200 x i8], [200 x i8]* %3, i64 0, i64 0
%5 = call i32 @scanf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i64 @strcmp(i8* %4, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%7 = icmp eq i64 %6, 0
br i1 %7, label %14, label %8
8: ; preds = %2, %8
%9 = call i32 @formatInput(i8* %4)
%10 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* %4)
%11 = call i32 @scanf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* %4)
%12 = call i64 @strcmp(i8* %4, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%13 = icmp eq i64 %12, 0
br i1 %13, label %14, label %8
14: ; preds = %8, %2
ret i32 0
}