#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*/ ACS_BTEE;
int /*<<< orphan*/ ACS_HLINE;
int /*<<< orphan*/ ACS_LLCORNER;
int /*<<< orphan*/ ACS_LRCORNER;
int /*<<< orphan*/ ACS_LTEE;
int /*<<< orphan*/ ACS_PLUS;
int /*<<< orphan*/ ACS_RTEE;
int /*<<< orphan*/ ACS_TTEE;
int /*<<< orphan*/ ACS_ULCORNER;
int /*<<< orphan*/ ACS_URCORNER;
int /*<<< orphan*/ ACS_VLINE;
int /*<<< orphan*/ mvaddch(int, int, int /*<<< orphan*/);
void draw_board_box(void) {
  int i;
  for (i = 0; i < 4 * 9 - 1; i++) {
    mvaddch(1, i + 3, ACS_HLINE);
    mvaddch(7, i + 3, ACS_HLINE);
    mvaddch(13, i + 3, ACS_HLINE);
    mvaddch(19, i + 3, ACS_HLINE);
  }
  for (i = 0; i < 2 * 9 + 1; i++) {
    mvaddch(i + 1, 2, ACS_VLINE);
    mvaddch(i + 1, 14, ACS_VLINE);
    mvaddch(i + 1, 26, ACS_VLINE);
    mvaddch(i + 1, 38, ACS_VLINE);
  }
  mvaddch(1, 2, ACS_ULCORNER);
  mvaddch(1, 38, ACS_URCORNER);
  mvaddch(19, 2, ACS_LLCORNER);
  mvaddch(19, 38, ACS_LRCORNER);
  mvaddch(1, 14, ACS_TTEE);
  mvaddch(1, 26, ACS_TTEE);
  mvaddch(19, 14, ACS_BTEE);
  mvaddch(19, 26, ACS_BTEE);
  mvaddch(7, 2, ACS_LTEE);
  mvaddch(13, 2, ACS_LTEE);
  mvaddch(7, 38, ACS_RTEE);
  mvaddch(13, 38, ACS_RTEE);
  mvaddch(7, 14, ACS_PLUS);
  mvaddch(7, 26, ACS_PLUS);
  mvaddch(13, 14, ACS_PLUS);
  mvaddch(13, 26, ACS_PLUS);
}


