; LLVM IR from romerojosh/zefr :: src/prisms.ll (ZN6Prisms12calc_d_shapeER8mdvectorIdEPKd)

; 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<double, std::allocator<double>>::_Vector_impl" }
%"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl" = type { %"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl_data" }
%"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.7" = type { %"struct.std::_Vector_base.8" }
%"struct.std::_Vector_base.8" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%class.mdvector = type <{ i32, [4 x i8], i64, i64, %"struct.std::array", %"struct.std::array", %"class.std::vector", ptr, i8, [7 x i8] }>
%"struct.std::array" = type { [6 x i32] }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::initializer_list" = type { ptr, i64 }
%"class.std::allocator.2" = type { i8 }
%class.Elements = type { ptr, ptr, ptr, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, [4 x i8], %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %"class.std::vector.0", %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector.5, %class.mdvector.5, %class.mdvector.5, %class.mdvector.5, %class.mdvector.5, %"class.std::vector", %"class.std::vector", %"class.std::vector", %"class.std::vector", %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, i32, %"class.std::vector", %"class.std::vector", %"class.std::vector", %"class.std::vector", %"class.std::vector", %"class.std::vector", %"class.std::vector", %"class.std::vector.7", %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, i64, i64, i64, i64, i64, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdview, %class.mdview, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, %class.mdvector, i32, [4 x i8], %class.mdvector, %class.mdvector, i32, ptr, %"class.std::vector.7", %class.mdvector.5, %class.mdvector, %class.mdvector, %class.mdvector }
%class.mdview = type { %class.mdvector.12, %class.mdvector.5, i32, [4 x i8] }
%class.mdvector.12 = type <{ i32, [4 x i8], i64, i64, %"struct.std::array", %"struct.std::array", %"class.std::vector.13", ptr, i8, [7 x i8] }>
%"class.std::vector.13" = type { %"struct.std::_Vector_base.14" }
%"struct.std::_Vector_base.14" = type { %"struct.std::_Vector_base<double *, std::allocator<double *>>::_Vector_impl" }
%"struct.std::_Vector_base<double *, std::allocator<double *>>::_Vector_impl" = type { %"struct.std::_Vector_base<double *, std::allocator<double *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<double *, std::allocator<double *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%class.mdvector.5 = type <{ i32, [4 x i8], i64, i64, %"struct.std::array", %"struct.std::array", %"class.std::vector.0", ptr, i8, [7 x i8] }>

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN8mdvectorIdEclEjj(ptr noundef nonnull align 8 dereferenceable(105), i32 noundef, i32 noundef) #1 align 2

declare void @_Z9Shape_ptsj(ptr dead_on_unwind writable sret(%"class.std::vector") align 8, i32 noundef) #3

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

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

declare noundef double @_Z9Dubiner2Djddj(i32 noundef, double noundef, double noundef, i32 noundef) #3

declare noundef double @_Z8Legendrejd(i32 noundef, double noundef) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNK8mdvectorIdE7inverseERS0_(ptr noundef nonnull align 8 dereferenceable(105), ptr noundef nonnull align 8 dereferenceable(105)) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN8mdvectorIdEC2ESt6vectorIjSaIjEEdb(ptr noundef nonnull align 8 dereferenceable(105), ptr noundef, double noundef, i1 noundef zeroext) unnamed_addr #2 align 2

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

declare noundef double @_Z10dDubiner2Djdddj(i32 noundef, double noundef, double noundef, double noundef, i32 noundef) #3

declare noundef double @_Z11Legendre_d1jd(i32 noundef, double noundef) #3

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

declare void @_Z22structured_to_gmsh_prij(ptr dead_on_unwind writable sret(%"class.std::vector.7") align 8, i32 noundef) #3

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6Prisms12calc_d_shapeER8mdvectorIdEPKd(ptr noundef nonnull align 8 dereferenceable(14544) %0, ptr noundef nonnull align 8 dereferenceable(105) %1, ptr noundef %2) unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca %"class.std::vector.7", align 8
  %9 = alloca %"class.std::vector", align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca %class.mdvector, align 8
  %13 = alloca %"class.std::vector.0", align 8
  %14 = alloca %"class.std::initializer_list", align 8
  %15 = alloca [2 x i32], align 4
  %16 = alloca %"class.std::allocator.2", align 1
  %17 = alloca ptr, align 8
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca %class.mdvector, align 8
  %25 = alloca %"class.std::vector.0", align 8
  %26 = alloca %"class.std::initializer_list", align 8
  %27 = alloca [2 x i32], align 4
  %28 = alloca %"class.std::allocator.2", align 1
  %29 = alloca i32, align 4
  %30 = alloca i32, align 4
  %31 = alloca i32, align 4
  %32 = alloca i32, align 4
  %33 = alloca %class.mdvector, align 8
  %34 = alloca %"class.std::vector.0", align 8
  %35 = alloca %"class.std::initializer_list", align 8
  %36 = alloca [2 x i32], align 4
  %37 = alloca %"class.std::allocator.2", align 1
  %38 = alloca i32, align 4
  %39 = alloca i32, align 4
  %40 = alloca double, align 8
  %41 = alloca i32, align 4
  %42 = alloca i32, align 4
  %43 = alloca i32, align 4
  %44 = alloca double, align 8
  %45 = alloca i32, align 4
  %46 = alloca i32, align 4
  %47 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  %48 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  %49 = getelementptr inbounds %class.Elements, ptr %48, i32 0, i32 88
  %50 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %49) #6
  %51 = getelementptr inbounds %class.Elements, ptr %48, i32 0, i32 19
  %52 = load i32, ptr %51, align 8, !tbaa !9
  %53 = zext i32 %52 to i64
  %54 = icmp ne i64 %50, %53
  br i1 %54, label %55, label %60

55:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 24, ptr %8) #6
  %56 = getelementptr inbounds %class.Elements, ptr %48, i32 0, i32 19
  %57 = load i32, ptr %56, align 8, !tbaa !9
  call void @_Z22structured_to_gmsh_prij(ptr dead_on_unwind writable sret(%"class.std::vector.7") align 8 %8, i32 noundef %57)
  %58 = getelementptr inbounds %class.Elements, ptr %48, i32 0, i32 88
  %59 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIiSaIiEEaSEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %58, ptr noundef nonnull align 8 dereferenceable(24) %8) #6
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #6
  br label %60

60:                                               ; preds = %55, %3
  %61 = getelementptr inbounds %class.Elements, ptr %48, i32 0, i32 19
  %62 = load i32, ptr %61, align 8, !tbaa !9
  switch i32 %62, label %66 [
    i32 6, label %63
    i32 18, label %64
    i32 40, label %65
  ]

63:                                               ; preds = %60
  store i32 1, ptr %7, align 4, !tbaa !36
  br label %66

64:                                               ; preds = %60
  store i32 2, ptr %7, align 4, !tbaa !36
  br label %66

65:                                               ; preds = %60
  store i32 3, ptr %7, align 4, !tbaa !36
  br label %66

66:                                               ; preds = %65, %64, %63, %60
  call void @llvm.lifetime.start.p0(i64 24, ptr %9) #6
  %67 = load i32, ptr %7, align 4, !tbaa !36
  call void @_Z9Shape_ptsj(ptr dead_on_unwind writable sret(%"class.std::vector") align 8 %9, i32 noundef %67)
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  %68 = call noundef i64 @_ZNKSt6vectorIdSaIdEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #6
  %69 = trunc i64 %68 to i32
  store i32 %69, ptr %10, align 4, !tbaa !36
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  %70 = getelementptr inbounds %class.Elements, ptr %48, i32 0, i32 19
  %71 = load i32, ptr %70, align 8, !tbaa !9
  %72 = load i32, ptr %10, align 4, !tbaa !36
  %73 = udiv i32 %71, %72
  store i32 %73, ptr %11, align 4, !tbaa !36
  call void @llvm.lifetime.start.p0(i64 112, ptr %12) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  %74 = getelementptr inbounds %class.Elements, ptr %48, i32 0, i32 19
  %75 = load i32, ptr %74, align 8, !tbaa !9
  store i32 %75, ptr %15, align 4, !tbaa !36
  %76 = getelementptr inbounds i32, ptr %15, i64 1
  %77 = getelementptr inbounds %class.Elements, ptr %48, i32 0, i32 10
  %78 = load i32, ptr %77, align 4, !tbaa !37
  store i32 %78, ptr %76, align 4, !tbaa !36
  %79 = getelementptr inbounds %"class.std::initializer_list", ptr %14, i32 0, i32 0
  store ptr %15, ptr %79, align 8, !tbaa !38
  %80 = getelementptr inbounds %"class.std::initializer_list", ptr %14, i32 0, i32 1
  store i64 2, ptr %80, align 8, !tbaa !40
  call void @llvm.lifetime.start.p0(i64 1, ptr %16) #6
  call void @_ZNSaIjEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #6
  %81 = getelementptr inbounds { ptr, i64 }, ptr %14, i32 0, i32 0
  %82 = load ptr, ptr %81, align 8
  %83 = getelementptr inbounds { ptr, i64 }, ptr %14, i32 0, i32 1
  %84 = load i64, ptr %83, align 8
  invoke void @_ZNSt6vectorIjSaIjEEC2ESt16initializer_listIjERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %13, ptr %82, i64 %84, ptr noundef nonnull align 1 dereferenceable(1) %16)
          to label %85 unwind label %92

85:                                               ; preds = %66
  invoke void @_ZN8mdvectorIdEC2ESt6vectorIjSaIjEEdb(ptr noundef nonnull align 8 dereferenceable(105) %12, ptr noundef %13, double noundef 0.000000e+00, i1 noundef zeroext false)
          to label %86 unwind label %96

86:                                               ; preds = %85
  call void @_ZNSt6vectorIjSaIjEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #6
  call void @_ZNSt15__new_allocatorIjED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #6
  store i32 0, ptr %19, align 4, !tbaa !36
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #6
  store i32 0, ptr %20, align 4, !tbaa !36
  br label %87

87:                                               ; preds = %151, %86
  %88 = load i32, ptr %20, align 4, !tbaa !36
  %89 = load i32, ptr %10, align 4, !tbaa !36
  %90 = icmp slt i32 %88, %89
  br i1 %90, label %101, label %91

91:                                               ; preds = %87
  store i32 3, ptr %21, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #6
  br label %154

