#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*/ oled_fill(int, int, int, int, int);
void oled_rect(int color, int x0, int y0, int x1, int y1) {
  oled_fill(color, x0, y0, x1, y0);
  oled_fill(color, x0, y1, x1, y1);
  oled_fill(color, x0, y0, x0, y1);
  oled_fill(color, x1, y0, x1, y1);
}


x86 assembly (clang, -O0):
<oled_rect>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
mov    -0xc(%rbp),%r8d
call   1030 <oled_fill@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0x14(%rbp),%edx
mov    -0x10(%rbp),%ecx
mov    -0x14(%rbp),%r8d
call   1030 <oled_fill@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x8(%rbp),%ecx
mov    -0x14(%rbp),%r8d
call   1030 <oled_fill@plt>
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
mov    -0x14(%rbp),%r8d
call   1030 <oled_fill@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<oled_rect>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %r8d,%r14d
mov    %ecx,%r15d
mov    %edx,%r12d
mov    %esi,%ebp
mov    %edi,%ebx
mov    %edx,%r8d
call   1030 <oled_fill@plt>
mov    %ebx,%edi
mov    %ebp,%esi
mov    %r14d,%edx
mov    %r15d,%ecx
mov    %r14d,%r8d
call   1030 <oled_fill@plt>
mov    %ebx,%edi
mov    %ebp,%esi
mov    %r12d,%edx
mov    %ebp,%ecx
mov    %r14d,%r8d
call   1030 <oled_fill@plt>
mov    %ebx,%edi
mov    %r15d,%esi
mov    %r12d,%edx
mov    %r15d,%ecx
mov    %r14d,%r8d
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <oled_fill@plt>

LLVM IR (-O0):
define void @oled_rect(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i32 %0, i32* %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%11 = load i32, i32* %6
%12 = load i32, i32* %7
%13 = load i32, i32* %8
%14 = load i32, i32* %9
%15 = load i32, i32* %8
%16 = call i32 @oled_fill(i32 %11, i32 %12, i32 %13, i32 %14, i32 %15)
%17 = load i32, i32* %6
%18 = load i32, i32* %7
%19 = load i32, i32* %10
%20 = load i32, i32* %9
%21 = load i32, i32* %10
%22 = call i32 @oled_fill(i32 %17, i32 %18, i32 %19, i32 %20, i32 %21)
%23 = load i32, i32* %6
%24 = load i32, i32* %7
%25 = load i32, i32* %8
%26 = load i32, i32* %7
%27 = load i32, i32* %10
%28 = call i32 @oled_fill(i32 %23, i32 %24, i32 %25, i32 %26, i32 %27)
%29 = load i32, i32* %6
%30 = load i32, i32* %9
%31 = load i32, i32* %8
%32 = load i32, i32* %9
%33 = load i32, i32* %10
%34 = call i32 @oled_fill(i32 %29, i32 %30, i32 %31, i32 %32, i32 %33)
ret void
}

LLVM IR (-O2):
define void @oled_rect(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = tail call i32 @oled_fill(i32 %0, i32 %1, i32 %2, i32 %3, i32 %2)
%7 = tail call i32 @oled_fill(i32 %0, i32 %1, i32 %4, i32 %3, i32 %4)
%8 = tail call i32 @oled_fill(i32 %0, i32 %1, i32 %2, i32 %1, i32 %4)
%9 = tail call i32 @oled_fill(i32 %0, i32 %3, i32 %2, i32 %3, i32 %4)
ret void
}