#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 /*<<< orphan*/ stampaRiga(char, char, int);
int main(void) {
  int h, l, i;
  scanf("%d", &h);
  scanf("%d", &l);
  stampaRiga('*', '*', l);
  printf("\n");
  for (i = 0; i < h - 2; i++) {
    stampaRiga('*', ' ', l);
    printf("\n");
  }
  if (h != 1)
    stampaRiga('*', '*', l);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
lea    0xeaa(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0xc(%rbp),%edx
mov    $0x2a,%esi
mov    %esi,%edi
call   1040 <stampaRiga@plt>
lea    0xe8e(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    -0x8(%rbp),%ecx
sub    $0x2,%ecx
cmp    %ecx,%eax
jge    11be <main+0x8e>
mov    -0xc(%rbp),%edx
mov    $0x2a,%edi
mov    $0x20,%esi
call   1040 <stampaRiga@plt>
lea    0xe58(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1181 <main+0x51>
cmpl   $0x1,-0x8(%rbp)
je     11d7 <main+0xa7>
mov    -0xc(%rbp),%edx
mov    $0x2a,%esi
mov    %esi,%edi
call   1040 <stampaRiga@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xec4(%rip),%rbx
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
mov    0x8(%rsp),%edx
mov    $0x2a,%edi
mov    $0x2a,%esi
call   1040 <stampaRiga@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0xc(%rsp),%eax
cmp    $0x3,%eax
jl     11ab <main+0x7b>
xor    %ebx,%ebx
xchg   %ax,%ax
mov    0x8(%rsp),%edx
mov    $0x2a,%edi
mov    $0x20,%esi
call   1040 <stampaRiga@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x1,%ebx
mov    0xc(%rsp),%eax
lea    -0x2(%rax),%ecx
cmp    %ecx,%ebx
jl     1180 <main+0x50>
cmp    $0x1,%eax
je     11c3 <main+0x93>
mov    0x8(%rsp),%edx
mov    $0x2a,%edi
mov    $0x2a,%esi
call   1040 <stampaRiga@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [2 x i8] c"\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%7 = load i32, i32* %3
%8 = call i32 @stampaRiga(i8 signext 42, i8 signext 42, i32 %7)
%9 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32 0, i32* %4
br label %10
10: ; preds = %19, %0
%11 = load i32, i32* %4
%12 = load i32, i32* %2
%13 = sub nsw i32 %12, 2
%14 = icmp slt i32 %11, %13
br i1 %14, label %15, label %22
15: ; preds = %10
%16 = load i32, i32* %3
%17 = call i32 @stampaRiga(i8 signext 42, i8 signext 32, i32 %16)
%18 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %19
19: ; preds = %15
%20 = load i32, i32* %4
%21 = add nsw i32 %20, 1
store i32 %21, i32* %4
br label %10
22: ; preds = %10
%23 = load i32, i32* %2
%24 = icmp ne i32 %23, 1
br i1 %24, label %25, label %28
25: ; preds = %22
%26 = load i32, i32* %3
%27 = call i32 @stampaRiga(i8 signext 42, i8 signext 42, i32 %26)
br label %28
28: ; preds = %25, %22
%29 = load i32, i32* %1
ret i32 %29
}

LLVM IR (-O2):
@.str = [3 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 ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%7 = load i32, i32* %2
%8 = call i32 @stampaRiga(i8 signext 42, i8 signext 42, i32 %7)
%9 = call i32 @putchar(i32 10)
%10 = load i32, i32* %1
%11 = icmp sgt i32 %10, 2
br i1 %11, label %12, label %21
12: ; preds = %0, %12
%13 = phi i32 [ %17, %12 ], [ 0, %0 ]
%14 = load i32, i32* %2
%15 = call i32 @stampaRiga(i8 signext 42, i8 signext 32, i32 %14)
%16 = call i32 @putchar(i32 10)
%17 = add nuw nsw i32 %13, 1
%18 = load i32, i32* %1
%19 = add nsw i32 %18, -2
%20 = icmp slt i32 %17, %19
br i1 %20, label %12, label %21
21: ; preds = %12, %0
%22 = phi i32 [ %10, %0 ], [ %18, %12 ]
%23 = icmp eq i32 %22, 1
br i1 %23, label %27, label %24
24: ; preds = %21
%25 = load i32, i32* %2
%26 = call i32 @stampaRiga(i8 signext 42, i8 signext 42, i32 %25)
br label %27
27: ; preds = %24, %21
ret i32 0
}