92:                                               ; preds = %66
  %93 = landingpad { ptr, i32 }
          cleanup
  %94 = extractvalue { ptr, i32 } %93, 0
  store ptr %94, ptr %17, align 8
  %95 = extractvalue { ptr, i32 } %93, 1
  store i32 %95, ptr %18, align 4
  br label %100

96:                                               ; preds = %85
  %97 = landingpad { ptr, i32 }
          cleanup
  %98 = extractvalue { ptr, i32 } %97, 0
  store ptr %98, ptr %17, align 8
  %99 = extractvalue { ptr, i32 } %97, 1
  store i32 %99, ptr %18, align 4
  call void @_ZNSt6vectorIjSaIjEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #6
  br label %100

100:                                              ; preds = %96, %92
  call void @_ZNSt15__new_allocatorIjED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  br label %422

101:                                              ; preds = %87
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #6
  store i32 0, ptr %22, align 4, !tbaa !36
  br label %102

102:                                              ; preds = %147, %101
  %103 = load i32, ptr %22, align 4, !tbaa !36
  %104 = load i32, ptr %10, align 4, !tbaa !36
  %105 = icmp slt i32 %103, %104
  br i1 %105, label %107, label %106

106:                                              ; preds = %102
  store i32 6, ptr %21, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #6
  br label %150

107:                                              ; preds = %102
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #6
  store i32 0, ptr %23, align 4, !tbaa !36
  br label %108

108:                                              ; preds = %139, %107
  %109 = load i32, ptr %23, align 4, !tbaa !36
  %110 = load i32, ptr %10, align 4, !tbaa !36
  %111 = load i32, ptr %22, align 4, !tbaa !36
  %112 = sub nsw i32 %110, %111
  %113 = icmp slt i32 %109, %112
  br i1 %113, label %115, label %114

114:                                              ; preds = %108
  store i32 9, ptr %21, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #6
  br label %146

115:                                              ; preds = %108
  %116 = load i32, ptr %23, align 4, !tbaa !36
  %117 = sext i32 %116 to i64
  %118 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %117) #6
  %119 = load double, ptr %118, align 8, !tbaa !41
  %120 = load i32, ptr %19, align 4, !tbaa !36
  %121 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN8mdvectorIdEclEjj(ptr noundef nonnull align 8 dereferenceable(105) %12, i32 noundef %120, i32 noundef 0)
          to label %122 unwind label %142

122:                                              ; preds = %115
  store double %119, ptr %121, align 8, !tbaa !41
  %123 = load i32, ptr %22, align 4, !tbaa !36
  %124 = sext i32 %123 to i64
  %125 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %124) #6
  %126 = load double, ptr %125, align 8, !tbaa !41
  %127 = load i32, ptr %19, align 4, !tbaa !36
  %128 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN8mdvectorIdEclEjj(ptr noundef nonnull align 8 dereferenceable(105) %12, i32 noundef %127, i32 noundef 1)
          to label %129 unwind label %142

129:                                              ; preds = %122
  store double %126, ptr %128, align 8, !tbaa !41
  %130 = load i32, ptr %20, align 4, !tbaa !36
  %131 = sext i32 %130 to i64
  %132 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %131) #6
  %133 = load double, ptr %132, align 8, !tbaa !41
  %134 = load i32, ptr %19, align 4, !tbaa !36
  %135 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN8mdvectorIdEclEjj(ptr noundef nonnull align 8 dereferenceable(105) %12, i32 noundef %134, i32 noundef 2)
          to label %136 unwind label %142

136:                                              ; preds = %129
  store double %133, ptr %135, align 8, !tbaa !41
  %137 = load i32, ptr %19, align 4, !tbaa !36
  %138 = add nsw i32 %137, 1
  store i32 %138, ptr %19, align 4, !tbaa !36
  br label %139

139:                                              ; preds = %136
  %140 = load i32, ptr %23, align 4, !tbaa !36
  %141 = add nsw i32 %140, 1
  store i32 %141, ptr %23, align 4, !tbaa !36
  br label %108, !llvm.loop !43

142:                                              ; preds = %129, %122, %115
  %143 = landingpad { ptr, i32 }
          cleanup
  %144 = extractvalue { ptr, i32 } %143, 0
  store ptr %144, ptr %17, align 8
  %145 = extractvalue { ptr, i32 } %143, 1
  store i32 %145, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #6
  br label %421

146:                                              ; preds = %114
  br label %147

147:                                              ; preds = %146
  %148 = load i32, ptr %22, align 4, !tbaa !36
  %149 = add nsw i32 %148, 1
  store i32 %149, ptr %22, align 4, !tbaa !36
  br label %102, !llvm.loop !45

150:                                              ; preds = %106
  br label %151

151:                                              ; preds = %150
  %152 = load i32, ptr %20, align 4, !tbaa !36
  %153 = add nsw i32 %152, 1
  store i32 %153, ptr %20, align 4, !tbaa !36
  br label %87, !llvm.loop !46

154:                                              ; preds = %91
  call void @llvm.lifetime.start.p0(i64 112, ptr %24) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #6
  %155 = getelementptr inbounds %class.Elements, ptr %48, i32 0, i32 19
  %156 = load i32, ptr %155, align 8, !tbaa !9
  store i32 %156, ptr %27, align 4, !tbaa !36
  %157 = getelementptr inbounds i32, ptr %27, i64 1
  %158 = getelementptr inbounds %class.Elements, ptr %48, i32 0, i32 19
  %159 = load i32, ptr %158, align 8, !tbaa !9
  store i32 %159, ptr %157, align 4, !tbaa !36
  %160 = getelementptr inbounds %"class.std::initializer_list", ptr %26, i32 0, i32 0
  store ptr %27, ptr %160, align 8, !tbaa !38
  %161 = getelementptr inbounds %"class.std::initializer_list", ptr %26, i32 0, i32 1
  store i64 2, ptr %161, align 8, !tbaa !40
  call void @llvm.lifetime.start.p0(i64 1, ptr %28) #6
  call void @_ZNSaIjEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %28) #6
  %162 = getelementptr inbounds { ptr, i64 }, ptr %26, i32 0, i32 0
  %163 = load ptr, ptr %162, align 8
  %164 = getelementptr inbounds { ptr, i64 }, ptr %26, i32 0, i32 1
  %165 = load i64, ptr %164, align 8
  invoke void @_ZNSt6vectorIjSaIjEEC2ESt16initializer_listIjERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %25, ptr %163, i64 %165, ptr noundef nonnull align 1 dereferenceable(1) %28)
          to label %166 unwind label %174

166:                                              ; preds = %154
  invoke void @_ZN8mdvectorIdEC2ESt6vectorIjSaIjEEdb(ptr noundef nonnull align 8 dereferenceable(105) %24, ptr noundef %25, double noundef 0.000000e+00, i1 noundef zeroext false)
          to label %167 unwind label %178

167:                                              ; preds = %166
  call void @_ZNSt6vectorIjSaIjEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %25) #6
  call void @_ZNSt15__new_allocatorIjED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %28) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %28) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #6
  store i32 0, ptr %29, align 4, !tbaa !36
  br label %168

168:                                              ; preds = %234, %167
  %169 = load i32, ptr %29, align 4, !tbaa !36
  %170 = getelementptr inbounds %class.Elements, ptr %48, i32 0, i32 19
  %171 = load i32, ptr %170, align 8, !tbaa !9
  %172 = icmp ult i32 %169, %171
  br i1 %172, label %183, label %173

173:                                              ; preds = %168
  store i32 12, ptr %21, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #6
  br label %237

174:                                              ; preds = %154
  %175 = landingpad { ptr, i32 }
          cleanup
  %176 = extractvalue { ptr, i32 } %175, 0
  store ptr %176, ptr %17, align 8
  %177 = extractvalue { ptr, i32 } %175, 1
  store i32 %177, ptr %18, align 4
  br label %182

178:                                              ; preds = %166
  %179 = landingpad { ptr, i32 }
          cleanup
  %180 = extractvalue { ptr, i32 } %179, 0
  store ptr %180, ptr %17, align 8
  %181 = extractvalue { ptr, i32 } %179, 1
  store i32 %181, ptr %18, align 4
  call void @_ZNSt6vectorIjSaIjEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %25) #6
  br label %182

182:                                              ; preds = %178, %174
  call void @_ZNSt15__new_allocatorIjED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %28) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %28) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #6
  br label %420

183:                                              ; preds = %168
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #6
  store i32 0, ptr %30, align 4, !tbaa !36
  br label %184

184:                                              ; preds = %226, %183
  %185 = load i32, ptr %30, align 4, !tbaa !36
  %186 = getelementptr inbounds %class.Elements, ptr %48, i32 0, i32 19
  %187 = load i32, ptr %186, align 8, !tbaa !9
  %188 = icmp ult i32 %185, %187
  br i1 %188, label %190, label %189

189:                                              ; preds = %184
  store i32 15, ptr %21, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #6
  br label %233

190:                                              ; preds = %184
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #6
  %191 = load i32, ptr %30, align 4, !tbaa !36
  %192 = load i32, ptr %11, align 4, !tbaa !36
  %193 = udiv i32 %191, %192
  store i32 %193, ptr %31, align 4, !tbaa !36
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #6
  %194 = load i32, ptr %30, align 4, !tbaa !36
  %195 = load i32, ptr %11, align 4, !tbaa !36
  %196 = urem i32 %194, %195
  store i32 %196, ptr %32, align 4, !tbaa !36
  %197 = load i32, ptr %7, align 4, !tbaa !36
  %198 = load i32, ptr %29, align 4, !tbaa !36
  %199 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN8mdvectorIdEclEjj(ptr noundef nonnull align 8 dereferenceable(105) %12, i32 noundef %198, i32 noundef 0)
          to label %200 unwind label %229

200:                                              ; preds = %190
  %201 = load double, ptr %199, align 8, !tbaa !41
  %202 = load i32, ptr %29, align 4, !tbaa !36
  %203 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN8mdvectorIdEclEjj(ptr noundef nonnull align 8 dereferenceable(105) %12, i32 noundef %202, i32 noundef 1)
          to label %204 unwind label %229

204:                                              ; preds = %200
  %205 = load double, ptr %203, align 8, !tbaa !41
  %206 = load i32, ptr %32, align 4, !tbaa !36
  %207 = invoke noundef double @_Z9Dubiner2Djddj(i32 noundef %197, double noundef %201, double noundef %205, i32 noundef %206)
          to label %208 unwind label %229

