#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 */
float NasalPhonemeBuzz(float);
void PhonemeW(float t, float *frame) {
  const float buzz = NasalPhonemeBuzz(t);
  int c;
  for (c = 0; c < 24; ++c) {
    frame[c] = (c % 2 == 0 && c >= 8) ? buzz : 0.0f;
  }
}


x86 assembly (clang, -O0):
<PhonemeW>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x4(%rbp)
mov    %rdi,-0x10(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <NasalPhonemeBuzz@plt>
movss  %xmm0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
cmpl   $0x18,-0x18(%rbp)
jge    119b <PhonemeW+0x8b>
mov    -0x18(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    116e <PhonemeW+0x5e>
cmpl   $0x8,-0x18(%rbp)
jl     116e <PhonemeW+0x5e>
movss  -0x14(%rbp),%xmm0
movss  %xmm0,-0x1c(%rbp)
jmp    117b <PhonemeW+0x6b>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x1c(%rbp)
jmp    117b <PhonemeW+0x6b>
movss  -0x1c(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1137 <PhonemeW+0x27>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PhonemeW>:
push   %rbx
mov    %rdi,%rbx
call   1030 <NasalPhonemeBuzz@plt>
xor    %eax,%eax
jmp    1130 <PhonemeW+0x20>
nopl   (%rax)
movss  %xmm1,0x8(%rbx,%rax,4)
add    $0x3,%rax
cmp    $0x18,%rax
je     1173 <PhonemeW+0x63>
movaps %xmm0,%xmm1
test   $0x1,%al
je     113a <PhonemeW+0x2a>
xorps  %xmm1,%xmm1
movaps %xmm1,%xmm2
cmp    $0x8,%rax
jae    1146 <PhonemeW+0x36>
xorps  %xmm2,%xmm2
movss  %xmm2,(%rbx,%rax,4)
lea    0x1(%rax),%ecx
movaps %xmm0,%xmm2
test   $0x1,%cl
je     1159 <PhonemeW+0x49>
xorps  %xmm2,%xmm2
cmp    $0x7,%rax
jae    1162 <PhonemeW+0x52>
xorps  %xmm2,%xmm2
movss  %xmm2,0x4(%rbx,%rax,4)
cmp    $0x6,%rax
jae    1120 <PhonemeW+0x10>
xorps  %xmm1,%xmm1
jmp    1120 <PhonemeW+0x10>
pop    %rbx
ret

LLVM IR (-O0):
define void @PhonemeW(float %0, float* %1) {
%3 = alloca float
%4 = alloca float*
%5 = alloca float
%6 = alloca i32
store float %0, float* %3
store float* %1, float** %4
%7 = load float, float* %3
%8 = call float @NasalPhonemeBuzz(float %7)
store float %8, float* %5
store i32 0, i32* %6
br label %9
9: ; preds = %28, %2
%10 = load i32, i32* %6
%11 = icmp slt i32 %10, 24
br i1 %11, label %12, label %31
12: ; preds = %9
%13 = load i32, i32* %6
%14 = srem i32 %13, 2
%15 = icmp eq i32 %14, 0
br i1 %15, label %16, label %21
16: ; preds = %12
%17 = load i32, i32* %6
%18 = icmp sge i32 %17, 8
br i1 %18, label %19, label %21
19: ; preds = %16
%20 = load float, float* %5
br label %22
21: ; preds = %16, %12
br label %22
22: ; preds = %21, %19
%23 = phi float [ %20, %19 ], [ 0.000000e+00, %21 ]
%24 = load float*, float** %4
%25 = load i32, i32* %6
%26 = sext i32 %25 to i64
%27 = getelementptr inbounds float, float* %24, i64 %26
store float %23, float* %27
br label %28
28: ; preds = %22
%29 = load i32, i32* %6
%30 = add nsw i32 %29, 1
store i32 %30, i32* %6
br label %9
31: ; preds = %9
ret void
}

LLVM IR (-O2):
define void @PhonemeW(float %0, float* nocapture writeonly %1) {
%3 = tail call float @NasalPhonemeBuzz(float %0)
br label %4
4: ; preds = %4, %2
%5 = phi i64 [ 0, %2 ], [ %26, %4 ]
%6 = and i64 %5, 1
%7 = icmp eq i64 %6, 0
%8 = icmp ugt i64 %5, 7
%9 = and i1 %8, %7
%10 = select i1 %9, float %3, float 0.000000e+00
%11 = getelementptr inbounds float, float* %1, i64 %5
store float %10, float* %11
%12 = add nuw nsw i64 %5, 1
%13 = and i64 %12, 1
%14 = icmp eq i64 %13, 0
%15 = icmp ugt i64 %5, 6
%16 = and i1 %15, %14
%17 = select i1 %16, float %3, float 0.000000e+00
%18 = getelementptr inbounds float, float* %1, i64 %12
store float %17, float* %18
%19 = add nuw nsw i64 %5, 2
%20 = and i64 %5, 1
%21 = icmp eq i64 %20, 0
%22 = icmp ugt i64 %5, 5
%23 = and i1 %22, %21
%24 = select i1 %23, float %3, float 0.000000e+00
%25 = getelementptr inbounds float, float* %1, i64 %19
store float %24, float* %25
%26 = add nuw nsw i64 %5, 3
%27 = icmp eq i64 %26, 24
br i1 %27, label %28, label %4
28: ; preds = %4
ret void
}