#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 main() {
  int long unsigned x[5] = {5170984, 406567, 368750, 2369510, 2183293};
  int long unsigned y = 0;
  int z;
  printf("\n");
  for (z = 0; z < 5; z++) {
    while (x[z] != 0) {
      y = y * 10 + x[z] % 10;
      x[z] = x[z] / 10;
    }
    printf("%lu \n", y);
    y = 0;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x30(%rbp),%rdi
xor    %esi,%esi
mov    $0x28,%edx
call   1040 <memset@plt>
movq   $0x4ee728,-0x30(%rbp)
movq   $0x63427,-0x28(%rbp)
movq   $0x5a06e,-0x20(%rbp)
movq   $0x2427e6,-0x18(%rbp)
movq   $0x21507d,-0x10(%rbp)
movq   $0x0,-0x38(%rbp)
lea    0xe8e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x3c(%rbp)
cmpl   $0x5,-0x3c(%rbp)
jge    1216 <main+0xf6>
jmp    1193 <main+0x73>
movslq -0x3c(%rbp),%rax
cmpq   $0x0,-0x30(%rbp,%rax,8)
je     11ee <main+0xce>
imul   $0xa,-0x38(%rbp),%rax
mov    %rax,-0x48(%rbp)
movslq -0x3c(%rbp),%rax
mov    -0x30(%rbp,%rax,8),%rax
mov    $0xa,%ecx
xor    %edx,%edx
div    %rcx
mov    -0x48(%rbp),%rax
add    %rdx,%rax
mov    %rax,-0x38(%rbp)
movslq -0x3c(%rbp),%rax
mov    -0x30(%rbp,%rax,8),%rax
mov    $0xa,%ecx
xor    %edx,%edx
div    %rcx
mov    %rax,%rcx
movslq -0x3c(%rbp),%rax
mov    %rcx,-0x30(%rbp,%rax,8)
jmp    1193 <main+0x73>
mov    -0x38(%rbp),%rsi
lea    0xe07(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movq   $0x0,-0x38(%rbp)
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    1184 <main+0x64>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xece(%rip),%rbx
mov    $0x4aa05b,%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xbaea4,%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xe207,%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x26f90,%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x3bdf64,%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [2 x i8] c"\0A\00"
@.str.1 = [6 x i8] c"%lu \0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [5 x i64]
%3 = alloca i64
%4 = alloca i32
store i32 0, i32* %1
%5 = bitcast [5 x i64]* %2 to i8*
%6 = bitcast i8* %5 to [5 x i64]*
%7 = getelementptr inbounds [5 x i64], [5 x i64]* %6, i32 0, i32 0
store i64 5170984, i64* %7
%8 = getelementptr inbounds [5 x i64], [5 x i64]* %6, i32 0, i32 1
store i64 406567, i64* %8
%9 = getelementptr inbounds [5 x i64], [5 x i64]* %6, i32 0, i32 2
store i64 368750, i64* %9
%10 = getelementptr inbounds [5 x i64], [5 x i64]* %6, i32 0, i32 3
store i64 2369510, i64* %10
%11 = getelementptr inbounds [5 x i64], [5 x i64]* %6, i32 0, i32 4
store i64 2183293, i64* %11
store i64 0, i64* %3
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %4
br label %13
13: ; preds = %43, %0
%14 = load i32, i32* %4
%15 = icmp slt i32 %14, 5
br i1 %15, label %16, label %46
16: ; preds = %13
br label %17
17: ; preds = %23, %16
%18 = load i32, i32* %4
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds [5 x i64], [5 x i64]* %2, i64 0, i64 %19
%21 = load i64, i64* %20
%22 = icmp ne i64 %21, 0
br i1 %22, label %23, label %40
23: ; preds = %17
%24 = load i64, i64* %3
%25 = mul i64 %24, 10
%26 = load i32, i32* %4
%27 = sext i32 %26 to i64
%28 = getelementptr inbounds [5 x i64], [5 x i64]* %2, i64 0, i64 %27
%29 = load i64, i64* %28
%30 = urem i64 %29, 10
%31 = add i64 %25, %30
store i64 %31, i64* %3
%32 = load i32, i32* %4
%33 = sext i32 %32 to i64
%34 = getelementptr inbounds [5 x i64], [5 x i64]* %2, i64 0, i64 %33
%35 = load i64, i64* %34
%36 = udiv i64 %35, 10
%37 = load i32, i32* %4
%38 = sext i32 %37 to i64
%39 = getelementptr inbounds [5 x i64], [5 x i64]* %2, i64 0, i64 %38
store i64 %36, i64* %39
br label %17
40: ; preds = %17
%41 = load i64, i64* %3
%42 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i64 %41)
store i64 0, i64* %3
br label %43
43: ; preds = %40
%44 = load i32, i32* %4
%45 = add nsw i32 %44, 1
store i32 %45, i32* %4
br label %13
46: ; preds = %13
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [6 x i8] c"%lu \0A\00"
define i32 @main() {
%1 = tail call i32 @putchar(i32 10)
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i64 4890715)
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i64 765604)
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i64 57863)
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i64 159632)
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i64 3923812)
ret i32 0
}