#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 x;
  int y;
  int i;
  int j;
  printf("Enter two integers in the range 1-20: ");
  scanf("%d%d", &x, &y);
  for (i = 1; i <= y; i++) {
    for (j = 1; j <= x; j++) {
      printf("@");
    }
    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
call   1030 <printf@plt>
lea    0xee5(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1040 <scanf@plt>
movl   $0x1,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jg     11a9 <main+0x89>
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     118f <main+0x6f>
lea    0xeb0(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1169 <main+0x49>
lea    0xe98(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1156 <main+0x36>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
lea    0xec6(%rip),%rdi
call   1040 <printf@plt>
lea    0xee1(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1050 <scanf@plt>
cmpl   $0x0,(%rsp)
jle    1195 <main+0x65>
mov    $0x1,%ebx
jmp    1174 <main+0x44>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0x1(%rbx),%eax
cmp    (%rsp),%ebx
mov    %eax,%ebx
jge    1195 <main+0x65>
cmpl   $0x0,0x4(%rsp)
jle    1160 <main+0x30>
xor    %ebp,%ebp
nopl   (%rax)
mov    $0x40,%edi
call   1030 <putchar@plt>
add    $0x1,%ebp
cmp    0x4(%rsp),%ebp
jl     1180 <main+0x50>
jmp    1160 <main+0x30>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [39 x i8] c"Enter two integers in the range 1-20: \00"
@.str.1 = [5 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 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32* %1, i32* %2)
%7 = load i32, i32* %2
%8 = icmp slt i32 %7, 1
br i1 %8, label %24, label %9
9: ; preds = %0, %19
%10 = phi i32 [ %21, %19 ], [ 1, %0 ]
%11 = load i32, i32* %1
%12 = icmp slt i32 %11, 1
br i1 %12, label %19, label %13
13: ; preds = %9, %13
%14 = phi i32 [ %16, %13 ], [ 1, %9 ]
%15 = call i32 @putchar(i32 64)
%16 = add nuw nsw i32 %14, 1
%17 = load i32, i32* %1
%18 = icmp slt i32 %14, %17
br i1 %18, label %13, label %19
19: ; preds = %13, %9
%20 = call i32 @putchar(i32 10)
%21 = add nuw nsw i32 %10, 1
%22 = load i32, i32* %2
%23 = icmp slt i32 %10, %22
br i1 %23, label %9, label %24
24: ; preds = %19, %0
ret i32 0
}