#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*/ Display();
int /*<<< orphan*/ clearDisplay();
int /*<<< orphan*/ drawLine(int, int, short, int, int);
int /*<<< orphan*/ usleep(int);
void testdrawline() {
  short i = 0;
  for (i = 0; i < 128; i += 4) {
    drawLine(0, 0, i, 32 - 1, 1);
    Display();
    usleep(1000);
  }
  for (i = 0; i < 32; i += 4) {
    drawLine(0, 0, 128 - 1, i, 1);
    Display();
    usleep(1000);
  }
  usleep(250000);
  clearDisplay();
  for (i = 0; i < 128; i += 4) {
    drawLine(0, 32 - 1, i, 0, 1);
    Display();
    usleep(1000);
  }
  for (i = 32 - 1; i >= 0; i -= 4) {
    drawLine(0, 32 - 1, 128 - 1, i, 1);
    Display();
    usleep(1000);
  }
  usleep(250000);
  clearDisplay();
  for (i = 128 - 1; i >= 0; i -= 4) {
    drawLine(128 - 1, 32 - 1, i, 0, 1);
    Display();
    usleep(1000);
  }
  for (i = 32 - 1; i >= 0; i -= 4) {
    drawLine(128 - 1, 32 - 1, 0, i, 1);
    Display();
    usleep(1000);
  }
  usleep(250000);
  clearDisplay();
  for (i = 0; i < 32; i += 4) {
    drawLine(128 - 1, 0, 0, i, 1);
    Display();
    usleep(1000);
  }
  for (i = 0; i < 128; i += 4) {
    drawLine(128 - 1, 0, i, 32 - 1, 1);
    Display();
    usleep(1000);
  }
  usleep(250000);
}


