; LLVM IR from HRI-EU/Rcs :: src/RcsCore (Rcs_dynamics)

; 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"

@Rcs_calloc = external global ptr, align 8
@stderr = external global ptr, align 8
@.str = external hidden unnamed_addr constant [26 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [71 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@integration_t1_t2.init = external hidden global i32, align 4
@__func__.integration_t1_t2 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [41 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local void @runge_kutta_2_3(i32 noundef, ptr noundef, ptr noundef, double noundef, double noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #0

; Function Attrs: nounwind
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #1

declare void @print_trace() #2

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) #3

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memmove.p0.p0.i64(ptr nocapture writeonly, ptr nocapture readonly, i64, i1 immarg) #5

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

; Function Attrs: nounwind
declare void @free(ptr noundef) #1

; Function Attrs: nounwind uwtable
define dso_local i32 @integration_t1_t2(ptr noundef %0, ptr noundef %1, i32 noundef %2, double noundef %3, double noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7, ptr noundef %8) #0 {
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca double, align 8
  %14 = alloca double, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca double, align 8
  %23 = alloca double, align 8
  %24 = alloca double, align 8
  %25 = alloca ptr, align 8
  %26 = alloca ptr, align 8
  store ptr %0, ptr %10, align 8, !tbaa !5
  store ptr %1, ptr %11, align 8, !tbaa !5
  store i32 %2, ptr %12, align 4, !tbaa !9
  store double %3, ptr %13, align 8, !tbaa !11
  store double %4, ptr %14, align 8, !tbaa !11
  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
  store ptr %8, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #6
  store i32 0, ptr %20, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #6
  %27 = load double, ptr %13, align 8, !tbaa !11
  store double %27, ptr %23, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #6
  %28 = load ptr, ptr %15, align 8, !tbaa !5
  %29 = load double, ptr %28, align 8, !tbaa !11
  store double %29, ptr %24, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #6
  %30 = load ptr, ptr @Rcs_calloc, align 8, !tbaa !5
  %31 = load i32, ptr %12, align 4, !tbaa !9
  %32 = sext i32 %31 to i64
  %33 = call ptr %30(i64 noundef %32, i64 noundef 8)
  store ptr %33, ptr %25, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #6
  %34 = load ptr, ptr @Rcs_calloc, align 8, !tbaa !5
  %35 = load i32, ptr %12, align 4, !tbaa !9
  %36 = sext i32 %35 to i64
  %37 = call ptr %34(i64 noundef %36, i64 noundef 8)
  store ptr %37, ptr %26, align 8, !tbaa !5
  %38 = load ptr, ptr %25, align 8, !tbaa !5
  %39 = load ptr, ptr %16, align 8, !tbaa !5
  %40 = load i32, ptr %12, align 4, !tbaa !9
  %41 = sext i32 %40 to i64
  %42 = mul i64 %41, 8
  call void @llvm.memmove.p0.p0.i64(ptr align 8 %38, ptr align 8 %39, i64 %42, i1 false)
  br label %43

43:                                               ; preds = %175, %9
  %44 = load double, ptr %24, align 8, !tbaa !11
  %45 = load ptr, ptr %15, align 8, !tbaa !5
  store double %44, ptr %45, align 8, !tbaa !11
  %46 = load double, ptr %23, align 8, !tbaa !11
  %47 = load double, ptr %24, align 8, !tbaa !11
  %48 = fadd double %46, %47
  %49 = load double, ptr %14, align 8, !tbaa !11
  %50 = fcmp ogt double %48, %49
  br i1 %50, label %51, label %55

51:                                               ; preds = %43
  %52 = load double, ptr %14, align 8, !tbaa !11
  %53 = load double, ptr %23, align 8, !tbaa !11
  %54 = fsub double %52, %53
  store double %54, ptr %24, align 8, !tbaa !11
  br label %55

55:                                               ; preds = %51, %43
  store i32 0, ptr %21, align 4, !tbaa !9
  br label %56

56:                                               ; preds = %153, %55
  %57 = load i32, ptr %21, align 4, !tbaa !9
  %58 = add nsw i32 %57, 1
  store i32 %58, ptr %21, align 4, !tbaa !9
  %59 = load i32, ptr %20, align 4, !tbaa !9
  %60 = add nsw i32 %59, 1
  store i32 %60, ptr %20, align 4, !tbaa !9
  %61 = load i32, ptr %12, align 4, !tbaa !9
  %62 = load ptr, ptr %10, align 8, !tbaa !5
  %63 = load ptr, ptr %11, align 8, !tbaa !5
  %64 = load double, ptr %23, align 8, !tbaa !11
  %65 = load double, ptr %24, align 8, !tbaa !11
  %66 = load ptr, ptr %25, align 8, !tbaa !5
  %67 = load ptr, ptr %17, align 8, !tbaa !5
  %68 = load ptr, ptr %26, align 8, !tbaa !5
  call void @runge_kutta_2_3(i32 noundef %61, ptr noundef %62, ptr noundef %63, double noundef %64, double noundef %65, ptr noundef %66, ptr noundef %67, ptr noundef %68, ptr noundef @integration_t1_t2.init)
  store i32 0, ptr %19, align 4, !tbaa !9
  br label %69

69:                                               ; preds = %89, %56
  %70 = load i32, ptr %19, align 4, !tbaa !9
  %71 = load i32, ptr %12, align 4, !tbaa !9
  %72 = icmp slt i32 %70, %71
  br i1 %72, label %73, label %92

73:                                               ; preds = %69
  %74 = load ptr, ptr %26, align 8, !tbaa !5
  %75 = load i32, ptr %19, align 4, !tbaa !9
  %76 = sext i32 %75 to i64
  %77 = getelementptr inbounds double, ptr %74, i64 %76
  %78 = load double, ptr %77, align 8, !tbaa !11
  %79 = load ptr, ptr %18, align 8, !tbaa !5
  %80 = load i32, ptr %19, align 4, !tbaa !9
  %81 = sext i32 %80 to i64
  %82 = getelementptr inbounds double, ptr %79, i64 %81
  %83 = load double, ptr %82, align 8, !tbaa !11
  %84 = fdiv double %78, %83
  %85 = load ptr, ptr %26, align 8, !tbaa !5
  %86 = load i32, ptr %19, align 4, !tbaa !9
  %87 = sext i32 %86 to i64
  %88 = getelementptr inbounds double, ptr %85, i64 %87
  store double %84, ptr %88, align 8, !tbaa !11
  br label %89

89:                                               ; preds = %73
  %90 = load i32, ptr %19, align 4, !tbaa !9
  %91 = add nsw i32 %90, 1
  store i32 %91, ptr %19, align 4, !tbaa !9
  br label %69, !llvm.loop !13

92:                                               ; preds = %69
  %93 = load ptr, ptr %26, align 8, !tbaa !5
  %94 = load i32, ptr %12, align 4, !tbaa !9
  %95 = call double @VecNd_maxAbsEle(ptr noundef %93, i32 noundef %94)
  %96 = call double @pow(double noundef %95, double noundef 0x3FD5555555555555) #6
  store double %96, ptr %22, align 8, !tbaa !11
  %97 = load double, ptr %22, align 8, !tbaa !11
  %98 = fcmp olt double %97, 1.000000e-05
  br i1 %98, label %99, label %100

99:                                               ; preds = %92
  store double 1.000000e-05, ptr %22, align 8, !tbaa !11
  br label %100

100:                                              ; preds = %99, %92
  %101 = load double, ptr %22, align 8, !tbaa !11
  %102 = fcmp ole double %101, 1.000000e+00
  br i1 %102, label %103, label %133

103:                                              ; preds = %100
  %104 = load double, ptr %24, align 8, !tbaa !11
  %105 = load double, ptr %23, align 8, !tbaa !11
  %106 = fadd double %105, %104
  store double %106, ptr %23, align 8, !tbaa !11
  %107 = load double, ptr %22, align 8, !tbaa !11
  %108 = fcmp olt double %107, 2.200000e-01
  br i1 %108, label %109, label %112

109:                                              ; preds = %103
  %110 = load double, ptr %24, align 8, !tbaa !11
  %111 = fmul double %110, 4.000000e+00
  store double %111, ptr %24, align 8, !tbaa !11
  br label %117

112:                                              ; preds = %103
  %113 = load double, ptr %24, align 8, !tbaa !11
  %114 = fmul double 9.000000e-01, %113
  %115 = load double, ptr %22, align 8, !tbaa !11
  %116 = fdiv double %114, %115
  store double %116, ptr %24, align 8, !tbaa !11
  br label %117

117:                                              ; preds = %112, %109
  %118 = load double, ptr %23, align 8, !tbaa !11
  %119 = load double, ptr %13, align 8, !tbaa !11
  %120 = fsub double %119, 1.000000e-10
  %121 = fcmp olt double %118, %120
  br i1 %121, label %122, label %132

122:                                              ; preds = %117
  %123 = load double, ptr %23, align 8, !tbaa !11
  %124 = load double, ptr %24, align 8, !tbaa !11
  %125 = fadd double %123, %124
  %126 = load double, ptr %13, align 8, !tbaa !11
  %127 = fcmp ogt double %125, %126
  br i1 %127, label %128, label %132

128:                                              ; preds = %122
  %129 = load double, ptr %13, align 8, !tbaa !11
  %130 = load double, ptr %23, align 8, !tbaa !11
  %131 = fsub double %129, %130
  store double %131, ptr %24, align 8, !tbaa !11
  br label %132

132:                                              ; preds = %128, %122, %117
  br label %138

133:                                              ; preds = %100
  %134 = load double, ptr %24, align 8, !tbaa !11
  %135 = fmul double 9.000000e-01, %134
  %136 = load double, ptr %22, align 8, !tbaa !11
  %137 = fdiv double %135, %136
  store double %137, ptr %24, align 8, !tbaa !11
  br label %138

138:                                              ; preds = %133, %132
  %139 = load i32, ptr %21, align 4, !tbaa !9
  %140 = icmp sgt i32 %139, 100
  br i1 %140, label %141, label %152

141:                                              ; preds = %138
  br label %142

142:                                              ; preds = %141
  %143 = load ptr, ptr @stderr, align 8, !tbaa !5
  %144 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %143, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @__func__.integration_t1_t2, i32 noundef 319) #6
  %145 = load ptr, ptr @stderr, align 8, !tbaa !5
  %146 = load i32, ptr %21, align 4, !tbaa !9
  %147 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %145, ptr noundef @.str.4, i32 noundef %146) #6
  %148 = load ptr, ptr @stderr, align 8, !tbaa !5
  %149 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %148, ptr noundef @.str.3) #6
  call void @print_trace()
  call void @exit(i32 noundef 1) #7
  unreachable

