#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*/ __DSVERIFIER_assert(int);
double internal_abs(double);
double internal_pow(int, int);
int check_stability_closedloop(double a[], int n, double plant_num[],
                               int p_num_size, double plant_den[],
                               int p_den_size) {
  int columns = n;
  double m[2 * n - 1][n];
  int i, j;
  int first_is_positive = 0;
  double *p_num = plant_num;
  double *p_den = plant_den;
  double sum = 0;
  for (i = 0; i < n; i++) {
    sum += a[i];
  }
  __DSVERIFIER_assert(sum > 0);
  sum = 0;
  for (i = 0; i < n; i++) {
    sum += a[i] * internal_pow(-1, n - 1 - i);
  }
  sum = sum * internal_pow(-1, n - 1);
  __DSVERIFIER_assert(sum > 0);
  __DSVERIFIER_assert(internal_abs(a[n - 1]) < a[0]);
  for (i = 0; i < 2 * n - 1; i++) {
    for (j = 0; j < columns; j++) {
      m[i][j] = 0;
      if (i == 0) {
        m[i][j] = a[j];
        continue;
      }
      if (i % 2 != 0) {
        int x;
        for (x = 0; x < columns; x++) {
          m[i][x] = m[i - 1][columns - x - 1];
        }
        columns = columns - 1;
        j = columns;
      } else {
        m[i][j] = m[i - 2][j] - (m[i - 2][columns] / m[i - 2][0]) * m[i - 1][j];
        __DSVERIFIER_assert((m[0][0] >= 0) && (m[i][0] >= 0));
      }
    }
  }
  return 1;
}


