; LLVM IR from CLASS-SZ/class_sz :: class-sz/tools (dei_rkck)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.generic_integrator_workspace = type { i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, double, [2048 x i8] }

@.str.2 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [58 x i8], align 1
@__func__.rkqs = external hidden unnamed_addr constant [5 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [11 x i8], align 1

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #0

declare void @class_protect_sprintf(ptr noundef, ptr noundef, ...) #1

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fabs.f64(double) #2

; Function Attrs: nounwind uwtable
define dso_local i32 @rkqs(ptr noundef %0, double noundef %1, double noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7) #3 {
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca double, align 8
  %12 = alloca double, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca i32, align 4
  %19 = alloca double, align 8
  %20 = alloca double, align 8
  %21 = alloca double, align 8
  %22 = alloca double, align 8
  %23 = alloca [2048 x i8], align 16
  %24 = alloca i32, align 4
  %25 = alloca [2048 x i8], align 16
  %26 = alloca [2048 x i8], align 16
  store ptr %0, ptr %10, align 8, !tbaa !5
  store double %1, ptr %11, align 8, !tbaa !9
  store double %2, ptr %12, align 8, !tbaa !9
  store ptr %3, ptr %13, align 8, !tbaa !5
  store ptr %4, ptr %14, align 8, !tbaa !5
  store ptr %5, ptr %15, align 8, !tbaa !5
  store ptr %6, ptr %16, align 8, !tbaa !5
  store ptr %7, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #5
  %27 = load double, ptr %11, align 8, !tbaa !9
  store double %27, ptr %20, align 8, !tbaa !9
  br label %28

28:                                               ; preds = %154, %8
  %29 = load ptr, ptr %10, align 8, !tbaa !5
  %30 = load double, ptr %29, align 8, !tbaa !9
  %31 = load double, ptr %20, align 8, !tbaa !9
  %32 = load ptr, ptr %15, align 8, !tbaa !5
  %33 = load ptr, ptr %16, align 8, !tbaa !5
  %34 = load ptr, ptr %17, align 8, !tbaa !5
  %35 = call i32 @rkck(double noundef %30, double noundef %31, ptr noundef %32, ptr noundef %33, ptr noundef %34)
  %36 = icmp eq i32 %35, 1
  br i1 %36, label %37, label %46

37:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 2048, ptr %23) #5
  %38 = getelementptr inbounds [2048 x i8], ptr %23, i64 0, i64 0
  %39 = load ptr, ptr %17, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.generic_integrator_workspace, ptr %39, i32 0, i32 13
  %41 = getelementptr inbounds [2048 x i8], ptr %40, i64 0, i64 0
  call void (ptr, ptr, ...) @class_protect_sprintf(ptr noundef %38, ptr noundef @.str.13, ptr noundef @.str.21, ptr noundef %41)
  %42 = load ptr, ptr %17, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct.generic_integrator_workspace, ptr %42, i32 0, i32 13
  %44 = getelementptr inbounds [2048 x i8], ptr %43, i64 0, i64 0
  %45 = getelementptr inbounds [2048 x i8], ptr %23, i64 0, i64 0
  call void (ptr, ptr, ...) @class_protect_sprintf(ptr noundef %44, ptr noundef @.str.2, ptr noundef @__func__.rkqs, i32 noundef 146, ptr noundef %45)
  call void @llvm.lifetime.end.p0(i64 2048, ptr %23) #5
  store i32 1, ptr %9, align 4
  store i32 1, ptr %24, align 4
  br label %199

46:                                               ; preds = %28
  store double 0.000000e+00, ptr %19, align 8, !tbaa !9
  store i32 0, ptr %18, align 4, !tbaa !11
  br label %47

47:                                               ; preds = %93, %46
  %48 = load i32, ptr %18, align 4, !tbaa !11
  %49 = load ptr, ptr %17, align 8, !tbaa !5
  %50 = getelementptr inbounds %struct.generic_integrator_workspace, ptr %49, i32 0, i32 0
  %51 = load i32, ptr %50, align 8, !tbaa !13
  %52 = icmp slt i32 %48, %51
  br i1 %52, label %53, label %96

