#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 /*<<< orphan*/ scanf(char *, int *);
int main() {
  int vetor[8], i = 0, numero, primeira_pt;
  scanf("%d", &numero);
  primeira_pt = numero % 10000;
  numero /= 10000;
  for (i; i < 4; i++) {
    vetor[i] = 0;
    vetor[i] = primeira_pt;
  }
  for (i; i < 8; i++) {
    vetor[i] = 0;
    vetor[i] = numero;
  }
  for (i = 0; i < 8; i++) {
    printf("%d\n", vetor[i]);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x34(%rbp)
lea    0xec3(%rip),%rdi
lea    -0x38(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x38(%rbp),%eax
mov    $0x2710,%ecx
cltd
idiv   %ecx
mov    %edx,-0x3c(%rbp)
mov    -0x38(%rbp),%eax
mov    $0x2710,%ecx
cltd
idiv   %ecx
mov    %eax,-0x38(%rbp)
cmpl   $0x4,-0x34(%rbp)
jge    1191 <main+0x71>
movslq -0x34(%rbp),%rax
movl   $0x0,-0x30(%rbp,%rax,4)
mov    -0x3c(%rbp),%ecx
movslq -0x34(%rbp),%rax
mov    %ecx,-0x30(%rbp,%rax,4)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1162 <main+0x42>
cmpl   $0x8,-0x34(%rbp)
jge    11c0 <main+0xa0>
movslq -0x34(%rbp),%rax
movl   $0x0,-0x30(%rbp,%rax,4)
mov    -0x38(%rbp),%ecx
movslq -0x34(%rbp),%rax
mov    %ecx,-0x30(%rbp,%rax,4)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1191 <main+0x71>
movl   $0x0,-0x34(%rbp)
cmpl   $0x8,-0x34(%rbp)
jge    11f3 <main+0xd3>
movslq -0x34(%rbp),%rax
mov    -0x30(%rbp,%rax,4),%esi
lea    0xe23(%rip),%rdi
call   1030 <printf@plt>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    11c7 <main+0xa7>
mov    -0x4(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
lea    0xed0(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1040 <scanf@plt>
movslq 0xc(%rsp),%r15
imul   $0x68db8bad,%r15,%rbx
mov    %rbx,%rax
shr    $0x3f,%rax
sar    $0x2c,%rbx
add    %eax,%ebx
imul   $0x2710,%ebx,%eax
sub    %eax,%r15d
mov    %ebx,0xc(%rsp)
lea    0xe9c(%rip),%r14
mov    %r14,%rdi
mov    %r15d,%esi
call   1030 <printf@plt>
mov    %r14,%rdi
mov    %r15d,%esi
call   1030 <printf@plt>
mov    %r14,%rdi
mov    %r15d,%esi
call   1030 <printf@plt>
mov    %r14,%rdi
mov    %r15d,%esi
call   1030 <printf@plt>
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%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 [8 x i32]
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %3
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %4)
%7 = load i32, i32* %4
%8 = srem i32 %7, 10000
store i32 %8, i32* %5
%9 = load i32, i32* %4
%10 = sdiv i32 %9, 10000
store i32 %10, i32* %4
%11 = load i32, i32* %3
br label %12
12: ; preds = %23, %0
%13 = load i32, i32* %3
%14 = icmp slt i32 %13, 4
br i1 %14, label %15, label %26
15: ; preds = %12
%16 = load i32, i32* %3
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds [8 x i32], [8 x i32]* %2, i64 0, i64 %17
store i32 0, i32* %18
%19 = load i32, i32* %5
%20 = load i32, i32* %3
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds [8 x i32], [8 x i32]* %2, i64 0, i64 %21
store i32 %19, i32* %22
br label %23
23: ; preds = %15
%24 = load i32, i32* %3
%25 = add nsw i32 %24, 1
store i32 %25, i32* %3
br label %12
26: ; preds = %12
%27 = load i32, i32* %3
br label %28
28: ; preds = %39, %26
%29 = load i32, i32* %3
%30 = icmp slt i32 %29, 8
br i1 %30, label %31, label %42
31: ; preds = %28
%32 = load i32, i32* %3
%33 = sext i32 %32 to i64
%34 = getelementptr inbounds [8 x i32], [8 x i32]* %2, i64 0, i64 %33
store i32 0, i32* %34
%35 = load i32, i32* %4
%36 = load i32, i32* %3
%37 = sext i32 %36 to i64
%38 = getelementptr inbounds [8 x i32], [8 x i32]* %2, i64 0, i64 %37
store i32 %35, i32* %38
br label %39
39: ; preds = %31
%40 = load i32, i32* %3
%41 = add nsw i32 %40, 1
store i32 %41, i32* %3
br label %28
42: ; preds = %28
store i32 0, i32* %3
br label %43
43: ; preds = %52, %42
%44 = load i32, i32* %3
%45 = icmp slt i32 %44, 8
br i1 %45, label %46, label %55
46: ; preds = %43
%47 = load i32, i32* %3
%48 = sext i32 %47 to i64
%49 = getelementptr inbounds [8 x i32], [8 x i32]* %2, i64 0, i64 %48
%50 = load i32, i32* %49
%51 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %50)
br label %52
52: ; preds = %46
%53 = load i32, i32* %3
%54 = add nsw i32 %53, 1
store i32 %54, i32* %3
br label %43
55: ; preds = %43
%56 = load i32, i32* %1
ret i32 %56
}

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 = 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, 10000
%6 = sdiv i32 %4, 10000
store i32 %6, i32* %1
%7 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %5)
%8 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %5)
%9 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %5)
%10 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %5)
%11 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %6)
%12 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %6)
%13 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %6)
%14 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %6)
ret i32 0
}