#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 *, char, char, char, char, char, char);
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ scanf(char *, char *, char *, char *);
main() {
  char c1, c2, c3;
  puts("Plaese input chars to c1,c2,c3:");
  scanf("%c%c%c", &c1, &c2, &c3);
  printf("%s\n%c\n\t%c %c\n %c%c\t\b%c\n", "The output is:", c1, c2, c3, c1, c2,
         c3);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    0xec1(%rip),%rdi
call   1030 <puts@plt>
lea    0xed5(%rip),%rdi
lea    -0x1(%rbp),%rsi
lea    -0x2(%rbp),%rdx
lea    -0x3(%rbp),%rcx
call   1050 <scanf@plt>
mov    -0x1(%rbp),%dl
mov    -0x2(%rbp),%cl
mov    -0x3(%rbp),%r8b
mov    -0x1(%rbp),%r9b
mov    -0x2(%rbp),%al
lea    0xeb3(%rip),%rdi
lea    0xec4(%rip),%rsi
movsbl %dl,%edx
movsbl %cl,%ecx
movsbl %r8b,%r8d
movsbl %r9b,%r9d
movsbl %al,%eax
mov    %eax,(%rsp)
movsbl -0x3(%rbp),%eax
mov    %eax,0x8(%rsp)
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
call   1030 <puts@plt>
lea    0xedc(%rip),%rdi
lea    0x7(%rsp),%rsi
lea    0x6(%rsp),%rdx
lea    0x5(%rsp),%rcx
call   1050 <scanf@plt>
movsbl 0x7(%rsp),%edx
movsbl 0x6(%rsp),%ecx
movsbl 0x5(%rsp),%r8d
lea    0xeb8(%rip),%rdi
lea    0xec9(%rip),%rsi
mov    %edx,%r9d
push   %r8
push   %rcx
call   1040 <printf@plt>
add    $0x10,%rsp
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [32 x i8] c"Plaese input chars to c1,c2,c3:\00"
@.str.1 = [7 x i8] c"%c%c%c\00"
@.str.2 = [24 x i8] c"%s\0A%c\0A\09%c %c\0A %c%c\09\08%c\0A\00"
@.str.3 = [15 x i8] c"The output is:\00"
define i32 @main() {
%1 = alloca i8
%2 = alloca i8
%3 = alloca i8
%4 = call i32 @puts(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* %1, i8* %2, i8* %3)
%6 = load i8, i8* %1
%7 = load i8, i8* %2
%8 = load i8, i8* %3
%9 = load i8, i8* %1
%10 = load i8, i8* %2
%11 = load i8, i8* %3
%12 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), i8 signext %6, i8 signext %7, i8 signext %8, i8 signext %9, i8 signext %10, i8 signext %11)
ret i32 0
}

LLVM IR (-O2):
@.str = [32 x i8] c"Plaese input chars to c1,c2,c3:\00"
@.str.1 = [7 x i8] c"%c%c%c\00"
@.str.2 = [24 x i8] c"%s\0A%c\0A\09%c %c\0A %c%c\09\08%c\0A\00"
@.str.3 = [15 x i8] c"The output is:\00"
define i32 @main() {
%1 = alloca i8
%2 = alloca i8
%3 = alloca i8
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* %1, i8* %2, i8* %3)
%6 = load i8, i8* %1
%7 = load i8, i8* %2
%8 = load i8, i8* %3
%9 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), i8 signext %6, i8 signext %7, i8 signext %8, i8 signext %6, i8 signext %7, i8 signext %8)
ret i32 0
}