#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 EXIT_FAILURE;
int EXIT_SUCCESS;
int /*<<< orphan*/ printf(char *, ...);
int scanf(char *, int *, char *);
int main(int argc, char *argv[]) {
  int n;
  char c;
  if (scanf("%d %c", &n, &c) != 2)
    return EXIT_FAILURE;
  int len = n;
  int width = (int)(n / 2.0 + 0.5);
  for (int i = 0; i < len; i++) {
    printf("%c", c);
  }
  printf("\n");
  for (int i = 1; i < width - 1; i++) {
    printf("%c", c);
    for (int j = 1; j < len - 1; j++) {
      printf(" ");
    }
    printf("%c\n", c);
  }
  for (int i = 0; i < len; i++) {
    printf("%c", c);
  }
  printf("\n");
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xed3(%rip),%rdi
lea    -0x14(%rbp),%rsi
lea    -0x15(%rbp),%rdx
call   1040 <scanf@plt>
cmp    $0x2,%eax
je     1164 <main+0x44>
mov    0x2e86(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    129a <main+0x17a>
mov    -0x14(%rbp),%eax
mov    %eax,-0x1c(%rbp)
cvtsi2sdl -0x14(%rbp),%xmm0
movsd  0xe91(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  0xe7d(%rip),%xmm1
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    11c1 <main+0xa1>
movsbl -0x15(%rbp),%esi
lea    0xe67(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1195 <main+0x75>
lea    0xe52(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x1,-0x28(%rbp)
mov    -0x28(%rbp),%eax
mov    -0x20(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    124d <main+0x12d>
movsbl -0x15(%rbp),%esi
lea    0xe21(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x1,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
mov    -0x1c(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    122d <main+0x10d>
lea    0xdfe(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    1200 <main+0xe0>
movsbl -0x15(%rbp),%esi
lea    0xde0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    11d6 <main+0xb6>
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    1280 <main+0x160>
movsbl -0x15(%rbp),%esi
lea    0xda8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    1254 <main+0x134>
lea    0xd93(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2d43(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
lea    0xec6(%rip),%rdi
lea    0x4(%rsp),%rsi
lea    0x3(%rsp),%rdx
call   1050 <scanf@plt>
cmp    $0x2,%eax
jne    1211 <main+0xe1>
mov    0x4(%rsp),%r13d
cvtsi2sd %r13d,%xmm0
movsd  0xe94(%rip),%xmm1
mulsd  %xmm1,%xmm0
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%r15d
test   %r13d,%r13d
jle    119f <main+0x6f>
mov    %r13d,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movsbl 0x3(%rsp),%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebp
jne    1190 <main+0x60>
mov    $0xa,%edi
call   1030 <putchar@plt>
cmp    $0x3,%r15d
jl     121a <main+0xea>
add    $0xffffffff,%r15d
lea    -0x2(%r13),%r12d
mov    $0x1,%ebp
lea    0xe4b(%rip),%r14
jmp    11e7 <main+0xb7>
cs nopw 0x0(%rax,%rax,1)
nop
movsbl 0x3(%rsp),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%ebp
cmp    %r15d,%ebp
je     121a <main+0xea>
movsbl 0x3(%rsp),%edi
call   1030 <putchar@plt>
mov    %r12d,%ebx
cmp    $0x3,%r13d
jl     11d0 <main+0xa0>
nopw   0x0(%rax,%rax,1)
mov    $0x20,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebx
jne    1200 <main+0xd0>
jmp    11d0 <main+0xa0>
mov    0x2dc8(%rip),%rax
jmp    1241 <main+0x111>
test   %r13d,%r13d
jle    1230 <main+0x100>
nop
movsbl 0x3(%rsp),%edi
call   1030 <putchar@plt>
add    $0xffffffff,%r13d
jne    1220 <main+0xf0>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x2d97(%rip),%rax
mov    (%rax),%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [6 x i8] c"%d %c\00"
@EXIT_FAILURE = global i32 0
@.str.1 = [3 x i8] c"%c\00"
@.str.2 = [2 x i8] c"\0A\00"
@.str.3 = [2 x i8] c" \00"
@.str.4 = [4 x i8] c"%c\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i8
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%14 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %6, i8* %7)
%15 = icmp ne i32 %14, 2
br i1 %15, label %16, label %18
16: ; preds = %2
%17 = load i32, i32* @EXIT_FAILURE
store i32 %17, i32* %3
br label %79
18: ; preds = %2
%19 = load i32, i32* %6
store i32 %19, i32* %8
%20 = load i32, i32* %6
%21 = sitofp i32 %20 to double
%22 = fdiv double %21, 2.000000e+00
%23 = fadd double %22, 5.000000e-01
%24 = fptosi double %23 to i32
store i32 %24, i32* %9
store i32 0, i32* %10
br label %25
25: ; preds = %33, %18
%26 = load i32, i32* %10
%27 = load i32, i32* %8
%28 = icmp slt i32 %26, %27
br i1 %28, label %29, label %36
29: ; preds = %25
%30 = load i8, i8* %7
%31 = sext i8 %30 to i32
%32 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %31)
br label %33
33: ; preds = %29
%34 = load i32, i32* %10
%35 = add nsw i32 %34, 1
store i32 %35, i32* %10
br label %25
36: ; preds = %25
%37 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
store i32 1, i32* %11
br label %38
38: ; preds = %61, %36
%39 = load i32, i32* %11
%40 = load i32, i32* %9
%41 = sub nsw i32 %40, 1
%42 = icmp slt i32 %39, %41
br i1 %42, label %43, label %64
43: ; preds = %38
%44 = load i8, i8* %7
%45 = sext i8 %44 to i32
%46 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %45)
store i32 1, i32* %12
br label %47
47: ; preds = %54, %43
%48 = load i32, i32* %12
%49 = load i32, i32* %8
%50 = sub nsw i32 %49, 1
%51 = icmp slt i32 %48, %50
br i1 %51, label %52, label %57
52: ; preds = %47
%53 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
br label %54
54: ; preds = %52
%55 = load i32, i32* %12
%56 = add nsw i32 %55, 1
store i32 %56, i32* %12
br label %47
57: ; preds = %47
%58 = load i8, i8* %7
%59 = sext i8 %58 to i32
%60 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i32 %59)
br label %61
61: ; preds = %57
%62 = load i32, i32* %11
%63 = add nsw i32 %62, 1
store i32 %63, i32* %11
br label %38
64: ; preds = %38
store i32 0, i32* %13
br label %65
65: ; preds = %73, %64
%66 = load i32, i32* %13
%67 = load i32, i32* %8
%68 = icmp slt i32 %66, %67
br i1 %68, label %69, label %76
69: ; preds = %65
%70 = load i8, i8* %7
%71 = sext i8 %70 to i32
%72 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %71)
br label %73
73: ; preds = %69
%74 = load i32, i32* %13
%75 = add nsw i32 %74, 1
store i32 %75, i32* %13
br label %65
76: ; preds = %65
%77 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%78 = load i32, i32* @EXIT_SUCCESS
store i32 %78, i32* %3
br label %79
79: ; preds = %76, %16
%80 = load i32, i32* %3
ret i32 %80
}

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