#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 argc) {
  int I, J;
  const int N = 30;
  const int M = 40;
  for (J = argc; J < N; J += 3) {
    for (I = J; I < M; I++) {
      printf("%d %d\n", I, J);
    }
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
movl   $0x1e,-0x14(%rbp)
movl   $0x28,-0x18(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x1e,-0x10(%rbp)
jge    1183 <main+0x73>
mov    -0x10(%rbp),%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x28,-0xc(%rbp)
jge    1170 <main+0x60>
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
lea    0xea3(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1146 <main+0x36>
jmp    1175 <main+0x65>
mov    -0x10(%rbp),%eax
add    $0x3,%eax
mov    %eax,-0x10(%rbp)
jmp    1136 <main+0x26>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
cmp    $0x1d,%edi
jg     1164 <main+0x54>
mov    %edi,%r15d
lea    0xedc(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %r15d,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %r14,%rdi
mov    %ebx,%esi
mov    %r15d,%edx
call   1030 <printf@plt>
lea    0x1(%rbx),%eax
cmp    $0x27,%ebx
mov    %eax,%ebx
jl     1140 <main+0x30>
lea    0x3(%r15),%eax
cmp    $0x1b,%r15d
mov    %eax,%r15d
jl     1130 <main+0x20>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

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

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