208:                                              ; preds = %204
  %209 = load i32, ptr %31, align 4, !tbaa !36
  %210 = load i32, ptr %29, align 4, !tbaa !36
  %211 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN8mdvectorIdEclEjj(ptr noundef nonnull align 8 dereferenceable(105) %12, i32 noundef %210, i32 noundef 2)
          to label %212 unwind label %229

212:                                              ; preds = %208
  %213 = load double, ptr %211, align 8, !tbaa !41
  %214 = invoke noundef double @_Z8Legendrejd(i32 noundef %209, double noundef %213)
          to label %215 unwind label %229

215:                                              ; preds = %212
  %216 = fmul double %207, %214
  %217 = load i32, ptr %31, align 4, !tbaa !36
  %218 = sitofp i32 %217 to double
  %219 = fadd double %218, 5.000000e-01
  %220 = call double @sqrt(double noundef %219) #6
  %221 = fmul double %216, %220
  %222 = load i32, ptr %29, align 4, !tbaa !36
  %223 = load i32, ptr %30, align 4, !tbaa !36
  %224 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN8mdvectorIdEclEjj(ptr noundef nonnull align 8 dereferenceable(105) %24, i32 noundef %222, i32 noundef %223)
          to label %225 unwind label %229

225:                                              ; preds = %215
  store double %221, ptr %224, align 8, !tbaa !41
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #6
  br label %226

226:                                              ; preds = %225
  %227 = load i32, ptr %30, align 4, !tbaa !36
  %228 = add i32 %227, 1
  store i32 %228, ptr %30, align 4, !tbaa !36
  br label %184, !llvm.loop !47

229:                                              ; preds = %215, %212, %208, %204, %200, %190
  %230 = landingpad { ptr, i32 }
          cleanup
  %231 = extractvalue { ptr, i32 } %230, 0
  store ptr %231, ptr %17, align 8
  %232 = extractvalue { ptr, i32 } %230, 1
  store i32 %232, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #6
  br label %419

233:                                              ; preds = %189
  br label %234

234:                                              ; preds = %233
  %235 = load i32, ptr %29, align 4, !tbaa !36
  %236 = add i32 %235, 1
  store i32 %236, ptr %29, align 4, !tbaa !36
  br label %168, !llvm.loop !48

237:                                              ; preds = %173
  call void @llvm.lifetime.start.p0(i64 112, ptr %33) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %36) #6
  %238 = getelementptr inbounds %class.Elements, ptr %48, i32 0, i32 19
  %239 = load i32, ptr %238, align 8, !tbaa !9
  store i32 %239, ptr %36, align 4, !tbaa !36
  %240 = getelementptr inbounds i32, ptr %36, i64 1
  %241 = getelementptr inbounds %class.Elements, ptr %48, i32 0, i32 19
  %242 = load i32, ptr %241, align 8, !tbaa !9
  store i32 %242, ptr %240, align 4, !tbaa !36
  %243 = getelementptr inbounds %"class.std::initializer_list", ptr %35, i32 0, i32 0
  store ptr %36, ptr %243, align 8, !tbaa !38
  %244 = getelementptr inbounds %"class.std::initializer_list", ptr %35, i32 0, i32 1
  store i64 2, ptr %244, align 8, !tbaa !40
  call void @llvm.lifetime.start.p0(i64 1, ptr %37) #6
  call void @_ZNSaIjEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %37) #6
  %245 = getelementptr inbounds { ptr, i64 }, ptr %35, i32 0, i32 0
  %246 = load ptr, ptr %245, align 8
  %247 = getelementptr inbounds { ptr, i64 }, ptr %35, i32 0, i32 1
  %248 = load i64, ptr %247, align 8
  invoke void @_ZNSt6vectorIjSaIjEEC2ESt16initializer_listIjERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %34, ptr %246, i64 %248, ptr noundef nonnull align 1 dereferenceable(1) %37)
          to label %249 unwind label %258

249:                                              ; preds = %237
  invoke void @_ZN8mdvectorIdEC2ESt6vectorIjSaIjEEdb(ptr noundef nonnull align 8 dereferenceable(105) %33, ptr noundef %34, double noundef 0.000000e+00, i1 noundef zeroext false)
          to label %250 unwind label %262

250:                                              ; preds = %249
  call void @_ZNSt6vectorIjSaIjEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %34) #6
  call void @_ZNSt15__new_allocatorIjED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %37) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %37) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #6
  invoke void @_ZNK8mdvectorIdE7inverseERS0_(ptr noundef nonnull align 8 dereferenceable(105) %24, ptr noundef nonnull align 8 dereferenceable(105) %33)
          to label %251 unwind label %267

251:                                              ; preds = %250
  call void @llvm.lifetime.start.p0(i64 4, ptr %38) #6
  store i32 0, ptr %38, align 4, !tbaa !36
  br label %252

252:                                              ; preds = %407, %251
  %253 = load i32, ptr %38, align 4, !tbaa !36
  %254 = getelementptr inbounds %class.Elements, ptr %48, i32 0, i32 19
  %255 = load i32, ptr %254, align 8, !tbaa !9
  %256 = icmp ult i32 %253, %255
  br i1 %256, label %271, label %257

257:                                              ; preds = %252
  store i32 18, ptr %21, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %38) #6
  br label %416

258:                                              ; preds = %237
  %259 = landingpad { ptr, i32 }
          cleanup
  %260 = extractvalue { ptr, i32 } %259, 0
  store ptr %260, ptr %17, align 8
  %261 = extractvalue { ptr, i32 } %259, 1
  store i32 %261, ptr %18, align 4
  br label %266

262:                                              ; preds = %249
  %263 = landingpad { ptr, i32 }
          cleanup
  %264 = extractvalue { ptr, i32 } %263, 0
  store ptr %264, ptr %17, align 8
  %265 = extractvalue { ptr, i32 } %263, 1
  store i32 %265, ptr %18, align 4
  call void @_ZNSt6vectorIjSaIjEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %34) #6
  br label %266

266:                                              ; preds = %262, %258
  call void @_ZNSt15__new_allocatorIjED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %37) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %37) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #6
  br label %418

267:                                              ; preds = %250
  %268 = landingpad { ptr, i32 }
          cleanup
  %269 = extractvalue { ptr, i32 } %268, 0
  store ptr %269, ptr %17, align 8
  %270 = extractvalue { ptr, i32 } %268, 1
  store i32 %270, ptr %18, align 4
  br label %417

271:                                              ; preds = %252
  call void @llvm.lifetime.start.p0(i64 4, ptr %39) #6
  store i32 0, ptr %39, align 4, !tbaa !36
  br label %272

272:                                              ; preds = %339, %271
  %273 = load i32, ptr %39, align 4, !tbaa !36
  %274 = icmp ult i32 %273, 2
  br i1 %274, label %276, label %275

275:                                              ; preds = %272
  store i32 21, ptr %21, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %39) #6
  br label %347

276:                                              ; preds = %272
  call void @llvm.lifetime.start.p0(i64 8, ptr %40) #6
  store double 0.000000e+00, ptr %40, align 8, !tbaa !41
  call void @llvm.lifetime.start.p0(i64 4, ptr %41) #6
  store i32 0, ptr %41, align 4, !tbaa !36
  br label %277

277:                                              ; preds = %321, %276
  %278 = load i32, ptr %41, align 4, !tbaa !36
  %279 = getelementptr inbounds %class.Elements, ptr %48, i32 0, i32 19
  %280 = load i32, ptr %279, align 8, !tbaa !9
  %281 = icmp ult i32 %278, %280
  br i1 %281, label %283, label %282

282:                                              ; preds = %277
  store i32 24, ptr %21, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %41) #6
  br label %328

283:                                              ; preds = %277
  call void @llvm.lifetime.start.p0(i64 4, ptr %42) #6
  %284 = load i32, ptr %41, align 4, !tbaa !36
  %285 = load i32, ptr %11, align 4, !tbaa !36
  %286 = udiv i32 %284, %285
  store i32 %286, ptr %42, align 4, !tbaa !36
  call void @llvm.lifetime.start.p0(i64 4, ptr %43) #6
  %287 = load i32, ptr %41, align 4, !tbaa !36
  %288 = load i32, ptr %11, align 4, !tbaa !36
  %289 = urem i32 %287, %288
  store i32 %289, ptr %43, align 4, !tbaa !36
  %290 = load i32, ptr %41, align 4, !tbaa !36
  %291 = load i32, ptr %38, align 4, !tbaa !36
  %292 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN8mdvectorIdEclEjj(ptr noundef nonnull align 8 dereferenceable(105) %33, i32 noundef %290, i32 noundef %291)
          to label %293 unwind label %324

293:                                              ; preds = %283
  %294 = load double, ptr %292, align 8, !tbaa !41
  %295 = load i32, ptr %7, align 4, !tbaa !36
  %296 = load ptr, ptr %6, align 8, !tbaa !5
  %297 = getelementptr inbounds double, ptr %296, i64 0
  %298 = load double, ptr %297, align 8, !tbaa !41
  %299 = load ptr, ptr %6, align 8, !tbaa !5
  %300 = getelementptr inbounds double, ptr %299, i64 1
  %301 = load double, ptr %300, align 8, !tbaa !41
  %302 = load i32, ptr %39, align 4, !tbaa !36
  %303 = uitofp i32 %302 to double
  %304 = load i32, ptr %43, align 4, !tbaa !36
  %305 = invoke noundef double @_Z10dDubiner2Djdddj(i32 noundef %295, double noundef %298, double noundef %301, double noundef %303, i32 noundef %304)
          to label %306 unwind label %324

306:                                              ; preds = %293
  %307 = fmul double %294, %305
  %308 = load i32, ptr %42, align 4, !tbaa !36
  %309 = load ptr, ptr %6, align 8, !tbaa !5
  %310 = getelementptr inbounds double, ptr %309, i64 2
  %311 = load double, ptr %310, align 8, !tbaa !41
  %312 = invoke noundef double @_Z8Legendrejd(i32 noundef %308, double noundef %311)
          to label %313 unwind label %324

313:                                              ; preds = %306
  %314 = fmul double %307, %312
  %315 = load i32, ptr %42, align 4, !tbaa !36
  %316 = sitofp i32 %315 to double
  %317 = fadd double %316, 5.000000e-01
  %318 = call double @sqrt(double noundef %317) #6
  %319 = load double, ptr %40, align 8, !tbaa !41
  %320 = call double @llvm.fmuladd.f64(double %314, double %318, double %319)
  store double %320, ptr %40, align 8, !tbaa !41
  call void @llvm.lifetime.end.p0(i64 4, ptr %43) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %42) #6
  br label %321

