#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 main() {
  int n, n1, n2, n3, n4, b = 0, b1 = 0, b2 = 0, b3 = 0, b4 = 0;
  n = 5170984;
  n1 = 406567;
  n2 = 368750;
  n3 = 2369510;
  n4 = 2183293;
  while (n != 0) {
    b = b * 10;
    b = b + n % 10;
    n = n / 10;
  }
  while (n1 != 0) {
    b1 = b1 * 10;
    b1 = b1 + n1 % 10;
    n1 = n1 / 10;
  }
  while (n2 != 0) {
    b2 = b2 * 10;
    b2 = b2 + n2 % 10;
    n2 = n2 / 10;
  }
  while (n3 != 0) {
    b3 = b3 * 10;
    b3 = b3 + n3 % 10;
    n3 = n3 / 10;
  }
  while (n4 != 0) {
    b4 = b4 * 10;
    b4 = b4 + n4 % 10;
    n4 = n4 / 10;
  }
  printf("5170984 %d\n", b);
  printf("406567  %d\n", b1);
  printf("368750  %d\n", b2);
  printf("2369510 %d\n", b3);
  printf("2183293 %d\n", b4);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x1c(%rbp)
movl   $0x0,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
movl   $0x0,-0x28(%rbp)
movl   $0x0,-0x2c(%rbp)
movl   $0x4ee728,-0x8(%rbp)
movl   $0x63427,-0xc(%rbp)
movl   $0x5a06e,-0x10(%rbp)
movl   $0x2427e6,-0x14(%rbp)
movl   $0x21507d,-0x18(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     11a2 <main+0x92>
imul   $0xa,-0x1c(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,-0x30(%rbp)
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    -0x30(%rbp),%eax
add    %edx,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x8(%rbp)
jmp    1165 <main+0x55>
jmp    11a7 <main+0x97>
cmpl   $0x0,-0xc(%rbp)
je     11e4 <main+0xd4>
imul   $0xa,-0x20(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x20(%rbp),%eax
mov    %eax,-0x34(%rbp)
mov    -0xc(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    -0x34(%rbp),%eax
add    %edx,%eax
mov    %eax,-0x20(%rbp)
mov    -0xc(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0xc(%rbp)
jmp    11a7 <main+0x97>
jmp    11e9 <main+0xd9>
cmpl   $0x0,-0x10(%rbp)
je     1226 <main+0x116>
imul   $0xa,-0x24(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
mov    %eax,-0x38(%rbp)
mov    -0x10(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    -0x38(%rbp),%eax
add    %edx,%eax
mov    %eax,-0x24(%rbp)
mov    -0x10(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x10(%rbp)
jmp    11e9 <main+0xd9>
jmp    122b <main+0x11b>
cmpl   $0x0,-0x14(%rbp)
je     1268 <main+0x158>
imul   $0xa,-0x28(%rbp),%eax
mov    %eax,-0x28(%rbp)
mov    -0x28(%rbp),%eax
mov    %eax,-0x3c(%rbp)
mov    -0x14(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    -0x3c(%rbp),%eax
add    %edx,%eax
mov    %eax,-0x28(%rbp)
mov    -0x14(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x14(%rbp)
jmp    122b <main+0x11b>
jmp    126d <main+0x15d>
cmpl   $0x0,-0x18(%rbp)
je     12aa <main+0x19a>
imul   $0xa,-0x2c(%rbp),%eax
mov    %eax,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
mov    %eax,-0x40(%rbp)
mov    -0x18(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    -0x40(%rbp),%eax
add    %edx,%eax
mov    %eax,-0x2c(%rbp)
mov    -0x18(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x18(%rbp)
jmp    126d <main+0x15d>
mov    -0x1c(%rbp),%esi
lea    0xd4c(%rip),%rdi
call   1030 <printf@plt>
mov    -0x20(%rbp),%esi
lea    0xd49(%rip),%rdi
call   1030 <printf@plt>
mov    -0x24(%rbp),%esi
lea    0xd46(%rip),%rdi
call   1030 <printf@plt>
mov    -0x28(%rbp),%esi
lea    0xd43(%rip),%rdi
call   1030 <printf@plt>
mov    -0x2c(%rbp),%esi
lea    0xd40(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x4aa05b,%esi
call   1030 <printf@plt>
lea    0xee3(%rip),%rdi
mov    $0xbaea4,%esi
call   1030 <printf@plt>
lea    0xede(%rip),%rdi
mov    $0xe207,%esi
call   1030 <printf@plt>
lea    0xed9(%rip),%rdi
mov    $0x26f90,%esi
call   1030 <printf@plt>
lea    0xed4(%rip),%rdi
mov    $0x3bdf64,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [12 x i8] c"5170984 %d\0A\00"
@.str.1 = [12 x i8] c"406567 %d\0A\00"
@.str.2 = [12 x i8] c"368750 %d\0A\00"
@.str.3 = [12 x i8] c"2369510 %d\0A\00"
@.str.4 = [12 x i8] c"2183293 %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %7
store i32 0, i32* %8
store i32 0, i32* %9
store i32 0, i32* %10
store i32 0, i32* %11
store i32 5170984, i32* %2
store i32 406567, i32* %3
store i32 368750, i32* %4
store i32 2369510, i32* %5
store i32 2183293, i32* %6
br label %12
12: ; preds = %15, %0
%13 = load i32, i32* %2
%14 = icmp ne i32 %13, 0
br i1 %14, label %15, label %24
15: ; preds = %12
%16 = load i32, i32* %7
%17 = mul nsw i32 %16, 10
store i32 %17, i32* %7
%18 = load i32, i32* %7
%19 = load i32, i32* %2
%20 = srem i32 %19, 10
%21 = add nsw i32 %18, %20
store i32 %21, i32* %7
%22 = load i32, i32* %2
%23 = sdiv i32 %22, 10
store i32 %23, i32* %2
br label %12
24: ; preds = %12
br label %25
25: ; preds = %28, %24
%26 = load i32, i32* %3
%27 = icmp ne i32 %26, 0
br i1 %27, label %28, label %37
28: ; preds = %25
%29 = load i32, i32* %8
%30 = mul nsw i32 %29, 10
store i32 %30, i32* %8
%31 = load i32, i32* %8
%32 = load i32, i32* %3
%33 = srem i32 %32, 10
%34 = add nsw i32 %31, %33
store i32 %34, i32* %8
%35 = load i32, i32* %3
%36 = sdiv i32 %35, 10
store i32 %36, i32* %3
br label %25
37: ; preds = %25
br label %38
38: ; preds = %41, %37
%39 = load i32, i32* %4
%40 = icmp ne i32 %39, 0
br i1 %40, label %41, label %50
41: ; preds = %38
%42 = load i32, i32* %9
%43 = mul nsw i32 %42, 10
store i32 %43, i32* %9
%44 = load i32, i32* %9
%45 = load i32, i32* %4
%46 = srem i32 %45, 10
%47 = add nsw i32 %44, %46
store i32 %47, i32* %9
%48 = load i32, i32* %4
%49 = sdiv i32 %48, 10
store i32 %49, i32* %4
br label %38
50: ; preds = %38
br label %51
51: ; preds = %54, %50
%52 = load i32, i32* %5
%53 = icmp ne i32 %52, 0
br i1 %53, label %54, label %63
54: ; preds = %51
%55 = load i32, i32* %10
%56 = mul nsw i32 %55, 10
store i32 %56, i32* %10
%57 = load i32, i32* %10
%58 = load i32, i32* %5
%59 = srem i32 %58, 10
%60 = add nsw i32 %57, %59
store i32 %60, i32* %10
%61 = load i32, i32* %5
%62 = sdiv i32 %61, 10
store i32 %62, i32* %5
br label %51
63: ; preds = %51
br label %64
64: ; preds = %67, %63
%65 = load i32, i32* %6
%66 = icmp ne i32 %65, 0
br i1 %66, label %67, label %76
67: ; preds = %64
%68 = load i32, i32* %11
%69 = mul nsw i32 %68, 10
store i32 %69, i32* %11
%70 = load i32, i32* %11
%71 = load i32, i32* %6
%72 = srem i32 %71, 10
%73 = add nsw i32 %70, %72
store i32 %73, i32* %11
%74 = load i32, i32* %6
%75 = sdiv i32 %74, 10
store i32 %75, i32* %6
br label %64
76: ; preds = %64
%77 = load i32, i32* %7
%78 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %77)
%79 = load i32, i32* %8
%80 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 %79)
%81 = load i32, i32* %9
%82 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i32 %81)
%83 = load i32, i32* %10
%84 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0), i32 %83)
%85 = load i32, i32* %11
%86 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0), i32 %85)
ret i32 0
}

LLVM IR (-O2):
@.str = [12 x i8] c"5170984 %d\0A\00"
@.str.1 = [12 x i8] c"406567 %d\0A\00"
@.str.2 = [12 x i8] c"368750 %d\0A\00"
@.str.3 = [12 x i8] c"2369510 %d\0A\00"
@.str.4 = [12 x i8] c"2183293 %d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 4890715)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 765604)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i32 57863)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0), i32 159632)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0), i32 3923812)
ret i32 0
}