#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 c[100];
  for (; 1;) {
    scanf("\n%s", c);
    if (c[0] == 'S' && c[1] == 'T' && c[2] == 'O' && c[3] == 'P') {
      break;
    } else {
      int f;
      for (f = 0; f < 100; f++) {
        if (c[f] >= 'a' && c[f] <= 'z') {
          c[f] -= 32;
        }
      }
      printf("\n%s", c);
    }
  };
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x1,%al
test   $0x1,%al
jne    1141 <main+0x21>
jmp    11f7 <main+0xd7>
lea    -0x70(%rbp),%rsi
lea    0xeb4(%rip),%rdi
call   1040 <scanf@plt>
movsbl -0x70(%rbp),%eax
cmp    $0x53,%eax
jne    118a <main+0x6a>
movsbl -0x6f(%rbp),%eax
cmp    $0x54,%eax
jne    118a <main+0x6a>
movsbl -0x6e(%rbp),%eax
cmp    $0x4f,%eax
jne    118a <main+0x6a>
movsbl -0x6d(%rbp),%eax
cmp    $0x50,%eax
jne    118a <main+0x6a>
jmp    11f7 <main+0xd7>
movl   $0x0,-0x74(%rbp)
cmpl   $0x64,-0x74(%rbp)
jge    11e2 <main+0xc2>
movslq -0x74(%rbp),%rax
movsbl -0x70(%rbp,%rax,1),%eax
cmp    $0x61,%eax
jl     11cf <main+0xaf>
movslq -0x74(%rbp),%rax
movsbl -0x70(%rbp,%rax,1),%eax
cmp    $0x7a,%eax
jg     11cf <main+0xaf>
movslq -0x74(%rbp),%rax
movsbl -0x70(%rbp,%rax,1),%ecx
sub    $0x20,%ecx
mov    %cl,-0x70(%rbp,%rax,1)
jmp    11d4 <main+0xb4>
mov    -0x74(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x74(%rbp)
jmp    1191 <main+0x71>
lea    -0x70(%rbp),%rsi
lea    0xe13(%rip),%rdi
call   1030 <printf@plt>
jmp    1132 <main+0x12>
xor    %eax,%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x78,%rsp
lea    0xed2(%rip),%rdi
lea    0x10(%rsp),%rsi
call   1040 <scanf@plt>
movdqa 0x10(%rsp),%xmm0
movd   %xmm0,%ecx
cmp    $0x504f5453,%ecx
je     11b6 <main+0x96>
xor    %eax,%eax
lea    0xead(%rip),%r14
lea    0x10(%rsp),%rbx
jmp    116f <main+0x4f>
nopw   0x0(%rax,%rax,1)
add    $0x1,%rax
cmp    $0x64,%rax
je     1180 <main+0x60>
movzbl 0x10(%rsp,%rax,1),%ecx
lea    -0x61(%rcx),%edx
cmp    $0x19,%dl
ja     1160 <main+0x40>
add    $0xe0,%cl
mov    %cl,0x10(%rsp,%rax,1)
jmp    1160 <main+0x40>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <scanf@plt>
movdqa 0x10(%rsp),%xmm0
movd   %xmm0,%edx
movdqa %xmm0,(%rsp)
movzbl (%rsp),%ecx
mov    $0x0,%eax
cmp    $0x504f5453,%edx
jne    116f <main+0x4f>
xor    %eax,%eax
add    $0x78,%rsp
pop    %rbx
pop    %r14
ret

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

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