; LLVM IR from buresjan/optim_lbm :: nomad/src/Eval (BBOutput)

; 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.NOMAD_4_3::Double" = type <{ ptr, double, i8, [7 x i8] }>
%"class.NOMAD_4_3::BBOutput" = type <{ %"class.std::__cxx11::basic_string", %"class.NOMAD_4_3::ArrayOfDouble", i8, [7 x i8] }>
%"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] }

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

declare i32 @__gxx_personality_v0(...)

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

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

declare void @_ZN9NOMAD_4_313ArrayOfDoubleC1EmRKNS_6DoubleE(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, ptr noundef nonnull align 8 dereferenceable(17)) unnamed_addr #1

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

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

declare noundef nonnull align 8 dereferenceable(17) ptr @_ZNK9NOMAD_4_313ArrayOfDoubleixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #1

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)) #1

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt6vectorIN9NOMAD_4_312BBOutputTypeESaIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24)) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK9NOMAD_4_38BBOutput14checkSizeMatchERKSt6vectorINS_12BBOutputTypeESaIS2_EE(ptr noundef nonnull align 8 dereferenceable(57), ptr noundef nonnull align 8 dereferenceable(24)) #4 align 2

declare void @_ZN9NOMAD_4_313ArrayOfDouble6resizeEmRKNS_6DoubleE(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, ptr noundef nonnull align 8 dereferenceable(17)) #1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK9NOMAD_4_38BBOutput14getConstraintsERKSt6vectorINS_12BBOutputTypeESaIS2_EE(ptr dead_on_unwind noalias writable sret(%"class.NOMAD_4_3::ArrayOfDouble") align 8 %0, ptr noundef nonnull align 8 dereferenceable(57) %1, ptr noundef nonnull align 8 dereferenceable(24) %2) #4 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i1, align 1
  %8 = alloca %"class.NOMAD_4_3::Double", align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = 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
  %14 = load ptr, ptr %5, align 8
  store i1 false, ptr %7, align 1
  call void @llvm.lifetime.start.p0(i64 24, ptr %8) #5
  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 0, ptr noundef nonnull align 8 dereferenceable(17) %8)
          to label %15 unwind label %34

15:                                               ; preds = %3
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %8) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #5
  %16 = getelementptr inbounds %"class.NOMAD_4_3::BBOutput", ptr %14, i32 0, i32 2
  %17 = load i8, ptr %16, align 8, !tbaa !9, !range !16, !noundef !17
  %18 = trunc i8 %17 to i1
  br i1 %18, label %19, label %88

19:                                               ; preds = %15
  %20 = load ptr, ptr %6, align 8, !tbaa !5
  %21 = call noundef zeroext i1 @_ZNKSt6vectorIN9NOMAD_4_312BBOutputTypeESaIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %20) #5
  br i1 %21, label %88, label %22

22:                                               ; preds = %19
  %23 = load ptr, ptr %6, align 8, !tbaa !5
  %24 = invoke noundef zeroext i1 @_ZNK9NOMAD_4_38BBOutput14checkSizeMatchERKSt6vectorINS_12BBOutputTypeESaIS2_EE(ptr noundef nonnull align 8 dereferenceable(57) %14, ptr noundef nonnull align 8 dereferenceable(24) %23)
          to label %25 unwind label %38

25:                                               ; preds = %22
  br i1 %24, label %26, label %88

26:                                               ; preds = %25
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  store i64 0, ptr %11, align 8, !tbaa !18
  br label %27

27:                                               ; preds = %83, %26
  %28 = load i64, ptr %11, align 8, !tbaa !18
  %29 = getelementptr inbounds %"class.NOMAD_4_3::BBOutput", ptr %14, i32 0, i32 1
  %30 = invoke noundef i64 @_ZNK9NOMAD_4_313ArrayOfDouble4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %29)
          to label %31 unwind label %42

31:                                               ; preds = %27
  %32 = icmp ult i64 %28, %30
  br i1 %32, label %46, label %33

33:                                               ; preds = %31
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  br label %87

34:                                               ; preds = %3
  %35 = landingpad { ptr, i32 }
          cleanup
  %36 = extractvalue { ptr, i32 } %35, 0
  store ptr %36, ptr %9, align 8
  %37 = extractvalue { ptr, i32 } %35, 1
  store i32 %37, ptr %10, align 4
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %8) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #5
  br label %93

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

42:                                               ; preds = %46, %27
  %43 = landingpad { ptr, i32 }
          cleanup
  %44 = extractvalue { ptr, i32 } %43, 0
  store ptr %44, ptr %9, align 8
  %45 = extractvalue { ptr, i32 } %43, 1
  store i32 %45, ptr %10, align 4
  br label %86

