; LLVM IR from sgtlaugh/algovault :: code_library/thomas_algorithm.ll (Z16thomas_algorithmiSt6vectorI8equationSaIS0_EE)

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

%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<long double, std::allocator<long double>>::_Vector_impl" }
%"struct.std::_Vector_base<long double, std::allocator<long double>>::_Vector_impl" = type { %"struct.std::_Vector_base<long double, std::allocator<long double>>::_Vector_impl_data" }
%"struct.std::_Vector_base<long double, std::allocator<long double>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.equation = type { x86_fp80, x86_fp80, x86_fp80, x86_fp80 }

; Function Attrs: mustprogress uwtable
define dso_local void @_Z16thomas_algorithmiSt6vectorI8equationSaIS0_EE(ptr dead_on_unwind noalias writable sret(%"class.std::vector") align 8 %0, i32 noundef %1, ptr noundef %2) #0 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca x86_fp80, align 16
  %9 = alloca i32, align 4
  %10 = alloca i1, align 1
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  store ptr %0, ptr %4, align 8
  store i32 %1, ptr %5, align 4, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !9
  %14 = call noundef nonnull align 16 dereferenceable(64) ptr @_ZNSt6vectorI8equationSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef 0) #4
  %15 = getelementptr inbounds %struct.equation, ptr %14, i32 0, i32 2
  %16 = load x86_fp80, ptr %15, align 16, !tbaa !11
  %17 = call noundef nonnull align 16 dereferenceable(64) ptr @_ZNSt6vectorI8equationSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef 0) #4
  %18 = getelementptr inbounds %struct.equation, ptr %17, i32 0, i32 1
  %19 = load x86_fp80, ptr %18, align 16, !tbaa !14
  %20 = fdiv x86_fp80 %16, %19
  %21 = call noundef nonnull align 16 dereferenceable(64) ptr @_ZNSt6vectorI8equationSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef 0) #4
  %22 = getelementptr inbounds %struct.equation, ptr %21, i32 0, i32 2
  store x86_fp80 %20, ptr %22, align 16, !tbaa !11
  %23 = call noundef nonnull align 16 dereferenceable(64) ptr @_ZNSt6vectorI8equationSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef 0) #4
  %24 = getelementptr inbounds %struct.equation, ptr %23, i32 0, i32 3
  %25 = load x86_fp80, ptr %24, align 16, !tbaa !15
  %26 = call noundef nonnull align 16 dereferenceable(64) ptr @_ZNSt6vectorI8equationSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef 0) #4
  %27 = getelementptr inbounds %struct.equation, ptr %26, i32 0, i32 1
  %28 = load x86_fp80, ptr %27, align 16, !tbaa !14
  %29 = fdiv x86_fp80 %25, %28
  %30 = call noundef nonnull align 16 dereferenceable(64) ptr @_ZNSt6vectorI8equationSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef 0) #4
  %31 = getelementptr inbounds %struct.equation, ptr %30, i32 0, i32 3
  store x86_fp80 %29, ptr %31, align 16, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  store i32 1, ptr %7, align 4, !tbaa !5
  br label %32

32:                                               ; preds = %92, %3
  %33 = load i32, ptr %7, align 4, !tbaa !5
  %34 = load i32, ptr %5, align 4, !tbaa !5
  %35 = icmp slt i32 %33, %34
  br i1 %35, label %37, label %36

36:                                               ; preds = %32
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  br label %95

37:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 16, ptr %8) #4
  %38 = load i32, ptr %7, align 4, !tbaa !5
  %39 = sext i32 %38 to i64
  %40 = call noundef nonnull align 16 dereferenceable(64) ptr @_ZNSt6vectorI8equationSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %39) #4
  %41 = getelementptr inbounds %struct.equation, ptr %40, i32 0, i32 1
  %42 = load x86_fp80, ptr %41, align 16, !tbaa !14
  %43 = load i32, ptr %7, align 4, !tbaa !5
  %44 = sext i32 %43 to i64
  %45 = call noundef nonnull align 16 dereferenceable(64) ptr @_ZNSt6vectorI8equationSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %44) #4
  %46 = getelementptr inbounds %struct.equation, ptr %45, i32 0, i32 0
  %47 = load x86_fp80, ptr %46, align 16, !tbaa !16
  %48 = load i32, ptr %7, align 4, !tbaa !5
  %49 = sub nsw i32 %48, 1
  %50 = sext i32 %49 to i64
  %51 = call noundef nonnull align 16 dereferenceable(64) ptr @_ZNSt6vectorI8equationSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %50) #4
  %52 = getelementptr inbounds %struct.equation, ptr %51, i32 0, i32 2
  %53 = load x86_fp80, ptr %52, align 16, !tbaa !11
  %54 = fneg x86_fp80 %47
  %55 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %54, x86_fp80 %53, x86_fp80 %42)
  %56 = fdiv x86_fp80 0xK3FFF8000000000000000, %55
  store x86_fp80 %56, ptr %8, align 16, !tbaa !17
  %57 = load i32, ptr %7, align 4, !tbaa !5
  %58 = sext i32 %57 to i64
  %59 = call noundef nonnull align 16 dereferenceable(64) ptr @_ZNSt6vectorI8equationSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %58) #4
  %60 = getelementptr inbounds %struct.equation, ptr %59, i32 0, i32 2
  %61 = load x86_fp80, ptr %60, align 16, !tbaa !11
  %62 = load x86_fp80, ptr %8, align 16, !tbaa !17
  %63 = fmul x86_fp80 %61, %62
  %64 = load i32, ptr %7, align 4, !tbaa !5
  %65 = sext i32 %64 to i64
  %66 = call noundef nonnull align 16 dereferenceable(64) ptr @_ZNSt6vectorI8equationSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %65) #4
  %67 = getelementptr inbounds %struct.equation, ptr %66, i32 0, i32 2
  store x86_fp80 %63, ptr %67, align 16, !tbaa !11
  %68 = load i32, ptr %7, align 4, !tbaa !5
  %69 = sext i32 %68 to i64
  %70 = call noundef nonnull align 16 dereferenceable(64) ptr @_ZNSt6vectorI8equationSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %69) #4
  %71 = getelementptr inbounds %struct.equation, ptr %70, i32 0, i32 3
  %72 = load x86_fp80, ptr %71, align 16, !tbaa !15
  %73 = load i32, ptr %7, align 4, !tbaa !5
  %74 = sext i32 %73 to i64
  %75 = call noundef nonnull align 16 dereferenceable(64) ptr @_ZNSt6vectorI8equationSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %74) #4
  %76 = getelementptr inbounds %struct.equation, ptr %75, i32 0, i32 0
  %77 = load x86_fp80, ptr %76, align 16, !tbaa !16
  %78 = load i32, ptr %7, align 4, !tbaa !5
  %79 = sub nsw i32 %78, 1
  %80 = sext i32 %79 to i64
  %81 = call noundef nonnull align 16 dereferenceable(64) ptr @_ZNSt6vectorI8equationSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %80) #4
  %82 = getelementptr inbounds %struct.equation, ptr %81, i32 0, i32 3
  %83 = load x86_fp80, ptr %82, align 16, !tbaa !15
  %84 = fneg x86_fp80 %77
  %85 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %84, x86_fp80 %83, x86_fp80 %72)
  %86 = load x86_fp80, ptr %8, align 16, !tbaa !17
  %87 = fmul x86_fp80 %85, %86
  %88 = load i32, ptr %7, align 4, !tbaa !5
  %89 = sext i32 %88 to i64
  %90 = call noundef nonnull align 16 dereferenceable(64) ptr @_ZNSt6vectorI8equationSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %89) #4
  %91 = getelementptr inbounds %struct.equation, ptr %90, i32 0, i32 3
  store x86_fp80 %87, ptr %91, align 16, !tbaa !15
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #4
  br label %92

92:                                               ; preds = %37
  %93 = load i32, ptr %7, align 4, !tbaa !5
  %94 = add nsw i32 %93, 1
  store i32 %94, ptr %7, align 4, !tbaa !5
  br label %32, !llvm.loop !18

95:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  %96 = load i32, ptr %5, align 4, !tbaa !5
  %97 = sub nsw i32 %96, 2
  store i32 %97, ptr %9, align 4, !tbaa !5
  br label %98

98:                                               ; preds = %125, %95
  %99 = load i32, ptr %9, align 4, !tbaa !5
  %100 = icmp sge i32 %99, 0
  br i1 %100, label %102, label %101

101:                                              ; preds = %98
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  br label %128

102:                                              ; preds = %98
  %103 = load i32, ptr %9, align 4, !tbaa !5
  %104 = sext i32 %103 to i64
  %105 = call noundef nonnull align 16 dereferenceable(64) ptr @_ZNSt6vectorI8equationSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %104) #4
  %106 = getelementptr inbounds %struct.equation, ptr %105, i32 0, i32 3
  %107 = load x86_fp80, ptr %106, align 16, !tbaa !15
  %108 = load i32, ptr %9, align 4, !tbaa !5
  %109 = sext i32 %108 to i64
  %110 = call noundef nonnull align 16 dereferenceable(64) ptr @_ZNSt6vectorI8equationSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %109) #4
  %111 = getelementptr inbounds %struct.equation, ptr %110, i32 0, i32 2
  %112 = load x86_fp80, ptr %111, align 16, !tbaa !11
  %113 = load i32, ptr %9, align 4, !tbaa !5
  %114 = add nsw i32 %113, 1
  %115 = sext i32 %114 to i64
  %116 = call noundef nonnull align 16 dereferenceable(64) ptr @_ZNSt6vectorI8equationSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %115) #4
  %117 = getelementptr inbounds %struct.equation, ptr %116, i32 0, i32 3
  %118 = load x86_fp80, ptr %117, align 16, !tbaa !15
  %119 = fneg x86_fp80 %112
  %120 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %119, x86_fp80 %118, x86_fp80 %107)
  %121 = load i32, ptr %9, align 4, !tbaa !5
  %122 = sext i32 %121 to i64
  %123 = call noundef nonnull align 16 dereferenceable(64) ptr @_ZNSt6vectorI8equationSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %122) #4
  %124 = getelementptr inbounds %struct.equation, ptr %123, i32 0, i32 3
  store x86_fp80 %120, ptr %124, align 16, !tbaa !15
  br label %125

125:                                              ; preds = %102
  %126 = load i32, ptr %9, align 4, !tbaa !5
  %127 = add nsw i32 %126, -1
  store i32 %127, ptr %9, align 4, !tbaa !5
  br label %98, !llvm.loop !20

128:                                              ; preds = %101
  store i1 false, ptr %10, align 1
  call void @_ZNSt6vectorIeSaIeEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  store i32 0, ptr %11, align 4, !tbaa !5
  br label %129

129:                                              ; preds = %140, %128
  %130 = load i32, ptr %11, align 4, !tbaa !5
  %131 = load i32, ptr %5, align 4, !tbaa !5
  %132 = icmp slt i32 %130, %131
  br i1 %132, label %134, label %133

133:                                              ; preds = %129
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  br label %147

134:                                              ; preds = %129
  %135 = load i32, ptr %11, align 4, !tbaa !5
  %136 = sext i32 %135 to i64
  %137 = call noundef nonnull align 16 dereferenceable(64) ptr @_ZNSt6vectorI8equationSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %136) #4
  %138 = getelementptr inbounds %struct.equation, ptr %137, i32 0, i32 3
  invoke void @_ZNSt6vectorIeSaIeEE9push_backERKe(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 16 dereferenceable(16) %138)
          to label %139 unwind label %143

139:                                              ; preds = %134
  br label %140

140:                                              ; preds = %139
  %141 = load i32, ptr %11, align 4, !tbaa !5
  %142 = add nsw i32 %141, 1
  store i32 %142, ptr %11, align 4, !tbaa !5
  br label %129, !llvm.loop !21

143:                                              ; preds = %134
  %144 = landingpad { ptr, i32 }
          cleanup
  %145 = extractvalue { ptr, i32 } %144, 0
  store ptr %145, ptr %12, align 8
  %146 = extractvalue { ptr, i32 } %144, 1
  store i32 %146, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  call void @_ZNSt6vectorIeSaIeEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #4
  br label %151

