#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 */
typedef int /*<<< orphan*/ output;
typedef int /*<<< orphan*/ input;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int main(void) {
  char input[] = "5491670349000161";
  size_t inputSize = sizeof(input);
  char output[inputSize];
  int i;
  for (i = 1; i <= inputSize; i++) {
    output[i] = input[inputSize - i];
  }
  size_t outputSize = sizeof(output);
  for (i = 1; i <= outputSize; i++) {
    printf("%c", output[i]);
  }
  printf("\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
movaps 0xeda(%rip),%xmm0
movaps %xmm0,-0x20(%rbp)
movb   $0x0,-0x10(%rbp)
movq   $0x11,-0x28(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,-0x58(%rbp)
mov    %rsp,%rcx
mov    %rcx,-0x30(%rbp)
mov    %rax,%rdx
add    $0xf,%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x50(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x38(%rbp)
movl   $0x1,-0x3c(%rbp)
movslq -0x3c(%rbp),%rax
cmp    -0x28(%rbp),%rax
ja     119e <main+0x8e>
mov    -0x50(%rbp),%rax
mov    -0x28(%rbp),%rcx
movslq -0x3c(%rbp),%rdx
sub    %rdx,%rcx
mov    -0x20(%rbp,%rcx,1),%dl
movslq -0x3c(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    1168 <main+0x58>
mov    -0x58(%rbp),%rax
mov    %rax,-0x48(%rbp)
movl   $0x1,-0x3c(%rbp)
movslq -0x3c(%rbp),%rax
cmp    -0x48(%rbp),%rax
ja     11e3 <main+0xd3>
mov    -0x50(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsbl (%rax,%rcx,1),%esi
lea    0xe43(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    11ad <main+0x9d>
lea    0xe2a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x30(%rbp),%rax
mov    %rax,%rsp
mov    -0x4(%rbp),%eax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
call   1030 <putchar@plt>
mov    $0x31,%edi
call   1030 <putchar@plt>
mov    $0x36,%edi
call   1030 <putchar@plt>
mov    $0x31,%edi
call   1030 <putchar@plt>
mov    $0x30,%edi
call   1030 <putchar@plt>
mov    $0x30,%edi
call   1030 <putchar@plt>
mov    $0x30,%edi
call   1030 <putchar@plt>
mov    $0x39,%edi
call   1030 <putchar@plt>
mov    $0x34,%edi
call   1030 <putchar@plt>
mov    $0x33,%edi
call   1030 <putchar@plt>
mov    $0x30,%edi
call   1030 <putchar@plt>
mov    $0x37,%edi
call   1030 <putchar@plt>
mov    $0x36,%edi
call   1030 <putchar@plt>
mov    $0x31,%edi
call   1030 <putchar@plt>
mov    $0x39,%edi
call   1030 <putchar@plt>
mov    $0x34,%edi
call   1030 <putchar@plt>
call   1030 <putchar@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @putchar(i32 0)
%2 = tail call i32 @putchar(i32 49)
%3 = tail call i32 @putchar(i32 54)
%4 = tail call i32 @putchar(i32 49)
%5 = tail call i32 @putchar(i32 48)
%6 = tail call i32 @putchar(i32 48)
%7 = tail call i32 @putchar(i32 48)
%8 = tail call i32 @putchar(i32 57)
%9 = tail call i32 @putchar(i32 52)
%10 = tail call i32 @putchar(i32 51)
%11 = tail call i32 @putchar(i32 48)
%12 = tail call i32 @putchar(i32 55)
%13 = tail call i32 @putchar(i32 54)
%14 = tail call i32 @putchar(i32 49)
%15 = tail call i32 @putchar(i32 57)
%16 = tail call i32 @putchar(i32 52)
%17 = tail call i32 @putchar(i32 poison)
%18 = tail call i32 @putchar(i32 10)
ret i32 0
}