150:                                              ; No predecessors!
  br label %151

151:                                              ; preds = %150
  br label %152

152:                                              ; preds = %151, %138
  br label %153

153:                                              ; preds = %152
  %154 = load double, ptr %22, align 8, !tbaa !11
  %155 = fcmp ogt double %154, 1.000000e+00
  br i1 %155, label %56, label %156, !llvm.loop !15

156:                                              ; preds = %153
  %157 = load ptr, ptr %25, align 8, !tbaa !5
  %158 = load ptr, ptr %17, align 8, !tbaa !5
  %159 = load i32, ptr %12, align 4, !tbaa !9
  %160 = sext i32 %159 to i64
  %161 = mul i64 %160, 8
  call void @llvm.memmove.p0.p0.i64(ptr align 8 %157, ptr align 8 %158, i64 %161, i1 false)
  %162 = load i32, ptr %20, align 4, !tbaa !9
  %163 = icmp eq i32 %162, 10000
  br i1 %163, label %164, label %174

164:                                              ; preds = %156
  br label %165

165:                                              ; preds = %164
  %166 = load ptr, ptr @stderr, align 8, !tbaa !5
  %167 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %166, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @__func__.integration_t1_t2, i32 noundef 329) #6
  %168 = load ptr, ptr @stderr, align 8, !tbaa !5
  %169 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %168, ptr noundef @.str.5) #6
  %170 = load ptr, ptr @stderr, align 8, !tbaa !5
  %171 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %170, ptr noundef @.str.3) #6
  call void @print_trace()
  call void @exit(i32 noundef 1) #7
  unreachable

