#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*/ getchar();
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, char *, char *, char *);
int main() {
  char EE, NN, TT;
  printf("Please enter three characters,\n");
  scanf("%c %c %c", &EE, &NN, &TT);
  printf("The code for %c %c %c is %d %d %d,\n", EE, NN, TT, EE, NN, TT);
  getchar();
  getchar();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xecc(%rip),%rdi
lea    -0x5(%rbp),%rsi
lea    -0x6(%rbp),%rdx
lea    -0x7(%rbp),%rcx
call   1050 <scanf@plt>
movsbl -0x5(%rbp),%esi
movsbl -0x6(%rbp),%edx
movsbl -0x7(%rbp),%ecx
movsbl -0x5(%rbp),%r8d
movsbl -0x6(%rbp),%r9d
movsbl -0x7(%rbp),%eax
lea    0xea3(%rip),%rdi
mov    %eax,(%rsp)
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xee2(%rip),%rdi
call   1030 <puts@plt>
lea    0xea9(%rip),%rdi
lea    0x17(%rsp),%rsi
lea    0x16(%rsp),%rdx
lea    0x15(%rsp),%rcx
call   1060 <scanf@plt>
movsbl 0x17(%rsp),%esi
movsbl 0x16(%rsp),%edx
movsbl 0x15(%rsp),%ecx
mov    %ecx,(%rsp)
lea    0xe85(%rip),%rdi
mov    %esi,%r8d
mov    %edx,%r9d
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
call   1050 <getchar@plt>
xor    %eax,%eax
call   1050 <getchar@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [32 x i8] c"Please enter three characters,\0A\00"
@.str.1 = [9 x i8] c"%c %c %c\00"
@.str.2 = [36 x i8] c"The code for %c %c %c is %d %d %d,\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
%3 = alloca i8
%4 = alloca i8
store i32 0, i32* %1
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i8* %2, i8* %3, i8* %4)
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = load i8, i8* %3
%10 = sext i8 %9 to i32
%11 = load i8, i8* %4
%12 = sext i8 %11 to i32
%13 = load i8, i8* %2
%14 = sext i8 %13 to i32
%15 = load i8, i8* %3
%16 = sext i8 %15 to i32
%17 = load i8, i8* %4
%18 = sext i8 %17 to i32
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.2, i64 0, i64 0), i32 %8, i32 %10, i32 %12, i32 %14, i32 %16, i32 %18)
%20 = call i32 (...) @getchar()
%21 = call i32 (...) @getchar()
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [9 x i8] c"%c %c %c\00"
@.str.2 = [36 x i8] c"The code for %c %c %c is %d %d %d,\0A\00"
@str = [31 x i8] c"Please enter three characters,\00"
define i32 @main() {
%1 = alloca i8
%2 = alloca i8
%3 = alloca i8
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i8* %1, i8* %2, i8* %3)
%6 = load i8, i8* %1
%7 = sext i8 %6 to i32
%8 = load i8, i8* %2
%9 = sext i8 %8 to i32
%10 = load i8, i8* %3
%11 = sext i8 %10 to i32
%12 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.2, i64 0, i64 0), i32 %7, i32 %9, i32 %11, i32 %7, i32 %9, i32 %11)
%13 = call i32 (...) @getchar()
%14 = call i32 (...) @getchar()
ret i32 0
}