#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 smf8band(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.961570560806461f);
    t = smf2bandv(u + 2, t, w_2, 1.662939224605090f);
    t = smf2bandv(u + 4, t, w_2, 1.111140466039204f);
    y[i] = smf2bandv(u + 6, t, w_2, 0.3901806440322565f * (1 - r[i]));
  }
}


x86 assembly (clang, -O0):
<smf8band>:
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    122c <smf8band+0x10c>
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  0xe89(%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  0xe61(%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
movss  0xe39(%rip),%xmm2
call   1030 <smf2bandv@plt>
movss  %xmm0,-0x38(%rbp)
mov    -0x8(%rbp),%rdi
add    $0x18,%rdi
movss  -0x38(%rbp),%xmm0
movss  -0x3c(%rbp),%xmm1
mov    -0x30(%rbp),%rax
movslq -0x34(%rbp),%rcx
movss  0xe09(%rip),%xmm3
subss  (%rax,%rcx,4),%xmm3
movss  0xdf8(%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 <smf8band+0x26>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<smf8band>:
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    120c <smf8band+0xec>
mov    %r8,%rbp
mov    %rdx,%r14
mov    %rdi,%rbx
lea    0x8(%rdi),%rax
mov    %rax,0x10(%rsp)
lea    0x10(%rdi),%rax
mov    %rax,0x8(%rsp)
lea    0x18(%rdi),%r15
mov    %esi,%r12d
xor    %r13d,%r13d
cs nopw 0x0(%rax,%rax,1)
nop
movss  0x0(%rbp,%r13,4),%xmm0
call   1040 <smff2w_2@plt>
movaps %xmm0,%xmm1
movss  %xmm0,0x4(%rsp)
mov    0x18(%rsp),%rax
movss  (%rax,%r13,4),%xmm0
mov    %rbx,%rdi
movss  0xe65(%rip),%xmm2
call   1030 <smf2bandv@plt>
mov    0x10(%rsp),%rdi
movss  0x4(%rsp),%xmm1
movss  0xe51(%rip),%xmm2
call   1030 <smf2bandv@plt>
mov    0x8(%rsp),%rdi
movss  0x4(%rsp),%xmm1
movss  0xe3d(%rip),%xmm2
call   1030 <smf2bandv@plt>
movss  0xe34(%rip),%xmm2
mov    0x20(%rsp),%rax
subss  (%rax,%r13,4),%xmm2
mulss  0xe25(%rip),%xmm2
mov    %r15,%rdi
movss  0x4(%rsp),%xmm1
call   1030 <smf2bandv@plt>
movss  %xmm0,(%r14,%r13,4)
add    $0x1,%r13
cmp    %r13,%r12
jne    1170 <smf8band+0x50>
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @smf8band(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 = %61, %6
%17 = load i32, i32* %13
%18 = load i32, i32* %8
%19 = icmp slt i32 %17, %18
br i1 %19, label %20, label %64
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 0x3FFF6297C0000000)
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 0x3FFA9B6620000000)
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 = call float @smf2bandv(float* %41, float %42, float %43, float 0x3FF1C73B40000000)
store float %44, float* %14
%45 = load float*, float** %7
%46 = getelementptr inbounds float, float* %45, i64 6
%47 = load float, float* %14
%48 = load float, float* %15
%49 = load float*, float** %12
%50 = load i32, i32* %13
%51 = sext i32 %50 to i64
%52 = getelementptr inbounds float, float* %49, i64 %51
%53 = load float, float* %52
%54 = fsub float 1.000000e+00, %53
%55 = fmul float 0x3FD8F8B840000000, %54
%56 = call float @smf2bandv(float* %46, float %47, float %48, float %55)
%57 = load float*, float** %9
%58 = load i32, i32* %13
%59 = sext i32 %58 to i64
%60 = getelementptr inbounds float, float* %57, i64 %59
store float %56, float* %60
br label %61
61: ; preds = %20
%62 = load i32, i32* %13
%63 = add nsw i32 %62, 1
store i32 %63, i32* %13
br label %16
64: ; preds = %16
ret void
}

LLVM IR (-O2):
define void @smf8band(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 %31
8: ; preds = %6
%9 = getelementptr inbounds float, float* %0, i64 2
%10 = getelementptr inbounds float, float* %0, i64 4
%11 = getelementptr inbounds float, float* %0, i64 6
%12 = zext i32 %1 to i64
br label %13
13: ; preds = %8, %13
%14 = phi i64 [ 0, %8 ], [ %29, %13 ]
%15 = getelementptr inbounds float, float* %4, i64 %14
%16 = load float, float* %15
%17 = tail call float @smff2w_2(float %16)
%18 = getelementptr inbounds float, float* %3, i64 %14
%19 = load float, float* %18
%20 = tail call float @smf2bandv(float* %0, float %19, float %17, float 0x3FFF6297C0000000)
%21 = tail call float @smf2bandv(float* %9, float %20, float %17, float 0x3FFA9B6620000000)
%22 = tail call float @smf2bandv(float* %10, float %21, float %17, float 0x3FF1C73B40000000)
%23 = getelementptr inbounds float, float* %5, i64 %14
%24 = load float, float* %23
%25 = fsub float 1.000000e+00, %24
%26 = fmul float %25, 0x3FD8F8B840000000
%27 = tail call float @smf2bandv(float* %11, float %22, float %17, float %26)
%28 = getelementptr inbounds float, float* %2, i64 %14
store float %27, float* %28
%29 = add nuw nsw i64 %14, 1
%30 = icmp eq i64 %29, %12
br i1 %30, label %31, label %13
31: ; preds = %13, %6
ret void
}