147:                                              ; preds = %133
  store i1 true, ptr %10, align 1
  %148 = load i1, ptr %10, align 1
  br i1 %148, label %150, label %149

149:                                              ; preds = %147
  call void @_ZNSt6vectorIeSaIeEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #4
  br label %150

150:                                              ; preds = %149, %147
  ret void

151:                                              ; preds = %143
  %152 = load ptr, ptr %12, align 8
  %153 = load i32, ptr %13, align 4
  %154 = insertvalue { ptr, i32 } poison, ptr %152, 0
  %155 = insertvalue { ptr, i32 } %154, i32 %153, 1
  resume { ptr, i32 } %155
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 16 dereferenceable(64) ptr @_ZNSt6vectorI8equationSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #1 align 2

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare x86_fp80 @llvm.fmuladd.f80(x86_fp80, x86_fp80, x86_fp80) #3

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIeSaIeEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIeSaIeEE9push_backERKe(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 16 dereferenceable(16)) #0 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIeSaIeEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #1 align 2

attributes #0 = { mustprogress 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 = { mustprogress 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 #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !13, i64 32}
!12 = !{!"_ZTS8equation", !13, i64 0, !13, i64 16, !13, i64 32, !13, i64 48}
!13 = !{!"long double", !7, i64 0}
!14 = !{!12, !13, i64 16}
!15 = !{!12, !13, i64 48}
!16 = !{!12, !13, i64 0}
!17 = !{!13, !13, i64 0}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = distinct !{!20, !19}
!21 = distinct !{!21, !19}


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

%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<long double, std::allocator<long double>>::_Vector_impl" }
%"struct.std::_Vector_base<long double, std::allocator<long double>>::_Vector_impl" = type { %"struct.std::_Vector_base<long double, std::allocator<long double>>::_Vector_impl_data" }
%"struct.std::_Vector_base<long double, std::allocator<long double>>::_Vector_impl_data" = type { ptr, ptr, ptr }

; Function Attrs: mustprogress uwtable
define dso_local void @_Z16thomas_algorithmiSt6vectorI8equationSaIS0_EE(ptr dead_on_unwind noalias writable sret(%"class.std::vector") align 8 %0, i32 noundef %1, ptr noundef nonnull %2) local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %4 = tail call noundef nonnull align 16 dereferenceable(64) ptr @_ZNSt6vectorI8equationSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef 0) #3
  %5 = getelementptr inbounds i8, ptr %4, i64 32
  %6 = load x86_fp80, ptr %5, align 16, !tbaa !5
  %7 = tail call noundef nonnull align 16 dereferenceable(64) ptr @_ZNSt6vectorI8equationSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef 0) #3
  %8 = getelementptr inbounds i8, ptr %7, i64 16
  %9 = load x86_fp80, ptr %8, align 16, !tbaa !10
  %10 = fdiv x86_fp80 %6, %9
  %11 = tail call noundef nonnull align 16 dereferenceable(64) ptr @_ZNSt6vectorI8equationSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef 0) #3
  %12 = getelementptr inbounds i8, ptr %11, i64 32
  store x86_fp80 %10, ptr %12, align 16, !tbaa !5
  %13 = tail call noundef nonnull align 16 dereferenceable(64) ptr @_ZNSt6vectorI8equationSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef 0) #3
  %14 = getelementptr inbounds i8, ptr %13, i64 48
  %15 = load x86_fp80, ptr %14, align 16, !tbaa !11
  %16 = tail call noundef nonnull align 16 dereferenceable(64) ptr @_ZNSt6vectorI8equationSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef 0) #3
  %17 = getelementptr inbounds i8, ptr %16, i64 16
  %18 = load x86_fp80, ptr %17, align 16, !tbaa !10
  %19 = fdiv x86_fp80 %15, %18
  %20 = tail call noundef nonnull align 16 dereferenceable(64) ptr @_ZNSt6vectorI8equationSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef 0) #3
  %21 = getelementptr inbounds i8, ptr %20, i64 48
  store x86_fp80 %19, ptr %21, align 16, !tbaa !11
  %22 = icmp sgt i32 %1, 1
  br i1 %22, label %.lr.ph.preheader, label %._crit_edge34