x86 assembly (clang, -O0):
<testdrawline>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movw   $0x0,-0x2(%rbp)
movw   $0x0,-0x2(%rbp)
movswl -0x2(%rbp),%eax
cmp    $0x80,%eax
jge    119c <testdrawline+0x5c>
xor    %esi,%esi
mov    $0x1f,%ecx
mov    $0x1,%r8d
mov    %esi,%edi
movswl -0x2(%rbp),%edx
call   1030 <drawLine@plt>
mov    $0x0,%al
call   1050 <Display@plt>
mov    $0x3e8,%edi
call   1060 <usleep@plt>
movswl -0x2(%rbp),%eax
add    $0x4,%eax
mov    %ax,-0x2(%rbp)
jmp    1154 <testdrawline+0x14>
movw   $0x0,-0x2(%rbp)
movswl -0x2(%rbp),%eax
cmp    $0x20,%eax
jge    11e8 <testdrawline+0xa8>
movswl -0x2(%rbp),%ecx
xor    %esi,%esi
mov    $0x7f,%edx
mov    $0x1,%r8d
mov    %esi,%edi
call   1030 <drawLine@plt>
mov    $0x0,%al
call   1050 <Display@plt>
mov    $0x3e8,%edi
call   1060 <usleep@plt>
movswl -0x2(%rbp),%eax
add    $0x4,%eax
mov    %ax,-0x2(%rbp)
jmp    11a2 <testdrawline+0x62>
mov    $0x3d090,%edi
call   1060 <usleep@plt>
mov    $0x0,%al
call   1040 <clearDisplay@plt>
movw   $0x0,-0x2(%rbp)
movswl -0x2(%rbp),%eax
cmp    $0x80,%eax
jge    1247 <testdrawline+0x107>
xor    %ecx,%ecx
mov    $0x1f,%esi
mov    $0x1,%r8d
mov    %ecx,%edi
movswl -0x2(%rbp),%edx
call   1030 <drawLine@plt>
mov    $0x0,%al
call   1050 <Display@plt>
mov    $0x3e8,%edi
call   1060 <usleep@plt>
movswl -0x2(%rbp),%eax
add    $0x4,%eax
mov    %ax,-0x2(%rbp)
jmp    11ff <testdrawline+0xbf>
movw   $0x1f,-0x2(%rbp)
movswl -0x2(%rbp),%eax
cmp    $0x0,%eax
jl     1296 <testdrawline+0x156>
movswl -0x2(%rbp),%ecx
xor    %edi,%edi
mov    $0x1f,%esi
mov    $0x7f,%edx
mov    $0x1,%r8d
call   1030 <drawLine@plt>
mov    $0x0,%al
call   1050 <Display@plt>
mov    $0x3e8,%edi
call   1060 <usleep@plt>
movswl -0x2(%rbp),%eax
sub    $0x4,%eax
mov    %ax,-0x2(%rbp)
jmp    124d <testdrawline+0x10d>
mov    $0x3d090,%edi
call   1060 <usleep@plt>
mov    $0x0,%al
call   1040 <clearDisplay@plt>
movw   $0x7f,-0x2(%rbp)
movswl -0x2(%rbp),%eax
cmp    $0x0,%eax
jl     12f6 <testdrawline+0x1b6>
mov    $0x7f,%edi
mov    $0x1f,%esi
xor    %ecx,%ecx
mov    $0x1,%r8d
movswl -0x2(%rbp),%edx
call   1030 <drawLine@plt>
mov    $0x0,%al
call   1050 <Display@plt>
mov    $0x3e8,%edi
call   1060 <usleep@plt>
movswl -0x2(%rbp),%eax
sub    $0x4,%eax
mov    %ax,-0x2(%rbp)
jmp    12ad <testdrawline+0x16d>
movw   $0x1f,-0x2(%rbp)
movswl -0x2(%rbp),%eax
cmp    $0x0,%eax
jl     1345 <testdrawline+0x205>
movswl -0x2(%rbp),%ecx
mov    $0x7f,%edi
mov    $0x1f,%esi
xor    %edx,%edx
mov    $0x1,%r8d
call   1030 <drawLine@plt>
mov    $0x0,%al
call   1050 <Display@plt>
mov    $0x3e8,%edi
call   1060 <usleep@plt>
movswl -0x2(%rbp),%eax
sub    $0x4,%eax
mov    %ax,-0x2(%rbp)
jmp    12fc <testdrawline+0x1bc>
mov    $0x3d090,%edi
call   1060 <usleep@plt>
mov    $0x0,%al
call   1040 <clearDisplay@plt>
movw   $0x0,-0x2(%rbp)
movswl -0x2(%rbp),%eax
cmp    $0x20,%eax
jge    13a2 <testdrawline+0x262>
movswl -0x2(%rbp),%ecx
mov    $0x7f,%edi
xor    %edx,%edx
mov    $0x1,%r8d
mov    %edx,%esi
call   1030 <drawLine@plt>
mov    $0x0,%al
call   1050 <Display@plt>
mov    $0x3e8,%edi
call   1060 <usleep@plt>
movswl -0x2(%rbp),%eax
add    $0x4,%eax
mov    %ax,-0x2(%rbp)
jmp    135c <testdrawline+0x21c>
movw   $0x0,-0x2(%rbp)
movswl -0x2(%rbp),%eax
cmp    $0x80,%eax
jge    13f3 <testdrawline+0x2b3>
mov    $0x7f,%edi
xor    %esi,%esi
mov    $0x1f,%ecx
mov    $0x1,%r8d
movswl -0x2(%rbp),%edx
call   1030 <drawLine@plt>
mov    $0x0,%al
call   1050 <Display@plt>
mov    $0x3e8,%edi
call   1060 <usleep@plt>
movswl -0x2(%rbp),%eax
add    $0x4,%eax
mov    %ax,-0x2(%rbp)
jmp    13a8 <testdrawline+0x268>
mov    $0x3d090,%edi
call   1060 <usleep@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<testdrawline>:
push   %rbp
push   %rbx
push   %rax
mov    $0xfffc,%bp
nopw   0x0(%rax,%rax,1)
add    $0x4,%ebp
movswl %bp,%ebx
xor    %edi,%edi
xor    %esi,%esi
mov    %ebx,%edx
mov    $0x1f,%ecx
mov    $0x1,%r8d
call   1030 <drawLine@plt>
xor    %eax,%eax
call   1050 <Display@plt>
mov    $0x3e8,%edi
call   1060 <usleep@plt>
cmp    $0x7c,%bx
jb     1150 <testdrawline+0x10>
xor    %edi,%edi
xor    %esi,%esi
mov    $0x7f,%edx
xor    %ecx,%ecx
mov    $0x1,%r8d
call   1030 <drawLine@plt>
xor    %eax,%eax
call   1050 <Display@plt>
mov    $0x3e8,%edi
call   1060 <usleep@plt>
xor    %edi,%edi
xor    %esi,%esi
mov    $0x7f,%edx
mov    $0x4,%ecx
mov    $0x1,%r8d
call   1030 <drawLine@plt>
xor    %eax,%eax
call   1050 <Display@plt>
mov    $0x3e8,%edi
call   1060 <usleep@plt>
xor    %edi,%edi
xor    %esi,%esi
mov    $0x7f,%edx
mov    $0x8,%ecx
mov    $0x1,%r8d
call   1030 <drawLine@plt>
xor    %eax,%eax
call   1050 <Display@plt>
mov    $0x3e8,%edi
call   1060 <usleep@plt>
xor    %edi,%edi
xor    %esi,%esi
mov    $0x7f,%edx
mov    $0xc,%ecx
mov    $0x1,%r8d
call   1030 <drawLine@plt>
xor    %eax,%eax
call   1050 <Display@plt>
mov    $0x3e8,%edi
call   1060 <usleep@plt>
xor    %edi,%edi
xor    %esi,%esi
mov    $0x7f,%edx
mov    $0x10,%ecx
mov    $0x1,%r8d
call   1030 <drawLine@plt>
xor    %eax,%eax
call   1050 <Display@plt>
mov    $0x3e8,%edi
call   1060 <usleep@plt>
xor    %edi,%edi
xor    %esi,%esi
mov    $0x7f,%edx
mov    $0x14,%ecx
mov    $0x1,%r8d
call   1030 <drawLine@plt>
xor    %eax,%eax
call   1050 <Display@plt>
mov    $0x3e8,%edi
call   1060 <usleep@plt>
xor    %edi,%edi
xor    %esi,%esi
mov    $0x7f,%edx
mov    $0x18,%ecx
mov    $0x1,%r8d
call   1030 <drawLine@plt>
xor    %eax,%eax
call   1050 <Display@plt>
mov    $0x3e8,%edi
call   1060 <usleep@plt>
xor    %edi,%edi
xor    %esi,%esi
mov    $0x7f,%edx
mov    $0x1c,%ecx
mov    $0x1,%r8d
call   1030 <drawLine@plt>
xor    %eax,%eax
call   1050 <Display@plt>
mov    $0x3e8,%edi
call   1060 <usleep@plt>
mov    $0x3d090,%edi
call   1060 <usleep@plt>
xor    %eax,%eax
call   1040 <clearDisplay@plt>
mov    $0xfffc,%bp
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x4,%ebp
movswl %bp,%ebx
xor    %edi,%edi
mov    $0x1f,%esi
mov    %ebx,%edx
xor    %ecx,%ecx
mov    $0x1,%r8d
call   1030 <drawLine@plt>
xor    %eax,%eax
call   1050 <Display@plt>
mov    $0x3e8,%edi
call   1060 <usleep@plt>
cmp    $0x7c,%bx
jb     12f0 <testdrawline+0x1b0>
xor    %edi,%edi
mov    $0x1f,%esi
mov    $0x7f,%edx
mov    $0x1f,%ecx
mov    $0x1,%r8d
call   1030 <drawLine@plt>
xor    %eax,%eax
call   1050 <Display@plt>
mov    $0x3e8,%edi
call   1060 <usleep@plt>
xor    %edi,%edi
mov    $0x1f,%esi
mov    $0x7f,%edx
mov    $0x1b,%ecx
mov    $0x1,%r8d
call   1030 <drawLine@plt>
xor    %eax,%eax
call   1050 <Display@plt>
mov    $0x3e8,%edi
call   1060 <usleep@plt>
xor    %edi,%edi
mov    $0x1f,%esi
mov    $0x7f,%edx
mov    $0x17,%ecx
mov    $0x1,%r8d
call   1030 <drawLine@plt>
xor    %eax,%eax
call   1050 <Display@plt>
mov    $0x3e8,%edi
call   1060 <usleep@plt>
xor    %edi,%edi
mov    $0x1f,%esi
mov    $0x7f,%edx
mov    $0x13,%ecx
mov    $0x1,%r8d
call   1030 <drawLine@plt>
xor    %eax,%eax
call   1050 <Display@plt>
mov    $0x3e8,%edi
call   1060 <usleep@plt>
xor    %edi,%edi
mov    $0x1f,%esi
mov    $0x7f,%edx
mov    $0xf,%ecx
mov    $0x1,%r8d
call   1030 <drawLine@plt>
xor    %eax,%eax
call   1050 <Display@plt>
mov    $0x3e8,%edi
call   1060 <usleep@plt>
xor    %edi,%edi
mov    $0x1f,%esi
mov    $0x7f,%edx
mov    $0xb,%ecx
mov    $0x1,%r8d
call   1030 <drawLine@plt>
xor    %eax,%eax
call   1050 <Display@plt>
mov    $0x3e8,%edi
call   1060 <usleep@plt>
xor    %edi,%edi
mov    $0x1f,%esi
mov    $0x7f,%edx
mov    $0x7,%ecx
mov    $0x1,%r8d
call   1030 <drawLine@plt>
xor    %eax,%eax
call   1050 <Display@plt>
mov    $0x3e8,%edi
call   1060 <usleep@plt>
xor    %edi,%edi
mov    $0x1f,%esi
mov    $0x7f,%edx
mov    $0x3,%ecx
mov    $0x1,%r8d
call   1030 <drawLine@plt>
xor    %eax,%eax
call   1050 <Display@plt>
mov    $0x3e8,%edi
call   1060 <usleep@plt>
mov    $0x3d090,%edi
call   1060 <usleep@plt>
xor    %eax,%eax
call   1040 <clearDisplay@plt>
mov    $0x83,%bp
add    $0xfffffffc,%ebp
movswl %bp,%ebx
mov    $0x7f,%edi
mov    $0x1f,%esi
mov    %ebx,%edx
xor    %ecx,%ecx
mov    $0x1,%r8d
call   1030 <drawLine@plt>
xor    %eax,%eax
call   1050 <Display@plt>
mov    $0x3e8,%edi
call   1060 <usleep@plt>
cmp    $0x3,%bx
ja     14a0 <testdrawline+0x360>
mov    $0x7f,%edi
mov    $0x1f,%esi
xor    %edx,%edx
mov    $0x1f,%ecx
mov    $0x1,%r8d
call   1030 <drawLine@plt>
xor    %eax,%eax
call   1050 <Display@plt>
mov    $0x3e8,%edi
call   1060 <usleep@plt>
mov    $0x7f,%edi
mov    $0x1f,%esi
xor    %edx,%edx
mov    $0x1b,%ecx
mov    $0x1,%r8d
call   1030 <drawLine@plt>
xor    %eax,%eax
call   1050 <Display@plt>
mov    $0x3e8,%edi
call   1060 <usleep@plt>
mov    $0x7f,%edi
mov    $0x1f,%esi
xor    %edx,%edx
mov    $0x17,%ecx
mov    $0x1,%r8d
call   1030 <drawLine@plt>
xor    %eax,%eax
call   1050 <Display@plt>
mov    $0x3e8,%edi
call   1060 <usleep@plt>
mov    $0x7f,%edi
mov    $0x1f,%esi
xor    %edx,%edx
mov    $0x13,%ecx
mov    $0x1,%r8d
call   1030 <drawLine@plt>
xor    %eax,%eax
call   1050 <Display@plt>
mov    $0x3e8,%edi
call   1060 <usleep@plt>
mov    $0x7f,%edi
mov    $0x1f,%esi
xor    %edx,%edx
mov    $0xf,%ecx
mov    $0x1,%r8d
call   1030 <drawLine@plt>
xor    %eax,%eax
call   1050 <Display@plt>
mov    $0x3e8,%edi
call   1060 <usleep@plt>
mov    $0x7f,%edi
mov    $0x1f,%esi
xor    %edx,%edx
mov    $0xb,%ecx
mov    $0x1,%r8d
call   1030 <drawLine@plt>
xor    %eax,%eax
call   1050 <Display@plt>
mov    $0x3e8,%edi
call   1060 <usleep@plt>
mov    $0x7f,%edi
mov    $0x1f,%esi
xor    %edx,%edx
mov    $0x7,%ecx
mov    $0x1,%r8d
call   1030 <drawLine@plt>
xor    %eax,%eax
call   1050 <Display@plt>
mov    $0x3e8,%edi
call   1060 <usleep@plt>
mov    $0x7f,%edi
mov    $0x1f,%esi
xor    %edx,%edx
mov    $0x3,%ecx
mov    $0x1,%r8d
call   1030 <drawLine@plt>
xor    %eax,%eax
call   1050 <Display@plt>
mov    $0x3e8,%edi
call   1060 <usleep@plt>
mov    $0x3d090,%edi
call   1060 <usleep@plt>
xor    %eax,%eax
call   1040 <clearDisplay@plt>
mov    $0x7f,%edi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
mov    $0x1,%r8d
call   1030 <drawLine@plt>
xor    %eax,%eax
call   1050 <Display@plt>
mov    $0x3e8,%edi
call   1060 <usleep@plt>
mov    $0x7f,%edi
xor    %esi,%esi
xor    %edx,%edx
mov    $0x4,%ecx
mov    $0x1,%r8d
call   1030 <drawLine@plt>
xor    %eax,%eax
call   1050 <Display@plt>
mov    $0x3e8,%edi
call   1060 <usleep@plt>
mov    $0x7f,%edi
xor    %esi,%esi
xor    %edx,%edx
mov    $0x8,%ecx
mov    $0x1,%r8d
call   1030 <drawLine@plt>
xor    %eax,%eax
call   1050 <Display@plt>
mov    $0x3e8,%edi
call   1060 <usleep@plt>
mov    $0x7f,%edi
xor    %esi,%esi
xor    %edx,%edx
mov    $0xc,%ecx
mov    $0x1,%r8d
call   1030 <drawLine@plt>
xor    %eax,%eax
call   1050 <Display@plt>
mov    $0x3e8,%edi
call   1060 <usleep@plt>
mov    $0x7f,%edi
xor    %esi,%esi
xor    %edx,%edx
mov    $0x10,%ecx
mov    $0x1,%r8d
call   1030 <drawLine@plt>
xor    %eax,%eax
call   1050 <Display@plt>
mov    $0x3e8,%edi
call   1060 <usleep@plt>
mov    $0x7f,%edi
xor    %esi,%esi
xor    %edx,%edx
mov    $0x14,%ecx
mov    $0x1,%r8d
call   1030 <drawLine@plt>
xor    %eax,%eax
call   1050 <Display@plt>
mov    $0x3e8,%edi
call   1060 <usleep@plt>
mov    $0x7f,%edi
xor    %esi,%esi
xor    %edx,%edx
mov    $0x18,%ecx
mov    $0x1,%r8d
call   1030 <drawLine@plt>
xor    %eax,%eax
call   1050 <Display@plt>
mov    $0x3e8,%edi
call   1060 <usleep@plt>
mov    $0x7f,%edi
xor    %esi,%esi
xor    %edx,%edx
mov    $0x1c,%ecx
mov    $0x1,%r8d
call   1030 <drawLine@plt>
xor    %eax,%eax
call   1050 <Display@plt>
mov    $0x3e8,%edi
call   1060 <usleep@plt>
mov    $0xfffc,%bp
add    $0x4,%ebp
movswl %bp,%ebx
mov    $0x7f,%edi
xor    %esi,%esi
mov    %ebx,%edx
mov    $0x1f,%ecx
mov    $0x1,%r8d
call   1030 <drawLine@plt>
xor    %eax,%eax
call   1050 <Display@plt>
mov    $0x3e8,%edi
call   1060 <usleep@plt>
cmp    $0x7c,%bx
jb     17a0 <testdrawline+0x660>
mov    $0x3d090,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1060 <usleep@plt>

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

