#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);
int main() {
  int i = 0;
  int a = 1;
  for (i = 0; i < 15; i++) {
    a *= 10;
    printf("%2d %d\n", i, a);
  }
  for (i = 0, a = 1; i < 35; i++) {
    a *= 2;
    printf("%2d %d\n", i, a);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0xf,-0x8(%rbp)
jge    1165 <main+0x55>
imul   $0xa,-0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xeae(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1134 <main+0x24>
movl   $0x0,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
cmpl   $0x23,-0x8(%rbp)
jge    11a6 <main+0x96>
mov    -0xc(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xe6d(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1173 <main+0x63>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
lea    0xee5(%rip),%r14
xor    %ebp,%ebp
mov    %r14,%rdi
xor    %esi,%esi
mov    $0xa,%edx
call   1030 <printf@plt>
mov    $0x1,%ebx
mov    %r14,%rdi
mov    $0x1,%esi
mov    $0x64,%edx
call   1030 <printf@plt>
mov    %r14,%rdi
mov    $0x2,%esi
mov    $0x3e8,%edx
call   1030 <printf@plt>
mov    %r14,%rdi
mov    $0x3,%esi
mov    $0x2710,%edx
call   1030 <printf@plt>
mov    %r14,%rdi
mov    $0x4,%esi
mov    $0x186a0,%edx
call   1030 <printf@plt>
mov    %r14,%rdi
mov    $0x5,%esi
mov    $0xf4240,%edx
call   1030 <printf@plt>
mov    %r14,%rdi
mov    $0x6,%esi
mov    $0x989680,%edx
call   1030 <printf@plt>
mov    %r14,%rdi
mov    $0x7,%esi
mov    $0x5f5e100,%edx
call   1030 <printf@plt>
mov    %r14,%rdi
mov    $0x8,%esi
mov    $0x3b9aca00,%edx
call   1030 <printf@plt>
mov    %r14,%rdi
mov    $0x9,%esi
mov    $0x540be400,%edx
call   1030 <printf@plt>
mov    %r14,%rdi
mov    $0xa,%esi
mov    $0x4876e800,%edx
call   1030 <printf@plt>
mov    %r14,%rdi
mov    $0xb,%esi
mov    $0xd4a51000,%edx
call   1030 <printf@plt>
mov    %r14,%rdi
mov    $0xc,%esi
mov    $0x4e72a000,%edx
call   1030 <printf@plt>
mov    %r14,%rdi
mov    $0xd,%esi
mov    $0x107a4000,%edx
call   1030 <printf@plt>
mov    %r14,%rdi
mov    $0xe,%esi
mov    $0xa4c68000,%edx
call   1030 <printf@plt>
nopl   (%rax)
add    %ebx,%ebx
mov    %r14,%rdi
mov    %ebp,%esi
mov    %ebx,%edx
call   1030 <printf@plt>
add    $0x1,%ebp
cmp    $0x23,%ebp
jne    1230 <main+0x120>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [8 x i8] c"%2d %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
store i32 1, i32* %3
store i32 0, i32* %2
br label %4
4: ; preds = %13, %0
%5 = load i32, i32* %2
%6 = icmp slt i32 %5, 15
br i1 %6, label %7, label %16
7: ; preds = %4
%8 = load i32, i32* %3
%9 = mul nsw i32 %8, 10
store i32 %9, i32* %3
%10 = load i32, i32* %2
%11 = load i32, i32* %3
%12 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %10, i32 %11)
br label %13
13: ; preds = %7
%14 = load i32, i32* %2
%15 = add nsw i32 %14, 1
store i32 %15, i32* %2
br label %4
16: ; preds = %4
store i32 0, i32* %2
store i32 1, i32* %3
br label %17
17: ; preds = %26, %16
%18 = load i32, i32* %2
%19 = icmp slt i32 %18, 35
br i1 %19, label %20, label %29
20: ; preds = %17
%21 = load i32, i32* %3
%22 = mul nsw i32 %21, 2
store i32 %22, i32* %3
%23 = load i32, i32* %2
%24 = load i32, i32* %3
%25 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %23, i32 %24)
br label %26
26: ; preds = %20
%27 = load i32, i32* %2
%28 = add nsw i32 %27, 1
store i32 %28, i32* %2
br label %17
29: ; preds = %17
ret i32 0
}

LLVM IR (-O2):
@.str = [8 x i8] c"%2d %d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 0, i32 10)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 1, i32 100)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 2, i32 1000)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 3, i32 10000)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 4, i32 100000)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 5, i32 1000000)
%7 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 6, i32 10000000)
%8 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 7, i32 100000000)
%9 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 8, i32 1000000000)
%10 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 9, i32 1410065408)
%11 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 10, i32 1215752192)
%12 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 11, i32 -727379968)
%13 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 12, i32 1316134912)
%14 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 13, i32 276447232)
%15 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 14, i32 -1530494976)
br label %16
16: ; preds = %0, %16
%17 = phi i32 [ %19, %16 ], [ 1, %0 ]
%18 = phi i32 [ %21, %16 ], [ 0, %0 ]
%19 = shl nsw i32 %17, 1
%20 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %18, i32 %19)
%21 = add nuw nsw i32 %18, 1
%22 = icmp eq i32 %21, 35
br i1 %22, label %23, label %16
23: ; preds = %16
ret i32 0
}