#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 smf2bandv(float *, float, float, float);
float smff2w_2(float);
void smf6band(float *u, int n, float *y, float *x, float *f, float *r) {
  int i;
  float t, w_2;
  for (i = 0; i < n; i++) {
    w_2 = smff2w_2(f[i]);
    t = smf2bandv(u, x[i], w_2, 1.931851652578136f);
    t = smf2bandv(u + 2, t, w_2, 1.414213562373095f);
    y[i] = smf2bandv(u + 4, t, w_2, 0.5176380902050414f * (1 - r[i]));
  }
}


x86 assembly (clang, -O0):
<smf6band>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1208 <smf6band+0xe8>
mov    -0x28(%rbp),%rax
movslq -0x34(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
call   1040 <smff2w_2@plt>
movss  %xmm0,-0x3c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x20(%rbp),%rax
movslq -0x34(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
movss  -0x3c(%rbp),%xmm1
movss  0xe85(%rip),%xmm2
call   1030 <smf2bandv@plt>
movss  %xmm0,-0x38(%rbp)
mov    -0x8(%rbp),%rdi
add    $0x8,%rdi
movss  -0x38(%rbp),%xmm0
movss  -0x3c(%rbp),%xmm1
movss  0xe5d(%rip),%xmm2
call   1030 <smf2bandv@plt>
movss  %xmm0,-0x38(%rbp)
mov    -0x8(%rbp),%rdi
add    $0x10,%rdi
movss  -0x38(%rbp),%xmm0
movss  -0x3c(%rbp),%xmm1
mov    -0x30(%rbp),%rax
movslq -0x34(%rbp),%rcx
movss  0xe2d(%rip),%xmm3
subss  (%rax,%rcx,4),%xmm3
movss  0xe1c(%rip),%xmm2
mulss  %xmm3,%xmm2
call   1030 <smf2bandv@plt>
mov    -0x18(%rbp),%rax
movslq -0x34(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1146 <smf6band+0x26>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<smf6band>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
mov    %r9,0x20(%rsp)
mov    %rcx,0x18(%rsp)
test   %esi,%esi
jle    11e5 <smf6band+0xc5>
mov    %r8,%r13
mov    %rdx,%rbp
mov    %rdi,%rbx
lea    0x8(%rdi),%rax
mov    %rax,0x10(%rsp)
lea    0x10(%rdi),%r14
mov    %esi,%r15d
xor    %r12d,%r12d
nopl   0x0(%rax)
movss  0x0(%r13,%r12,4),%xmm0
call   1040 <smff2w_2@plt>
movaps %xmm0,%xmm1
movss  %xmm0,0xc(%rsp)
mov    0x18(%rsp),%rax
movss  (%rax,%r12,4),%xmm0
mov    %rbx,%rdi
movss  0xe75(%rip),%xmm2
call   1030 <smf2bandv@plt>
mov    0x10(%rsp),%rdi
movss  0xc(%rsp),%xmm1
movss  0xe61(%rip),%xmm2
call   1030 <smf2bandv@plt>
movss  0xe58(%rip),%xmm2
mov    0x20(%rsp),%rax
subss  (%rax,%r12,4),%xmm2
mulss  0xe49(%rip),%xmm2
mov    %r14,%rdi
movss  0xc(%rsp),%xmm1
call   1030 <smf2bandv@plt>
movss  %xmm0,0x0(%rbp,%r12,4)
add    $0x1,%r12
cmp    %r12,%r15
jne    1160 <smf6band+0x40>
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @smf6band(float* %0, i32 %1, float* %2, float* %3, float* %4, float* %5) {
%7 = alloca float*
%8 = alloca i32
%9 = alloca float*
%10 = alloca float*
%11 = alloca float*
%12 = alloca float*
%13 = alloca i32
%14 = alloca float
%15 = alloca float
store float* %0, float** %7
store i32 %1, i32* %8
store float* %2, float** %9
store float* %3, float** %10
store float* %4, float** %11
store float* %5, float** %12
store i32 0, i32* %13
br label %16
16: ; preds = %56, %6
%17 = load i32, i32* %13
%18 = load i32, i32* %8
%19 = icmp slt i32 %17, %18
br i1 %19, label %20, label %59
20: ; preds = %16
%21 = load float*, float** %11
%22 = load i32, i32* %13
%23 = sext i32 %22 to i64
%24 = getelementptr inbounds float, float* %21, i64 %23
%25 = load float, float* %24
%26 = call float @smff2w_2(float %25)
store float %26, float* %15
%27 = load float*, float** %7
%28 = load float*, float** %10
%29 = load i32, i32* %13
%30 = sext i32 %29 to i64
%31 = getelementptr inbounds float, float* %28, i64 %30
%32 = load float, float* %31
%33 = load float, float* %15
%34 = call float @smf2bandv(float* %27, float %32, float %33, float 0x3FFEE8DD40000000)
store float %34, float* %14
%35 = load float*, float** %7
%36 = getelementptr inbounds float, float* %35, i64 2
%37 = load float, float* %14
%38 = load float, float* %15
%39 = call float @smf2bandv(float* %36, float %37, float %38, float 0x3FF6A09E60000000)
store float %39, float* %14
%40 = load float*, float** %7
%41 = getelementptr inbounds float, float* %40, i64 4
%42 = load float, float* %14
%43 = load float, float* %15
%44 = load float*, float** %12
%45 = load i32, i32* %13
%46 = sext i32 %45 to i64
%47 = getelementptr inbounds float, float* %44, i64 %46
%48 = load float, float* %47
%49 = fsub float 1.000000e+00, %48
%50 = fmul float 0x3FE0907DC0000000, %49
%51 = call float @smf2bandv(float* %41, float %42, float %43, float %50)
%52 = load float*, float** %9
%53 = load i32, i32* %13
%54 = sext i32 %53 to i64
%55 = getelementptr inbounds float, float* %52, i64 %54
store float %51, float* %55
br label %56
56: ; preds = %20
%57 = load i32, i32* %13
%58 = add nsw i32 %57, 1
store i32 %58, i32* %13
br label %16
59: ; preds = %16
ret void
}

LLVM IR (-O2):
define void @smf6band(float* %0, i32 %1, float* nocapture writeonly %2, float* nocapture %3, float* nocapture %4, float* nocapture %5) {
%7 = icmp sgt i32 %1, 0
br i1 %7, label %8, label %29
8: ; preds = %6
%9 = getelementptr inbounds float, float* %0, i64 2
%10 = getelementptr inbounds float, float* %0, i64 4
%11 = zext i32 %1 to i64
br label %12
12: ; preds = %8, %12
%13 = phi i64 [ 0, %8 ], [ %27, %12 ]
%14 = getelementptr inbounds float, float* %4, i64 %13
%15 = load float, float* %14
%16 = tail call float @smff2w_2(float %15)
%17 = getelementptr inbounds float, float* %3, i64 %13
%18 = load float, float* %17
%19 = tail call float @smf2bandv(float* %0, float %18, float %16, float 0x3FFEE8DD40000000)
%20 = tail call float @smf2bandv(float* %9, float %19, float %16, float 0x3FF6A09E60000000)
%21 = getelementptr inbounds float, float* %5, i64 %13
%22 = load float, float* %21
%23 = fsub float 1.000000e+00, %22
%24 = fmul float %23, 0x3FE0907DC0000000
%25 = tail call float @smf2bandv(float* %10, float %20, float %16, float %24)
%26 = getelementptr inbounds float, float* %2, i64 %13
store float %25, float* %26
%27 = add nuw nsw i64 %13, 1
%28 = icmp eq i64 %27, %11
br i1 %28, label %29, label %12
29: ; preds = %12, %6
ret void
}