#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, int, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int a[3], n;
  scanf("%d", &n);
  for (int i = 2; i >= 0; i--) {
    a[i] = n % 10;
    n /= 10;
  }
  printf("%d %d %d", a[0], a[1], a[2]);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xed0(%rip),%rdi
lea    -0x14(%rbp),%rsi
call   1040 <scanf@plt>
movl   $0x2,-0x18(%rbp)
cmpl   $0x0,-0x18(%rbp)
jl     117f <main+0x5f>
mov    -0x14(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
movslq -0x18(%rbp),%rax
mov    %edx,-0x10(%rbp,%rax,4)
mov    -0x14(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x14(%rbp)
mov    -0x18(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x18(%rbp)
jmp    1146 <main+0x26>
mov    -0x10(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x8(%rbp),%ecx
lea    0xe71(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xede(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
movslq 0x4(%rsp),%rsi
imul   $0x66666667,%rsi,%rdx
mov    %rdx,%rcx
shr    $0x3f,%rcx
sar    $0x22,%rdx
add    %ecx,%edx
lea    (%rdx,%rdx,1),%ecx
lea    (%rcx,%rcx,4),%r8d
imul   $0x51eb851f,%rsi,%r9
imul   $0x10624dd3,%rsi,%rax
mov    %esi,%ecx
sub    %r8d,%ecx
movslq %edx,%rdx
imul   $0x66666667,%rdx,%rsi
mov    %rsi,%rdi
shr    $0x3f,%rdi
sar    $0x22,%rsi
add    %edi,%esi
add    %esi,%esi
lea    (%rsi,%rsi,4),%esi
sub    %esi,%edx
mov    %r9,%rsi
shr    $0x3f,%rsi
sar    $0x25,%r9
add    %esi,%r9d
movslq %r9d,%rsi
imul   $0x66666667,%rsi,%rdi
mov    %rdi,%r8
shr    $0x3f,%r8
sar    $0x22,%rdi
add    %r8d,%edi
add    %edi,%edi
lea    (%rdi,%rdi,4),%edi
sub    %edi,%esi
mov    %rax,%rdi
shr    $0x3f,%rdi
sar    $0x26,%rax
add    %edi,%eax
mov    %eax,0x4(%rsp)
lea    0xe38(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [9 x i8] c"%d %d %d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [3 x i32]
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
store i32 2, i32* %4
br label %6
6: ; preds = %17, %0
%7 = load i32, i32* %4
%8 = icmp sge i32 %7, 0
br i1 %8, label %9, label %20
9: ; preds = %6
%10 = load i32, i32* %3
%11 = srem i32 %10, 10
%12 = load i32, i32* %4
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 %13
store i32 %11, i32* %14
%15 = load i32, i32* %3
%16 = sdiv i32 %15, 10
store i32 %16, i32* %3
br label %17
17: ; preds = %9
%18 = load i32, i32* %4
%19 = add nsw i32 %18, -1
store i32 %19, i32* %4
br label %6
20: ; preds = %6
%21 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 0
%22 = load i32, i32* %21
%23 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 1
%24 = load i32, i32* %23
%25 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 2
%26 = load i32, i32* %25
%27 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 %22, i32 %24, i32 %26)
ret i32 0
}

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