#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*/ printf(char *, char *);
int /*<<< orphan*/ scanf(char *, char *);
int main() {
  char s[150];
  scanf("%s", s);
  while (!(s[0] == 'S' && s[1] == 'T' && s[2] == 'O' && s[3] == 'P' &&
           s[4] == '\0')) {
    int i = 0;
    while (s[i] != '\0') {
      if (s[i] >= 'a' && s[i] <= 'z')
        s[i] = s[i] - 32;
      i++;
    }
    printf("%s\n", s);
    scanf("%s", s);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xb0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0xa0(%rbp),%rsi
lea    0xec0(%rip),%rdi
call   1040 <scanf@plt>
movsbl -0xa0(%rbp),%ecx
xor    %eax,%eax
cmp    $0x53,%ecx
mov    %al,-0xa5(%rbp)
jne    11b8 <main+0x98>
movsbl -0x9f(%rbp),%ecx
xor    %eax,%eax
cmp    $0x54,%ecx
mov    %al,-0xa5(%rbp)
jne    11b8 <main+0x98>
movsbl -0x9e(%rbp),%ecx
xor    %eax,%eax
cmp    $0x4f,%ecx
mov    %al,-0xa5(%rbp)
jne    11b8 <main+0x98>
movsbl -0x9d(%rbp),%ecx
xor    %eax,%eax
cmp    $0x50,%ecx
mov    %al,-0xa5(%rbp)
jne    11b8 <main+0x98>
movsbl -0x9c(%rbp),%eax
cmp    $0x0,%eax
sete   %al
mov    %al,-0xa5(%rbp)
mov    -0xa5(%rbp),%al
xor    $0xff,%al
test   $0x1,%al
jne    11cd <main+0xad>
jmp    1280 <main+0x160>
movl   $0x0,-0xa4(%rbp)
movslq -0xa4(%rbp),%rax
movsbl -0xa0(%rbp,%rax,1),%eax
ff
cmp    $0x0,%eax
je     1255 <main+0x135>
movslq -0xa4(%rbp),%rax
movsbl -0xa0(%rbp,%rax,1),%eax
ff
cmp    $0x61,%eax
jl     1241 <main+0x121>
movslq -0xa4(%rbp),%rax
movsbl -0xa0(%rbp,%rax,1),%eax
ff
cmp    $0x7a,%eax
jg     1241 <main+0x121>
movslq -0xa4(%rbp),%rax
movsbl -0xa0(%rbp,%rax,1),%eax
ff
sub    $0x20,%eax
mov    %al,%cl
movslq -0xa4(%rbp),%rax
mov    %cl,-0xa0(%rbp,%rax,1)
mov    -0xa4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xa4(%rbp)
jmp    11d7 <main+0xb7>
lea    -0xa0(%rbp),%rsi
lea    0xda0(%rip),%rdi
call   1030 <printf@plt>
lea    -0xa0(%rbp),%rsi
lea    0xd8a(%rip),%rdi
call   1040 <scanf@plt>
jmp    1145 <main+0x25>
xor    %eax,%eax
add    $0xb0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0xa8,%rsp
lea    0xecb(%rip),%rdi
lea    0x10(%rsp),%rsi
call   1040 <scanf@plt>
movdqa 0x10(%rsp),%xmm0
movd   %xmm0,%eax
cmp    $0x504f5453,%eax
jne    115b <main+0x3b>
cmpb   $0x0,0x14(%rsp)
je     11e8 <main+0xc8>
lea    0x11(%rsp),%r12
lea    0xe9c(%rip),%r14
lea    0x10(%rsp),%rbx
lea    0xe8d(%rip),%r15
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
test   %al,%al
je     11b0 <main+0x90>
mov    %r12,%rcx
jmp    119b <main+0x7b>
nopl   0x0(%rax)
movzbl (%rcx),%eax
add    $0x1,%rcx
test   %al,%al
je     11b0 <main+0x90>
lea    -0x61(%rax),%edx
cmp    $0x19,%dl
ja     1190 <main+0x70>
add    $0xe0,%al
mov    %al,-0x1(%rcx)
jmp    1190 <main+0x70>
nopw   0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
call   1040 <scanf@plt>
movdqa 0x10(%rsp),%xmm0
movd   %xmm0,%edx
mov    0x14(%rsp),%cl
movdqa %xmm0,(%rsp)
mov    (%rsp),%al
cmp    $0x504f5453,%edx
jne    1180 <main+0x60>
test   %cl,%cl
jne    1180 <main+0x60>
xor    %eax,%eax
add    $0xa8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [150 x i8]
%3 = alloca i32
store i32 0, i32* %1
%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)
br label %6
6: ; preds = %70, %0
%7 = getelementptr inbounds [150 x i8], [150 x i8]* %2, i64 0, i64 0
%8 = load i8, i8* %7
%9 = sext i8 %8 to i32
%10 = icmp eq i32 %9, 83
br i1 %10, label %11, label %31
11: ; preds = %6
%12 = getelementptr inbounds [150 x i8], [150 x i8]* %2, i64 0, i64 1
%13 = load i8, i8* %12
%14 = sext i8 %13 to i32
%15 = icmp eq i32 %14, 84
br i1 %15, label %16, label %31
16: ; preds = %11
%17 = getelementptr inbounds [150 x i8], [150 x i8]* %2, i64 0, i64 2
%18 = load i8, i8* %17
%19 = sext i8 %18 to i32
%20 = icmp eq i32 %19, 79
br i1 %20, label %21, label %31
21: ; preds = %16
%22 = getelementptr inbounds [150 x i8], [150 x i8]* %2, i64 0, i64 3
%23 = load i8, i8* %22
%24 = sext i8 %23 to i32
%25 = icmp eq i32 %24, 80
br i1 %25, label %26, label %31
26: ; preds = %21
%27 = getelementptr inbounds [150 x i8], [150 x i8]* %2, i64 0, i64 4
%28 = load i8, i8* %27
%29 = sext i8 %28 to i32
%30 = icmp eq i32 %29, 0
br label %31
31: ; preds = %26, %21, %16, %11, %6
%32 = phi i1 [ false, %21 ], [ false, %16 ], [ false, %11 ], [ false, %6 ], [ %30, %26 ]
%33 = xor i1 %32, true
br i1 %33, label %34, label %75
34: ; preds = %31
store i32 0, i32* %3
br label %35
35: ; preds = %67, %34
%36 = load i32, i32* %3
%37 = sext i32 %36 to i64
%38 = getelementptr inbounds [150 x i8], [150 x i8]* %2, i64 0, i64 %37
%39 = load i8, i8* %38
%40 = sext i8 %39 to i32
%41 = icmp ne i32 %40, 0
br i1 %41, label %42, label %70
42: ; preds = %35
%43 = load i32, i32* %3
%44 = sext i32 %43 to i64
%45 = getelementptr inbounds [150 x i8], [150 x i8]* %2, i64 0, i64 %44
%46 = load i8, i8* %45
%47 = sext i8 %46 to i32
%48 = icmp sge i32 %47, 97
br i1 %48, label %49, label %67
49: ; preds = %42
%50 = load i32, i32* %3
%51 = sext i32 %50 to i64
%52 = getelementptr inbounds [150 x i8], [150 x i8]* %2, i64 0, i64 %51
%53 = load i8, i8* %52
%54 = sext i8 %53 to i32
%55 = icmp sle i32 %54, 122
br i1 %55, label %56, label %67
56: ; preds = %49
%57 = load i32, i32* %3
%58 = sext i32 %57 to i64
%59 = getelementptr inbounds [150 x i8], [150 x i8]* %2, i64 0, i64 %58
%60 = load i8, i8* %59
%61 = sext i8 %60 to i32
%62 = sub nsw i32 %61, 32
%63 = trunc i32 %62 to i8
%64 = load i32, i32* %3
%65 = sext i32 %64 to i64
%66 = getelementptr inbounds [150 x i8], [150 x i8]* %2, i64 0, i64 %65
store i8 %63, i8* %66
br label %67
67: ; preds = %56, %49, %42
%68 = load i32, i32* %3
%69 = add nsw i32 %68, 1
store i32 %69, i32* %3
br label %35
70: ; preds = %35
%71 = getelementptr inbounds [150 x i8], [150 x i8]* %2, i64 0, i64 0
%72 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %71)
%73 = getelementptr inbounds [150 x i8], [150 x i8]* %2, i64 0, i64 0
%74 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %73)
br label %6
75: ; preds = %31
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
@.str.1 = [4 x i8] c"%s\0A\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 = getelementptr inbounds [150 x i8], [150 x i8]* %1, i64 0, i64 4
%5 = bitcast [150 x i8]* %1 to <4 x i8>*
%6 = load <4 x i8>, <4 x i8>* %5
%7 = freeze <4 x i8> %6
%8 = bitcast <4 x i8> %7 to i32
%9 = icmp eq i32 %8, 1347376211
%10 = load i8, i8* %4
%11 = icmp eq i8 %10, 0
%12 = select i1 %9, i1 %11, i1 false
br i1 %12, label %43, label %13
13: ; preds = %0
%14 = extractelement <4 x i8> %7, i64 0
%15 = bitcast [150 x i8]* %1 to <4 x i8>*
br label %16
16: ; preds = %13, %32
%17 = phi i8 [ %42, %32 ], [ %14, %13 ]
%18 = icmp eq i8 %17, 0
br i1 %18, label %32, label %19
19: ; preds = %16, %27
%20 = phi i64 [ %28, %27 ], [ 0, %16 ]
%21 = phi i8 [ %30, %27 ], [ %17, %16 ]
%22 = phi i8* [ %29, %27 ], [ %2, %16 ]
%23 = add i8 %21, -97
%24 = icmp ult i8 %23, 26
br i1 %24, label %25, label %27
25: ; preds = %19
%26 = add nsw i8 %21, -32
store i8 %26, i8* %22
br label %27
27: ; preds = %25, %19
%28 = add nuw i64 %20, 1
%29 = getelementptr inbounds [150 x i8], [150 x i8]* %1, i64 0, i64 %28
%30 = load i8, i8* %29
%31 = icmp eq i8 %30, 0
br i1 %31, label %32, label %19
32: ; preds = %27, %16
%33 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %2)
%34 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
%35 = load <4 x i8>, <4 x i8>* %15
%36 = freeze <4 x i8> %35
%37 = bitcast <4 x i8> %36 to i32
%38 = icmp eq i32 %37, 1347376211
%39 = load i8, i8* %4
%40 = icmp eq i8 %39, 0
%41 = select i1 %38, i1 %40, i1 false
%42 = extractelement <4 x i8> %36, i64 0
br i1 %41, label %43, label %16
43: ; preds = %32, %0
ret i32 0
}