.lr.ph.preheader:                                 ; preds = %3
  %wide.trip.count = zext nneg i32 %1 to i64
  br label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph
  br i1 %22, label %.lr.ph33.preheader, label %._crit_edge34

.lr.ph33.preheader:                               ; preds = %._crit_edge
  %23 = add nsw i32 %1, -2
  %24 = zext nneg i32 %23 to i64
  br label %.lr.ph33

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph
  %indvars.iv = phi i64 [ 1, %.lr.ph.preheader ], [ %indvars.iv.next, %.lr.ph ]
  %25 = tail call noundef nonnull align 16 dereferenceable(64) ptr @_ZNSt6vectorI8equationSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %indvars.iv) #3
  %26 = getelementptr inbounds i8, ptr %25, i64 16
  %27 = load x86_fp80, ptr %26, align 16, !tbaa !10
  %28 = tail call noundef nonnull align 16 dereferenceable(64) ptr @_ZNSt6vectorI8equationSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %indvars.iv) #3
  %29 = load x86_fp80, ptr %28, align 16, !tbaa !12
  %30 = add nsw i64 %indvars.iv, -1
  %31 = tail call noundef nonnull align 16 dereferenceable(64) ptr @_ZNSt6vectorI8equationSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %30) #3
  %32 = getelementptr inbounds i8, ptr %31, i64 32
  %33 = load x86_fp80, ptr %32, align 16, !tbaa !5
  %34 = fneg x86_fp80 %29
  %35 = tail call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %34, x86_fp80 %33, x86_fp80 %27)
  %36 = fdiv x86_fp80 0xK3FFF8000000000000000, %35
  %37 = tail call noundef nonnull align 16 dereferenceable(64) ptr @_ZNSt6vectorI8equationSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %indvars.iv) #3
  %38 = getelementptr inbounds i8, ptr %37, i64 32
  %39 = load x86_fp80, ptr %38, align 16, !tbaa !5
  %40 = fmul x86_fp80 %39, %36
  %41 = tail call noundef nonnull align 16 dereferenceable(64) ptr @_ZNSt6vectorI8equationSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %indvars.iv) #3
  %42 = getelementptr inbounds i8, ptr %41, i64 32
  store x86_fp80 %40, ptr %42, align 16, !tbaa !5
  %43 = tail call noundef nonnull align 16 dereferenceable(64) ptr @_ZNSt6vectorI8equationSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %indvars.iv) #3
  %44 = getelementptr inbounds i8, ptr %43, i64 48
  %45 = load x86_fp80, ptr %44, align 16, !tbaa !11
  %46 = tail call noundef nonnull align 16 dereferenceable(64) ptr @_ZNSt6vectorI8equationSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %indvars.iv) #3
  %47 = load x86_fp80, ptr %46, align 16, !tbaa !12
  %48 = tail call noundef nonnull align 16 dereferenceable(64) ptr @_ZNSt6vectorI8equationSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %30) #3
  %49 = getelementptr inbounds i8, ptr %48, i64 48
  %50 = load x86_fp80, ptr %49, align 16, !tbaa !11
  %51 = fneg x86_fp80 %47
  %52 = tail call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %51, x86_fp80 %50, x86_fp80 %45)
  %53 = fmul x86_fp80 %36, %52
  %54 = tail call noundef nonnull align 16 dereferenceable(64) ptr @_ZNSt6vectorI8equationSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %indvars.iv) #3
  %55 = getelementptr inbounds i8, ptr %54, i64 48
  store x86_fp80 %53, ptr %55, align 16, !tbaa !11
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !13

._crit_edge34:                                    ; preds = %.lr.ph33, %3, %._crit_edge
  tail call void @_ZNSt6vectorIeSaIeEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #3
  %56 = icmp sgt i32 %1, 0
  br i1 %56, label %.lr.ph37.preheader, label %._crit_edge38

