#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);
int /*<<< orphan*/ scanf(char *, char *, char *, char *);
int main() {
  char a, b, c;
  scanf("%c%c%c", &a, &b, &c);
  printf("%.3d %.3o %.3x\n", a, a, a);
  printf("%.3d %.3o %.3x\n", b, b, b);
  printf("%.3d %.3o %.3x\n", c, c, c);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xed4(%rip),%rdi
lea    0xf(%rsp),%rsi
lea    0xe(%rsp),%rdx
lea    0xd(%rsp),%rcx
call   1040 <scanf@plt>
movsbl 0xf(%rsp),%ecx
lea    0xebb(%rip),%rbx
mov    %rbx,%rdi
mov    %ecx,%esi
mov    %ecx,%edx
call   1030 <printf@plt>
movsbl 0xe(%rsp),%ecx
mov    %rbx,%rdi
mov    %ecx,%esi
mov    %ecx,%edx
call   1030 <printf@plt>
movsbl 0xd(%rsp),%ecx
mov    %rbx,%rdi
mov    %ecx,%esi
mov    %ecx,%edx
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"%c%c%c\00"
@.str.1 = [16 x i8] c"%.3d %.3o %.3x\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 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %2, i8* %3, i8* %4)
%6 = load i8, i8* %2
%7 = load i8, i8* %2
%8 = load i8, i8* %2
%9 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i8 signext %6, i8 signext %7, i8 signext %8)
%10 = load i8, i8* %3
%11 = load i8, i8* %3
%12 = load i8, i8* %3
%13 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i8 signext %10, i8 signext %11, i8 signext %12)
%14 = load i8, i8* %4
%15 = load i8, i8* %4
%16 = load i8, i8* %4
%17 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i8 signext %14, i8 signext %15, i8 signext %16)
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c"%c%c%c\00"
@.str.1 = [16 x i8] c"%.3d %.3o %.3x\0A\00"
define i32 @main() {
%1 = alloca i8
%2 = alloca i8
%3 = alloca i8
%4 = call i32 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %1, i8* %2, i8* %3)
%5 = load i8, i8* %1
%6 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i8 signext %5, i8 signext %5, i8 signext %5)
%7 = load i8, i8* %2
%8 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i8 signext %7, i8 signext %7, i8 signext %7)
%9 = load i8, i8* %3
%10 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i8 signext %9, i8 signext %9, i8 signext %9)
ret i32 0
}