46:                                               ; preds = %31
  %47 = load ptr, ptr %6, align 8, !tbaa !5
  %48 = load i64, ptr %11, align 8, !tbaa !18
  %49 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIN9NOMAD_4_312BBOutputTypeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %47, i64 noundef %48) #5
  %50 = invoke noundef zeroext i1 @_ZN9NOMAD_4_324BBOutputTypeIsConstraintERKNS_12BBOutputTypeE(ptr noundef nonnull align 4 dereferenceable(4) %49)
          to label %51 unwind label %42

51:                                               ; preds = %46
  br i1 %50, label %52, label %82

52:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  %53 = invoke noundef i64 @_ZNK9NOMAD_4_313ArrayOfDouble4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %0)
          to label %54 unwind label %68

54:                                               ; preds = %52
  store i64 %53, ptr %12, align 8, !tbaa !18
  %55 = load i64, ptr %12, align 8, !tbaa !18
  %56 = add i64 %55, 1
  call void @llvm.lifetime.start.p0(i64 24, ptr %13) #5
  invoke void @_ZN9NOMAD_4_36DoubleC1Ev(ptr noundef nonnull align 8 dereferenceable(17) %13)
          to label %57 unwind label %72

57:                                               ; preds = %54
  invoke void @_ZN9NOMAD_4_313ArrayOfDouble6resizeEmRKNS_6DoubleE(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %56, ptr noundef nonnull align 8 dereferenceable(17) %13)
          to label %58 unwind label %76

58:                                               ; preds = %57
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %13) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %13) #5
  %59 = getelementptr inbounds %"class.NOMAD_4_3::BBOutput", ptr %14, i32 0, i32 1
  %60 = load i64, ptr %11, align 8, !tbaa !18
  %61 = invoke noundef nonnull align 8 dereferenceable(17) ptr @_ZNK9NOMAD_4_313ArrayOfDoubleixEm(ptr noundef nonnull align 8 dereferenceable(24) %59, i64 noundef %60)
          to label %62 unwind label %68

62:                                               ; preds = %58
  %63 = load i64, ptr %12, align 8, !tbaa !18
  %64 = invoke noundef nonnull align 8 dereferenceable(17) ptr @_ZNK9NOMAD_4_313ArrayOfDoubleixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %63)
          to label %65 unwind label %68

65:                                               ; preds = %62
  %66 = invoke noundef nonnull align 8 dereferenceable(17) ptr @_ZN9NOMAD_4_36DoubleaSERKS0_(ptr noundef nonnull align 8 dereferenceable(17) %64, ptr noundef nonnull align 8 dereferenceable(17) %61)
          to label %67 unwind label %68

67:                                               ; preds = %65
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  br label %82

68:                                               ; preds = %65, %62, %58, %52
  %69 = landingpad { ptr, i32 }
          cleanup
  %70 = extractvalue { ptr, i32 } %69, 0
  store ptr %70, ptr %9, align 8
  %71 = extractvalue { ptr, i32 } %69, 1
  store i32 %71, ptr %10, align 4
  br label %81

72:                                               ; preds = %54
  %73 = landingpad { ptr, i32 }
          cleanup
  %74 = extractvalue { ptr, i32 } %73, 0
  store ptr %74, ptr %9, align 8
  %75 = extractvalue { ptr, i32 } %73, 1
  store i32 %75, ptr %10, align 4
  br label %80

76:                                               ; preds = %57
  %77 = landingpad { ptr, i32 }
          cleanup
  %78 = extractvalue { ptr, i32 } %77, 0
  store ptr %78, ptr %9, align 8
  %79 = extractvalue { ptr, i32 } %77, 1
  store i32 %79, ptr %10, align 4
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %13) #5
  br label %80

80:                                               ; preds = %76, %72
  call void @llvm.lifetime.end.p0(i64 24, ptr %13) #5
  br label %81

81:                                               ; preds = %80, %68
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  br label %86

82:                                               ; preds = %67, %51
  br label %83

83:                                               ; preds = %82
  %84 = load i64, ptr %11, align 8, !tbaa !18
  %85 = add i64 %84, 1
  store i64 %85, ptr %11, align 8, !tbaa !18
  br label %27, !llvm.loop !19

86:                                               ; preds = %81, %42
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  br label %92

87:                                               ; preds = %33
  br label %88

88:                                               ; preds = %87, %25, %19, %15
  store i1 true, ptr %7, align 1
  %89 = load i1, ptr %7, align 1
  br i1 %89, label %91, label %90

90:                                               ; preds = %88
  call void @_ZN9NOMAD_4_313ArrayOfDoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #5
  br label %91

91:                                               ; preds = %90, %88
  ret void

