#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 */
typedef int /*<<< orphan*/ uint8_t;
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ memcpy(float *, int *, int);
float GST_READ_FLOAT_LE(const uint8_t *data) {
  uint32_t i = 0;
  float f = 0;
  i = ((((uint32_t)(((const uint8_t *)(data))[3])) << 24) |
       (((uint32_t)(((const uint8_t *)(data))[2])) << 16) |
       (((uint32_t)(((const uint8_t *)(data))[1])) << 8) |
       (((uint32_t)(((const uint8_t *)(data))[0])) << 0));
  memcpy(&f, &i, sizeof(uint32_t));
  return f;
}


x86 assembly (clang, -O0):
<GST_READ_FLOAT_LE>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    0xc(%rax),%eax
shl    $0x18,%eax
mov    -0x8(%rbp),%rcx
mov    0x8(%rcx),%ecx
shl    $0x10,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
mov    0x4(%rcx),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
mov    (%rcx),%ecx
shl    $0x0,%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
lea    -0x10(%rbp),%rdi
lea    -0xc(%rbp),%rsi
mov    $0x4,%edx
call   1030 <memcpy@plt>
movss  -0x10(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GST_READ_FLOAT_LE>:
push   %rax
movl   $0x0,(%rsp)
mov    0xc(%rdi),%eax
shl    $0x18,%eax
mov    0x4(%rdi),%ecx
mov    0x8(%rdi),%edx
shl    $0x10,%edx
or     %eax,%edx
shl    $0x8,%ecx
or     %edx,%ecx
or     (%rdi),%ecx
mov    %ecx,0x4(%rsp)
mov    %rsp,%rdi
lea    0x4(%rsp),%rsi
mov    $0x4,%edx
call   1030 <memcpy@plt>
movss  (%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @GST_READ_FLOAT_LE(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
%4 = alloca float
store i32* %0, i32** %2
store i32 0, i32* %3
store float 0.000000e+00, float* %4
%5 = load i32*, i32** %2
%6 = getelementptr inbounds i32, i32* %5, i64 3
%7 = load i32, i32* %6
%8 = shl i32 %7, 24
%9 = load i32*, i32** %2
%10 = getelementptr inbounds i32, i32* %9, i64 2
%11 = load i32, i32* %10
%12 = shl i32 %11, 16
%13 = or i32 %8, %12
%14 = load i32*, i32** %2
%15 = getelementptr inbounds i32, i32* %14, i64 1
%16 = load i32, i32* %15
%17 = shl i32 %16, 8
%18 = or i32 %13, %17
%19 = load i32*, i32** %2
%20 = getelementptr inbounds i32, i32* %19, i64 0
%21 = load i32, i32* %20
%22 = shl i32 %21, 0
%23 = or i32 %18, %22
store i32 %23, i32* %3
%24 = call i32 @memcpy(float* %4, i32* %3, i32 4)
%25 = load float, float* %4
ret float %25
}

LLVM IR (-O2):
define float @GST_READ_FLOAT_LE(i32* nocapture %0) {
%2 = alloca i32
%3 = alloca float
%4 = bitcast i32* %2 to i8*
%5 = bitcast float* %3 to i8*
store float 0.000000e+00, float* %3
%6 = getelementptr inbounds i32, i32* %0, i64 3
%7 = load i32, i32* %6
%8 = shl i32 %7, 24
%9 = getelementptr inbounds i32, i32* %0, i64 2
%10 = load i32, i32* %9
%11 = shl i32 %10, 16
%12 = or i32 %11, %8
%13 = getelementptr inbounds i32, i32* %0, i64 1
%14 = load i32, i32* %13
%15 = shl i32 %14, 8
%16 = or i32 %12, %15
%17 = load i32, i32* %0
%18 = or i32 %16, %17
store i32 %18, i32* %2
%19 = call i32 @memcpy(float* %3, i32* %2, i32 4)
%20 = load float, float* %3
ret float %20
}