#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 scalar_t__ __m128i;
typedef scalar_t__ __m128;

/* Variables and functions */
scalar_t__ _mm_cvtsi32_si128(unsigned int);
scalar_t__ _mm_load_ss(float *);
scalar_t__ _mm_shuffle_ps(scalar_t__, scalar_t__, int);
void convolute_C(unsigned int *A_index_array, float *A_norm,
                 unsigned int *B_index_array, float *B_norm) {
  __m128i A_index_xmm;
  __m128 A_norm_xmm;
  A_norm_xmm = _mm_load_ss(&A_norm[0]);
  A_norm_xmm = _mm_shuffle_ps(A_norm_xmm, A_norm_xmm, 0x00);
  A_index_xmm = _mm_cvtsi32_si128(A_index_array[0]);
  A_index_xmm = (__m128i)_mm_shuffle_ps(A_index_xmm, A_index_xmm, 0x00);
}


x86 assembly (clang, -O0):
<convolute_C>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
call   1050 <_mm_load_ss@plt>
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rdi
mov    -0x30(%rbp),%rsi
xor    %edx,%edx
call   1030 <_mm_shuffle_ps@plt>
mov    %rax,-0x30(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edi
call   1040 <_mm_cvtsi32_si128@plt>
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rdi
mov    -0x28(%rbp),%rsi
xor    %edx,%edx
call   1030 <_mm_shuffle_ps@plt>
mov    %rax,-0x28(%rbp)
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<convolute_C>:
push   %rbx
mov    %rdi,%rbx
mov    %rsi,%rdi
call   1050 <_mm_load_ss@plt>
mov    %rax,%rdi
mov    %rax,%rsi
xor    %edx,%edx
call   1030 <_mm_shuffle_ps@plt>
mov    (%rbx),%edi
call   1040 <_mm_cvtsi32_si128@plt>
mov    %rax,%rdi
mov    %rax,%rsi
xor    %edx,%edx
pop    %rbx
jmp    1030 <_mm_shuffle_ps@plt>

LLVM IR (-O0):
define void @convolute_C(i32* %0, float* %1, i32* %2, float* %3) {
%5 = alloca i32*
%6 = alloca float*
%7 = alloca i32*
%8 = alloca float*
%9 = alloca i64
%10 = alloca i64
store i32* %0, i32** %5
store float* %1, float** %6
store i32* %2, i32** %7
store float* %3, float** %8
%11 = load float*, float** %6
%12 = getelementptr inbounds float, float* %11, i64 0
%13 = call i64 @_mm_load_ss(float* %12)
store i64 %13, i64* %10
%14 = load i64, i64* %10
%15 = load i64, i64* %10
%16 = call i64 @_mm_shuffle_ps(i64 %14, i64 %15, i32 0)
store i64 %16, i64* %10
%17 = load i32*, i32** %5
%18 = getelementptr inbounds i32, i32* %17, i64 0
%19 = load i32, i32* %18
%20 = call i64 @_mm_cvtsi32_si128(i32 %19)
store i64 %20, i64* %9
%21 = load i64, i64* %9
%22 = load i64, i64* %9
%23 = call i64 @_mm_shuffle_ps(i64 %21, i64 %22, i32 0)
store i64 %23, i64* %9
ret void
}

LLVM IR (-O2):
define void @convolute_C(i32* nocapture %0, float* %1, i32* nocapture readnone %2, float* nocapture readnone %3) {
%5 = tail call i64 @_mm_load_ss(float* %1)
%6 = tail call i64 @_mm_shuffle_ps(i64 %5, i64 %5, i32 0)
%7 = load i32, i32* %0
%8 = tail call i64 @_mm_cvtsi32_si128(i32 %7)
%9 = tail call i64 @_mm_shuffle_ps(i64 %8, i64 %8, i32 0)
ret void
}