172:                                              ; No predecessors!
  br label %173

173:                                              ; preds = %172
  br label %174

174:                                              ; preds = %173, %156
  br label %175

175:                                              ; preds = %174
  %176 = load double, ptr %23, align 8, !tbaa !11
  %177 = load double, ptr %14, align 8, !tbaa !11
  %178 = fsub double %177, 1.000000e-10
  %179 = fcmp olt double %176, %178
  br i1 %179, label %43, label %180, !llvm.loop !16

180:                                              ; preds = %175
  %181 = load ptr, ptr %25, align 8, !tbaa !5
  call void @free(ptr noundef %181) #6
  %182 = load ptr, ptr %26, align 8, !tbaa !5
  call void @free(ptr noundef %182) #6
  %183 = load i32, ptr %20, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  ret i32 %183
}

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

declare double @VecNd_maxAbsEle(ptr noundef, i32 noundef) #2

attributes #0 = { 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 #1 = { 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 #2 = { "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 #3 = { noreturn 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 #4 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #6 = { nounwind }
attributes #7 = { noreturn 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 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}
!16 = distinct !{!16, !14}


; 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"

@Rcs_calloc = external local_unnamed_addr global ptr, align 8
@stderr = external local_unnamed_addr global ptr, align 8
@.str = external hidden unnamed_addr constant [26 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [71 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@integration_t1_t2.init = external hidden global i32, align 4
@__func__.integration_t1_t2 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [41 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local void @runge_kutta_2_3(i32 noundef, ptr noundef, ptr noundef, double noundef, double noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nofree nounwind
declare noundef i32 @fprintf(ptr nocapture noundef, ptr nocapture noundef readonly, ...) local_unnamed_addr #1

declare void @print_trace() local_unnamed_addr #2

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memmove.p0.p0.i64(ptr nocapture writeonly, ptr nocapture readonly, i64, i1 immarg) #4

; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #5

; Function Attrs: nounwind uwtable
define dso_local range(i32 -2147483647, -2147483648) i32 @integration_t1_t2(ptr noundef %0, ptr noundef %1, i32 noundef %2, double noundef %3, double noundef %4, ptr nocapture noundef %5, ptr nocapture noundef readonly %6, ptr noundef %7, ptr nocapture noundef readonly %8) local_unnamed_addr #0 {
  %10 = load double, ptr %5, align 8, !tbaa !5
  %11 = load ptr, ptr @Rcs_calloc, align 8, !tbaa !9
  %12 = sext i32 %2 to i64
  %13 = tail call ptr %11(i64 noundef %12, i64 noundef 8) #7
  %14 = load ptr, ptr @Rcs_calloc, align 8, !tbaa !9
  %15 = tail call ptr %14(i64 noundef %12, i64 noundef 8) #7
  %16 = shl nsw i64 %12, 3
  tail call void @llvm.memmove.p0.p0.i64(ptr align 8 %13, ptr align 8 %6, i64 %16, i1 false)
  %17 = icmp sgt i32 %2, 0
  %18 = fadd double %3, -1.000000e-10
  %19 = fadd double %4, -1.000000e-10
  br i1 %17, label %.split.us.us.preheader, label %.split

.split.us.us.preheader:                           ; preds = %9
  %wide.trip.count = zext nneg i32 %2 to i64
  %20 = shl nuw nsw i64 %wide.trip.count, 3
  %scevgep = getelementptr i8, ptr %15, i64 %20
  %scevgep142 = getelementptr i8, ptr %8, i64 %20
  %min.iters.check = icmp eq i32 %2, 1
  %bound0 = icmp ult ptr %15, %scevgep142
  %bound1 = icmp ugt ptr %scevgep, %8
  %found.conflict = and i1 %bound0, %bound1
  %n.vec = and i64 %wide.trip.count, 2147483646
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count
  br label %.split.us.us

.split.us.us:                                     ; preds = %.split.us.us.preheader, %25
  %.066.us = phi double [ %.268.us.us, %25 ], [ %3, %.split.us.us.preheader ]
  %.064.us = phi double [ %.4.us.us, %25 ], [ %10, %.split.us.us.preheader ]
  %.063.us = phi i32 [ %76, %25 ], [ 0, %.split.us.us.preheader ]
  store double %.064.us, ptr %5, align 8, !tbaa !5
  %21 = fadd double %.066.us, %.064.us
  %22 = fcmp ogt double %21, %4
  %23 = fsub double %4, %.066.us
  %.165.us = select i1 %22, double %23, double %.064.us
  %24 = add i32 %.063.us, 100
  br label %.lr.ph.us.us

25:                                               ; preds = %.split91.us.us
  %26 = fcmp olt double %.268.us.us, %19
  br i1 %26, label %.split.us.us, label %.split97.us, !llvm.loop !11

.lr.ph.us.us:                                     ; preds = %54, %.split.us.us
  %.167.us.us = phi double [ %.066.us, %.split.us.us ], [ %.268.us.us, %54 ]
  %.2.us.us = phi double [ %.165.us, %.split.us.us ], [ %.4.us.us, %54 ]
  %.1.us.us = phi i32 [ %.063.us, %.split.us.us ], [ %76, %54 ]
  tail call void @runge_kutta_2_3(i32 noundef %2, ptr noundef %0, ptr noundef %1, double noundef %.167.us.us, double noundef %.2.us.us, ptr noundef %13, ptr noundef %7, ptr noundef %15, ptr noundef nonnull @integration_t1_t2.init)
  %brmerge = select i1 %min.iters.check, i1 true, i1 %found.conflict
  br i1 %brmerge, label %scalar.ph.preheader, label %vector.body

scalar.ph.preheader:                              ; preds = %.lr.ph.us.us, %middle.block
  %indvars.iv.ph = phi i64 [ 0, %.lr.ph.us.us ], [ %n.vec, %middle.block ]
  %27 = sub nsw i64 %wide.trip.count, %indvars.iv.ph
  %xtraiter = and i64 %27, 3
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %scalar.ph.prol.loopexit, label %scalar.ph.prol

scalar.ph.prol:                                   ; preds = %scalar.ph.preheader, %scalar.ph.prol
  %indvars.iv.prol = phi i64 [ %indvars.iv.next.prol, %scalar.ph.prol ], [ %indvars.iv.ph, %scalar.ph.preheader ]
  %prol.iter = phi i64 [ %prol.iter.next, %scalar.ph.prol ], [ 0, %scalar.ph.preheader ]
  %28 = getelementptr inbounds double, ptr %15, i64 %indvars.iv.prol
  %29 = load double, ptr %28, align 8, !tbaa !5
  %30 = getelementptr inbounds double, ptr %8, i64 %indvars.iv.prol
  %31 = load double, ptr %30, align 8, !tbaa !5
  %32 = fdiv double %29, %31
  store double %32, ptr %28, align 8, !tbaa !5
  %indvars.iv.next.prol = add nuw nsw i64 %indvars.iv.prol, 1
  %prol.iter.next = add i64 %prol.iter, 1
  %prol.iter.cmp.not = icmp eq i64 %prol.iter.next, %xtraiter
  br i1 %prol.iter.cmp.not, label %scalar.ph.prol.loopexit, label %scalar.ph.prol, !llvm.loop !13

scalar.ph.prol.loopexit:                          ; preds = %scalar.ph.prol, %scalar.ph.preheader
  %indvars.iv.unr = phi i64 [ %indvars.iv.ph, %scalar.ph.preheader ], [ %indvars.iv.next.prol, %scalar.ph.prol ]
  %33 = sub nsw i64 %indvars.iv.ph, %wide.trip.count
  %34 = icmp ugt i64 %33, -4
  br i1 %34, label %._crit_edge.us.us, label %scalar.ph

vector.body:                                      ; preds = %.lr.ph.us.us, %vector.body
  %index = phi i64 [ %index.next, %vector.body ], [ 0, %.lr.ph.us.us ]
  %35 = getelementptr inbounds double, ptr %15, i64 %index
  %wide.load = load <2 x double>, ptr %35, align 8, !tbaa !5, !alias.scope !15, !noalias !18
  %36 = getelementptr inbounds double, ptr %8, i64 %index
  %wide.load143 = load <2 x double>, ptr %36, align 8, !tbaa !5, !alias.scope !18
  %37 = fdiv <2 x double> %wide.load, %wide.load143
  store <2 x double> %37, ptr %35, align 8, !tbaa !5, !alias.scope !15, !noalias !18
  %index.next = add nuw i64 %index, 2
  %38 = icmp eq i64 %index.next, %n.vec
  br i1 %38, label %middle.block, label %vector.body, !llvm.loop !20

middle.block:                                     ; preds = %vector.body
  br i1 %cmp.n, label %._crit_edge.us.us, label %scalar.ph.preheader

39:                                               ; preds = %._crit_edge.us.us
  %40 = fadd double %.167.us.us, %.2.us.us
  %41 = fcmp olt double %.069.us.us, 2.200000e-01
  %42 = fmul double %.2.us.us, 4.000000e+00
  %43 = fmul double %.2.us.us, 9.000000e-01
  %44 = fdiv double %43, %.069.us.us
  %.3.us.us = select i1 %41, double %42, double %44
  %45 = fcmp olt double %40, %18
  %46 = fadd double %40, %.3.us.us
  %47 = fcmp ogt double %46, %3
  %or.cond.us.us = and i1 %45, %47
  br i1 %or.cond.us.us, label %48, label %53

48:                                               ; preds = %39
  %49 = fsub double %3, %40
  br label %53

50:                                               ; preds = %._crit_edge.us.us
  %51 = fmul double %.2.us.us, 9.000000e-01
  %52 = fdiv double %51, %.069.us.us
  br label %53

53:                                               ; preds = %50, %48, %39
  %.268.us.us = phi double [ %40, %48 ], [ %40, %39 ], [ %.167.us.us, %50 ]
  %.4.us.us = phi double [ %49, %48 ], [ %.3.us.us, %39 ], [ %52, %50 ]
  %exitcond119 = icmp eq i32 %.1.us.us, %24
  br i1 %exitcond119, label %.split89.us, label %54

54:                                               ; preds = %53
  %55 = fcmp ogt double %.069.us.us, 1.000000e+00
  br i1 %55, label %.lr.ph.us.us, label %.split91.us.us, !llvm.loop !23

scalar.ph:                                        ; preds = %scalar.ph.prol.loopexit, %scalar.ph
  %indvars.iv = phi i64 [ %indvars.iv.next.3, %scalar.ph ], [ %indvars.iv.unr, %scalar.ph.prol.loopexit ]
  %56 = getelementptr inbounds double, ptr %15, i64 %indvars.iv
  %57 = load double, ptr %56, align 8, !tbaa !5
  %58 = getelementptr inbounds double, ptr %8, i64 %indvars.iv
  %59 = load double, ptr %58, align 8, !tbaa !5
  %60 = fdiv double %57, %59
  store double %60, ptr %56, align 8, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %61 = getelementptr inbounds double, ptr %15, i64 %indvars.iv.next
  %62 = load double, ptr %61, align 8, !tbaa !5
  %63 = getelementptr inbounds double, ptr %8, i64 %indvars.iv.next
  %64 = load double, ptr %63, align 8, !tbaa !5
  %65 = fdiv double %62, %64
  store double %65, ptr %61, align 8, !tbaa !5
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %66 = getelementptr inbounds double, ptr %15, i64 %indvars.iv.next.1
  %67 = load double, ptr %66, align 8, !tbaa !5
  %68 = getelementptr inbounds double, ptr %8, i64 %indvars.iv.next.1
  %69 = load double, ptr %68, align 8, !tbaa !5
  %70 = fdiv double %67, %69
  store double %70, ptr %66, align 8, !tbaa !5
  %indvars.iv.next.2 = add nuw nsw i64 %indvars.iv, 3
  %71 = getelementptr inbounds double, ptr %15, i64 %indvars.iv.next.2
  %72 = load double, ptr %71, align 8, !tbaa !5
  %73 = getelementptr inbounds double, ptr %8, i64 %indvars.iv.next.2
  %74 = load double, ptr %73, align 8, !tbaa !5
  %75 = fdiv double %72, %74
  store double %75, ptr %71, align 8, !tbaa !5
  %indvars.iv.next.3 = add nuw nsw i64 %indvars.iv, 4
  %exitcond118.not.3 = icmp eq i64 %indvars.iv.next.3, %wide.trip.count
  br i1 %exitcond118.not.3, label %._crit_edge.us.us, label %scalar.ph, !llvm.loop !24

._crit_edge.us.us:                                ; preds = %scalar.ph.prol.loopexit, %scalar.ph, %middle.block
  %76 = add i32 %.1.us.us, 1
  %77 = tail call double @VecNd_maxAbsEle(ptr noundef nonnull %15, i32 noundef %2) #7
  %78 = tail call double @pow(double noundef %77, double noundef 0x3FD5555555555555) #7
  %79 = fcmp olt double %78, 1.000000e-05
  %.069.us.us = select i1 %79, double 1.000000e-05, double %78
  %80 = fcmp ugt double %.069.us.us, 1.000000e+00
  br i1 %80, label %50, label %39

.split91.us.us:                                   ; preds = %54
  tail call void @llvm.memmove.p0.p0.i64(ptr align 8 %13, ptr align 8 %7, i64 %16, i1 false)
  %81 = icmp eq i32 %76, 10000
  br i1 %81, label %.split100.us, label %25

.split:                                           ; preds = %9, %122
  %.066 = phi double [ %.268, %122 ], [ %3, %9 ]
  %.064 = phi double [ %.4, %122 ], [ %10, %9 ]
  %.063 = phi i32 [ %87, %122 ], [ 0, %9 ]
  store double %.064, ptr %5, align 8, !tbaa !5
  %82 = fadd double %.066, %.064
  %83 = fcmp ogt double %82, %4
  %84 = fsub double %4, %.066
  %.165 = select i1 %83, double %84, double %.064
  %85 = add i32 %.063, 100
  br label %86

86:                                               ; preds = %113, %.split
  %.167 = phi double [ %.066, %.split ], [ %.268, %113 ]
  %.2 = phi double [ %.165, %.split ], [ %.4, %113 ]
  %.1 = phi i32 [ %.063, %.split ], [ %87, %113 ]
  %87 = add i32 %.1, 1
  tail call void @runge_kutta_2_3(i32 noundef %2, ptr noundef %0, ptr noundef %1, double noundef %.167, double noundef %.2, ptr noundef %13, ptr noundef %7, ptr noundef %15, ptr noundef nonnull @integration_t1_t2.init)
  %88 = tail call double @VecNd_maxAbsEle(ptr noundef %15, i32 noundef %2) #7
  %89 = tail call double @pow(double noundef %88, double noundef 0x3FD5555555555555) #7
  %90 = fcmp olt double %89, 1.000000e-05
  %.069 = select i1 %90, double 1.000000e-05, double %89
  %91 = fcmp ugt double %.069, 1.000000e+00
  br i1 %91, label %103, label %92

92:                                               ; preds = %86
  %93 = fadd double %.167, %.2
  %94 = fcmp olt double %.069, 2.200000e-01
  %95 = fmul double %.2, 4.000000e+00
  %96 = fmul double %.2, 9.000000e-01
  %97 = fdiv double %96, %.069
  %.3 = select i1 %94, double %95, double %97
  %98 = fcmp olt double %93, %18
  %99 = fadd double %93, %.3
  %100 = fcmp ogt double %99, %3
  %or.cond = and i1 %98, %100
  br i1 %or.cond, label %101, label %106

101:                                              ; preds = %92
  %102 = fsub double %3, %93
  br label %106

103:                                              ; preds = %86
  %104 = fmul double %.2, 9.000000e-01
  %105 = fdiv double %104, %.069
  br label %106

106:                                              ; preds = %92, %101, %103
  %.268 = phi double [ %93, %101 ], [ %93, %92 ], [ %.167, %103 ]
  %.4 = phi double [ %102, %101 ], [ %.3, %92 ], [ %105, %103 ]
  %exitcond = icmp eq i32 %.1, %85
  br i1 %exitcond, label %.split89.us, label %113

.split89.us:                                      ; preds = %106, %53
  %107 = load ptr, ptr @stderr, align 8, !tbaa !9
  %108 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %107, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @__func__.integration_t1_t2, i32 noundef 319) #8
  %109 = load ptr, ptr @stderr, align 8, !tbaa !9
  %110 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %109, ptr noundef nonnull @.str.4, i32 noundef 101) #8
  %111 = load ptr, ptr @stderr, align 8, !tbaa !9
  %112 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %111, ptr noundef nonnull @.str.3) #8
  tail call void @print_trace() #7
  tail call void @exit(i32 noundef 1) #9
  unreachable

113:                                              ; preds = %106
  %114 = fcmp ogt double %.069, 1.000000e+00
  br i1 %114, label %86, label %.split91, !llvm.loop !23

.split91:                                         ; preds = %113
  tail call void @llvm.memmove.p0.p0.i64(ptr align 8 %13, ptr align 8 %7, i64 %16, i1 false)
  %115 = icmp eq i32 %87, 10000
  br i1 %115, label %.split100.us, label %122

.split100.us:                                     ; preds = %.split91, %.split91.us.us
  %116 = load ptr, ptr @stderr, align 8, !tbaa !9
  %117 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %116, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @__func__.integration_t1_t2, i32 noundef 329) #8
  %118 = load ptr, ptr @stderr, align 8, !tbaa !9
  %119 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %118, ptr noundef nonnull @.str.5) #8
  %120 = load ptr, ptr @stderr, align 8, !tbaa !9
  %121 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %120, ptr noundef nonnull @.str.3) #8
  tail call void @print_trace() #7
  tail call void @exit(i32 noundef 1) #9
  unreachable