92:                                               ; preds = %86, %38
  call void @_ZN9NOMAD_4_313ArrayOfDoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #5
  br label %93

93:                                               ; preds = %92, %34
  %94 = load ptr, ptr %9, align 8
  %95 = load i32, ptr %10, align 4
  %96 = insertvalue { ptr, i32 } poison, ptr %94, 0
  %97 = insertvalue { ptr, i32 } %96, i32 %95, 1
  resume { ptr, i32 } %97
}

declare noundef zeroext i1 @_ZN9NOMAD_4_324BBOutputTypeIsConstraintERKNS_12BBOutputTypeE(ptr noundef nonnull align 4 dereferenceable(4)) #1

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "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 = { 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 #3 = { 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 #4 = { 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 #5 = { 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, !15, i64 56}
!10 = !{!"_ZTSN9NOMAD_4_38BBOutputE", !11, i64 0, !14, i64 32, !15, i64 56}
!11 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !12, i64 0, !13, i64 8, !7, i64 16}
!12 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!13 = !{!"long", !7, i64 0}
!14 = !{!"_ZTSN9NOMAD_4_313ArrayOfDoubleE", !13, i64 8, !6, i64 16}
!15 = !{!"bool", !7, i64 0}
!16 = !{i8 0, i8 2}
!17 = !{}
!18 = !{!13, !13, i64 0}
!19 = distinct !{!19, !20}
!20 = !{!"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.NOMAD_4_3::Double" = type <{ ptr, double, i8, [7 x i8] }>

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

declare i32 @__gxx_personality_v0(...)

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

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

declare void @_ZN9NOMAD_4_313ArrayOfDoubleC1EmRKNS_6DoubleE(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, ptr noundef nonnull align 8 dereferenceable(17)) unnamed_addr #1

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

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

declare noundef nonnull align 8 dereferenceable(17) ptr @_ZNK9NOMAD_4_313ArrayOfDoubleixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #1

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 #1

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt6vectorIN9NOMAD_4_312BBOutputTypeESaIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK9NOMAD_4_38BBOutput14checkSizeMatchERKSt6vectorINS_12BBOutputTypeESaIS2_EE(ptr noundef nonnull align 8 dereferenceable(57), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #4 align 2

declare void @_ZN9NOMAD_4_313ArrayOfDouble6resizeEmRKNS_6DoubleE(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, ptr noundef nonnull align 8 dereferenceable(17)) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK9NOMAD_4_38BBOutput14getConstraintsERKSt6vectorINS_12BBOutputTypeESaIS2_EE(ptr dead_on_unwind noalias writable sret(%"class.NOMAD_4_3::ArrayOfDouble") align 8 %0, ptr noundef nonnull align 8 dereferenceable(57) %1, ptr noundef nonnull align 8 dereferenceable(24) %2) local_unnamed_addr #4 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"class.NOMAD_4_3::Double", align 8
  %5 = alloca %"class.NOMAD_4_3::Double", align 8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #5
  call void @_ZN9NOMAD_4_36DoubleC1Ev(ptr noundef nonnull align 8 dereferenceable(17) %4)
  invoke void @_ZN9NOMAD_4_313ArrayOfDoubleC1EmRKNS_6DoubleE(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 0, ptr noundef nonnull align 8 dereferenceable(17) %4)
          to label %6 unwind label %17

6:                                                ; preds = %3
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %4) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #5
  %7 = getelementptr inbounds i8, ptr %1, i64 56
  %8 = load i8, ptr %7, align 8, !tbaa !5, !range !15, !noundef !16
  %9 = trunc nuw i8 %8 to i1
  br i1 %9, label %10, label %.loopexit

10:                                               ; preds = %6
  %11 = call noundef zeroext i1 @_ZNKSt6vectorIN9NOMAD_4_312BBOutputTypeESaIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #5
  br i1 %11, label %.loopexit, label %12

12:                                               ; preds = %10
  %13 = invoke noundef zeroext i1 @_ZNK9NOMAD_4_38BBOutput14checkSizeMatchERKSt6vectorINS_12BBOutputTypeESaIS2_EE(ptr noundef nonnull align 8 dereferenceable(57) %1, ptr noundef nonnull align 8 dereferenceable(24) %2)
          to label %14 unwind label %19

14:                                               ; preds = %12
  br i1 %13, label %.preheader, label %.loopexit

.preheader:                                       ; preds = %14
  %15 = getelementptr inbounds i8, ptr %1, i64 32
  %16 = call noundef i64 @_ZNK9NOMAD_4_313ArrayOfDouble4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %15)
  %.not = icmp eq i64 %16, 0
  br i1 %.not, label %.loopexit, label %.lr.ph

