#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 */
int /*<<< orphan*/ assert(int);
double iirIItOutTime_double(double w[], double x, double a[], double b[],
                            int Na, int Nb) {
  int timer1 = 0;
  double *a_ptr, *b_ptr;
  double yout = 0;
  a_ptr = &a[1];
  b_ptr = &b[0];
  int Nw = Na > Nb ? Na : Nb;
  yout = (*b_ptr++ * x) + w[0];
  int j;
  timer1 += 105;
  for (j = 0; j < Nw - 1; j++) {
    w[j] = w[j + 1];
    if (j < Na - 1) {
      w[j] -= *a_ptr++ * yout;
      timer1 += 41;
    }
    if (j < Nb - 1) {
      w[j] += *b_ptr++ * x;
      timer1 += 38;
    }
    timer1 += 54;
  }
  timer1 += 7;
  assert((double)timer1 * 1 / 16000000 <= (double)1 / 100);
  return yout;
}


x86 assembly (clang, -O0):
<iirIItOutTime_double>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %ecx,-0x24(%rbp)
mov    %r8d,-0x28(%rbp)
movl   $0x0,-0x2c(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x18(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x38(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x28(%rbp),%eax
jle    116a <iirIItOutTime_double+0x5a>
mov    -0x24(%rbp),%eax
mov    %eax,-0x54(%rbp)
jmp    1170 <iirIItOutTime_double+0x60>
mov    -0x28(%rbp),%eax
mov    %eax,-0x54(%rbp)
mov    -0x54(%rbp),%eax
mov    %eax,-0x4c(%rbp)
mov    -0x40(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x40(%rbp)
movsd  (%rax),%xmm0
movsd  -0x10(%rbp),%xmm2
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x2c(%rbp),%eax
add    $0x69,%eax
mov    %eax,-0x2c(%rbp)
movl   $0x0,-0x50(%rbp)
mov    -0x50(%rbp),%eax
mov    -0x4c(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    12a9 <iirIItOutTime_double+0x199>
mov    -0x8(%rbp),%rax
mov    -0x50(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x50(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x50(%rbp),%eax
mov    -0x24(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    1246 <iirIItOutTime_double+0x136>
mov    -0x38(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x38(%rbp)
movsd  (%rax),%xmm0
movsd  -0x48(%rbp),%xmm2
mov    -0x8(%rbp),%rax
movslq -0x50(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
movq   %xmm0,%rdx
movabs $0x8000000000000000,%rsi
xor    %rsi,%rdx
movq   %rdx,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x2c(%rbp),%eax
add    $0x29,%eax
mov    %eax,-0x2c(%rbp)
mov    -0x50(%rbp),%eax
mov    -0x28(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    1292 <iirIItOutTime_double+0x182>
mov    -0x40(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x40(%rbp)
movsd  (%rax),%xmm0
movsd  -0x10(%rbp),%xmm2
mov    -0x8(%rbp),%rax
movslq -0x50(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x2c(%rbp),%eax
add    $0x26,%eax
mov    %eax,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
add    $0x36,%eax
mov    %eax,-0x2c(%rbp)
mov    -0x50(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x50(%rbp)
jmp    11b3 <iirIItOutTime_double+0xa3>
mov    -0x2c(%rbp),%eax
add    $0x7,%eax
mov    %eax,-0x2c(%rbp)
cvtsi2sdl -0x2c(%rbp),%xmm1
movsd  0xd51(%rip),%xmm0
mulsd  %xmm0,%xmm1
movsd  0xd3d(%rip),%xmm0
divsd  %xmm0,%xmm1
movsd  0xd29(%rip),%xmm0
ucomisd %xmm1,%xmm0
setae  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
movsd  -0x48(%rbp),%xmm0
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<iirIItOutTime_double>:
push   %rbx
sub    $0x10,%rsp
cmp    %r8d,%ecx
mov    %r8d,%r10d
cmovg  %ecx,%r10d
movsd  (%rdx),%xmm3
mulsd  %xmm0,%xmm3
addsd  (%rdi),%xmm3
cmp    $0x2,%r10d
movsd  %xmm3,0x8(%rsp)
jl     11b8 <iirIItOutTime_double+0xa8>
add    $0xffffffff,%r10d
add    $0x8,%rdx
add    $0x8,%rsi
add    $0xffffffff,%ecx
add    $0xffffffff,%r8d
movslq %ecx,%r9
movslq %r8d,%r8
mov    $0x69,%ecx
xor    %eax,%eax
jmp    116d <iirIItOutTime_double+0x5d>
nopl   (%rax)
mov    %ecx,%ebx
lea    0x36(%rbx),%ecx
mov    %r11,%rax
cmp    %r11,%r10
je     11c2 <iirIItOutTime_double+0xb2>
movsd  0x8(%rdi,%rax,8),%xmm1
movsd  %xmm1,(%rdi,%rax,8)
cmp    %r9,%rax
jge    1195 <iirIItOutTime_double+0x85>
movsd  (%rsi),%xmm2
mulsd  %xmm3,%xmm2
add    $0x8,%rsi
subsd  %xmm2,%xmm1
movsd  %xmm1,(%rdi,%rax,8)
add    $0x29,%ecx
lea    0x1(%rax),%r11
cmp    %r8,%rax
jge    1160 <iirIItOutTime_double+0x50>
movsd  (%rdx),%xmm2
mulsd  %xmm0,%xmm2
add    $0x8,%rdx
addsd  %xmm1,%xmm2
movsd  %xmm2,(%rdi,%rax,8)
add    $0x26,%ecx
jmp    1160 <iirIItOutTime_double+0x50>
movsd  0xe40(%rip),%xmm0
jmp    11cc <iirIItOutTime_double+0xbc>
add    $0x3d,%ebx
xorps  %xmm0,%xmm0
cvtsi2sd %ebx,%xmm0
divsd  0xe34(%rip),%xmm0
movsd  0xe34(%rip),%xmm1
xor    %edi,%edi
ucomisd %xmm0,%xmm1
setae  %dil
call   1030 <assert@plt>
movsd  0x8(%rsp),%xmm0
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
define double @iirIItOutTime_double(double* nocapture %0, double %1, double* nocapture %2, double* nocapture %3, i32 %4, i32 %5) {
%7 = icmp sgt i32 %4, %5
%8 = select i1 %7, i32 %4, i32 %5
%9 = load double, double* %3
%10 = load double, double* %0
%11 = tail call double @llvm.fmuladd.f64(double %9, double %1, double %10)
%12 = icmp sgt i32 %8, 1
br i1 %12, label %13, label %56
13: ; preds = %6
%14 = add nsw i32 %8, -1
%15 = getelementptr inbounds double, double* %3, i64 1
%16 = getelementptr inbounds double, double* %2, i64 1
%17 = add nsw i32 %4, -1
%18 = add nsw i32 %5, -1
%19 = sext i32 %17 to i64
%20 = sext i32 %18 to i64
%21 = zext i32 %14 to i64
br label %22
22: ; preds = %13, %48
%23 = phi i64 [ 0, %13 ], [ %27, %48 ]
%24 = phi i32 [ 105, %13 ], [ %51, %48 ]
%25 = phi double* [ %15, %13 ], [ %49, %48 ]
%26 = phi double* [ %16, %13 ], [ %40, %48 ]
%27 = add nuw nsw i64 %23, 1
%28 = getelementptr inbounds double, double* %0, i64 %27
%29 = load double, double* %28
%30 = getelementptr inbounds double, double* %0, i64 %23
store double %29, double* %30
%31 = icmp slt i64 %23, %19
br i1 %31, label %32, label %38
32: ; preds = %22
%33 = getelementptr inbounds double, double* %26, i64 1
%34 = load double, double* %26
%35 = fneg double %34
%36 = tail call double @llvm.fmuladd.f64(double %35, double %11, double %29)
store double %36, double* %30
%37 = add nsw i32 %24, 41
br label %38
38: ; preds = %32, %22
%39 = phi double [ %36, %32 ], [ %29, %22 ]
%40 = phi double* [ %33, %32 ], [ %26, %22 ]
%41 = phi i32 [ %37, %32 ], [ %24, %22 ]
%42 = icmp slt i64 %23, %20
br i1 %42, label %43, label %48
43: ; preds = %38
%44 = getelementptr inbounds double, double* %25, i64 1
%45 = load double, double* %25
%46 = tail call double @llvm.fmuladd.f64(double %45, double %1, double %39)
store double %46, double* %30
%47 = add nsw i32 %41, 38
br label %48
48: ; preds = %43, %38
%49 = phi double* [ %44, %43 ], [ %25, %38 ]
%50 = phi i32 [ %47, %43 ], [ %41, %38 ]
%51 = add nsw i32 %50, 54
%52 = icmp eq i64 %27, %21
br i1 %52, label %53, label %22
53: ; preds = %48
%54 = add i32 %50, 61
%55 = sitofp i32 %54 to double
br label %56
56: ; preds = %53, %6
%57 = phi double [ 1.120000e+02, %6 ], [ %55, %53 ]
%58 = fdiv double %57, 1.600000e+07
%59 = fcmp ole double %58, 1.000000e-02
%60 = zext i1 %59 to i32
%61 = tail call i32 @assert(i32 %60)
ret double %11
}