#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*/ puts(char *);
int /*<<< orphan*/ scanf(char *, char *, int *, int *);
int main() {
  char wall;
  int width, height;
  scanf("%c %d %d", &wall, &height, &width);
  for (int x = 0; x < width; ++x) {
    printf("%c", wall);
  }
  puts("");
  for (int y = 0; y < height - 2; ++y) {
    printf("%c", wall);
    for (int x = 0; x < width - 2; ++x) {
      printf(" ");
    }
    printf("%c\n", wall);
  }
  for (int x = 0; x < width; ++x) {
    printf("%c", wall);
  }
  puts("");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
lea    -0x5(%rbp),%rsi
lea    -0x10(%rbp),%rdx
lea    -0xc(%rbp),%rcx
call   1050 <scanf@plt>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    118a <main+0x5a>
movsbl -0x5(%rbp),%esi
lea    0xe94(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    115e <main+0x2e>
lea    0xe80(%rip),%rdi
call   1030 <puts@plt>
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    -0x10(%rbp),%ecx
sub    $0x2,%ecx
cmp    %ecx,%eax
jge    1214 <main+0xe4>
movsbl -0x5(%rbp),%esi
lea    0xe50(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    -0xc(%rbp),%ecx
sub    $0x2,%ecx
cmp    %ecx,%eax
jge    11f4 <main+0xc4>
lea    0xe2d(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    11c7 <main+0x97>
movsbl -0x5(%rbp),%esi
lea    0xe0f(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    119d <main+0x6d>
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1247 <main+0x117>
movsbl -0x5(%rbp),%esi
lea    0xdd7(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    121b <main+0xeb>
lea    0xdc3(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
lea    0x7(%rsp),%rsi
lea    0xc(%rsp),%rdx
lea    0x8(%rsp),%rcx
call   1050 <scanf@plt>
cmpl   $0x0,0x8(%rsp)
jle    1173 <main+0x43>
xor    %ebx,%ebx
nopl   0x0(%rax)
movsbl 0x7(%rsp),%edi
call   1030 <putchar@plt>
add    $0x1,%ebx
cmp    0x8(%rsp),%ebx
jl     1160 <main+0x30>
mov    $0xa,%edi
call   1030 <putchar@plt>
cmpl   $0x3,0xc(%rsp)
jl     11da <main+0xaa>
lea    0xe7e(%rip),%r14
xor    %ebp,%ebp
jmp    11ad <main+0x7d>
nop
movsbl 0x7(%rsp),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%ebp
mov    0xc(%rsp),%eax
add    $0xfffffffe,%eax
cmp    %eax,%ebp
jge    11da <main+0xaa>
movsbl 0x7(%rsp),%edi
call   1030 <putchar@plt>
cmpl   $0x3,0x8(%rsp)
jl     1190 <main+0x60>
xor    %ebx,%ebx
mov    $0x20,%edi
call   1030 <putchar@plt>
add    $0x1,%ebx
mov    0x8(%rsp),%eax
add    $0xfffffffe,%eax
cmp    %eax,%ebx
jl     11c0 <main+0x90>
jmp    1190 <main+0x60>
cmpl   $0x0,0x8(%rsp)
jle    1203 <main+0xd3>
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movsbl 0x7(%rsp),%edi
call   1030 <putchar@plt>
add    $0x1,%ebx
cmp    0x8(%rsp),%ebx
jl     11f0 <main+0xc0>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [9 x i8] c"%c %d %d\00"
@.str.1 = [3 x i8] c"%c\00"
@.str.2 = [1 x i8] zeroinitializer
@.str.3 = [2 x i8] c" \00"
@.str.4 = [4 x i8] c"%c\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 0, i32* %1
%9 = call i32 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* %2, i32* %4, i32* %3)
store i32 0, i32* %5
br label %10
10: ; preds = %18, %0
%11 = load i32, i32* %5
%12 = load i32, i32* %3
%13 = icmp slt i32 %11, %12
br i1 %13, label %14, label %21
14: ; preds = %10
%15 = load i8, i8* %2
%16 = sext i8 %15 to i32
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %16)
br label %18
18: ; preds = %14
%19 = load i32, i32* %5
%20 = add nsw i32 %19, 1
store i32 %20, i32* %5
br label %10
21: ; preds = %10
%22 = call i32 @puts(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0))
store i32 0, i32* %6
br label %23
23: ; preds = %46, %21
%24 = load i32, i32* %6
%25 = load i32, i32* %4
%26 = sub nsw i32 %25, 2
%27 = icmp slt i32 %24, %26
br i1 %27, label %28, label %49
28: ; preds = %23
%29 = load i8, i8* %2
%30 = sext i8 %29 to i32
%31 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %30)
store i32 0, i32* %7
br label %32
32: ; preds = %39, %28
%33 = load i32, i32* %7
%34 = load i32, i32* %3
%35 = sub nsw i32 %34, 2
%36 = icmp slt i32 %33, %35
br i1 %36, label %37, label %42
37: ; preds = %32
%38 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
br label %39
39: ; preds = %37
%40 = load i32, i32* %7
%41 = add nsw i32 %40, 1
store i32 %41, i32* %7
br label %32
42: ; preds = %32
%43 = load i8, i8* %2
%44 = sext i8 %43 to i32
%45 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i32 %44)
br label %46
46: ; preds = %42
%47 = load i32, i32* %6
%48 = add nsw i32 %47, 1
store i32 %48, i32* %6
br label %23
49: ; preds = %23
store i32 0, i32* %8
br label %50
50: ; preds = %58, %49
%51 = load i32, i32* %8
%52 = load i32, i32* %3
%53 = icmp slt i32 %51, %52
br i1 %53, label %54, label %61
54: ; preds = %50
%55 = load i8, i8* %2
%56 = sext i8 %55 to i32
%57 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %56)
br label %58
58: ; preds = %54
%59 = load i32, i32* %8
%60 = add nsw i32 %59, 1
store i32 %60, i32* %8
br label %50
61: ; preds = %50
%62 = call i32 @puts(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c"%c %d %d\00"
@.str.4 = [4 x i8] c"%c\0A\00"
define i32 @main() {
%1 = alloca i8
%2 = alloca i32
%3 = alloca i32
%4 = bitcast i32* %2 to i8*
%5 = bitcast i32* %3 to i8*
%6 = call i32 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* %1, i32* %3, i32* %2)
%7 = load i32, i32* %2
%8 = icmp sgt i32 %7, 0
br i1 %8, label %13, label %9
9: ; preds = %13, %0
%10 = call i32 @putchar(i32 10)
%11 = load i32, i32* %3
%12 = icmp sgt i32 %11, 2
br i1 %12, label %24, label %21
13: ; preds = %0, %13
%14 = phi i32 [ %18, %13 ], [ 0, %0 ]
%15 = load i8, i8* %1
%16 = sext i8 %15 to i32
%17 = call i32 @putchar(i32 %16)
%18 = add nuw nsw i32 %14, 1
%19 = load i32, i32* %2
%20 = icmp slt i32 %18, %19
br i1 %20, label %13, label %9
21: ; preds = %31, %9
%22 = load i32, i32* %2
%23 = icmp sgt i32 %22, 0
br i1 %23, label %48, label %46
24: ; preds = %9, %31
%25 = phi i32 [ %35, %31 ], [ 0, %9 ]
%26 = load i8, i8* %1
%27 = sext i8 %26 to i32
%28 = call i32 @putchar(i32 %27)
%29 = load i32, i32* %2
%30 = icmp sgt i32 %29, 2
br i1 %30, label %39, label %31
31: ; preds = %39, %24
%32 = load i8, i8* %1
%33 = sext i8 %32 to i32
%34 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i32 %33)
%35 = add nuw nsw i32 %25, 1
%36 = load i32, i32* %3
%37 = add nsw i32 %36, -2
%38 = icmp slt i32 %35, %37
br i1 %38, label %24, label %21
39: ; preds = %24, %39
%40 = phi i32 [ %42, %39 ], [ 0, %24 ]
%41 = call i32 @putchar(i32 32)
%42 = add nuw nsw i32 %40, 1
%43 = load i32, i32* %2
%44 = add nsw i32 %43, -2
%45 = icmp slt i32 %42, %44
br i1 %45, label %39, label %31
46: ; preds = %48, %21
%47 = call i32 @putchar(i32 10)
ret i32 0
48: ; preds = %21, %48
%49 = phi i32 [ %53, %48 ], [ 0, %21 ]
%50 = load i8, i8* %1
%51 = sext i8 %50 to i32
%52 = call i32 @putchar(i32 %51)
%53 = add nuw nsw i32 %49, 1
%54 = load i32, i32* %2
%55 = icmp slt i32 %53, %54
br i1 %55, label %48, label %46
}