321:                                              ; preds = %313
  %322 = load i32, ptr %41, align 4, !tbaa !36
  %323 = add i32 %322, 1
  store i32 %323, ptr %41, align 4, !tbaa !36
  br label %277, !llvm.loop !49

324:                                              ; preds = %306, %293, %283
  %325 = landingpad { ptr, i32 }
          cleanup
  %326 = extractvalue { ptr, i32 } %325, 0
  store ptr %326, ptr %17, align 8
  %327 = extractvalue { ptr, i32 } %325, 1
  store i32 %327, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %43) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %42) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %41) #6
  br label %346

328:                                              ; preds = %282
  %329 = load double, ptr %40, align 8, !tbaa !41
  %330 = load ptr, ptr %5, align 8, !tbaa !5
  %331 = getelementptr inbounds %class.Elements, ptr %48, i32 0, i32 88
  %332 = load i32, ptr %38, align 4, !tbaa !36
  %333 = zext i32 %332 to i64
  %334 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %331, i64 noundef %333) #6
  %335 = load i32, ptr %334, align 4, !tbaa !36
  %336 = load i32, ptr %39, align 4, !tbaa !36
  %337 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN8mdvectorIdEclEjj(ptr noundef nonnull align 8 dereferenceable(105) %330, i32 noundef %335, i32 noundef %336)
          to label %338 unwind label %342

338:                                              ; preds = %328
  store double %329, ptr %337, align 8, !tbaa !41
  call void @llvm.lifetime.end.p0(i64 8, ptr %40) #6
  br label %339

339:                                              ; preds = %338
  %340 = load i32, ptr %39, align 4, !tbaa !36
  %341 = add i32 %340, 1
  store i32 %341, ptr %39, align 4, !tbaa !36
  br label %272, !llvm.loop !50

342:                                              ; preds = %328
  %343 = landingpad { ptr, i32 }
          cleanup
  %344 = extractvalue { ptr, i32 } %343, 0
  store ptr %344, ptr %17, align 8
  %345 = extractvalue { ptr, i32 } %343, 1
  store i32 %345, ptr %18, align 4
  br label %346

346:                                              ; preds = %342, %324
  call void @llvm.lifetime.end.p0(i64 8, ptr %40) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %39) #6
  br label %415

347:                                              ; preds = %275
  call void @llvm.lifetime.start.p0(i64 8, ptr %44) #6
  store double 0.000000e+00, ptr %44, align 8, !tbaa !41
  call void @llvm.lifetime.start.p0(i64 4, ptr %45) #6
  store i32 0, ptr %45, align 4, !tbaa !36
  br label %348

348:                                              ; preds = %390, %347
  %349 = load i32, ptr %45, align 4, !tbaa !36
  %350 = getelementptr inbounds %class.Elements, ptr %48, i32 0, i32 19
  %351 = load i32, ptr %350, align 8, !tbaa !9
  %352 = icmp ult i32 %349, %351
  br i1 %352, label %354, label %353

353:                                              ; preds = %348
  store i32 27, ptr %21, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %45) #6
  br label %397

354:                                              ; preds = %348
  call void @llvm.lifetime.start.p0(i64 4, ptr %46) #6
  %355 = load i32, ptr %45, align 4, !tbaa !36
  %356 = load i32, ptr %11, align 4, !tbaa !36
  %357 = udiv i32 %355, %356
  store i32 %357, ptr %46, align 4, !tbaa !36
  call void @llvm.lifetime.start.p0(i64 4, ptr %47) #6
  %358 = load i32, ptr %45, align 4, !tbaa !36
  %359 = load i32, ptr %11, align 4, !tbaa !36
  %360 = urem i32 %358, %359
  store i32 %360, ptr %47, align 4, !tbaa !36
  %361 = load i32, ptr %45, align 4, !tbaa !36
  %362 = load i32, ptr %38, align 4, !tbaa !36
  %363 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN8mdvectorIdEclEjj(ptr noundef nonnull align 8 dereferenceable(105) %33, i32 noundef %361, i32 noundef %362)
          to label %364 unwind label %393

364:                                              ; preds = %354
  %365 = load double, ptr %363, align 8, !tbaa !41
  %366 = load i32, ptr %7, align 4, !tbaa !36
  %367 = load ptr, ptr %6, align 8, !tbaa !5
  %368 = getelementptr inbounds double, ptr %367, i64 0
  %369 = load double, ptr %368, align 8, !tbaa !41
  %370 = load ptr, ptr %6, align 8, !tbaa !5
  %371 = getelementptr inbounds double, ptr %370, i64 1
  %372 = load double, ptr %371, align 8, !tbaa !41
  %373 = load i32, ptr %47, align 4, !tbaa !36
  %374 = invoke noundef double @_Z9Dubiner2Djddj(i32 noundef %366, double noundef %369, double noundef %372, i32 noundef %373)
          to label %375 unwind label %393

375:                                              ; preds = %364
  %376 = fmul double %365, %374
  %377 = load i32, ptr %46, align 4, !tbaa !36
  %378 = load ptr, ptr %6, align 8, !tbaa !5
  %379 = getelementptr inbounds double, ptr %378, i64 2
  %380 = load double, ptr %379, align 8, !tbaa !41
  %381 = invoke noundef double @_Z11Legendre_d1jd(i32 noundef %377, double noundef %380)
          to label %382 unwind label %393

382:                                              ; preds = %375
  %383 = fmul double %376, %381
  %384 = load i32, ptr %46, align 4, !tbaa !36
  %385 = sitofp i32 %384 to double
  %386 = fadd double %385, 5.000000e-01
  %387 = call double @sqrt(double noundef %386) #6
  %388 = load double, ptr %44, align 8, !tbaa !41
  %389 = call double @llvm.fmuladd.f64(double %383, double %387, double %388)
  store double %389, ptr %44, align 8, !tbaa !41
  call void @llvm.lifetime.end.p0(i64 4, ptr %47) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %46) #6
  br label %390

390:                                              ; preds = %382
  %391 = load i32, ptr %45, align 4, !tbaa !36
  %392 = add i32 %391, 1
  store i32 %392, ptr %45, align 4, !tbaa !36
  br label %348, !llvm.loop !51

393:                                              ; preds = %375, %364, %354
  %394 = landingpad { ptr, i32 }
          cleanup
  %395 = extractvalue { ptr, i32 } %394, 0
  store ptr %395, ptr %17, align 8
  %396 = extractvalue { ptr, i32 } %394, 1
  store i32 %396, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %47) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %46) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %45) #6
  br label %414

397:                                              ; preds = %353
  %398 = load double, ptr %44, align 8, !tbaa !41
  %399 = load ptr, ptr %5, align 8, !tbaa !5
  %400 = getelementptr inbounds %class.Elements, ptr %48, i32 0, i32 88
  %401 = load i32, ptr %38, align 4, !tbaa !36
  %402 = zext i32 %401 to i64
  %403 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %400, i64 noundef %402) #6
  %404 = load i32, ptr %403, align 4, !tbaa !36
  %405 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN8mdvectorIdEclEjj(ptr noundef nonnull align 8 dereferenceable(105) %399, i32 noundef %404, i32 noundef 2)
          to label %406 unwind label %410

406:                                              ; preds = %397
  store double %398, ptr %405, align 8, !tbaa !41
  call void @llvm.lifetime.end.p0(i64 8, ptr %44) #6
  br label %407

407:                                              ; preds = %406
  %408 = load i32, ptr %38, align 4, !tbaa !36
  %409 = add i32 %408, 1
  store i32 %409, ptr %38, align 4, !tbaa !36
  br label %252, !llvm.loop !52

410:                                              ; preds = %397
  %411 = landingpad { ptr, i32 }
          cleanup
  %412 = extractvalue { ptr, i32 } %411, 0
  store ptr %412, ptr %17, align 8
  %413 = extractvalue { ptr, i32 } %411, 1
  store i32 %413, ptr %18, align 4
  br label %414

414:                                              ; preds = %410, %393
  call void @llvm.lifetime.end.p0(i64 8, ptr %44) #6
  br label %415

415:                                              ; preds = %414, %346
  call void @llvm.lifetime.end.p0(i64 4, ptr %38) #6
  br label %417

