#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*/ Double_QR_Step(double *, int, int, int, double, double,
                                  double *, int);
int /*<<< orphan*/ Product_and_Sum_of_Shifts(double *, int, int, double *,
                                             double *, double *, int);
int Two_Consecutive_Small_Subdiagonal(double *, int, int, int, double, double);
void Double_QR_Iteration(double *H, double *S, int min_row, int max_row, int n,
                         double *shift, int iteration) {
  int k;
  double trace, det;
  Product_and_Sum_of_Shifts(H, n, max_row, shift, &trace, &det, iteration);
  k = Two_Consecutive_Small_Subdiagonal(H, min_row, max_row, n, trace, det);
  Double_QR_Step(H, min_row, max_row, k, trace, det, S, n);
}


x86 assembly (clang, -O0):
<Double_QR_Iteration>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    0x10(%rbp),%eax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    %r8d,-0x1c(%rbp)
mov    %r9,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x1c(%rbp),%esi
mov    -0x18(%rbp),%edx
mov    -0x28(%rbp),%rcx
mov    0x10(%rbp),%eax
lea    -0x38(%rbp),%r8
lea    -0x40(%rbp),%r9
mov    %eax,(%rsp)
call   1040 <Product_and_Sum_of_Shifts@plt>
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
mov    -0x1c(%rbp),%ecx
movsd  -0x38(%rbp),%xmm0
movsd  -0x40(%rbp),%xmm1
call   1050 <Two_Consecutive_Small_Subdiagonal@plt>
mov    %eax,-0x2c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
mov    -0x2c(%rbp),%ecx
movsd  -0x38(%rbp),%xmm0
movsd  -0x40(%rbp),%xmm1
mov    -0x10(%rbp),%r8
mov    -0x1c(%rbp),%r9d
call   1030 <Double_QR_Step@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Double_QR_Iteration>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x20,%rsp
mov    %r9,%rax
mov    %r8d,%r12d
mov    %ecx,%ebp
mov    %edx,%r15d
mov    %rsi,%r14
mov    %rdi,%rbx
mov    0x50(%rsp),%ecx
mov    %ecx,(%rsp)
lea    0x18(%rsp),%r8
lea    0x10(%rsp),%r9
mov    %r12d,%esi
mov    %ebp,%edx
mov    %rax,%rcx
call   1040 <Product_and_Sum_of_Shifts@plt>
movsd  0x18(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
mov    %rbx,%rdi
mov    %r15d,%esi
mov    %ebp,%edx
mov    %r12d,%ecx
call   1050 <Two_Consecutive_Small_Subdiagonal@plt>
movsd  0x18(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
mov    %rbx,%rdi
mov    %r15d,%esi
mov    %ebp,%edx
mov    %eax,%ecx
mov    %r14,%r8
mov    %r12d,%r9d
call   1030 <Double_QR_Step@plt>
add    $0x20,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @Double_QR_Iteration(double* %0, double* %1, i32 %2, i32 %3, i32 %4, double* %5, i32 %6) {
%8 = alloca double*
%9 = alloca double*
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca double*
%14 = alloca i32
%15 = alloca i32
%16 = alloca double
%17 = alloca double
store double* %0, double** %8
store double* %1, double** %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store i32 %4, i32* %12
store double* %5, double** %13
store i32 %6, i32* %14
%18 = load double*, double** %8
%19 = load i32, i32* %12
%20 = load i32, i32* %11
%21 = load double*, double** %13
%22 = load i32, i32* %14
%23 = call i32 @Product_and_Sum_of_Shifts(double* %18, i32 %19, i32 %20, double* %21, double* %16, double* %17, i32 %22)
%24 = load double*, double** %8
%25 = load i32, i32* %10
%26 = load i32, i32* %11
%27 = load i32, i32* %12
%28 = load double, double* %16
%29 = load double, double* %17
%30 = call i32 @Two_Consecutive_Small_Subdiagonal(double* %24, i32 %25, i32 %26, i32 %27, double %28, double %29)
store i32 %30, i32* %15
%31 = load double*, double** %8
%32 = load i32, i32* %10
%33 = load i32, i32* %11
%34 = load i32, i32* %15
%35 = load double, double* %16
%36 = load double, double* %17
%37 = load double*, double** %9
%38 = load i32, i32* %12
%39 = call i32 @Double_QR_Step(double* %31, i32 %32, i32 %33, i32 %34, double %35, double %36, double* %37, i32 %38)
ret void
}

LLVM IR (-O2):
define void @Double_QR_Iteration(double* %0, double* %1, i32 %2, i32 %3, i32 %4, double* %5, i32 %6) {
%8 = alloca double
%9 = alloca double
%10 = bitcast double* %8 to i8*
%11 = bitcast double* %9 to i8*
%12 = call i32 @Product_and_Sum_of_Shifts(double* %0, i32 %4, i32 %3, double* %5, double* %8, double* %9, i32 %6)
%13 = load double, double* %8
%14 = load double, double* %9
%15 = call i32 @Two_Consecutive_Small_Subdiagonal(double* %0, i32 %2, i32 %3, i32 %4, double %13, double %14)
%16 = load double, double* %8
%17 = load double, double* %9
%18 = call i32 @Double_QR_Step(double* %0, i32 %2, i32 %3, i32 %15, double %16, double %17, double* %1, i32 %4)
ret void
}