void make_window8(unsigned char *buf, int xsize, int ysize, char *title,
                  char act) {
  static char closebtn[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 (act != 0) {
    tc = 7;
    tbc = 12;
  } else {
    tc = 8;
    tbc = 15;
  }
  boxfill8(buf, xsize, 8, 0, 0, xsize - 1, 0);
  boxfill8(buf, xsize, 7, 1, 1, xsize - 2, 1);
  boxfill8(buf, xsize, 8, 0, 0, 0, ysize - 1);
  boxfill8(buf, xsize, 7, 1, 1, 1, ysize - 2);
  boxfill8(buf, xsize, 15, xsize - 2, 1, xsize - 2, ysize - 2);
  boxfill8(buf, xsize, 0, xsize - 1, 0, xsize - 1, ysize - 1);
  boxfill8(buf, xsize, 8, 2, 2, xsize - 3, ysize - 3);
  boxfill8(buf, xsize, tbc, 3, 3, xsize - 4, 20);
  boxfill8(buf, xsize, 15, 1, ysize - 2, xsize - 2, ysize - 2);
  boxfill8(buf, xsize, 0, 0, ysize - 1, xsize - 1, ysize - 1);
  putfonts8_asc(buf, xsize, 24, 4, tc, title);
  for (y = 0; y < 14; y++) {
    for (x = 0; x < 16; x++) {
      c = closebtn[y][x];
      if (c == '@') {
        c = 0;
      } else if (c == '$') {
        c = 15;
      } else if (c == 'Q') {
        c = 8;
      } else {
        c = 7;
      }
      buf[(5 + y) * xsize + (xsize - 21 + x)] = c;
    }
  }
  return;
}


x86 assembly (clang, -O0):
<make_window8>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%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),%eax
cmp    $0x0,%eax
je     1156 <make_window8+0x36>
movb   $0x7,-0x26(%rbp)
movb   $0xc,-0x27(%rbp)
jmp    115e <make_window8+0x3e>
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   1030 <boxfill8@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   1030 <boxfill8@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   1030 <boxfill8@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   1030 <boxfill8@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   1030 <boxfill8@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   1030 <boxfill8@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   1030 <boxfill8@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   1030 <boxfill8@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   1030 <boxfill8@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   1030 <boxfill8@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   1040 <putfonts8_asc@plt>
movl   $0x0,-0x24(%rbp)
cmpl   $0xe,-0x24(%rbp)
jge    13fe <make_window8+0x2de>
movl   $0x0,-0x20(%rbp)
cmpl   $0x10,-0x20(%rbp)
jge    13eb <make_window8+0x2cb>
movslq -0x24(%rbp),%rcx
lea    0x2ce6(%rip),%rax
shl    $0x4,%rcx
add    %rcx,%rax
movslq -0x20(%rbp),%rcx
mov    (%rax,%rcx,1),%al
mov    %al,-0x25(%rbp)
movsbl -0x25(%rbp),%eax
cmp    $0x40,%eax
jne    1381 <make_window8+0x261>
movb   $0x0,-0x25(%rbp)
jmp    13bb <make_window8+0x29b>
movsbl -0x25(%rbp),%eax
cmp    $0x24,%eax
jne    1397 <make_window8+0x277>
movb   $0xf,-0x25(%rbp)
jmp    13b6 <make_window8+0x296>
movsbl -0x25(%rbp),%eax
cmp    $0x51,%eax
jne    13ad <make_window8+0x28d>
movb   $0x8,-0x25(%rbp)
jmp    13b1 <make_window8+0x291>
movb   $0x7,-0x25(%rbp)
jmp    13b6 <make_window8+0x296>
jmp    13bb <make_window8+0x29b>
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    1345 <make_window8+0x225>
jmp    13f0 <make_window8+0x2d0>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1334 <make_window8+0x214>
add    $0x30,%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   1030 <boxfill8@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   1030 <boxfill8@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   1030 <boxfill8@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   1030 <boxfill8@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   1030 <boxfill8@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   1030 <boxfill8@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   1030 <boxfill8@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   1030 <boxfill8@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   1030 <boxfill8@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   1030 <boxfill8@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   1040 <putfonts8_asc@plt>
lea    (%r14,%r14,1),%ecx
lea    (%rcx,%rcx,2),%eax
add    $0xffffffec,%eax
mov    %r14d,%r8d
lea    (%rcx,%rcx,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>
movzbl -0x1(%rsi,%rdi,1),%ecx
cmp    $0x51,%cl
je     1370 <make_window8+0x250>
cmp    $0x40,%cl
je     1360 <make_window8+0x240>
cmp    $0x24,%cl
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)
movzbl (%rsi,%rdi,1),%ecx
cmp    $0x24,%cl
je     13b0 <make_window8+0x290>
cmp    $0x40,%cl
je     1330 <make_window8+0x210>
cmp    $0x51,%cl
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.closebtn = 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 %17, 0
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 (...)* @boxfill8 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 (...)* @boxfill8 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 (...)* @boxfill8 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 (...)* @boxfill8 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 (...)* @boxfill8 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 (...)* @boxfill8 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 (...)* @boxfill8 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 (...)* @boxfill8 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 (...)* @boxfill8 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 (...)* @boxfill8 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 (...)* @putfonts8_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 = %148, %21
%99 = load i32, i32* %12
%100 = icmp slt i32 %99, 14
br i1 %100, label %101, label %151
101: ; preds = %98
store i32 0, i32* %11
br label %102
102: ; preds = %144, %101
%103 = load i32, i32* %11
%104 = icmp slt i32 %103, 16
br i1 %104, label %105, label %147
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.closebtn, 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
%115 = icmp eq i32 %114, 64
br i1 %115, label %116, label %117
116: ; preds = %105
store i8 0, i8* %13
br label %130
117: ; preds = %105
%118 = load i8, i8* %13
%119 = sext i8 %118 to i32
%120 = icmp eq i32 %119, 36
br i1 %120, label %121, label %122
121: ; preds = %117
store i8 15, i8* %13
br label %129
122: ; preds = %117
%123 = load i8, i8* %13
%124 = sext i8 %123 to i32
%125 = icmp eq i32 %124, 81
br i1 %125, label %126, label %127
126: ; preds = %122
store i8 8, i8* %13
br label %128
127: ; preds = %122
store i8 7, i8* %13
br label %128
128: ; preds = %127, %126
br label %129
129: ; preds = %128, %121
br label %130
130: ; preds = %129, %116
%131 = load i8, i8* %13
%132 = load i8*, i8** %6
%133 = load i32, i32* %12
%134 = add nsw i32 5, %133
%135 = load i32, i32* %7
%136 = mul nsw i32 %134, %135
%137 = load i32, i32* %7
%138 = sub nsw i32 %137, 21
%139 = load i32, i32* %11
%140 = add nsw i32 %138, %139
%141 = add nsw i32 %136, %140
%142 = sext i32 %141 to i64
%143 = getelementptr inbounds i8, i8* %132, i64 %142
store i8 %131, i8* %143
br label %144
144: ; preds = %130
%145 = load i32, i32* %11
%146 = add nsw i32 %145, 1
store i32 %146, i32* %11
br label %102
147: ; preds = %102
br label %148
148: ; preds = %147
%149 = load i32, i32* %12
%150 = add nsw i32 %149, 1
store i32 %150, i32* %12
br label %98
151: ; preds = %98
ret void
}

