#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*/ box_fill8(char *, int, int, int, int, int, int);
void draw_desktop(void) {
  char *vram;
  int width, height;
  vram = (char *)0xa0000;
  width = 320;
  height = 200;
  box_fill8(vram, width, 0, 0, width - 1, height - 29, 14);
  box_fill8(vram, width, 0, height - 28, width - 1, height - 28, 8);
  box_fill8(vram, width, 0, height - 27, width - 1, height - 27, 7);
  box_fill8(vram, width, 0, height - 26, width - 1, height - 1, 8);
  box_fill8(vram, width, 3, height - 24, 59, height - 24, 7);
  box_fill8(vram, width, 2, height - 24, 2, height - 4, 7);
  box_fill8(vram, width, 3, height - 4, 59, height - 4, 15);
  box_fill8(vram, width, 59, height - 23, 59, height - 5, 15);
  box_fill8(vram, width, 2, height - 3, 59, height - 3, 0);
  box_fill8(vram, width, 60, height - 24, 60, height - 3, 0);
  box_fill8(vram, width, width - 47, height - 24, width - 4, height - 24, 15);
  box_fill8(vram, width, width - 47, height - 23, width - 47, height - 4, 15);
  box_fill8(vram, width, width - 47, height - 3, width - 4, height - 3, 7);
  box_fill8(vram, width, width - 3, height - 24, width - 3, height - 3, 7);
}


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

x86 assembly (clang, -O2):
<draw_desktop>:
push   %rax
movl   $0xe,(%rsp)
mov    $0xa0000,%edi
mov    $0x140,%esi
xor    %edx,%edx
xor    %ecx,%ecx
mov    $0x13f,%r8d
mov    $0xab,%r9d
call   1030 <box_fill8@plt>
movl   $0x8,(%rsp)
mov    $0xa0000,%edi
mov    $0x140,%esi
xor    %edx,%edx
mov    $0xac,%ecx
mov    $0x13f,%r8d
mov    $0xac,%r9d
call   1030 <box_fill8@plt>
movl   $0x7,(%rsp)
mov    $0xa0000,%edi
mov    $0x140,%esi
xor    %edx,%edx
mov    $0xad,%ecx
mov    $0x13f,%r8d
mov    $0xad,%r9d
call   1030 <box_fill8@plt>
movl   $0x8,(%rsp)
mov    $0xa0000,%edi
mov    $0x140,%esi
xor    %edx,%edx
mov    $0xae,%ecx
mov    $0x13f,%r8d
mov    $0xc7,%r9d
call   1030 <box_fill8@plt>
movl   $0x7,(%rsp)
mov    $0xa0000,%edi
mov    $0x140,%esi
mov    $0x3,%edx
mov    $0xb0,%ecx
mov    $0x3b,%r8d
mov    $0xb0,%r9d
call   1030 <box_fill8@plt>
movl   $0x7,(%rsp)
mov    $0xa0000,%edi
mov    $0x140,%esi
mov    $0x2,%edx
mov    $0xb0,%ecx
mov    $0x2,%r8d
mov    $0xc4,%r9d
call   1030 <box_fill8@plt>
movl   $0xf,(%rsp)
mov    $0xa0000,%edi
mov    $0x140,%esi
mov    $0x3,%edx
mov    $0xc4,%ecx
mov    $0x3b,%r8d
mov    $0xc4,%r9d
call   1030 <box_fill8@plt>
movl   $0xf,(%rsp)
mov    $0xa0000,%edi
mov    $0x140,%esi
mov    $0x3b,%edx
mov    $0xb1,%ecx
mov    $0x3b,%r8d
mov    $0xc3,%r9d
call   1030 <box_fill8@plt>
movl   $0x0,(%rsp)
mov    $0xa0000,%edi
mov    $0x140,%esi
mov    $0x2,%edx
mov    $0xc5,%ecx
mov    $0x3b,%r8d
mov    $0xc5,%r9d
call   1030 <box_fill8@plt>
movl   $0x0,(%rsp)
mov    $0xa0000,%edi
mov    $0x140,%esi
mov    $0x3c,%edx
mov    $0xb0,%ecx
mov    $0x3c,%r8d
mov    $0xc5,%r9d
call   1030 <box_fill8@plt>
movl   $0xf,(%rsp)
mov    $0xa0000,%edi
mov    $0x140,%esi
mov    $0x111,%edx
mov    $0xb0,%ecx
mov    $0x13c,%r8d
mov    $0xb0,%r9d
call   1030 <box_fill8@plt>
movl   $0xf,(%rsp)
mov    $0xa0000,%edi
mov    $0x140,%esi
mov    $0x111,%edx
mov    $0xb1,%ecx
mov    $0x111,%r8d
mov    $0xc4,%r9d
call   1030 <box_fill8@plt>
movl   $0x7,(%rsp)
mov    $0xa0000,%edi
mov    $0x140,%esi
mov    $0x111,%edx
mov    $0xc5,%ecx
mov    $0x13c,%r8d
mov    $0xc5,%r9d
call   1030 <box_fill8@plt>
movl   $0x7,(%rsp)
mov    $0xa0000,%edi
mov    $0x140,%esi
mov    $0x13d,%edx
mov    $0xb0,%ecx
mov    $0x13d,%r8d
mov    $0xc5,%r9d
call   1030 <box_fill8@plt>
pop    %rax
ret

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

