#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 main(__attribute__((unused)) const int argc, const char *argv[]) {
  for (int i = 0; argv[1][i] != '\0'; i++) {
    printf("%c", argv[1][i] == '\n' ? '\n' : 'z' - (argv[1][i] - 'a'));
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     11a9 <main+0x99>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0xa,%eax
jne    116c <main+0x5c>
mov    $0xa,%eax
mov    %eax,-0x18(%rbp)
jmp    1189 <main+0x79>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%ecx
sub    $0x61,%ecx
mov    $0x7a,%eax
sub    %ecx,%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
lea    0xe6d(%rip),%rdi
movsbl %al,%esi
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    112d <main+0x1d>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r15
xor    %ebx,%ebx
lea    0xedf(%rip),%r14
jmp    113f <main+0x2f>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movsbl %al,%esi
mov    %r14,%rdi
call   1030 <printf@plt>
add    $0x1,%rbx
mov    0x8(%r15),%rax
movzbl (%rax,%rbx,1),%eax
cmp    $0xa,%al
je     1130 <main+0x20>
test   %al,%al
je     1157 <main+0x47>
mov    $0xdb,%cl
sub    %al,%cl
mov    %ecx,%eax
jmp    1130 <main+0x20>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%c\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
br label %4
4: ; preds = %12, %2
%5 = phi i64 [ %15, %12 ], [ 0, %2 ]
%6 = load i8*, i8** %3
%7 = getelementptr inbounds i8, i8* %6, i64 %5
%8 = load i8, i8* %7
switch i8 %8, label %10 [
i8 0, label %9
i8 10, label %12
]
9: ; preds = %4
ret i32 0
10: ; preds = %4
%11 = sub i8 -37, %8
br label %12
12: ; preds = %4, %10
%13 = phi i8 [ %11, %10 ], [ %8, %4 ]
%14 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext %13)
%15 = add nuw i64 %5, 1
br label %4
}