; LLVM IR from chromia/lichtenberg :: src/model (dbmmodel)

; 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.lichtenberg::model::DielectricBreakModel" = type { %"class.lichtenberg::model::BreakModel", i32, i32, i8, double, double, %"class.std::vector", double }
%"class.lichtenberg::model::BreakModel" = type { ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::vector<lichtenberg::model::DBMCell>, std::allocator<std::vector<lichtenberg::model::DBMCell>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<lichtenberg::model::DBMCell>, std::allocator<std::vector<lichtenberg::model::DBMCell>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<lichtenberg::model::DBMCell>, std::allocator<std::vector<lichtenberg::model::DBMCell>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<lichtenberg::model::DBMCell>, std::allocator<std::vector<lichtenberg::model::DBMCell>>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@_ZTVN11lichtenberg5model20DielectricBreakModelE = external dso_local unnamed_addr constant { [7 x ptr] }, align 8
@.str = external hidden unnamed_addr constant [40 x i8], align 1
@_ZTISt13runtime_error = external constant ptr
@.str.1 = external hidden unnamed_addr constant [56 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11lichtenberg5model20DielectricBreakModelC2EiiRKSt6vectorIS2_INS0_7DBMCellESaIS3_EESaIS5_EEdd(ptr noundef nonnull align 8 dereferenceable(72) %0, i32 noundef %1, i32 noundef %2, ptr noundef nonnull align 8 dereferenceable(24) %3, double noundef %4, double noundef %5) unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca double, align 8
  %12 = alloca double, align 8
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  store ptr %0, ptr %7, align 8, !tbaa !5
  store i32 %1, ptr %8, align 4, !tbaa !9
  store i32 %2, ptr %9, align 4, !tbaa !9
  store ptr %3, ptr %10, align 8, !tbaa !5
  store double %4, ptr %11, align 8, !tbaa !11
  store double %5, ptr %12, align 8, !tbaa !11
  %20 = load ptr, ptr %7, align 8
  call void @_ZN11lichtenberg5model10BreakModelC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %20) #7
  store ptr getelementptr inbounds inrange(-16, 40) ({ [7 x ptr] }, ptr @_ZTVN11lichtenberg5model20DielectricBreakModelE, i32 0, i32 0, i32 2), ptr %20, align 8, !tbaa !13
  %21 = getelementptr inbounds %"class.lichtenberg::model::DielectricBreakModel", ptr %20, i32 0, i32 1
  %22 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %22, ptr %21, align 8, !tbaa !15
  %23 = getelementptr inbounds %"class.lichtenberg::model::DielectricBreakModel", ptr %20, i32 0, i32 2
  %24 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %24, ptr %23, align 4, !tbaa !23
  %25 = getelementptr inbounds %"class.lichtenberg::model::DielectricBreakModel", ptr %20, i32 0, i32 3
  store i8 0, ptr %25, align 8, !tbaa !24
  %26 = getelementptr inbounds %"class.lichtenberg::model::DielectricBreakModel", ptr %20, i32 0, i32 4
  %27 = load double, ptr %11, align 8, !tbaa !11
  store double %27, ptr %26, align 8, !tbaa !25
  %28 = getelementptr inbounds %"class.lichtenberg::model::DielectricBreakModel", ptr %20, i32 0, i32 5
  %29 = load double, ptr %12, align 8, !tbaa !11
  store double %29, ptr %28, align 8, !tbaa !26
  %30 = getelementptr inbounds %"class.lichtenberg::model::DielectricBreakModel", ptr %20, i32 0, i32 6
  call void @_ZNSt6vectorIS_IN11lichtenberg5model7DBMCellESaIS2_EESaIS4_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %30) #7
  %31 = getelementptr inbounds %"class.lichtenberg::model::DielectricBreakModel", ptr %20, i32 0, i32 7
  store double 0.000000e+00, ptr %31, align 8, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  %32 = load ptr, ptr %10, align 8, !tbaa !5
  %33 = call noundef i64 @_ZNKSt6vectorIS_IN11lichtenberg5model7DBMCellESaIS2_EESaIS4_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %32) #7
  %34 = trunc i64 %33 to i32
  store i32 %34, ptr %13, align 4, !tbaa !9
  %35 = load i32, ptr %13, align 4, !tbaa !9
  %36 = icmp eq i32 %35, 0
  br i1 %36, label %37, label %48

37:                                               ; preds = %6
  %38 = call ptr @__cxa_allocate_exception(i64 16) #7
  invoke void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %38, ptr noundef @.str)
          to label %39 unwind label %40

