#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*/ CG_DrawSides_NoScale(float, float, float, float, int);
int /*<<< orphan*/ CG_DrawTopBottom_NoScale(float, float, float, float, int);
int /*<<< orphan*/ trap_R_SetColor(void *);
void CG_DrawRect_FixedBorder(float x, float y, float width, float height,
                             int border, const float *color) {
  trap_R_SetColor(color);
  CG_DrawTopBottom_NoScale(x, y, width, height, border);
  CG_DrawSides_NoScale(x, y, width, height, border);
  trap_R_SetColor(((void *)0));
}


x86 assembly (clang, -O0):
<CG_DrawRect_FixedBorder>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  %xmm3,-0x10(%rbp)
mov    %edi,-0x14(%rbp)
mov    %rsi,-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
mov    -0x14(%rbp),%edi
call   1030 <CG_DrawTopBottom_NoScale@plt>
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
movss  -0xc(%rbp),%xmm2
movss  -0x10(%rbp),%xmm3
mov    -0x14(%rbp),%edi
call   1040 <CG_DrawSides_NoScale@plt>
xor    %eax,%eax
mov    %eax,%edi
call   1050 <trap_R_SetColor@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CG_DrawRect_FixedBorder>:
push   %rbx
sub    $0x10,%rsp
mov    %edi,%ebx
movss  %xmm3,0xc(%rsp)
movss  %xmm2,0x8(%rsp)
movss  %xmm1,0x4(%rsp)
movss  %xmm0,(%rsp)
mov    %rsi,%rdi
call   1050 <trap_R_SetColor@plt>
movss  (%rsp),%xmm0
movss  0x4(%rsp),%xmm1
movss  0x8(%rsp),%xmm2
movss  0xc(%rsp),%xmm3
mov    %ebx,%edi
call   1030 <CG_DrawTopBottom_NoScale@plt>
movss  (%rsp),%xmm0
movss  0x4(%rsp),%xmm1
movss  0x8(%rsp),%xmm2
movss  0xc(%rsp),%xmm3
mov    %ebx,%edi
call   1040 <CG_DrawSides_NoScale@plt>
xor    %edi,%edi
add    $0x10,%rsp
pop    %rbx
jmp    1050 <trap_R_SetColor@plt>

LLVM IR (-O0):
define void @CG_DrawRect_FixedBorder(float %0, float %1, float %2, float %3, i32 %4, float* %5) {
%7 = alloca float
%8 = alloca float
%9 = alloca float
%10 = alloca float
%11 = alloca i32
%12 = alloca float*
store float %0, float* %7
store float %1, float* %8
store float %2, float* %9
store float %3, float* %10
store i32 %4, i32* %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 i32, i32* %11
%21 = call i32 @CG_DrawTopBottom_NoScale(float %16, float %17, float %18, float %19, i32 %20)
%22 = load float, float* %7
%23 = load float, float* %8
%24 = load float, float* %9
%25 = load float, float* %10
%26 = load i32, i32* %11
%27 = call i32 @CG_DrawSides_NoScale(float %22, float %23, float %24, float %25, i32 %26)
%28 = call i32 @trap_R_SetColor(i8* null)
ret void
}

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