x86 assembly (clang, -O0):
<draw_board_box>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0x23,-0x4(%rbp)
jge    119b <draw_board_box+0x8b>
mov    -0x4(%rbp),%esi
add    $0x3,%esi
mov    0x2e82(%rip),%rax
mov    (%rax),%edx
mov    $0x1,%edi
call   1030 <mvaddch@plt>
mov    -0x4(%rbp),%esi
add    $0x3,%esi
mov    0x2e69(%rip),%rax
mov    (%rax),%edx
mov    $0x7,%edi
call   1030 <mvaddch@plt>
mov    -0x4(%rbp),%esi
add    $0x3,%esi
mov    0x2e50(%rip),%rax
mov    (%rax),%edx
mov    $0xd,%edi
call   1030 <mvaddch@plt>
mov    -0x4(%rbp),%esi
add    $0x3,%esi
mov    0x2e37(%rip),%rax
mov    (%rax),%edx
mov    $0x13,%edi
call   1030 <mvaddch@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    111f <draw_board_box+0xf>
movl   $0x0,-0x4(%rbp)
cmpl   $0x13,-0x4(%rbp)
jge    121e <draw_board_box+0x10e>
mov    -0x4(%rbp),%edi
add    $0x1,%edi
mov    0x2de7(%rip),%rax
mov    (%rax),%edx
mov    $0x2,%esi
call   1030 <mvaddch@plt>
mov    -0x4(%rbp),%edi
add    $0x1,%edi
mov    0x2dce(%rip),%rax
mov    (%rax),%edx
mov    $0xe,%esi
call   1030 <mvaddch@plt>
mov    -0x4(%rbp),%edi
add    $0x1,%edi
mov    0x2db5(%rip),%rax
mov    (%rax),%edx
mov    $0x1a,%esi
call   1030 <mvaddch@plt>
mov    -0x4(%rbp),%edi
add    $0x1,%edi
mov    0x2d9c(%rip),%rax
mov    (%rax),%edx
mov    $0x26,%esi
call   1030 <mvaddch@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    11a2 <draw_board_box+0x92>
mov    0x2dbb(%rip),%rax
mov    (%rax),%edx
mov    $0x1,%edi
mov    $0x2,%esi
call   1030 <mvaddch@plt>
mov    0x2d83(%rip),%rax
mov    (%rax),%edx
mov    $0x1,%edi
mov    $0x26,%esi
call   1030 <mvaddch@plt>
mov    0x2d33(%rip),%rax
mov    (%rax),%edx
mov    $0x13,%edi
mov    $0x2,%esi
call   1030 <mvaddch@plt>
mov    0x2d63(%rip),%rax
mov    (%rax),%edx
mov    $0x13,%edi
mov    $0x26,%esi
call   1030 <mvaddch@plt>
mov    0x2d2b(%rip),%rax
mov    (%rax),%edx
mov    $0x1,%edi
mov    $0xe,%esi
call   1030 <mvaddch@plt>
mov    0x2d13(%rip),%rax
mov    (%rax),%edx
mov    $0x1,%edi
mov    $0x1a,%esi
call   1030 <mvaddch@plt>
mov    0x2d23(%rip),%rax
mov    (%rax),%edx
mov    $0x13,%edi
mov    $0xe,%esi
call   1030 <mvaddch@plt>
mov    0x2d0b(%rip),%rax
mov    (%rax),%edx
mov    $0x13,%edi
mov    $0x1a,%esi
call   1030 <mvaddch@plt>
mov    0x2d03(%rip),%rax
mov    (%rax),%edx
mov    $0x7,%edi
mov    $0x2,%esi
call   1030 <mvaddch@plt>
mov    0x2ceb(%rip),%rax
mov    (%rax),%edx
mov    $0xd,%edi
mov    $0x2,%esi
call   1030 <mvaddch@plt>
mov    0x2c83(%rip),%rax
mov    (%rax),%edx
mov    $0x7,%edi
mov    $0x26,%esi
call   1030 <mvaddch@plt>
mov    0x2c6b(%rip),%rax
mov    (%rax),%edx
mov    $0xd,%edi
mov    $0x26,%esi
call   1030 <mvaddch@plt>
mov    0x2c63(%rip),%rax
mov    (%rax),%edx
mov    $0x7,%edi
mov    $0xe,%esi
call   1030 <mvaddch@plt>
mov    0x2c4b(%rip),%rax
mov    (%rax),%edx
mov    $0x7,%edi
mov    $0x1a,%esi
call   1030 <mvaddch@plt>
mov    0x2c33(%rip),%rax
mov    (%rax),%edx
mov    $0xd,%edi
mov    $0xe,%esi
call   1030 <mvaddch@plt>
mov    0x2c1b(%rip),%rax
mov    (%rax),%edx
mov    $0xd,%edi
mov    $0x1a,%esi
call   1030 <mvaddch@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<draw_board_box>:
push   %r14
push   %rbx
push   %rax
mov    $0x3,%ebx
mov    0x2e98(%rip),%r14
mov    (%r14),%edx
mov    $0x1,%edi
mov    %ebx,%esi
call   1030 <mvaddch@plt>
mov    (%r14),%edx
mov    $0x7,%edi
mov    %ebx,%esi
call   1030 <mvaddch@plt>
mov    (%r14),%edx
mov    $0xd,%edi
mov    %ebx,%esi
call   1030 <mvaddch@plt>
mov    (%r14),%edx
mov    $0x13,%edi
mov    %ebx,%esi
call   1030 <mvaddch@plt>
add    $0x1,%ebx
cmp    $0x26,%ebx
jne    1120 <draw_board_box+0x10>
mov    $0x1,%ebx
mov    0x2e30(%rip),%r14
mov    (%r14),%edx
mov    %ebx,%edi
mov    $0x2,%esi
call   1030 <mvaddch@plt>
mov    (%r14),%edx
mov    %ebx,%edi
mov    $0xe,%esi
call   1030 <mvaddch@plt>
mov    (%r14),%edx
mov    %ebx,%edi
mov    $0x1a,%esi
call   1030 <mvaddch@plt>
mov    (%r14),%edx
mov    %ebx,%edi
mov    $0x26,%esi
call   1030 <mvaddch@plt>
add    $0x1,%ebx
cmp    $0x14,%ebx
jne    1170 <draw_board_box+0x60>
mov    0x2e25(%rip),%rax
mov    (%rax),%edx
mov    $0x1,%edi
mov    $0x2,%esi
call   1030 <mvaddch@plt>
mov    0x2ded(%rip),%rax
mov    (%rax),%edx
mov    $0x1,%edi
mov    $0x26,%esi
call   1030 <mvaddch@plt>
mov    0x2d9d(%rip),%rax
mov    (%rax),%edx
mov    $0x13,%edi
mov    $0x2,%esi
call   1030 <mvaddch@plt>
mov    0x2dcd(%rip),%rax
mov    (%rax),%edx
mov    $0x13,%edi
mov    $0x26,%esi
call   1030 <mvaddch@plt>
mov    0x2d95(%rip),%rbx
mov    (%rbx),%edx
mov    $0x1,%edi
mov    $0xe,%esi
call   1030 <mvaddch@plt>
mov    (%rbx),%edx
mov    $0x1,%edi
mov    $0x1a,%esi
call   1030 <mvaddch@plt>
mov    0x2d94(%rip),%rbx
mov    (%rbx),%edx
mov    $0x13,%edi
mov    $0xe,%esi
call   1030 <mvaddch@plt>
mov    (%rbx),%edx
mov    $0x13,%edi
mov    $0x1a,%esi
call   1030 <mvaddch@plt>
mov    0x2d7b(%rip),%rbx
mov    (%rbx),%edx
mov    $0x7,%edi
mov    $0x2,%esi
call   1030 <mvaddch@plt>
mov    (%rbx),%edx
mov    $0xd,%edi
mov    $0x2,%esi
call   1030 <mvaddch@plt>
mov    0x2d02(%rip),%rbx
mov    (%rbx),%edx
mov    $0x7,%edi
mov    $0x26,%esi
call   1030 <mvaddch@plt>
mov    (%rbx),%edx
mov    $0xd,%edi
mov    $0x26,%esi
call   1030 <mvaddch@plt>
mov    0x2ce9(%rip),%rbx
mov    (%rbx),%edx
mov    $0x7,%edi
mov    $0xe,%esi
call   1030 <mvaddch@plt>
mov    (%rbx),%edx
mov    $0x7,%edi
mov    $0x1a,%esi
call   1030 <mvaddch@plt>
mov    (%rbx),%edx
mov    $0xd,%edi
mov    $0xe,%esi
call   1030 <mvaddch@plt>
mov    (%rbx),%edx
mov    $0xd,%edi
mov    $0x1a,%esi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <mvaddch@plt>

