#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 *);
int main() {
  int a, b, c;
  scanf("%d%d%d", &a, &b, &c);
  int i, j;
  for (i = 0; i < c; i++) {
    for (j = 0; j < b; j++) {
      if (i == 0 || i == c - 1 || j == 0 || j == b - 1) {
        printf("%d", a);
      } else {
        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
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
lea    -0x10(%rbp),%rcx
call   1040 <scanf@plt>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    11f6 <main+0xd6>
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    11da <main+0xba>
cmpl   $0x0,-0x14(%rbp)
je     11a3 <main+0x83>
mov    -0x14(%rbp),%eax
mov    -0x10(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
je     11a3 <main+0x83>
cmpl   $0x0,-0x18(%rbp)
je     11a3 <main+0x83>
mov    -0x18(%rbp),%eax
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jne    11b9 <main+0x99>
mov    -0x8(%rbp),%esi
lea    0xe57(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11c7 <main+0xa7>
lea    0xe47(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11cc <main+0xac>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1161 <main+0x41>
lea    0xe28(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    114e <main+0x2e>
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    0xc(%rsp),%rsi
lea    0x8(%rsp),%rdx
lea    0x4(%rsp),%rcx
call   1050 <scanf@plt>
cmpl   $0x0,0x4(%rsp)
jle    11cf <main+0x9f>
lea    0xea3(%rip),%r14
xor    %ebp,%ebp
jmp    1183 <main+0x53>
cs nopw 0x0(%rax,%rax,1)
nop
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x1,%ebp
cmp    0x4(%rsp),%ebp
jge    11cf <main+0x9f>
mov    0x8(%rsp),%eax
test   %eax,%eax
jle    1170 <main+0x40>
xor    %ebx,%ebx
jmp    11a9 <main+0x79>
nop
mov    0xc(%rsp),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%ebx
mov    0x8(%rsp),%eax
cmp    %eax,%ebx
jge    1170 <main+0x40>
test   %ebp,%ebp
je     1190 <main+0x60>
mov    0x4(%rsp),%ecx
add    $0xffffffff,%ecx
cmp    %ecx,%ebp
je     1190 <main+0x60>
test   %ebx,%ebx
je     1190 <main+0x60>
add    $0xffffffff,%eax
cmp    %eax,%ebx
je     1190 <main+0x60>
mov    $0x20,%edi
call   1030 <putchar@plt>
jmp    119e <main+0x6e>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

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

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