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


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x10(%rbp)
lea    0xec3(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1040 <scanf@plt>
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    11c6 <main+0xa6>
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     11b3 <main+0x93>
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jne    118b <main+0x6b>
mov    -0x10(%rbp),%esi
lea    0xe85(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    119c <main+0x7c>
mov    -0x10(%rbp),%esi
lea    0xe72(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    115d <main+0x3d>
lea    0xe51(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    114a <main+0x2a>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
lea    0xec1(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1050 <scanf@plt>
cmpl   $0x2,(%rsp)
jl     11b2 <main+0x82>
mov    $0x1,%r12d
lea    0xea5(%rip),%r14
lea    0xea1(%rip),%r15
jmp    1183 <main+0x53>
nopl   0x0(%rax,%rax,1)
add    %ebx,%r12d
mov    $0xa,%edi
call   1030 <putchar@plt>
cmp    (%rsp),%r12d
jge    11b2 <main+0x82>
mov    0x4(%rsp),%eax
test   %eax,%eax
jle    1173 <main+0x43>
xor    %ebx,%ebx
jmp    119f <main+0x6f>
nop
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x4(%rsp),%eax
cmp    %eax,%ebx
jge    1170 <main+0x40>
lea    (%r12,%rbx,1),%esi
add    $0x1,%ebx
mov    %r14,%rdi
cmp    %eax,%ebx
je     1190 <main+0x60>
mov    %r15,%rdi
jmp    1190 <main+0x60>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

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