void make_window8(unsigned char *buf, int width, int height, char *title,
                  char act) {
  static char s_close_btn[14][16] = {
      "OOOOOOOOOOOOOOO@", "OQQQQQQQQQQQQQ$@", "OQQQQQQQQQQQQQ$@",
      "OQQQ@@QQQQ@@QQ$@", "OQQQQ@@QQ@@QQQ$@", "OQQQQQ@@@@QQQQ$@",
      "OQQQQQQ@@QQQQQ$@", "OQQQQQ@@@@QQQQ$@", "OQQQQ@@QQ@@QQQ$@",
      "OQQQ@@QQQQ@@QQ$@", "OQQQQQQQQQQQQQ$@", "OQQQQQQQQQQQQQ$@",
      "O$$$$$$$$$$$$$$@", "@@@@@@@@@@@@@@@@",
  };
  int x, y;
  char c, tc, tbc;
  if (0 != act) {
    tc = (7);
    tbc = (12);
  } else {
    tc = (8);
    tbc = (15);
  }
  fill_box8(buf, width, (8), 0, 0, width - 1, 0);
  fill_box8(buf, width, (7), 1, 1, width - 2, 1);
  fill_box8(buf, width, (8), 0, 0, 0, height - 1);
  fill_box8(buf, width, (7), 1, 1, 1, height - 2);
  fill_box8(buf, width, (15), width - 2, 1, width - 2, height - 2);
  fill_box8(buf, width, (0), width - 1, 0, width - 1, height - 1);
  fill_box8(buf, width, (8), 2, 2, width - 3, height - 3);
  fill_box8(buf, width, tbc, 3, 3, width - 4, 20);
  fill_box8(buf, width, (15), 1, height - 2, width - 2, height - 2);
  fill_box8(buf, width, (0), 0, height - 1, width - 1, height - 1);
  draw_font8_asc(buf, width, 24, 4, tc, title);
  for (y = 0; y < 14; ++y) {
    for (x = 0; x < 16; ++x) {
      c = s_close_btn[y][x];
      switch (c) {
      case '@':
        c = (0);
        break;
      case '$':
        c = (15);
        break;
      case 'Q':
        c = (8);
        break;
      default:
        c = (7);
      }
      buf[(5 + y) * width + (width - 21 + x)] = c;
    }
  }
}


