#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 x, a;
  for (x = 0; x < 127; x++) {
    for (a = 0; a < 127; a++) {
      printf("%3d%c\t", x, a);
      x++;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x7f,-0x8(%rbp)
jge    117d <main+0x6d>
movl   $0x0,-0xc(%rbp)
cmpl   $0x7f,-0xc(%rbp)
jge    116a <main+0x5a>
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xeb2(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1137 <main+0x27>
jmp    116f <main+0x5f>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
xor    %ebp,%ebp
lea    0xee3(%rip),%r14
xor    %eax,%eax
nop
mov    %eax,%ebx
mov    %r14,%rdi
mov    %eax,%esi
mov    %ebp,%edx
call   1030 <printf@plt>
lea    0x1(%rbx),%eax
add    $0x1,%ebp
cmp    $0x7f,%ebp
jne    1120 <main+0x10>
lea    0x2(%rbx),%eax
mov    $0x0,%ebp
cmp    $0x7d,%ebx
jl     1120 <main+0x10>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [7 x i8] c"%3d%c\09\00"
define i32 @main() {
br label %1
1: ; preds = %8, %0
%2 = phi i32 [ 0, %0 ], [ %9, %8 ]
%3 = phi i32 [ 0, %0 ], [ %10, %8 ]
%4 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %3, i32 %2)
%5 = add nsw i32 %3, 1
%6 = add nuw nsw i32 %2, 1
%7 = icmp eq i32 %6, 127
br i1 %7, label %11, label %8
8: ; preds = %1, %11
%9 = phi i32 [ %6, %1 ], [ 0, %11 ]
%10 = phi i32 [ %5, %1 ], [ %12, %11 ]
br label %1
11: ; preds = %1
%12 = add nsw i32 %3, 2
%13 = icmp slt i32 %3, 125
br i1 %13, label %8, label %14
14: ; preds = %11
ret i32 0
}