#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 *, char);
int /*<<< orphan*/ puts(char *);
int main(void) {
  int data = 168;
  char num[10];
  int i = 0;
  while (1) {
    num[i++] = data % 10 + '0';
    data /= 10;
    if (data == 0)
      break;
  }
  for (i -= 1; i >= 0; --i) {
    printf("%c", num[i]);
  }
  puts("");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xa8,-0x8(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
add    $0x30,%edx
mov    %dl,%cl
mov    -0x18(%rbp),%eax
mov    %eax,%edx
add    $0x1,%edx
mov    %edx,-0x18(%rbp)
cltq
mov    %cl,-0x12(%rbp,%rax,1)
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    117b <main+0x5b>
jmp    1180 <main+0x60>
jmp    113d <main+0x1d>
mov    -0x18(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x18(%rbp)
cmpl   $0x0,-0x18(%rbp)
jl     11b6 <main+0x96>
movslq -0x18(%rbp),%rax
lea    0xe62(%rip),%rdi
movsbl -0x12(%rbp,%rax,1),%esi
call   1040 <printf@plt>
mov    -0x18(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x18(%rbp)
jmp    1189 <main+0x69>
lea    0xe45(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xed8(%rip),%rbx
mov    %rbx,%rdi
mov    $0x31,%esi
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x36,%esi
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x38,%esi
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%c\00"
@.str.1 = [1 x i8] zeroinitializer
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [10 x i8]
%4 = alloca i32
store i32 0, i32* %1
store i32 168, i32* %2
store i32 0, i32* %4
br label %5
5: ; preds = %0, %19
%6 = load i32, i32* %2
%7 = srem i32 %6, 10
%8 = add nsw i32 %7, 48
%9 = trunc i32 %8 to i8
%10 = load i32, i32* %4
%11 = add nsw i32 %10, 1
store i32 %11, i32* %4
%12 = sext i32 %10 to i64
%13 = getelementptr inbounds [10 x i8], [10 x i8]* %3, i64 0, i64 %12
store i8 %9, i8* %13
%14 = load i32, i32* %2
%15 = sdiv i32 %14, 10
store i32 %15, i32* %2
%16 = load i32, i32* %2
%17 = icmp eq i32 %16, 0
br i1 %17, label %18, label %19
18: ; preds = %5
br label %20
19: ; preds = %5
br label %5
20: ; preds = %18
%21 = load i32, i32* %4
%22 = sub nsw i32 %21, 1
store i32 %22, i32* %4
br label %23
23: ; preds = %32, %20
%24 = load i32, i32* %4
%25 = icmp sge i32 %24, 0
br i1 %25, label %26, label %35
26: ; preds = %23
%27 = load i32, i32* %4
%28 = sext i32 %27 to i64
%29 = getelementptr inbounds [10 x i8], [10 x i8]* %3, i64 0, i64 %28
%30 = load i8, i8* %29
%31 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext %30)
br label %32
32: ; preds = %26
%33 = load i32, i32* %4
%34 = add nsw i32 %33, -1
store i32 %34, i32* %4
br label %23
35: ; preds = %23
%36 = call i32 @puts(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%c\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext 49)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext 54)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext 56)
%4 = tail call i32 @putchar(i32 10)
ret i32 0
}