#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*/ boxfill8(char *, int, int, int, int, int, int);
void init_screen(char *vram, int x, int y) {
  boxfill8(vram, x, 14, 0, 0, x - 1, y - 29);
  boxfill8(vram, x, 8, 0, y - 28, x - 1, y - 28);
  boxfill8(vram, x, 7, 0, y - 27, x - 1, y - 27);
  boxfill8(vram, x, 8, 0, y - 26, x - 1, y - 1);
  boxfill8(vram, x, 7, 3, y - 24, 59, y - 24);
  boxfill8(vram, x, 7, 2, y - 24, 2, y - 4);
  boxfill8(vram, x, 15, 3, y - 4, 59, y - 4);
  boxfill8(vram, x, 15, 59, y - 23, 59, y - 5);
  boxfill8(vram, x, 0, 2, y - 3, 59, y - 3);
  boxfill8(vram, x, 0, 60, y - 24, 60, y - 3);
  boxfill8(vram, x, 15, x - 47, y - 24, x - 4, y - 24);
  boxfill8(vram, x, 15, x - 47, y - 23, x - 47, y - 4);
  boxfill8(vram, x, 7, x - 47, y - 3, x - 4, y - 3);
  boxfill8(vram, x, 7, x - 3, y - 24, x - 3, y - 3);
  return;
}


