#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 */
struct mat {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ mat_create_box(struct mat *, float, float, float, float,
                                  float);
void mat_create_gradient_box(struct mat *this, float w, float h, float rotation,
                             float dx, float dy) {
  mat_create_box(this, (w / 1638.4f), (h / 1638.4f), rotation,
                 (dx + (w / 2.0f)), (dy + (h / 2.0f)));
}


x86 assembly (clang, -O0):
<mat_create_gradient_box>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
movss  %xmm1,-0x10(%rbp)
movss  %xmm2,-0x14(%rbp)
movss  %xmm3,-0x18(%rbp)
movss  %xmm4,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
movss  -0xc(%rbp),%xmm0
movss  0xebe(%rip),%xmm1
divss  %xmm1,%xmm0
movss  -0x10(%rbp),%xmm1
movss  0xead(%rip),%xmm2
divss  %xmm2,%xmm1
movss  -0x14(%rbp),%xmm2
movss  -0x18(%rbp),%xmm3
movss  -0xc(%rbp),%xmm4
movss  0xe8e(%rip),%xmm5
divss  %xmm5,%xmm4
addss  %xmm4,%xmm3
movss  -0x1c(%rbp),%xmm4
movss  -0x10(%rbp),%xmm5
movss  0xe74(%rip),%xmm6
divss  %xmm6,%xmm5
addss  %xmm5,%xmm4
call   1030 <mat_create_box@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mat_create_gradient_box>:
movss  0xee8(%rip),%xmm6
movaps %xmm0,%xmm5
divss  %xmm6,%xmm5
movss  0xedd(%rip),%xmm7
mulss  %xmm7,%xmm0
mulss  %xmm1,%xmm7
divss  %xmm6,%xmm1
addss  %xmm0,%xmm3
addss  %xmm7,%xmm4
movaps %xmm5,%xmm0
jmp    1030 <mat_create_box@plt>

LLVM IR (-O0):
%struct.mat = type { i32 }
define void @mat_create_gradient_box(%struct.mat* %0, float %1, float %2, float %3, float %4, float %5) {
%7 = alloca %struct.mat*
%8 = alloca float
%9 = alloca float
%10 = alloca float
%11 = alloca float
%12 = alloca float
store %struct.mat* %0, %struct.mat** %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 %struct.mat*, %struct.mat** %7
%14 = load float, float* %8
%15 = fdiv float %14, 0x40999999A0000000
%16 = load float, float* %9
%17 = fdiv float %16, 0x40999999A0000000
%18 = load float, float* %10
%19 = load float, float* %11
%20 = load float, float* %8
%21 = fdiv float %20, 2.000000e+00
%22 = fadd float %19, %21
%23 = load float, float* %12
%24 = load float, float* %9
%25 = fdiv float %24, 2.000000e+00
%26 = fadd float %23, %25
%27 = call i32 @mat_create_box(%struct.mat* %13, float %15, float %17, float %18, float %22, float %26)
ret void
}

LLVM IR (-O2):
%struct.mat = type { i32 }
define void @mat_create_gradient_box(%struct.mat* %0, float %1, float %2, float %3, float %4, float %5) {
%7 = fdiv float %1, 0x40999999A0000000
%8 = fdiv float %2, 0x40999999A0000000
%9 = fmul float %1, 5.000000e-01
%10 = fadd float %9, %4
%11 = fmul float %2, 5.000000e-01
%12 = fadd float %11, %5
%13 = tail call i32 @mat_create_box(%struct.mat* %0, float %7, float %8, float %3, float %10, float %12)
ret void
}