#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 */
typedef int /*<<< orphan*/ WINDOW;

/* 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*/ mvwaddch(int /*<<< orphan*/ *, int, int, int /*<<< orphan*/);
int /*<<< orphan*/ wrefresh(int /*<<< orphan*/ *);
void board(WINDOW *win, int starty, int startx, int lines, int cols,
           int tile_width, int tile_height) {
  int endy, endx, i, j;
  endy = starty + lines * tile_height;
  endx = startx + cols * tile_width;
  for (j = starty; j <= endy; j += tile_height)
    for (i = startx; i <= endx; ++i)
      mvwaddch(win, j, i, ACS_HLINE);
  for (i = startx; i <= endx; i += tile_width)
    for (j = starty; j <= endy; ++j)
      mvwaddch(win, j, i, ACS_VLINE);
  mvwaddch(win, starty, startx, ACS_ULCORNER);
  mvwaddch(win, endy, startx, ACS_LLCORNER);
  mvwaddch(win, starty, endx, ACS_URCORNER);
  mvwaddch(win, endy, endx, ACS_LRCORNER);
  for (j = starty + tile_height; j <= endy - tile_height; j += tile_height) {
    mvwaddch(win, j, startx, ACS_LTEE);
    mvwaddch(win, j, endx, ACS_RTEE);
    for (i = startx + tile_width; i <= endx - tile_width; i += tile_width)
      mvwaddch(win, j, i, ACS_PLUS);
  }
  for (i = startx + tile_width; i <= endx - tile_width; i += tile_width) {
    mvwaddch(win, starty, i, ACS_TTEE);
    mvwaddch(win, endy, i, ACS_BTEE);
  }
  wrefresh(win);
}


