#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 main() {
  printf("100 100 10000 4\n");
  for (int i = 1; i < 101; i++) {
    for (int k = 1; k < 101; k++) {
      printf("%d %d\n", i, k);
    }
  }
  printf("1\n3\n5\n11\n0 0 0 0");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x1,-0x8(%rbp)
cmpl   $0x65,-0x8(%rbp)
jge    1184 <main+0x74>
movl   $0x1,-0xc(%rbp)
cmpl   $0x65,-0xc(%rbp)
jge    1171 <main+0x61>
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xeb5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1145 <main+0x35>
jmp    1176 <main+0x66>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1134 <main+0x24>
lea    0xe8d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
lea    0xeed(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%ebx
lea    0xec4(%rip),%r14
nopl   0x0(%rax)
mov    $0x1,%ebp
cs nopw 0x0(%rax,%rax,1)
nop
mov    %r14,%rdi
mov    %ebx,%esi
mov    %ebp,%edx
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%ebp
cmp    $0x65,%ebp
jne    1150 <main+0x30>
add    $0x1,%ebx
cmp    $0x65,%ebx
jne    1140 <main+0x20>
lea    0xe92(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
@.str.1 = [7 x i8] c"%d %d\0A\00"
@.str.2 = [17 x i8] c"1\0A3\0A5\0A11\0A0 0 0 0\00"
@str = [16 x i8] c"100 100 10000 4\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str, i64 0, i64 0))
br label %2
2: ; preds = %0, %6
%3 = phi i32 [ 1, %0 ], [ %7, %6 ]
br label %9
4: ; preds = %6
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
6: ; preds = %9
%7 = add nuw nsw i32 %3, 1
%8 = icmp eq i32 %7, 101
br i1 %8, label %4, label %2
9: ; preds = %2, %9
%10 = phi i32 [ 1, %2 ], [ %12, %9 ]
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 %3, i32 %10)
%12 = add nuw nsw i32 %10, 1
%13 = icmp eq i32 %12, 101
br i1 %13, label %6, label %9
}