; LLVM IR from buresjan/optim_lbm :: nomad/src/Algos/CoordinateSearch (CSMesh)

; 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::Double" = type <{ ptr, double, i8, [7 x i8] }>
%"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::MeshBase" = type <{ ptr, i64, %"class.std::shared_ptr", %"class.NOMAD_4_3::ArrayOfDouble", %"class.NOMAD_4_3::ArrayOfDouble", %"class.NOMAD_4_3::ArrayOfDouble", %"class.NOMAD_4_3::ArrayOfDouble", %"class.NOMAD_4_3::ArrayOfDouble", %"class.NOMAD_4_3::ArrayOfDouble", %"class.NOMAD_4_3::ArrayOfDouble", %"class.NOMAD_4_3::ArrayOfDouble", %"class.NOMAD_4_3::ArrayOfDouble", i32, i32, i8, [7 x i8] }>
%"class.std::shared_ptr" = type { %"class.std::__shared_ptr" }
%"class.std::__shared_ptr" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }

@.str.9 = external hidden unnamed_addr constant [96 x i8], align 1
@_ZTIN9NOMAD_4_39ExceptionE = external constant ptr
@.str.20 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [70 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

declare void @__cxa_throw(ptr, ptr, ptr)

declare void @__cxa_free_exception(ptr)

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN9NOMAD_4_3eqERKNS_6DoubleES2_(ptr noundef nonnull align 8 dereferenceable(17), ptr noundef nonnull align 8 dereferenceable(17)) #5

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

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

declare void @_ZN9NOMAD_4_3dvERKNS_6DoubleES2_(ptr dead_on_unwind writable sret(%"class.NOMAD_4_3::Double") align 8, 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_36CSMesh21scaleAndProjectOnMeshERKNS_9DirectionE(ptr dead_on_unwind noalias writable sret(%"class.NOMAD_4_3::ArrayOfDouble") align 8 %0, ptr noundef nonnull align 8 dereferenceable(336) %1, ptr noundef nonnull align 8 dereferenceable(24) %2) unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i64, align 8
  %8 = alloca %"class.std::__cxx11::basic_string", align 8
  %9 = alloca %"class.std::allocator", align 1
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca i1, align 1
  %13 = alloca %"class.NOMAD_4_3::Double", align 8
  %14 = alloca %"class.NOMAD_4_3::Double", align 8
  %15 = alloca %"class.NOMAD_4_3::Double", align 8
  %16 = alloca double, align 8
  %17 = alloca %"class.std::__cxx11::basic_string", align 8
  %18 = alloca %"class.std::allocator", align 1
  %19 = alloca %"class.std::__cxx11::basic_string", align 8
  %20 = alloca %"class.std::allocator", align 1
  %21 = alloca i1, align 1
  %22 = alloca i64, align 8
  %23 = alloca %"class.NOMAD_4_3::Double", align 8
  %24 = 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
  %25 = load ptr, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  %26 = getelementptr inbounds %"class.NOMAD_4_3::MeshBase", ptr %25, i32 0, i32 2
  %27 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN9NOMAD_4_312PbParametersELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %26) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr %8) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %9) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef @.str.20, ptr noundef nonnull align 1 dereferenceable(1) %9)
          to label %28 unwind label %44

28:                                               ; preds = %3
  %29 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9NOMAD_4_310Parameters17getAttributeValueImEERKT_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb(ptr noundef nonnull align 8 dereferenceable(496) %27, ptr noundef nonnull align 8 dereferenceable(32) %8, i1 noundef zeroext false)
          to label %30 unwind label %48

30:                                               ; preds = %28
  %31 = load i64, ptr %29, align 8, !tbaa !9
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %8) #6
  store i64 %31, ptr %7, align 8, !tbaa !9
  store i1 false, ptr %12, align 1
  %32 = load i64, ptr %7, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 24, ptr %13) #6
  call void @_ZN9NOMAD_4_36DoubleC1Ev(ptr noundef nonnull align 8 dereferenceable(17) %13)
  invoke void @_ZN9NOMAD_4_313ArrayOfDoubleC1EmRKNS_6DoubleE(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %32, ptr noundef nonnull align 8 dereferenceable(17) %13)
          to label %33 unwind label %53