416:                                              ; preds = %257
  call void @_ZN8mdvectorIdED2Ev(ptr noundef nonnull align 8 dereferenceable(105) %33) #6
  call void @llvm.lifetime.end.p0(i64 112, ptr %33) #6
  call void @_ZN8mdvectorIdED2Ev(ptr noundef nonnull align 8 dereferenceable(105) %24) #6
  call void @llvm.lifetime.end.p0(i64 112, ptr %24) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  call void @_ZN8mdvectorIdED2Ev(ptr noundef nonnull align 8 dereferenceable(105) %12) #6
  call void @llvm.lifetime.end.p0(i64 112, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  ret void

417:                                              ; preds = %415, %267
  call void @_ZN8mdvectorIdED2Ev(ptr noundef nonnull align 8 dereferenceable(105) %33) #6
  br label %418

418:                                              ; preds = %417, %266
  call void @llvm.lifetime.end.p0(i64 112, ptr %33) #6
  br label %419

419:                                              ; preds = %418, %229
  call void @_ZN8mdvectorIdED2Ev(ptr noundef nonnull align 8 dereferenceable(105) %24) #6
  br label %420

420:                                              ; preds = %419, %182
  call void @llvm.lifetime.end.p0(i64 112, ptr %24) #6
  br label %421

421:                                              ; preds = %420, %142
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  call void @_ZN8mdvectorIdED2Ev(ptr noundef nonnull align 8 dereferenceable(105) %12) #6
  br label %422

422:                                              ; preds = %421, %100
  call void @llvm.lifetime.end.p0(i64 112, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  br label %423

423:                                              ; preds = %422
  %424 = load ptr, ptr %17, align 8
  %425 = load i32, ptr %18, align 4
  %426 = insertvalue { ptr, i32 } poison, ptr %424, 0
  %427 = insertvalue { ptr, i32 } %426, i32 %425, 1
  resume { ptr, i32 } %427
}

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 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 #3 = { "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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { 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++ TBAA"}
!9 = !{!10, !12, i64 88}
!10 = !{!"_ZTS8Elements", !6, i64 8, !6, i64 16, !11, i64 24, !12, i64 28, !12, i64 32, !12, i64 36, !12, i64 40, !12, i64 44, !12, i64 48, !12, i64 52, !12, i64 56, !12, i64 60, !12, i64 64, !12, i64 68, !12, i64 72, !12, i64 76, !12, i64 80, !12, i64 84, !12, i64 88, !12, i64 92, !12, i64 96, !13, i64 104, !13, i64 216, !13, i64 328, !13, i64 440, !21, i64 552, !13, i64 576, !13, i64 688, !13, i64 800, !13, i64 912, !13, i64 1024, !25, i64 1136, !25, i64 1248, !25, i64 1360, !25, i64 1472, !25, i64 1584, !16, i64 1696, !16, i64 1720, !16, i64 1744, !16, i64 1768, !13, i64 1792, !13, i64 1904, !13, i64 2016, !13, i64 2128, !13, i64 2240, !13, i64 2352, !13, i64 2464, !13, i64 2576, !13, i64 2688, !13, i64 2800, !13, i64 2912, !13, i64 3024, !13, i64 3136, !13, i64 3248, !13, i64 3360, !13, i64 3472, !13, i64 3584, !13, i64 3696, !13, i64 3808, !13, i64 3920, !13, i64 4032, !13, i64 4144, !13, i64 4256, !13, i64 4368, !13, i64 4480, !13, i64 4592, !13, i64 4704, !13, i64 4816, !13, i64 4928, !13, i64 5040, !13, i64 5152, !13, i64 5264, !13, i64 5376, !13, i64 5488, !13, i64 5600, !13, i64 5712, !13, i64 5824, !13, i64 5936, !12, i64 6048, !16, i64 6056, !16, i64 6080, !16, i64 6104, !16, i64 6128, !16, i64 6152, !16, i64 6176, !16, i64 6200, !26, i64 6224, !13, i64 6248, !13, i64 6360, !13, i64 6472, !13, i64 6584, !13, i64 6696, !13, i64 6808, !13, i64 6920, !13, i64 7032, !13, i64 7144, !14, i64 7256, !14, i64 7264, !14, i64 7272, !14, i64 7280, !14, i64 7288, !13, i64 7296, !13, i64 7408, !13, i64 7520, !13, i64 7632, !13, i64 7744, !13, i64 7856, !13, i64 7968, !13, i64 8080, !13, i64 8192, !13, i64 8304, !13, i64 8416, !13, i64 8528, !13, i64 8640, !13, i64 8752, !13, i64 8864, !13, i64 8976, !13, i64 9088, !13, i64 9200, !13, i64 9312, !13, i64 9424, !13, i64 9536, !13, i64 9648, !13, i64 9760, !13, i64 9872, !13, i64 9984, !13, i64 10096, !13, i64 10208, !13, i64 10320, !13, i64 10432, !13, i64 10544, !13, i64 10656, !13, i64 10768, !13, i64 10880, !13, i64 10992, !13, i64 11104, !13, i64 11216, !13, i64 11328, !13, i64 11440, !13, i64 11552, !13, i64 11664, !13, i64 11776, !13, i64 11888, !13, i64 12000, !30, i64 12112, !30, i64 12344, !13, i64 12576, !13, i64 12688, !13, i64 12800, !13, i64 12912, !13, i64 13024, !13, i64 13136, !12, i64 13248, !13, i64 13256, !13, i64 13368, !12, i64 13480, !6, i64 13488, !26, i64 13496, !25, i64 13520, !13, i64 13632, !13, i64 13744, !13, i64 13856}
!11 = !{!"_ZTS8ELE_TYPE", !7, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!"_ZTS8mdvectorIdE", !12, i64 0, !14, i64 8, !14, i64 16, !15, i64 24, !15, i64 48, !16, i64 72, !6, i64 96, !20, i64 104}
!14 = !{!"long", !7, i64 0}
!15 = !{!"_ZTSSt5arrayIjLm6EE", !7, i64 0}
!16 = !{!"_ZTSSt6vectorIdSaIdEE", !17, i64 0}
!17 = !{!"_ZTSSt12_Vector_baseIdSaIdEE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE12_Vector_implE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!20 = !{!"bool", !7, i64 0}
!21 = !{!"_ZTSSt6vectorIjSaIjEE", !22, i64 0}
!22 = !{!"_ZTSSt12_Vector_baseIjSaIjEE", !23, i64 0}
!23 = !{!"_ZTSNSt12_Vector_baseIjSaIjEE12_Vector_implE", !24, i64 0}
!24 = !{!"_ZTSNSt12_Vector_baseIjSaIjEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!25 = !{!"_ZTS8mdvectorIjE", !12, i64 0, !14, i64 8, !14, i64 16, !15, i64 24, !15, i64 48, !21, i64 72, !6, i64 96, !20, i64 104}
!26 = !{!"_ZTSSt6vectorIiSaIiEE", !27, i64 0}
!27 = !{!"_ZTSSt12_Vector_baseIiSaIiEE", !28, i64 0}
!28 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE12_Vector_implE", !29, i64 0}
!29 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!30 = !{!"_ZTS6mdviewIdE", !31, i64 0, !25, i64 112, !12, i64 224}
!31 = !{!"_ZTS8mdvectorIPdE", !12, i64 0, !14, i64 8, !14, i64 16, !15, i64 24, !15, i64 48, !32, i64 72, !6, i64 96, !20, i64 104}
!32 = !{!"_ZTSSt6vectorIPdSaIS0_EE", !33, i64 0}
!33 = !{!"_ZTSSt12_Vector_baseIPdSaIS0_EE", !34, i64 0}
!34 = !{!"_ZTSNSt12_Vector_baseIPdSaIS0_EE12_Vector_implE", !35, i64 0}
!35 = !{!"_ZTSNSt12_Vector_baseIPdSaIS0_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!36 = !{!12, !12, i64 0}
!37 = !{!10, !12, i64 52}
!38 = !{!39, !6, i64 0}
!39 = !{!"_ZTSSt16initializer_listIjE", !6, i64 0, !14, i64 8}
!40 = !{!39, !14, i64 8}
!41 = !{!42, !42, i64 0}
!42 = !{!"double", !7, i64 0}
!43 = distinct !{!43, !44}
!44 = !{!"llvm.loop.mustprogress"}
!45 = distinct !{!45, !44}
!46 = distinct !{!46, !44}
!47 = distinct !{!47, !44}
!48 = distinct !{!48, !44}
!49 = distinct !{!49, !44}
!50 = distinct !{!50, !44}
!51 = distinct !{!51, !44}
!52 = distinct !{!52, !44}


; 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<double, std::allocator<double>>::_Vector_impl" }
%"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl" = type { %"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl_data" }
%"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.7" = type { %"struct.std::_Vector_base.8" }
%"struct.std::_Vector_base.8" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%class.mdvector = type <{ i32, [4 x i8], i64, i64, %"struct.std::array", %"struct.std::array", %"class.std::vector", ptr, i8, [7 x i8] }>
%"struct.std::array" = type { [6 x i32] }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator.2" = type { i8 }

declare i32 @__gxx_personality_v0(...)

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

; 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 nounwind uwtable
declare dso_local void @_ZN8mdvectorIdED2Ev(ptr noundef nonnull align 8 dereferenceable(105)) unnamed_addr #1 align 2

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN8mdvectorIdEclEjj(ptr noundef nonnull align 8 dereferenceable(105), i32 noundef, i32 noundef) local_unnamed_addr #1 align 2

declare void @_Z9Shape_ptsj(ptr dead_on_unwind writable sret(%"class.std::vector") align 8, i32 noundef) local_unnamed_addr #3

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

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

declare noundef double @_Z9Dubiner2Djddj(i32 noundef, double noundef, double noundef, i32 noundef) local_unnamed_addr #3

declare noundef double @_Z8Legendrejd(i32 noundef, double noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNK8mdvectorIdE7inverseERS0_(ptr noundef nonnull align 8 dereferenceable(105), ptr noundef nonnull align 8 dereferenceable(105)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN8mdvectorIdEC2ESt6vectorIjSaIjEEdb(ptr noundef nonnull align 8 dereferenceable(105), ptr noundef, double noundef, i1 noundef zeroext) unnamed_addr #2 align 2

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

declare noundef double @_Z10dDubiner2Djdddj(i32 noundef, double noundef, double noundef, double noundef, i32 noundef) local_unnamed_addr #3

declare noundef double @_Z11Legendre_d1jd(i32 noundef, double noundef) local_unnamed_addr #3

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

declare void @_Z22structured_to_gmsh_prij(ptr dead_on_unwind writable sret(%"class.std::vector.7") align 8, i32 noundef) local_unnamed_addr #3

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6Prisms12calc_d_shapeER8mdvectorIdEPKd(ptr noundef nonnull align 8 dereferenceable(14544) %0, ptr noundef nonnull align 8 dereferenceable(105) %1, ptr nocapture noundef readonly %2) unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"class.std::vector.7", align 8
  %5 = alloca %"class.std::vector", align 8
  %6 = alloca %class.mdvector, align 8
  %7 = alloca %"class.std::vector.0", align 8
  %8 = alloca [2 x i32], align 4
  %9 = alloca %"class.std::allocator.2", align 1
  %10 = alloca %class.mdvector, align 8
  %11 = alloca %"class.std::vector.0", align 8
  %12 = alloca [2 x i32], align 4
  %13 = alloca %"class.std::allocator.2", align 1
  %14 = alloca %class.mdvector, align 8
  %15 = alloca %"class.std::vector.0", align 8
  %16 = alloca [2 x i32], align 4
  %17 = alloca %"class.std::allocator.2", align 1
  %18 = getelementptr inbounds i8, ptr %0, i64 6224
  %19 = tail call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %18) #6
  %20 = getelementptr inbounds i8, ptr %0, i64 88
  %21 = load i32, ptr %20, align 8, !tbaa !5
  %22 = zext i32 %21 to i64
  %.not = icmp eq i64 %19, %22
  br i1 %.not, label %25, label %23

23:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #6
  call void @_Z22structured_to_gmsh_prij(ptr dead_on_unwind nonnull writable sret(%"class.std::vector.7") align 8 %4, i32 noundef %21)
  %24 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIiSaIiEEaSEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %18, ptr noundef nonnull align 8 dereferenceable(24) %4) #6
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #6
  %.pre = load i32, ptr %20, align 8, !tbaa !5
  br label %25

25:                                               ; preds = %23, %3
  %26 = phi i32 [ %.pre, %23 ], [ %21, %3 ]
  %switch.selectcmp = icmp eq i32 %26, 18
  %switch.select = select i1 %switch.selectcmp, i32 2, i32 1
  %switch.selectcmp122 = icmp eq i32 %26, 40
  %switch.select123 = select i1 %switch.selectcmp122, i32 3, i32 %switch.select
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #6
  call void @_Z9Shape_ptsj(ptr dead_on_unwind nonnull writable sret(%"class.std::vector") align 8 %5, i32 noundef %switch.select123)
  %27 = call noundef i64 @_ZNKSt6vectorIdSaIdEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #6
  %28 = trunc i64 %27 to i32
  %29 = load i32, ptr %20, align 8, !tbaa !5
  %30 = udiv i32 %29, %28
  call void @llvm.lifetime.start.p0(i64 112, ptr nonnull %6) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #6
  store i32 %29, ptr %8, align 4, !tbaa !35
  %31 = getelementptr inbounds i8, ptr %8, i64 4
  %32 = getelementptr inbounds i8, ptr %0, i64 52
  %33 = load i32, ptr %32, align 4, !tbaa !36
  store i32 %33, ptr %31, align 4, !tbaa !35
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %9) #6
  call void @_ZNSaIjEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #6
  invoke void @_ZNSt6vectorIjSaIjEEC2ESt16initializer_listIjERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %7, ptr nonnull %8, i64 2, ptr noundef nonnull align 1 dereferenceable(1) %9)
          to label %34 unwind label %52

34:                                               ; preds = %25
  invoke void @_ZN8mdvectorIdEC2ESt6vectorIjSaIjEEdb(ptr noundef nonnull align 8 dereferenceable(105) %6, ptr noundef nonnull %7, double noundef 0.000000e+00, i1 noundef zeroext false)
          to label %35 unwind label %54

35:                                               ; preds = %34
  call void @_ZNSt6vectorIjSaIjEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #6
  call void @_ZNSt15__new_allocatorIjED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #6
  %36 = icmp sgt i32 %28, 0
  br i1 %36, label %.preheader128.us.preheader, label %._crit_edge140

.preheader128.us.preheader:                       ; preds = %35
  %37 = and i64 %27, 2147483647
  %wide.trip.count180 = and i64 %27, 2147483647
  br label %.preheader128.us

.preheader128.us:                                 ; preds = %.preheader128.us.preheader, %._crit_edge136.us
  %indvars.iv177 = phi i64 [ 0, %.preheader128.us.preheader ], [ %indvars.iv.next178, %._crit_edge136.us ]
  %.097139.us = phi i32 [ 0, %.preheader128.us.preheader ], [ %.299.lcssa.us, %._crit_edge136.us ]
  br label %.preheader127.us

._crit_edge.us:                                   ; preds = %38, %.preheader127.us
  %.299.lcssa.us = phi i32 [ %.198135.us, %.preheader127.us ], [ %48, %38 ]
  %indvars.iv.next173 = add nuw nsw i64 %indvars.iv172, 1
  %indvars.iv.next171 = add i32 %indvars.iv170, -1
  %exitcond176.not = icmp eq i64 %indvars.iv.next173, %wide.trip.count180
  br i1 %exitcond176.not, label %._crit_edge136.us, label %.preheader127.us, !llvm.loop !37

38:                                               ; preds = %.lr.ph.us, %38
  %indvars.iv = phi i64 [ 0, %.lr.ph.us ], [ %indvars.iv.next, %38 ]
  %.299133.us = phi i32 [ %.198135.us, %.lr.ph.us ], [ %48, %38 ]
  %39 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %indvars.iv) #6
  %40 = load double, ptr %39, align 8, !tbaa !39
  %41 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN8mdvectorIdEclEjj(ptr noundef nonnull align 8 dereferenceable(105) %6, i32 noundef %.299133.us, i32 noundef 0)
  store double %40, ptr %41, align 8, !tbaa !39
  %42 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %indvars.iv172) #6
  %43 = load double, ptr %42, align 8, !tbaa !39
  %44 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN8mdvectorIdEclEjj(ptr noundef nonnull align 8 dereferenceable(105) %6, i32 noundef %.299133.us, i32 noundef 1)
  store double %43, ptr %44, align 8, !tbaa !39
  %45 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %indvars.iv177) #6
  %46 = load double, ptr %45, align 8, !tbaa !39
  %47 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN8mdvectorIdEclEjj(ptr noundef nonnull align 8 dereferenceable(105) %6, i32 noundef %.299133.us, i32 noundef 2)
  store double %46, ptr %47, align 8, !tbaa !39
  %48 = add nsw i32 %.299133.us, 1
  %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.us, label %38, !llvm.loop !41