LLVM IR (-O2):
define void @testdrawline() {
br label %1
1: ; preds = %0, %1
%2 = phi i16 [ 0, %0 ], [ %6, %1 ]
%3 = tail call i32 @drawLine(i32 0, i32 0, i16 signext %2, i32 31, i32 1)
%4 = tail call i32 (...) @Display()
%5 = tail call i32 @usleep(i32 1000)
%6 = add nuw nsw i16 %2, 4
%7 = icmp ult i16 %2, 124
br i1 %7, label %1, label %8
8: ; preds = %1
%9 = tail call i32 @drawLine(i32 0, i32 0, i16 signext 127, i32 0, i32 1)
%10 = tail call i32 (...) @Display()
%11 = tail call i32 @usleep(i32 1000)
%12 = tail call i32 @drawLine(i32 0, i32 0, i16 signext 127, i32 4, i32 1)
%13 = tail call i32 (...) @Display()
%14 = tail call i32 @usleep(i32 1000)
%15 = tail call i32 @drawLine(i32 0, i32 0, i16 signext 127, i32 8, i32 1)
%16 = tail call i32 (...) @Display()
%17 = tail call i32 @usleep(i32 1000)
%18 = tail call i32 @drawLine(i32 0, i32 0, i16 signext 127, i32 12, i32 1)
%19 = tail call i32 (...) @Display()
%20 = tail call i32 @usleep(i32 1000)
%21 = tail call i32 @drawLine(i32 0, i32 0, i16 signext 127, i32 16, i32 1)
%22 = tail call i32 (...) @Display()
%23 = tail call i32 @usleep(i32 1000)
%24 = tail call i32 @drawLine(i32 0, i32 0, i16 signext 127, i32 20, i32 1)
%25 = tail call i32 (...) @Display()
%26 = tail call i32 @usleep(i32 1000)
%27 = tail call i32 @drawLine(i32 0, i32 0, i16 signext 127, i32 24, i32 1)
%28 = tail call i32 (...) @Display()
%29 = tail call i32 @usleep(i32 1000)
%30 = tail call i32 @drawLine(i32 0, i32 0, i16 signext 127, i32 28, i32 1)
%31 = tail call i32 (...) @Display()
%32 = tail call i32 @usleep(i32 1000)
%33 = tail call i32 @usleep(i32 250000)
%34 = tail call i32 (...) @clearDisplay()
br label %35
35: ; preds = %8, %35
%36 = phi i16 [ 0, %8 ], [ %40, %35 ]
%37 = tail call i32 @drawLine(i32 0, i32 31, i16 signext %36, i32 0, i32 1)
%38 = tail call i32 (...) @Display()
%39 = tail call i32 @usleep(i32 1000)
%40 = add nuw nsw i16 %36, 4
%41 = icmp ult i16 %36, 124
br i1 %41, label %35, label %42
42: ; preds = %35
%43 = tail call i32 @drawLine(i32 0, i32 31, i16 signext 127, i32 31, i32 1)
%44 = tail call i32 (...) @Display()
%45 = tail call i32 @usleep(i32 1000)
%46 = tail call i32 @drawLine(i32 0, i32 31, i16 signext 127, i32 27, i32 1)
%47 = tail call i32 (...) @Display()
%48 = tail call i32 @usleep(i32 1000)
%49 = tail call i32 @drawLine(i32 0, i32 31, i16 signext 127, i32 23, i32 1)
%50 = tail call i32 (...) @Display()
%51 = tail call i32 @usleep(i32 1000)
%52 = tail call i32 @drawLine(i32 0, i32 31, i16 signext 127, i32 19, i32 1)
%53 = tail call i32 (...) @Display()
%54 = tail call i32 @usleep(i32 1000)
%55 = tail call i32 @drawLine(i32 0, i32 31, i16 signext 127, i32 15, i32 1)
%56 = tail call i32 (...) @Display()
%57 = tail call i32 @usleep(i32 1000)
%58 = tail call i32 @drawLine(i32 0, i32 31, i16 signext 127, i32 11, i32 1)
%59 = tail call i32 (...) @Display()
%60 = tail call i32 @usleep(i32 1000)
%61 = tail call i32 @drawLine(i32 0, i32 31, i16 signext 127, i32 7, i32 1)
%62 = tail call i32 (...) @Display()
%63 = tail call i32 @usleep(i32 1000)
%64 = tail call i32 @drawLine(i32 0, i32 31, i16 signext 127, i32 3, i32 1)
%65 = tail call i32 (...) @Display()
%66 = tail call i32 @usleep(i32 1000)
%67 = tail call i32 @usleep(i32 250000)
%68 = tail call i32 (...) @clearDisplay()
br label %69
69: ; preds = %42, %69
%70 = phi i16 [ 127, %42 ], [ %74, %69 ]
%71 = tail call i32 @drawLine(i32 127, i32 31, i16 signext %70, i32 0, i32 1)
%72 = tail call i32 (...) @Display()
%73 = tail call i32 @usleep(i32 1000)
%74 = add nsw i16 %70, -4
%75 = icmp ugt i16 %70, 3
br i1 %75, label %69, label %76
76: ; preds = %69
%77 = tail call i32 @drawLine(i32 127, i32 31, i16 signext 0, i32 31, i32 1)
%78 = tail call i32 (...) @Display()
%79 = tail call i32 @usleep(i32 1000)
%80 = tail call i32 @drawLine(i32 127, i32 31, i16 signext 0, i32 27, i32 1)
%81 = tail call i32 (...) @Display()
%82 = tail call i32 @usleep(i32 1000)
%83 = tail call i32 @drawLine(i32 127, i32 31, i16 signext 0, i32 23, i32 1)
%84 = tail call i32 (...) @Display()
%85 = tail call i32 @usleep(i32 1000)
%86 = tail call i32 @drawLine(i32 127, i32 31, i16 signext 0, i32 19, i32 1)
%87 = tail call i32 (...) @Display()
%88 = tail call i32 @usleep(i32 1000)
%89 = tail call i32 @drawLine(i32 127, i32 31, i16 signext 0, i32 15, i32 1)
%90 = tail call i32 (...) @Display()
%91 = tail call i32 @usleep(i32 1000)
%92 = tail call i32 @drawLine(i32 127, i32 31, i16 signext 0, i32 11, i32 1)
%93 = tail call i32 (...) @Display()
%94 = tail call i32 @usleep(i32 1000)
%95 = tail call i32 @drawLine(i32 127, i32 31, i16 signext 0, i32 7, i32 1)
%96 = tail call i32 (...) @Display()
%97 = tail call i32 @usleep(i32 1000)
%98 = tail call i32 @drawLine(i32 127, i32 31, i16 signext 0, i32 3, i32 1)
%99 = tail call i32 (...) @Display()
%100 = tail call i32 @usleep(i32 1000)
%101 = tail call i32 @usleep(i32 250000)
%102 = tail call i32 (...) @clearDisplay()
%103 = tail call i32 @drawLine(i32 127, i32 0, i16 signext 0, i32 0, i32 1)
%104 = tail call i32 (...) @Display()
%105 = tail call i32 @usleep(i32 1000)
%106 = tail call i32 @drawLine(i32 127, i32 0, i16 signext 0, i32 4, i32 1)
%107 = tail call i32 (...) @Display()
%108 = tail call i32 @usleep(i32 1000)
%109 = tail call i32 @drawLine(i32 127, i32 0, i16 signext 0, i32 8, i32 1)
%110 = tail call i32 (...) @Display()
%111 = tail call i32 @usleep(i32 1000)
%112 = tail call i32 @drawLine(i32 127, i32 0, i16 signext 0, i32 12, i32 1)
%113 = tail call i32 (...) @Display()
%114 = tail call i32 @usleep(i32 1000)
%115 = tail call i32 @drawLine(i32 127, i32 0, i16 signext 0, i32 16, i32 1)
%116 = tail call i32 (...) @Display()
%117 = tail call i32 @usleep(i32 1000)
%118 = tail call i32 @drawLine(i32 127, i32 0, i16 signext 0, i32 20, i32 1)
%119 = tail call i32 (...) @Display()
%120 = tail call i32 @usleep(i32 1000)
%121 = tail call i32 @drawLine(i32 127, i32 0, i16 signext 0, i32 24, i32 1)
%122 = tail call i32 (...) @Display()
%123 = tail call i32 @usleep(i32 1000)
%124 = tail call i32 @drawLine(i32 127, i32 0, i16 signext 0, i32 28, i32 1)
%125 = tail call i32 (...) @Display()
%126 = tail call i32 @usleep(i32 1000)
br label %127
127: ; preds = %76, %127
%128 = phi i16 [ %132, %127 ], [ 0, %76 ]
%129 = tail call i32 @drawLine(i32 127, i32 0, i16 signext %128, i32 31, i32 1)
%130 = tail call i32 (...) @Display()
%131 = tail call i32 @usleep(i32 1000)
%132 = add nuw nsw i16 %128, 4
%133 = icmp ult i16 %128, 124
br i1 %133, label %127, label %134
134: ; preds = %127
%135 = tail call i32 @usleep(i32 250000)
ret void
}