39:                                               ; preds = %37
  invoke void @__cxa_throw(ptr %38, ptr @_ZTISt13runtime_error, ptr @_ZNSt13runtime_errorD1Ev) #8
          to label %130 unwind label %44

40:                                               ; preds = %37
  %41 = landingpad { ptr, i32 }
          cleanup
  %42 = extractvalue { ptr, i32 } %41, 0
  store ptr %42, ptr %14, align 8
  %43 = extractvalue { ptr, i32 } %41, 1
  store i32 %43, ptr %15, align 4
  call void @__cxa_free_exception(ptr %38) #7
  br label %124

44:                                               ; preds = %39
  %45 = landingpad { ptr, i32 }
          cleanup
  %46 = extractvalue { ptr, i32 } %45, 0
  store ptr %46, ptr %14, align 8
  %47 = extractvalue { ptr, i32 } %45, 1
  store i32 %47, ptr %15, align 4
  br label %124

48:                                               ; preds = %6
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #7
  %49 = load ptr, ptr %10, align 8, !tbaa !5
  %50 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNKSt6vectorIS_IN11lichtenberg5model7DBMCellESaIS2_EESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %49, i64 noundef 0) #7
  %51 = call noundef i64 @_ZNKSt6vectorIN11lichtenberg5model7DBMCellESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %50) #7
  %52 = trunc i64 %51 to i32
  store i32 %52, ptr %16, align 4, !tbaa !9
  %53 = load i32, ptr %16, align 4, !tbaa !9
  %54 = load i32, ptr %8, align 4, !tbaa !9
  %55 = add nsw i32 %54, 2
  %56 = icmp ne i32 %53, %55
  br i1 %56, label %62, label %57

57:                                               ; preds = %48
  %58 = load i32, ptr %13, align 4, !tbaa !9
  %59 = load i32, ptr %9, align 4, !tbaa !9
  %60 = add nsw i32 %59, 2
  %61 = icmp ne i32 %58, %60
  br i1 %61, label %62, label %73

62:                                               ; preds = %57, %48
  %63 = call ptr @__cxa_allocate_exception(i64 16) #7
  invoke void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %63, ptr noundef @.str.1)
          to label %64 unwind label %65

64:                                               ; preds = %62
  invoke void @__cxa_throw(ptr %63, ptr @_ZTISt13runtime_error, ptr @_ZNSt13runtime_errorD1Ev) #8
          to label %130 unwind label %69

65:                                               ; preds = %62
  %66 = landingpad { ptr, i32 }
          cleanup
  %67 = extractvalue { ptr, i32 } %66, 0
  store ptr %67, ptr %14, align 8
  %68 = extractvalue { ptr, i32 } %66, 1
  store i32 %68, ptr %15, align 4
  call void @__cxa_free_exception(ptr %63) #7
  br label %123

69:                                               ; preds = %73, %64
  %70 = landingpad { ptr, i32 }
          cleanup
  %71 = extractvalue { ptr, i32 } %70, 0
  store ptr %71, ptr %14, align 8
  %72 = extractvalue { ptr, i32 } %70, 1
  store i32 %72, ptr %15, align 4
  br label %123

73:                                               ; preds = %57
  %74 = getelementptr inbounds %"class.lichtenberg::model::DielectricBreakModel", ptr %20, i32 0, i32 6
  %75 = load i32, ptr %13, align 4, !tbaa !9
  %76 = sext i32 %75 to i64
  invoke void @_ZNSt6vectorIS_IN11lichtenberg5model7DBMCellESaIS2_EESaIS4_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %74, i64 noundef %76)
          to label %77 unwind label %69

77:                                               ; preds = %73
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  store i32 0, ptr %17, align 4, !tbaa !9
  br label %78

78:                                               ; preds = %119, %77
  %79 = load i32, ptr %17, align 4, !tbaa !9
  %80 = load i32, ptr %13, align 4, !tbaa !9
  %81 = icmp slt i32 %79, %80
  br i1 %81, label %83, label %82

82:                                               ; preds = %78
  store i32 2, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  br label %122

83:                                               ; preds = %78
  %84 = getelementptr inbounds %"class.lichtenberg::model::DielectricBreakModel", ptr %20, i32 0, i32 6
  %85 = load i32, ptr %17, align 4, !tbaa !9
  %86 = sext i32 %85 to i64
  %87 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IN11lichtenberg5model7DBMCellESaIS2_EESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %84, i64 noundef %86) #7
  %88 = load i32, ptr %16, align 4, !tbaa !9
  %89 = sext i32 %88 to i64
  invoke void @_ZNSt6vectorIN11lichtenberg5model7DBMCellESaIS2_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %87, i64 noundef %89)
          to label %90 unwind label %96