LLVM IR (-O2):
define void @draw_desktop() {
%1 = tail call i32 @box_fill8(i8* inttoptr (i64 655360 to i8*), i32 320, i32 0, i32 0, i32 319, i32 171, i32 14)
%2 = tail call i32 @box_fill8(i8* inttoptr (i64 655360 to i8*), i32 320, i32 0, i32 172, i32 319, i32 172, i32 8)
%3 = tail call i32 @box_fill8(i8* inttoptr (i64 655360 to i8*), i32 320, i32 0, i32 173, i32 319, i32 173, i32 7)
%4 = tail call i32 @box_fill8(i8* inttoptr (i64 655360 to i8*), i32 320, i32 0, i32 174, i32 319, i32 199, i32 8)
%5 = tail call i32 @box_fill8(i8* inttoptr (i64 655360 to i8*), i32 320, i32 3, i32 176, i32 59, i32 176, i32 7)
%6 = tail call i32 @box_fill8(i8* inttoptr (i64 655360 to i8*), i32 320, i32 2, i32 176, i32 2, i32 196, i32 7)
%7 = tail call i32 @box_fill8(i8* inttoptr (i64 655360 to i8*), i32 320, i32 3, i32 196, i32 59, i32 196, i32 15)
%8 = tail call i32 @box_fill8(i8* inttoptr (i64 655360 to i8*), i32 320, i32 59, i32 177, i32 59, i32 195, i32 15)
%9 = tail call i32 @box_fill8(i8* inttoptr (i64 655360 to i8*), i32 320, i32 2, i32 197, i32 59, i32 197, i32 0)
%10 = tail call i32 @box_fill8(i8* inttoptr (i64 655360 to i8*), i32 320, i32 60, i32 176, i32 60, i32 197, i32 0)
%11 = tail call i32 @box_fill8(i8* inttoptr (i64 655360 to i8*), i32 320, i32 273, i32 176, i32 316, i32 176, i32 15)
%12 = tail call i32 @box_fill8(i8* inttoptr (i64 655360 to i8*), i32 320, i32 273, i32 177, i32 273, i32 196, i32 15)
%13 = tail call i32 @box_fill8(i8* inttoptr (i64 655360 to i8*), i32 320, i32 273, i32 197, i32 316, i32 197, i32 7)
%14 = tail call i32 @box_fill8(i8* inttoptr (i64 655360 to i8*), i32 320, i32 317, i32 176, i32 317, i32 197, i32 7)
ret void
}