#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);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int i, j, k, n;
  scanf("%d", &n);
  for (i = 1; i <= n; i++) {
    printf("%d %d %d\n", i, i * i, i * i * i);
    printf("%d %d %d\n", i, i * i + 1, i * i * i + 1);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x14(%rbp),%rsi
call   1040 <scanf@plt>
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x14(%rbp),%eax
jg     11a8 <main+0x88>
mov    -0x8(%rbp),%esi
mov    -0x8(%rbp),%edx
imul   -0x8(%rbp),%edx
mov    -0x8(%rbp),%ecx
imul   -0x8(%rbp),%ecx
imul   -0x8(%rbp),%ecx
lea    0xe95(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%esi
mov    -0x8(%rbp),%edx
imul   -0x8(%rbp),%edx
add    $0x1,%edx
mov    -0x8(%rbp),%ecx
imul   -0x8(%rbp),%ecx
imul   -0x8(%rbp),%ecx
add    $0x1,%ecx
lea    0xe6e(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1146 <main+0x26>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
lea    0xed2(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
cmpl   $0x0,0x4(%rsp)
jle    118a <main+0x6a>
xor    %ebx,%ebx
lea    0xebb(%rip),%r14
nopl   0x0(%rax,%rax,1)
add    $0x1,%ebx
mov    %ebx,%ebp
imul   %ebx,%ebp
mov    %ebp,%r15d
imul   %ebx,%r15d
mov    %r14,%rdi
mov    %ebx,%esi
mov    %ebp,%edx
mov    %r15d,%ecx
call   1030 <printf@plt>
add    $0x1,%ebp
add    $0x1,%r15d
mov    %r14,%rdi
mov    %ebx,%esi
mov    %ebp,%edx
mov    %r15d,%ecx
call   1030 <printf@plt>
cmp    0x4(%rsp),%ebx
jl     1150 <main+0x30>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

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