33:                                               ; preds = %30
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %13) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %13) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr %14) #6
  %34 = load ptr, ptr %6, align 8, !tbaa !5
  invoke void @_ZNK9NOMAD_4_39Direction12infiniteNormEv(ptr dead_on_unwind writable sret(%"class.NOMAD_4_3::Double") align 8 %14, ptr noundef nonnull align 8 dereferenceable(24) %34)
          to label %35 unwind label %57

35:                                               ; preds = %33
  call void @llvm.lifetime.start.p0(i64 24, ptr %15) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  store double 0.000000e+00, ptr %16, align 8, !tbaa !11
  invoke void @_ZN9NOMAD_4_36DoubleC1ERKd(ptr noundef nonnull align 8 dereferenceable(17) %15, ptr noundef nonnull align 8 dereferenceable(8) %16)
          to label %36 unwind label %61

36:                                               ; preds = %35
  %37 = invoke noundef zeroext i1 @_ZN9NOMAD_4_3eqERKNS_6DoubleES2_(ptr noundef nonnull align 8 dereferenceable(17) %15, ptr noundef nonnull align 8 dereferenceable(17) %14)
          to label %38 unwind label %65

38:                                               ; preds = %36
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %15) #6
  br i1 %37, label %39, label %87

39:                                               ; preds = %38
  call void @llvm.lifetime.start.p0(i64 32, ptr %17) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %18) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %17, ptr noundef @.str.21, ptr noundef nonnull align 1 dereferenceable(1) %18)
          to label %40 unwind label %70

40:                                               ; preds = %39
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #6
  store i1 true, ptr %21, align 1
  %41 = call ptr @__cxa_allocate_exception(i64 112) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr %19) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %20) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %20) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %19, ptr noundef @.str.9, ptr noundef nonnull align 1 dereferenceable(1) %20)
          to label %42 unwind label %74

42:                                               ; preds = %40
  invoke void @_ZN9NOMAD_4_39ExceptionC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmS8_(ptr noundef nonnull align 8 dereferenceable(112) %41, ptr noundef nonnull align 8 dereferenceable(32) %19, i64 noundef 385, ptr noundef nonnull align 8 dereferenceable(32) %17)
          to label %43 unwind label %78

43:                                               ; preds = %42
  store i1 false, ptr %21, align 1
  invoke void @__cxa_throw(ptr %41, ptr @_ZTIN9NOMAD_4_39ExceptionE, ptr @_ZN9NOMAD_4_39ExceptionD2Ev) #7
          to label %138 unwind label %78

44:                                               ; preds = %3
  %45 = landingpad { ptr, i32 }
          cleanup
  %46 = extractvalue { ptr, i32 } %45, 0
  store ptr %46, ptr %10, align 8
  %47 = extractvalue { ptr, i32 } %45, 1
  store i32 %47, ptr %11, align 4
  br label %52

48:                                               ; preds = %28
  %49 = landingpad { ptr, i32 }
          cleanup
  %50 = extractvalue { ptr, i32 } %49, 0
  store ptr %50, ptr %10, align 8
  %51 = extractvalue { ptr, i32 } %49, 1
  store i32 %51, ptr %11, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #6
  br label %52

52:                                               ; preds = %48, %44
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %8) #6
  br label %132

53:                                               ; preds = %30
  %54 = landingpad { ptr, i32 }
          cleanup
  %55 = extractvalue { ptr, i32 } %54, 0
  store ptr %55, ptr %10, align 8
  %56 = extractvalue { ptr, i32 } %54, 1
  store i32 %56, ptr %11, align 4
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %13) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %13) #6
  br label %132

