#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 lhs(char);
int /*<<< orphan*/ printf(char *, char, char, char, int, int);
int rhs(char);
char rot13_char(char);
int main(int argc, char *argv[]) {
  char x, y, z;
  if (argc == 2) {
    x = argv[1][0];
    y = rot13_char(x);
    z = rot13_char(y);
    printf("x = '%c', y = '%c', z = '%c', lhs(x) = '%c', rhs(x) = '%c'\n", x, y,
           z, lhs(x), rhs(x));
  }
  return 0;
}


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)
cmpl   $0x2,-0x8(%rbp)
jne    11d1 <main+0x91>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    (%rax),%al
mov    %al,-0x11(%rbp)
movsbl -0x11(%rbp),%edi
call   1050 <rot13_char@plt>
mov    %al,-0x12(%rbp)
movsbl -0x12(%rbp),%edi
call   1050 <rot13_char@plt>
mov    %al,-0x13(%rbp)
mov    -0x11(%rbp),%al
mov    %al,-0x1a(%rbp)
mov    -0x12(%rbp),%al
mov    %al,-0x19(%rbp)
mov    -0x13(%rbp),%al
mov    %al,-0x14(%rbp)
movsbl -0x11(%rbp),%edi
call   1040 <lhs@plt>
mov    %eax,-0x18(%rbp)
movsbl -0x11(%rbp),%edi
call   1060 <rhs@plt>
mov    -0x1a(%rbp),%dl
mov    -0x19(%rbp),%cl
mov    -0x18(%rbp),%r8d
mov    %eax,%r9d
mov    -0x14(%rbp),%al
lea    0xe3d(%rip),%rdi
movsbl %dl,%esi
movsbl %cl,%edx
movsbl %al,%ecx
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
cmp    $0x2,%edi
jne    119c <main+0x5c>
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    0x8(%rsi),%rax
movsbl (%rax),%ebx
mov    %ebx,%edi
call   1050 <rot13_char@plt>
movsbl %al,%ebp
mov    %ebp,%edi
call   1050 <rot13_char@plt>
mov    %eax,%r14d
mov    %ebx,%edi
call   1040 <lhs@plt>
mov    %eax,%r15d
mov    %ebx,%edi
call   1060 <rhs@plt>
movsbl %r14b,%ecx
lea    0xe7d(%rip),%rdi
mov    %ebx,%esi
mov    %ebp,%edx
mov    %r15d,%r8d
mov    %eax,%r9d
call   1030 <printf@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
xor    %eax,%eax
ret

LLVM IR (-O0):
@.str = [60 x i8] c"x = '%c', y = '%c', z = '%c', lhs(x) = '%c', rhs(x) = '%c'\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%9 = load i32, i32* %4
%10 = icmp eq i32 %9, 2
br i1 %10, label %11, label %29
11: ; preds = %2
%12 = load i8**, i8*** %5
%13 = getelementptr inbounds i8*, i8** %12, i64 1
%14 = load i8*, i8** %13
%15 = getelementptr inbounds i8, i8* %14, i64 0
%16 = load i8, i8* %15
store i8 %16, i8* %6
%17 = load i8, i8* %6
%18 = call signext i8 @rot13_char(i8 signext %17)
store i8 %18, i8* %7
%19 = load i8, i8* %7
%20 = call signext i8 @rot13_char(i8 signext %19)
store i8 %20, i8* %8
%21 = load i8, i8* %6
%22 = load i8, i8* %7
%23 = load i8, i8* %8
%24 = load i8, i8* %6
%25 = call i32 @lhs(i8 signext %24)
%26 = load i8, i8* %6
%27 = call i32 @rhs(i8 signext %26)
%28 = call i32 @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str, i64 0, i64 0), i8 signext %21, i8 signext %22, i8 signext %23, i32 %25, i32 %27)
br label %29
29: ; preds = %11, %2
ret i32 0
}

LLVM IR (-O2):
@.str = [60 x i8] c"x = '%c', y = '%c', z = '%c', lhs(x) = '%c', rhs(x) = '%c'\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 2
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = load i8, i8* %6
%8 = tail call signext i8 @rot13_char(i8 signext %7)
%9 = tail call signext i8 @rot13_char(i8 signext %8)
%10 = tail call i32 @lhs(i8 signext %7)
%11 = tail call i32 @rhs(i8 signext %7)
%12 = tail call i32 @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str, i64 0, i64 0), i8 signext %7, i8 signext %8, i8 signext %9, i32 %10, i32 %11)
br label %13
13: ; preds = %4, %2
ret i32 0
}