.preheader127.us:                                 ; preds = %.preheader128.us, %._crit_edge.us
  %indvars.iv172 = phi i64 [ 0, %.preheader128.us ], [ %indvars.iv.next173, %._crit_edge.us ]
  %indvars.iv170 = phi i32 [ %28, %.preheader128.us ], [ %indvars.iv.next171, %._crit_edge.us ]
  %.198135.us = phi i32 [ %.097139.us, %.preheader128.us ], [ %.299.lcssa.us, %._crit_edge.us ]
  %49 = icmp ugt i64 %37, %indvars.iv172
  br i1 %49, label %.lr.ph.us, label %._crit_edge.us

.lr.ph.us:                                        ; preds = %.preheader127.us
  %wide.trip.count = zext i32 %indvars.iv170 to i64
  br label %38

._crit_edge136.us:                                ; preds = %._crit_edge.us
  %indvars.iv.next178 = add nuw nsw i64 %indvars.iv177, 1
  %exitcond181.not = icmp eq i64 %indvars.iv.next178, %wide.trip.count180
  br i1 %exitcond181.not, label %._crit_edge140, label %.preheader128.us, !llvm.loop !42

._crit_edge140:                                   ; preds = %._crit_edge136.us, %35
  call void @llvm.lifetime.start.p0(i64 112, ptr nonnull %10) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #6
  %50 = load i32, ptr %20, align 8, !tbaa !5
  store i32 %50, ptr %12, align 4, !tbaa !35
  %51 = getelementptr inbounds i8, ptr %12, i64 4
  store i32 %50, ptr %51, align 4, !tbaa !35
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %13) #6
  call void @_ZNSaIjEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #6
  invoke void @_ZNSt6vectorIjSaIjEEC2ESt16initializer_listIjERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %11, ptr nonnull %12, i64 2, ptr noundef nonnull align 1 dereferenceable(1) %13)
          to label %57 unwind label %61

52:                                               ; preds = %25
  %53 = landingpad { ptr, i32 }
          cleanup
  br label %56

54:                                               ; preds = %34
  %55 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt6vectorIjSaIjEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #6
  br label %56

56:                                               ; preds = %54, %52
  %.pn = phi { ptr, i32 } [ %55, %54 ], [ %53, %52 ]
  call void @_ZNSt15__new_allocatorIjED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #6
  br label %187

57:                                               ; preds = %._crit_edge140
  invoke void @_ZN8mdvectorIdEC2ESt6vectorIjSaIjEEdb(ptr noundef nonnull align 8 dereferenceable(105) %10, ptr noundef nonnull %11, double noundef 0.000000e+00, i1 noundef zeroext false)
          to label %58 unwind label %63

58:                                               ; preds = %57
  call void @_ZNSt6vectorIjSaIjEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #6
  call void @_ZNSt15__new_allocatorIjED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #6
  %59 = load i32, ptr %20, align 8, !tbaa !5
  %.not158 = icmp eq i32 %59, 0
  br i1 %.not158, label %._crit_edge143, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %58, %._crit_edge
  %.0108142 = phi i32 [ %66, %._crit_edge ], [ 0, %58 ]
  br label %.lr.ph

._crit_edge143:                                   ; preds = %._crit_edge, %58
  %.lcssa = phi i32 [ 0, %58 ], [ %87, %._crit_edge ]
  call void @llvm.lifetime.start.p0(i64 112, ptr nonnull %14) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %16) #6
  store i32 %.lcssa, ptr %16, align 4, !tbaa !35
  %60 = getelementptr inbounds i8, ptr %16, i64 4
  store i32 %.lcssa, ptr %60, align 4, !tbaa !35
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %17) #6
  call void @_ZNSaIjEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #6
  invoke void @_ZNSt6vectorIjSaIjEEC2ESt16initializer_listIjERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %15, ptr nonnull %16, i64 2, ptr noundef nonnull align 1 dereferenceable(1) %17)
          to label %91 unwind label %97

61:                                               ; preds = %._crit_edge140
  %62 = landingpad { ptr, i32 }
          cleanup
  br label %65

63:                                               ; preds = %57
  %64 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt6vectorIjSaIjEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #6
  br label %65

65:                                               ; preds = %63, %61
  %.pn111 = phi { ptr, i32 } [ %64, %63 ], [ %62, %61 ]
  call void @_ZNSt15__new_allocatorIjED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #6
  br label %186

._crit_edge:                                      ; preds = %79
  %66 = add nuw i32 %.0108142, 1
  %67 = icmp ult i32 %66, %87
  br i1 %67, label %.lr.ph.preheader, label %._crit_edge143, !llvm.loop !43

.lr.ph:                                           ; preds = %.lr.ph.preheader, %79
  %.0107141 = phi i32 [ %86, %79 ], [ 0, %.lr.ph.preheader ]
  %68 = udiv i32 %.0107141, %30
  %69 = urem i32 %.0107141, %30
  %70 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN8mdvectorIdEclEjj(ptr noundef nonnull align 8 dereferenceable(105) %6, i32 noundef %.0108142, i32 noundef 0)
  %71 = load double, ptr %70, align 8, !tbaa !39
  %72 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN8mdvectorIdEclEjj(ptr noundef nonnull align 8 dereferenceable(105) %6, i32 noundef %.0108142, i32 noundef 1)
  %73 = load double, ptr %72, align 8, !tbaa !39
  %74 = invoke noundef double @_Z9Dubiner2Djddj(i32 noundef %switch.select123, double noundef %71, double noundef %73, i32 noundef %69)
          to label %75 unwind label %89

75:                                               ; preds = %.lr.ph
  %76 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN8mdvectorIdEclEjj(ptr noundef nonnull align 8 dereferenceable(105) %6, i32 noundef %.0108142, i32 noundef 2)
  %77 = load double, ptr %76, align 8, !tbaa !39
  %78 = invoke noundef double @_Z8Legendrejd(i32 noundef %68, double noundef %77)
          to label %79 unwind label %89