57:                                               ; preds = %33
  %58 = landingpad { ptr, i32 }
          cleanup
  %59 = extractvalue { ptr, i32 } %58, 0
  store ptr %59, ptr %10, align 8
  %60 = extractvalue { ptr, i32 } %58, 1
  store i32 %60, ptr %11, align 4
  br label %129

61:                                               ; preds = %35
  %62 = landingpad { ptr, i32 }
          cleanup
  %63 = extractvalue { ptr, i32 } %62, 0
  store ptr %63, ptr %10, align 8
  %64 = extractvalue { ptr, i32 } %62, 1
  store i32 %64, ptr %11, align 4
  br label %69

65:                                               ; preds = %36
  %66 = landingpad { ptr, i32 }
          cleanup
  %67 = extractvalue { ptr, i32 } %66, 0
  store ptr %67, ptr %10, align 8
  %68 = extractvalue { ptr, i32 } %66, 1
  store i32 %68, ptr %11, align 4
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %15) #6
  br label %69

69:                                               ; preds = %65, %61
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %15) #6
  br label %128

70:                                               ; preds = %39
  %71 = landingpad { ptr, i32 }
          cleanup
  %72 = extractvalue { ptr, i32 } %71, 0
  store ptr %72, ptr %10, align 8
  %73 = extractvalue { ptr, i32 } %71, 1
  store i32 %73, ptr %11, align 4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #6
  br label %86

74:                                               ; preds = %40
  %75 = landingpad { ptr, i32 }
          cleanup
  %76 = extractvalue { ptr, i32 } %75, 0
  store ptr %76, ptr %10, align 8
  %77 = extractvalue { ptr, i32 } %75, 1
  store i32 %77, ptr %11, align 4
  br label %82

78:                                               ; preds = %43, %42
  %79 = landingpad { ptr, i32 }
          cleanup
  %80 = extractvalue { ptr, i32 } %79, 0
  store ptr %80, ptr %10, align 8
  %81 = extractvalue { ptr, i32 } %79, 1
  store i32 %81, ptr %11, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #6
  br label %82

82:                                               ; preds = %78, %74
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %20) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %19) #6
  %83 = load i1, ptr %21, align 1
  br i1 %83, label %84, label %85

84:                                               ; preds = %82
  call void @__cxa_free_exception(ptr %41) #6
  br label %85

85:                                               ; preds = %84, %82
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #6
  br label %86

86:                                               ; preds = %85, %70
  call void @llvm.lifetime.end.p0(i64 32, ptr %17) #6
  br label %128

87:                                               ; preds = %38
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #6
  store i64 0, ptr %22, align 8, !tbaa !9
  br label %88

88:                                               ; preds = %109, %87
  %89 = load i64, ptr %22, align 8, !tbaa !9
  %90 = load i64, ptr %7, align 8, !tbaa !9
  %91 = icmp ult i64 %89, %90
  br i1 %91, label %93, label %92

92:                                               ; preds = %88
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #6
  br label %126

93:                                               ; preds = %88
  call void @llvm.lifetime.start.p0(i64 24, ptr %23) #6
  %94 = load i64, ptr %22, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 24, ptr %24) #6
  %95 = load ptr, ptr %6, align 8, !tbaa !5
  %96 = load i64, ptr %22, align 8, !tbaa !9
  %97 = invoke noundef nonnull align 8 dereferenceable(17) ptr @_ZNK9NOMAD_4_313ArrayOfDoubleixEm(ptr noundef nonnull align 8 dereferenceable(24) %95, i64 noundef %96)
          to label %98 unwind label %112

98:                                               ; preds = %93
  invoke void @_ZN9NOMAD_4_3dvERKNS_6DoubleES2_(ptr dead_on_unwind writable sret(%"class.NOMAD_4_3::Double") align 8 %24, ptr noundef nonnull align 8 dereferenceable(17) %97, ptr noundef nonnull align 8 dereferenceable(17) %14)
          to label %99 unwind label %112