.lr.ph37.preheader:                               ; preds = %._crit_edge34
  %wide.trip.count46 = zext nneg i32 %1 to i64
  br label %.lr.ph37

.lr.ph33:                                         ; preds = %.lr.ph33.preheader, %.lr.ph33
  %indvars.iv40 = phi i64 [ %24, %.lr.ph33.preheader ], [ %indvars.iv.next41, %.lr.ph33 ]
  %57 = tail call noundef nonnull align 16 dereferenceable(64) ptr @_ZNSt6vectorI8equationSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %indvars.iv40) #3
  %58 = getelementptr inbounds i8, ptr %57, i64 48
  %59 = load x86_fp80, ptr %58, align 16, !tbaa !11
  %60 = tail call noundef nonnull align 16 dereferenceable(64) ptr @_ZNSt6vectorI8equationSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %indvars.iv40) #3
  %61 = getelementptr inbounds i8, ptr %60, i64 32
  %62 = load x86_fp80, ptr %61, align 16, !tbaa !5
  %63 = add nuw nsw i64 %indvars.iv40, 1
  %64 = tail call noundef nonnull align 16 dereferenceable(64) ptr @_ZNSt6vectorI8equationSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %63) #3
  %65 = getelementptr inbounds i8, ptr %64, i64 48
  %66 = load x86_fp80, ptr %65, align 16, !tbaa !11
  %67 = fneg x86_fp80 %62
  %68 = tail call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %67, x86_fp80 %66, x86_fp80 %59)
  %69 = tail call noundef nonnull align 16 dereferenceable(64) ptr @_ZNSt6vectorI8equationSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %indvars.iv40) #3
  %70 = getelementptr inbounds i8, ptr %69, i64 48
  store x86_fp80 %68, ptr %70, align 16, !tbaa !11
  %indvars.iv.next41 = add nsw i64 %indvars.iv40, -1
  %.not = icmp eq i64 %indvars.iv40, 0
  br i1 %.not, label %._crit_edge34, label %.lr.ph33, !llvm.loop !15

.lr.ph37:                                         ; preds = %.lr.ph37.preheader, %73
  %indvars.iv43 = phi i64 [ 0, %.lr.ph37.preheader ], [ %indvars.iv.next44, %73 ]
  %71 = tail call noundef nonnull align 16 dereferenceable(64) ptr @_ZNSt6vectorI8equationSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %indvars.iv43) #3
  %72 = getelementptr inbounds i8, ptr %71, i64 48
  invoke void @_ZNSt6vectorIeSaIeEE9push_backERKe(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 16 dereferenceable(16) %72)
          to label %73 unwind label %74

73:                                               ; preds = %.lr.ph37
  %indvars.iv.next44 = add nuw nsw i64 %indvars.iv43, 1
  %exitcond47.not = icmp eq i64 %indvars.iv.next44, %wide.trip.count46
  br i1 %exitcond47.not, label %._crit_edge38, label %.lr.ph37, !llvm.loop !16

74:                                               ; preds = %.lr.ph37
  %75 = landingpad { ptr, i32 }
          cleanup
  tail call void @_ZNSt6vectorIeSaIeEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #3
  resume { ptr, i32 } %75

._crit_edge38:                                    ; preds = %73, %._crit_edge34
  ret void
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 16 dereferenceable(64) ptr @_ZNSt6vectorI8equationSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare x86_fp80 @llvm.fmuladd.f80(x86_fp80, x86_fp80, x86_fp80) #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIeSaIeEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIeSaIeEE9push_backERKe(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 16 dereferenceable(16)) local_unnamed_addr #0 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIeSaIeEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #1 align 2

attributes #0 = { mustprogress 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 = { mustprogress 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 #2 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #3 = { 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, !7, i64 32}
!6 = !{!"_ZTS8equation", !7, i64 0, !7, i64 16, !7, i64 32, !7, i64 48}
!7 = !{!"long double", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!6, !7, i64 16}
!11 = !{!6, !7, i64 48}
!12 = !{!6, !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}
!16 = distinct !{!16, !14}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass