#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 */
scalar_t__ malloc(int);
float *CreateArrayColor(float red0, float green0, float blue0) {
  float *TabColor;
  TabColor = (float *)malloc(3 * sizeof(float));
  TabColor[0] = 65535.0 * (red0 / 255.0f);
  TabColor[1] = 65535.0 * (green0 / 255.0f);
  TabColor[2] = 65535.0 * (blue0 / 255.0f);
  return TabColor;
}


x86 assembly (clang, -O0):
<CreateArrayColor>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
mov    $0xc,%edi
call   1030 <malloc@plt>
mov    %rax,-0x18(%rbp)
movss  -0x4(%rbp),%xmm0
movss  0xec6(%rip),%xmm1
divss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xeae(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
mov    -0x18(%rbp),%rax
movss  %xmm0,(%rax)
movss  -0x8(%rbp),%xmm0
movss  0xe99(%rip),%xmm1
divss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xe81(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
mov    -0x18(%rbp),%rax
movss  %xmm0,0x4(%rax)
movss  -0xc(%rbp),%xmm0
movss  0xe6b(%rip),%xmm1
divss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xe53(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
mov    -0x18(%rbp),%rax
movss  %xmm0,0x8(%rax)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CreateArrayColor>:
sub    $0x18,%rsp
movss  %xmm2,0x14(%rsp)
movss  %xmm1,0x10(%rsp)
movss  %xmm0,0xc(%rsp)
mov    $0xc,%edi
call   1030 <malloc@plt>
movss  0xec8(%rip),%xmm0
movss  0xc(%rsp),%xmm2
divss  %xmm0,%xmm2
movss  0xeba(%rip),%xmm1
mulss  %xmm1,%xmm2
movss  %xmm2,(%rax)
movss  0x10(%rsp),%xmm2
divss  %xmm0,%xmm2
mulss  %xmm1,%xmm2
movss  %xmm2,0x4(%rax)
movss  0x14(%rsp),%xmm2
divss  %xmm0,%xmm2
mulss  %xmm1,%xmm2
movss  %xmm2,0x8(%rax)
add    $0x18,%rsp
ret

LLVM IR (-O0):
define float* @CreateArrayColor(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = alloca float*
store float %0, float* %4
store float %1, float* %5
store float %2, float* %6
%8 = call i64 @malloc(i32 12)
%9 = inttoptr i64 %8 to float*
store float* %9, float** %7
%10 = load float, float* %4
%11 = fdiv float %10, 2.550000e+02
%12 = fpext float %11 to double
%13 = fmul double 6.553500e+04, %12
%14 = fptrunc double %13 to float
%15 = load float*, float** %7
%16 = getelementptr inbounds float, float* %15, i64 0
store float %14, float* %16
%17 = load float, float* %5
%18 = fdiv float %17, 2.550000e+02
%19 = fpext float %18 to double
%20 = fmul double 6.553500e+04, %19
%21 = fptrunc double %20 to float
%22 = load float*, float** %7
%23 = getelementptr inbounds float, float* %22, i64 1
store float %21, float* %23
%24 = load float, float* %6
%25 = fdiv float %24, 2.550000e+02
%26 = fpext float %25 to double
%27 = fmul double 6.553500e+04, %26
%28 = fptrunc double %27 to float
%29 = load float*, float** %7
%30 = getelementptr inbounds float, float* %29, i64 2
store float %28, float* %30
%31 = load float*, float** %7
ret float* %31
}

LLVM IR (-O2):
define float* @CreateArrayColor(float %0, float %1, float %2) {
%4 = tail call i64 @malloc(i32 12)
%5 = inttoptr i64 %4 to float*
%6 = fdiv float %0, 2.550000e+02
%7 = fmul float %6, 6.553500e+04
store float %7, float* %5
%8 = fdiv float %1, 2.550000e+02
%9 = fmul float %8, 6.553500e+04
%10 = getelementptr inbounds float, float* %5, i64 1
store float %9, float* %10
%11 = fdiv float %2, 2.550000e+02
%12 = fmul float %11, 6.553500e+04
%13 = getelementptr inbounds float, float* %5, i64 2
store float %12, float* %13
ret float* %5
}