#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 *, ...);
int /*<<< orphan*/ scanf(char *, char *);
int main() {
  char frase[200];
  printf("String: ");
  scanf("%200s", frase);
  for (char *i = frase; *i != '\0'; i++) {
    *i = *i < 'A' || *i > 'Z' ? *i : (((*i - 65) + 3) % 26) + 65;
  }
  printf("String: %s", frase);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xe0,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xec7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0xd0(%rbp),%rsi
lea    0xebb(%rip),%rdi
call   1040 <scanf@plt>
lea    -0xd0(%rbp),%rax
mov    %rax,-0xd8(%rbp)
mov    -0xd8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     11fa <main+0xda>
mov    -0xd8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x41,%eax
jl     119a <main+0x7a>
mov    -0xd8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x5a,%eax
jle    11af <main+0x8f>
mov    -0xd8(%rbp),%rax
movsbl (%rax),%eax
mov    %eax,-0xdc(%rbp)
jmp    11d2 <main+0xb2>
mov    -0xd8(%rbp),%rax
movsbl (%rax),%eax
sub    $0x41,%eax
add    $0x3,%eax
mov    $0x1a,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
add    $0x41,%eax
mov    %eax,-0xdc(%rbp)
mov    -0xdc(%rbp),%eax
mov    %al,%cl
mov    -0xd8(%rbp),%rax
mov    %cl,(%rax)
mov    -0xd8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0xd8(%rbp)
jmp    1161 <main+0x41>
lea    -0xd0(%rbp),%rsi
lea    0xe07(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0xe0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0xc8,%rsp
lea    0xed2(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xecd(%rip),%rdi
mov    %rsp,%rsi
call   1040 <scanf@plt>
mov    (%rsp),%al
test   %al,%al
je     1190 <main+0x70>
lea    0x1(%rsp),%rcx
jmp    116e <main+0x4e>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %al,-0x1(%rcx)
movzbl (%rcx),%eax
add    $0x1,%rcx
test   %al,%al
je     1190 <main+0x70>
lea    -0x5b(%rax),%edx
cmp    $0xe6,%dl
jb     1160 <main+0x40>
add    $0xc2,%al
movzbl %al,%eax
imul   $0x4f,%eax,%edx
shr    $0xb,%edx
lea    (%rdx,%rdx,4),%esi
lea    (%rsi,%rsi,4),%esi
add    %edx,%esi
sub    %sil,%al
add    $0x41,%al
jmp    1160 <main+0x40>
lea    0xe78(%rip),%rdi
mov    %rsp,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0xc8,%rsp
ret

LLVM IR (-O0):
@.str = [9 x i8] c"String: \00"
@.str.1 = [6 x i8] c"%200s\00"
@.str.2 = [11 x i8] c"String: %s\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [200 x i8]
%3 = alloca i8*
store i32 0, i32* %1
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%5 = getelementptr inbounds [200 x i8], [200 x i8]* %2, i64 0, i64 0
%6 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* %5)
%7 = getelementptr inbounds [200 x i8], [200 x i8]* %2, i64 0, i64 0
store i8* %7, i8** %3
br label %8
8: ; preds = %39, %0
%9 = load i8*, i8** %3
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = icmp ne i32 %11, 0
br i1 %12, label %13, label %42
13: ; preds = %8
%14 = load i8*, i8** %3
%15 = load i8, i8* %14
%16 = sext i8 %15 to i32
%17 = icmp slt i32 %16, 65
br i1 %17, label %23, label %18
18: ; preds = %13
%19 = load i8*, i8** %3
%20 = load i8, i8* %19
%21 = sext i8 %20 to i32
%22 = icmp sgt i32 %21, 90
br i1 %22, label %23, label %27
23: ; preds = %18, %13
%24 = load i8*, i8** %3
%25 = load i8, i8* %24
%26 = sext i8 %25 to i32
br label %35
27: ; preds = %18
%28 = load i8*, i8** %3
%29 = load i8, i8* %28
%30 = sext i8 %29 to i32
%31 = sub nsw i32 %30, 65
%32 = add nsw i32 %31, 3
%33 = srem i32 %32, 26
%34 = add nsw i32 %33, 65
br label %35
35: ; preds = %27, %23
%36 = phi i32 [ %26, %23 ], [ %34, %27 ]
%37 = trunc i32 %36 to i8
%38 = load i8*, i8** %3
store i8 %37, i8* %38
br label %39
39: ; preds = %35
%40 = load i8*, i8** %3
%41 = getelementptr inbounds i8, i8* %40, i32 1
store i8* %41, i8** %3
br label %8
42: ; preds = %8
%43 = getelementptr inbounds [200 x i8], [200 x i8]* %2, i64 0, i64 0
%44 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i8* %43)
%45 = load i32, i32* %1
ret i32 %45
}

LLVM IR (-O2):
@.str = [9 x i8] c"String: \00"
@.str.1 = [6 x i8] c"%200s\00"
@.str.2 = [11 x i8] c"String: %s\00"
define i32 @main() {
%1 = alloca [200 x i8]
%2 = getelementptr inbounds [200 x i8], [200 x i8]* %1, i64 0, i64 0
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* %2)
%5 = load i8, i8* %2
%6 = icmp eq i8 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %18, %0
%8 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i8* %2)
ret i32 0
9: ; preds = %0, %18
%10 = phi i8 [ %21, %18 ], [ %5, %0 ]
%11 = phi i8* [ %20, %18 ], [ %2, %0 ]
%12 = add i8 %10, -91
%13 = icmp ult i8 %12, -26
br i1 %13, label %18, label %14
14: ; preds = %9
%15 = add i8 %10, -62
%16 = urem i8 %15, 26
%17 = add nuw nsw i8 %16, 65
br label %18
18: ; preds = %9, %14
%19 = phi i8 [ %17, %14 ], [ %10, %9 ]
store i8 %19, i8* %11
%20 = getelementptr inbounds i8, i8* %11, i64 1
%21 = load i8, i8* %20
%22 = icmp eq i8 %21, 0
br i1 %22, label %7, label %9
}