79:                                               ; preds = %75
  %80 = fmul double %74, %78
  %81 = sitofp i32 %68 to double
  %82 = fadd double %81, 5.000000e-01
  %83 = call double @sqrt(double noundef %82) #6
  %84 = fmul double %80, %83
  %85 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN8mdvectorIdEclEjj(ptr noundef nonnull align 8 dereferenceable(105) %10, i32 noundef %.0108142, i32 noundef %.0107141)
  store double %84, ptr %85, align 8, !tbaa !39
  %86 = add nuw i32 %.0107141, 1
  %87 = load i32, ptr %20, align 8, !tbaa !5
  %88 = icmp ult i32 %86, %87
  br i1 %88, label %.lr.ph, label %._crit_edge, !llvm.loop !45

89:                                               ; preds = %75, %.lr.ph
  %90 = landingpad { ptr, i32 }
          cleanup
  br label %185

91:                                               ; preds = %._crit_edge143
  invoke void @_ZN8mdvectorIdEC2ESt6vectorIjSaIjEEdb(ptr noundef nonnull align 8 dereferenceable(105) %14, ptr noundef nonnull %15, double noundef 0.000000e+00, i1 noundef zeroext false)
          to label %92 unwind label %99

92:                                               ; preds = %91
  call void @_ZNSt6vectorIjSaIjEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #6
  call void @_ZNSt15__new_allocatorIjED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %17) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #6
  call void @_ZNK8mdvectorIdE7inverseERS0_(ptr noundef nonnull align 8 dereferenceable(105) %10, ptr noundef nonnull align 8 dereferenceable(105) %14)
  %93 = load i32, ptr %20, align 8, !tbaa !5
  %.not161 = icmp eq i32 %93, 0
  br i1 %.not161, label %._crit_edge157, label %.preheader125.lr.ph

.preheader125.lr.ph:                              ; preds = %92
  %94 = getelementptr inbounds i8, ptr %2, i64 8
  %95 = getelementptr inbounds i8, ptr %2, i64 16
  br label %.preheader125

.preheader125:                                    ; preds = %.preheader125.lr.ph, %._crit_edge154
  %96 = phi i32 [ 1, %.preheader125.lr.ph ], [ %158, %._crit_edge154 ]
  %indvars.iv182 = phi i64 [ 0, %.preheader125.lr.ph ], [ %indvars.iv.next183, %._crit_edge154 ]
  %.not162 = icmp eq i32 %96, 0
  br i1 %.not162, label %._crit_edge148, label %.lr.ph147

._crit_edge157:                                   ; preds = %._crit_edge154, %92
  call void @_ZN8mdvectorIdED2Ev(ptr noundef nonnull align 8 dereferenceable(105) %14) #6
  call void @llvm.lifetime.end.p0(i64 112, ptr nonnull %14) #6
  call void @_ZN8mdvectorIdED2Ev(ptr noundef nonnull align 8 dereferenceable(105) %10) #6
  call void @llvm.lifetime.end.p0(i64 112, ptr nonnull %10) #6
  call void @_ZN8mdvectorIdED2Ev(ptr noundef nonnull align 8 dereferenceable(105) %6) #6
  call void @llvm.lifetime.end.p0(i64 112, ptr nonnull %6) #6
  call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #6
  ret void

97:                                               ; preds = %._crit_edge143
  %98 = landingpad { ptr, i32 }
          cleanup
  br label %101

99:                                               ; preds = %91
  %100 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt6vectorIjSaIjEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #6
  br label %101

101:                                              ; preds = %99, %97
  %.pn113 = phi { ptr, i32 } [ %100, %99 ], [ %98, %97 ]
  call void @_ZNSt15__new_allocatorIjED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %17) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #6
  br label %184

.lr.ph153.preheader:                              ; preds = %._crit_edge148.1
  %102 = trunc nuw i64 %indvars.iv182 to i32
  br label %.lr.ph153

.lr.ph147:                                        ; preds = %.preheader125
  %103 = trunc nuw i64 %indvars.iv182 to i32
  br label %134

._crit_edge148:                                   ; preds = %145, %.preheader125
  %.0101.lcssa = phi double [ 0.000000e+00, %.preheader125 ], [ %151, %145 ]
  %104 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %18, i64 noundef %indvars.iv182) #6
  %105 = load i32, ptr %104, align 4, !tbaa !35
  %106 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN8mdvectorIdEclEjj(ptr noundef nonnull align 8 dereferenceable(105) %1, i32 noundef %105, i32 noundef 0)
  store double %.0101.lcssa, ptr %106, align 8, !tbaa !39
  %107 = load i32, ptr %20, align 8, !tbaa !5
  %.not162.1 = icmp eq i32 %107, 0
  br i1 %.not162.1, label %._crit_edge148.1, label %.lr.ph147.1

.lr.ph147.1:                                      ; preds = %._crit_edge148
  %108 = trunc nuw i64 %indvars.iv182 to i32
  br label %109

109:                                              ; preds = %120, %.lr.ph147.1
  %.0100146.1 = phi i32 [ 0, %.lr.ph147.1 ], [ %127, %120 ]
  %.0101145.1 = phi double [ 0.000000e+00, %.lr.ph147.1 ], [ %126, %120 ]
  %110 = udiv i32 %.0100146.1, %30
  %111 = urem i32 %.0100146.1, %30
  %112 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN8mdvectorIdEclEjj(ptr noundef nonnull align 8 dereferenceable(105) %14, i32 noundef %.0100146.1, i32 noundef %108)
  %113 = load double, ptr %112, align 8, !tbaa !39
  %114 = load double, ptr %2, align 8, !tbaa !39
  %115 = load double, ptr %94, align 8, !tbaa !39
  %116 = invoke noundef double @_Z10dDubiner2Djdddj(i32 noundef %switch.select123, double noundef %114, double noundef %115, double noundef 1.000000e+00, i32 noundef %111)
          to label %117 unwind label %.loopexit.split-lp

117:                                              ; preds = %109
  %118 = load double, ptr %95, align 8, !tbaa !39
  %119 = invoke noundef double @_Z8Legendrejd(i32 noundef %110, double noundef %118)
          to label %120 unwind label %.loopexit.split-lp

120:                                              ; preds = %117
  %121 = fmul double %113, %116
  %122 = fmul double %121, %119
  %123 = sitofp i32 %110 to double
  %124 = fadd double %123, 5.000000e-01
  %125 = call double @sqrt(double noundef %124) #6
  %126 = call double @llvm.fmuladd.f64(double %122, double %125, double %.0101145.1)
  %127 = add nuw i32 %.0100146.1, 1
  %128 = load i32, ptr %20, align 8, !tbaa !5
  %129 = icmp ult i32 %127, %128
  br i1 %129, label %109, label %._crit_edge148.1, !llvm.loop !46

._crit_edge148.1:                                 ; preds = %120, %._crit_edge148
  %.0101.lcssa.1 = phi double [ 0.000000e+00, %._crit_edge148 ], [ %126, %120 ]
  %130 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %18, i64 noundef %indvars.iv182) #6
  %131 = load i32, ptr %130, align 4, !tbaa !35
  %132 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN8mdvectorIdEclEjj(ptr noundef nonnull align 8 dereferenceable(105) %1, i32 noundef %131, i32 noundef 1)
  store double %.0101.lcssa.1, ptr %132, align 8, !tbaa !39
  %133 = load i32, ptr %20, align 8, !tbaa !5
  %.not163 = icmp eq i32 %133, 0
  br i1 %.not163, label %._crit_edge154, label %.lr.ph153.preheader

134:                                              ; preds = %.lr.ph147, %145
  %.0100146 = phi i32 [ 0, %.lr.ph147 ], [ %152, %145 ]
  %.0101145 = phi double [ 0.000000e+00, %.lr.ph147 ], [ %151, %145 ]
  %135 = udiv i32 %.0100146, %30
  %136 = urem i32 %.0100146, %30
  %137 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN8mdvectorIdEclEjj(ptr noundef nonnull align 8 dereferenceable(105) %14, i32 noundef %.0100146, i32 noundef %103)
  %138 = load double, ptr %137, align 8, !tbaa !39
  %139 = load double, ptr %2, align 8, !tbaa !39
  %140 = load double, ptr %94, align 8, !tbaa !39
  %141 = invoke noundef double @_Z10dDubiner2Djdddj(i32 noundef %switch.select123, double noundef %139, double noundef %140, double noundef 0.000000e+00, i32 noundef %136)
          to label %142 unwind label %.loopexit

142:                                              ; preds = %134
  %143 = load double, ptr %95, align 8, !tbaa !39
  %144 = invoke noundef double @_Z8Legendrejd(i32 noundef %135, double noundef %143)
          to label %145 unwind label %.loopexit

145:                                              ; preds = %142
  %146 = fmul double %138, %141
  %147 = fmul double %146, %144
  %148 = sitofp i32 %135 to double
  %149 = fadd double %148, 5.000000e-01
  %150 = call double @sqrt(double noundef %149) #6
  %151 = call double @llvm.fmuladd.f64(double %147, double %150, double %.0101145)
  %152 = add nuw i32 %.0100146, 1
  %153 = load i32, ptr %20, align 8, !tbaa !5
  %154 = icmp ult i32 %152, %153
  br i1 %154, label %134, label %._crit_edge148, !llvm.loop !46

.loopexit:                                        ; preds = %134, %142
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %183

.loopexit.split-lp:                               ; preds = %109, %117
  %lpad.loopexit.split-lp = landingpad { ptr, i32 }
          cleanup
  br label %183

._crit_edge154:                                   ; preds = %171, %._crit_edge148.1
  %.088.lcssa = phi double [ 0.000000e+00, %._crit_edge148.1 ], [ %177, %171 ]
  %155 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %18, i64 noundef %indvars.iv182) #6
  %156 = load i32, ptr %155, align 4, !tbaa !35
  %157 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN8mdvectorIdEclEjj(ptr noundef nonnull align 8 dereferenceable(105) %1, i32 noundef %156, i32 noundef 2)
  store double %.088.lcssa, ptr %157, align 8, !tbaa !39
  %indvars.iv.next183 = add nuw nsw i64 %indvars.iv182, 1
  %158 = load i32, ptr %20, align 8, !tbaa !5
  %159 = zext i32 %158 to i64
  %160 = icmp ult i64 %indvars.iv.next183, %159
  br i1 %160, label %.preheader125, label %._crit_edge157, !llvm.loop !47

