#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 getint();
int /*<<< orphan*/ putchar(int);
int /*<<< orphan*/ putint(int);
int main() {
  int a;
  a = getint();
  a = a - a / 10 * 10;
  int s[10];
  int i;
  i = 0;
  while (i < 10) {
    s[i] = a;
    i = i + 1;
  }
  s[a] = 10;
  i = 0;
  while (i < 10) {
    putint(s[i] - a);
    i = i + 1;
    putchar(10);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1050 <getint@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x38(%rbp)
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x38(%rbp),%eax
imul   $0xa,%ecx,%ecx
sub    %ecx,%eax
mov    %eax,-0x8(%rbp)
movl   $0x0,-0x34(%rbp)
cmpl   $0xa,-0x34(%rbp)
jge    1191 <main+0x61>
mov    -0x8(%rbp),%ecx
movslq -0x34(%rbp),%rax
mov    %ecx,-0x30(%rbp,%rax,4)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    116e <main+0x3e>
movslq -0x8(%rbp),%rax
movl   $0xa,-0x30(%rbp,%rax,4)
movl   $0x0,-0x34(%rbp)
cmpl   $0xa,-0x34(%rbp)
jge    11d6 <main+0xa6>
movslq -0x34(%rbp),%rax
mov    -0x30(%rbp,%rax,4),%edi
sub    -0x8(%rbp),%edi
call   1040 <putint@plt>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
mov    $0xa,%edi
call   1030 <putchar@plt>
jmp    11a4 <main+0x74>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x30,%rsp
xor    %eax,%eax
call   1050 <getint@plt>
cltq
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x22,%rcx
add    %edx,%ecx
add    %ecx,%ecx
lea    (%rcx,%rcx,4),%ecx
sub    %ecx,%eax
movd   %eax,%xmm0
pshufd $0x0,%xmm0,%xmm0
movdqa %xmm0,(%rsp)
movdqa %xmm0,0x10(%rsp)
mov    %eax,0x20(%rsp)
mov    %eax,0x24(%rsp)
movslq %eax,%rbx
movl   $0xa,(%rsp,%rbx,4)
mov    (%rsp),%edi
sub    %ebx,%edi
call   1040 <putint@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x4(%rsp),%edi
sub    %ebx,%edi
call   1040 <putint@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x8(%rsp),%edi
sub    %ebx,%edi
call   1040 <putint@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0xc(%rsp),%edi
sub    %ebx,%edi
call   1040 <putint@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x10(%rsp),%edi
sub    %ebx,%edi
call   1040 <putint@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x14(%rsp),%edi
sub    %ebx,%edi
call   1040 <putint@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x18(%rsp),%edi
sub    %ebx,%edi
call   1040 <putint@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x1c(%rsp),%edi
sub    %ebx,%edi
call   1040 <putint@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x20(%rsp),%edi
sub    %ebx,%edi
call   1040 <putint@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x24(%rsp),%edi
sub    %ebx,%edi
call   1040 <putint@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [10 x i32]
%4 = alloca i32
store i32 0, i32* %1
%5 = call i32 (...) @getint()
store i32 %5, i32* %2
%6 = load i32, i32* %2
%7 = load i32, i32* %2
%8 = sdiv i32 %7, 10
%9 = mul nsw i32 %8, 10
%10 = sub nsw i32 %6, %9
store i32 %10, i32* %2
store i32 0, i32* %4
br label %11
11: ; preds = %14, %0
%12 = load i32, i32* %4
%13 = icmp slt i32 %12, 10
br i1 %13, label %14, label %21
14: ; preds = %11
%15 = load i32, i32* %2
%16 = load i32, i32* %4
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds [10 x i32], [10 x i32]* %3, i64 0, i64 %17
store i32 %15, i32* %18
%19 = load i32, i32* %4
%20 = add nsw i32 %19, 1
store i32 %20, i32* %4
br label %11
21: ; preds = %11
%22 = load i32, i32* %2
%23 = sext i32 %22 to i64
%24 = getelementptr inbounds [10 x i32], [10 x i32]* %3, i64 0, i64 %23
store i32 10, i32* %24
store i32 0, i32* %4
br label %25
25: ; preds = %28, %21
%26 = load i32, i32* %4
%27 = icmp slt i32 %26, 10
br i1 %27, label %28, label %39
28: ; preds = %25
%29 = load i32, i32* %4
%30 = sext i32 %29 to i64
%31 = getelementptr inbounds [10 x i32], [10 x i32]* %3, i64 0, i64 %30
%32 = load i32, i32* %31
%33 = load i32, i32* %2
%34 = sub nsw i32 %32, %33
%35 = call i32 @putint(i32 %34)
%36 = load i32, i32* %4
%37 = add nsw i32 %36, 1
store i32 %37, i32* %4
%38 = call i32 @putchar(i32 10)
br label %25
39: ; preds = %25
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [10 x i32]
%2 = tail call i32 (...) @getint()
%3 = srem i32 %2, 10
%4 = bitcast [10 x i32]* %1 to i8*
%5 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%6 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 1
%7 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 2
%8 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 3
%9 = insertelement <4 x i32> poison, i32 %3, i64 0
%10 = shufflevector <4 x i32> %9, <4 x i32> poison, <4 x i32> zeroinitializer
%11 = bitcast [10 x i32]* %1 to <4 x i32>*
store <4 x i32> %10, <4 x i32>* %11
%12 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 4
%13 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 5
%14 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 6
%15 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 7
%16 = bitcast i32* %12 to <4 x i32>*
store <4 x i32> %10, <4 x i32>* %16
%17 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 8
store i32 %3, i32* %17
%18 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 9
store i32 %3, i32* %18
%19 = sext i32 %3 to i64
%20 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 %19
store i32 10, i32* %20
%21 = load i32, i32* %5
%22 = sub nsw i32 %21, %3
%23 = tail call i32 @putint(i32 %22)
%24 = tail call i32 @putchar(i32 10)
%25 = load i32, i32* %6
%26 = sub nsw i32 %25, %3
%27 = tail call i32 @putint(i32 %26)
%28 = tail call i32 @putchar(i32 10)
%29 = load i32, i32* %7
%30 = sub nsw i32 %29, %3
%31 = tail call i32 @putint(i32 %30)
%32 = tail call i32 @putchar(i32 10)
%33 = load i32, i32* %8
%34 = sub nsw i32 %33, %3
%35 = tail call i32 @putint(i32 %34)
%36 = tail call i32 @putchar(i32 10)
%37 = load i32, i32* %12
%38 = sub nsw i32 %37, %3
%39 = tail call i32 @putint(i32 %38)
%40 = tail call i32 @putchar(i32 10)
%41 = load i32, i32* %13
%42 = sub nsw i32 %41, %3
%43 = tail call i32 @putint(i32 %42)
%44 = tail call i32 @putchar(i32 10)
%45 = load i32, i32* %14
%46 = sub nsw i32 %45, %3
%47 = tail call i32 @putint(i32 %46)
%48 = tail call i32 @putchar(i32 10)
%49 = load i32, i32* %15
%50 = sub nsw i32 %49, %3
%51 = tail call i32 @putint(i32 %50)
%52 = tail call i32 @putchar(i32 10)
%53 = load i32, i32* %17
%54 = sub nsw i32 %53, %3
%55 = tail call i32 @putint(i32 %54)
%56 = tail call i32 @putchar(i32 10)
%57 = load i32, i32* %18
%58 = sub nsw i32 %57, %3
%59 = tail call i32 @putint(i32 %58)
%60 = tail call i32 @putchar(i32 10)
ret i32 0
}