LLVM IR (-O0):
@ACS_HLINE = global i32 0
@ACS_VLINE = global i32 0
@ACS_ULCORNER = global i32 0
@ACS_URCORNER = global i32 0
@ACS_LLCORNER = global i32 0
@ACS_LRCORNER = global i32 0
@ACS_TTEE = global i32 0
@ACS_BTEE = global i32 0
@ACS_LTEE = global i32 0
@ACS_RTEE = global i32 0
@ACS_PLUS = global i32 0
define void @draw_board_box() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %22, %0
%3 = load i32, i32* %1
%4 = icmp slt i32 %3, 35
br i1 %4, label %5, label %25
5: ; preds = %2
%6 = load i32, i32* %1
%7 = add nsw i32 %6, 3
%8 = load i32, i32* @ACS_HLINE
%9 = call i32 @mvaddch(i32 1, i32 %7, i32 %8)
%10 = load i32, i32* %1
%11 = add nsw i32 %10, 3
%12 = load i32, i32* @ACS_HLINE
%13 = call i32 @mvaddch(i32 7, i32 %11, i32 %12)
%14 = load i32, i32* %1
%15 = add nsw i32 %14, 3
%16 = load i32, i32* @ACS_HLINE
%17 = call i32 @mvaddch(i32 13, i32 %15, i32 %16)
%18 = load i32, i32* %1
%19 = add nsw i32 %18, 3
%20 = load i32, i32* @ACS_HLINE
%21 = call i32 @mvaddch(i32 19, i32 %19, i32 %20)
br label %22
22: ; preds = %5
%23 = load i32, i32* %1
%24 = add nsw i32 %23, 1
store i32 %24, i32* %1
br label %2
25: ; preds = %2
store i32 0, i32* %1
br label %26
26: ; preds = %46, %25
%27 = load i32, i32* %1
%28 = icmp slt i32 %27, 19
br i1 %28, label %29, label %49
29: ; preds = %26
%30 = load i32, i32* %1
%31 = add nsw i32 %30, 1
%32 = load i32, i32* @ACS_VLINE
%33 = call i32 @mvaddch(i32 %31, i32 2, i32 %32)
%34 = load i32, i32* %1
%35 = add nsw i32 %34, 1
%36 = load i32, i32* @ACS_VLINE
%37 = call i32 @mvaddch(i32 %35, i32 14, i32 %36)
%38 = load i32, i32* %1
%39 = add nsw i32 %38, 1
%40 = load i32, i32* @ACS_VLINE
%41 = call i32 @mvaddch(i32 %39, i32 26, i32 %40)
%42 = load i32, i32* %1
%43 = add nsw i32 %42, 1
%44 = load i32, i32* @ACS_VLINE
%45 = call i32 @mvaddch(i32 %43, i32 38, i32 %44)
br label %46
46: ; preds = %29
%47 = load i32, i32* %1
%48 = add nsw i32 %47, 1
store i32 %48, i32* %1
br label %26
49: ; preds = %26
%50 = load i32, i32* @ACS_ULCORNER
%51 = call i32 @mvaddch(i32 1, i32 2, i32 %50)
%52 = load i32, i32* @ACS_URCORNER
%53 = call i32 @mvaddch(i32 1, i32 38, i32 %52)
%54 = load i32, i32* @ACS_LLCORNER
%55 = call i32 @mvaddch(i32 19, i32 2, i32 %54)
%56 = load i32, i32* @ACS_LRCORNER
%57 = call i32 @mvaddch(i32 19, i32 38, i32 %56)
%58 = load i32, i32* @ACS_TTEE
%59 = call i32 @mvaddch(i32 1, i32 14, i32 %58)
%60 = load i32, i32* @ACS_TTEE
%61 = call i32 @mvaddch(i32 1, i32 26, i32 %60)
%62 = load i32, i32* @ACS_BTEE
%63 = call i32 @mvaddch(i32 19, i32 14, i32 %62)
%64 = load i32, i32* @ACS_BTEE
%65 = call i32 @mvaddch(i32 19, i32 26, i32 %64)
%66 = load i32, i32* @ACS_LTEE
%67 = call i32 @mvaddch(i32 7, i32 2, i32 %66)
%68 = load i32, i32* @ACS_LTEE
%69 = call i32 @mvaddch(i32 13, i32 2, i32 %68)
%70 = load i32, i32* @ACS_RTEE
%71 = call i32 @mvaddch(i32 7, i32 38, i32 %70)
%72 = load i32, i32* @ACS_RTEE
%73 = call i32 @mvaddch(i32 13, i32 38, i32 %72)
%74 = load i32, i32* @ACS_PLUS
%75 = call i32 @mvaddch(i32 7, i32 14, i32 %74)
%76 = load i32, i32* @ACS_PLUS
%77 = call i32 @mvaddch(i32 7, i32 26, i32 %76)
%78 = load i32, i32* @ACS_PLUS
%79 = call i32 @mvaddch(i32 13, i32 14, i32 %78)
%80 = load i32, i32* @ACS_PLUS
%81 = call i32 @mvaddch(i32 13, i32 26, i32 %80)
ret void
}