53:                                               ; preds = %47
  %54 = load double, ptr %19, align 8, !tbaa !9
  %55 = load ptr, ptr %17, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.generic_integrator_workspace, ptr %55, i32 0, i32 4
  %57 = load ptr, ptr %56, align 8, !tbaa !15
  %58 = load i32, ptr %18, align 4, !tbaa !11
  %59 = sext i32 %58 to i64
  %60 = getelementptr inbounds double, ptr %57, i64 %59
  %61 = load double, ptr %60, align 8, !tbaa !9
  %62 = load ptr, ptr %17, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.generic_integrator_workspace, ptr %62, i32 0, i32 1
  %64 = load ptr, ptr %63, align 8, !tbaa !16
  %65 = load i32, ptr %18, align 4, !tbaa !11
  %66 = sext i32 %65 to i64
  %67 = getelementptr inbounds double, ptr %64, i64 %66
  %68 = load double, ptr %67, align 8, !tbaa !9
  %69 = fdiv double %61, %68
  %70 = call double @llvm.fabs.f64(double %69)
  %71 = fcmp olt double %54, %70
  br i1 %71, label %72, label %89

72:                                               ; preds = %53
  %73 = load ptr, ptr %17, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.generic_integrator_workspace, ptr %73, i32 0, i32 4
  %75 = load ptr, ptr %74, align 8, !tbaa !15
  %76 = load i32, ptr %18, align 4, !tbaa !11
  %77 = sext i32 %76 to i64
  %78 = getelementptr inbounds double, ptr %75, i64 %77
  %79 = load double, ptr %78, align 8, !tbaa !9
  %80 = load ptr, ptr %17, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct.generic_integrator_workspace, ptr %80, i32 0, i32 1
  %82 = load ptr, ptr %81, align 8, !tbaa !16
  %83 = load i32, ptr %18, align 4, !tbaa !11
  %84 = sext i32 %83 to i64
  %85 = getelementptr inbounds double, ptr %82, i64 %84
  %86 = load double, ptr %85, align 8, !tbaa !9
  %87 = fdiv double %79, %86
  %88 = call double @llvm.fabs.f64(double %87)
  br label %91

89:                                               ; preds = %53
  %90 = load double, ptr %19, align 8, !tbaa !9
  br label %91

91:                                               ; preds = %89, %72
  %92 = phi double [ %88, %72 ], [ %90, %89 ]
  store double %92, ptr %19, align 8, !tbaa !9
  br label %93

93:                                               ; preds = %91
  %94 = load i32, ptr %18, align 4, !tbaa !11
  %95 = add nsw i32 %94, 1
  store i32 %95, ptr %18, align 4, !tbaa !11
  br label %47, !llvm.loop !17

96:                                               ; preds = %47
  %97 = load double, ptr %12, align 8, !tbaa !9
  %98 = load double, ptr %19, align 8, !tbaa !9
  %99 = fdiv double %98, %97
  store double %99, ptr %19, align 8, !tbaa !9
  %100 = load double, ptr %19, align 8, !tbaa !9
  %101 = fcmp ole double %100, 1.000000e+00
  br i1 %101, label %102, label %103

102:                                              ; preds = %96
  br label %155

103:                                              ; preds = %96
  %104 = load double, ptr %20, align 8, !tbaa !9
  %105 = fmul double 9.000000e-01, %104
  %106 = load double, ptr %19, align 8, !tbaa !9
  %107 = call double @pow(double noundef %106, double noundef -2.500000e-01) #5
  %108 = fmul double %105, %107
  store double %108, ptr %21, align 8, !tbaa !9
  %109 = load double, ptr %20, align 8, !tbaa !9
  %110 = fcmp oge double %109, 0.000000e+00
  br i1 %110, label %111, label %123

111:                                              ; preds = %103
  %112 = load double, ptr %21, align 8, !tbaa !9
  %113 = load double, ptr %20, align 8, !tbaa !9
  %114 = fmul double 1.000000e-01, %113
  %115 = fcmp olt double %112, %114
  br i1 %115, label %116, label %119