.lr.ph153:                                        ; preds = %.lr.ph153.preheader, %171
  %.087152 = phi i32 [ %178, %171 ], [ 0, %.lr.ph153.preheader ]
  %.088151 = phi double [ %177, %171 ], [ 0.000000e+00, %.lr.ph153.preheader ]
  %161 = udiv i32 %.087152, %30
  %162 = urem i32 %.087152, %30
  %163 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN8mdvectorIdEclEjj(ptr noundef nonnull align 8 dereferenceable(105) %14, i32 noundef %.087152, i32 noundef %102)
  %164 = load double, ptr %163, align 8, !tbaa !39
  %165 = load double, ptr %2, align 8, !tbaa !39
  %166 = load double, ptr %94, align 8, !tbaa !39
  %167 = invoke noundef double @_Z9Dubiner2Djddj(i32 noundef %switch.select123, double noundef %165, double noundef %166, i32 noundef %162)
          to label %168 unwind label %181

168:                                              ; preds = %.lr.ph153
  %169 = load double, ptr %95, align 8, !tbaa !39
  %170 = invoke noundef double @_Z11Legendre_d1jd(i32 noundef %161, double noundef %169)
          to label %171 unwind label %181

171:                                              ; preds = %168
  %172 = fmul double %164, %167
  %173 = fmul double %172, %170
  %174 = sitofp i32 %161 to double
  %175 = fadd double %174, 5.000000e-01
  %176 = call double @sqrt(double noundef %175) #6
  %177 = call double @llvm.fmuladd.f64(double %173, double %176, double %.088151)
  %178 = add nuw i32 %.087152, 1
  %179 = load i32, ptr %20, align 8, !tbaa !5
  %180 = icmp ult i32 %178, %179
  br i1 %180, label %.lr.ph153, label %._crit_edge154, !llvm.loop !48

181:                                              ; preds = %168, %.lr.ph153
  %182 = landingpad { ptr, i32 }
          cleanup
  br label %183

183:                                              ; preds = %.loopexit, %.loopexit.split-lp, %181
  %.pn115 = phi { ptr, i32 } [ %182, %181 ], [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ]
  call void @_ZN8mdvectorIdED2Ev(ptr noundef nonnull align 8 dereferenceable(105) %14) #6
  br label %184

184:                                              ; preds = %183, %101
  %.pn115.pn = phi { ptr, i32 } [ %.pn115, %183 ], [ %.pn113, %101 ]
  call void @llvm.lifetime.end.p0(i64 112, ptr nonnull %14) #6
  br label %185

185:                                              ; preds = %184, %89
  %.pn118 = phi { ptr, i32 } [ %90, %89 ], [ %.pn115.pn, %184 ]
  call void @_ZN8mdvectorIdED2Ev(ptr noundef nonnull align 8 dereferenceable(105) %10) #6
  br label %186

186:                                              ; preds = %185, %65
  %.pn118.pn = phi { ptr, i32 } [ %.pn118, %185 ], [ %.pn111, %65 ]
  call void @llvm.lifetime.end.p0(i64 112, ptr nonnull %10) #6
  call void @_ZN8mdvectorIdED2Ev(ptr noundef nonnull align 8 dereferenceable(105) %6) #6
  br label %187

187:                                              ; preds = %186, %56
  %.pn118.pn.pn = phi { ptr, i32 } [ %.pn118.pn, %186 ], [ %.pn, %56 ]
  call void @llvm.lifetime.end.p0(i64 112, ptr nonnull %6) #6
  call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #6
  resume { ptr, i32 } %.pn118.pn.pn
}

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 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 #3 = { "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 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { 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, !11, i64 88}
!6 = !{!"_ZTS8Elements", !7, i64 8, !7, i64 16, !10, i64 24, !11, i64 28, !11, i64 32, !11, i64 36, !11, i64 40, !11, i64 44, !11, i64 48, !11, i64 52, !11, i64 56, !11, i64 60, !11, i64 64, !11, i64 68, !11, i64 72, !11, i64 76, !11, i64 80, !11, i64 84, !11, i64 88, !11, i64 92, !11, i64 96, !12, i64 104, !12, i64 216, !12, i64 328, !12, i64 440, !20, i64 552, !12, i64 576, !12, i64 688, !12, i64 800, !12, i64 912, !12, i64 1024, !24, i64 1136, !24, i64 1248, !24, i64 1360, !24, i64 1472, !24, i64 1584, !15, i64 1696, !15, i64 1720, !15, i64 1744, !15, i64 1768, !12, i64 1792, !12, i64 1904, !12, i64 2016, !12, i64 2128, !12, i64 2240, !12, i64 2352, !12, i64 2464, !12, i64 2576, !12, i64 2688, !12, i64 2800, !12, i64 2912, !12, i64 3024, !12, i64 3136, !12, i64 3248, !12, i64 3360, !12, i64 3472, !12, i64 3584, !12, i64 3696, !12, i64 3808, !12, i64 3920, !12, i64 4032, !12, i64 4144, !12, i64 4256, !12, i64 4368, !12, i64 4480, !12, i64 4592, !12, i64 4704, !12, i64 4816, !12, i64 4928, !12, i64 5040, !12, i64 5152, !12, i64 5264, !12, i64 5376, !12, i64 5488, !12, i64 5600, !12, i64 5712, !12, i64 5824, !12, i64 5936, !11, i64 6048, !15, i64 6056, !15, i64 6080, !15, i64 6104, !15, i64 6128, !15, i64 6152, !15, i64 6176, !15, i64 6200, !25, i64 6224, !12, i64 6248, !12, i64 6360, !12, i64 6472, !12, i64 6584, !12, i64 6696, !12, i64 6808, !12, i64 6920, !12, i64 7032, !12, i64 7144, !13, i64 7256, !13, i64 7264, !13, i64 7272, !13, i64 7280, !13, i64 7288, !12, i64 7296, !12, i64 7408, !12, i64 7520, !12, i64 7632, !12, i64 7744, !12, i64 7856, !12, i64 7968, !12, i64 8080, !12, i64 8192, !12, i64 8304, !12, i64 8416, !12, i64 8528, !12, i64 8640, !12, i64 8752, !12, i64 8864, !12, i64 8976, !12, i64 9088, !12, i64 9200, !12, i64 9312, !12, i64 9424, !12, i64 9536, !12, i64 9648, !12, i64 9760, !12, i64 9872, !12, i64 9984, !12, i64 10096, !12, i64 10208, !12, i64 10320, !12, i64 10432, !12, i64 10544, !12, i64 10656, !12, i64 10768, !12, i64 10880, !12, i64 10992, !12, i64 11104, !12, i64 11216, !12, i64 11328, !12, i64 11440, !12, i64 11552, !12, i64 11664, !12, i64 11776, !12, i64 11888, !12, i64 12000, !29, i64 12112, !29, i64 12344, !12, i64 12576, !12, i64 12688, !12, i64 12800, !12, i64 12912, !12, i64 13024, !12, i64 13136, !11, i64 13248, !12, i64 13256, !12, i64 13368, !11, i64 13480, !7, i64 13488, !25, i64 13496, !24, i64 13520, !12, i64 13632, !12, i64 13744, !12, i64 13856}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTS8ELE_TYPE", !8, i64 0}
!11 = !{!"int", !8, i64 0}
!12 = !{!"_ZTS8mdvectorIdE", !11, i64 0, !13, i64 8, !13, i64 16, !14, i64 24, !14, i64 48, !15, i64 72, !7, i64 96, !19, i64 104}
!13 = !{!"long", !8, i64 0}
!14 = !{!"_ZTSSt5arrayIjLm6EE", !8, i64 0}
!15 = !{!"_ZTSSt6vectorIdSaIdEE", !16, i64 0}
!16 = !{!"_ZTSSt12_Vector_baseIdSaIdEE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE12_Vector_implE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE17_Vector_impl_dataE", !7, i64 0, !7, i64 8, !7, i64 16}
!19 = !{!"bool", !8, i64 0}
!20 = !{!"_ZTSSt6vectorIjSaIjEE", !21, i64 0}
!21 = !{!"_ZTSSt12_Vector_baseIjSaIjEE", !22, i64 0}
!22 = !{!"_ZTSNSt12_Vector_baseIjSaIjEE12_Vector_implE", !23, i64 0}
!23 = !{!"_ZTSNSt12_Vector_baseIjSaIjEE17_Vector_impl_dataE", !7, i64 0, !7, i64 8, !7, i64 16}
!24 = !{!"_ZTS8mdvectorIjE", !11, i64 0, !13, i64 8, !13, i64 16, !14, i64 24, !14, i64 48, !20, i64 72, !7, i64 96, !19, i64 104}
!25 = !{!"_ZTSSt6vectorIiSaIiEE", !26, i64 0}
!26 = !{!"_ZTSSt12_Vector_baseIiSaIiEE", !27, i64 0}
!27 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE12_Vector_implE", !28, i64 0}
!28 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE17_Vector_impl_dataE", !7, i64 0, !7, i64 8, !7, i64 16}
!29 = !{!"_ZTS6mdviewIdE", !30, i64 0, !24, i64 112, !11, i64 224}
!30 = !{!"_ZTS8mdvectorIPdE", !11, i64 0, !13, i64 8, !13, i64 16, !14, i64 24, !14, i64 48, !31, i64 72, !7, i64 96, !19, i64 104}
!31 = !{!"_ZTSSt6vectorIPdSaIS0_EE", !32, i64 0}
!32 = !{!"_ZTSSt12_Vector_baseIPdSaIS0_EE", !33, i64 0}
!33 = !{!"_ZTSNSt12_Vector_baseIPdSaIS0_EE12_Vector_implE", !34, i64 0}
!34 = !{!"_ZTSNSt12_Vector_baseIPdSaIS0_EE17_Vector_impl_dataE", !7, i64 0, !7, i64 8, !7, i64 16}
!35 = !{!11, !11, i64 0}
!36 = !{!6, !11, i64 52}
!37 = distinct !{!37, !38}
!38 = !{!"llvm.loop.mustprogress"}
!39 = !{!40, !40, i64 0}
!40 = !{!"double", !8, i64 0}
!41 = distinct !{!41, !38}
!42 = distinct !{!42, !38}
!43 = distinct !{!43, !38, !44}
!44 = !{!"llvm.loop.unswitch.partial.disable"}
!45 = distinct !{!45, !38}
!46 = distinct !{!46, !38}
!47 = distinct !{!47, !38}
!48 = distinct !{!48, !38}


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