; LLVM IR from buresjan/optim_lbm :: nomad/src/Math/ArrayOfDouble.ll (ZNK9NOMAD_4_313ArrayOfDoublemiERKS0_)

; 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.NOMAD_4_3::ArrayOfDouble" = type { ptr, i64, ptr }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::allocator" = type { i8 }
%"class.NOMAD_4_3::Double" = type <{ ptr, double, i8, [7 x i8] }>

@.str.13 = external hidden unnamed_addr constant [85 x i8], align 1
@_ZTIN9NOMAD_4_39ExceptionE = external constant ptr
@.str.41 = external hidden unnamed_addr constant [24 x i8], align 1

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

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

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

declare i32 @__gxx_personality_v0(...)

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

; 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 void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #1 align 2

declare void @_ZN9NOMAD_4_36DoubleC1Ev(ptr noundef nonnull align 8 dereferenceable(17)) unnamed_addr #3

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

declare ptr @__cxa_allocate_exception(i64)

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN9NOMAD_4_39ExceptionC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmS8_(ptr noundef nonnull align 8 dereferenceable(112), ptr noundef nonnull align 8 dereferenceable(32), i64 noundef, ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #2 align 2

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

declare void @__cxa_throw(ptr, ptr, ptr)

declare void @__cxa_free_exception(ptr)

declare noundef nonnull align 8 dereferenceable(17) ptr @_ZN9NOMAD_4_36DoubleaSERKS0_(ptr noundef nonnull align 8 dereferenceable(17), ptr noundef nonnull align 8 dereferenceable(17)) #3

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK9NOMAD_4_313ArrayOfDoublemiERKS0_(ptr dead_on_unwind noalias writable sret(%"class.NOMAD_4_3::ArrayOfDouble") align 8 %0, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 8 dereferenceable(24) %2) #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 %"class.std::__cxx11::basic_string", align 8
  %8 = alloca %"class.std::allocator", align 1
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca %"class.std::__cxx11::basic_string", align 8
  %12 = alloca %"class.std::allocator", align 1
  %13 = alloca i1, align 1
  %14 = alloca i1, align 1
  %15 = alloca %"class.NOMAD_4_3::Double", align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca i64, align 8
  %20 = alloca %"class.NOMAD_4_3::Double", align 8
  store ptr %0, ptr %4, align 8
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  %21 = load ptr, ptr %5, align 8
  %22 = load ptr, ptr %6, align 8, !tbaa !5
  %23 = getelementptr inbounds %"class.NOMAD_4_3::ArrayOfDouble", ptr %22, i32 0, i32 1
  %24 = load i64, ptr %23, align 8, !tbaa !9
  %25 = getelementptr inbounds %"class.NOMAD_4_3::ArrayOfDouble", ptr %21, i32 0, i32 1
  %26 = load i64, ptr %25, align 8, !tbaa !9
  %27 = icmp ne i64 %24, %26
  br i1 %27, label %28, label %50

28:                                               ; preds = %3
  store i1 true, ptr %13, align 1
  %29 = call ptr @__cxa_allocate_exception(i64 112) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr %7) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %8) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %7, ptr noundef @.str.13, ptr noundef nonnull align 1 dereferenceable(1) %8)
          to label %30 unwind label %33

30:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 32, ptr %11) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %12) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %11, ptr noundef @.str.41, ptr noundef nonnull align 1 dereferenceable(1) %12)
          to label %31 unwind label %37

31:                                               ; preds = %30
  invoke void @_ZN9NOMAD_4_39ExceptionC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmS8_(ptr noundef nonnull align 8 dereferenceable(112) %29, ptr noundef nonnull align 8 dereferenceable(32) %7, i64 noundef 565, ptr noundef nonnull align 8 dereferenceable(32) %11)
          to label %32 unwind label %41

32:                                               ; preds = %31
  store i1 false, ptr %13, align 1
  invoke void @__cxa_throw(ptr %29, ptr @_ZTIN9NOMAD_4_39ExceptionE, ptr @_ZN9NOMAD_4_39ExceptionD2Ev) #7
          to label %105 unwind label %41

33:                                               ; preds = %28
  %34 = landingpad { ptr, i32 }
          cleanup
  %35 = extractvalue { ptr, i32 } %34, 0
  store ptr %35, ptr %9, align 8
  %36 = extractvalue { ptr, i32 } %34, 1
  store i32 %36, ptr %10, align 4
  br label %46