99:                                               ; preds = %98
  %100 = load ptr, ptr %25, align 8, !tbaa !13
  %101 = getelementptr inbounds ptr, ptr %100, i64 19
  %102 = load ptr, ptr %101, align 8
  invoke void %102(ptr dead_on_unwind writable sret(%"class.NOMAD_4_3::Double") align 8 %23, ptr noundef nonnull align 8 dereferenceable(336) %25, i64 noundef %94, ptr noundef nonnull align 8 dereferenceable(17) %24)
          to label %103 unwind label %116

103:                                              ; preds = %99
  %104 = load i64, ptr %22, align 8, !tbaa !9
  %105 = invoke noundef nonnull align 8 dereferenceable(17) ptr @_ZNK9NOMAD_4_313ArrayOfDoubleixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %104)
          to label %106 unwind label %120

106:                                              ; preds = %103
  %107 = invoke noundef nonnull align 8 dereferenceable(17) ptr @_ZN9NOMAD_4_36DoubleaSERKS0_(ptr noundef nonnull align 8 dereferenceable(17) %105, ptr noundef nonnull align 8 dereferenceable(17) %23)
          to label %108 unwind label %120

108:                                              ; preds = %106
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %23) #6
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %24) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %24) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %23) #6
  br label %109

109:                                              ; preds = %108
  %110 = load i64, ptr %22, align 8, !tbaa !9
  %111 = add i64 %110, 1
  store i64 %111, ptr %22, align 8, !tbaa !9
  br label %88, !llvm.loop !15

112:                                              ; preds = %98, %93
  %113 = landingpad { ptr, i32 }
          cleanup
  %114 = extractvalue { ptr, i32 } %113, 0
  store ptr %114, ptr %10, align 8
  %115 = extractvalue { ptr, i32 } %113, 1
  store i32 %115, ptr %11, align 4
  br label %125

116:                                              ; preds = %99
  %117 = landingpad { ptr, i32 }
          cleanup
  %118 = extractvalue { ptr, i32 } %117, 0
  store ptr %118, ptr %10, align 8
  %119 = extractvalue { ptr, i32 } %117, 1
  store i32 %119, ptr %11, align 4
  br label %124

120:                                              ; preds = %106, %103
  %121 = landingpad { ptr, i32 }
          cleanup
  %122 = extractvalue { ptr, i32 } %121, 0
  store ptr %122, ptr %10, align 8
  %123 = extractvalue { ptr, i32 } %121, 1
  store i32 %123, ptr %11, align 4
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %23) #6
  br label %124

124:                                              ; preds = %120, %116
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %24) #6
  br label %125

125:                                              ; preds = %124, %112
  call void @llvm.lifetime.end.p0(i64 24, ptr %24) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %23) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #6
  br label %128

126:                                              ; preds = %92
  store i1 true, ptr %12, align 1
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %14) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #6
  %127 = load i1, ptr %12, align 1
  br i1 %127, label %131, label %130

128:                                              ; preds = %125, %86, %69
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %14) #6
  br label %129

129:                                              ; preds = %128, %57
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #6
  call void @_ZN9NOMAD_4_313ArrayOfDoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #6
  br label %132

130:                                              ; preds = %126
  call void @_ZN9NOMAD_4_313ArrayOfDoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #6
  br label %131

131:                                              ; preds = %130, %126
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  ret void

132:                                              ; preds = %129, %53, %52
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  br label %133

133:                                              ; preds = %132
  %134 = load ptr, ptr %10, align 8
  %135 = load i32, ptr %11, align 4
  %136 = insertvalue { ptr, i32 } poison, ptr %134, 0
  %137 = insertvalue { ptr, i32 } %136, i32 %135, 1
  resume { ptr, i32 } %137

