#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 = 1, J = 7, i, j;
  for (i = 1; i <= 3; i++) {
    printf("I=%d J=%d\n", I, J);
    J--;
  }
  for (i = 1; i <= 3; i++) {
    printf("I=%d J=%d\n", I + 2, J + 5);
    J--;
  }
  for (i = 1; i <= 3; i++) {
    printf("I=%d J=%d\n", I + 4, J + 10);
    J--;
  }
  for (i = 1; i <= 3; i++) {
    printf("I=%d J=%d\n", I + 6, J + 15);
    J--;
  }
  for (i = 1; i <= 3; i++) {
    printf("I=%d J=%d\n", I + 8, J + 20);
    J--;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0x7,-0xc(%rbp)
movl   $0x1,-0x10(%rbp)
cmpl   $0x3,-0x10(%rbp)
jg     1167 <main+0x57>
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xeb5(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1134 <main+0x24>
movl   $0x1,-0x10(%rbp)
cmpl   $0x3,-0x10(%rbp)
jg     11a7 <main+0x97>
mov    -0x8(%rbp),%esi
add    $0x2,%esi
mov    -0xc(%rbp),%edx
add    $0x5,%edx
lea    0xe75(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    116e <main+0x5e>
movl   $0x1,-0x10(%rbp)
cmpl   $0x3,-0x10(%rbp)
jg     11e7 <main+0xd7>
mov    -0x8(%rbp),%esi
add    $0x4,%esi
mov    -0xc(%rbp),%edx
add    $0xa,%edx
lea    0xe35(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    11ae <main+0x9e>
movl   $0x1,-0x10(%rbp)
cmpl   $0x3,-0x10(%rbp)
jg     1227 <main+0x117>
mov    -0x8(%rbp),%esi
add    $0x6,%esi
mov    -0xc(%rbp),%edx
add    $0xf,%edx
lea    0xdf5(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    11ee <main+0xde>
movl   $0x1,-0x10(%rbp)
cmpl   $0x3,-0x10(%rbp)
jg     1267 <main+0x157>
mov    -0x8(%rbp),%esi
add    $0x8,%esi
mov    -0xc(%rbp),%edx
add    $0x14,%edx
lea    0xdb5(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    122e <main+0x11e>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xee8(%rip),%rbx
mov    %rbx,%rdi
mov    $0x1,%esi
mov    $0x7,%edx
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
mov    $0x6,%edx
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
mov    $0x5,%edx
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x3,%esi
mov    $0x9,%edx
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x3,%esi
mov    $0x8,%edx
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x3,%esi
mov    $0x7,%edx
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x5,%esi
mov    $0xb,%edx
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x5,%esi
mov    $0xa,%edx
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x5,%esi
mov    $0x9,%edx
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x7,%esi
mov    $0xd,%edx
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x7,%esi
mov    $0xc,%edx
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x7,%esi
mov    $0xb,%edx
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x9,%esi
mov    $0xf,%edx
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x9,%esi
mov    $0xe,%edx
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x9,%esi
mov    $0xd,%edx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [11 x i8] c"I=%d J=%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
store i32 1, i32* %2
store i32 7, i32* %3
store i32 1, i32* %4
br label %6
6: ; preds = %15, %0
%7 = load i32, i32* %4
%8 = icmp sle i32 %7, 3
br i1 %8, label %9, label %18
9: ; preds = %6
%10 = load i32, i32* %2
%11 = load i32, i32* %3
%12 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %10, i32 %11)
%13 = load i32, i32* %3
%14 = add nsw i32 %13, -1
store i32 %14, i32* %3
br label %15
15: ; preds = %9
%16 = load i32, i32* %4
%17 = add nsw i32 %16, 1
store i32 %17, i32* %4
br label %6
18: ; preds = %6
store i32 1, i32* %4
br label %19
19: ; preds = %30, %18
%20 = load i32, i32* %4
%21 = icmp sle i32 %20, 3
br i1 %21, label %22, label %33
22: ; preds = %19
%23 = load i32, i32* %2
%24 = add nsw i32 %23, 2
%25 = load i32, i32* %3
%26 = add nsw i32 %25, 5
%27 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %24, i32 %26)
%28 = load i32, i32* %3
%29 = add nsw i32 %28, -1
store i32 %29, i32* %3
br label %30
30: ; preds = %22
%31 = load i32, i32* %4
%32 = add nsw i32 %31, 1
store i32 %32, i32* %4
br label %19
33: ; preds = %19
store i32 1, i32* %4
br label %34
34: ; preds = %45, %33
%35 = load i32, i32* %4
%36 = icmp sle i32 %35, 3
br i1 %36, label %37, label %48
37: ; preds = %34
%38 = load i32, i32* %2
%39 = add nsw i32 %38, 4
%40 = load i32, i32* %3
%41 = add nsw i32 %40, 10
%42 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %39, i32 %41)
%43 = load i32, i32* %3
%44 = add nsw i32 %43, -1
store i32 %44, i32* %3
br label %45
45: ; preds = %37
%46 = load i32, i32* %4
%47 = add nsw i32 %46, 1
store i32 %47, i32* %4
br label %34
48: ; preds = %34
store i32 1, i32* %4
br label %49
49: ; preds = %60, %48
%50 = load i32, i32* %4
%51 = icmp sle i32 %50, 3
br i1 %51, label %52, label %63
52: ; preds = %49
%53 = load i32, i32* %2
%54 = add nsw i32 %53, 6
%55 = load i32, i32* %3
%56 = add nsw i32 %55, 15
%57 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %54, i32 %56)
%58 = load i32, i32* %3
%59 = add nsw i32 %58, -1
store i32 %59, i32* %3
br label %60
60: ; preds = %52
%61 = load i32, i32* %4
%62 = add nsw i32 %61, 1
store i32 %62, i32* %4
br label %49
63: ; preds = %49
store i32 1, i32* %4
br label %64
64: ; preds = %75, %63
%65 = load i32, i32* %4
%66 = icmp sle i32 %65, 3
br i1 %66, label %67, label %78
67: ; preds = %64
%68 = load i32, i32* %2
%69 = add nsw i32 %68, 8
%70 = load i32, i32* %3
%71 = add nsw i32 %70, 20
%72 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %69, i32 %71)
%73 = load i32, i32* %3
%74 = add nsw i32 %73, -1
store i32 %74, i32* %3
br label %75
75: ; preds = %67
%76 = load i32, i32* %4
%77 = add nsw i32 %76, 1
store i32 %77, i32* %4
br label %64
78: ; preds = %64
ret i32 0
}

LLVM IR (-O2):
@.str = [11 x i8] c"I=%d J=%d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 1, i32 7)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 1, i32 6)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 1, i32 5)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 3, i32 9)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 3, i32 8)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 3, i32 7)
%7 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 5, i32 11)
%8 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 5, i32 10)
%9 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 5, i32 9)
%10 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 7, i32 13)
%11 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 7, i32 12)
%12 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 7, i32 11)
%13 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 9, i32 15)
%14 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 9, i32 14)
%15 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 9, i32 13)
ret i32 0
}