90:                                               ; preds = %83
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #7
  store i32 0, ptr %19, align 4, !tbaa !9
  br label %91

91:                                               ; preds = %115, %90
  %92 = load i32, ptr %19, align 4, !tbaa !9
  %93 = load i32, ptr %16, align 4, !tbaa !9
  %94 = icmp slt i32 %92, %93
  br i1 %94, label %100, label %95

95:                                               ; preds = %91
  store i32 5, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #7
  br label %118

96:                                               ; preds = %83
  %97 = landingpad { ptr, i32 }
          cleanup
  %98 = extractvalue { ptr, i32 } %97, 0
  store ptr %98, ptr %14, align 8
  %99 = extractvalue { ptr, i32 } %97, 1
  store i32 %99, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  br label %123

100:                                              ; preds = %91
  %101 = load ptr, ptr %10, align 8, !tbaa !5
  %102 = load i32, ptr %17, align 4, !tbaa !9
  %103 = sext i32 %102 to i64
  %104 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNKSt6vectorIS_IN11lichtenberg5model7DBMCellESaIS2_EESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %101, i64 noundef %103) #7
  %105 = load i32, ptr %19, align 4, !tbaa !9
  %106 = sext i32 %105 to i64
  %107 = call noundef nonnull align 8 dereferenceable(9) ptr @_ZNKSt6vectorIN11lichtenberg5model7DBMCellESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %104, i64 noundef %106) #7
  %108 = getelementptr inbounds %"class.lichtenberg::model::DielectricBreakModel", ptr %20, i32 0, i32 6
  %109 = load i32, ptr %17, align 4, !tbaa !9
  %110 = sext i32 %109 to i64
  %111 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IN11lichtenberg5model7DBMCellESaIS2_EESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %108, i64 noundef %110) #7
  %112 = load i32, ptr %19, align 4, !tbaa !9
  %113 = sext i32 %112 to i64
  %114 = call noundef nonnull align 8 dereferenceable(9) ptr @_ZNSt6vectorIN11lichtenberg5model7DBMCellESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %111, i64 noundef %113) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %114, ptr align 8 %107, i64 9, i1 false), !tbaa.struct !28
  br label %115

115:                                              ; preds = %100
  %116 = load i32, ptr %19, align 4, !tbaa !9
  %117 = add nsw i32 %116, 1
  store i32 %117, ptr %19, align 4, !tbaa !9
  br label %91, !llvm.loop !30

118:                                              ; preds = %95
  br label %119

119:                                              ; preds = %118
  %120 = load i32, ptr %17, align 4, !tbaa !9
  %121 = add nsw i32 %120, 1
  store i32 %121, ptr %17, align 4, !tbaa !9
  br label %78, !llvm.loop !32

122:                                              ; preds = %82
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  ret void

123:                                              ; preds = %96, %69, %65
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  br label %124

124:                                              ; preds = %123, %44, %40
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  call void @_ZNSt6vectorIS_IN11lichtenberg5model7DBMCellESaIS2_EESaIS4_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %30) #7
  call void @_ZN11lichtenberg5model10BreakModelD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %20) #7
  br label %125

125:                                              ; preds = %124
  %126 = load ptr, ptr %14, align 8
  %127 = load i32, ptr %15, align 4
  %128 = insertvalue { ptr, i32 } poison, ptr %126, 0
  %129 = insertvalue { ptr, i32 } %128, i32 %127, 1
  resume { ptr, i32 } %129

130:                                              ; preds = %64, %39
  unreachable
}

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

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

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

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

declare ptr @__cxa_allocate_exception(i64)

declare void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) unnamed_addr #4

declare i32 @__gxx_personality_v0(...)

declare void @__cxa_free_exception(ptr)

; Function Attrs: nounwind
declare void @_ZNSt13runtime_errorD1Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #5

declare void @__cxa_throw(ptr, ptr, ptr)

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

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

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

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

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

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

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

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

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

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