37:                                               ; preds = %30
  %38 = landingpad { ptr, i32 }
          cleanup
  %39 = extractvalue { ptr, i32 } %38, 0
  store ptr %39, ptr %9, align 8
  %40 = extractvalue { ptr, i32 } %38, 1
  store i32 %40, ptr %10, align 4
  br label %45

41:                                               ; preds = %32, %31
  %42 = landingpad { ptr, i32 }
          cleanup
  %43 = extractvalue { ptr, i32 } %42, 0
  store ptr %43, ptr %9, align 8
  %44 = extractvalue { ptr, i32 } %42, 1
  store i32 %44, ptr %10, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #6
  br label %45

45:                                               ; preds = %41, %37
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #6
  br label %46

46:                                               ; preds = %45, %33
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %7) #6
  %47 = load i1, ptr %13, align 1
  br i1 %47, label %48, label %49

48:                                               ; preds = %46
  call void @__cxa_free_exception(ptr %29) #6
  br label %49

49:                                               ; preds = %48, %46
  br label %100

50:                                               ; preds = %3
  store i1 false, ptr %14, align 1
  %51 = getelementptr inbounds %"class.NOMAD_4_3::ArrayOfDouble", ptr %21, i32 0, i32 1
  %52 = load i64, ptr %51, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 24, ptr %15) #6
  call void @_ZN9NOMAD_4_36DoubleC1Ev(ptr noundef nonnull align 8 dereferenceable(17) %15)
  invoke void @_ZN9NOMAD_4_313ArrayOfDoubleC1EmRKNS_6DoubleE(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %52, ptr noundef nonnull align 8 dereferenceable(17) %15)
          to label %53 unwind label %67

53:                                               ; preds = %50
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %15) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %15) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  %54 = getelementptr inbounds %"class.NOMAD_4_3::ArrayOfDouble", ptr %0, i32 0, i32 2
  %55 = load ptr, ptr %54, align 8, !tbaa !12
  store ptr %55, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #6
  %56 = getelementptr inbounds %"class.NOMAD_4_3::ArrayOfDouble", ptr %21, i32 0, i32 2
  %57 = load ptr, ptr %56, align 8, !tbaa !12
  store ptr %57, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #6
  %58 = load ptr, ptr %6, align 8, !tbaa !5
  %59 = getelementptr inbounds %"class.NOMAD_4_3::ArrayOfDouble", ptr %58, i32 0, i32 2
  %60 = load ptr, ptr %59, align 8, !tbaa !12
  store ptr %60, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #6
  store i64 0, ptr %19, align 8, !tbaa !13
  br label %61

61:                                               ; preds = %78, %53
  %62 = load i64, ptr %19, align 8, !tbaa !13
  %63 = getelementptr inbounds %"class.NOMAD_4_3::ArrayOfDouble", ptr %21, i32 0, i32 1
  %64 = load i64, ptr %63, align 8, !tbaa !9
  %65 = icmp ult i64 %62, %64
  br i1 %65, label %71, label %66

66:                                               ; preds = %61
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #6
  br label %96

67:                                               ; preds = %50
  %68 = landingpad { ptr, i32 }
          cleanup
  %69 = extractvalue { ptr, i32 } %68, 0
  store ptr %69, ptr %9, align 8
  %70 = extractvalue { ptr, i32 } %68, 1
  store i32 %70, ptr %10, align 4
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %15) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %15) #6
  br label %100

71:                                               ; preds = %61
  call void @llvm.lifetime.start.p0(i64 24, ptr %20) #6
  %72 = load ptr, ptr %17, align 8, !tbaa !5
  %73 = load ptr, ptr %18, align 8, !tbaa !5
  invoke void @_ZN9NOMAD_4_3miERKNS_6DoubleES2_(ptr dead_on_unwind writable sret(%"class.NOMAD_4_3::Double") align 8 %20, ptr noundef nonnull align 8 dereferenceable(17) %72, ptr noundef nonnull align 8 dereferenceable(17) %73)
          to label %74 unwind label %87

