#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(void) {
  int height, width, i, j;
  while (1) {
    scanf("%d %d", &height, &width);
    if (height == 0 && width == 0)
      break;
    for (i = 0; i < height; i++) {
      for (j = 0; j < width; j++)
        printf("#");
      printf("\n");
    }
    printf("\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1040 <scanf@plt>
cmpl   $0x0,-0x8(%rbp)
jne    115c <main+0x3c>
cmpl   $0x0,-0xc(%rbp)
jne    115c <main+0x3c>
jmp    11c7 <main+0xa7>
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    11b6 <main+0x96>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    119c <main+0x7c>
lea    0xe7d(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1176 <main+0x56>
lea    0xe65(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1163 <main+0x43>
lea    0xe4b(%rip),%rdi
call   1030 <printf@plt>
jmp    112f <main+0xf>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x10,%rsp
lea    0xecd(%rip),%rdi
lea    0xc(%rsp),%rsi
lea    0x8(%rsp),%rdx
call   1040 <scanf@plt>
mov    0xc(%rsp),%ecx
mov    0x8(%rsp),%eax
mov    %ecx,%edx
or     %eax,%edx
jne    115f <main+0x3f>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xe9a(%rip),%r14
lea    0xc(%rsp),%r15
lea    0x8(%rsp),%r12
jmp    11a6 <main+0x86>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %r14,%rdi
mov    %r15,%rsi
mov    %r12,%rdx
call   1040 <scanf@plt>
mov    0xc(%rsp),%ecx
mov    0x8(%rsp),%eax
mov    %ecx,%edx
or     %eax,%edx
je     1150 <main+0x30>
test   %ecx,%ecx
jle    1180 <main+0x60>
xor    %ebp,%ebp
test   %eax,%eax
jle    11d3 <main+0xb3>
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    $0x23,%edi
call   1030 <putchar@plt>
add    $0x1,%ebx
cmp    0x8(%rsp),%ebx
jl     11c0 <main+0xa0>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x1,%ebp
cmp    0xc(%rsp),%ebp
jge    1180 <main+0x60>
mov    0x8(%rsp),%eax
test   %eax,%eax
jg     11b0 <main+0x90>
jmp    11d3 <main+0xb3>

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

LLVM IR (-O2):
@.str = [6 x i8] c"%d %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 ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2)
%6 = load i32, i32* %1
%7 = icmp eq i32 %6, 0
%8 = load i32, i32* %2
%9 = icmp eq i32 %8, 0
%10 = select i1 %7, i1 %9, i1 false
br i1 %10, label %40, label %11
11: ; preds = %0, %32
%12 = phi i32 [ %37, %32 ], [ %8, %0 ]
%13 = phi i32 [ %35, %32 ], [ %6, %0 ]
%14 = icmp sgt i32 %13, 0
br i1 %14, label %15, label %32
15: ; preds = %11, %30
%16 = phi i32 [ %31, %30 ], [ %12, %11 ]
%17 = phi i32 [ %27, %30 ], [ 0, %11 ]
%18 = icmp sgt i32 %16, 0
br i1 %18, label %19, label %25
19: ; preds = %15, %19
%20 = phi i32 [ %22, %19 ], [ 0, %15 ]
%21 = call i32 @putchar(i32 35)
%22 = add nuw nsw i32 %20, 1
%23 = load i32, i32* %2
%24 = icmp slt i32 %22, %23
br i1 %24, label %19, label %25
25: ; preds = %19, %15
%26 = call i32 @putchar(i32 10)
%27 = add nuw nsw i32 %17, 1
%28 = load i32, i32* %1
%29 = icmp slt i32 %27, %28
br i1 %29, label %30, label %32
30: ; preds = %25
%31 = load i32, i32* %2
br label %15
32: ; preds = %25, %11
%33 = call i32 @putchar(i32 10)
%34 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2)
%35 = load i32, i32* %1
%36 = icmp eq i32 %35, 0
%37 = load i32, i32* %2
%38 = icmp eq i32 %37, 0
%39 = select i1 %36, i1 %38, i1 false
br i1 %39, label %40, label %11
40: ; preds = %32, %0
ret i32 0
}