138:                                              ; preds = %43
  unreachable
}

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9NOMAD_4_310Parameters17getAttributeValueImEERKT_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb(ptr noundef nonnull align 8 dereferenceable(496), ptr noundef nonnull align 8 dereferenceable(32), i1 noundef zeroext) #2 align 2

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

declare void @_ZNK9NOMAD_4_39Direction12infiniteNormEv(ptr dead_on_unwind writable sret(%"class.NOMAD_4_3::Double") align 8, ptr noundef nonnull align 8 dereferenceable(24)) #3

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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, !10, i64 0}
!10 = !{!"long", !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 = distinct !{!15, !16}
!16 = !{!"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::Double" = type <{ ptr, double, i8, [7 x i8] }>
%"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 }

@.str.9 = external hidden unnamed_addr constant [96 x i8], align 1
@_ZTIN9NOMAD_4_39ExceptionE = external constant ptr
@.str.20 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [70 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

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 @_ZNK9NOMAD_4_313ArrayOfDoubleixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN9NOMAD_4_3eqERKNS_6DoubleES2_(ptr noundef nonnull align 8 dereferenceable(17), ptr noundef nonnull align 8 dereferenceable(17)) local_unnamed_addr #5

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

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

declare void @_ZN9NOMAD_4_3dvERKNS_6DoubleES2_(ptr dead_on_unwind 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 #3

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK9NOMAD_4_36CSMesh21scaleAndProjectOnMeshERKNS_9DirectionE(ptr dead_on_unwind noalias writable sret(%"class.NOMAD_4_3::ArrayOfDouble") align 8 %0, ptr noundef nonnull align 8 dereferenceable(336) %1, ptr noundef nonnull align 8 dereferenceable(24) %2) 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.NOMAD_4_3::Double", align 8
  %7 = alloca %"class.NOMAD_4_3::Double", align 8
  %8 = alloca %"class.NOMAD_4_3::Double", align 8
  %9 = alloca double, align 8
  %10 = alloca %"class.std::__cxx11::basic_string", align 8
  %11 = alloca %"class.std::allocator", align 1
  %12 = alloca %"class.std::__cxx11::basic_string", align 8
  %13 = alloca %"class.std::allocator", align 1
  %14 = alloca %"class.NOMAD_4_3::Double", align 8
  %15 = alloca %"class.NOMAD_4_3::Double", align 8
  %16 = getelementptr inbounds i8, ptr %1, i64 16
  %17 = tail call noundef ptr @_ZNKSt19__shared_ptr_accessIN9NOMAD_4_312PbParametersELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %16) #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.20, ptr noundef nonnull align 1 dereferenceable(1) %5)
          to label %18 unwind label %32

18:                                               ; preds = %3
  %19 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9NOMAD_4_310Parameters17getAttributeValueImEERKT_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb(ptr noundef nonnull align 8 dereferenceable(496) %17, ptr noundef nonnull align 8 dereferenceable(32) %4, i1 noundef zeroext false)
          to label %20 unwind label %34

20:                                               ; preds = %18
  %21 = load i64, ptr %19, align 8, !tbaa !5
  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
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #6
  call void @_ZN9NOMAD_4_36DoubleC1Ev(ptr noundef nonnull align 8 dereferenceable(17) %6)
  invoke void @_ZN9NOMAD_4_313ArrayOfDoubleC1EmRKNS_6DoubleE(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %21, ptr noundef nonnull align 8 dereferenceable(17) %6)
          to label %22 unwind label %37

22:                                               ; preds = %20
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %6) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #6
  invoke void @_ZNK9NOMAD_4_39Direction12infiniteNormEv(ptr dead_on_unwind nonnull writable sret(%"class.NOMAD_4_3::Double") align 8 %7, ptr noundef nonnull align 8 dereferenceable(24) %2)
          to label %23 unwind label %39

23:                                               ; preds = %22
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %8) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #6
  store double 0.000000e+00, ptr %9, align 8, !tbaa !9
  invoke void @_ZN9NOMAD_4_36DoubleC1ERKd(ptr noundef nonnull align 8 dereferenceable(17) %8, ptr noundef nonnull align 8 dereferenceable(8) %9)
          to label %24 unwind label %41

24:                                               ; preds = %23
  %25 = invoke noundef zeroext i1 @_ZN9NOMAD_4_3eqERKNS_6DoubleES2_(ptr noundef nonnull align 8 dereferenceable(17) %8, ptr noundef nonnull align 8 dereferenceable(17) %7)
          to label %26 unwind label %43

26:                                               ; preds = %24
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #6
  br i1 %25, label %27, label %.preheader

.preheader:                                       ; preds = %26
  %.not = icmp eq i64 %21, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph

27:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %10) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %11) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %10, ptr noundef nonnull @.str.21, ptr noundef nonnull align 1 dereferenceable(1) %11)
          to label %28 unwind label %46