x86 assembly (clang, -O0):
<make_window8>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %r8b,%al
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %al,-0x19(%rbp)
movsbl -0x19(%rbp),%ecx
xor    %eax,%eax
cmp    %ecx,%eax
je     1157 <make_window8+0x37>
movb   $0x7,-0x26(%rbp)
movb   $0xc,-0x27(%rbp)
jmp    115f <make_window8+0x3f>
movb   $0x8,-0x26(%rbp)
movb   $0xf,-0x27(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0xc(%rbp),%r9d
sub    $0x1,%r9d
mov    $0x8,%edx
xor    %r8d,%r8d
mov    %r8d,%ecx
movl   $0x0,(%rsp)
mov    $0x0,%al
call   1040 <fill_box8@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0xc(%rbp),%r9d
sub    $0x2,%r9d
mov    $0x7,%edx
mov    $0x1,%r8d
mov    %r8d,%ecx
movl   $0x1,(%rsp)
mov    $0x0,%al
call   1040 <fill_box8@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%eax
sub    $0x1,%eax
mov    $0x8,%edx
xor    %r9d,%r9d
mov    %r9d,%ecx
mov    %r9d,%r8d
mov    %eax,(%rsp)
mov    $0x0,%al
call   1040 <fill_box8@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%eax
sub    $0x2,%eax
mov    $0x7,%edx
mov    $0x1,%r9d
mov    %r9d,%ecx
mov    %r9d,%r8d
mov    %eax,(%rsp)
mov    $0x0,%al
call   1040 <fill_box8@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0xc(%rbp),%ecx
sub    $0x2,%ecx
mov    -0xc(%rbp),%r9d
sub    $0x2,%r9d
mov    -0x10(%rbp),%eax
sub    $0x2,%eax
mov    $0xf,%edx
mov    $0x1,%r8d
mov    %eax,(%rsp)
mov    $0x0,%al
call   1040 <fill_box8@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
mov    -0xc(%rbp),%r9d
sub    $0x1,%r9d
mov    -0x10(%rbp),%eax
sub    $0x1,%eax
xor    %r8d,%r8d
mov    %r8d,%edx
mov    %eax,(%rsp)
mov    $0x0,%al
call   1040 <fill_box8@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0xc(%rbp),%r9d
sub    $0x3,%r9d
mov    -0x10(%rbp),%eax
sub    $0x3,%eax
mov    $0x8,%edx
mov    $0x2,%r8d
mov    %r8d,%ecx
mov    %eax,(%rsp)
mov    $0x0,%al
call   1040 <fill_box8@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
movsbl -0x27(%rbp),%edx
mov    -0xc(%rbp),%r9d
sub    $0x4,%r9d
mov    $0x3,%r8d
mov    %r8d,%ecx
movl   $0x14,(%rsp)
mov    $0x0,%al
call   1040 <fill_box8@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%r8d
sub    $0x2,%r8d
mov    -0xc(%rbp),%r9d
sub    $0x2,%r9d
mov    -0x10(%rbp),%eax
sub    $0x2,%eax
mov    $0xf,%edx
mov    $0x1,%ecx
mov    %eax,(%rsp)
mov    $0x0,%al
call   1040 <fill_box8@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%r8d
sub    $0x1,%r8d
mov    -0xc(%rbp),%r9d
sub    $0x1,%r9d
mov    -0x10(%rbp),%eax
sub    $0x1,%eax
xor    %ecx,%ecx
mov    %ecx,%edx
mov    %eax,(%rsp)
mov    $0x0,%al
call   1040 <fill_box8@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
movsbl -0x26(%rbp),%r8d
mov    -0x18(%rbp),%r9
mov    $0x18,%edx
mov    $0x4,%ecx
mov    $0x0,%al
call   1030 <draw_font8_asc@plt>
movl   $0x0,-0x24(%rbp)
cmpl   $0xe,-0x24(%rbp)
jge    1405 <make_window8+0x2e5>
movl   $0x0,-0x20(%rbp)
cmpl   $0x10,-0x20(%rbp)
jge    13f2 <make_window8+0x2d2>
movslq -0x24(%rbp),%rax
shl    $0x4,%rax
lea    0x2ce1(%rip),%rcx
add    %rax,%rcx
movslq -0x20(%rbp),%rax
mov    (%rax,%rcx,1),%al
mov    %al,-0x25(%rbp)
movsbl -0x25(%rbp),%eax
mov    %eax,-0x2c(%rbp)
sub    $0x24,%eax
je     13ac <make_window8+0x28c>
jmp    1381 <make_window8+0x261>
mov    -0x2c(%rbp),%eax
sub    $0x40,%eax
je     13a3 <make_window8+0x283>
jmp    1392 <make_window8+0x272>
mov    -0x2c(%rbp),%eax
sub    $0x51,%eax
je     13b5 <make_window8+0x295>
jmp    13be <make_window8+0x29e>
movb   $0x0,-0x25(%rbp)
jmp    13c2 <make_window8+0x2a2>
movb   $0xf,-0x25(%rbp)
jmp    13c2 <make_window8+0x2a2>
movb   $0x8,-0x25(%rbp)
jmp    13c2 <make_window8+0x2a2>
movb   $0x7,-0x25(%rbp)
mov    -0x25(%rbp),%dl
mov    -0x8(%rbp),%rax
mov    -0x24(%rbp),%ecx
add    $0x5,%ecx
imul   -0xc(%rbp),%ecx
mov    -0xc(%rbp),%esi
sub    $0x15,%esi
add    -0x20(%rbp),%esi
add    %esi,%ecx
movslq %ecx,%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    1346 <make_window8+0x226>
jmp    13f7 <make_window8+0x2d7>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1335 <make_window8+0x215>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<make_window8>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
mov    %rcx,0x20(%rsp)
mov    %edx,%r12d
mov    %esi,%r14d
mov    %rdi,%rbx
xor    %eax,%eax
test   %r8b,%r8b
sete   %al
lea    (%rax,%rax,2),%ecx
add    $0x7,%eax
mov    %eax,0x1c(%rsp)
or     $0xc,%ecx
mov    %ecx,0x18(%rsp)
lea    -0x1(%r14),%r9d
mov    %r9d,0x14(%rsp)
movl   $0x0,(%rsp)
xor    %r15d,%r15d
mov    $0x8,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %eax,%eax
call   1040 <fill_box8@plt>
lea    -0x2(%r14),%r9d
mov    %r9d,0x10(%rsp)
movl   $0x1,(%rsp)
mov    %rbx,%rdi
mov    %r14d,%esi
mov    $0x7,%edx
mov    $0x1,%ecx
mov    $0x1,%r8d
xor    %eax,%eax
call   1040 <fill_box8@plt>
lea    -0x1(%r12),%r13d
mov    %r13d,(%rsp)
mov    %rbx,%rdi
mov    %r14d,%esi
mov    $0x8,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
xor    %eax,%eax
call   1040 <fill_box8@plt>
lea    -0x2(%r12),%ebp
mov    %ebp,(%rsp)
mov    %rbx,%rdi
mov    %r14d,%esi
mov    $0x7,%edx
mov    $0x1,%ecx
mov    $0x1,%r8d
mov    $0x1,%r9d
xor    %eax,%eax
call   1040 <fill_box8@plt>
mov    %ebp,(%rsp)
mov    %rbx,%rdi
mov    %r14d,%esi
mov    $0xf,%edx
mov    0x10(%rsp),%ecx
mov    $0x1,%r8d
mov    %ecx,%r9d
xor    %eax,%eax
call   1040 <fill_box8@plt>
mov    %r13d,(%rsp)
mov    %rbx,%rdi
mov    %r14d,%esi
xor    %edx,%edx
mov    0x14(%rsp),%ecx
xor    %r8d,%r8d
mov    %ecx,%r9d
xor    %eax,%eax
call   1040 <fill_box8@plt>
lea    -0x3(%r14),%r9d
add    $0xfffffffd,%r12d
mov    %r12d,(%rsp)
mov    %rbx,%rdi
mov    %r14d,%esi
mov    $0x8,%edx
mov    $0x2,%ecx
mov    $0x2,%r8d
xor    %eax,%eax
call   1040 <fill_box8@plt>
lea    -0x4(%r14),%r9d
movl   $0x14,(%rsp)
mov    %rbx,%rdi
mov    %r14d,%esi
mov    0x18(%rsp),%edx
mov    $0x3,%ecx
mov    $0x3,%r8d
xor    %eax,%eax
call   1040 <fill_box8@plt>
mov    %ebp,(%rsp)
mov    %rbx,%rdi
mov    %r14d,%esi
mov    $0xf,%edx
mov    $0x1,%ecx
mov    %ebp,%r8d
mov    0x10(%rsp),%r9d
xor    %eax,%eax
call   1040 <fill_box8@plt>
mov    %r13d,(%rsp)
mov    %rbx,%rdi
mov    %r14d,%esi
xor    %edx,%edx
xor    %ecx,%ecx
mov    %r13d,%r8d
mov    0x14(%rsp),%r9d
xor    %eax,%eax
call   1040 <fill_box8@plt>
mov    %rbx,%rdi
mov    %r14d,%esi
mov    $0x18,%edx
mov    $0x4,%ecx
mov    0x1c(%rsp),%r8d
mov    0x20(%rsp),%r9
xor    %eax,%eax
call   1030 <draw_font8_asc@plt>
lea    (%r14,%r14,1),%edx
lea    (%rdx,%rdx,2),%eax
add    $0xffffffec,%eax
mov    %r14d,%r8d
lea    (%rdx,%rdx,2),%edx
add    $0xffffffea,%edx
or     $0x1,%rdx
lea    0xd00(%rip),%rsi
jmp    1328 <make_window8+0x208>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
add    $0x1,%r15
add    $0x10,%rsi
add    %r8,%rax
add    %r8,%rdx
cmp    $0xe,%r15
je     13c8 <make_window8+0x2a8>
xor    %edi,%edi
jmp    1346 <make_window8+0x226>
nopl   0x0(%rax)
xor    %ebp,%ebp
lea    (%rax,%rdi,1),%ecx
movslq %ecx,%rcx
mov    %bpl,(%rbx,%rcx,1)
add    $0x2,%rdi
cmp    $0x10,%rdi
je     1310 <make_window8+0x1f0>
movsbl -0x1(%rsi,%rdi,1),%ebp
cmp    $0x51,%ebp
je     1370 <make_window8+0x250>
cmp    $0x40,%ebp
je     1360 <make_window8+0x240>
cmp    $0x24,%ebp
jne    1380 <make_window8+0x260>
mov    $0xf,%bpl
jmp    1383 <make_window8+0x263>
nop
xor    %ebp,%ebp
jmp    1383 <make_window8+0x263>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    $0x8,%bpl
jmp    1383 <make_window8+0x263>
cs nopw 0x0(%rax,%rax,1)
nop
mov    $0x7,%bpl
lea    (%rdx,%rdi,1),%ecx
movslq %ecx,%rcx
mov    %bpl,(%rbx,%rcx,1)
movsbl (%rsi,%rdi,1),%ebp
cmp    $0x24,%ebp
je     13b0 <make_window8+0x290>
cmp    $0x40,%ebp
je     1330 <make_window8+0x210>
cmp    $0x51,%ebp
jne    13c0 <make_window8+0x2a0>
mov    $0x8,%bpl
jmp    1332 <make_window8+0x212>
cs nopw 0x0(%rax,%rax,1)
nop
mov    $0xf,%bpl
jmp    1332 <make_window8+0x212>
nopl   0x0(%rax,%rax,1)
mov    $0x7,%bpl
jmp    1332 <make_window8+0x212>
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@make_window8.s_close_btn = internal global [14 x [16 x i8]] [[16 x i8] c"OOOOOOOOOOOOOOO@", [16 x i8] c"OQQQQQQQQQQQQQ$@", [16 x i8] c"OQQQQQQQQQQQQQ$@", [16 x i8] c"OQQQ@@QQQQ@@QQ$@", [16 x i8] c"OQQQQ@@QQ@@QQQ$@", [16 x i8] c"OQQQQQ@@@@QQQQ$@", [16 x i8] c"OQQQQQQ@@QQQQQ$@", [16 x i8] c"OQQQQQ@@@@QQQQ$@", [16 x i8] c"OQQQQ@@QQ@@QQQ$@", [16 x i8] c"OQQQ@@QQQQ@@QQ$@", [16 x i8] c"OQQQQQQQQQQQQQ$@", [16 x i8] c"OQQQQQQQQQQQQQ$@", [16 x i8] c"O$$$$$$$$$$$$$$@", [16 x i8] c"@@@@@@@@@@@@@@@@"]
define void @make_window8(i8* %0, i32 %1, i32 %2, i8* %3, i8 signext %4) {
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i8*
%10 = alloca i8
%11 = alloca i32
%12 = alloca i32
%13 = alloca i8
%14 = alloca i8
%15 = alloca i8
store i8* %0, i8** %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i8* %3, i8** %9
store i8 %4, i8* %10
%16 = load i8, i8* %10
%17 = sext i8 %16 to i32
%18 = icmp ne i32 0, %17
br i1 %18, label %19, label %20
19: ; preds = %5
store i8 7, i8* %14
store i8 12, i8* %15
br label %21
20: ; preds = %5
store i8 8, i8* %14
store i8 15, i8* %15
br label %21
21: ; preds = %20, %19
%22 = load i8*, i8** %6
%23 = load i32, i32* %7
%24 = load i32, i32* %7
%25 = sub nsw i32 %24, 1
%26 = call i32 (i8*, i32, i32, i32, i32, i32, i32, ...) bitcast (i32 (...)* @fill_box8 to i32 (i8*, i32, i32, i32, i32, i32, i32, ...)*)(i8* %22, i32 %23, i32 8, i32 0, i32 0, i32 %25, i32 0)
%27 = load i8*, i8** %6
%28 = load i32, i32* %7
%29 = load i32, i32* %7
%30 = sub nsw i32 %29, 2
%31 = call i32 (i8*, i32, i32, i32, i32, i32, i32, ...) bitcast (i32 (...)* @fill_box8 to i32 (i8*, i32, i32, i32, i32, i32, i32, ...)*)(i8* %27, i32 %28, i32 7, i32 1, i32 1, i32 %30, i32 1)
%32 = load i8*, i8** %6
%33 = load i32, i32* %7
%34 = load i32, i32* %8
%35 = sub nsw i32 %34, 1
%36 = call i32 (i8*, i32, i32, i32, i32, i32, i32, ...) bitcast (i32 (...)* @fill_box8 to i32 (i8*, i32, i32, i32, i32, i32, i32, ...)*)(i8* %32, i32 %33, i32 8, i32 0, i32 0, i32 0, i32 %35)
%37 = load i8*, i8** %6
%38 = load i32, i32* %7
%39 = load i32, i32* %8
%40 = sub nsw i32 %39, 2
%41 = call i32 (i8*, i32, i32, i32, i32, i32, i32, ...) bitcast (i32 (...)* @fill_box8 to i32 (i8*, i32, i32, i32, i32, i32, i32, ...)*)(i8* %37, i32 %38, i32 7, i32 1, i32 1, i32 1, i32 %40)
%42 = load i8*, i8** %6
%43 = load i32, i32* %7
%44 = load i32, i32* %7
%45 = sub nsw i32 %44, 2
%46 = load i32, i32* %7
%47 = sub nsw i32 %46, 2
%48 = load i32, i32* %8
%49 = sub nsw i32 %48, 2
%50 = call i32 (i8*, i32, i32, i32, i32, i32, i32, ...) bitcast (i32 (...)* @fill_box8 to i32 (i8*, i32, i32, i32, i32, i32, i32, ...)*)(i8* %42, i32 %43, i32 15, i32 %45, i32 1, i32 %47, i32 %49)
%51 = load i8*, i8** %6
%52 = load i32, i32* %7
%53 = load i32, i32* %7
%54 = sub nsw i32 %53, 1
%55 = load i32, i32* %7
%56 = sub nsw i32 %55, 1
%57 = load i32, i32* %8
%58 = sub nsw i32 %57, 1
%59 = call i32 (i8*, i32, i32, i32, i32, i32, i32, ...) bitcast (i32 (...)* @fill_box8 to i32 (i8*, i32, i32, i32, i32, i32, i32, ...)*)(i8* %51, i32 %52, i32 0, i32 %54, i32 0, i32 %56, i32 %58)
%60 = load i8*, i8** %6
%61 = load i32, i32* %7
%62 = load i32, i32* %7
%63 = sub nsw i32 %62, 3
%64 = load i32, i32* %8
%65 = sub nsw i32 %64, 3
%66 = call i32 (i8*, i32, i32, i32, i32, i32, i32, ...) bitcast (i32 (...)* @fill_box8 to i32 (i8*, i32, i32, i32, i32, i32, i32, ...)*)(i8* %60, i32 %61, i32 8, i32 2, i32 2, i32 %63, i32 %65)
%67 = load i8*, i8** %6
%68 = load i32, i32* %7
%69 = load i8, i8* %15
%70 = sext i8 %69 to i32
%71 = load i32, i32* %7
%72 = sub nsw i32 %71, 4
%73 = call i32 (i8*, i32, i32, i32, i32, i32, i32, ...) bitcast (i32 (...)* @fill_box8 to i32 (i8*, i32, i32, i32, i32, i32, i32, ...)*)(i8* %67, i32 %68, i32 %70, i32 3, i32 3, i32 %72, i32 20)
%74 = load i8*, i8** %6
%75 = load i32, i32* %7
%76 = load i32, i32* %8
%77 = sub nsw i32 %76, 2
%78 = load i32, i32* %7
%79 = sub nsw i32 %78, 2
%80 = load i32, i32* %8
%81 = sub nsw i32 %80, 2
%82 = call i32 (i8*, i32, i32, i32, i32, i32, i32, ...) bitcast (i32 (...)* @fill_box8 to i32 (i8*, i32, i32, i32, i32, i32, i32, ...)*)(i8* %74, i32 %75, i32 15, i32 1, i32 %77, i32 %79, i32 %81)
%83 = load i8*, i8** %6
%84 = load i32, i32* %7
%85 = load i32, i32* %8
%86 = sub nsw i32 %85, 1
%87 = load i32, i32* %7
%88 = sub nsw i32 %87, 1
%89 = load i32, i32* %8
%90 = sub nsw i32 %89, 1
%91 = call i32 (i8*, i32, i32, i32, i32, i32, i32, ...) bitcast (i32 (...)* @fill_box8 to i32 (i8*, i32, i32, i32, i32, i32, i32, ...)*)(i8* %83, i32 %84, i32 0, i32 0, i32 %86, i32 %88, i32 %90)
%92 = load i8*, i8** %6
%93 = load i32, i32* %7
%94 = load i8, i8* %14
%95 = sext i8 %94 to i32
%96 = load i8*, i8** %9
%97 = call i32 (i8*, i32, i32, i32, i32, i8*, ...) bitcast (i32 (...)* @draw_font8_asc to i32 (i8*, i32, i32, i32, i32, i8*, ...)*)(i8* %92, i32 %93, i32 24, i32 4, i32 %95, i8* %96)
store i32 0, i32* %12
br label %98
98: ; preds = %137, %21
%99 = load i32, i32* %12
%100 = icmp slt i32 %99, 14
br i1 %100, label %101, label %140
101: ; preds = %98
store i32 0, i32* %11
br label %102
102: ; preds = %133, %101
%103 = load i32, i32* %11
%104 = icmp slt i32 %103, 16
br i1 %104, label %105, label %136
105: ; preds = %102
%106 = load i32, i32* %12
%107 = sext i32 %106 to i64
%108 = getelementptr inbounds [14 x [16 x i8]], [14 x [16 x i8]]* @make_window8.s_close_btn, i64 0, i64 %107
%109 = load i32, i32* %11
%110 = sext i32 %109 to i64
%111 = getelementptr inbounds [16 x i8], [16 x i8]* %108, i64 0, i64 %110
%112 = load i8, i8* %111
store i8 %112, i8* %13
%113 = load i8, i8* %13
%114 = sext i8 %113 to i32
switch i32 %114, label %118 [
i32 64, label %115
i32 36, label %116
i32 81, label %117
]
115: ; preds = %105
store i8 0, i8* %13
br label %119
116: ; preds = %105
store i8 15, i8* %13
br label %119
117: ; preds = %105
store i8 8, i8* %13
br label %119
118: ; preds = %105
store i8 7, i8* %13
br label %119
119: ; preds = %118, %117, %116, %115
%120 = load i8, i8* %13
%121 = load i8*, i8** %6
%122 = load i32, i32* %12
%123 = add nsw i32 5, %122
%124 = load i32, i32* %7
%125 = mul nsw i32 %123, %124
%126 = load i32, i32* %7
%127 = sub nsw i32 %126, 21
%128 = load i32, i32* %11
%129 = add nsw i32 %127, %128
%130 = add nsw i32 %125, %129
%131 = sext i32 %130 to i64
%132 = getelementptr inbounds i8, i8* %121, i64 %131
store i8 %120, i8* %132
br label %133
133: ; preds = %119
%134 = load i32, i32* %11
%135 = add nsw i32 %134, 1
store i32 %135, i32* %11
br label %102
136: ; preds = %102
br label %137
137: ; preds = %136
%138 = load i32, i32* %12
%139 = add nsw i32 %138, 1
store i32 %139, i32* %12
br label %98
140: ; preds = %98
ret void
}

LLVM IR (-O2):
@make_window8.s_close_btn = internal unnamed_addr constant [14 x [16 x i8]] [[16 x i8] c"OOOOOOOOOOOOOOO@", [16 x i8] c"OQQQQQQQQQQQQQ$@", [16 x i8] c"OQQQQQQQQQQQQQ$@", [16 x i8] c"OQQQ@@QQQQ@@QQ$@", [16 x i8] c"OQQQQ@@QQ@@QQQ$@", [16 x i8] c"OQQQQQ@@@@QQQQ$@", [16 x i8] c"OQQQQQQ@@QQQQQ$@", [16 x i8] c"OQQQQQ@@@@QQQQ$@", [16 x i8] c"OQQQQ@@QQ@@QQQ$@", [16 x i8] c"OQQQ@@QQQQ@@QQ$@", [16 x i8] c"OQQQQQQQQQQQQQ$@", [16 x i8] c"OQQQQQQQQQQQQQ$@", [16 x i8] c"O$$$$$$$$$$$$$$@", [16 x i8] c"@@@@@@@@@@@@@@@@"]
define void @make_window8(i8* %0, i32 %1, i32 %2, i8* %3, i8 signext %4) {
%6 = icmp eq i8 %4, 0
%7 = select i1 %6, i32 8, i32 7
%8 = select i1 %6, i32 15, i32 12
%9 = add nsw i32 %1, -1
%10 = tail call i32 (i8*, i32, i32, i32, i32, i32, i32, ...) bitcast (i32 (...)* @fill_box8 to i32 (i8*, i32, i32, i32, i32, i32, i32, ...)*)(i8* %0, i32 %1, i32 8, i32 0, i32 0, i32 %9, i32 0)
%11 = add nsw i32 %1, -2
%12 = tail call i32 (i8*, i32, i32, i32, i32, i32, i32, ...) bitcast (i32 (...)* @fill_box8 to i32 (i8*, i32, i32, i32, i32, i32, i32, ...)*)(i8* %0, i32 %1, i32 7, i32 1, i32 1, i32 %11, i32 1)
%13 = add nsw i32 %2, -1
%14 = tail call i32 (i8*, i32, i32, i32, i32, i32, i32, ...) bitcast (i32 (...)* @fill_box8 to i32 (i8*, i32, i32, i32, i32, i32, i32, ...)*)(i8* %0, i32 %1, i32 8, i32 0, i32 0, i32 0, i32 %13)
%15 = add nsw i32 %2, -2
%16 = tail call i32 (i8*, i32, i32, i32, i32, i32, i32, ...) bitcast (i32 (...)* @fill_box8 to i32 (i8*, i32, i32, i32, i32, i32, i32, ...)*)(i8* %0, i32 %1, i32 7, i32 1, i32 1, i32 1, i32 %15)
%17 = tail call i32 (i8*, i32, i32, i32, i32, i32, i32, ...) bitcast (i32 (...)* @fill_box8 to i32 (i8*, i32, i32, i32, i32, i32, i32, ...)*)(i8* %0, i32 %1, i32 15, i32 %11, i32 1, i32 %11, i32 %15)
%18 = tail call i32 (i8*, i32, i32, i32, i32, i32, i32, ...) bitcast (i32 (...)* @fill_box8 to i32 (i8*, i32, i32, i32, i32, i32, i32, ...)*)(i8* %0, i32 %1, i32 0, i32 %9, i32 0, i32 %9, i32 %13)
%19 = add nsw i32 %1, -3
%20 = add nsw i32 %2, -3
%21 = tail call i32 (i8*, i32, i32, i32, i32, i32, i32, ...) bitcast (i32 (...)* @fill_box8 to i32 (i8*, i32, i32, i32, i32, i32, i32, ...)*)(i8* %0, i32 %1, i32 8, i32 2, i32 2, i32 %19, i32 %20)
%22 = add nsw i32 %1, -4
%23 = tail call i32 (i8*, i32, i32, i32, i32, i32, i32, ...) bitcast (i32 (...)* @fill_box8 to i32 (i8*, i32, i32, i32, i32, i32, i32, ...)*)(i8* %0, i32 %1, i32 %8, i32 3, i32 3, i32 %22, i32 20)
%24 = tail call i32 (i8*, i32, i32, i32, i32, i32, i32, ...) bitcast (i32 (...)* @fill_box8 to i32 (i8*, i32, i32, i32, i32, i32, i32, ...)*)(i8* %0, i32 %1, i32 15, i32 1, i32 %15, i32 %11, i32 %15)
%25 = tail call i32 (i8*, i32, i32, i32, i32, i32, i32, ...) bitcast (i32 (...)* @fill_box8 to i32 (i8*, i32, i32, i32, i32, i32, i32, ...)*)(i8* %0, i32 %1, i32 0, i32 0, i32 %13, i32 %9, i32 %13)
%26 = tail call i32 (i8*, i32, i32, i32, i32, i8*, ...) bitcast (i32 (...)* @draw_font8_asc to i32 (i8*, i32, i32, i32, i32, i8*, ...)*)(i8* %0, i32 %1, i32 24, i32 4, i32 %7, i8* %3)
%27 = add nsw i32 %1, -21
br label %28
28: ; preds = %5, %63
%29 = phi i64 [ 0, %5 ], [ %64, %63 ]
%30 = trunc i64 %29 to i32
%31 = add i32 %30, 5
%32 = mul nsw i32 %31, %1
%33 = add i32 %27, %32
br label %34
34: ; preds = %55, %28
%35 = phi i64 [ 0, %28 ], [ %61, %55 ]
%36 = getelementptr inbounds [14 x [16 x i8]], [14 x [16 x i8]]* @make_window8.s_close_btn, i64 0, i64 %29, i64 %35
%37 = load i8, i8* %36
%38 = sext i8 %37 to i32
switch i32 %38, label %41 [
i32 64, label %42
i32 36, label %39
i32 81, label %40
]
39: ; preds = %34
br label %42
40: ; preds = %34
br label %42
41: ; preds = %34
br label %42
42: ; preds = %34, %41, %40, %39
%43 = phi i8 [ 7, %41 ], [ 8, %40 ], [ 15, %39 ], [ 0, %34 ]
%44 = trunc i64 %35 to i32
%45 = add i32 %33, %44
%46 = sext i32 %45 to i64
%47 = getelementptr inbounds i8, i8* %0, i64 %46
store i8 %43, i8* %47
%48 = or i64 %35, 1
%49 = getelementptr inbounds [14 x [16 x i8]], [14 x [16 x i8]]* @make_window8.s_close_btn, i64 0, i64 %29, i64 %48
%50 = load i8, i8* %49
%51 = sext i8 %50 to i32
switch i32 %51, label %54 [
i32 64, label %55
i32 36, label %53
i32 81, label %52
]
52: ; preds = %42
br label %55
53: ; preds = %42
br label %55
54: ; preds = %42
br label %55
55: ; preds = %54, %53, %52, %42
%56 = phi i8 [ 7, %54 ], [ 8, %52 ], [ 15, %53 ], [ 0, %42 ]
%57 = trunc i64 %48 to i32
%58 = add i32 %33, %57
%59 = sext i32 %58 to i64
%60 = getelementptr inbounds i8, i8* %0, i64 %59
store i8 %56, i8* %60
%61 = add nuw nsw i64 %35, 2
%62 = icmp eq i64 %61, 16
br i1 %62, label %63, label %34
63: ; preds = %55
%64 = add nuw nsw i64 %29, 1
%65 = icmp eq i64 %64, 14
br i1 %65, label %66, label %28
66: ; preds = %63
ret void
}