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


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x74(%rbp)
lea    -0x70(%rbp),%rsi
lea    0xebc(%rip),%rdi
call   1040 <scanf@plt>
movsbl -0x70(%rbp),%eax
cmp    $0x53,%eax
jne    1182 <main+0x62>
movsbl -0x6f(%rbp),%eax
cmp    $0x54,%eax
jne    1182 <main+0x62>
movsbl -0x6e(%rbp),%eax
cmp    $0x4f,%eax
jne    1182 <main+0x62>
movsbl -0x6d(%rbp),%eax
cmp    $0x50,%eax
jne    1182 <main+0x62>
jmp    11fe <main+0xde>
movl   $0x0,-0x78(%rbp)
cmpl   $0x64,-0x78(%rbp)
jge    11da <main+0xba>
movslq -0x78(%rbp),%rax
movsbl -0x70(%rbp,%rax,1),%eax
cmp    $0x61,%eax
jl     11c7 <main+0xa7>
movslq -0x78(%rbp),%rax
movsbl -0x70(%rbp,%rax,1),%eax
cmp    $0x7a,%eax
jg     11c7 <main+0xa7>
movslq -0x78(%rbp),%rax
movsbl -0x70(%rbp,%rax,1),%ecx
sub    $0x20,%ecx
mov    %cl,-0x70(%rbp,%rax,1)
jmp    11cc <main+0xac>
mov    -0x78(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x78(%rbp)
jmp    1189 <main+0x69>
lea    -0x70(%rbp),%rsi
lea    0xe1b(%rip),%rdi
call   1030 <printf@plt>
jmp    11ef <main+0xcf>
mov    $0x1,%al
test   $0x1,%al
jne    1139 <main+0x19>
jmp    11fe <main+0xde>
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
%4 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %3
br label %5
5: ; preds = %62, %0
%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 %63
28: ; preds = %22, %17, %12, %5
store i32 0, i32* %4
br label %29
29: ; preds = %55, %28
%30 = load i32, i32* %4
%31 = icmp slt i32 %30, 100
br i1 %31, label %32, label %58
32: ; preds = %29
%33 = load i32, i32* %4
%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* %4
%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* %4
%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* %4
%57 = add nsw i32 %56, 1
store i32 %57, i32* %4
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 %62
62: ; preds = %61
br i1 true, label %5, label %63
63: ; preds = %62, %27
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
}