28:                                               ; preds = %27
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %11) #6
  %29 = call ptr @__cxa_allocate_exception(i64 112) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %12) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %13) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %12, ptr noundef nonnull @.str.9, ptr noundef nonnull align 1 dereferenceable(1) %13)
          to label %30 unwind label %.thread

30:                                               ; preds = %28
  invoke void @_ZN9NOMAD_4_39ExceptionC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmS8_(ptr noundef nonnull align 8 dereferenceable(112) %29, ptr noundef nonnull align 8 dereferenceable(32) %12, i64 noundef 385, ptr noundef nonnull align 8 dereferenceable(32) %10)
          to label %31 unwind label %49

31:                                               ; preds = %30
  invoke void @__cxa_throw(ptr nonnull %29, ptr nonnull @_ZTIN9NOMAD_4_39ExceptionE, ptr nonnull @_ZN9NOMAD_4_39ExceptionD2Ev) #7
          to label %77 unwind label %49

32:                                               ; preds = %3
  %33 = landingpad { ptr, i32 }
          cleanup
  br label %36

34:                                               ; preds = %18
  %35 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #6
  br label %36

36:                                               ; preds = %34, %32
  %.pn = phi { ptr, i32 } [ %35, %34 ], [ %33, %32 ]
  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 %76

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

39:                                               ; preds = %22
  %40 = landingpad { ptr, i32 }
          cleanup
  br label %75

41:                                               ; preds = %23
  %42 = landingpad { ptr, i32 }
          cleanup
  br label %45

43:                                               ; preds = %24
  %44 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %8) #6
  br label %45

45:                                               ; preds = %43, %41
  %.pn26 = phi { ptr, i32 } [ %44, %43 ], [ %42, %41 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #6
  br label %74

46:                                               ; preds = %27
  %47 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %11) #6
  br label %53

.thread:                                          ; preds = %28
  %48 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %13) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %12) #6
  br label %51

49:                                               ; preds = %30, %31
  %.013 = phi i1 [ false, %31 ], [ true, %30 ]
  %50 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %13) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %12) #6
  br i1 %.013, label %51, label %52

51:                                               ; preds = %.thread, %49
  %.pn3140 = phi { ptr, i32 } [ %48, %.thread ], [ %50, %49 ]
  call void @__cxa_free_exception(ptr %29) #6
  br label %52

52:                                               ; preds = %51, %49
  %.pn3139 = phi { ptr, i32 } [ %.pn3140, %51 ], [ %50, %49 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #6
  br label %53

53:                                               ; preds = %52, %46
  %.pn31.pn = phi { ptr, i32 } [ %.pn3139, %52 ], [ %47, %46 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #6
  br label %74

._crit_edge:                                      ; preds = %64, %.preheader
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %7) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #6
  ret void

.lr.ph:                                           ; preds = %.preheader, %64
  %.041 = phi i64 [ %65, %64 ], [ 0, %.preheader ]
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %14) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %15) #6
  %54 = invoke noundef nonnull align 8 dereferenceable(17) ptr @_ZNK9NOMAD_4_313ArrayOfDoubleixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %.041)
          to label %55 unwind label %66

