#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*/ getch();
int numsize(int);
int /*<<< orphan*/ numsplit(int, int *);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
main() {
  int num, n_siz, i;
  scanf("%d", &num);
  n_siz = numsize(num);
  int store[1000];
  numsplit(num, store);
  for (i = 1; i <= n_siz; ++i)
    printf("%d\n", store[i]);
  getch();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xfb0,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xe97(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1060 <scanf@plt>
mov    -0x8(%rbp),%edi
call   1040 <numsize@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
lea    -0xfb0(%rbp),%rsi
call   1050 <numsplit@plt>
movl   $0x1,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jg     11c4 <main+0x74>
movslq -0x10(%rbp),%rax
mov    -0xfb0(%rbp,%rax,4),%esi
lea    0xe52(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1193 <main+0x43>
mov    $0x0,%al
call   1070 <getch@plt>
mov    -0x4(%rbp),%eax
add    $0xfb0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0xfb0,%rsp
lea    0xe9d(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1060 <scanf@plt>
mov    0xc(%rsp),%edi
call   1040 <numsize@plt>
mov    %eax,%r15d
mov    0xc(%rsp),%edi
lea    0x10(%rsp),%rsi
call   1050 <numsplit@plt>
test   %r15d,%r15d
jle    11b5 <main+0x65>
add    $0x1,%r15d
mov    $0x1,%ebx
lea    0xe67(%rip),%r14
nopl   0x0(%rax)
mov    0x10(%rsp,%rbx,4),%esi
mov    %r14,%rdi
call   1030 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    11a0 <main+0x50>
xor    %eax,%eax
call   1070 <getch@plt>
xor    %eax,%eax
add    $0xfb0,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [1000 x i32]
%3 = bitcast i32* %1 to i8*
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = call i32 @numsize(i32 %5)
%7 = bitcast [1000 x i32]* %2 to i8*
%8 = load i32, i32* %1
%9 = getelementptr inbounds [1000 x i32], [1000 x i32]* %2, i64 0, i64 0
%10 = call i32 @numsplit(i32 %8, i32* %9)
%11 = icmp slt i32 %6, 1
br i1 %11, label %22, label %12
12: ; preds = %0
%13 = add nuw i32 %6, 1
%14 = zext i32 %13 to i64
br label %15
15: ; preds = %12, %15
%16 = phi i64 [ 1, %12 ], [ %20, %15 ]
%17 = getelementptr inbounds [1000 x i32], [1000 x i32]* %2, i64 0, i64 %16
%18 = load i32, i32* %17
%19 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %18)
%20 = add nuw nsw i64 %16, 1
%21 = icmp eq i64 %20, %14
br i1 %21, label %22, label %15
22: ; preds = %15, %0
%23 = call i32 (...) @getch()
ret i32 0
}