#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 ReverseNumbers(int);
int /*<<< orphan*/ printf(char *, int, int);
int main() {
  int OriginalNumber[5] = {5170984, 406567, 368750, 2369510, 2183293},
      ReverseNumber, br;
  for (br = 0; br < 5; br++) {
    ReverseNumber = ReverseNumbers(OriginalNumber[br]);
    if (br == 1) {
      printf("%6.3d       % 7.3d\n", OriginalNumber[br], ReverseNumber);
    } else {
      printf("%6.3d      % 7.3d\n", OriginalNumber[br], ReverseNumber);
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeca(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xec7(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xec5(%rip),%eax
mov    %eax,-0x10(%rbp)
movl   $0x0,-0x28(%rbp)
cmpl   $0x5,-0x28(%rbp)
jge    11bf <main+0x9f>
movslq -0x28(%rbp),%rax
mov    -0x20(%rbp,%rax,4),%edi
call   1040 <ReverseNumbers@plt>
mov    %eax,-0x24(%rbp)
cmpl   $0x1,-0x28(%rbp)
jne    1195 <main+0x75>
movslq -0x28(%rbp),%rax
mov    -0x20(%rbp,%rax,4),%esi
mov    -0x24(%rbp),%edx
lea    0xe89(%rip),%rdi
call   1030 <printf@plt>
jmp    11ac <main+0x8c>
movslq -0x28(%rbp),%rax
mov    -0x20(%rbp,%rax,4),%esi
mov    -0x24(%rbp),%edx
lea    0xe81(%rip),%rdi
call   1030 <printf@plt>
jmp    11b1 <main+0x91>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    1155 <main+0x35>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x4ee728,%edi
call   1040 <ReverseNumbers@plt>
lea    0xee2(%rip),%rbx
mov    %rbx,%rdi
mov    $0x4ee728,%esi
mov    %eax,%edx
call   1030 <printf@plt>
mov    $0x63427,%edi
call   1040 <ReverseNumbers@plt>
lea    0xeae(%rip),%rdi
mov    $0x63427,%esi
mov    %eax,%edx
call   1030 <printf@plt>
mov    $0x5a06e,%edi
call   1040 <ReverseNumbers@plt>
mov    %rbx,%rdi
mov    $0x5a06e,%esi
mov    %eax,%edx
call   1030 <printf@plt>
mov    $0x2427e6,%edi
call   1040 <ReverseNumbers@plt>
mov    %rbx,%rdi
mov    $0x2427e6,%esi
mov    %eax,%edx
call   1030 <printf@plt>
mov    $0x21507d,%edi
call   1040 <ReverseNumbers@plt>
mov    %rbx,%rdi
mov    $0x21507d,%esi
mov    %eax,%edx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.OriginalNumber = [5 x i32] [i32 5170984, i32 406567, i32 368750, i32 2369510, i32 2183293]
@.str = [20 x i8] c"%6.3d % 7.3d\0A\00"
@.str.1 = [19 x i8] c"%6.3d % 7.3d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [5 x i32]
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = bitcast [5 x i32]* %2 to i8*
store i32 0, i32* %4
br label %6
6: ; preds = %32, %0
%7 = load i32, i32* %4
%8 = icmp slt i32 %7, 5
br i1 %8, label %9, label %35
9: ; preds = %6
%10 = load i32, i32* %4
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds [5 x i32], [5 x i32]* %2, i64 0, i64 %11
%13 = load i32, i32* %12
%14 = call i32 @ReverseNumbers(i32 %13)
store i32 %14, i32* %3
%15 = load i32, i32* %4
%16 = icmp eq i32 %15, 1
br i1 %16, label %17, label %24
17: ; preds = %9
%18 = load i32, i32* %4
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds [5 x i32], [5 x i32]* %2, i64 0, i64 %19
%21 = load i32, i32* %20
%22 = load i32, i32* %3
%23 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %21, i32 %22)
br label %31
24: ; preds = %9
%25 = load i32, i32* %4
%26 = sext i32 %25 to i64
%27 = getelementptr inbounds [5 x i32], [5 x i32]* %2, i64 0, i64 %26
%28 = load i32, i32* %27
%29 = load i32, i32* %3
%30 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 %28, i32 %29)
br label %31
31: ; preds = %24, %17
br label %32
32: ; preds = %31
%33 = load i32, i32* %4
%34 = add nsw i32 %33, 1
store i32 %34, i32* %4
br label %6
35: ; preds = %6
ret i32 0
}

LLVM IR (-O2):
@.str = [20 x i8] c"%6.3d % 7.3d\0A\00"
@.str.1 = [19 x i8] c"%6.3d % 7.3d\0A\00"
define i32 @main() {
%1 = tail call i32 @ReverseNumbers(i32 5170984)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 5170984, i32 %1)
%3 = tail call i32 @ReverseNumbers(i32 406567)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 406567, i32 %3)
%5 = tail call i32 @ReverseNumbers(i32 368750)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 368750, i32 %5)
%7 = tail call i32 @ReverseNumbers(i32 2369510)
%8 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 2369510, i32 %7)
%9 = tail call i32 @ReverseNumbers(i32 2183293)
%10 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 2183293, i32 %9)
ret i32 0
}