#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*/ __m64;
typedef int /*<<< orphan*/ __m128;

/* Variables and functions */
int /*<<< orphan*/ _mm_cvtpi32_ps(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ _mm_movelh_ps(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ _mm_setzero_ps();
int /*<<< orphan*/ _mm_setzero_si64();
int /*<<< orphan*/ _mm_unpackhi_pi16(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ _mm_unpacklo_pi16(int /*<<< orphan*/, int /*<<< orphan*/);
__m128 __attribute__((__always___, __nodebug__)) _mm_cvtpu16_ps(__m64 a) {
  __m64 b, c;
  __m128 r;
  b = _mm_setzero_si64();
  c = _mm_unpackhi_pi16(a, b);
  r = _mm_setzero_ps();
  r = _mm_cvtpi32_ps(r, c);
  r = _mm_movelh_ps(r, r);
  c = _mm_unpacklo_pi16(a, b);
  r = _mm_cvtpi32_ps(r, c);
  return r;
}


x86 assembly (clang, -O0):
<_mm_cvtpu16_ps>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1070 <_mm_setzero_si64@plt>
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1040 <_mm_unpackhi_pi16@plt>
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1080 <_mm_setzero_ps@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1030 <_mm_cvtpi32_ps@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%edi
mov    -0x10(%rbp),%esi
call   1060 <_mm_movelh_ps@plt>
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1050 <_mm_unpacklo_pi16@plt>
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1030 <_mm_cvtpi32_ps@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_mm_cvtpu16_ps>:
push   %rbp
push   %r14
push   %rbx
mov    %edi,%r14d
xor    %eax,%eax
call   1070 <_mm_setzero_si64@plt>
mov    %eax,%ebp
mov    %r14d,%edi
mov    %eax,%esi
call   1040 <_mm_unpackhi_pi16@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1080 <_mm_setzero_ps@plt>
mov    %eax,%edi
mov    %ebx,%esi
call   1030 <_mm_cvtpi32_ps@plt>
mov    %eax,%edi
mov    %eax,%esi
call   1060 <_mm_movelh_ps@plt>
mov    %eax,%ebx
mov    %r14d,%edi
mov    %ebp,%esi
call   1050 <_mm_unpacklo_pi16@plt>
mov    %ebx,%edi
mov    %eax,%esi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <_mm_cvtpi32_ps@plt>

LLVM IR (-O0):
define i32 @_mm_cvtpu16_ps(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %2
%6 = call i32 (...) @_mm_setzero_si64()
store i32 %6, i32* %3
%7 = load i32, i32* %2
%8 = load i32, i32* %3
%9 = call i32 @_mm_unpackhi_pi16(i32 %7, i32 %8)
store i32 %9, i32* %4
%10 = call i32 (...) @_mm_setzero_ps()
store i32 %10, i32* %5
%11 = load i32, i32* %5
%12 = load i32, i32* %4
%13 = call i32 @_mm_cvtpi32_ps(i32 %11, i32 %12)
store i32 %13, i32* %5
%14 = load i32, i32* %5
%15 = load i32, i32* %5
%16 = call i32 @_mm_movelh_ps(i32 %14, i32 %15)
store i32 %16, i32* %5
%17 = load i32, i32* %2
%18 = load i32, i32* %3
%19 = call i32 @_mm_unpacklo_pi16(i32 %17, i32 %18)
store i32 %19, i32* %4
%20 = load i32, i32* %5
%21 = load i32, i32* %4
%22 = call i32 @_mm_cvtpi32_ps(i32 %20, i32 %21)
store i32 %22, i32* %5
%23 = load i32, i32* %5
ret i32 %23
}

LLVM IR (-O2):
define i32 @_mm_cvtpu16_ps(i32 %0) {
%2 = tail call i32 (...) @_mm_setzero_si64()
%3 = tail call i32 @_mm_unpackhi_pi16(i32 %0, i32 %2)
%4 = tail call i32 (...) @_mm_setzero_ps()
%5 = tail call i32 @_mm_cvtpi32_ps(i32 %4, i32 %3)
%6 = tail call i32 @_mm_movelh_ps(i32 %5, i32 %5)
%7 = tail call i32 @_mm_unpacklo_pi16(i32 %0, i32 %2)
%8 = tail call i32 @_mm_cvtpi32_ps(i32 %6, i32 %7)
ret i32 %8
}