#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 smf1lowv(float *, float, int /*<<< orphan*/);
int /*<<< orphan*/ smff2w_2(float);
void smf1low(float *u, int n, float *y, float *x, float *f) {
  int i;
  for (i = 0; i < n; i++) {
    y[i] = smf1lowv(u, x[i], smff2w_2(f[i]));
  }
}


x86 assembly (clang, -O0):
<smf1low>:
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)
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    11a5 <smf1low+0x85>
mov    -0x8(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x20(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
movss  %xmm0,-0x30(%rbp)
mov    -0x28(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
call   1040 <smff2w_2@plt>
mov    -0x38(%rbp),%rdi
movss  -0x30(%rbp),%xmm0
mov    %eax,%esi
call   1030 <smf1lowv@plt>
mov    -0x18(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    1142 <smf1low+0x22>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<smf1low>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
jle    1176 <smf1low+0x56>
mov    %r8,%r14
mov    %rcx,%r15
mov    %rdx,%r12
mov    %rdi,%r13
mov    %esi,%ebx
xor    %ebp,%ebp
nop
movss  (%r15,%rbp,4),%xmm0
movss  %xmm0,0x4(%rsp)
movss  (%r14,%rbp,4),%xmm0
call   1040 <smff2w_2@plt>
mov    %r13,%rdi
movss  0x4(%rsp),%xmm0
mov    %eax,%esi
call   1030 <smf1lowv@plt>
movss  %xmm0,(%r12,%rbp,4)
add    $0x1,%rbp
cmp    %rbp,%rbx
jne    1140 <smf1low+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @smf1low(float* %0, i32 %1, float* %2, float* %3, float* %4) {
%6 = alloca float*
%7 = alloca i32
%8 = alloca float*
%9 = alloca float*
%10 = alloca float*
%11 = alloca i32
store float* %0, float** %6
store i32 %1, i32* %7
store float* %2, float** %8
store float* %3, float** %9
store float* %4, float** %10
store i32 0, i32* %11
br label %12
12: ; preds = %34, %5
%13 = load i32, i32* %11
%14 = load i32, i32* %7
%15 = icmp slt i32 %13, %14
br i1 %15, label %16, label %37
16: ; preds = %12
%17 = load float*, float** %6
%18 = load float*, float** %9
%19 = load i32, i32* %11
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds float, float* %18, i64 %20
%22 = load float, float* %21
%23 = load float*, float** %10
%24 = load i32, i32* %11
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds float, float* %23, i64 %25
%27 = load float, float* %26
%28 = call i32 @smff2w_2(float %27)
%29 = call float @smf1lowv(float* %17, float %22, i32 %28)
%30 = load float*, float** %8
%31 = load i32, i32* %11
%32 = sext i32 %31 to i64
%33 = getelementptr inbounds float, float* %30, i64 %32
store float %29, float* %33
br label %34
34: ; preds = %16
%35 = load i32, i32* %11
%36 = add nsw i32 %35, 1
store i32 %36, i32* %11
br label %12
37: ; preds = %12
ret void
}

LLVM IR (-O2):
define void @smf1low(float* %0, i32 %1, float* nocapture writeonly %2, float* nocapture %3, float* nocapture %4) {
%6 = icmp sgt i32 %1, 0
br i1 %6, label %7, label %20
7: ; preds = %5
%8 = zext i32 %1 to i64
br label %9
9: ; preds = %7, %9
%10 = phi i64 [ 0, %7 ], [ %18, %9 ]
%11 = getelementptr inbounds float, float* %3, i64 %10
%12 = load float, float* %11
%13 = getelementptr inbounds float, float* %4, i64 %10
%14 = load float, float* %13
%15 = tail call i32 @smff2w_2(float %14)
%16 = tail call float @smf1lowv(float* %0, float %12, i32 %15)
%17 = getelementptr inbounds float, float* %2, i64 %10
store float %16, float* %17
%18 = add nuw nsw i64 %10, 1
%19 = icmp eq i64 %18, %8
br i1 %19, label %20, label %9
20: ; preds = %9, %5
ret void
}