x86 assembly (clang, -O0):
<init_screen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0xc(%rbp),%r9d
sub    $0x1,%r9d
mov    -0x10(%rbp),%eax
sub    $0x1d,%eax
mov    $0xe,%edx
xor    %r8d,%r8d
mov    %r8d,%ecx
mov    %eax,(%rsp)
call   1030 <boxfill8@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%r8d
sub    $0x1c,%r8d
mov    -0xc(%rbp),%r9d
sub    $0x1,%r9d
mov    -0x10(%rbp),%eax
sub    $0x1c,%eax
mov    $0x8,%edx
xor    %ecx,%ecx
mov    %eax,(%rsp)
call   1030 <boxfill8@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%r8d
sub    $0x1b,%r8d
mov    -0xc(%rbp),%r9d
sub    $0x1,%r9d
mov    -0x10(%rbp),%eax
sub    $0x1b,%eax
mov    $0x7,%edx
xor    %ecx,%ecx
mov    %eax,(%rsp)
call   1030 <boxfill8@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%r8d
sub    $0x1a,%r8d
mov    -0xc(%rbp),%r9d
sub    $0x1,%r9d
mov    -0x10(%rbp),%eax
sub    $0x1,%eax
mov    $0x8,%edx
xor    %ecx,%ecx
mov    %eax,(%rsp)
call   1030 <boxfill8@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%r8d
sub    $0x18,%r8d
mov    -0x10(%rbp),%eax
sub    $0x18,%eax
mov    $0x7,%edx
mov    $0x3,%ecx
mov    $0x3b,%r9d
mov    %eax,(%rsp)
call   1030 <boxfill8@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%r8d
sub    $0x18,%r8d
mov    -0x10(%rbp),%eax
sub    $0x4,%eax
mov    $0x7,%edx
mov    $0x2,%r9d
mov    %r9d,%ecx
mov    %eax,(%rsp)
call   1030 <boxfill8@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%r8d
sub    $0x4,%r8d
mov    -0x10(%rbp),%eax
sub    $0x4,%eax
mov    $0xf,%edx
mov    $0x3,%ecx
mov    $0x3b,%r9d
mov    %eax,(%rsp)
call   1030 <boxfill8@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%r8d
sub    $0x17,%r8d
mov    -0x10(%rbp),%eax
sub    $0x5,%eax
mov    $0xf,%edx
mov    $0x3b,%r9d
mov    %r9d,%ecx
mov    %eax,(%rsp)
call   1030 <boxfill8@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%r8d
sub    $0x3,%r8d
mov    -0x10(%rbp),%eax
sub    $0x3,%eax
xor    %edx,%edx
mov    $0x2,%ecx
mov    $0x3b,%r9d
mov    %eax,(%rsp)
call   1030 <boxfill8@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%r8d
sub    $0x18,%r8d
mov    -0x10(%rbp),%eax
sub    $0x3,%eax
xor    %edx,%edx
mov    $0x3c,%r9d
mov    %r9d,%ecx
mov    %eax,(%rsp)
call   1030 <boxfill8@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0xc(%rbp),%ecx
sub    $0x2f,%ecx
mov    -0x10(%rbp),%r8d
sub    $0x18,%r8d
mov    -0xc(%rbp),%r9d
sub    $0x4,%r9d
mov    -0x10(%rbp),%eax
sub    $0x18,%eax
mov    $0xf,%edx
mov    %eax,(%rsp)
call   1030 <boxfill8@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0xc(%rbp),%ecx
sub    $0x2f,%ecx
mov    -0x10(%rbp),%r8d
sub    $0x17,%r8d
mov    -0xc(%rbp),%r9d
sub    $0x2f,%r9d
mov    -0x10(%rbp),%eax
sub    $0x4,%eax
mov    $0xf,%edx
mov    %eax,(%rsp)
call   1030 <boxfill8@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0xc(%rbp),%ecx
sub    $0x2f,%ecx
mov    -0x10(%rbp),%r8d
sub    $0x3,%r8d
mov    -0xc(%rbp),%r9d
sub    $0x4,%r9d
mov    -0x10(%rbp),%eax
sub    $0x3,%eax
mov    $0x7,%edx
mov    %eax,(%rsp)
call   1030 <boxfill8@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0xc(%rbp),%ecx
sub    $0x3,%ecx
mov    -0x10(%rbp),%r8d
sub    $0x18,%r8d
mov    -0xc(%rbp),%r9d
sub    $0x3,%r9d
mov    -0x10(%rbp),%eax
sub    $0x3,%eax
mov    $0x7,%edx
mov    %eax,(%rsp)
call   1030 <boxfill8@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<init_screen>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %edx,%r14d
mov    %esi,%ebx
mov    %rdi,%r15
lea    -0x1(%rbx),%ebp
lea    -0x1d(%r14),%eax
mov    %eax,(%rsp)
mov    $0xe,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
mov    %ebp,%r9d
call   1030 <boxfill8@plt>
lea    -0x1c(%r14),%r8d
mov    %r8d,(%rsp)
mov    %r15,%rdi
mov    %ebx,%esi
mov    $0x8,%edx
xor    %ecx,%ecx
mov    %ebp,%r9d
call   1030 <boxfill8@plt>
lea    -0x1b(%r14),%r8d
mov    %r8d,(%rsp)
mov    %r15,%rdi
mov    %ebx,%esi
mov    $0x7,%edx
xor    %ecx,%ecx
mov    %ebp,%r9d
call   1030 <boxfill8@plt>
lea    -0x1a(%r14),%r8d
lea    -0x1(%r14),%eax
mov    %eax,(%rsp)
mov    %r15,%rdi
mov    %ebx,%esi
mov    $0x8,%edx
xor    %ecx,%ecx
mov    %ebp,%r9d
call   1030 <boxfill8@plt>
lea    -0x18(%r14),%r12d
mov    %r12d,(%rsp)
mov    %r15,%rdi
mov    %ebx,%esi
mov    $0x7,%edx
mov    $0x3,%ecx
mov    %r12d,%r8d
mov    $0x3b,%r9d
call   1030 <boxfill8@plt>
lea    -0x4(%r14),%ebp
mov    %ebp,(%rsp)
mov    %r15,%rdi
mov    %ebx,%esi
mov    $0x7,%edx
mov    $0x2,%ecx
mov    %r12d,%r8d
mov    $0x2,%r9d
call   1030 <boxfill8@plt>
mov    %ebp,%r8d
mov    %ebp,0x14(%rsp)
mov    %ebp,(%rsp)
mov    %r15,%rdi
mov    %ebx,%esi
mov    $0xf,%edx
mov    $0x3,%ecx
mov    $0x3b,%r9d
call   1030 <boxfill8@plt>
lea    -0x17(%r14),%r8d
mov    %r8d,0x10(%rsp)
lea    -0x5(%r14),%eax
mov    %eax,(%rsp)
mov    %r15,%rdi
mov    %ebx,%esi
mov    $0xf,%edx
mov    $0x3b,%ecx
mov    $0x3b,%r9d
call   1030 <boxfill8@plt>
add    $0xfffffffd,%r14d
mov    %r14d,(%rsp)
mov    %r15,%rdi
mov    %ebx,%esi
xor    %edx,%edx
mov    $0x2,%ecx
mov    %r14d,%r8d
mov    $0x3b,%r9d
call   1030 <boxfill8@plt>
mov    %r14d,(%rsp)
mov    %r15,%rdi
mov    %ebx,%esi
xor    %edx,%edx
mov    $0x3c,%ecx
mov    %r12d,%r8d
mov    $0x3c,%r9d
call   1030 <boxfill8@plt>
lea    -0x2f(%rbx),%r13d
lea    -0x4(%rbx),%ebp
mov    %r12d,(%rsp)
mov    %r15,%rdi
mov    %ebx,%esi
mov    $0xf,%edx
mov    %r13d,%ecx
mov    %r12d,%r8d
mov    %ebp,%r9d
call   1030 <boxfill8@plt>
mov    0x14(%rsp),%eax
mov    %eax,(%rsp)
mov    %r15,%rdi
mov    %ebx,%esi
mov    $0xf,%edx
mov    %r13d,%ecx
mov    0x10(%rsp),%r8d
mov    %r13d,%r9d
call   1030 <boxfill8@plt>
mov    %r14d,(%rsp)
mov    %r15,%rdi
mov    %ebx,%esi
mov    $0x7,%edx
mov    %r13d,%ecx
mov    %r14d,%r8d
mov    %ebp,%r9d
call   1030 <boxfill8@plt>
lea    -0x3(%rbx),%ecx
mov    %r14d,(%rsp)
mov    %r15,%rdi
mov    %ebx,%esi
mov    $0x7,%edx
mov    %r12d,%r8d
mov    %ecx,%r9d
call   1030 <boxfill8@plt>
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @init_screen(i8* %0, i32 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i8*, i8** %4
%8 = load i32, i32* %5
%9 = load i32, i32* %5
%10 = sub nsw i32 %9, 1
%11 = load i32, i32* %6
%12 = sub nsw i32 %11, 29
%13 = call i32 @boxfill8(i8* %7, i32 %8, i32 14, i32 0, i32 0, i32 %10, i32 %12)
%14 = load i8*, i8** %4
%15 = load i32, i32* %5
%16 = load i32, i32* %6
%17 = sub nsw i32 %16, 28
%18 = load i32, i32* %5
%19 = sub nsw i32 %18, 1
%20 = load i32, i32* %6
%21 = sub nsw i32 %20, 28
%22 = call i32 @boxfill8(i8* %14, i32 %15, i32 8, i32 0, i32 %17, i32 %19, i32 %21)
%23 = load i8*, i8** %4
%24 = load i32, i32* %5
%25 = load i32, i32* %6
%26 = sub nsw i32 %25, 27
%27 = load i32, i32* %5
%28 = sub nsw i32 %27, 1
%29 = load i32, i32* %6
%30 = sub nsw i32 %29, 27
%31 = call i32 @boxfill8(i8* %23, i32 %24, i32 7, i32 0, i32 %26, i32 %28, i32 %30)
%32 = load i8*, i8** %4
%33 = load i32, i32* %5
%34 = load i32, i32* %6
%35 = sub nsw i32 %34, 26
%36 = load i32, i32* %5
%37 = sub nsw i32 %36, 1
%38 = load i32, i32* %6
%39 = sub nsw i32 %38, 1
%40 = call i32 @boxfill8(i8* %32, i32 %33, i32 8, i32 0, i32 %35, i32 %37, i32 %39)
%41 = load i8*, i8** %4
%42 = load i32, i32* %5
%43 = load i32, i32* %6
%44 = sub nsw i32 %43, 24
%45 = load i32, i32* %6
%46 = sub nsw i32 %45, 24
%47 = call i32 @boxfill8(i8* %41, i32 %42, i32 7, i32 3, i32 %44, i32 59, i32 %46)
%48 = load i8*, i8** %4
%49 = load i32, i32* %5
%50 = load i32, i32* %6
%51 = sub nsw i32 %50, 24
%52 = load i32, i32* %6
%53 = sub nsw i32 %52, 4
%54 = call i32 @boxfill8(i8* %48, i32 %49, i32 7, i32 2, i32 %51, i32 2, i32 %53)
%55 = load i8*, i8** %4
%56 = load i32, i32* %5
%57 = load i32, i32* %6
%58 = sub nsw i32 %57, 4
%59 = load i32, i32* %6
%60 = sub nsw i32 %59, 4
%61 = call i32 @boxfill8(i8* %55, i32 %56, i32 15, i32 3, i32 %58, i32 59, i32 %60)
%62 = load i8*, i8** %4
%63 = load i32, i32* %5
%64 = load i32, i32* %6
%65 = sub nsw i32 %64, 23
%66 = load i32, i32* %6
%67 = sub nsw i32 %66, 5
%68 = call i32 @boxfill8(i8* %62, i32 %63, i32 15, i32 59, i32 %65, i32 59, i32 %67)
%69 = load i8*, i8** %4
%70 = load i32, i32* %5
%71 = load i32, i32* %6
%72 = sub nsw i32 %71, 3
%73 = load i32, i32* %6
%74 = sub nsw i32 %73, 3
%75 = call i32 @boxfill8(i8* %69, i32 %70, i32 0, i32 2, i32 %72, i32 59, i32 %74)
%76 = load i8*, i8** %4
%77 = load i32, i32* %5
%78 = load i32, i32* %6
%79 = sub nsw i32 %78, 24
%80 = load i32, i32* %6
%81 = sub nsw i32 %80, 3
%82 = call i32 @boxfill8(i8* %76, i32 %77, i32 0, i32 60, i32 %79, i32 60, i32 %81)
%83 = load i8*, i8** %4
%84 = load i32, i32* %5
%85 = load i32, i32* %5
%86 = sub nsw i32 %85, 47
%87 = load i32, i32* %6
%88 = sub nsw i32 %87, 24
%89 = load i32, i32* %5
%90 = sub nsw i32 %89, 4
%91 = load i32, i32* %6
%92 = sub nsw i32 %91, 24
%93 = call i32 @boxfill8(i8* %83, i32 %84, i32 15, i32 %86, i32 %88, i32 %90, i32 %92)
%94 = load i8*, i8** %4
%95 = load i32, i32* %5
%96 = load i32, i32* %5
%97 = sub nsw i32 %96, 47
%98 = load i32, i32* %6
%99 = sub nsw i32 %98, 23
%100 = load i32, i32* %5
%101 = sub nsw i32 %100, 47
%102 = load i32, i32* %6
%103 = sub nsw i32 %102, 4
%104 = call i32 @boxfill8(i8* %94, i32 %95, i32 15, i32 %97, i32 %99, i32 %101, i32 %103)
%105 = load i8*, i8** %4
%106 = load i32, i32* %5
%107 = load i32, i32* %5
%108 = sub nsw i32 %107, 47
%109 = load i32, i32* %6
%110 = sub nsw i32 %109, 3
%111 = load i32, i32* %5
%112 = sub nsw i32 %111, 4
%113 = load i32, i32* %6
%114 = sub nsw i32 %113, 3
%115 = call i32 @boxfill8(i8* %105, i32 %106, i32 7, i32 %108, i32 %110, i32 %112, i32 %114)
%116 = load i8*, i8** %4
%117 = load i32, i32* %5
%118 = load i32, i32* %5
%119 = sub nsw i32 %118, 3
%120 = load i32, i32* %6
%121 = sub nsw i32 %120, 24
%122 = load i32, i32* %5
%123 = sub nsw i32 %122, 3
%124 = load i32, i32* %6
%125 = sub nsw i32 %124, 3
%126 = call i32 @boxfill8(i8* %116, i32 %117, i32 7, i32 %119, i32 %121, i32 %123, i32 %125)
ret void
}