122:                                              ; preds = %.split91
  %123 = fcmp olt double %.268, %19
  br i1 %123, label %.split, label %.split97.us, !llvm.loop !11

.split97.us:                                      ; preds = %122, %25
  %.us-phi98 = phi i32 [ %76, %25 ], [ %87, %122 ]
  tail call void @free(ptr noundef %13) #7
  tail call void @free(ptr noundef %15) #7
  ret i32 %.us-phi98
}

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

declare double @VecNd_maxAbsEle(ptr noundef, i32 noundef) local_unnamed_addr #2

attributes #0 = { 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 #1 = { nofree 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 #2 = { "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 #3 = { noreturn 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 #4 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "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 #6 = { 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 #7 = { nounwind }
attributes #8 = { cold nounwind }
attributes #9 = { noreturn 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, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.unroll.disable"}
!15 = !{!16}
!16 = distinct !{!16, !17}
!17 = distinct !{!17, !"LVerDomain"}
!18 = !{!19}
!19 = distinct !{!19, !17}
!20 = distinct !{!20, !12, !21, !22}
!21 = !{!"llvm.loop.isvectorized", i32 1}
!22 = !{!"llvm.loop.unroll.runtime.disable"}
!23 = distinct !{!23, !12}
!24 = distinct !{!24, !12, !21}


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