#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 *, ...);
int /*<<< orphan*/ scanf(char *, char *, char *, char *);
int main() {
  char ch1[10], ch2[10], ch3[10];
  printf("Enter The Name: ");
  scanf("%s %s %s", ch1, ch2, ch3);
  printf("A: %s %c. %s \n", ch1, ch2[0], ch3);
  printf("B: %c.%c. %s \n", ch1[0], ch2[0], ch3);
  printf("C: %s %c.%c.\n", ch3, ch1[0], ch2[0]);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0xe(%rbp),%rsi
lea    -0x18(%rbp),%rdx
lea    -0x22(%rbp),%rcx
lea    0xec1(%rip),%rdi
call   1040 <scanf@plt>
lea    -0xe(%rbp),%rsi
movsbl -0x18(%rbp),%edx
lea    -0x22(%rbp),%rcx
lea    0xeb2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movsbl -0xe(%rbp),%esi
movsbl -0x18(%rbp),%edx
lea    -0x22(%rbp),%rcx
lea    0xea7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x22(%rbp),%rsi
movsbl -0xe(%rbp),%edx
movsbl -0x18(%rbp),%ecx
lea    0xe9c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x28,%rsp
lea    0xed2(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xed5(%rip),%rdi
lea    0x14(%rsp),%r14
lea    0xa(%rsp),%rdx
lea    0x1e(%rsp),%rbx
mov    %r14,%rsi
mov    %rbx,%rcx
call   1040 <scanf@plt>
movsbl 0xa(%rsp),%edx
lea    0xeb8(%rip),%rdi
mov    %r14,%rsi
mov    %rbx,%rcx
xor    %eax,%eax
call   1030 <printf@plt>
movsbl 0x14(%rsp),%esi
movsbl 0xa(%rsp),%edx
lea    0xea9(%rip),%rdi
mov    %rbx,%rcx
xor    %eax,%eax
call   1030 <printf@plt>
movsbl 0x14(%rsp),%edx
movsbl 0xa(%rsp),%ecx
lea    0xe9d(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [17 x i8] c"Enter The Name: \00"
@.str.1 = [9 x i8] c"%s %s %s\00"
@.str.2 = [15 x i8] c"A: %s %c. %s \0A\00"
@.str.3 = [15 x i8] c"B: %c.%c. %s \0A\00"
@.str.4 = [14 x i8] c"C: %s %c.%c.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [10 x i8]
%3 = alloca [10 x i8]
%4 = alloca [10 x i8]
store i32 0, i32* %1
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%6 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 0
%7 = getelementptr inbounds [10 x i8], [10 x i8]* %3, i64 0, i64 0
%8 = getelementptr inbounds [10 x i8], [10 x i8]* %4, i64 0, i64 0
%9 = call i32 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i8* %6, i8* %7, i8* %8)
%10 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 0
%11 = getelementptr inbounds [10 x i8], [10 x i8]* %3, i64 0, i64 0
%12 = load i8, i8* %11
%13 = sext i8 %12 to i32
%14 = getelementptr inbounds [10 x i8], [10 x i8]* %4, i64 0, i64 0
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), i8* %10, i32 %13, i8* %14)
%16 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 0
%17 = load i8, i8* %16
%18 = sext i8 %17 to i32
%19 = getelementptr inbounds [10 x i8], [10 x i8]* %3, i64 0, i64 0
%20 = load i8, i8* %19
%21 = sext i8 %20 to i32
%22 = getelementptr inbounds [10 x i8], [10 x i8]* %4, i64 0, i64 0
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), i32 %18, i32 %21, i8* %22)
%24 = getelementptr inbounds [10 x i8], [10 x i8]* %4, i64 0, i64 0
%25 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 0
%26 = load i8, i8* %25
%27 = sext i8 %26 to i32
%28 = getelementptr inbounds [10 x i8], [10 x i8]* %3, i64 0, i64 0
%29 = load i8, i8* %28
%30 = sext i8 %29 to i32
%31 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0), i8* %24, i32 %27, i32 %30)
ret i32 0
}

LLVM IR (-O2):
@.str = [17 x i8] c"Enter The Name: \00"
@.str.1 = [9 x i8] c"%s %s %s\00"
@.str.2 = [15 x i8] c"A: %s %c. %s \0A\00"
@.str.3 = [15 x i8] c"B: %c.%c. %s \0A\00"
@.str.4 = [14 x i8] c"C: %s %c.%c.\0A\00"
define i32 @main() {
%1 = alloca [10 x i8]
%2 = alloca [10 x i8]
%3 = alloca [10 x i8]
%4 = getelementptr inbounds [10 x i8], [10 x i8]* %1, i64 0, i64 0
%5 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 0
%6 = getelementptr inbounds [10 x i8], [10 x i8]* %3, i64 0, i64 0
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i8* %4, i8* %5, i8* %6)
%9 = load i8, i8* %5
%10 = sext i8 %9 to i32
%11 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), i8* %4, i32 %10, i8* %6)
%12 = load i8, i8* %4
%13 = sext i8 %12 to i32
%14 = load i8, i8* %5
%15 = sext i8 %14 to i32
%16 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), i32 %13, i32 %15, i8* %6)
%17 = load i8, i8* %4
%18 = sext i8 %17 to i32
%19 = load i8, i8* %5
%20 = sext i8 %19 to i32
%21 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0), i8* %6, i32 %18, i32 %20)
ret i32 0
}