116:                                              ; preds = %111
  %117 = load double, ptr %20, align 8, !tbaa !9
  %118 = fmul double 1.000000e-01, %117
  br label %121

119:                                              ; preds = %111
  %120 = load double, ptr %21, align 8, !tbaa !9
  br label %121

121:                                              ; preds = %119, %116
  %122 = phi double [ %118, %116 ], [ %120, %119 ]
  br label %135

123:                                              ; preds = %103
  %124 = load double, ptr %21, align 8, !tbaa !9
  %125 = load double, ptr %20, align 8, !tbaa !9
  %126 = fmul double 1.000000e-01, %125
  %127 = fcmp olt double %124, %126
  br i1 %127, label %128, label %130

128:                                              ; preds = %123
  %129 = load double, ptr %21, align 8, !tbaa !9
  br label %133

130:                                              ; preds = %123
  %131 = load double, ptr %20, align 8, !tbaa !9
  %132 = fmul double 1.000000e-01, %131
  br label %133

133:                                              ; preds = %130, %128
  %134 = phi double [ %129, %128 ], [ %132, %130 ]
  br label %135

135:                                              ; preds = %133, %121
  %136 = phi double [ %122, %121 ], [ %134, %133 ]
  store double %136, ptr %20, align 8, !tbaa !9
  %137 = load ptr, ptr %10, align 8, !tbaa !5
  %138 = load double, ptr %137, align 8, !tbaa !9
  %139 = load double, ptr %20, align 8, !tbaa !9
  %140 = fadd double %138, %139
  store double %140, ptr %22, align 8, !tbaa !9
  %141 = load double, ptr %22, align 8, !tbaa !9
  %142 = load ptr, ptr %10, align 8, !tbaa !5
  %143 = load double, ptr %142, align 8, !tbaa !9
  %144 = fcmp oeq double %141, %143
  br i1 %144, label %145, label %154

145:                                              ; preds = %135
  call void @llvm.lifetime.start.p0(i64 2048, ptr %25) #5
  %146 = getelementptr inbounds [2048 x i8], ptr %25, i64 0, i64 0
  %147 = load double, ptr %22, align 8, !tbaa !9
  call void (ptr, ptr, ...) @class_protect_sprintf(ptr noundef %146, ptr noundef @.str.22, double noundef %147)
  call void @llvm.lifetime.start.p0(i64 2048, ptr %26) #5
  %148 = getelementptr inbounds [2048 x i8], ptr %26, i64 0, i64 0
  %149 = getelementptr inbounds [2048 x i8], ptr %25, i64 0, i64 0
  call void (ptr, ptr, ...) @class_protect_sprintf(ptr noundef %148, ptr noundef @.str.17, ptr noundef @.str.23, ptr noundef %149)
  %150 = load ptr, ptr %17, align 8, !tbaa !5
  %151 = getelementptr inbounds %struct.generic_integrator_workspace, ptr %150, i32 0, i32 13
  %152 = getelementptr inbounds [2048 x i8], ptr %151, i64 0, i64 0
  %153 = getelementptr inbounds [2048 x i8], ptr %26, i64 0, i64 0
  call void (ptr, ptr, ...) @class_protect_sprintf(ptr noundef %152, ptr noundef @.str.2, ptr noundef @__func__.rkqs, i32 noundef 156, ptr noundef %153)
  call void @llvm.lifetime.end.p0(i64 2048, ptr %26) #5
  call void @llvm.lifetime.end.p0(i64 2048, ptr %25) #5
  store i32 1, ptr %9, align 4
  store i32 1, ptr %24, align 4
  br label %199

154:                                              ; preds = %135
  br label %28

155:                                              ; preds = %102
  %156 = load double, ptr %19, align 8, !tbaa !9
  %157 = fcmp ogt double %156, 1.890000e-04
  br i1 %157, label %158, label %165

158:                                              ; preds = %155
  %159 = load double, ptr %20, align 8, !tbaa !9
  %160 = fmul double 9.000000e-01, %159
  %161 = load double, ptr %19, align 8, !tbaa !9
  %162 = call double @pow(double noundef %161, double noundef -2.000000e-01) #5
  %163 = fmul double %160, %162
  %164 = load ptr, ptr %14, align 8, !tbaa !5
  store double %163, ptr %164, align 8, !tbaa !9
  br label %169

