#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*/ output(char *);
int /*<<< orphan*/ scanf(char *, char *);
int main() {
  char string[150];
  while (1) {
    scanf("%s", string);
    if (string[0] == 'S' && string[1] == 'T' && string[2] == 'O' &&
        string[3] == 'P') {
      return 0;
    }
    output(string);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0xa0(%rbp),%rsi
lea    0xec0(%rip),%rdi
call   1040 <scanf@plt>
movsbl -0xa0(%rbp),%eax
cmp    $0x53,%eax
jne    1190 <main+0x70>
movsbl -0x9f(%rbp),%eax
cmp    $0x54,%eax
jne    1190 <main+0x70>
movsbl -0x9e(%rbp),%eax
cmp    $0x4f,%eax
jne    1190 <main+0x70>
movsbl -0x9d(%rbp),%eax
cmp    $0x50,%eax
jne    1190 <main+0x70>
xor    %eax,%eax
add    $0xa0,%rsp
pop    %rbp
ret
lea    -0xa0(%rbp),%rdi
call   1030 <output@plt>
jmp    1132 <main+0x12>

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x98,%rsp
lea    0xecf(%rip),%rdi
mov    %rsp,%rsi
call   1040 <scanf@plt>
movdqa (%rsp),%xmm0
movd   %xmm0,%eax
cmp    $0x504f5453,%eax
je     1183 <main+0x63>
mov    %rsp,%rbx
lea    0xead(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %rbx,%rdi
call   1030 <output@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <scanf@plt>
movdqa (%rsp),%xmm0
movd   %xmm0,%eax
cmp    $0x504f5453,%eax
jne    1160 <main+0x40>
xor    %eax,%eax
add    $0x98,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [150 x i8]
store i32 0, i32* %1
br label %3
3: ; preds = %0, %26
%4 = getelementptr inbounds [150 x i8], [150 x i8]* %2, i64 0, i64 0
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = getelementptr inbounds [150 x i8], [150 x i8]* %2, i64 0, i64 0
%7 = load i8, i8* %6
%8 = sext i8 %7 to i32
%9 = icmp eq i32 %8, 83
br i1 %9, label %10, label %26
10: ; preds = %3
%11 = getelementptr inbounds [150 x i8], [150 x i8]* %2, i64 0, i64 1
%12 = load i8, i8* %11
%13 = sext i8 %12 to i32
%14 = icmp eq i32 %13, 84
br i1 %14, label %15, label %26
15: ; preds = %10
%16 = getelementptr inbounds [150 x i8], [150 x i8]* %2, i64 0, i64 2
%17 = load i8, i8* %16
%18 = sext i8 %17 to i32
%19 = icmp eq i32 %18, 79
br i1 %19, label %20, label %26
20: ; preds = %15
%21 = getelementptr inbounds [150 x i8], [150 x i8]* %2, i64 0, i64 3
%22 = load i8, i8* %21
%23 = sext i8 %22 to i32
%24 = icmp eq i32 %23, 80
br i1 %24, label %25, label %26
25: ; preds = %20
ret i32 0
26: ; preds = %20, %15, %10, %3
%27 = getelementptr inbounds [150 x i8], [150 x i8]* %2, i64 0, i64 0
%28 = call i32 @output(i8* %27)
br label %3
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca [150 x i8]
%2 = getelementptr inbounds [150 x i8], [150 x i8]* %1, i64 0, i64 0
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = bitcast [150 x i8]* %1 to <4 x i8>*
%5 = load <4 x i8>, <4 x i8>* %4
%6 = freeze <4 x i8> %5
%7 = bitcast <4 x i8> %6 to i32
%8 = icmp eq i32 %7, 1347376211
br i1 %8, label %11, label %9
9: ; preds = %0
%10 = bitcast [150 x i8]* %1 to <4 x i8>*
br label %12
11: ; preds = %12, %0
ret i32 0
12: ; preds = %9, %12
%13 = call i32 @output(i8* %2)
%14 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
%15 = load <4 x i8>, <4 x i8>* %10
%16 = freeze <4 x i8> %15
%17 = bitcast <4 x i8> %16 to i32
%18 = icmp eq i32 %17, 1347376211
br i1 %18, label %11, label %12
}