x86 assembly (clang, -O0):
<board>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0x10(%rbp),%eax
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8d,-0x18(%rbp)
mov    %r9d,-0x1c(%rbp)
mov    -0xc(%rbp),%eax
mov    -0x14(%rbp),%ecx
imul   0x10(%rbp),%ecx
add    %ecx,%eax
mov    %eax,-0x20(%rbp)
mov    -0x10(%rbp),%eax
mov    -0x18(%rbp),%ecx
imul   -0x1c(%rbp),%ecx
add    %ecx,%eax
mov    %eax,-0x24(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x20(%rbp),%eax
jg     11bb <board+0x9b>
mov    -0x10(%rbp),%eax
mov    %eax,-0x28(%rbp)
mov    -0x28(%rbp),%eax
cmp    -0x24(%rbp),%eax
jg     11a8 <board+0x88>
mov    -0x8(%rbp),%rdi
mov    -0x2c(%rbp),%esi
mov    -0x28(%rbp),%edx
mov    0x2e25(%rip),%rax
mov    (%rax),%ecx
call   1040 <mvwaddch@plt>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    1176 <board+0x56>
jmp    11ad <board+0x8d>
mov    0x10(%rbp),%eax
add    -0x2c(%rbp),%eax
mov    %eax,-0x2c(%rbp)
jmp    1164 <board+0x44>
mov    -0x10(%rbp),%eax
mov    %eax,-0x28(%rbp)
mov    -0x28(%rbp),%eax
cmp    -0x24(%rbp),%eax
jg     1218 <board+0xf8>
mov    -0xc(%rbp),%eax
mov    %eax,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x20(%rbp),%eax
jg     1205 <board+0xe5>
mov    -0x8(%rbp),%rdi
mov    -0x2c(%rbp),%esi
mov    -0x28(%rbp),%edx
mov    0x2db0(%rip),%rax
mov    (%rax),%ecx
call   1040 <mvwaddch@plt>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    11d3 <board+0xb3>
jmp    120a <board+0xea>
mov    -0x1c(%rbp),%eax
add    -0x28(%rbp),%eax
mov    %eax,-0x28(%rbp)
jmp    11c1 <board+0xa1>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    0x2db7(%rip),%rax
mov    (%rax),%ecx
call   1040 <mvwaddch@plt>
mov    -0x8(%rbp),%rdi
mov    -0x20(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    0x2d47(%rip),%rax
mov    (%rax),%ecx
call   1040 <mvwaddch@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x24(%rbp),%edx
mov    0x2d67(%rip),%rax
mov    (%rax),%ecx
call   1040 <mvwaddch@plt>
mov    -0x8(%rbp),%rdi
mov    -0x20(%rbp),%esi
mov    -0x24(%rbp),%edx
mov    0x2d5f(%rip),%rax
mov    (%rax),%ecx
call   1040 <mvwaddch@plt>
mov    -0xc(%rbp),%eax
add    0x10(%rbp),%eax
mov    %eax,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
mov    -0x20(%rbp),%ecx
sub    0x10(%rbp),%ecx
cmp    %ecx,%eax
jg     1315 <board+0x1f5>
mov    -0x8(%rbp),%rdi
mov    -0x2c(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    0x2d45(%rip),%rax
mov    (%rax),%ecx
call   1040 <mvwaddch@plt>
mov    -0x8(%rbp),%rdi
mov    -0x2c(%rbp),%esi
mov    -0x24(%rbp),%edx
mov    0x2cdd(%rip),%rax
mov    (%rax),%ecx
call   1040 <mvwaddch@plt>
mov    -0x10(%rbp),%eax
add    -0x1c(%rbp),%eax
mov    %eax,-0x28(%rbp)
mov    -0x28(%rbp),%eax
mov    -0x24(%rbp),%ecx
sub    -0x1c(%rbp),%ecx
cmp    %ecx,%eax
jg     1302 <board+0x1e2>
mov    -0x8(%rbp),%rdi
mov    -0x2c(%rbp),%esi
mov    -0x28(%rbp),%edx
mov    0x2cbb(%rip),%rax
mov    (%rax),%ecx
call   1040 <mvwaddch@plt>
mov    -0x1c(%rbp),%eax
add    -0x28(%rbp),%eax
mov    %eax,-0x28(%rbp)
jmp    12cb <board+0x1ab>
jmp    1307 <board+0x1e7>
mov    0x10(%rbp),%eax
add    -0x2c(%rbp),%eax
mov    %eax,-0x2c(%rbp)
jmp    1281 <board+0x161>
mov    -0x10(%rbp),%eax
add    -0x1c(%rbp),%eax
mov    %eax,-0x28(%rbp)
mov    -0x28(%rbp),%eax
mov    -0x24(%rbp),%ecx
sub    -0x1c(%rbp),%ecx
cmp    %ecx,%eax
jg     136d <board+0x24d>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x28(%rbp),%edx
mov    0x2c70(%rip),%rax
mov    (%rax),%ecx
call   1040 <mvwaddch@plt>
mov    -0x8(%rbp),%rdi
mov    -0x20(%rbp),%esi
mov    -0x28(%rbp),%edx
mov    0x2c80(%rip),%rax
mov    (%rax),%ecx
call   1040 <mvwaddch@plt>
mov    -0x1c(%rbp),%eax
add    -0x28(%rbp),%eax
mov    %eax,-0x28(%rbp)
jmp    131e <board+0x1fe>
mov    -0x8(%rbp),%rdi
call   1030 <wrefresh@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<board>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
mov    %r8d,%ebp
mov    %rdi,%r14
mov    0x70(%rsp),%eax
mov    %rax,0x28(%rsp)
imul   %eax,%ecx
mov    %rsi,0x8(%rsp)
lea    (%rcx,%rsi,1),%eax
mov    %eax,(%rsp)
mov    %r9,0x20(%rsp)
imul   %r9d,%ebp
mov    %rdx,0x10(%rsp)
lea    (%rdx,%rbp,1),%eax
mov    %eax,0x4(%rsp)
mov    %rcx,0x18(%rsp)
test   %ecx,%ecx
js     11cc <board+0xac>
mov    0x10(%rsp),%rax
mov    0x4(%rsp),%ebx
cmp    %ebx,%eax
cmovg  %eax,%ebx
add    $0x1,%ebx
mov    0x2e37(%rip),%r15
mov    0x8(%rsp),%rax
mov    %eax,%r13d
jmp    119b <board+0x7b>
nopl   0x0(%rax,%rax,1)
add    0x28(%rsp),%r13d
cmp    (%rsp),%r13d
jg     11cc <board+0xac>
mov    0x10(%rsp),%rax
mov    %eax,%r12d
test   %ebp,%ebp
js     1190 <board+0x70>
nopw   0x0(%rax,%rax,1)
mov    (%r15),%ecx
mov    %r14,%rdi
mov    %r13d,%esi
mov    %r12d,%edx
call   1040 <mvwaddch@plt>
add    $0x1,%r12d
cmp    %r12d,%ebx
jne    11b0 <board+0x90>
jmp    1190 <board+0x70>
test   %ebp,%ebp
mov    0x20(%rsp),%r15
js     123a <board+0x11a>
mov    0x8(%rsp),%rax
mov    (%rsp),%r12d
cmp    %r12d,%eax
cmovg  %eax,%r12d
add    $0x1,%r12d
mov    0x2db0(%rip),%r13
mov    0x10(%rsp),%rax
mov    %eax,%ebp
jmp    1209 <board+0xe9>
nopl   0x0(%rax)
add    %r15d,%ebp
cmp    0x4(%rsp),%ebp
jg     123a <board+0x11a>
cmpl   $0x0,0x18(%rsp)
js     1200 <board+0xe0>
mov    0x8(%rsp),%rax
mov    %eax,%ebx
nopw   0x0(%rax,%rax,1)
mov    0x0(%r13),%ecx
mov    %r14,%rdi
mov    %ebx,%esi
mov    %ebp,%edx
call   1040 <mvwaddch@plt>
add    $0x1,%ebx
cmp    %ebx,%r12d
jne    1220 <board+0x100>
jmp    1200 <board+0xe0>
mov    0x2d9f(%rip),%rax
mov    (%rax),%ecx
mov    %r14,%rdi
mov    0x8(%rsp),%rbx
mov    %ebx,%esi
mov    0x10(%rsp),%r13
mov    %r13d,%edx
call   1040 <mvwaddch@plt>
mov    0x2d27(%rip),%rax
mov    (%rax),%ecx
mov    %r14,%rdi
mov    (%rsp),%ebp
mov    %ebp,%esi
mov    %r13d,%edx
call   1040 <mvwaddch@plt>
mov    0x2d46(%rip),%rax
mov    (%rax),%ecx
mov    %r14,%rdi
mov    %ebx,%esi
mov    0x4(%rsp),%r12d
mov    %r12d,%edx
call   1040 <mvwaddch@plt>
mov    0x2d3b(%rip),%rax
mov    (%rax),%ecx
mov    %r14,%rdi
mov    %ebp,%esi
mov    %r12d,%edx
call   1040 <mvwaddch@plt>
mov    %ebp,%ecx
mov    0x28(%rsp),%rax
sub    %eax,%ecx
lea    (%rbx,%rax,1),%ebp
sub    %r15d,%r12d
add    %r13d,%r15d
mov    %ecx,0x34(%rsp)
cmp    %ecx,%ebp
jle    132b <board+0x20b>
cmp    %r12d,%r15d
mov    0x20(%rsp),%rbx
mov    0x8(%rsp),%rbp
mov    (%rsp),%r13d
jg     1315 <board+0x1f5>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    0x2cc9(%rip),%rax
mov    (%rax),%ecx
mov    %r14,%rdi
mov    %ebp,%esi
mov    %r15d,%edx
call   1040 <mvwaddch@plt>
mov    0x2cdb(%rip),%rax
mov    (%rax),%ecx
mov    %r14,%rdi
mov    %r13d,%esi
mov    %r15d,%edx
call   1040 <mvwaddch@plt>
add    %ebx,%r15d
cmp    %r12d,%r15d
jle    12e0 <board+0x1c0>
mov    %r14,%rdi
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <wrefresh@plt>
mov    0x2c76(%rip),%r13
mov    %r15d,0x18(%rsp)
jmp    1353 <board+0x233>
nopl   0x0(%rax)
add    0x28(%rsp),%ebp
cmp    0x34(%rsp),%ebp
mov    0x18(%rsp),%r15d
jg     12be <board+0x19e>
mov    0x2c8e(%rip),%rax
mov    (%rax),%ecx
mov    %r14,%rdi
mov    %ebp,%esi
mov    0x10(%rsp),%rdx
call   1040 <mvwaddch@plt>
mov    0x2c26(%rip),%rax
mov    (%rax),%ecx
mov    %r14,%rdi
mov    %ebp,%esi
mov    0x4(%rsp),%edx
call   1040 <mvwaddch@plt>
cmp    %r12d,%r15d
mov    0x20(%rsp),%r15
jg     1340 <board+0x220>
mov    0x18(%rsp),%ebx
mov    0x0(%r13),%ecx
mov    %r14,%rdi
mov    %ebp,%esi
mov    %ebx,%edx
call   1040 <mvwaddch@plt>
add    %r15d,%ebx
cmp    %r12d,%ebx
jle    1390 <board+0x270>
jmp    1340 <board+0x220>

LLVM IR (-O0):
@ACS_HLINE = global i32 0
@ACS_VLINE = global i32 0
@ACS_ULCORNER = global i32 0
@ACS_LLCORNER = global i32 0
@ACS_URCORNER = global i32 0
@ACS_LRCORNER = global i32 0
@ACS_LTEE = global i32 0
@ACS_RTEE = global i32 0
@ACS_PLUS = global i32 0
@ACS_TTEE = global i32 0
@ACS_BTEE = global i32 0
define void @board(i32* %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6) {
%8 = alloca i32*
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
store i32* %0, i32** %8
store i32 %1, i32* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store i32 %4, i32* %12
store i32 %5, i32* %13
store i32 %6, i32* %14
%19 = load i32, i32* %9
%20 = load i32, i32* %11
%21 = load i32, i32* %14
%22 = mul nsw i32 %20, %21
%23 = add nsw i32 %19, %22
store i32 %23, i32* %15
%24 = load i32, i32* %10
%25 = load i32, i32* %12
%26 = load i32, i32* %13
%27 = mul nsw i32 %25, %26
%28 = add nsw i32 %24, %27
store i32 %28, i32* %16
%29 = load i32, i32* %9
store i32 %29, i32* %18
br label %30
30: ; preds = %50, %7
%31 = load i32, i32* %18
%32 = load i32, i32* %15
%33 = icmp sle i32 %31, %32
br i1 %33, label %34, label %54
34: ; preds = %30
%35 = load i32, i32* %10
store i32 %35, i32* %17
br label %36
36: ; preds = %46, %34
%37 = load i32, i32* %17
%38 = load i32, i32* %16
%39 = icmp sle i32 %37, %38
br i1 %39, label %40, label %49
40: ; preds = %36
%41 = load i32*, i32** %8
%42 = load i32, i32* %18
%43 = load i32, i32* %17
%44 = load i32, i32* @ACS_HLINE
%45 = call i32 @mvwaddch(i32* %41, i32 %42, i32 %43, i32 %44)
br label %46
46: ; preds = %40
%47 = load i32, i32* %17
%48 = add nsw i32 %47, 1
store i32 %48, i32* %17
br label %36
49: ; preds = %36
br label %50
50: ; preds = %49
%51 = load i32, i32* %14
%52 = load i32, i32* %18
%53 = add nsw i32 %52, %51
store i32 %53, i32* %18
br label %30
54: ; preds = %30
%55 = load i32, i32* %10
store i32 %55, i32* %17
br label %56
56: ; preds = %76, %54
%57 = load i32, i32* %17
%58 = load i32, i32* %16
%59 = icmp sle i32 %57, %58
br i1 %59, label %60, label %80
60: ; preds = %56
%61 = load i32, i32* %9
store i32 %61, i32* %18
br label %62
62: ; preds = %72, %60
%63 = load i32, i32* %18
%64 = load i32, i32* %15
%65 = icmp sle i32 %63, %64
br i1 %65, label %66, label %75
66: ; preds = %62
%67 = load i32*, i32** %8
%68 = load i32, i32* %18
%69 = load i32, i32* %17
%70 = load i32, i32* @ACS_VLINE
%71 = call i32 @mvwaddch(i32* %67, i32 %68, i32 %69, i32 %70)
br label %72
72: ; preds = %66
%73 = load i32, i32* %18
%74 = add nsw i32 %73, 1
store i32 %74, i32* %18
br label %62
75: ; preds = %62
br label %76
76: ; preds = %75
%77 = load i32, i32* %13
%78 = load i32, i32* %17
%79 = add nsw i32 %78, %77
store i32 %79, i32* %17
br label %56
80: ; preds = %56
%81 = load i32*, i32** %8
%82 = load i32, i32* %9
%83 = load i32, i32* %10
%84 = load i32, i32* @ACS_ULCORNER
%85 = call i32 @mvwaddch(i32* %81, i32 %82, i32 %83, i32 %84)
%86 = load i32*, i32** %8
%87 = load i32, i32* %15
%88 = load i32, i32* %10
%89 = load i32, i32* @ACS_LLCORNER
%90 = call i32 @mvwaddch(i32* %86, i32 %87, i32 %88, i32 %89)
%91 = load i32*, i32** %8
%92 = load i32, i32* %9
%93 = load i32, i32* %16
%94 = load i32, i32* @ACS_URCORNER
%95 = call i32 @mvwaddch(i32* %91, i32 %92, i32 %93, i32 %94)
%96 = load i32*, i32** %8
%97 = load i32, i32* %15
%98 = load i32, i32* %16
%99 = load i32, i32* @ACS_LRCORNER
%100 = call i32 @mvwaddch(i32* %96, i32 %97, i32 %98, i32 %99)
%101 = load i32, i32* %9
%102 = load i32, i32* %14
%103 = add nsw i32 %101, %102
store i32 %103, i32* %18
br label %104
104: ; preds = %141, %80
%105 = load i32, i32* %18
%106 = load i32, i32* %15
%107 = load i32, i32* %14
%108 = sub nsw i32 %106, %107
%109 = icmp sle i32 %105, %108
br i1 %109, label %110, label %145
110: ; preds = %104
%111 = load i32*, i32** %8
%112 = load i32, i32* %18
%113 = load i32, i32* %10
%114 = load i32, i32* @ACS_LTEE
%115 = call i32 @mvwaddch(i32* %111, i32 %112, i32 %113, i32 %114)
%116 = load i32*, i32** %8
%117 = load i32, i32* %18
%118 = load i32, i32* %16
%119 = load i32, i32* @ACS_RTEE
%120 = call i32 @mvwaddch(i32* %116, i32 %117, i32 %118, i32 %119)
%121 = load i32, i32* %10
%122 = load i32, i32* %13
%123 = add nsw i32 %121, %122
store i32 %123, i32* %17
br label %124
124: ; preds = %136, %110
%125 = load i32, i32* %17
%126 = load i32, i32* %16
%127 = load i32, i32* %13
%128 = sub nsw i32 %126, %127
%129 = icmp sle i32 %125, %128
br i1 %129, label %130, label %140
130: ; preds = %124
%131 = load i32*, i32** %8
%132 = load i32, i32* %18
%133 = load i32, i32* %17
%134 = load i32, i32* @ACS_PLUS
%135 = call i32 @mvwaddch(i32* %131, i32 %132, i32 %133, i32 %134)
br label %136
136: ; preds = %130
%137 = load i32, i32* %13
%138 = load i32, i32* %17
%139 = add nsw i32 %138, %137
store i32 %139, i32* %17
br label %124
140: ; preds = %124
br label %141
141: ; preds = %140
%142 = load i32, i32* %14
%143 = load i32, i32* %18
%144 = add nsw i32 %143, %142
store i32 %144, i32* %18
br label %104
145: ; preds = %104
%146 = load i32, i32* %10
%147 = load i32, i32* %13
%148 = add nsw i32 %146, %147
store i32 %148, i32* %17
br label %149
149: ; preds = %166, %145
%150 = load i32, i32* %17
%151 = load i32, i32* %16
%152 = load i32, i32* %13
%153 = sub nsw i32 %151, %152
%154 = icmp sle i32 %150, %153
br i1 %154, label %155, label %170
155: ; preds = %149
%156 = load i32*, i32** %8
%157 = load i32, i32* %9
%158 = load i32, i32* %17
%159 = load i32, i32* @ACS_TTEE
%160 = call i32 @mvwaddch(i32* %156, i32 %157, i32 %158, i32 %159)
%161 = load i32*, i32** %8
%162 = load i32, i32* %15
%163 = load i32, i32* %17
%164 = load i32, i32* @ACS_BTEE
%165 = call i32 @mvwaddch(i32* %161, i32 %162, i32 %163, i32 %164)
br label %166
166: ; preds = %155
%167 = load i32, i32* %13
%168 = load i32, i32* %17
%169 = add nsw i32 %168, %167
store i32 %169, i32* %17
br label %149
170: ; preds = %149
%171 = load i32*, i32** %8
%172 = call i32 @wrefresh(i32* %171)
ret void
}

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