; Function Attrs: nounwind
declare void @_ZN11lichtenberg5model10BreakModelD2Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #5

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { inlinehint 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 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 #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #7 = { nounwind }
attributes #8 = { noreturn }

!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, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"vtable pointer", !8, i64 0}
!15 = !{!16, !10, i64 8}
!16 = !{!"_ZTSN11lichtenberg5model20DielectricBreakModelE", !17, i64 0, !10, i64 8, !10, i64 12, !18, i64 16, !12, i64 24, !12, i64 32, !19, i64 40, !12, i64 64}
!17 = !{!"_ZTSN11lichtenberg5model10BreakModelE"}
!18 = !{!"bool", !7, i64 0}
!19 = !{!"_ZTSSt6vectorIS_IN11lichtenberg5model7DBMCellESaIS2_EESaIS4_EE", !20, i64 0}
!20 = !{!"_ZTSSt12_Vector_baseISt6vectorIN11lichtenberg5model7DBMCellESaIS3_EESaIS5_EE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseISt6vectorIN11lichtenberg5model7DBMCellESaIS3_EESaIS5_EE12_Vector_implE", !22, i64 0}
!22 = !{!"_ZTSNSt12_Vector_baseISt6vectorIN11lichtenberg5model7DBMCellESaIS3_EESaIS5_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!23 = !{!16, !10, i64 12}
!24 = !{!16, !18, i64 16}
!25 = !{!16, !12, i64 24}
!26 = !{!16, !12, i64 32}
!27 = !{!16, !12, i64 64}
!28 = !{i64 0, i64 8, !11, i64 8, i64 1, !29}
!29 = !{!18, !18, i64 0}
!30 = distinct !{!30, !31}
!31 = !{!"llvm.loop.mustprogress"}
!32 = distinct !{!32, !31}


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

@_ZTVN11lichtenberg5model20DielectricBreakModelE = external dso_local unnamed_addr constant { [7 x ptr] }, align 8
@.str = external hidden unnamed_addr constant [40 x i8], align 1
@_ZTISt13runtime_error = external constant ptr
@.str.1 = external hidden unnamed_addr constant [56 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11lichtenberg5model20DielectricBreakModelC2EiiRKSt6vectorIS2_INS0_7DBMCellESaIS3_EESaIS5_EEdd(ptr noundef nonnull align 8 dereferenceable(72) %0, i32 noundef %1, i32 noundef %2, ptr noundef nonnull align 8 dereferenceable(24) %3, double noundef %4, double noundef %5) unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  tail call void @_ZN11lichtenberg5model10BreakModelC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %0) #6
  store ptr getelementptr inbounds inrange(-16, 40) (i8, ptr @_ZTVN11lichtenberg5model20DielectricBreakModelE, i64 16), ptr %0, align 8, !tbaa !5
  %7 = getelementptr inbounds i8, ptr %0, i64 8
  store i32 %1, ptr %7, align 8, !tbaa !8
  %8 = getelementptr inbounds i8, ptr %0, i64 12
  store i32 %2, ptr %8, align 4, !tbaa !20
  %9 = getelementptr inbounds i8, ptr %0, i64 16
  store i8 0, ptr %9, align 8, !tbaa !21
  %10 = getelementptr inbounds i8, ptr %0, i64 24
  store double %4, ptr %10, align 8, !tbaa !22
  %11 = getelementptr inbounds i8, ptr %0, i64 32
  store double %5, ptr %11, align 8, !tbaa !23
  %12 = getelementptr inbounds i8, ptr %0, i64 40
  tail call void @_ZNSt6vectorIS_IN11lichtenberg5model7DBMCellESaIS2_EESaIS4_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #6
  %13 = getelementptr inbounds i8, ptr %0, i64 64
  store double 0.000000e+00, ptr %13, align 8, !tbaa !24
  %14 = tail call noundef i64 @_ZNKSt6vectorIS_IN11lichtenberg5model7DBMCellESaIS2_EESaIS4_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #6
  %15 = trunc i64 %14 to i32
  %16 = icmp eq i32 %15, 0
  br i1 %16, label %17, label %24

17:                                               ; preds = %6
  %18 = tail call ptr @__cxa_allocate_exception(i64 16) #6
  invoke void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %18, ptr noundef nonnull @.str)
          to label %19 unwind label %20

19:                                               ; preds = %17
  invoke void @__cxa_throw(ptr nonnull %18, ptr nonnull @_ZTISt13runtime_error, ptr nonnull @_ZNSt13runtime_errorD1Ev) #7
          to label %51 unwind label %22

20:                                               ; preds = %17
  %21 = landingpad { ptr, i32 }
          cleanup
  tail call void @__cxa_free_exception(ptr %18) #6
  br label %50

