#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 */
char CaesarDe(char);
char CaesarEn(char);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf_s(char *, char *, int);
int main8() {
  char ch;
  char cipher;
  char plain;
  printf("Enter a Plain Text Character: ");
  scanf_s("%c", &ch, 1);
  cipher = CaesarEn(ch);
  printf("Cipher code is %c \n", cipher);
  plain = CaesarDe(cipher);
  printf("Plain Text is %c \n\n\n", plain);
  return 0;
}


x86 assembly (clang, -O0):
<main8>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xeb1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec2(%rip),%rdi
lea    -0x1(%rbp),%rsi
mov    $0x1,%edx
call   1050 <scanf_s@plt>
movsbl -0x1(%rbp),%edi
call   1060 <CaesarEn@plt>
mov    %al,-0x2(%rbp)
movsbl -0x2(%rbp),%esi
lea    0xea0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movsbl -0x2(%rbp),%edi
call   1040 <CaesarDe@plt>
mov    %al,-0x3(%rbp)
movsbl -0x3(%rbp),%esi
lea    0xe96(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main8>:
push   %rbx
sub    $0x10,%rsp
lea    0xeb4(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xec5(%rip),%rdi
lea    0xf(%rsp),%rsi
mov    $0x1,%edx
call   1050 <scanf_s@plt>
movsbl 0xf(%rsp),%edi
call   1060 <CaesarEn@plt>
movsbl %al,%ebx
lea    0xea5(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %ebx,%edi
call   1040 <CaesarDe@plt>
movsbl %al,%esi
lea    0xe9f(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [31 x i8] c"Enter a Plain Text Character: \00"
@.str.1 = [3 x i8] c"%c\00"
@.str.2 = [20 x i8] c"Cipher code is %c \0A\00"
@.str.3 = [21 x i8] c"Plain Text is %c \0A\0A\0A\00"
define i32 @main8() {
%1 = alloca i8
%2 = alloca i8
%3 = alloca i8
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @scanf_s(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %1, i32 1)
%6 = load i8, i8* %1
%7 = call signext i8 @CaesarEn(i8 signext %6)
store i8 %7, i8* %2
%8 = load i8, i8* %2
%9 = sext i8 %8 to i32
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0), i32 %9)
%11 = load i8, i8* %2
%12 = call signext i8 @CaesarDe(i8 signext %11)
store i8 %12, i8* %3
%13 = load i8, i8* %3
%14 = sext i8 %13 to i32
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0), i32 %14)
ret i32 0
}

LLVM IR (-O2):
@.str = [31 x i8] c"Enter a Plain Text Character: \00"
@.str.1 = [3 x i8] c"%c\00"
@.str.2 = [20 x i8] c"Cipher code is %c \0A\00"
@.str.3 = [21 x i8] c"Plain Text is %c \0A\0A\0A\00"
define i32 @main8() {
%1 = alloca i8
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @scanf_s(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %1, i32 1)
%4 = load i8, i8* %1
%5 = call signext i8 @CaesarEn(i8 signext %4)
%6 = sext i8 %5 to i32
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0), i32 %6)
%8 = call signext i8 @CaesarDe(i8 signext %5)
%9 = sext i8 %8 to i32
%10 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0), i32 %9)
ret i32 0
}