17:                                               ; preds = %3
  %18 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %4) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #5
  br label %48

19:                                               ; preds = %12
  %20 = landingpad { ptr, i32 }
          cleanup
  br label %47

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

.lr.ph:                                           ; preds = %.preheader, %43
  %.024 = phi i64 [ %44, %43 ], [ 0, %.preheader ]
  %23 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIN9NOMAD_4_312BBOutputTypeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %.024) #5
  %24 = invoke noundef zeroext i1 @_ZN9NOMAD_4_324BBOutputTypeIsConstraintERKNS_12BBOutputTypeE(ptr noundef nonnull align 4 dereferenceable(4) %23)
          to label %25 unwind label %21

25:                                               ; preds = %.lr.ph
  br i1 %24, label %26, label %43

26:                                               ; preds = %25
  %27 = call noundef i64 @_ZNK9NOMAD_4_313ArrayOfDouble4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %0)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #5
  invoke void @_ZN9NOMAD_4_36DoubleC1Ev(ptr noundef nonnull align 8 dereferenceable(17) %5)
          to label %28 unwind label %38

28:                                               ; preds = %26
  %29 = add i64 %27, 1
  invoke void @_ZN9NOMAD_4_313ArrayOfDouble6resizeEmRKNS_6DoubleE(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %29, ptr noundef nonnull align 8 dereferenceable(17) %5)
          to label %30 unwind label %40

30:                                               ; preds = %28
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %5) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #5
  %31 = invoke noundef nonnull align 8 dereferenceable(17) ptr @_ZNK9NOMAD_4_313ArrayOfDoubleixEm(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef %.024)
          to label %32 unwind label %36

32:                                               ; preds = %30
  %33 = invoke noundef nonnull align 8 dereferenceable(17) ptr @_ZNK9NOMAD_4_313ArrayOfDoubleixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %27)
          to label %34 unwind label %36

34:                                               ; preds = %32
  %35 = invoke noundef nonnull align 8 dereferenceable(17) ptr @_ZN9NOMAD_4_36DoubleaSERKS0_(ptr noundef nonnull align 8 dereferenceable(17) %33, ptr noundef nonnull align 8 dereferenceable(17) %31)
          to label %43 unwind label %36

36:                                               ; preds = %34, %32, %30
  %37 = landingpad { ptr, i32 }
          cleanup
  br label %47

38:                                               ; preds = %26
  %39 = landingpad { ptr, i32 }
          cleanup
  br label %42

40:                                               ; preds = %28
  %41 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %5) #5
  br label %42

42:                                               ; preds = %40, %38
  %.pn = phi { ptr, i32 } [ %41, %40 ], [ %39, %38 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #5
  br label %47

43:                                               ; preds = %34, %25
  %44 = add nuw i64 %.024, 1
  %45 = call noundef i64 @_ZNK9NOMAD_4_313ArrayOfDouble4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %15)
  %46 = icmp ult i64 %44, %45
  br i1 %46, label %.lr.ph, label %.loopexit, !llvm.loop !17

.loopexit:                                        ; preds = %43, %.preheader, %6, %10, %14
  ret void

47:                                               ; preds = %21, %42, %36, %19
  %.pn19.pn.pn = phi { ptr, i32 } [ %20, %19 ], [ %22, %21 ], [ %37, %36 ], [ %.pn, %42 ]
  call void @_ZN9NOMAD_4_313ArrayOfDoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #5
  br label %48

48:                                               ; preds = %47, %17
  %.pn19.pn.pn.pn = phi { ptr, i32 } [ %.pn19.pn.pn, %47 ], [ %18, %17 ]
  resume { ptr, i32 } %.pn19.pn.pn.pn
}

declare noundef zeroext i1 @_ZN9NOMAD_4_324BBOutputTypeIsConstraintERKNS_12BBOutputTypeE(ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #1

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "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 = { 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 #3 = { 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 #4 = { 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 #5 = { 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, !14, i64 56}
!6 = !{!"_ZTSN9NOMAD_4_38BBOutputE", !7, i64 0, !13, i64 32, !14, i64 56}
!7 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !8, i64 0, !12, i64 8, !10, i64 16}
!8 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !9, i64 0}
!9 = !{!"any pointer", !10, i64 0}
!10 = !{!"omnipotent char", !11, i64 0}
!11 = !{!"Simple C++ TBAA"}
!12 = !{!"long", !10, i64 0}
!13 = !{!"_ZTSN9NOMAD_4_313ArrayOfDoubleE", !12, i64 8, !9, i64 16}
!14 = !{!"bool", !10, i64 0}
!15 = !{i8 0, i8 2}
!16 = !{}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}


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