22:                                               ; preds = %19
  %23 = landingpad { ptr, i32 }
          cleanup
  br label %50

24:                                               ; preds = %6
  %25 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNKSt6vectorIS_IN11lichtenberg5model7DBMCellESaIS2_EESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef 0) #6
  %26 = tail call noundef i64 @_ZNKSt6vectorIN11lichtenberg5model7DBMCellESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %25) #6
  %27 = trunc i64 %26 to i32
  %28 = add nsw i32 %1, 2
  %.not = icmp eq i32 %28, %27
  %29 = add nsw i32 %2, 2
  %.not33 = icmp eq i32 %29, %15
  %or.cond = select i1 %.not, i1 %.not33, i1 false
  br i1 %or.cond, label %37, label %30

30:                                               ; preds = %24
  %31 = tail call ptr @__cxa_allocate_exception(i64 16) #6
  invoke void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %31, ptr noundef nonnull @.str.1)
          to label %32 unwind label %33

32:                                               ; preds = %30
  invoke void @__cxa_throw(ptr nonnull %31, ptr nonnull @_ZTISt13runtime_error, ptr nonnull @_ZNSt13runtime_errorD1Ev) #7
          to label %51 unwind label %35

33:                                               ; preds = %30
  %34 = landingpad { ptr, i32 }
          cleanup
  tail call void @__cxa_free_exception(ptr %31) #6
  br label %50

35:                                               ; preds = %37, %32
  %36 = landingpad { ptr, i32 }
          cleanup
  br label %50

37:                                               ; preds = %24
  %sext = shl i64 %14, 32
  %38 = ashr exact i64 %sext, 32
  invoke void @_ZNSt6vectorIS_IN11lichtenberg5model7DBMCellESaIS2_EESaIS4_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %38)
          to label %.preheader38 unwind label %35

.preheader38:                                     ; preds = %37
  %39 = icmp sgt i32 %15, 0
  br i1 %39, label %.lr.ph41, label %._crit_edge42

.lr.ph41:                                         ; preds = %.preheader38
  %sext34 = shl i64 %26, 32
  %40 = ashr exact i64 %sext34, 32
  %41 = icmp sgt i32 %27, 0
  %wide.trip.count53 = and i64 %14, 2147483647
  br i1 %41, label %.lr.ph41.split.us.preheader, label %.lr.ph41.split

.lr.ph41.split.us.preheader:                      ; preds = %.lr.ph41
  %wide.trip.count48 = and i64 %26, 2147483647
  br label %.lr.ph41.split.us

.lr.ph41.split.us:                                ; preds = %.lr.ph41.split.us.preheader, %._crit_edge.us
  %indvars.iv50 = phi i64 [ 0, %.lr.ph41.split.us.preheader ], [ %indvars.iv.next51, %._crit_edge.us ]
  %42 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IN11lichtenberg5model7DBMCellESaIS2_EESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %indvars.iv50) #6
  invoke void @_ZNSt6vectorIN11lichtenberg5model7DBMCellESaIS2_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %42, i64 noundef %40)
          to label %.preheader.us unwind label %.split.us

.preheader.us:                                    ; preds = %.lr.ph41.split.us, %.preheader.us
  %indvars.iv45 = phi i64 [ %indvars.iv.next46, %.preheader.us ], [ 0, %.lr.ph41.split.us ]
  %43 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNKSt6vectorIS_IN11lichtenberg5model7DBMCellESaIS2_EESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %indvars.iv50) #6
  %44 = tail call noundef nonnull align 8 dereferenceable(9) ptr @_ZNKSt6vectorIN11lichtenberg5model7DBMCellESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %43, i64 noundef %indvars.iv45) #6
  %45 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IN11lichtenberg5model7DBMCellESaIS2_EESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %indvars.iv50) #6
  %46 = tail call noundef nonnull align 8 dereferenceable(9) ptr @_ZNSt6vectorIN11lichtenberg5model7DBMCellESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %45, i64 noundef %indvars.iv45) #6
  tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(9) %46, ptr noundef nonnull align 8 dereferenceable(9) %44, i64 9, i1 false), !tbaa.struct !25
  %indvars.iv.next46 = add nuw nsw i64 %indvars.iv45, 1
  %exitcond49.not = icmp eq i64 %indvars.iv.next46, %wide.trip.count48
  br i1 %exitcond49.not, label %._crit_edge.us, label %.preheader.us, !llvm.loop !28