74:                                               ; preds = %71
  %75 = load ptr, ptr %16, align 8, !tbaa !5
  %76 = invoke noundef nonnull align 8 dereferenceable(17) ptr @_ZN9NOMAD_4_36DoubleaSERKS0_(ptr noundef nonnull align 8 dereferenceable(17) %75, ptr noundef nonnull align 8 dereferenceable(17) %20)
          to label %77 unwind label %91

77:                                               ; preds = %74
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %20) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %20) #6
  br label %78

78:                                               ; preds = %77
  %79 = load i64, ptr %19, align 8, !tbaa !13
  %80 = add i64 %79, 1
  store i64 %80, ptr %19, align 8, !tbaa !13
  %81 = load ptr, ptr %16, align 8, !tbaa !5
  %82 = getelementptr inbounds %"class.NOMAD_4_3::Double", ptr %81, i32 1
  store ptr %82, ptr %16, align 8, !tbaa !5
  %83 = load ptr, ptr %17, align 8, !tbaa !5
  %84 = getelementptr inbounds %"class.NOMAD_4_3::Double", ptr %83, i32 1
  store ptr %84, ptr %17, align 8, !tbaa !5
  %85 = load ptr, ptr %18, align 8, !tbaa !5
  %86 = getelementptr inbounds %"class.NOMAD_4_3::Double", ptr %85, i32 1
  store ptr %86, ptr %18, align 8, !tbaa !5
  br label %61, !llvm.loop !14

87:                                               ; preds = %71
  %88 = landingpad { ptr, i32 }
          cleanup
  %89 = extractvalue { ptr, i32 } %88, 0
  store ptr %89, ptr %9, align 8
  %90 = extractvalue { ptr, i32 } %88, 1
  store i32 %90, ptr %10, align 4
  br label %95

91:                                               ; preds = %74
  %92 = landingpad { ptr, i32 }
          cleanup
  %93 = extractvalue { ptr, i32 } %92, 0
  store ptr %93, ptr %9, align 8
  %94 = extractvalue { ptr, i32 } %92, 1
  store i32 %94, ptr %10, align 4
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %20) #6
  br label %95

