#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*/ UI_DrawSides(float, float, float, float, float);
int /*<<< orphan*/ UI_DrawTopBottom(float, float, float, float, float);
int /*<<< orphan*/ trap_R_SetColor(void *);
void UI_DrawRect(float x, float y, float width, float height, float size,
                 const float *color) {
  trap_R_SetColor(color);
  UI_DrawTopBottom(x, y, width, height, size);
  UI_DrawSides(x, y, width, height, size);
  trap_R_SetColor(((void *)0));
}


x86 assembly (clang, -O0):
<UI_DrawRect>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  %xmm3,-0x10(%rbp)
movss  %xmm4,-0x14(%rbp)
mov    %rdi,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
call   1050 <trap_R_SetColor@plt>
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
movss  -0xc(%rbp),%xmm2
movss  -0x10(%rbp),%xmm3
movss  -0x14(%rbp),%xmm4
call   1030 <UI_DrawTopBottom@plt>
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
movss  -0xc(%rbp),%xmm2
movss  -0x10(%rbp),%xmm3
movss  -0x14(%rbp),%xmm4
call   1040 <UI_DrawSides@plt>
xor    %eax,%eax
mov    %eax,%edi
call   1050 <trap_R_SetColor@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<UI_DrawRect>:
sub    $0x18,%rsp
movss  %xmm4,0x14(%rsp)
movss  %xmm3,0x10(%rsp)
movss  %xmm2,0xc(%rsp)
movss  %xmm1,0x8(%rsp)
movss  %xmm0,0x4(%rsp)
call   1050 <trap_R_SetColor@plt>
movss  0x4(%rsp),%xmm0
movss  0x8(%rsp),%xmm1
movss  0xc(%rsp),%xmm2
movss  0x10(%rsp),%xmm3
movss  0x14(%rsp),%xmm4
call   1030 <UI_DrawTopBottom@plt>
movss  0x4(%rsp),%xmm0
movss  0x8(%rsp),%xmm1
movss  0xc(%rsp),%xmm2
movss  0x10(%rsp),%xmm3
movss  0x14(%rsp),%xmm4
call   1040 <UI_DrawSides@plt>
xor    %edi,%edi
add    $0x18,%rsp
jmp    1050 <trap_R_SetColor@plt>

LLVM IR (-O0):
define void @UI_DrawRect(float %0, float %1, float %2, float %3, float %4, float* %5) {
%7 = alloca float
%8 = alloca float
%9 = alloca float
%10 = alloca float
%11 = alloca float
%12 = alloca float*
store float %0, float* %7
store float %1, float* %8
store float %2, float* %9
store float %3, float* %10
store float %4, float* %11
store float* %5, float** %12
%13 = load float*, float** %12
%14 = bitcast float* %13 to i8*
%15 = call i32 @trap_R_SetColor(i8* %14)
%16 = load float, float* %7
%17 = load float, float* %8
%18 = load float, float* %9
%19 = load float, float* %10
%20 = load float, float* %11
%21 = call i32 @UI_DrawTopBottom(float %16, float %17, float %18, float %19, float %20)
%22 = load float, float* %7
%23 = load float, float* %8
%24 = load float, float* %9
%25 = load float, float* %10
%26 = load float, float* %11
%27 = call i32 @UI_DrawSides(float %22, float %23, float %24, float %25, float %26)
%28 = call i32 @trap_R_SetColor(i8* null)
ret void
}

LLVM IR (-O2):
define void @UI_DrawRect(float %0, float %1, float %2, float %3, float %4, float* %5) {
%7 = bitcast float* %5 to i8*
%8 = tail call i32 @trap_R_SetColor(i8* %7)
%9 = tail call i32 @UI_DrawTopBottom(float %0, float %1, float %2, float %3, float %4)
%10 = tail call i32 @UI_DrawSides(float %0, float %1, float %2, float %3, float %4)
%11 = tail call i32 @trap_R_SetColor(i8* null)
ret void
}