#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 rand();
int /*<<< orphan*/ srand(int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int main() {
  int X;
  int Y;
  int n;
  int i;
  int maxPieceArea;
  int minSide = 30;
  srand(time(NULL));
  X = 1000 + rand() % 1;
  Y = 15000 + rand() % 1;
  n = 700 + rand() % 101;
  maxPieceArea = X * Y / n;
  printf("%d", n);
  printf("\r\n");
  printf("%d", X);
  printf(" ");
  printf("%d", Y);
  printf("\r\n");
  for (i = 0; i < n; i++) {
    int a = minSide + rand() % (X - minSide + 1);
    int b = minSide + rand() % (Y - minSide + 1);
    while (a * b > maxPieceArea) {
      a = minSide + rand() % (X - minSide + 1);
      b = minSide + rand() % (Y - minSide + 1);
    }
    printf("%d", a);
    printf(" ");
    printf("%d", b);
    printf("\r\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1e,-0x1c(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1050 <time@plt>
mov    %eax,%edi
call   1040 <srand@plt>
mov    $0x0,%al
call   1060 <rand@plt>
mov    $0x1,%ecx
cltd
idiv   %ecx
add    $0x3e8,%edx
mov    %edx,-0x8(%rbp)
mov    $0x0,%al
call   1060 <rand@plt>
mov    $0x1,%ecx
cltd
idiv   %ecx
add    $0x3a98,%edx
mov    %edx,-0xc(%rbp)
mov    $0x0,%al
call   1060 <rand@plt>
mov    $0x65,%ecx
cltd
idiv   %ecx
add    $0x2bc,%edx
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%eax
imul   -0xc(%rbp),%eax
cltd
idivl  -0x10(%rbp)
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%esi
lea    0xe3a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe2f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%esi
lea    0xe1b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe13(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%esi
lea    0xdfc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xdf1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1311 <main+0x1d1>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x2c(%rbp)
mov    $0x0,%al
call   1060 <rand@plt>
mov    -0x8(%rbp),%ecx
sub    -0x1c(%rbp),%ecx
add    $0x1,%ecx
cltd
idiv   %ecx
mov    -0x2c(%rbp),%eax
add    %edx,%eax
mov    %eax,-0x20(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,-0x28(%rbp)
mov    $0x0,%al
call   1060 <rand@plt>
mov    -0xc(%rbp),%ecx
sub    -0x1c(%rbp),%ecx
add    $0x1,%ecx
cltd
idiv   %ecx
mov    -0x28(%rbp),%eax
add    %edx,%eax
mov    %eax,-0x24(%rbp)
mov    -0x20(%rbp),%eax
imul   -0x24(%rbp),%eax
cmp    -0x18(%rbp),%eax
jle    12c5 <main+0x185>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x34(%rbp)
mov    $0x0,%al
call   1060 <rand@plt>
mov    -0x8(%rbp),%ecx
sub    -0x1c(%rbp),%ecx
add    $0x1,%ecx
cltd
idiv   %ecx
mov    -0x34(%rbp),%eax
add    %edx,%eax
mov    %eax,-0x20(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,-0x30(%rbp)
mov    $0x0,%al
call   1060 <rand@plt>
mov    -0xc(%rbp),%ecx
sub    -0x1c(%rbp),%ecx
add    $0x1,%ecx
cltd
idiv   %ecx
mov    -0x30(%rbp),%eax
add    %edx,%eax
mov    %eax,-0x24(%rbp)
jmp    126e <main+0x12e>
mov    -0x20(%rbp),%esi
lea    0xd31(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xd29(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x24(%rbp),%esi
lea    0xd12(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xd07(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1220 <main+0xe0>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
xor    %edi,%edi
call   1070 <time@plt>
mov    %eax,%edi
call   1060 <srand@plt>
xor    %eax,%eax
call   1080 <rand@plt>
xor    %eax,%eax
call   1080 <rand@plt>
xor    %eax,%eax
call   1080 <rand@plt>
cltq
imul   $0x288df0cb,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x24,%rcx
add    %edx,%ecx
imul   $0x65,%ecx,%ecx
neg    %ecx
lea    (%rax,%rcx,1),%esi
add    $0x2bc,%esi
mov    $0xe4e1c0,%eax
xor    %edx,%edx
div    %esi
mov    %eax,%r15d
lea    0xe3b(%rip),%r12
mov    %r12,%rdi
mov    %esi,0x4(%rsp)
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xe29(%rip),%rbx
mov    %rbx,%rdi
call   1040 <puts@plt>
mov    %r12,%rdi
mov    $0x3e8,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    %r12,%rdi
mov    $0x3a98,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
call   1040 <puts@plt>
xor    %r14d,%r14d
jmp    125b <main+0xfb>
nopw   0x0(%rax,%rax,1)
mov    %r12,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    %r12,%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xdbc(%rip),%rdi
call   1040 <puts@plt>
add    $0x1,%r14d
cmp    0x4(%rsp),%r14d
je     130f <main+0x1af>
xor    %eax,%eax
call   1080 <rand@plt>
mov    %eax,%r13d
xor    %eax,%eax
call   1080 <rand@plt>
cltq
imul   $0x460a5cc9,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x20,%rcx
sar    $0xc,%ecx
add    %edx,%ecx
imul   $0x3a7b,%ecx,%ecx
neg    %ecx
lea    (%rax,%rcx,1),%ebx
add    $0x1e,%ebx
movslq %r13d,%rax
cs nopw 0x0(%rax,%rax,1)
imul   $0xffffffff86fc9297,%rax,%rcx
shr    $0x20,%rcx
add    %eax,%ecx
mov    %ecx,%edx
shr    $0x1f,%edx
sar    $0x9,%ecx
add    %edx,%ecx
imul   $0x3cb,%ecx,%ecx
neg    %ecx
lea    (%rax,%rcx,1),%esi
add    $0x1e,%esi
mov    %ebx,%eax
imul   %esi,%eax
cmp    %r15d,%eax
jle    1220 <main+0xc0>
xor    %eax,%eax
call   1080 <rand@plt>
mov    %eax,%ebp
xor    %eax,%eax
call   1080 <rand@plt>
cltq
imul   $0x460a5cc9,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x20,%rcx
sar    $0xc,%ecx
add    %edx,%ecx
imul   $0x3a7b,%ecx,%ecx
neg    %ecx
lea    (%rax,%rcx,1),%ebx
add    $0x1e,%ebx
movslq %ebp,%rax
jmp    12a0 <main+0x140>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [3 x i8] c"\0D\0A\00"
@.str.2 = [2 x i8] c" \00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i32 0, i32* %1
store i32 30, i32* %7
%10 = call i32 @time(i32* null)
%11 = call i32 @srand(i32 %10)
%12 = call i32 (...) @rand()
%13 = srem i32 %12, 1
%14 = add nsw i32 1000, %13
store i32 %14, i32* %2
%15 = call i32 (...) @rand()
%16 = srem i32 %15, 1
%17 = add nsw i32 15000, %16
store i32 %17, i32* %3
%18 = call i32 (...) @rand()
%19 = srem i32 %18, 101
%20 = add nsw i32 700, %19
store i32 %20, i32* %4
%21 = load i32, i32* %2
%22 = load i32, i32* %3
%23 = mul nsw i32 %21, %22
%24 = load i32, i32* %4
%25 = sdiv i32 %23, %24
store i32 %25, i32* %6
%26 = load i32, i32* %4
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %26)
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%29 = load i32, i32* %2
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %29)
%31 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%32 = load i32, i32* %3
%33 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %32)
%34 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
store i32 0, i32* %5
br label %35
35: ; preds = %86, %0
%36 = load i32, i32* %5
%37 = load i32, i32* %4
%38 = icmp slt i32 %36, %37
br i1 %38, label %39, label %89
39: ; preds = %35
%40 = load i32, i32* %7
%41 = call i32 (...) @rand()
%42 = load i32, i32* %2
%43 = load i32, i32* %7
%44 = sub nsw i32 %42, %43
%45 = add nsw i32 %44, 1
%46 = srem i32 %41, %45
%47 = add nsw i32 %40, %46
store i32 %47, i32* %8
%48 = load i32, i32* %7
%49 = call i32 (...) @rand()
%50 = load i32, i32* %3
%51 = load i32, i32* %7
%52 = sub nsw i32 %50, %51
%53 = add nsw i32 %52, 1
%54 = srem i32 %49, %53
%55 = add nsw i32 %48, %54
store i32 %55, i32* %9
br label %56
56: ; preds = %62, %39
%57 = load i32, i32* %8
%58 = load i32, i32* %9
%59 = mul nsw i32 %57, %58
%60 = load i32, i32* %6
%61 = icmp sgt i32 %59, %60
br i1 %61, label %62, label %79
62: ; preds = %56
%63 = load i32, i32* %7
%64 = call i32 (...) @rand()
%65 = load i32, i32* %2
%66 = load i32, i32* %7
%67 = sub nsw i32 %65, %66
%68 = add nsw i32 %67, 1
%69 = srem i32 %64, %68
%70 = add nsw i32 %63, %69
store i32 %70, i32* %8
%71 = load i32, i32* %7
%72 = call i32 (...) @rand()
%73 = load i32, i32* %3
%74 = load i32, i32* %7
%75 = sub nsw i32 %73, %74
%76 = add nsw i32 %75, 1
%77 = srem i32 %72, %76
%78 = add nsw i32 %71, %77
store i32 %78, i32* %9
br label %56
79: ; preds = %56
%80 = load i32, i32* %8
%81 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %80)
%82 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%83 = load i32, i32* %9
%84 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %83)
%85 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
br label %86
86: ; preds = %79
%87 = load i32, i32* %5
%88 = add nsw i32 %87, 1
store i32 %88, i32* %5
br label %35
89: ; preds = %35
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@str.4 = [2 x i8] c"\0D\00"
define i32 @main() {
%1 = tail call i32 @time(i32* null)
%2 = tail call i32 @srand(i32 %1)
%3 = tail call i32 (...) @rand()
%4 = tail call i32 (...) @rand()
%5 = tail call i32 (...) @rand()
%6 = srem i32 %5, 101
%7 = add nsw i32 %6, 700
%8 = udiv i32 15000000, %7
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %7)
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str.4, i64 0, i64 0))
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 1000)
%12 = tail call i32 @putchar(i32 32)
%13 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 15000)
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str.4, i64 0, i64 0))
br label %15
15: ; preds = %0, %34
%16 = phi i32 [ %41, %34 ], [ 0, %0 ]
%17 = tail call i32 (...) @rand()
%18 = tail call i32 (...) @rand()
%19 = srem i32 %18, 14971
%20 = add nsw i32 %19, 30
%21 = srem i32 %17, 971
%22 = add nsw i32 %21, 30
%23 = mul nsw i32 %20, %22
%24 = icmp sgt i32 %23, %8
br i1 %24, label %25, label %34
25: ; preds = %15, %25
%26 = tail call i32 (...) @rand()
%27 = tail call i32 (...) @rand()
%28 = srem i32 %27, 14971
%29 = add nsw i32 %28, 30
%30 = srem i32 %26, 971
%31 = add nsw i32 %30, 30
%32 = mul nsw i32 %29, %31
%33 = icmp sgt i32 %32, %8
br i1 %33, label %25, label %34
34: ; preds = %25, %15
%35 = phi i32 [ %20, %15 ], [ %29, %25 ]
%36 = phi i32 [ %22, %15 ], [ %31, %25 ]
%37 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %36)
%38 = tail call i32 @putchar(i32 32)
%39 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %35)
%40 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str.4, i64 0, i64 0))
%41 = add nuw nsw i32 %16, 1
%42 = icmp eq i32 %41, %7
br i1 %42, label %43, label %15
43: ; preds = %34
ret i32 0
}