LLVM IR (-O2):
@ACS_HLINE = global i32 0
@ACS_VLINE = global i32 0
@ACS_ULCORNER = global i32 0
@ACS_URCORNER = global i32 0
@ACS_LLCORNER = global i32 0
@ACS_LRCORNER = global i32 0
@ACS_TTEE = global i32 0
@ACS_BTEE = global i32 0
@ACS_LTEE = global i32 0
@ACS_RTEE = global i32 0
@ACS_PLUS = global i32 0
define void @draw_board_box() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %12, %1 ]
%3 = add nuw nsw i32 %2, 3
%4 = load i32, i32* @ACS_HLINE
%5 = tail call i32 @mvaddch(i32 1, i32 %3, i32 %4)
%6 = load i32, i32* @ACS_HLINE
%7 = tail call i32 @mvaddch(i32 7, i32 %3, i32 %6)
%8 = load i32, i32* @ACS_HLINE
%9 = tail call i32 @mvaddch(i32 13, i32 %3, i32 %8)
%10 = load i32, i32* @ACS_HLINE
%11 = tail call i32 @mvaddch(i32 19, i32 %3, i32 %10)
%12 = add nuw nsw i32 %2, 1
%13 = icmp eq i32 %12, 35
br i1 %13, label %14, label %1
14: ; preds = %1, %14
%15 = phi i32 [ %16, %14 ], [ 0, %1 ]
%16 = add nuw nsw i32 %15, 1
%17 = load i32, i32* @ACS_VLINE
%18 = tail call i32 @mvaddch(i32 %16, i32 2, i32 %17)
%19 = load i32, i32* @ACS_VLINE
%20 = tail call i32 @mvaddch(i32 %16, i32 14, i32 %19)
%21 = load i32, i32* @ACS_VLINE
%22 = tail call i32 @mvaddch(i32 %16, i32 26, i32 %21)
%23 = load i32, i32* @ACS_VLINE
%24 = tail call i32 @mvaddch(i32 %16, i32 38, i32 %23)
%25 = icmp eq i32 %16, 19
br i1 %25, label %26, label %14
26: ; preds = %14
%27 = load i32, i32* @ACS_ULCORNER
%28 = tail call i32 @mvaddch(i32 1, i32 2, i32 %27)
%29 = load i32, i32* @ACS_URCORNER
%30 = tail call i32 @mvaddch(i32 1, i32 38, i32 %29)
%31 = load i32, i32* @ACS_LLCORNER
%32 = tail call i32 @mvaddch(i32 19, i32 2, i32 %31)
%33 = load i32, i32* @ACS_LRCORNER
%34 = tail call i32 @mvaddch(i32 19, i32 38, i32 %33)
%35 = load i32, i32* @ACS_TTEE
%36 = tail call i32 @mvaddch(i32 1, i32 14, i32 %35)
%37 = load i32, i32* @ACS_TTEE
%38 = tail call i32 @mvaddch(i32 1, i32 26, i32 %37)
%39 = load i32, i32* @ACS_BTEE
%40 = tail call i32 @mvaddch(i32 19, i32 14, i32 %39)
%41 = load i32, i32* @ACS_BTEE
%42 = tail call i32 @mvaddch(i32 19, i32 26, i32 %41)
%43 = load i32, i32* @ACS_LTEE
%44 = tail call i32 @mvaddch(i32 7, i32 2, i32 %43)
%45 = load i32, i32* @ACS_LTEE
%46 = tail call i32 @mvaddch(i32 13, i32 2, i32 %45)
%47 = load i32, i32* @ACS_RTEE
%48 = tail call i32 @mvaddch(i32 7, i32 38, i32 %47)
%49 = load i32, i32* @ACS_RTEE
%50 = tail call i32 @mvaddch(i32 13, i32 38, i32 %49)
%51 = load i32, i32* @ACS_PLUS
%52 = tail call i32 @mvaddch(i32 7, i32 14, i32 %51)
%53 = load i32, i32* @ACS_PLUS
%54 = tail call i32 @mvaddch(i32 7, i32 26, i32 %53)
%55 = load i32, i32* @ACS_PLUS
%56 = tail call i32 @mvaddch(i32 13, i32 14, i32 %55)
%57 = load i32, i32* @ACS_PLUS
%58 = tail call i32 @mvaddch(i32 13, i32 26, i32 %57)
ret void
}