._crit_edge.us:                                   ; preds = %.preheader.us
  %indvars.iv.next51 = add nuw nsw i64 %indvars.iv50, 1
  %exitcond54.not = icmp eq i64 %indvars.iv.next51, %wide.trip.count53
  br i1 %exitcond54.not, label %._crit_edge42, label %.lr.ph41.split.us, !llvm.loop !30

.split.us:                                        ; preds = %.lr.ph41.split.us
  %47 = landingpad { ptr, i32 }
          cleanup
  br label %50

._crit_edge42:                                    ; preds = %.preheader, %._crit_edge.us, %.preheader38
  ret void

.lr.ph41.split:                                   ; preds = %.lr.ph41, %.preheader
  %indvars.iv = phi i64 [ %indvars.iv.next, %.preheader ], [ 0, %.lr.ph41 ]
  %48 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IN11lichtenberg5model7DBMCellESaIS2_EESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %indvars.iv) #6
  invoke void @_ZNSt6vectorIN11lichtenberg5model7DBMCellESaIS2_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %48, i64 noundef %40)
          to label %.preheader unwind label %.split

.preheader:                                       ; preds = %.lr.ph41.split
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count53
  br i1 %exitcond.not, label %._crit_edge42, label %.lr.ph41.split, !llvm.loop !30

.split:                                           ; preds = %.lr.ph41.split
  %49 = landingpad { ptr, i32 }
          cleanup
  br label %50

50:                                               ; preds = %.split, %.split.us, %33, %35, %22, %20
  %.pn36 = phi { ptr, i32 } [ %23, %22 ], [ %21, %20 ], [ %36, %35 ], [ %34, %33 ], [ %49, %.split ], [ %47, %.split.us ]
  tail call void @_ZNSt6vectorIS_IN11lichtenberg5model7DBMCellESaIS2_EESaIS4_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #6
  tail call void @_ZN11lichtenberg5model10BreakModelD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %0) #6
  resume { ptr, i32 } %.pn36

51:                                               ; preds = %32, %19
  unreachable
}

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

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

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

declare ptr @__cxa_allocate_exception(i64) local_unnamed_addr

declare void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) unnamed_addr #3

declare i32 @__gxx_personality_v0(...)

declare void @__cxa_free_exception(ptr) local_unnamed_addr

; Function Attrs: nounwind
declare void @_ZNSt13runtime_errorD1Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #4

declare void @__cxa_throw(ptr, ptr, ptr) local_unnamed_addr

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

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

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

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

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

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

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

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

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

; Function Attrs: nounwind
declare void @_ZN11lichtenberg5model10BreakModelD2Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #4

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { inlinehint 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 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 #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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #6 = { nounwind }
attributes #7 = { noreturn }

!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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !11, i64 8}
!9 = !{!"_ZTSN11lichtenberg5model20DielectricBreakModelE", !10, i64 0, !11, i64 8, !11, i64 12, !13, i64 16, !14, i64 24, !14, i64 32, !15, i64 40, !14, i64 64}
!10 = !{!"_ZTSN11lichtenberg5model10BreakModelE"}
!11 = !{!"int", !12, i64 0}
!12 = !{!"omnipotent char", !7, i64 0}
!13 = !{!"bool", !12, i64 0}
!14 = !{!"double", !12, i64 0}
!15 = !{!"_ZTSSt6vectorIS_IN11lichtenberg5model7DBMCellESaIS2_EESaIS4_EE", !16, i64 0}
!16 = !{!"_ZTSSt12_Vector_baseISt6vectorIN11lichtenberg5model7DBMCellESaIS3_EESaIS5_EE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseISt6vectorIN11lichtenberg5model7DBMCellESaIS3_EESaIS5_EE12_Vector_implE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseISt6vectorIN11lichtenberg5model7DBMCellESaIS3_EESaIS5_EE17_Vector_impl_dataE", !19, i64 0, !19, i64 8, !19, i64 16}
!19 = !{!"any pointer", !12, i64 0}
!20 = !{!9, !11, i64 12}
!21 = !{!9, !13, i64 16}
!22 = !{!9, !14, i64 24}
!23 = !{!9, !14, i64 32}
!24 = !{!9, !14, i64 64}
!25 = !{i64 0, i64 8, !26, i64 8, i64 1, !27}
!26 = !{!14, !14, i64 0}
!27 = !{!13, !13, i64 0}
!28 = distinct !{!28, !29}
!29 = !{!"llvm.loop.mustprogress"}
!30 = distinct !{!30, !29}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass