#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*/ go_to_xy(int, int);
int /*<<< orphan*/ hide_scr();
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ spacer(int, int);
void gfx_draw_bounds() {
  int i;
  hide_scr();
  go_to_xy(0, 0);
  printf("%c", 201);
  spacer(256 - 2, 205);
  printf("%c", 187);
  for (i = 1; i < 96 - 1; i++) {
    go_to_xy(0, i);
    printf("%c", 186);
    go_to_xy(255, i);
    printf("%c", 186);
  }
}


x86 assembly (clang, -O0):
<gfx_draw_bounds>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1060 <hide_scr@plt>
xor    %esi,%esi
mov    %esi,%edi
call   1040 <go_to_xy@plt>
lea    0xea1(%rip),%rdi
mov    $0xc9,%esi
call   1030 <printf@plt>
mov    $0xfe,%edi
mov    $0xcd,%esi
call   1050 <spacer@plt>
lea    0xe81(%rip),%rdi
mov    $0xbb,%esi
call   1030 <printf@plt>
movl   $0x1,-0x4(%rbp)
cmpl   $0x5f,-0x4(%rbp)
jge    11e1 <gfx_draw_bounds+0xa1>
mov    -0x4(%rbp),%esi
xor    %edi,%edi
call   1040 <go_to_xy@plt>
lea    0xe55(%rip),%rdi
mov    $0xba,%esi
call   1030 <printf@plt>
mov    -0x4(%rbp),%esi
mov    $0xff,%edi
call   1040 <go_to_xy@plt>
lea    0xe37(%rip),%rdi
mov    $0xba,%esi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1190 <gfx_draw_bounds+0x50>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gfx_draw_bounds>:
push   %rbp
push   %rbx
push   %rax
xor    %eax,%eax
call   1060 <hide_scr@plt>
xor    %edi,%edi
xor    %esi,%esi
call   1040 <go_to_xy@plt>
lea    0xea6(%rip),%rbx
mov    %rbx,%rdi
mov    $0xc9,%esi
call   1030 <printf@plt>
mov    $0xfe,%edi
mov    $0xcd,%esi
call   1050 <spacer@plt>
mov    %rbx,%rdi
mov    $0xbb,%esi
call   1030 <printf@plt>
mov    $0x1,%ebp
nopl   0x0(%rax,%rax,1)
xor    %edi,%edi
mov    %ebp,%esi
call   1040 <go_to_xy@plt>
mov    %rbx,%rdi
mov    $0xba,%esi
call   1030 <printf@plt>
mov    $0xff,%edi
mov    %ebp,%esi
call   1040 <go_to_xy@plt>
mov    %rbx,%rdi
mov    $0xba,%esi
call   1030 <printf@plt>
add    $0x1,%ebp
cmp    $0x5f,%ebp
jne    1190 <gfx_draw_bounds+0x50>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%c\00"
define void @gfx_draw_bounds() {
%1 = alloca i32
%2 = call i32 (...) @hide_scr()
%3 = call i32 @go_to_xy(i32 0, i32 0)
%4 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 201)
%5 = call i32 @spacer(i32 254, i32 205)
%6 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 187)
store i32 1, i32* %1
br label %7
7: ; preds = %17, %0
%8 = load i32, i32* %1
%9 = icmp slt i32 %8, 95
br i1 %9, label %10, label %20
10: ; preds = %7
%11 = load i32, i32* %1
%12 = call i32 @go_to_xy(i32 0, i32 %11)
%13 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 186)
%14 = load i32, i32* %1
%15 = call i32 @go_to_xy(i32 255, i32 %14)
%16 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 186)
br label %17
17: ; preds = %10
%18 = load i32, i32* %1
%19 = add nsw i32 %18, 1
store i32 %19, i32* %1
br label %7
20: ; preds = %7
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%c\00"
define void @gfx_draw_bounds() {
%1 = tail call i32 (...) @hide_scr()
%2 = tail call i32 @go_to_xy(i32 0, i32 0)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 201)
%4 = tail call i32 @spacer(i32 254, i32 205)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 187)
br label %6
6: ; preds = %0, %6
%7 = phi i32 [ 1, %0 ], [ %12, %6 ]
%8 = tail call i32 @go_to_xy(i32 0, i32 %7)
%9 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 186)
%10 = tail call i32 @go_to_xy(i32 255, i32 %7)
%11 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 186)
%12 = add nuw nsw i32 %7, 1
%13 = icmp eq i32 %12, 95
br i1 %13, label %14, label %6
14: ; preds = %6
ret void
}