x86 assembly (clang, -O0):
<check_stability_closedloop>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9d,-0x2c(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x30(%rbp)
mov    -0xc(%rbp),%eax
mov    %rax,-0x88(%rbp)
mov    %eax,%edx
mov    %edx,%ecx
lea    -0x1(%rcx,%rcx,1),%ecx
mov    %rsp,%rdx
mov    %rdx,-0x38(%rbp)
mov    %rcx,%rdx
imul   %rax,%rdx
lea    0xf(,%rdx,8),%rsi
and    $0xfffffffffffffff0,%rsi
mov    %rsp,%rdx
sub    %rsi,%rdx
mov    %rdx,-0x80(%rbp)
mov    %rdx,%rsp
mov    %rcx,-0x40(%rbp)
mov    %rax,-0x48(%rbp)
movl   $0x0,-0x54(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x60(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,-0x68(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x70(%rbp)
movl   $0x0,-0x4c(%rbp)
mov    -0x4c(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    11ef <check_stability_closedloop+0xbf>
mov    -0x8(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
addsd  -0x70(%rbp),%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    11be <check_stability_closedloop+0x8e>
movsd  -0x70(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <__DSVERIFIER_assert@plt>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x70(%rbp)
movl   $0x0,-0x4c(%rbp)
mov    -0x4c(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1276 <check_stability_closedloop+0x146>
mov    -0x8(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
mov    -0xc(%rbp),%esi
sub    $0x1,%esi
sub    -0x4c(%rbp),%esi
mov    $0xffffffff,%edi
call   1040 <internal_pow@plt>
movaps %xmm0,%xmm2
movsd  -0x90(%rbp),%xmm0
ff
movsd  -0x70(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    1217 <check_stability_closedloop+0xe7>
movsd  -0x70(%rbp),%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
mov    -0xc(%rbp),%esi
sub    $0x1,%esi
mov    $0xffffffff,%edi
call   1040 <internal_pow@plt>
movaps %xmm0,%xmm1
movsd  -0x98(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x70(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <__DSVERIFIER_assert@plt>
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
call   1030 <internal_abs@plt>
movaps %xmm0,%xmm1
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
ucomisd %xmm1,%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <__DSVERIFIER_assert@plt>
movl   $0x0,-0x4c(%rbp)
mov    -0x4c(%rbp),%eax
mov    -0xc(%rbp),%ecx
shl    $0x1,%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    154d <check_stability_closedloop+0x41d>
movl   $0x0,-0x50(%rbp)
mov    -0x50(%rbp),%eax
cmp    -0x30(%rbp),%eax
jge    153a <check_stability_closedloop+0x40a>
mov    -0x80(%rbp),%rax
mov    -0x88(%rbp),%rdx
movslq -0x4c(%rbp),%rcx
imul   %rdx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
movslq -0x50(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
cmpl   $0x0,-0x4c(%rbp)
jne    1386 <check_stability_closedloop+0x256>
mov    -0x80(%rbp),%rax
mov    -0x88(%rbp),%rdx
mov    -0x8(%rbp),%rcx
movslq -0x50(%rbp),%rsi
movsd  (%rcx,%rsi,8),%xmm0
movslq -0x4c(%rbp),%rcx
imul   %rdx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
movslq -0x50(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
jmp    152c <check_stability_closedloop+0x3fc>
mov    -0x4c(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     141a <check_stability_closedloop+0x2ea>
movl   $0x0,-0x74(%rbp)
mov    -0x74(%rbp),%eax
cmp    -0x30(%rbp),%eax
jge    1406 <check_stability_closedloop+0x2d6>
mov    -0x80(%rbp),%rax
mov    -0x88(%rbp),%rdx
mov    -0x4c(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rsi
imul   %rdx,%rsi
shl    $0x3,%rsi
mov    %rax,%rcx
add    %rsi,%rcx
mov    -0x30(%rbp),%esi
sub    -0x74(%rbp),%esi
sub    $0x1,%esi
movslq %esi,%rsi
movsd  (%rcx,%rsi,8),%xmm0
movslq -0x4c(%rbp),%rcx
imul   %rdx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
movslq -0x74(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x74(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x74(%rbp)
jmp    13a1 <check_stability_closedloop+0x271>
mov    -0x30(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x30(%rbp)
mov    -0x30(%rbp),%eax
mov    %eax,-0x50(%rbp)
jmp    1527 <check_stability_closedloop+0x3f7>
mov    -0x80(%rbp),%rax
mov    -0x88(%rbp),%rcx
mov    -0x4c(%rbp),%edx
sub    $0x2,%edx
movslq %edx,%rsi
imul   %rcx,%rsi
shl    $0x3,%rsi
mov    %rax,%rdx
add    %rsi,%rdx
movslq -0x50(%rbp),%rsi
movsd  (%rdx,%rsi,8),%xmm1
mov    -0x4c(%rbp),%edx
sub    $0x2,%edx
movslq %edx,%rsi
imul   %rcx,%rsi
shl    $0x3,%rsi
mov    %rax,%rdx
add    %rsi,%rdx
movslq -0x30(%rbp),%rsi
movsd  (%rdx,%rsi,8),%xmm0
mov    -0x4c(%rbp),%edx
sub    $0x2,%edx
movslq %edx,%rdx
imul   %rcx,%rdx
divsd  (%rax,%rdx,8),%xmm0
mov    -0x4c(%rbp),%edx
sub    $0x1,%edx
movslq %edx,%rsi
imul   %rcx,%rsi
shl    $0x3,%rsi
mov    %rax,%rdx
add    %rsi,%rdx
movslq -0x50(%rbp),%rsi
movsd  (%rdx,%rsi,8),%xmm2
movq   %xmm0,%rdx
movabs $0x8000000000000000,%rsi
xor    %rsi,%rdx
movq   %rdx,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movslq -0x4c(%rbp),%rsi
imul   %rcx,%rsi
shl    $0x3,%rsi
mov    %rax,%rdx
add    %rsi,%rdx
movslq -0x50(%rbp),%rsi
movsd  %xmm0,(%rdx,%rsi,8)
imul   $0x0,%rcx,%rcx
movsd  (%rax,%rcx,8),%xmm0
xor    %eax,%eax
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
mov    %al,-0x99(%rbp)
jb     1517 <check_stability_closedloop+0x3e7>
mov    -0x80(%rbp),%rax
mov    -0x88(%rbp),%rdx
movslq -0x4c(%rbp),%rcx
imul   %rdx,%rcx
movsd  (%rax,%rcx,8),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
setae  %al
mov    %al,-0x99(%rbp)
mov    -0x99(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1050 <__DSVERIFIER_assert@plt>
jmp    152c <check_stability_closedloop+0x3fc>
mov    -0x50(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x50(%rbp)
jmp    1315 <check_stability_closedloop+0x1e5>
jmp    153f <check_stability_closedloop+0x40f>
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    12fa <check_stability_closedloop+0x1ca>
mov    -0x38(%rbp),%rax
mov    %rax,%rsp
mov    $0x1,%eax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_stability_closedloop>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
mov    %rdi,%r12
lea    (%rsi,%rsi,1),%edi
add    $0xffffffff,%edi
mov    %esi,%edx
mov    %rdi,%rax
imul   %rdx,%rax
lea    0xf(,%rax,8),%rax
and    $0xfffffffffffffff0,%rax
mov    %rsp,%rcx
sub    %rax,%rcx
mov    %rcx,-0x50(%rbp)
mov    %rcx,%rsp
test   %esi,%esi
mov    %rdx,%rax
mov    %rdx,-0x38(%rbp)
mov    %rdi,-0x40(%rbp)
jle    1192 <check_stability_closedloop+0x62>
lea    -0x1(%rdx),%rcx
mov    %edx,%eax
and    $0x7,%eax
cmp    $0x7,%rcx
jae    11aa <check_stability_closedloop+0x7a>
xorpd  %xmm0,%xmm0
xor    %ecx,%ecx
jmp    1200 <check_stability_closedloop+0xd0>
mov    %rsi,%r14
xor    %edi,%edi
call   1050 <__DSVERIFIER_assert@plt>
xorpd  %xmm0,%xmm0
movsd  %xmm0,-0x30(%rbp)
jmp    1298 <check_stability_closedloop+0x168>
and    $0xfffffff8,%edx
xorpd  %xmm0,%xmm0
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
addsd  (%r12,%rcx,8),%xmm0
addsd  0x8(%r12,%rcx,8),%xmm0
addsd  0x10(%r12,%rcx,8),%xmm0
addsd  0x18(%r12,%rcx,8),%xmm0
addsd  0x20(%r12,%rcx,8),%xmm0
addsd  0x28(%r12,%rcx,8),%xmm0
addsd  0x30(%r12,%rcx,8),%xmm0
addsd  0x38(%r12,%rcx,8),%xmm0
add    $0x8,%rcx
cmp    %rcx,%rdx
jne    11c0 <check_stability_closedloop+0x90>
mov    %rsi,%r14
test   %rax,%rax
je     121e <check_stability_closedloop+0xee>
lea    (%r12,%rcx,8),%rcx
xor    %edx,%edx
xchg   %ax,%ax
addsd  (%rcx,%rdx,8),%xmm0
add    $0x1,%rdx
cmp    %rdx,%rax
jne    1210 <check_stability_closedloop+0xe0>
xorpd  %xmm2,%xmm2
xor    %edi,%edi
xorpd  %xmm1,%xmm1
movsd  %xmm1,-0x30(%rbp)
ucomisd %xmm2,%xmm0
seta   %dil
call   1050 <__DSVERIFIER_assert@plt>
test   %r14d,%r14d
mov    -0x38(%rbp),%r13
jle    1298 <check_stability_closedloop+0x168>
lea    -0x1(%r14),%r15d
xorpd  %xmm0,%xmm0
movsd  %xmm0,-0x30(%rbp)
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsd  (%r12,%rbx,8),%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    $0xffffffff,%edi
mov    %r15d,%esi
call   1040 <internal_pow@plt>
mulsd  -0x48(%rbp),%xmm0
movsd  -0x30(%rbp),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,-0x30(%rbp)
add    $0x1,%rbx
add    $0xffffffff,%r15d
cmp    %rbx,%r13
jne    1260 <check_stability_closedloop+0x130>
lea    -0x1(%r14),%esi
mov    $0xffffffff,%edi
call   1040 <internal_pow@plt>
mulsd  -0x30(%rbp),%xmm0
xorpd  %xmm1,%xmm1
xor    %edi,%edi
ucomisd %xmm1,%xmm0
seta   %dil
call   1050 <__DSVERIFIER_assert@plt>
movslq %r14d,%rax
movsd  -0x8(%r12,%rax,8),%xmm0
call   1030 <internal_abs@plt>
movsd  (%r12),%xmm1
xor    %edi,%edi
ucomisd %xmm0,%xmm1
seta   %dil
call   1050 <__DSVERIFIER_assert@plt>
mov    %r14,%r8
test   %r8d,%r8d
jle    1494 <check_stability_closedloop+0x364>
mov    -0x40(%rbp),%rax
cmp    $0x2,%eax
mov    $0x1,%ecx
cmovge %eax,%ecx
mov    %rcx,-0x60(%rbp)
mov    -0x50(%rbp),%rax
lea    0x8(%rax),%r15
mov    -0x38(%rbp),%rax
lea    0x0(,%rax,8),%rax
mov    %rax,-0x58(%rbp)
xor    %r9d,%r9d
mov    %r12,-0x40(%rbp)
jmp    1342 <check_stability_closedloop+0x212>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
add    $0x1,%r9
add    -0x58(%rbp),%r15
cmp    -0x60(%rbp),%r9
je     1494 <check_stability_closedloop+0x364>
test   %r8d,%r8d
jle    1330 <check_stability_closedloop+0x200>
mov    %r9,%rax
mov    -0x38(%rbp),%rcx
imul   %rcx,%rax
mov    -0x50(%rbp),%rdx
lea    (%rdx,%rax,8),%r13
lea    -0x1(%r9),%rax
imul   %rcx,%rax
lea    (%rdx,%rax,8),%r14
lea    -0x2(%r9),%rax
imul   %rcx,%rax
lea    (%rdx,%rax,8),%rax
mov    %rax,-0x48(%rbp)
xor    %ebx,%ebx
mov    %r9,-0x30(%rbp)
jmp    1395 <check_stability_closedloop+0x265>
xchg   %ax,%ax
movsd  (%r12,%rax,8),%xmm0
movsd  %xmm0,0x0(%r13,%rax,8)
add    $0x1,%ebx
cmp    %r8d,%ebx
jge    1330 <check_stability_closedloop+0x200>
movslq %ebx,%rax
movq   $0x0,0x0(%r13,%rax,8)
test   %r9,%r9
je     1380 <check_stability_closedloop+0x250>
test   $0x1,%r9b
jne    13f0 <check_stability_closedloop+0x2c0>
movslq %r8d,%rcx
mov    -0x48(%rbp),%rdx
movsd  (%rdx,%rcx,8),%xmm0
divsd  (%rdx),%xmm0
movsd  (%rdx,%rax,8),%xmm1
mulsd  (%r14,%rax,8),%xmm0
subsd  %xmm0,%xmm1
movsd  %xmm1,0x0(%r13,%rax,8)
mov    -0x50(%rbp),%rax
movsd  (%rax),%xmm0
xorpd  %xmm1,%xmm1
mov    %r8,%r12
ucomisd %xmm1,%xmm0
jae    1406 <check_stability_closedloop+0x2d6>
xor    %eax,%eax
jmp    1413 <check_stability_closedloop+0x2e3>
nopl   0x0(%rax,%rax,1)
test   %r8d,%r8d
jle    1488 <check_stability_closedloop+0x358>
mov    %r8d,%eax
cmp    $0x1,%r8d
jne    142b <check_stability_closedloop+0x2fb>
xor    %ecx,%ecx
jmp    146e <check_stability_closedloop+0x33e>
movsd  0x0(%r13),%xmm0
ucomisd %xmm1,%xmm0
setae  %al
movzbl %al,%edi
call   1050 <__DSVERIFIER_assert@plt>
mov    %r12,%r8
mov    -0x40(%rbp),%r12
mov    -0x30(%rbp),%r9
jmp    138d <check_stability_closedloop+0x25d>
mov    %eax,%edx
and    $0xfffffffe,%edx
lea    -0x2(%r8),%esi
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
lea    0x1(%rsi),%edi
movslq %edi,%rdi
movsd  (%r14,%rdi,8),%xmm0
movsd  %xmm0,-0x8(%r15,%rcx,8)
movslq %esi,%rsi
movsd  (%r14,%rsi,8),%xmm0
movsd  %xmm0,(%r15,%rcx,8)
add    $0x2,%rcx
add    $0xfffffffe,%esi
cmp    %rcx,%rdx
jne    1440 <check_stability_closedloop+0x310>
test   $0x1,%al
je     1488 <check_stability_closedloop+0x358>
mov    %ecx,%eax
not    %eax
add    %r8d,%eax
cltq
movsd  (%r14,%rax,8),%xmm0
movsd  %xmm0,0x0(%r13,%rcx,8)
add    $0xffffffff,%r8d
mov    %r8d,%ebx
jmp    138d <check_stability_closedloop+0x25d>
mov    $0x1,%eax
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @check_stability_closedloop(double* %0, i32 %1, double* %2, i32 %3, double* %4, i32 %5) {
%7 = alloca double*
%8 = alloca i32
%9 = alloca double*
%10 = alloca i32
%11 = alloca double*
%12 = alloca i32
%13 = alloca i32
%14 = alloca i8*
%15 = alloca i64
%16 = alloca i64
%17 = alloca i32
%18 = alloca i32
%19 = alloca i32
%20 = alloca double*
%21 = alloca double*
%22 = alloca double
%23 = alloca i32
store double* %0, double** %7
store i32 %1, i32* %8
store double* %2, double** %9
store i32 %3, i32* %10
store double* %4, double** %11
store i32 %5, i32* %12
%24 = load i32, i32* %8
store i32 %24, i32* %13
%25 = load i32, i32* %8
%26 = mul nsw i32 2, %25
%27 = sub nsw i32 %26, 1
%28 = zext i32 %27 to i64
%29 = load i32, i32* %8
%30 = zext i32 %29 to i64
%31 = call i8* @llvm.stacksave()
store i8* %31, i8** %14
%32 = mul nuw i64 %28, %30
%33 = alloca double, i64 %32
store i64 %28, i64* %15
store i64 %30, i64* %16
store i32 0, i32* %19
%34 = load double*, double** %9
store double* %34, double** %20
%35 = load double*, double** %11
store double* %35, double** %21
store double 0.000000e+00, double* %22
store i32 0, i32* %17
br label %36
36: ; preds = %48, %6
%37 = load i32, i32* %17
%38 = load i32, i32* %8
%39 = icmp slt i32 %37, %38
br i1 %39, label %40, label %51
40: ; preds = %36
%41 = load double*, double** %7
%42 = load i32, i32* %17
%43 = sext i32 %42 to i64
%44 = getelementptr inbounds double, double* %41, i64 %43
%45 = load double, double* %44
%46 = load double, double* %22
%47 = fadd double %46, %45
store double %47, double* %22
br label %48
48: ; preds = %40
%49 = load i32, i32* %17
%50 = add nsw i32 %49, 1
store i32 %50, i32* %17
br label %36
51: ; preds = %36
%52 = load double, double* %22
%53 = fcmp ogt double %52, 0.000000e+00
%54 = zext i1 %53 to i32
%55 = call i32 @__DSVERIFIER_assert(i32 %54)
store double 0.000000e+00, double* %22
store i32 0, i32* %17
br label %56
56: ; preds = %73, %51
%57 = load i32, i32* %17
%58 = load i32, i32* %8
%59 = icmp slt i32 %57, %58
br i1 %59, label %60, label %76
60: ; preds = %56
%61 = load double*, double** %7
%62 = load i32, i32* %17
%63 = sext i32 %62 to i64
%64 = getelementptr inbounds double, double* %61, i64 %63
%65 = load double, double* %64
%66 = load i32, i32* %8
%67 = sub nsw i32 %66, 1
%68 = load i32, i32* %17
%69 = sub nsw i32 %67, %68
%70 = call double @internal_pow(i32 -1, i32 %69)
%71 = load double, double* %22
%72 = call double @llvm.fmuladd.f64(double %65, double %70, double %71)
store double %72, double* %22
br label %73
73: ; preds = %60
%74 = load i32, i32* %17
%75 = add nsw i32 %74, 1
store i32 %75, i32* %17
br label %56
76: ; preds = %56
%77 = load double, double* %22
%78 = load i32, i32* %8
%79 = sub nsw i32 %78, 1
%80 = call double @internal_pow(i32 -1, i32 %79)
%81 = fmul double %77, %80
store double %81, double* %22
%82 = load double, double* %22
%83 = fcmp ogt double %82, 0.000000e+00
%84 = zext i1 %83 to i32
%85 = call i32 @__DSVERIFIER_assert(i32 %84)
%86 = load double*, double** %7
%87 = load i32, i32* %8
%88 = sub nsw i32 %87, 1
%89 = sext i32 %88 to i64
%90 = getelementptr inbounds double, double* %86, i64 %89
%91 = load double, double* %90
%92 = call double @internal_abs(double %91)
%93 = load double*, double** %7
%94 = getelementptr inbounds double, double* %93, i64 0
%95 = load double, double* %94
%96 = fcmp olt double %92, %95
%97 = zext i1 %96 to i32
%98 = call i32 @__DSVERIFIER_assert(i32 %97)
store i32 0, i32* %17
br label %99
99: ; preds = %236, %76
%100 = load i32, i32* %17
%101 = load i32, i32* %8
%102 = mul nsw i32 2, %101
%103 = sub nsw i32 %102, 1
%104 = icmp slt i32 %100, %103
br i1 %104, label %105, label %239
105: ; preds = %99
store i32 0, i32* %18
br label %106
106: ; preds = %232, %105
%107 = load i32, i32* %18
%108 = load i32, i32* %13
%109 = icmp slt i32 %107, %108
br i1 %109, label %110, label %235
110: ; preds = %106
%111 = load i32, i32* %17
%112 = sext i32 %111 to i64
%113 = mul nsw i64 %112, %30
%114 = getelementptr inbounds double, double* %33, i64 %113
%115 = load i32, i32* %18
%116 = sext i32 %115 to i64
%117 = getelementptr inbounds double, double* %114, i64 %116
store double 0.000000e+00, double* %117
%118 = load i32, i32* %17
%119 = icmp eq i32 %118, 0
br i1 %119, label %120, label %133
120: ; preds = %110
%121 = load double*, double** %7
%122 = load i32, i32* %18
%123 = sext i32 %122 to i64
%124 = getelementptr inbounds double, double* %121, i64 %123
%125 = load double, double* %124
%126 = load i32, i32* %17
%127 = sext i32 %126 to i64
%128 = mul nsw i64 %127, %30
%129 = getelementptr inbounds double, double* %33, i64 %128
%130 = load i32, i32* %18
%131 = sext i32 %130 to i64
%132 = getelementptr inbounds double, double* %129, i64 %131
store double %125, double* %132
br label %232
133: ; preds = %110
%134 = load i32, i32* %17
%135 = srem i32 %134, 2
%136 = icmp ne i32 %135, 0
br i1 %136, label %137, label %169
137: ; preds = %133
store i32 0, i32* %23
br label %138
138: ; preds = %162, %137
%139 = load i32, i32* %23
%140 = load i32, i32* %13
%141 = icmp slt i32 %139, %140
br i1 %141, label %142, label %165
142: ; preds = %138
%143 = load i32, i32* %17
%144 = sub nsw i32 %143, 1
%145 = sext i32 %144 to i64
%146 = mul nsw i64 %145, %30
%147 = getelementptr inbounds double, double* %33, i64 %146
%148 = load i32, i32* %13
%149 = load i32, i32* %23
%150 = sub nsw i32 %148, %149
%151 = sub nsw i32 %150, 1
%152 = sext i32 %151 to i64
%153 = getelementptr inbounds double, double* %147, i64 %152
%154 = load double, double* %153
%155 = load i32, i32* %17
%156 = sext i32 %155 to i64
%157 = mul nsw i64 %156, %30
%158 = getelementptr inbounds double, double* %33, i64 %157
%159 = load i32, i32* %23
%160 = sext i32 %159 to i64
%161 = getelementptr inbounds double, double* %158, i64 %160
store double %154, double* %161
br label %162
162: ; preds = %142
%163 = load i32, i32* %23
%164 = add nsw i32 %163, 1
store i32 %164, i32* %23
br label %138
165: ; preds = %138
%166 = load i32, i32* %13
%167 = sub nsw i32 %166, 1
store i32 %167, i32* %13
%168 = load i32, i32* %13
store i32 %168, i32* %18
br label %231
169: ; preds = %133
%170 = load i32, i32* %17
%171 = sub nsw i32 %170, 2
%172 = sext i32 %171 to i64
%173 = mul nsw i64 %172, %30
%174 = getelementptr inbounds double, double* %33, i64 %173
%175 = load i32, i32* %18
%176 = sext i32 %175 to i64
%177 = getelementptr inbounds double, double* %174, i64 %176
%178 = load double, double* %177
%179 = load i32, i32* %17
%180 = sub nsw i32 %179, 2
%181 = sext i32 %180 to i64
%182 = mul nsw i64 %181, %30
%183 = getelementptr inbounds double, double* %33, i64 %182
%184 = load i32, i32* %13
%185 = sext i32 %184 to i64
%186 = getelementptr inbounds double, double* %183, i64 %185
%187 = load double, double* %186
%188 = load i32, i32* %17
%189 = sub nsw i32 %188, 2
%190 = sext i32 %189 to i64
%191 = mul nsw i64 %190, %30
%192 = getelementptr inbounds double, double* %33, i64 %191
%193 = getelementptr inbounds double, double* %192, i64 0
%194 = load double, double* %193
%195 = fdiv double %187, %194
%196 = load i32, i32* %17
%197 = sub nsw i32 %196, 1
%198 = sext i32 %197 to i64
%199 = mul nsw i64 %198, %30
%200 = getelementptr inbounds double, double* %33, i64 %199
%201 = load i32, i32* %18
%202 = sext i32 %201 to i64
%203 = getelementptr inbounds double, double* %200, i64 %202
%204 = load double, double* %203
%205 = fneg double %195
%206 = call double @llvm.fmuladd.f64(double %205, double %204, double %178)
%207 = load i32, i32* %17
%208 = sext i32 %207 to i64
%209 = mul nsw i64 %208, %30
%210 = getelementptr inbounds double, double* %33, i64 %209
%211 = load i32, i32* %18
%212 = sext i32 %211 to i64
%213 = getelementptr inbounds double, double* %210, i64 %212
store double %206, double* %213
%214 = mul nsw i64 0, %30
%215 = getelementptr inbounds double, double* %33, i64 %214
%216 = getelementptr inbounds double, double* %215, i64 0
%217 = load double, double* %216
%218 = fcmp oge double %217, 0.000000e+00
br i1 %218, label %219, label %227
219: ; preds = %169
%220 = load i32, i32* %17
%221 = sext i32 %220 to i64
%222 = mul nsw i64 %221, %30
%223 = getelementptr inbounds double, double* %33, i64 %222
%224 = getelementptr inbounds double, double* %223, i64 0
%225 = load double, double* %224
%226 = fcmp oge double %225, 0.000000e+00
br label %227
227: ; preds = %219, %169
%228 = phi i1 [ false, %169 ], [ %226, %219 ]
%229 = zext i1 %228 to i32
%230 = call i32 @__DSVERIFIER_assert(i32 %229)
br label %231
231: ; preds = %227, %165
br label %232
232: ; preds = %231, %120
%233 = load i32, i32* %18
%234 = add nsw i32 %233, 1
store i32 %234, i32* %18
br label %106
235: ; preds = %106
br label %236
236: ; preds = %235
%237 = load i32, i32* %17
%238 = add nsw i32 %237, 1
store i32 %238, i32* %17
br label %99
239: ; preds = %99
%240 = load i8*, i8** %14
ret i32 1
}

LLVM IR (-O2):
define i32 @check_stability_closedloop(double* nocapture %0, i32 %1, double* nocapture readnone %2, i32 %3, double* nocapture readnone %4, i32 %5) {
%7 = shl nsw i32 %1, 1
%8 = add i32 %7, -1
%9 = zext i32 %8 to i64
%10 = zext i32 %1 to i64
%11 = mul nuw i64 %9, %10
%12 = alloca double, i64 %11
%13 = icmp sgt i32 %1, 0
br i1 %13, label %14, label %20
14: ; preds = %6
%15 = add nsw i64 %10, -1
%16 = and i64 %10, 7
%17 = icmp ult i64 %15, 7
br i1 %17, label %60, label %18
18: ; preds = %14
%19 = and i64 %10, 4294967288
br label %22
20: ; preds = %6
%21 = tail call i32 @__DSVERIFIER_assert(i32 0)
br label %92
22: ; preds = %22, %18
%23 = phi i64 [ 0, %18 ], [ %57, %22 ]
%24 = phi double [ 0.000000e+00, %18 ], [ %56, %22 ]
%25 = phi i64 [ 0, %18 ], [ %58, %22 ]
%26 = getelementptr inbounds double, double* %0, i64 %23
%27 = load double, double* %26
%28 = fadd double %24, %27
%29 = or i64 %23, 1
%30 = getelementptr inbounds double, double* %0, i64 %29
%31 = load double, double* %30
%32 = fadd double %28, %31
%33 = or i64 %23, 2
%34 = getelementptr inbounds double, double* %0, i64 %33
%35 = load double, double* %34
%36 = fadd double %32, %35
%37 = or i64 %23, 3
%38 = getelementptr inbounds double, double* %0, i64 %37
%39 = load double, double* %38
%40 = fadd double %36, %39
%41 = or i64 %23, 4
%42 = getelementptr inbounds double, double* %0, i64 %41
%43 = load double, double* %42
%44 = fadd double %40, %43
%45 = or i64 %23, 5
%46 = getelementptr inbounds double, double* %0, i64 %45
%47 = load double, double* %46
%48 = fadd double %44, %47
%49 = or i64 %23, 6
%50 = getelementptr inbounds double, double* %0, i64 %49
%51 = load double, double* %50
%52 = fadd double %48, %51
%53 = or i64 %23, 7
%54 = getelementptr inbounds double, double* %0, i64 %53
%55 = load double, double* %54
%56 = fadd double %52, %55
%57 = add nuw nsw i64 %23, 8
%58 = add i64 %25, 8
%59 = icmp eq i64 %58, %19
br i1 %59, label %60, label %22
60: ; preds = %22, %14
%61 = phi double [ undef, %14 ], [ %56, %22 ]
%62 = phi i64 [ 0, %14 ], [ %57, %22 ]
%63 = phi double [ 0.000000e+00, %14 ], [ %56, %22 ]
%64 = icmp eq i64 %16, 0
br i1 %64, label %75, label %65
65: ; preds = %60, %65
%66 = phi i64 [ %72, %65 ], [ %62, %60 ]
%67 = phi double [ %71, %65 ], [ %63, %60 ]
%68 = phi i64 [ %73, %65 ], [ 0, %60 ]
%69 = getelementptr inbounds double, double* %0, i64 %66
%70 = load double, double* %69
%71 = fadd double %67, %70
%72 = add nuw nsw i64 %66, 1
%73 = add i64 %68, 1
%74 = icmp eq i64 %73, %16
br i1 %74, label %75, label %65
75: ; preds = %65, %60
%76 = phi double [ %61, %60 ], [ %71, %65 ]
%77 = fcmp ogt double %76, 0.000000e+00
%78 = zext i1 %77 to i32
%79 = tail call i32 @__DSVERIFIER_assert(i32 %78)
br i1 %13, label %80, label %92
80: ; preds = %75, %80
%81 = phi i64 [ %90, %80 ], [ 0, %75 ]
%82 = phi double [ %89, %80 ], [ 0.000000e+00, %75 ]
%83 = trunc i64 %81 to i32
%84 = getelementptr inbounds double, double* %0, i64 %81
%85 = load double, double* %84
%86 = xor i32 %83, -1
%87 = add i32 %86, %1
%88 = tail call double @internal_pow(i32 -1, i32 %87)
%89 = tail call double @llvm.fmuladd.f64(double %85, double %88, double %82)
%90 = add nuw nsw i64 %81, 1
%91 = icmp eq i64 %90, %10
br i1 %91, label %92, label %80
92: ; preds = %80, %20, %75
%93 = phi double [ 0.000000e+00, %75 ], [ 0.000000e+00, %20 ], [ %89, %80 ]
%94 = add nsw i32 %1, -1
%95 = tail call double @internal_pow(i32 -1, i32 %94)
%96 = fmul double %93, %95
%97 = fcmp ogt double %96, 0.000000e+00
%98 = zext i1 %97 to i32
%99 = tail call i32 @__DSVERIFIER_assert(i32 %98)
%100 = sext i32 %94 to i64
%101 = getelementptr inbounds double, double* %0, i64 %100
%102 = load double, double* %101
%103 = tail call double @internal_abs(double %102)
%104 = load double, double* %0
%105 = fcmp olt double %103, %104
%106 = zext i1 %105 to i32
%107 = tail call i32 @__DSVERIFIER_assert(i32 %106)
br i1 %13, label %108, label %208
108: ; preds = %92
%109 = call i32 @llvm.smax.i32(i32 %8, i32 1)
%110 = zext i32 %109 to i64
br label %111
111: ; preds = %108, %204
%112 = phi i64 [ 0, %108 ], [ %206, %204 ]
%113 = phi i32 [ %1, %108 ], [ %205, %204 ]
%114 = icmp sgt i32 %113, 0
br i1 %114, label %115, label %204
115: ; preds = %111
%116 = mul nuw nsw i64 %112, %10
%117 = getelementptr inbounds double, double* %12, i64 %116
%118 = icmp eq i64 %112, 0
%119 = and i64 %112, 1
%120 = icmp eq i64 %119, 0
%121 = add nsw i64 %112, -1
%122 = mul nsw i64 %121, %10
%123 = getelementptr inbounds double, double* %12, i64 %122
%124 = add nsw i64 %112, -2
%125 = mul nsw i64 %124, %10
%126 = getelementptr inbounds double, double* %12, i64 %125
br label %127
127: ; preds = %115, %199
%128 = phi i32 [ %113, %115 ], [ %201, %199 ]
%129 = phi i32 [ 0, %115 ], [ %202, %199 ]
%130 = sext i32 %129 to i64
%131 = getelementptr inbounds double, double* %117, i64 %130
store double 0.000000e+00, double* %131
br i1 %118, label %132, label %135
132: ; preds = %127
%133 = getelementptr inbounds double, double* %0, i64 %130
%134 = load double, double* %133
store double %134, double* %131
br label %199
135: ; preds = %127
br i1 %120, label %178, label %136
136: ; preds = %135
%137 = icmp sgt i32 %128, 0
br i1 %137, label %138, label %176
138: ; preds = %136
%139 = zext i32 %128 to i64
%140 = and i64 %139, 1
%141 = icmp eq i32 %128, 1
br i1 %141, label %165, label %142
142: ; preds = %138
%143 = and i64 %139, 4294967294
br label %144
144: ; preds = %144, %142
%145 = phi i64 [ 0, %142 ], [ %162, %144 ]
%146 = phi i64 [ 0, %142 ], [ %163, %144 ]
%147 = trunc i64 %145 to i32
%148 = xor i32 %147, -1
%149 = add i32 %128, %148
%150 = sext i32 %149 to i64
%151 = getelementptr inbounds double, double* %123, i64 %150
%152 = load double, double* %151
%153 = getelementptr inbounds double, double* %117, i64 %145
store double %152, double* %153
%154 = or i64 %145, 1
%155 = trunc i64 %154 to i32
%156 = xor i32 %155, -1
%157 = add i32 %128, %156
%158 = sext i32 %157 to i64
%159 = getelementptr inbounds double, double* %123, i64 %158
%160 = load double, double* %159
%161 = getelementptr inbounds double, double* %117, i64 %154
store double %160, double* %161
%162 = add nuw nsw i64 %145, 2
%163 = add i64 %146, 2
%164 = icmp eq i64 %163, %143
br i1 %164, label %165, label %144
165: ; preds = %144, %138
%166 = phi i64 [ 0, %138 ], [ %162, %144 ]
%167 = icmp eq i64 %140, 0
br i1 %167, label %176, label %168
168: ; preds = %165
%169 = trunc i64 %166 to i32
%170 = xor i32 %169, -1
%171 = add i32 %128, %170
%172 = sext i32 %171 to i64
%173 = getelementptr inbounds double, double* %123, i64 %172
%174 = load double, double* %173
%175 = getelementptr inbounds double, double* %117, i64 %166
store double %174, double* %175
br label %176
176: ; preds = %168, %165, %136
%177 = add nsw i32 %128, -1
br label %199
178: ; preds = %135
%179 = getelementptr inbounds double, double* %126, i64 %130
%180 = load double, double* %179
%181 = sext i32 %128 to i64
%182 = getelementptr inbounds double, double* %126, i64 %181
%183 = load double, double* %182
%184 = load double, double* %126
%185 = getelementptr inbounds double, double* %123, i64 %130
%186 = load double, double* %185
%187 = fneg double %183
%188 = fdiv double %187, %184
%189 = tail call double @llvm.fmuladd.f64(double %188, double %186, double %180)
store double %189, double* %131
%190 = load double, double* %12
%191 = fcmp ult double %190, 0.000000e+00
br i1 %191, label %195, label %192
192: ; preds = %178
%193 = load double, double* %117
%194 = fcmp oge double %193, 0.000000e+00
br label %195
195: ; preds = %192, %178
%196 = phi i1 [ false, %178 ], [ %194, %192 ]
%197 = zext i1 %196 to i32
%198 = tail call i32 @__DSVERIFIER_assert(i32 %197)
br label %199
199: ; preds = %176, %195, %132
%200 = phi i32 [ %129, %132 ], [ %177, %176 ], [ %129, %195 ]
%201 = phi i32 [ %128, %132 ], [ %177, %176 ], [ %128, %195 ]
%202 = add nsw i32 %200, 1
%203 = icmp slt i32 %202, %201
br i1 %203, label %127, label %204
204: ; preds = %199, %111
%205 = phi i32 [ %113, %111 ], [ %201, %199 ]
%206 = add nuw nsw i64 %112, 1
%207 = icmp eq i64 %206, %110
br i1 %207, label %208, label %111
208: ; preds = %204, %92
ret i32 1
}