#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 */
scalar_t__ islower(char);
scalar_t__ isupper(char);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ scanf(char *, char *);
int strlen(char *);
int main() {
  char s[100];
  scanf("%s", s);
  int size = strlen(s);
  for (int i = 0; i < size; ++i) {
    if (islower(s[i])) {
      s[i] = (char)(219 - (s[i]));
    }
    if (isupper(s[i])) {
      s[i] = (char)(155 - (s[i]));
    }
  }
  printf("%s\n", s);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x70(%rbp),%rsi
lea    0xe93(%rip),%rdi
call   1070 <scanf@plt>
lea    -0x70(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,-0x74(%rbp)
movl   $0x0,-0x78(%rbp)
mov    -0x78(%rbp),%eax
cmp    -0x74(%rbp),%eax
jge    1208 <main+0xb8>
movslq -0x78(%rbp),%rax
movsbl -0x70(%rbp,%rax,1),%edi
call   1030 <islower@plt>
cmp    $0x0,%rax
je     11c3 <main+0x73>
movslq -0x78(%rbp),%rax
movsbl -0x70(%rbp,%rax,1),%ecx
mov    $0xdb,%eax
sub    %ecx,%eax
mov    %al,%cl
movslq -0x78(%rbp),%rax
mov    %cl,-0x70(%rbp,%rax,1)
movslq -0x78(%rbp),%rax
movsbl -0x70(%rbp,%rax,1),%edi
call   1060 <isupper@plt>
cmp    $0x0,%rax
je     11f5 <main+0xa5>
movslq -0x78(%rbp),%rax
movsbl -0x70(%rbp,%rax,1),%ecx
mov    $0x9b,%eax
sub    %ecx,%eax
mov    %al,%cl
movslq -0x78(%rbp),%rax
mov    %cl,-0x70(%rbp,%rax,1)
jmp    11fa <main+0xaa>
mov    -0x78(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x78(%rbp)
jmp    1185 <main+0x35>
lea    -0x70(%rbp),%rsi
lea    0xdf0(%rip),%rdi
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x68,%rsp
lea    0xea2(%rip),%rdi
mov    %rsp,%rbx
mov    %rbx,%rsi
call   1070 <scanf@plt>
mov    %rbx,%rdi
call   1040 <strlen@plt>
test   %eax,%eax
jle    11bb <main+0x6b>
mov    %eax,%r14d
xor    %ebx,%ebx
jmp    1189 <main+0x39>
nopl   0x0(%rax)
add    $0x1,%rbx
cmp    %rbx,%r14
je     11bb <main+0x6b>
movsbl (%rsp,%rbx,1),%edi
call   1030 <islower@plt>
movzbl (%rsp,%rbx,1),%ecx
test   %rax,%rax
je     11a4 <main+0x54>
mov    $0xdb,%al
sub    %cl,%al
mov    %al,(%rsp,%rbx,1)
mov    %eax,%ecx
movsbl %cl,%edi
call   1060 <isupper@plt>
test   %rax,%rax
je     1180 <main+0x30>
mov    $0x9b,%al
sub    (%rsp,%rbx,1),%al
mov    %al,(%rsp,%rbx,1)
jmp    1180 <main+0x30>
lea    0xe41(%rip),%rdi
mov    %rsp,%rsi
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x68,%rsp
pop    %rbx
pop    %r14
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 [100 x i8]
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %5)
%7 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%8 = call i32 @strlen(i8* %7)
store i32 %8, i32* %3
store i32 0, i32* %4
br label %9
9: ; preds = %50, %0
%10 = load i32, i32* %4
%11 = load i32, i32* %3
%12 = icmp slt i32 %10, %11
br i1 %12, label %13, label %53
13: ; preds = %9
%14 = load i32, i32* %4
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 %15
%17 = load i8, i8* %16
%18 = call i64 @islower(i8 signext %17)
%19 = icmp ne i64 %18, 0
br i1 %19, label %20, label %31
20: ; preds = %13
%21 = load i32, i32* %4
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 %22
%24 = load i8, i8* %23
%25 = sext i8 %24 to i32
%26 = sub nsw i32 219, %25
%27 = trunc i32 %26 to i8
%28 = load i32, i32* %4
%29 = sext i32 %28 to i64
%30 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 %29
store i8 %27, i8* %30
br label %31
31: ; preds = %20, %13
%32 = load i32, i32* %4
%33 = sext i32 %32 to i64
%34 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 %33
%35 = load i8, i8* %34
%36 = call i64 @isupper(i8 signext %35)
%37 = icmp ne i64 %36, 0
br i1 %37, label %38, label %49
38: ; preds = %31
%39 = load i32, i32* %4
%40 = sext i32 %39 to i64
%41 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 %40
%42 = load i8, i8* %41
%43 = sext i8 %42 to i32
%44 = sub nsw i32 155, %43
%45 = trunc i32 %44 to i8
%46 = load i32, i32* %4
%47 = sext i32 %46 to i64
%48 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 %47
store i8 %45, i8* %48
br label %49
49: ; preds = %38, %31
br label %50
50: ; preds = %49
%51 = load i32, i32* %4
%52 = add nsw i32 %51, 1
store i32 %52, i32* %4
br label %9
53: ; preds = %9
%54 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%55 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %54)
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 [100 x i8]
%2 = getelementptr inbounds [100 x i8], [100 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 = call i32 @strlen(i8* %2)
%5 = icmp sgt i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = zext i32 %4 to i64
br label %10
8: ; preds = %26, %0
%9 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %2)
ret i32 0
10: ; preds = %6, %26
%11 = phi i64 [ 0, %6 ], [ %27, %26 ]
%12 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 %11
%13 = load i8, i8* %12
%14 = call i64 @islower(i8 signext %13)
%15 = icmp eq i64 %14, 0
%16 = load i8, i8* %12
br i1 %15, label %19, label %17
17: ; preds = %10
%18 = sub i8 -37, %16
store i8 %18, i8* %12
br label %19
19: ; preds = %10, %17
%20 = phi i8 [ %18, %17 ], [ %16, %10 ]
%21 = call i64 @isupper(i8 signext %20)
%22 = icmp eq i64 %21, 0
br i1 %22, label %26, label %23
23: ; preds = %19
%24 = load i8, i8* %12
%25 = sub i8 -101, %24
store i8 %25, i8* %12
br label %26
26: ; preds = %19, %23
%27 = add nuw nsw i64 %11, 1
%28 = icmp eq i64 %27, %7
br i1 %28, label %8, label %10
}