95:                                               ; preds = %91, %87
  call void @llvm.lifetime.end.p0(i64 24, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  call void @_ZN9NOMAD_4_313ArrayOfDoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #6
  br label %100

96:                                               ; preds = %66
  store i1 true, ptr %14, align 1
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  %97 = load i1, ptr %14, align 1
  br i1 %97, label %99, label %98

98:                                               ; preds = %96
  call void @_ZN9NOMAD_4_313ArrayOfDoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #6
  br label %99

99:                                               ; preds = %98, %96
  ret void

100:                                              ; preds = %95, %67, %49
  %101 = load ptr, ptr %9, align 8
  %102 = load i32, ptr %10, align 4
  %103 = insertvalue { ptr, i32 } poison, ptr %101, 0
  %104 = insertvalue { ptr, i32 } %103, i32 %102, 1
  resume { ptr, i32 } %104

105:                                              ; preds = %32
  unreachable
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN9NOMAD_4_3miERKNS_6DoubleES2_(ptr dead_on_unwind noalias writable sret(%"class.NOMAD_4_3::Double") align 8, ptr noundef nonnull align 8 dereferenceable(17), ptr noundef nonnull align 8 dereferenceable(17)) #5

declare void @_ZN9NOMAD_4_313ArrayOfDoubleC1EmRKNS_6DoubleE(ptr, i64, ptr)

declare void @_ZN9NOMAD_4_313ArrayOfDoubleD1Ev(ptr)

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 = { inlinehint 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 #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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !11, i64 8}
!10 = !{!"_ZTSN9NOMAD_4_313ArrayOfDoubleE", !11, i64 8, !6, i64 16}
!11 = !{!"long", !7, i64 0}
!12 = !{!10, !6, i64 16}
!13 = !{!11, !11, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}


; 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.NOMAD_4_3::ArrayOfDouble" = type { ptr, i64, ptr }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::allocator" = type { i8 }
%"class.NOMAD_4_3::Double" = type <{ ptr, double, i8, [7 x i8] }>

@.str.13 = external hidden unnamed_addr constant [85 x i8], align 1
@_ZTIN9NOMAD_4_39ExceptionE = external constant ptr
@.str.41 = external hidden unnamed_addr constant [24 x i8], align 1

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

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

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

declare i32 @__gxx_personality_v0(...)

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

; 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 void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #1 align 2

declare void @_ZN9NOMAD_4_36DoubleC1Ev(ptr noundef nonnull align 8 dereferenceable(17)) unnamed_addr #3

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

declare ptr @__cxa_allocate_exception(i64) local_unnamed_addr

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN9NOMAD_4_39ExceptionC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmS8_(ptr noundef nonnull align 8 dereferenceable(112), ptr noundef nonnull align 8 dereferenceable(32), i64 noundef, ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #2 align 2

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

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

declare void @__cxa_free_exception(ptr) local_unnamed_addr

declare noundef nonnull align 8 dereferenceable(17) ptr @_ZN9NOMAD_4_36DoubleaSERKS0_(ptr noundef nonnull align 8 dereferenceable(17), ptr noundef nonnull align 8 dereferenceable(17)) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK9NOMAD_4_313ArrayOfDoublemiERKS0_(ptr dead_on_unwind noalias writable sret(%"class.NOMAD_4_3::ArrayOfDouble") align 8 %0, ptr nocapture noundef nonnull readonly align 8 dereferenceable(24) %1, ptr nocapture noundef nonnull readonly align 8 dereferenceable(24) %2) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"class.std::__cxx11::basic_string", align 8
  %5 = alloca %"class.std::allocator", align 1
  %6 = alloca %"class.std::__cxx11::basic_string", align 8
  %7 = alloca %"class.std::allocator", align 1
  %8 = alloca %"class.NOMAD_4_3::Double", align 8
  %9 = alloca %"class.NOMAD_4_3::Double", align 8
  %10 = getelementptr inbounds i8, ptr %2, i64 8
  %11 = load i64, ptr %10, align 8, !tbaa !5
  %12 = getelementptr inbounds i8, ptr %1, i64 8
  %13 = load i64, ptr %12, align 8, !tbaa !5
  %.not = icmp eq i64 %11, %13
  br i1 %.not, label %26, label %14

14:                                               ; preds = %3
  %15 = tail call ptr @__cxa_allocate_exception(i64 112) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %5) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef nonnull @.str.13, ptr noundef nonnull align 1 dereferenceable(1) %5)
          to label %16 unwind label %.thread

16:                                               ; preds = %14
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %7) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef nonnull @.str.41, ptr noundef nonnull align 1 dereferenceable(1) %7)
          to label %17 unwind label %20

17:                                               ; preds = %16
  invoke void @_ZN9NOMAD_4_39ExceptionC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmS8_(ptr noundef nonnull align 8 dereferenceable(112) %15, ptr noundef nonnull align 8 dereferenceable(32) %4, i64 noundef 565, ptr noundef nonnull align 8 dereferenceable(32) %6)
          to label %18 unwind label %22

18:                                               ; preds = %17
  invoke void @__cxa_throw(ptr nonnull %15, ptr nonnull @_ZTIN9NOMAD_4_39ExceptionE, ptr nonnull @_ZN9NOMAD_4_39ExceptionD2Ev) #7
          to label %52 unwind label %22

.thread:                                          ; preds = %14
  %19 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #6
  br label %25

20:                                               ; preds = %16
  %21 = landingpad { ptr, i32 }
          cleanup
  br label %24

22:                                               ; preds = %18, %17
  %.017 = phi i1 [ false, %18 ], [ true, %17 ]
  %23 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #6
  br label %24

24:                                               ; preds = %20, %22
  %.pn27 = phi { ptr, i32 } [ %23, %22 ], [ %21, %20 ]
  %.1 = phi i1 [ %.017, %22 ], [ true, %20 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #6
  br i1 %.1, label %25, label %51

25:                                               ; preds = %.thread, %24
  %.pn27.pn33 = phi { ptr, i32 } [ %19, %.thread ], [ %.pn27, %24 ]
  call void @__cxa_free_exception(ptr %15) #6
  br label %51

26:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %8) #6
  call void @_ZN9NOMAD_4_36DoubleC1Ev(ptr noundef nonnull align 8 dereferenceable(17) %8)
  invoke void @_ZN9NOMAD_4_313ArrayOfDoubleC1EmRKNS_6DoubleE(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %11, ptr noundef nonnull align 8 dereferenceable(17) %8)
          to label %27 unwind label %35

