#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*/ mvprintw(int, int, char *);
int /*<<< orphan*/ refresh();
void print_border() {
  int r, c;
  char horizontal[44] = "-------------------------------------------";
  for (r = 1; r < 4; r++)
    mvprintw(r * 6 - 1, 0, horizontal);
  for (c = 1; c < 5; c++)
    for (r = 1; r < 24; r++)
      mvprintw(r - 1, 11 * c - 1, "|");
  for (c = 1; c < 5; c++)
    for (r = 1; r < 4; r++)
      mvprintw(r * 6 - 1, 11 * c - 1, "+");
  refresh();
}


x86 assembly (clang, -O0):
<print_border>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
lea    -0x40(%rbp),%rdi
lea    0xebd(%rip),%rsi
mov    $0x2c,%edx
call   1030 <memcpy@plt>
movl   $0x1,-0x4(%rbp)
cmpl   $0x4,-0x4(%rbp)
jge    117e <print_border+0x4e>
imul   $0x6,-0x4(%rbp),%edi
sub    $0x1,%edi
lea    -0x40(%rbp),%rdx
xor    %esi,%esi
call   1050 <mvprintw@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1154 <print_border+0x24>
movl   $0x1,-0x8(%rbp)
cmpl   $0x5,-0x8(%rbp)
jge    11da <print_border+0xaa>
movl   $0x1,-0x4(%rbp)
cmpl   $0x18,-0x4(%rbp)
jge    11c7 <print_border+0x97>
mov    -0x4(%rbp),%edi
sub    $0x1,%edi
imul   $0xb,-0x8(%rbp),%esi
sub    $0x1,%esi
lea    0xe78(%rip),%rdx
call   1050 <mvprintw@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1196 <print_border+0x66>
jmp    11cc <print_border+0x9c>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1185 <print_border+0x55>
movl   $0x1,-0x8(%rbp)
cmpl   $0x5,-0x8(%rbp)
jge    1237 <print_border+0x107>
movl   $0x1,-0x4(%rbp)
cmpl   $0x4,-0x4(%rbp)
jge    1224 <print_border+0xf4>
imul   $0x6,-0x4(%rbp),%edi
sub    $0x1,%edi
imul   $0xb,-0x8(%rbp),%esi
sub    $0x1,%esi
lea    0xe1d(%rip),%rdx
call   1050 <mvprintw@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    11f2 <print_border+0xc2>
jmp    1229 <print_border+0xf9>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    11e1 <print_border+0xb1>
mov    $0x0,%al
call   1040 <refresh@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_border>:
push   %r14
push   %rbx
sub    $0x38,%rsp
movups 0xeee(%rip),%xmm0
movups %xmm0,0x1c(%rsp)
movaps 0xed6(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xeba(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rbx
mov    $0x5,%edi
xor    %esi,%esi
mov    %rbx,%rdx
call   1040 <mvprintw@plt>
mov    $0xb,%edi
xor    %esi,%esi
mov    %rbx,%rdx
call   1040 <mvprintw@plt>
mov    $0x11,%edi
xor    %esi,%esi
mov    %rbx,%rdx
call   1040 <mvprintw@plt>
mov    $0xa,%ebx
lea    0xea6(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
xor    %edi,%edi
mov    %ebx,%esi
mov    %r14,%rdx
call   1040 <mvprintw@plt>
mov    $0x1,%edi
mov    %ebx,%esi
mov    %r14,%rdx
call   1040 <mvprintw@plt>
mov    $0x2,%edi
mov    %ebx,%esi
mov    %r14,%rdx
call   1040 <mvprintw@plt>
mov    $0x3,%edi
mov    %ebx,%esi
mov    %r14,%rdx
call   1040 <mvprintw@plt>
mov    $0x4,%edi
mov    %ebx,%esi
mov    %r14,%rdx
call   1040 <mvprintw@plt>
mov    $0x5,%edi
mov    %ebx,%esi
mov    %r14,%rdx
call   1040 <mvprintw@plt>
mov    $0x6,%edi
mov    %ebx,%esi
mov    %r14,%rdx
call   1040 <mvprintw@plt>
mov    $0x7,%edi
mov    %ebx,%esi
mov    %r14,%rdx
call   1040 <mvprintw@plt>
mov    $0x8,%edi
mov    %ebx,%esi
mov    %r14,%rdx
call   1040 <mvprintw@plt>
mov    $0x9,%edi
mov    %ebx,%esi
mov    %r14,%rdx
call   1040 <mvprintw@plt>
mov    $0xa,%edi
mov    %ebx,%esi
mov    %r14,%rdx
call   1040 <mvprintw@plt>
mov    $0xb,%edi
mov    %ebx,%esi
mov    %r14,%rdx
call   1040 <mvprintw@plt>
mov    $0xc,%edi
mov    %ebx,%esi
mov    %r14,%rdx
call   1040 <mvprintw@plt>
mov    $0xd,%edi
mov    %ebx,%esi
mov    %r14,%rdx
call   1040 <mvprintw@plt>
mov    $0xe,%edi
mov    %ebx,%esi
mov    %r14,%rdx
call   1040 <mvprintw@plt>
mov    $0xf,%edi
mov    %ebx,%esi
mov    %r14,%rdx
call   1040 <mvprintw@plt>
mov    $0x10,%edi
mov    %ebx,%esi
mov    %r14,%rdx
call   1040 <mvprintw@plt>
mov    $0x11,%edi
mov    %ebx,%esi
mov    %r14,%rdx
call   1040 <mvprintw@plt>
mov    $0x12,%edi
mov    %ebx,%esi
mov    %r14,%rdx
call   1040 <mvprintw@plt>
mov    $0x13,%edi
mov    %ebx,%esi
mov    %r14,%rdx
call   1040 <mvprintw@plt>
mov    $0x14,%edi
mov    %ebx,%esi
mov    %r14,%rdx
call   1040 <mvprintw@plt>
mov    $0x15,%edi
mov    %ebx,%esi
mov    %r14,%rdx
call   1040 <mvprintw@plt>
mov    $0x16,%edi
mov    %ebx,%esi
mov    %r14,%rdx
call   1040 <mvprintw@plt>
add    $0xb,%ebx
cmp    $0x36,%ebx
jne    1190 <print_border+0x70>
lea    0xd35(%rip),%rbx
mov    $0x5,%edi
mov    $0xa,%esi
mov    %rbx,%rdx
call   1040 <mvprintw@plt>
mov    $0xb,%edi
mov    $0xa,%esi
mov    %rbx,%rdx
call   1040 <mvprintw@plt>
mov    $0x11,%edi
mov    $0xa,%esi
mov    %rbx,%rdx
call   1040 <mvprintw@plt>
mov    $0x5,%edi
mov    $0x15,%esi
mov    %rbx,%rdx
call   1040 <mvprintw@plt>
mov    $0xb,%edi
mov    $0x15,%esi
mov    %rbx,%rdx
call   1040 <mvprintw@plt>
mov    $0x11,%edi
mov    $0x15,%esi
mov    %rbx,%rdx
call   1040 <mvprintw@plt>
mov    $0x5,%edi
mov    $0x20,%esi
mov    %rbx,%rdx
call   1040 <mvprintw@plt>
mov    $0xb,%edi
mov    $0x20,%esi
mov    %rbx,%rdx
call   1040 <mvprintw@plt>
mov    $0x11,%edi
mov    $0x20,%esi
mov    %rbx,%rdx
call   1040 <mvprintw@plt>
mov    $0x5,%edi
mov    $0x2b,%esi
mov    %rbx,%rdx
call   1040 <mvprintw@plt>
mov    $0xb,%edi
mov    $0x2b,%esi
mov    %rbx,%rdx
call   1040 <mvprintw@plt>
mov    $0x11,%edi
mov    $0x2b,%esi
mov    %rbx,%rdx
call   1040 <mvprintw@plt>
xor    %eax,%eax
call   1030 <refresh@plt>
add    $0x38,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@__const.print_border.horizontal = [44 x i8] c"-------------------------------------------\00"
@.str = [2 x i8] c"|\00"
@.str.1 = [2 x i8] c"+\00"
define void @print_border() {
%1 = alloca [44 x i8]
%2 = getelementptr inbounds [44 x i8], [44 x i8]* %1, i64 0, i64 0
%3 = call i32 @mvprintw(i32 5, i32 0, i8* %2)
%4 = call i32 @mvprintw(i32 11, i32 0, i8* %2)
%5 = call i32 @mvprintw(i32 17, i32 0, i8* %2)
br label %6
6: ; preds = %0, %6
%7 = phi i32 [ %33, %6 ], [ 1, %0 ]
%8 = mul nuw nsw i32 %7, 11
%9 = add nsw i32 %8, -1
%10 = call i32 @mvprintw(i32 0, i32 %9, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%11 = call i32 @mvprintw(i32 1, i32 %9, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%12 = call i32 @mvprintw(i32 2, i32 %9, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%13 = call i32 @mvprintw(i32 3, i32 %9, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%14 = call i32 @mvprintw(i32 4, i32 %9, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%15 = call i32 @mvprintw(i32 5, i32 %9, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%16 = call i32 @mvprintw(i32 6, i32 %9, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%17 = call i32 @mvprintw(i32 7, i32 %9, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%18 = call i32 @mvprintw(i32 8, i32 %9, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%19 = call i32 @mvprintw(i32 9, i32 %9, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%20 = call i32 @mvprintw(i32 10, i32 %9, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%21 = call i32 @mvprintw(i32 11, i32 %9, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%22 = call i32 @mvprintw(i32 12, i32 %9, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%23 = call i32 @mvprintw(i32 13, i32 %9, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%24 = call i32 @mvprintw(i32 14, i32 %9, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%25 = call i32 @mvprintw(i32 15, i32 %9, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%26 = call i32 @mvprintw(i32 16, i32 %9, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%27 = call i32 @mvprintw(i32 17, i32 %9, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%28 = call i32 @mvprintw(i32 18, i32 %9, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%29 = call i32 @mvprintw(i32 19, i32 %9, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%30 = call i32 @mvprintw(i32 20, i32 %9, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%31 = call i32 @mvprintw(i32 21, i32 %9, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%32 = call i32 @mvprintw(i32 22, i32 %9, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%33 = add nuw nsw i32 %7, 1
%34 = icmp eq i32 %33, 5
br i1 %34, label %35, label %6
35: ; preds = %6
%36 = call i32 @mvprintw(i32 5, i32 10, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%37 = call i32 @mvprintw(i32 11, i32 10, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%38 = call i32 @mvprintw(i32 17, i32 10, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%39 = call i32 @mvprintw(i32 5, i32 21, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%40 = call i32 @mvprintw(i32 11, i32 21, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%41 = call i32 @mvprintw(i32 17, i32 21, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%42 = call i32 @mvprintw(i32 5, i32 32, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%43 = call i32 @mvprintw(i32 11, i32 32, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%44 = call i32 @mvprintw(i32 17, i32 32, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%45 = call i32 @mvprintw(i32 5, i32 43, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%46 = call i32 @mvprintw(i32 11, i32 43, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%47 = call i32 @mvprintw(i32 17, i32 43, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%48 = call i32 (...) @refresh()
ret void
}