#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*/ mlMatrixMultTo(float const *, float const *, float *);
void mlMatrixScaleTo(const float *a, const float *b, float *result) {
  const float c[16] = {b[0], 0.0f, 0.0f, 0.0f, 0.0f, b[1], 0.0f, 0.0f,
                       0.0f, 0.0f, b[2], 0.0f, 0.0f, 0.0f, 0.0f, 1.0f};
  mlMatrixMultTo(a, c, result);
}


x86 assembly (clang, -O0):
<mlMatrixScaleTo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
lea    -0x60(%rbp),%rdi
xor    %esi,%esi
mov    $0x40,%edx
call   1030 <memset@plt>
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
movss  %xmm0,-0x60(%rbp)
mov    -0x10(%rbp),%rax
movss  0x4(%rax),%xmm0
movss  %xmm0,-0x4c(%rbp)
mov    -0x10(%rbp),%rax
movss  0x8(%rax),%xmm0
movss  %xmm0,-0x38(%rbp)
movss  0xe8b(%rip),%xmm0
movss  %xmm0,-0x24(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x60(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1040 <mlMatrixMultTo@plt>
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mlMatrixScaleTo>:
sub    $0x48,%rsp
xorps  %xmm0,%xmm0
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x20(%rsp)
movaps %xmm0,0x10(%rsp)
movaps %xmm0,(%rsp)
movss  (%rsi),%xmm0
movss  %xmm0,(%rsp)
movss  0x4(%rsi),%xmm0
movss  %xmm0,0x14(%rsp)
movss  0x8(%rsi),%xmm0
movss  %xmm0,0x28(%rsp)
movl   $0x3f800000,0x3c(%rsp)
3f
mov    %rsp,%rsi
call   1030 <mlMatrixMultTo@plt>
add    $0x48,%rsp
ret

LLVM IR (-O0):
define void @mlMatrixScaleTo(float* %0, float* %1, float* %2) {
%4 = alloca float*
%5 = alloca float*
%6 = alloca float*
%7 = alloca [16 x float]
store float* %0, float** %4
store float* %1, float** %5
store float* %2, float** %6
%8 = bitcast [16 x float]* %7 to i8*
%9 = getelementptr inbounds [16 x float], [16 x float]* %7, i64 0, i64 0
%10 = load float*, float** %5
%11 = getelementptr inbounds float, float* %10, i64 0
%12 = load float, float* %11
store float %12, float* %9
%13 = getelementptr inbounds float, float* %9, i64 1
%14 = getelementptr inbounds float, float* %13, i64 1
%15 = getelementptr inbounds float, float* %14, i64 1
%16 = getelementptr inbounds float, float* %15, i64 1
%17 = getelementptr inbounds float, float* %16, i64 1
%18 = load float*, float** %5
%19 = getelementptr inbounds float, float* %18, i64 1
%20 = load float, float* %19
store float %20, float* %17
%21 = getelementptr inbounds float, float* %17, i64 1
%22 = getelementptr inbounds float, float* %21, i64 1
%23 = getelementptr inbounds float, float* %22, i64 1
%24 = getelementptr inbounds float, float* %23, i64 1
%25 = getelementptr inbounds float, float* %24, i64 1
%26 = load float*, float** %5
%27 = getelementptr inbounds float, float* %26, i64 2
%28 = load float, float* %27
store float %28, float* %25
%29 = getelementptr inbounds float, float* %25, i64 1
%30 = getelementptr inbounds float, float* %29, i64 1
%31 = getelementptr inbounds float, float* %30, i64 1
%32 = getelementptr inbounds float, float* %31, i64 1
%33 = getelementptr inbounds float, float* %32, i64 1
store float 1.000000e+00, float* %33
%34 = load float*, float** %4
%35 = getelementptr inbounds [16 x float], [16 x float]* %7, i64 0, i64 0
%36 = load float*, float** %6
%37 = call i32 @mlMatrixMultTo(float* %34, float* %35, float* %36)
ret void
}

LLVM IR (-O2):
define void @mlMatrixScaleTo(float* %0, float* nocapture %1, float* %2) {
%4 = alloca [16 x float]
%5 = bitcast [16 x float]* %4 to i8*
%6 = getelementptr inbounds [16 x float], [16 x float]* %4, i64 0, i64 0
%7 = load float, float* %1
store float %7, float* %6
%8 = getelementptr inbounds [16 x float], [16 x float]* %4, i64 0, i64 5
%9 = getelementptr inbounds float, float* %1, i64 1
%10 = load float, float* %9
store float %10, float* %8
%11 = getelementptr inbounds [16 x float], [16 x float]* %4, i64 0, i64 10
%12 = getelementptr inbounds float, float* %1, i64 2
%13 = load float, float* %12
store float %13, float* %11
%14 = getelementptr inbounds [16 x float], [16 x float]* %4, i64 0, i64 15
store float 1.000000e+00, float* %14
%15 = call i32 @mlMatrixMultTo(float* %0, float* %6, float* %2)
ret void
}