27:                                               ; preds = %26
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %8) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #6
  %28 = load i64, ptr %12, align 8, !tbaa !5
  %.not38 = icmp eq i64 %28, 0
  br i1 %.not38, label %._crit_edge, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %27
  %29 = getelementptr inbounds i8, ptr %2, i64 16
  %30 = load ptr, ptr %29, align 8, !tbaa !11
  %31 = getelementptr inbounds i8, ptr %1, i64 16
  %32 = load ptr, ptr %31, align 8, !tbaa !11
  %33 = getelementptr inbounds i8, ptr %0, i64 16
  %34 = load ptr, ptr %33, align 8, !tbaa !11
  br label %.lr.ph

35:                                               ; preds = %26
  %36 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %8) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #6
  br label %51

.lr.ph:                                           ; preds = %.lr.ph.preheader, %39
  %.037 = phi i64 [ %40, %39 ], [ 0, %.lr.ph.preheader ]
  %.01436 = phi ptr [ %43, %39 ], [ %30, %.lr.ph.preheader ]
  %.01535 = phi ptr [ %42, %39 ], [ %32, %.lr.ph.preheader ]
  %.01634 = phi ptr [ %41, %39 ], [ %34, %.lr.ph.preheader ]
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %9) #6
  invoke void @_ZN9NOMAD_4_3miERKNS_6DoubleES2_(ptr dead_on_unwind nonnull writable sret(%"class.NOMAD_4_3::Double") align 8 %9, ptr noundef nonnull align 8 dereferenceable(17) %.01535, ptr noundef nonnull align 8 dereferenceable(17) %.01436)
          to label %37 unwind label %46

37:                                               ; preds = %.lr.ph
  %38 = invoke noundef nonnull align 8 dereferenceable(17) ptr @_ZN9NOMAD_4_36DoubleaSERKS0_(ptr noundef nonnull align 8 dereferenceable(17) %.01634, ptr noundef nonnull align 8 dereferenceable(17) %9)
          to label %39 unwind label %48

39:                                               ; preds = %37
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %9) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #6
  %40 = add nuw i64 %.037, 1
  %41 = getelementptr inbounds i8, ptr %.01634, i64 24
  %42 = getelementptr inbounds i8, ptr %.01535, i64 24
  %43 = getelementptr inbounds i8, ptr %.01436, i64 24
  %44 = load i64, ptr %12, align 8, !tbaa !5
  %45 = icmp ult i64 %40, %44
  br i1 %45, label %.lr.ph, label %._crit_edge, !llvm.loop !12

46:                                               ; preds = %.lr.ph
  %47 = landingpad { ptr, i32 }
          cleanup
  br label %50

48:                                               ; preds = %37
  %49 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %9) #6
  br label %50

50:                                               ; preds = %48, %46
  %.pn = phi { ptr, i32 } [ %49, %48 ], [ %47, %46 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #6
  call void @_ZN9NOMAD_4_313ArrayOfDoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #6
  br label %51

._crit_edge:                                      ; preds = %39, %27
  ret void

51:                                               ; preds = %24, %25, %50, %35
  %.pn27.pn.pn = phi { ptr, i32 } [ %.pn27.pn33, %25 ], [ %.pn27, %24 ], [ %.pn, %50 ], [ %36, %35 ]
  resume { ptr, i32 } %.pn27.pn.pn

52:                                               ; preds = %18
  unreachable
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN9NOMAD_4_3miERKNS_6DoubleES2_(ptr dead_on_unwind noalias writable sret(%"class.NOMAD_4_3::Double") align 8, ptr noundef nonnull align 8 dereferenceable(17), ptr noundef nonnull align 8 dereferenceable(17)) local_unnamed_addr #5

declare void @_ZN9NOMAD_4_313ArrayOfDoubleC1EmRKNS_6DoubleE(ptr, i64, ptr) local_unnamed_addr

declare void @_ZN9NOMAD_4_313ArrayOfDoubleD1Ev(ptr) local_unnamed_addr

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 = { 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 = { inlinehint 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 #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, !7, i64 8}
!6 = !{!"_ZTSN9NOMAD_4_313ArrayOfDoubleE", !7, i64 8, !10, i64 16}
!7 = !{!"long", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!6, !10, i64 16}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}


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