165:                                              ; preds = %155
  %166 = load double, ptr %20, align 8, !tbaa !9
  %167 = fmul double 5.000000e+00, %166
  %168 = load ptr, ptr %14, align 8, !tbaa !5
  store double %167, ptr %168, align 8, !tbaa !9
  br label %169

169:                                              ; preds = %165, %158
  %170 = load double, ptr %20, align 8, !tbaa !9
  %171 = load ptr, ptr %13, align 8, !tbaa !5
  store double %170, ptr %171, align 8, !tbaa !9
  %172 = load ptr, ptr %10, align 8, !tbaa !5
  %173 = load double, ptr %172, align 8, !tbaa !9
  %174 = fadd double %173, %170
  store double %174, ptr %172, align 8, !tbaa !9
  store i32 0, ptr %18, align 4, !tbaa !11
  br label %175

175:                                              ; preds = %195, %169
  %176 = load i32, ptr %18, align 4, !tbaa !11
  %177 = load ptr, ptr %17, align 8, !tbaa !5
  %178 = getelementptr inbounds %struct.generic_integrator_workspace, ptr %177, i32 0, i32 0
  %179 = load i32, ptr %178, align 8, !tbaa !13
  %180 = icmp slt i32 %176, %179
  br i1 %180, label %181, label %198

181:                                              ; preds = %175
  %182 = load ptr, ptr %17, align 8, !tbaa !5
  %183 = getelementptr inbounds %struct.generic_integrator_workspace, ptr %182, i32 0, i32 11
  %184 = load ptr, ptr %183, align 8, !tbaa !19
  %185 = load i32, ptr %18, align 4, !tbaa !11
  %186 = sext i32 %185 to i64
  %187 = getelementptr inbounds double, ptr %184, i64 %186
  %188 = load double, ptr %187, align 8, !tbaa !9
  %189 = load ptr, ptr %17, align 8, !tbaa !5
  %190 = getelementptr inbounds %struct.generic_integrator_workspace, ptr %189, i32 0, i32 2
  %191 = load ptr, ptr %190, align 8, !tbaa !20
  %192 = load i32, ptr %18, align 4, !tbaa !11
  %193 = sext i32 %192 to i64
  %194 = getelementptr inbounds double, ptr %191, i64 %193
  store double %188, ptr %194, align 8, !tbaa !9
  br label %195

195:                                              ; preds = %181
  %196 = load i32, ptr %18, align 4, !tbaa !11
  %197 = add nsw i32 %196, 1
  store i32 %197, ptr %18, align 4, !tbaa !11
  br label %175, !llvm.loop !21

198:                                              ; preds = %175
  store i32 0, ptr %9, align 4
  store i32 1, ptr %24, align 4
  br label %199

199:                                              ; preds = %198, %145, %37
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  %200 = load i32, ptr %9, align 4
  ret i32 %200
}

; Function Attrs: nounwind uwtable
declare dso_local i32 @rkck(double noundef, double noundef, ptr noundef, ptr noundef, ptr noundef) #3

; Function Attrs: nounwind
declare double @pow(double noundef, double noundef) #4

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #3 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"double", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !12, i64 0}
!14 = !{!"generic_integrator_workspace", !12, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !10, i64 96, !7, i64 104}
!15 = !{!14, !6, i64 32}
!16 = !{!14, !6, i64 8}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = !{!14, !6, i64 88}
!20 = !{!14, !6, i64 16}
!21 = distinct !{!21, !18}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

@.str.2 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [58 x i8], align 1
@__func__.rkqs = external hidden unnamed_addr constant [5 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [11 x i8], align 1

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #0

declare void @class_protect_sprintf(ptr noundef, ptr noundef, ...) local_unnamed_addr #1

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fabs.f64(double) #2

; Function Attrs: nounwind uwtable
define dso_local range(i32 0, 2) i32 @rkqs(ptr nocapture noundef %0, double noundef %1, double noundef %2, ptr nocapture noundef writeonly %3, ptr nocapture noundef writeonly %4, ptr noundef %5, ptr noundef %6, ptr noundef %7) local_unnamed_addr #3 {
  %9 = alloca [2048 x i8], align 16
  %10 = alloca [2048 x i8], align 16
  %11 = alloca [2048 x i8], align 16
  %12 = getelementptr inbounds i8, ptr %7, i64 32
  %13 = getelementptr inbounds i8, ptr %7, i64 8
  %.pre = load double, ptr %0, align 8, !tbaa !5
  br label %14

14:                                               ; preds = %60, %8
  %15 = phi double [ %.pre, %8 ], [ %62, %60 ]
  %.058 = phi double [ %1, %8 ], [ %61, %60 ]
  %16 = tail call i32 @rkck(double noundef %15, double noundef %.058, ptr noundef %5, ptr noundef %6, ptr noundef %7)
  %17 = icmp eq i32 %16, 1
  br i1 %17, label %23, label %.preheader

.preheader:                                       ; preds = %14
  %18 = load i32, ptr %7, align 8, !tbaa !9
  %19 = icmp sgt i32 %18, 0
  br i1 %19, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %.preheader
  %20 = load ptr, ptr %12, align 8, !tbaa !13
  %21 = load ptr, ptr %13, align 8, !tbaa !14
  %wide.trip.count = zext nneg i32 %18 to i64
  %xtraiter = and i64 %wide.trip.count, 1
  %22 = icmp eq i32 %18, 1
  br i1 %22, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph.new

.lr.ph.new:                                       ; preds = %.lr.ph
  %unroll_iter = and i64 %wide.trip.count, 2147483646
  br label %25

23:                                               ; preds = %14
  call void @llvm.lifetime.start.p0(i64 2048, ptr nonnull %9) #5
  %24 = getelementptr inbounds i8, ptr %7, i64 104
  call void (ptr, ptr, ...) @class_protect_sprintf(ptr noundef nonnull %9, ptr noundef nonnull @.str.13, ptr noundef nonnull @.str.21, ptr noundef nonnull %24) #5
  call void (ptr, ptr, ...) @class_protect_sprintf(ptr noundef nonnull %24, ptr noundef nonnull @.str.2, ptr noundef nonnull @__func__.rkqs, i32 noundef 146, ptr noundef nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 2048, ptr nonnull %9) #5
  br label %.loopexit

25:                                               ; preds = %25, %.lr.ph.new
  %indvars.iv = phi i64 [ 0, %.lr.ph.new ], [ %indvars.iv.next.1, %25 ]
  %.05967 = phi double [ 0.000000e+00, %.lr.ph.new ], [ %..059.1, %25 ]
  %niter = phi i64 [ 0, %.lr.ph.new ], [ %niter.next.1, %25 ]
  %26 = getelementptr inbounds double, ptr %20, i64 %indvars.iv
  %27 = load double, ptr %26, align 8, !tbaa !5
  %28 = getelementptr inbounds double, ptr %21, i64 %indvars.iv
  %29 = load double, ptr %28, align 8, !tbaa !5
  %30 = fdiv double %27, %29
  %31 = tail call double @llvm.fabs.f64(double %30)
  %32 = fcmp olt double %.05967, %31
  %..059 = select i1 %32, double %31, double %.05967
  %indvars.iv.next = or disjoint i64 %indvars.iv, 1
  %33 = getelementptr inbounds double, ptr %20, i64 %indvars.iv.next
  %34 = load double, ptr %33, align 8, !tbaa !5
  %35 = getelementptr inbounds double, ptr %21, i64 %indvars.iv.next
  %36 = load double, ptr %35, align 8, !tbaa !5
  %37 = fdiv double %34, %36
  %38 = tail call double @llvm.fabs.f64(double %37)
  %39 = fcmp olt double %..059, %38
  %..059.1 = select i1 %39, double %38, double %..059
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %._crit_edge.loopexit.unr-lcssa, label %25, !llvm.loop !15

._crit_edge.loopexit.unr-lcssa:                   ; preds = %25, %.lr.ph
  %..059.lcssa.ph = phi double [ poison, %.lr.ph ], [ %..059.1, %25 ]
  %indvars.iv.unr = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next.1, %25 ]
  %.05967.unr = phi double [ 0.000000e+00, %.lr.ph ], [ %..059.1, %25 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge, label %._crit_edge.loopexit.epilog-lcssa

._crit_edge.loopexit.epilog-lcssa:                ; preds = %._crit_edge.loopexit.unr-lcssa
  %40 = getelementptr inbounds double, ptr %20, i64 %indvars.iv.unr
  %41 = load double, ptr %40, align 8, !tbaa !5
  %42 = getelementptr inbounds double, ptr %21, i64 %indvars.iv.unr
  %43 = load double, ptr %42, align 8, !tbaa !5
  %44 = fdiv double %41, %43
  %45 = tail call double @llvm.fabs.f64(double %44)
  %46 = fcmp olt double %.05967.unr, %45
  %..059.epil = select i1 %46, double %45, double %.05967.unr
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit.epilog-lcssa, %._crit_edge.loopexit.unr-lcssa, %.preheader
  %.059.lcssa = phi double [ 0.000000e+00, %.preheader ], [ %..059.lcssa.ph, %._crit_edge.loopexit.unr-lcssa ], [ %..059.epil, %._crit_edge.loopexit.epilog-lcssa ]
  %47 = fdiv double %.059.lcssa, %2
  %48 = fcmp ugt double %47, 1.000000e+00
  br i1 %48, label %49, label %67

49:                                               ; preds = %._crit_edge
  %50 = fmul double %.058, 9.000000e-01
  %51 = tail call double @pow(double noundef %47, double noundef -2.500000e-01) #5
  %52 = fmul double %50, %51
  %53 = fcmp ult double %.058, 0.000000e+00
  %54 = fmul double %.058, 1.000000e-01
  %55 = fcmp olt double %52, %54
  br i1 %53, label %58, label %56

56:                                               ; preds = %49
  %57 = select i1 %55, double %54, double %52
  br label %60

58:                                               ; preds = %49
  %59 = select i1 %55, double %52, double %54
  br label %60

60:                                               ; preds = %58, %56
  %61 = phi double [ %57, %56 ], [ %59, %58 ]
  %62 = load double, ptr %0, align 8, !tbaa !5
  %63 = fadd double %61, %62
  %64 = fcmp oeq double %63, %62
  br i1 %64, label %65, label %14

65:                                               ; preds = %60
  call void @llvm.lifetime.start.p0(i64 2048, ptr nonnull %10) #5
  call void (ptr, ptr, ...) @class_protect_sprintf(ptr noundef nonnull %10, ptr noundef nonnull @.str.22, double noundef %63) #5
  call void @llvm.lifetime.start.p0(i64 2048, ptr nonnull %11) #5
  call void (ptr, ptr, ...) @class_protect_sprintf(ptr noundef nonnull %11, ptr noundef nonnull @.str.17, ptr noundef nonnull @.str.23, ptr noundef nonnull %10) #5
  %66 = getelementptr inbounds i8, ptr %7, i64 104
  call void (ptr, ptr, ...) @class_protect_sprintf(ptr noundef nonnull %66, ptr noundef nonnull @.str.2, ptr noundef nonnull @__func__.rkqs, i32 noundef 156, ptr noundef nonnull %11) #5
  call void @llvm.lifetime.end.p0(i64 2048, ptr nonnull %11) #5
  call void @llvm.lifetime.end.p0(i64 2048, ptr nonnull %10) #5
  br label %.loopexit

67:                                               ; preds = %._crit_edge
  %68 = fcmp ogt double %47, 1.890000e-04
  br i1 %68, label %69, label %73

69:                                               ; preds = %67
  %70 = fmul double %.058, 9.000000e-01
  %71 = tail call double @pow(double noundef %47, double noundef -2.000000e-01) #5
  %72 = fmul double %70, %71
  %.pre82 = load i32, ptr %7, align 8, !tbaa !9
  br label %75

73:                                               ; preds = %67
  %74 = fmul double %.058, 5.000000e+00
  br label %75

75:                                               ; preds = %73, %69
  %76 = phi i32 [ %18, %73 ], [ %.pre82, %69 ]
  %storemerge = phi double [ %74, %73 ], [ %72, %69 ]
  store double %storemerge, ptr %4, align 8, !tbaa !5
  store double %.058, ptr %3, align 8, !tbaa !5
  %77 = load double, ptr %0, align 8, !tbaa !5
  %78 = fadd double %.058, %77
  store double %78, ptr %0, align 8, !tbaa !5
  %79 = icmp sgt i32 %76, 0
  br i1 %79, label %.lr.ph71, label %.loopexit

.lr.ph71:                                         ; preds = %75
  %80 = getelementptr inbounds i8, ptr %7, i64 88
  %81 = load ptr, ptr %80, align 8, !tbaa !17
  %82 = getelementptr inbounds i8, ptr %7, i64 16
  %83 = load ptr, ptr %82, align 8, !tbaa !18
  %wide.trip.count80 = zext nneg i32 %76 to i64
  %min.iters.check = icmp ult i32 %76, 6
  %84 = ptrtoint ptr %83 to i64
  %85 = ptrtoint ptr %81 to i64
  %86 = sub i64 %84, %85
  %diff.check = icmp ult i64 %86, 32
  %or.cond = select i1 %min.iters.check, i1 true, i1 %diff.check
  br i1 %or.cond, label %scalar.ph.preheader, label %vector.ph

vector.ph:                                        ; preds = %.lr.ph71
  %n.vec = and i64 %wide.trip.count80, 2147483644
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %87 = getelementptr inbounds double, ptr %81, i64 %index
  %88 = getelementptr inbounds i8, ptr %87, i64 16
  %wide.load = load <2 x double>, ptr %87, align 8, !tbaa !5
  %wide.load95 = load <2 x double>, ptr %88, align 8, !tbaa !5
  %89 = getelementptr inbounds double, ptr %83, i64 %index
  %90 = getelementptr inbounds i8, ptr %89, i64 16
  store <2 x double> %wide.load, ptr %89, align 8, !tbaa !5
  store <2 x double> %wide.load95, ptr %90, align 8, !tbaa !5
  %index.next = add nuw i64 %index, 4
  %91 = icmp eq i64 %index.next, %n.vec
  br i1 %91, label %middle.block, label %vector.body, !llvm.loop !19

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count80
  br i1 %cmp.n, label %.loopexit, label %scalar.ph.preheader

scalar.ph.preheader:                              ; preds = %middle.block, %.lr.ph71
  %indvars.iv77.ph = phi i64 [ 0, %.lr.ph71 ], [ %n.vec, %middle.block ]
  %xtraiter105 = and i64 %wide.trip.count80, 3
  %lcmp.mod106.not = icmp eq i64 %xtraiter105, 0
  br i1 %lcmp.mod106.not, label %scalar.ph.prol.loopexit, label %scalar.ph.prol

scalar.ph.prol:                                   ; preds = %scalar.ph.preheader, %scalar.ph.prol
  %indvars.iv77.prol = phi i64 [ %indvars.iv.next78.prol, %scalar.ph.prol ], [ %indvars.iv77.ph, %scalar.ph.preheader ]
  %prol.iter = phi i64 [ %prol.iter.next, %scalar.ph.prol ], [ 0, %scalar.ph.preheader ]
  %92 = getelementptr inbounds double, ptr %81, i64 %indvars.iv77.prol
  %93 = load double, ptr %92, align 8, !tbaa !5
  %94 = getelementptr inbounds double, ptr %83, i64 %indvars.iv77.prol
  store double %93, ptr %94, align 8, !tbaa !5
  %indvars.iv.next78.prol = add nuw nsw i64 %indvars.iv77.prol, 1
  %prol.iter.next = add i64 %prol.iter, 1
  %prol.iter.cmp.not = icmp eq i64 %prol.iter.next, %xtraiter105
  br i1 %prol.iter.cmp.not, label %scalar.ph.prol.loopexit, label %scalar.ph.prol, !llvm.loop !22

scalar.ph.prol.loopexit:                          ; preds = %scalar.ph.prol, %scalar.ph.preheader
  %indvars.iv77.unr = phi i64 [ %indvars.iv77.ph, %scalar.ph.preheader ], [ %indvars.iv.next78.prol, %scalar.ph.prol ]
  %95 = sub nsw i64 %indvars.iv77.ph, %wide.trip.count80
  %96 = icmp ugt i64 %95, -4
  br i1 %96, label %.loopexit, label %scalar.ph

scalar.ph:                                        ; preds = %scalar.ph.prol.loopexit, %scalar.ph
  %indvars.iv77 = phi i64 [ %indvars.iv.next78.3, %scalar.ph ], [ %indvars.iv77.unr, %scalar.ph.prol.loopexit ]
  %97 = getelementptr inbounds double, ptr %81, i64 %indvars.iv77
  %98 = load double, ptr %97, align 8, !tbaa !5
  %99 = getelementptr inbounds double, ptr %83, i64 %indvars.iv77
  store double %98, ptr %99, align 8, !tbaa !5
  %indvars.iv.next78 = add nuw nsw i64 %indvars.iv77, 1
  %100 = getelementptr inbounds double, ptr %81, i64 %indvars.iv.next78
  %101 = load double, ptr %100, align 8, !tbaa !5
  %102 = getelementptr inbounds double, ptr %83, i64 %indvars.iv.next78
  store double %101, ptr %102, align 8, !tbaa !5
  %indvars.iv.next78.1 = add nuw nsw i64 %indvars.iv77, 2
  %103 = getelementptr inbounds double, ptr %81, i64 %indvars.iv.next78.1
  %104 = load double, ptr %103, align 8, !tbaa !5
  %105 = getelementptr inbounds double, ptr %83, i64 %indvars.iv.next78.1
  store double %104, ptr %105, align 8, !tbaa !5
  %indvars.iv.next78.2 = add nuw nsw i64 %indvars.iv77, 3
  %106 = getelementptr inbounds double, ptr %81, i64 %indvars.iv.next78.2
  %107 = load double, ptr %106, align 8, !tbaa !5
  %108 = getelementptr inbounds double, ptr %83, i64 %indvars.iv.next78.2
  store double %107, ptr %108, align 8, !tbaa !5
  %indvars.iv.next78.3 = add nuw nsw i64 %indvars.iv77, 4
  %exitcond81.not.3 = icmp eq i64 %indvars.iv.next78.3, %wide.trip.count80
  br i1 %exitcond81.not.3, label %.loopexit, label %scalar.ph, !llvm.loop !24

.loopexit:                                        ; preds = %scalar.ph.prol.loopexit, %scalar.ph, %middle.block, %75, %65, %23
  %.0 = phi i32 [ 1, %23 ], [ 1, %65 ], [ 0, %75 ], [ 0, %middle.block ], [ 0, %scalar.ph ], [ 0, %scalar.ph.prol.loopexit ]
  ret i32 %.0
}

; Function Attrs: nounwind uwtable
declare dso_local i32 @rkck(double noundef, double noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @pow(double noundef, double noundef) local_unnamed_addr #4

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #3 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress nofree nounwind willreturn memory(write) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"double", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !11, i64 0}
!10 = !{!"generic_integrator_workspace", !11, i64 0, !12, i64 8, !12, i64 16, !12, i64 24, !12, i64 32, !12, i64 40, !12, i64 48, !12, i64 56, !12, i64 64, !12, i64 72, !12, i64 80, !12, i64 88, !6, i64 96, !7, i64 104}
!11 = !{!"int", !7, i64 0}
!12 = !{!"any pointer", !7, i64 0}
!13 = !{!10, !12, i64 32}
!14 = !{!10, !12, i64 8}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = !{!10, !12, i64 88}
!18 = !{!10, !12, i64 16}
!19 = distinct !{!19, !16, !20, !21}
!20 = !{!"llvm.loop.isvectorized", i32 1}
!21 = !{!"llvm.loop.unroll.runtime.disable"}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.unroll.disable"}
!24 = distinct !{!24, !16, !20}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass