#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*/ Glcd_Dot(unsigned int, unsigned int, int);
int /*<<< orphan*/ Glcd_v_Line(unsigned int, unsigned int, unsigned int, int);
unsigned int abs(unsigned int);
void interpo(unsigned int past_i, unsigned int pres_i, unsigned int past_y,
             unsigned int pres_y) {
  unsigned int med, r_past_y, r_pres_y, r_past_i, r_pres_i;
  if ((pres_y - past_y) != 0 && (pres_y - past_y) != 1) {
    med = (pres_y - past_y) / 2;
    if (med < 0) {
      med = abs(med);
      r_past_i = pres_i;
      r_pres_i = past_i;
      r_past_y = pres_y;
      r_pres_y = past_y;
    } else {
      r_past_i = past_i;
      r_pres_i = pres_i;
      r_past_y = past_y;
      r_pres_y = pres_y;
    }
    Glcd_v_Line(r_past_y, r_past_y + med, r_past_i, 1);
    Glcd_v_Line(r_past_y + med, r_pres_y, r_pres_i, 1);
  } else {
    Glcd_Dot(pres_i, pres_y, 1);
  }
}


x86 assembly (clang, -O0):
<interpo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0x10(%rbp),%eax
sub    -0xc(%rbp),%eax
cmp    $0x0,%eax
je     11e9 <interpo+0xb9>
mov    -0x10(%rbp),%eax
sub    -0xc(%rbp),%eax
cmp    $0x1,%eax
je     11e9 <interpo+0xb9>
mov    -0x10(%rbp),%eax
sub    -0xc(%rbp),%eax
shr    $0x1,%eax
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jae    11a0 <interpo+0x70>
mov    -0x14(%rbp),%edi
call   1030 <abs@plt>
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x1c(%rbp)
jmp    11b8 <interpo+0x88>
mov    -0x4(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%edi
mov    -0x18(%rbp),%esi
add    -0x14(%rbp),%esi
mov    -0x20(%rbp),%edx
mov    $0x1,%ecx
call   1050 <Glcd_v_Line@plt>
mov    -0x18(%rbp),%edi
add    -0x14(%rbp),%edi
mov    -0x1c(%rbp),%esi
mov    -0x24(%rbp),%edx
mov    $0x1,%ecx
call   1050 <Glcd_v_Line@plt>
jmp    11f9 <interpo+0xc9>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%esi
mov    $0x1,%edx
call   1040 <Glcd_Dot@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<interpo>:
push   %rbp
push   %r14
push   %rbx
mov    %ecx,%ebp
mov    %esi,%r14d
mov    %ecx,%ebx
sub    %edx,%ebx
cmp    $0x2,%ebx
jae    1145 <interpo+0x25>
mov    %r14d,%edi
mov    %ebp,%esi
mov    $0x1,%edx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <Glcd_Dot@plt>
mov    %edi,%eax
shr    %ebx
add    %edx,%ebx
mov    %edx,%edi
mov    %ebx,%esi
mov    %eax,%edx
mov    $0x1,%ecx
call   1040 <Glcd_v_Line@plt>
mov    %ebx,%edi
mov    %ebp,%esi
mov    %r14d,%edx
mov    $0x1,%ecx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <Glcd_v_Line@plt>

LLVM IR (-O0):
define void @interpo(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%14 = load i32, i32* %8
%15 = load i32, i32* %7
%16 = sub i32 %14, %15
%17 = icmp ne i32 %16, 0
br i1 %17, label %18, label %55
18: ; preds = %4
%19 = load i32, i32* %8
%20 = load i32, i32* %7
%21 = sub i32 %19, %20
%22 = icmp ne i32 %21, 1
br i1 %22, label %23, label %55
23: ; preds = %18
%24 = load i32, i32* %8
%25 = load i32, i32* %7
%26 = sub i32 %24, %25
%27 = udiv i32 %26, 2
store i32 %27, i32* %9
%28 = load i32, i32* %9
%29 = icmp ult i32 %28, 0
br i1 %29, label %30, label %37
30: ; preds = %23
%31 = load i32, i32* %9
%32 = call i32 @abs(i32 %31)
store i32 %32, i32* %9
%33 = load i32, i32* %6
store i32 %33, i32* %12
%34 = load i32, i32* %5
store i32 %34, i32* %13
%35 = load i32, i32* %8
store i32 %35, i32* %10
%36 = load i32, i32* %7
store i32 %36, i32* %11
br label %42
37: ; preds = %23
%38 = load i32, i32* %5
store i32 %38, i32* %12
%39 = load i32, i32* %6
store i32 %39, i32* %13
%40 = load i32, i32* %7
store i32 %40, i32* %10
%41 = load i32, i32* %8
store i32 %41, i32* %11
br label %42
42: ; preds = %37, %30
%43 = load i32, i32* %10
%44 = load i32, i32* %10
%45 = load i32, i32* %9
%46 = add i32 %44, %45
%47 = load i32, i32* %12
%48 = call i32 @Glcd_v_Line(i32 %43, i32 %46, i32 %47, i32 1)
%49 = load i32, i32* %10
%50 = load i32, i32* %9
%51 = add i32 %49, %50
%52 = load i32, i32* %11
%53 = load i32, i32* %13
%54 = call i32 @Glcd_v_Line(i32 %51, i32 %52, i32 %53, i32 1)
br label %59
55: ; preds = %18, %4
%56 = load i32, i32* %6
%57 = load i32, i32* %8
%58 = call i32 @Glcd_Dot(i32 %56, i32 %57, i32 1)
br label %59
59: ; preds = %55, %42
ret void
}

LLVM IR (-O2):
define void @interpo(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = sub i32 %3, %2
%6 = icmp ult i32 %5, 2
br i1 %6, label %12, label %7
7: ; preds = %4
%8 = lshr i32 %5, 1
%9 = add i32 %8, %2
%10 = tail call i32 @Glcd_v_Line(i32 %2, i32 %9, i32 %0, i32 1)
%11 = tail call i32 @Glcd_v_Line(i32 %9, i32 %3, i32 %1, i32 1)
br label %14
12: ; preds = %4
%13 = tail call i32 @Glcd_Dot(i32 %1, i32 %3, i32 1)
br label %14
14: ; preds = %12, %7
ret void
}