LLVM IR (-O2):
define void @init_screen(i8* %0, i32 %1, i32 %2) {
%4 = add nsw i32 %1, -1
%5 = add nsw i32 %2, -29
%6 = tail call i32 @boxfill8(i8* %0, i32 %1, i32 14, i32 0, i32 0, i32 %4, i32 %5)
%7 = add nsw i32 %2, -28
%8 = tail call i32 @boxfill8(i8* %0, i32 %1, i32 8, i32 0, i32 %7, i32 %4, i32 %7)
%9 = add nsw i32 %2, -27
%10 = tail call i32 @boxfill8(i8* %0, i32 %1, i32 7, i32 0, i32 %9, i32 %4, i32 %9)
%11 = add nsw i32 %2, -26
%12 = add nsw i32 %2, -1
%13 = tail call i32 @boxfill8(i8* %0, i32 %1, i32 8, i32 0, i32 %11, i32 %4, i32 %12)
%14 = add nsw i32 %2, -24
%15 = tail call i32 @boxfill8(i8* %0, i32 %1, i32 7, i32 3, i32 %14, i32 59, i32 %14)
%16 = add nsw i32 %2, -4
%17 = tail call i32 @boxfill8(i8* %0, i32 %1, i32 7, i32 2, i32 %14, i32 2, i32 %16)
%18 = tail call i32 @boxfill8(i8* %0, i32 %1, i32 15, i32 3, i32 %16, i32 59, i32 %16)
%19 = add nsw i32 %2, -23
%20 = add nsw i32 %2, -5
%21 = tail call i32 @boxfill8(i8* %0, i32 %1, i32 15, i32 59, i32 %19, i32 59, i32 %20)
%22 = add nsw i32 %2, -3
%23 = tail call i32 @boxfill8(i8* %0, i32 %1, i32 0, i32 2, i32 %22, i32 59, i32 %22)
%24 = tail call i32 @boxfill8(i8* %0, i32 %1, i32 0, i32 60, i32 %14, i32 60, i32 %22)
%25 = add nsw i32 %1, -47
%26 = add nsw i32 %1, -4
%27 = tail call i32 @boxfill8(i8* %0, i32 %1, i32 15, i32 %25, i32 %14, i32 %26, i32 %14)
%28 = tail call i32 @boxfill8(i8* %0, i32 %1, i32 15, i32 %25, i32 %19, i32 %25, i32 %16)
%29 = tail call i32 @boxfill8(i8* %0, i32 %1, i32 7, i32 %25, i32 %22, i32 %26, i32 %22)
%30 = add nsw i32 %1, -3
%31 = tail call i32 @boxfill8(i8* %0, i32 %1, i32 7, i32 %30, i32 %14, i32 %30, i32 %22)
ret void
}