#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 HUGE_VALF;
scalar_t__ isfinite(float);
scalar_t__ isnan(float);
float smf2bandv(float *u, float x, float w_2, float a) {
  float t1, t2, t3, u1, u2;
  u1 = u[0];
  u2 = u[1];
  t1 = (x - (w_2 + a) * u1 - u2) / (1.0f + a * w_2 + w_2 * w_2);
  t2 = u1 + w_2 * t1;
  t3 = u2 + w_2 * t2;
  u1 = w_2 * t1 + t2;
  u2 = w_2 * t2 + t3;
  u[0] = (isfinite(u1) ? (u1)
          : isnan(u1)  ? 0.0f
          : u1 > 0.0f  ? HUGE_VALF
                       : -HUGE_VALF);
  u[1] = (isfinite(u2) ? (u2)
          : isnan(u2)  ? 0.0f
          : u2 > 0.0f  ? HUGE_VALF
                       : -HUGE_VALF);
  return t2;
}


x86 assembly (clang, -O0):
<smf2bandv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
movss  %xmm1,-0x10(%rbp)
movss  %xmm2,-0x14(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
movss  %xmm0,-0x24(%rbp)
mov    -0x8(%rbp),%rax
movss  0x4(%rax),%xmm0
movss  %xmm0,-0x28(%rbp)
movss  -0xc(%rbp),%xmm1
movss  -0x10(%rbp),%xmm0
addss  -0x14(%rbp),%xmm0
movss  -0x24(%rbp),%xmm2
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
subss  -0x28(%rbp),%xmm0
movss  -0x14(%rbp),%xmm2
movss  -0x10(%rbp),%xmm1
mulss  %xmm1,%xmm2
movss  0xe66(%rip),%xmm1
addss  %xmm1,%xmm2
movss  -0x10(%rbp),%xmm1
movss  -0x10(%rbp),%xmm3
mulss  %xmm3,%xmm1
addss  %xmm2,%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x24(%rbp),%xmm1
movss  -0x10(%rbp),%xmm0
movss  -0x18(%rbp),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  -0x28(%rbp),%xmm1
movss  -0x10(%rbp),%xmm0
movss  -0x1c(%rbp),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x20(%rbp)
movss  -0x10(%rbp),%xmm0
movss  -0x18(%rbp),%xmm2
movss  -0x1c(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x24(%rbp)
movss  -0x10(%rbp),%xmm0
movss  -0x1c(%rbp),%xmm2
movss  -0x20(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x28(%rbp)
movss  -0x24(%rbp),%xmm0
call   1030 <isfinite@plt>
cmp    $0x0,%rax
je     124c <smf2bandv+0x12c>
movss  -0x24(%rbp),%xmm0
movss  %xmm0,-0x2c(%rbp)
jmp    12c4 <smf2bandv+0x1a4>
movss  -0x24(%rbp),%xmm0
call   1040 <isnan@plt>
cmp    $0x0,%rax
je     126d <smf2bandv+0x14d>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x30(%rbp)
jmp    12ba <smf2bandv+0x19a>
movss  -0x24(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jbe    1293 <smf2bandv+0x173>
mov    0x2d6b(%rip),%rax
movss  (%rax),%xmm0
movss  %xmm0,-0x34(%rbp)
jmp    12b0 <smf2bandv+0x190>
mov    0x2d56(%rip),%rax
movss  (%rax),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
movss  %xmm0,-0x34(%rbp)
movss  -0x34(%rbp),%xmm0
movss  %xmm0,-0x30(%rbp)
movss  -0x30(%rbp),%xmm0
movss  %xmm0,-0x2c(%rbp)
movss  -0x2c(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,(%rax)
movss  -0x28(%rbp),%xmm0
call   1030 <isfinite@plt>
cmp    $0x0,%rax
je     12f4 <smf2bandv+0x1d4>
movss  -0x28(%rbp),%xmm0
movss  %xmm0,-0x38(%rbp)
jmp    136c <smf2bandv+0x24c>
movss  -0x28(%rbp),%xmm0
call   1040 <isnan@plt>
cmp    $0x0,%rax
je     1315 <smf2bandv+0x1f5>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x3c(%rbp)
jmp    1362 <smf2bandv+0x242>
movss  -0x28(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jbe    133b <smf2bandv+0x21b>
mov    0x2cc3(%rip),%rax
movss  (%rax),%xmm0
movss  %xmm0,-0x40(%rbp)
jmp    1358 <smf2bandv+0x238>
mov    0x2cae(%rip),%rax
movss  (%rax),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
movss  %xmm0,-0x40(%rbp)
movss  -0x40(%rbp),%xmm0
movss  %xmm0,-0x3c(%rbp)
movss  -0x3c(%rbp),%xmm0
movss  %xmm0,-0x38(%rbp)
movss  -0x38(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x4(%rax)
movss  -0x1c(%rbp),%xmm0
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<smf2bandv>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
movss  (%rdi),%xmm3
movss  0x4(%rdi),%xmm4
movaps %xmm1,%xmm5
addss  %xmm2,%xmm5
mulss  %xmm3,%xmm5
subss  %xmm5,%xmm0
subss  %xmm4,%xmm0
mulss  %xmm1,%xmm2
addss  0xeb0(%rip),%xmm2
movaps %xmm1,%xmm5
mulss  %xmm1,%xmm5
addss  %xmm2,%xmm5
divss  %xmm5,%xmm0
mulss  %xmm1,%xmm0
addss  %xmm0,%xmm3
mulss  %xmm3,%xmm1
addss  %xmm1,%xmm4
movss  %xmm3,0xc(%rsp)
addss  %xmm3,%xmm0
addss  %xmm1,%xmm4
movss  %xmm4,0x4(%rsp)
movss  %xmm0,0x8(%rsp)
call   1030 <isfinite@plt>
test   %rax,%rax
je     119b <smf2bandv+0x7b>
movss  0x8(%rsp),%xmm0
jmp    11d6 <smf2bandv+0xb6>
movss  0x8(%rsp),%xmm0
call   1040 <isnan@plt>
xorps  %xmm0,%xmm0
test   %rax,%rax
jne    11d6 <smf2bandv+0xb6>
mov    0x2e3b(%rip),%rax
movss  (%rax),%xmm1
movaps 0xe50(%rip),%xmm2
xorps  %xmm1,%xmm2
xorps  %xmm0,%xmm0
cmpltss 0x8(%rsp),%xmm0
andps  %xmm0,%xmm1
andnps %xmm2,%xmm0
orps   %xmm1,%xmm0
movss  %xmm0,(%rbx)
movss  0x4(%rsp),%xmm0
call   1030 <isfinite@plt>
test   %rax,%rax
je     11f2 <smf2bandv+0xd2>
movss  0x4(%rsp),%xmm0
jmp    122d <smf2bandv+0x10d>
movss  0x4(%rsp),%xmm0
call   1040 <isnan@plt>
xorps  %xmm0,%xmm0
test   %rax,%rax
jne    122d <smf2bandv+0x10d>
mov    0x2de4(%rip),%rax
movss  (%rax),%xmm1
movaps 0xdf9(%rip),%xmm2
xorps  %xmm1,%xmm2
xorps  %xmm0,%xmm0
cmpltss 0x4(%rsp),%xmm0
andps  %xmm0,%xmm1
andnps %xmm2,%xmm0
orps   %xmm1,%xmm0
movss  %xmm0,0x4(%rbx)
movss  0xc(%rsp),%xmm0
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@HUGE_VALF = global float 0.000000e+00
define float @smf2bandv(float* %0, float %1, float %2, float %3) {
%5 = alloca float*
%6 = alloca float
%7 = alloca float
%8 = alloca float
%9 = alloca float
%10 = alloca float
%11 = alloca float
%12 = alloca float
%13 = alloca float
store float* %0, float** %5
store float %1, float* %6
store float %2, float* %7
store float %3, float* %8
%14 = load float*, float** %5
%15 = getelementptr inbounds float, float* %14, i64 0
%16 = load float, float* %15
store float %16, float* %12
%17 = load float*, float** %5
%18 = getelementptr inbounds float, float* %17, i64 1
%19 = load float, float* %18
store float %19, float* %13
%20 = load float, float* %6
%21 = load float, float* %7
%22 = load float, float* %8
%23 = fadd float %21, %22
%24 = load float, float* %12
%25 = fneg float %23
%26 = call float @llvm.fmuladd.f32(float %25, float %24, float %20)
%27 = load float, float* %13
%28 = fsub float %26, %27
%29 = load float, float* %8
%30 = load float, float* %7
%31 = call float @llvm.fmuladd.f32(float %29, float %30, float 1.000000e+00)
%32 = load float, float* %7
%33 = load float, float* %7
%34 = call float @llvm.fmuladd.f32(float %32, float %33, float %31)
%35 = fdiv float %28, %34
store float %35, float* %9
%36 = load float, float* %12
%37 = load float, float* %7
%38 = load float, float* %9
%39 = call float @llvm.fmuladd.f32(float %37, float %38, float %36)
store float %39, float* %10
%40 = load float, float* %13
%41 = load float, float* %7
%42 = load float, float* %10
%43 = call float @llvm.fmuladd.f32(float %41, float %42, float %40)
store float %43, float* %11
%44 = load float, float* %7
%45 = load float, float* %9
%46 = load float, float* %10
%47 = call float @llvm.fmuladd.f32(float %44, float %45, float %46)
store float %47, float* %12
%48 = load float, float* %7
%49 = load float, float* %10
%50 = load float, float* %11
%51 = call float @llvm.fmuladd.f32(float %48, float %49, float %50)
store float %51, float* %13
%52 = load float, float* %12
%53 = call i64 @isfinite(float %52)
%54 = icmp ne i64 %53, 0
br i1 %54, label %55, label %57
55: ; preds = %4
%56 = load float, float* %12
br label %74
57: ; preds = %4
%58 = load float, float* %12
%59 = call i64 @isnan(float %58)
%60 = icmp ne i64 %59, 0
br i1 %60, label %61, label %62
61: ; preds = %57
br label %72
62: ; preds = %57
%63 = load float, float* %12
%64 = fcmp ogt float %63, 0.000000e+00
br i1 %64, label %65, label %67
65: ; preds = %62
%66 = load float, float* @HUGE_VALF
br label %70
67: ; preds = %62
%68 = load float, float* @HUGE_VALF
%69 = fneg float %68
br label %70
70: ; preds = %67, %65
%71 = phi float [ %66, %65 ], [ %69, %67 ]
br label %72
72: ; preds = %70, %61
%73 = phi float [ 0.000000e+00, %61 ], [ %71, %70 ]
br label %74
74: ; preds = %72, %55
%75 = phi float [ %56, %55 ], [ %73, %72 ]
%76 = load float*, float** %5
%77 = getelementptr inbounds float, float* %76, i64 0
store float %75, float* %77
%78 = load float, float* %13
%79 = call i64 @isfinite(float %78)
%80 = icmp ne i64 %79, 0
br i1 %80, label %81, label %83
81: ; preds = %74
%82 = load float, float* %13
br label %100
83: ; preds = %74
%84 = load float, float* %13
%85 = call i64 @isnan(float %84)
%86 = icmp ne i64 %85, 0
br i1 %86, label %87, label %88
87: ; preds = %83
br label %98
88: ; preds = %83
%89 = load float, float* %13
%90 = fcmp ogt float %89, 0.000000e+00
br i1 %90, label %91, label %93
91: ; preds = %88
%92 = load float, float* @HUGE_VALF
br label %96
93: ; preds = %88
%94 = load float, float* @HUGE_VALF
%95 = fneg float %94
br label %96
96: ; preds = %93, %91
%97 = phi float [ %92, %91 ], [ %95, %93 ]
br label %98
98: ; preds = %96, %87
%99 = phi float [ 0.000000e+00, %87 ], [ %97, %96 ]
br label %100
100: ; preds = %98, %81
%101 = phi float [ %82, %81 ], [ %99, %98 ]
%102 = load float*, float** %5
%103 = getelementptr inbounds float, float* %102, i64 1
store float %101, float* %103
%104 = load float, float* %10
ret float %104
}

LLVM IR (-O2):
@HUGE_VALF = global float 0.000000e+00
define float @smf2bandv(float* nocapture %0, float %1, float %2, float %3) {
%5 = load float, float* %0
%6 = getelementptr inbounds float, float* %0, i64 1
%7 = load float, float* %6
%8 = fadd float %2, %3
%9 = fneg float %8
%10 = tail call float @llvm.fmuladd.f32(float %9, float %5, float %1)
%11 = fsub float %10, %7
%12 = tail call float @llvm.fmuladd.f32(float %3, float %2, float 1.000000e+00)
%13 = tail call float @llvm.fmuladd.f32(float %2, float %2, float %12)
%14 = fdiv float %11, %13
%15 = tail call float @llvm.fmuladd.f32(float %2, float %14, float %5)
%16 = tail call float @llvm.fmuladd.f32(float %2, float %15, float %7)
%17 = tail call float @llvm.fmuladd.f32(float %2, float %14, float %15)
%18 = tail call float @llvm.fmuladd.f32(float %2, float %15, float %16)
%19 = tail call i64 @isfinite(float %17)
%20 = icmp eq i64 %19, 0
br i1 %20, label %21, label %29
21: ; preds = %4
%22 = tail call i64 @isnan(float %17)
%23 = icmp eq i64 %22, 0
br i1 %23, label %24, label %29
24: ; preds = %21
%25 = fcmp ogt float %17, 0.000000e+00
%26 = load float, float* @HUGE_VALF
%27 = fneg float %26
%28 = select i1 %25, float %26, float %27
br label %29
29: ; preds = %4, %24, %21
%30 = phi float [ %28, %24 ], [ 0.000000e+00, %21 ], [ %17, %4 ]
store float %30, float* %0
%31 = tail call i64 @isfinite(float %18)
%32 = icmp eq i64 %31, 0
br i1 %32, label %33, label %41
33: ; preds = %29
%34 = tail call i64 @isnan(float %18)
%35 = icmp eq i64 %34, 0
br i1 %35, label %36, label %41
36: ; preds = %33
%37 = fcmp ogt float %18, 0.000000e+00
%38 = load float, float* @HUGE_VALF
%39 = fneg float %38
%40 = select i1 %37, float %38, float %39
br label %41
41: ; preds = %29, %36, %33
%42 = phi float [ %40, %36 ], [ 0.000000e+00, %33 ], [ %18, %29 ]
store float %42, float* %6
ret float %15
}