LLVM IR (-O2):
@make_window8.closebtn = 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 (...)* @boxfill8 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 (...)* @boxfill8 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 (...)* @boxfill8 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 (...)* @boxfill8 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 (...)* @boxfill8 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 (...)* @boxfill8 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 (...)* @boxfill8 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 (...)* @boxfill8 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 (...)* @boxfill8 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 (...)* @boxfill8 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 (...)* @putfonts8_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, %61
%29 = phi i64 [ 0, %5 ], [ %62, %61 ]
%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 = %53, %28
%35 = phi i64 [ 0, %28 ], [ %59, %53 ]
%36 = getelementptr inbounds [14 x [16 x i8]], [14 x [16 x i8]]* @make_window8.closebtn, i64 0, i64 %29, i64 %35
%37 = load i8, i8* %36
switch i8 %37, label %40 [
i8 64, label %41
i8 36, label %38
i8 81, label %39
]
38: ; preds = %34
br label %41
39: ; preds = %34
br label %41
40: ; preds = %34
br label %41
41: ; preds = %34, %38, %40, %39
%42 = phi i8 [ 15, %38 ], [ 8, %39 ], [ 7, %40 ], [ 0, %34 ]
%43 = trunc i64 %35 to i32
%44 = add i32 %33, %43
%45 = sext i32 %44 to i64
%46 = getelementptr inbounds i8, i8* %0, i64 %45
store i8 %42, i8* %46
%47 = or i64 %35, 1
%48 = getelementptr inbounds [14 x [16 x i8]], [14 x [16 x i8]]* @make_window8.closebtn, i64 0, i64 %29, i64 %47
%49 = load i8, i8* %48
switch i8 %49, label %52 [
i8 64, label %53
i8 36, label %51
i8 81, label %50
]
50: ; preds = %41
br label %53
51: ; preds = %41
br label %53
52: ; preds = %41
br label %53
53: ; preds = %52, %51, %50, %41
%54 = phi i8 [ 15, %51 ], [ 8, %50 ], [ 7, %52 ], [ 0, %41 ]
%55 = trunc i64 %47 to i32
%56 = add i32 %33, %55
%57 = sext i32 %56 to i64
%58 = getelementptr inbounds i8, i8* %0, i64 %57
store i8 %54, i8* %58
%59 = add nuw nsw i64 %35, 2
%60 = icmp eq i64 %59, 16
br i1 %60, label %61, label %34
61: ; preds = %53
%62 = add nuw nsw i64 %29, 1
%63 = icmp eq i64 %62, 14
br i1 %63, label %64, label %28
64: ; preds = %61
ret void
}