55:                                               ; preds = %.lr.ph
  invoke void @_ZN9NOMAD_4_3dvERKNS_6DoubleES2_(ptr dead_on_unwind nonnull writable sret(%"class.NOMAD_4_3::Double") align 8 %15, ptr noundef nonnull align 8 dereferenceable(17) %54, ptr noundef nonnull align 8 dereferenceable(17) %7)
          to label %56 unwind label %66

56:                                               ; preds = %55
  %57 = load ptr, ptr %1, align 8, !tbaa !11
  %58 = getelementptr inbounds i8, ptr %57, i64 152
  %59 = load ptr, ptr %58, align 8
  invoke void %59(ptr dead_on_unwind nonnull writable sret(%"class.NOMAD_4_3::Double") align 8 %14, ptr noundef nonnull align 8 dereferenceable(336) %1, i64 noundef %.041, ptr noundef nonnull align 8 dereferenceable(17) %15)
          to label %60 unwind label %68

60:                                               ; preds = %56
  %61 = invoke noundef nonnull align 8 dereferenceable(17) ptr @_ZNK9NOMAD_4_313ArrayOfDoubleixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %.041)
          to label %62 unwind label %70

62:                                               ; preds = %60
  %63 = invoke noundef nonnull align 8 dereferenceable(17) ptr @_ZN9NOMAD_4_36DoubleaSERKS0_(ptr noundef nonnull align 8 dereferenceable(17) %61, ptr noundef nonnull align 8 dereferenceable(17) %14)
          to label %64 unwind label %70

64:                                               ; preds = %62
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %14) #6
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %15) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %15) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %14) #6
  %65 = add nuw i64 %.041, 1
  %exitcond.not = icmp eq i64 %65, %21
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !13

66:                                               ; preds = %55, %.lr.ph
  %67 = landingpad { ptr, i32 }
          cleanup
  br label %73

68:                                               ; preds = %56
  %69 = landingpad { ptr, i32 }
          cleanup
  br label %72

70:                                               ; preds = %62, %60
  %71 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %14) #6
  br label %72

72:                                               ; preds = %70, %68
  %.pn28 = phi { ptr, i32 } [ %71, %70 ], [ %69, %68 ]
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %15) #6
  br label %73

73:                                               ; preds = %72, %66
  %.pn28.pn = phi { ptr, i32 } [ %.pn28, %72 ], [ %67, %66 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %15) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %14) #6
  br label %74

74:                                               ; preds = %73, %53, %45
  %.pn31.pn.pn = phi { ptr, i32 } [ %.pn31.pn, %53 ], [ %.pn28.pn, %73 ], [ %.pn26, %45 ]
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %7) #6
  br label %75

75:                                               ; preds = %74, %39
  %.pn31.pn.pn.pn = phi { ptr, i32 } [ %.pn31.pn.pn, %74 ], [ %40, %39 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #6
  call void @_ZN9NOMAD_4_313ArrayOfDoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #6
  br label %76

76:                                               ; preds = %75, %37, %36
  %.pn31.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn31.pn.pn.pn, %75 ], [ %38, %37 ], [ %.pn, %36 ]
  resume { ptr, i32 } %.pn31.pn.pn.pn.pn

77:                                               ; preds = %31
  unreachable
}

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9NOMAD_4_310Parameters17getAttributeValueImEERKT_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb(ptr noundef nonnull align 8 dereferenceable(496), ptr noundef nonnull align 8 dereferenceable(32), i1 noundef zeroext) local_unnamed_addr #2 align 2

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

declare void @_ZNK9NOMAD_4_39Direction12infiniteNormEv(ptr dead_on_unwind writable sret(%"class.NOMAD_4_3::Double") align 8, ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #3

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"double", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"vtable pointer", !8, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}


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