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

; 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::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 }
%"class.NOMAD_4_3::ArrayOfDouble" = type { ptr, i64, ptr }
%"class.NOMAD_4_3::CSMesh" = type { %"class.NOMAD_4_3::MeshBase.base", %"class.NOMAD_4_3::ArrayOfDouble", %"class.NOMAD_4_3::ArrayOfDouble", %"class.NOMAD_4_3::ArrayOfDouble" }
%"class.NOMAD_4_3::MeshBase.base" = 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 }>

; 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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN9NOMAD_4_36CSMesh20refineDeltaFrameSizeEv(ptr noundef nonnull align 8 dereferenceable(336) %0) unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca i64, align 8
  %4 = alloca %"class.NOMAD_4_3::Double", align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca %"class.NOMAD_4_3::Double", align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  %8 = load ptr, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #5
  store i64 0, ptr %3, align 8, !tbaa !9
  br label %9

9:                                                ; preds = %59, %1
  %10 = load i64, ptr %3, align 8, !tbaa !9
  %11 = getelementptr inbounds %"class.NOMAD_4_3::MeshBase", ptr %8, i32 0, i32 1
  %12 = load i64, ptr %11, align 8, !tbaa !11
  %13 = icmp ult i64 %10, %12
  br i1 %13, label %15, label %14

14:                                               ; preds = %9
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #5
  br label %64

15:                                               ; preds = %9
  call void @llvm.lifetime.start.p0(i64 24, ptr %4) #5
  %16 = getelementptr inbounds %"class.NOMAD_4_3::CSMesh", ptr %8, i32 0, i32 2
  %17 = load i64, ptr %3, align 8, !tbaa !9
  %18 = call noundef nonnull align 8 dereferenceable(17) ptr @_ZNK9NOMAD_4_313ArrayOfDoubleixEm(ptr noundef nonnull align 8 dereferenceable(24) %16, i64 noundef %17)
  call void @_ZN9NOMAD_4_36DoubleC1ERKS0_(ptr noundef nonnull align 8 dereferenceable(17) %4, ptr noundef nonnull align 8 dereferenceable(17) %18)
  %19 = getelementptr inbounds %"class.NOMAD_4_3::CSMesh", ptr %8, i32 0, i32 3
  %20 = load i64, ptr %3, align 8, !tbaa !9
  %21 = invoke noundef nonnull align 8 dereferenceable(17) ptr @_ZNK9NOMAD_4_313ArrayOfDoubleixEm(ptr noundef nonnull align 8 dereferenceable(24) %19, i64 noundef %20)
          to label %22 unwind label %46

22:                                               ; preds = %15
  invoke void @_ZNK9NOMAD_4_36CSMesh20refineDeltaFrameSizeERNS_6DoubleERKS1_(ptr noundef nonnull align 8 dereferenceable(336) %8, ptr noundef nonnull align 8 dereferenceable(17) %4, ptr noundef nonnull align 8 dereferenceable(17) %21)
          to label %23 unwind label %46

23:                                               ; preds = %22
  call void @llvm.lifetime.start.p0(i64 24, ptr %7) #5
  %24 = getelementptr inbounds %"class.NOMAD_4_3::CSMesh", ptr %8, i32 0, i32 2
  %25 = load i64, ptr %3, align 8, !tbaa !9
  %26 = invoke noundef nonnull align 8 dereferenceable(17) ptr @_ZNK9NOMAD_4_313ArrayOfDoubleixEm(ptr noundef nonnull align 8 dereferenceable(24) %24, i64 noundef %25)
          to label %27 unwind label %50

27:                                               ; preds = %23
  %28 = getelementptr inbounds %"class.NOMAD_4_3::CSMesh", ptr %8, i32 0, i32 3
  %29 = load i64, ptr %3, align 8, !tbaa !9
  %30 = invoke noundef nonnull align 8 dereferenceable(17) ptr @_ZNK9NOMAD_4_313ArrayOfDoubleixEm(ptr noundef nonnull align 8 dereferenceable(24) %28, i64 noundef %29)
          to label %31 unwind label %50

31:                                               ; preds = %27
  invoke void @_ZNK9NOMAD_4_36CSMesh16getdeltaMeshSizeERKNS_6DoubleES3_(ptr dead_on_unwind writable sret(%"class.NOMAD_4_3::Double") align 8 %7, ptr noundef nonnull align 8 dereferenceable(336) %8, ptr noundef nonnull align 8 dereferenceable(17) %26, ptr noundef nonnull align 8 dereferenceable(17) %30)
          to label %32 unwind label %50

32:                                               ; preds = %31
  %33 = getelementptr inbounds %"class.NOMAD_4_3::MeshBase", ptr %8, i32 0, i32 4
  %34 = load i64, ptr %3, align 8, !tbaa !9
  %35 = invoke noundef nonnull align 8 dereferenceable(17) ptr @_ZNK9NOMAD_4_313ArrayOfDoubleixEm(ptr noundef nonnull align 8 dereferenceable(24) %33, i64 noundef %34)
          to label %36 unwind label %54

36:                                               ; preds = %32
  %37 = invoke noundef zeroext i1 @_ZN9NOMAD_4_3leERKNS_6DoubleES2_(ptr noundef nonnull align 8 dereferenceable(17) %35, ptr noundef nonnull align 8 dereferenceable(17) %7)
          to label %38 unwind label %54

38:                                               ; preds = %36
  br i1 %37, label %39, label %58

39:                                               ; preds = %38
  %40 = getelementptr inbounds %"class.NOMAD_4_3::CSMesh", ptr %8, i32 0, i32 2
  %41 = load i64, ptr %3, align 8, !tbaa !9
  %42 = invoke noundef nonnull align 8 dereferenceable(17) ptr @_ZNK9NOMAD_4_313ArrayOfDoubleixEm(ptr noundef nonnull align 8 dereferenceable(24) %40, i64 noundef %41)
          to label %43 unwind label %54

43:                                               ; preds = %39
  %44 = invoke noundef nonnull align 8 dereferenceable(17) ptr @_ZN9NOMAD_4_36DoubleaSERKS0_(ptr noundef nonnull align 8 dereferenceable(17) %42, ptr noundef nonnull align 8 dereferenceable(17) %4)
          to label %45 unwind label %54

45:                                               ; preds = %43
  br label %58

46:                                               ; preds = %22, %15
  %47 = landingpad { ptr, i32 }
          cleanup
  %48 = extractvalue { ptr, i32 } %47, 0
  store ptr %48, ptr %5, align 8
  %49 = extractvalue { ptr, i32 } %47, 1
  store i32 %49, ptr %6, align 4
  br label %63

50:                                               ; preds = %31, %27, %23
  %51 = landingpad { ptr, i32 }
          cleanup
  %52 = extractvalue { ptr, i32 } %51, 0
  store ptr %52, ptr %5, align 8
  %53 = extractvalue { ptr, i32 } %51, 1
  store i32 %53, ptr %6, align 4
  br label %62

54:                                               ; preds = %43, %39, %36, %32
  %55 = landingpad { ptr, i32 }
          cleanup
  %56 = extractvalue { ptr, i32 } %55, 0
  store ptr %56, ptr %5, align 8
  %57 = extractvalue { ptr, i32 } %55, 1
  store i32 %57, ptr %6, align 4
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %7) #5
  br label %62

58:                                               ; preds = %45, %38
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %7) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #5
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %4) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %4) #5
  br label %59

59:                                               ; preds = %58
  %60 = load i64, ptr %3, align 8, !tbaa !9
  %61 = add i64 %60, 1
  store i64 %61, ptr %3, align 8, !tbaa !9
  br label %9, !llvm.loop !19

62:                                               ; preds = %54, %50
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #5
  br label %63

63:                                               ; preds = %62, %46
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %4) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #5
  br label %65

64:                                               ; preds = %14
  ret void

65:                                               ; preds = %63
  %66 = load ptr, ptr %5, align 8
  %67 = load i32, ptr %6, align 4
  %68 = insertvalue { ptr, i32 } poison, ptr %66, 0
  %69 = insertvalue { ptr, i32 } %68, i32 %67, 1
  resume { ptr, i32 } %69
}

declare void @_ZN9NOMAD_4_36DoubleC1ERKS0_(ptr noundef nonnull align 8 dereferenceable(17), ptr noundef nonnull align 8 dereferenceable(17)) unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK9NOMAD_4_36CSMesh20refineDeltaFrameSizeERNS_6DoubleERKS1_(ptr noundef nonnull align 8 dereferenceable(336), ptr noundef nonnull align 8 dereferenceable(17), ptr noundef nonnull align 8 dereferenceable(17)) #3 align 2

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

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { "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 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 = { 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 #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, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!12, !10, i64 8}
!12 = !{!"_ZTSN9NOMAD_4_38MeshBaseE", !10, i64 8, !13, i64 16, !16, i64 32, !16, i64 56, !16, i64 80, !16, i64 104, !16, i64 128, !16, i64 152, !16, i64 176, !16, i64 200, !16, i64 224, !17, i64 248, !17, i64 252, !18, i64 256}
!13 = !{!"_ZTSSt10shared_ptrIN9NOMAD_4_312PbParametersEE", !14, i64 0}
!14 = !{!"_ZTSSt12__shared_ptrIN9NOMAD_4_312PbParametersELN9__gnu_cxx12_Lock_policyE2EE", !6, i64 0, !15, i64 8}
!15 = !{!"_ZTSSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EE", !6, i64 0}
!16 = !{!"_ZTSN9NOMAD_4_313ArrayOfDoubleE", !10, i64 8, !6, i64 16}
!17 = !{!"int", !7, i64 0}
!18 = !{!"bool", !7, 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::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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN9NOMAD_4_36CSMesh20refineDeltaFrameSizeEv(ptr noundef nonnull align 8 dereferenceable(336) %0) unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.NOMAD_4_3::Double", align 8
  %3 = alloca %"class.NOMAD_4_3::Double", align 8
  %4 = getelementptr inbounds i8, ptr %0, i64 8
  %5 = load i64, ptr %4, align 8, !tbaa !5
  %.not = icmp eq i64 %5, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %1
  %6 = getelementptr inbounds i8, ptr %0, i64 288
  %7 = getelementptr inbounds i8, ptr %0, i64 312
  %8 = getelementptr inbounds i8, ptr %0, i64 56
  br label %9

._crit_edge:                                      ; preds = %33, %1
  ret void

9:                                                ; preds = %.lr.ph, %33
  %.01215 = phi i64 [ 0, %.lr.ph ], [ %34, %33 ]
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %2) #5
  %10 = call noundef nonnull align 8 dereferenceable(17) ptr @_ZNK9NOMAD_4_313ArrayOfDoubleixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %.01215)
  call void @_ZN9NOMAD_4_36DoubleC1ERKS0_(ptr noundef nonnull align 8 dereferenceable(17) %2, ptr noundef nonnull align 8 dereferenceable(17) %10)
  %11 = invoke noundef nonnull align 8 dereferenceable(17) ptr @_ZNK9NOMAD_4_313ArrayOfDoubleixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %.01215)
          to label %12 unwind label %27

12:                                               ; preds = %9
  invoke void @_ZNK9NOMAD_4_36CSMesh20refineDeltaFrameSizeERNS_6DoubleERKS1_(ptr noundef nonnull align 8 dereferenceable(336) %0, ptr noundef nonnull align 8 dereferenceable(17) %2, ptr noundef nonnull align 8 dereferenceable(17) %11)
          to label %13 unwind label %27

13:                                               ; preds = %12
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #5
  %14 = invoke noundef nonnull align 8 dereferenceable(17) ptr @_ZNK9NOMAD_4_313ArrayOfDoubleixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %.01215)
          to label %15 unwind label %29

15:                                               ; preds = %13
  %16 = invoke noundef nonnull align 8 dereferenceable(17) ptr @_ZNK9NOMAD_4_313ArrayOfDoubleixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %.01215)
          to label %17 unwind label %29

17:                                               ; preds = %15
  invoke void @_ZNK9NOMAD_4_36CSMesh16getdeltaMeshSizeERKNS_6DoubleES3_(ptr dead_on_unwind nonnull writable sret(%"class.NOMAD_4_3::Double") align 8 %3, ptr noundef nonnull align 8 dereferenceable(336) %0, ptr noundef nonnull align 8 dereferenceable(17) %14, ptr noundef nonnull align 8 dereferenceable(17) %16)
          to label %18 unwind label %29

18:                                               ; preds = %17
  %19 = invoke noundef nonnull align 8 dereferenceable(17) ptr @_ZNK9NOMAD_4_313ArrayOfDoubleixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %.01215)
          to label %20 unwind label %31

20:                                               ; preds = %18
  %21 = invoke noundef zeroext i1 @_ZN9NOMAD_4_3leERKNS_6DoubleES2_(ptr noundef nonnull align 8 dereferenceable(17) %19, ptr noundef nonnull align 8 dereferenceable(17) %3)
          to label %22 unwind label %31

22:                                               ; preds = %20
  br i1 %21, label %23, label %33

23:                                               ; preds = %22
  %24 = invoke noundef nonnull align 8 dereferenceable(17) ptr @_ZNK9NOMAD_4_313ArrayOfDoubleixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %.01215)
          to label %25 unwind label %31

25:                                               ; preds = %23
  %26 = invoke noundef nonnull align 8 dereferenceable(17) ptr @_ZN9NOMAD_4_36DoubleaSERKS0_(ptr noundef nonnull align 8 dereferenceable(17) %24, ptr noundef nonnull align 8 dereferenceable(17) %2)
          to label %33 unwind label %31

27:                                               ; preds = %12, %9
  %28 = landingpad { ptr, i32 }
          cleanup
  br label %38

29:                                               ; preds = %17, %15, %13
  %30 = landingpad { ptr, i32 }
          cleanup
  br label %37

31:                                               ; preds = %25, %23, %20, %18
  %32 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %3) #5
  br label %37

33:                                               ; preds = %25, %22
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %3) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #5
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %2) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #5
  %34 = add nuw i64 %.01215, 1
  %35 = load i64, ptr %4, align 8, !tbaa !5
  %36 = icmp ult i64 %34, %35
  br i1 %36, label %9, label %._crit_edge, !llvm.loop !17

37:                                               ; preds = %31, %29
  %.pn = phi { ptr, i32 } [ %32, %31 ], [ %30, %29 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #5
  br label %38

38:                                               ; preds = %37, %27
  %.pn.pn = phi { ptr, i32 } [ %.pn, %37 ], [ %28, %27 ]
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %2) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #5
  resume { ptr, i32 } %.pn.pn
}

declare void @_ZN9NOMAD_4_36DoubleC1ERKS0_(ptr noundef nonnull align 8 dereferenceable(17), ptr noundef nonnull align 8 dereferenceable(17)) unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK9NOMAD_4_36CSMesh20refineDeltaFrameSizeERNS_6DoubleERKS1_(ptr noundef nonnull align 8 dereferenceable(336), ptr noundef nonnull align 8 dereferenceable(17), ptr noundef nonnull align 8 dereferenceable(17)) local_unnamed_addr #3 align 2

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

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { "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 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 = { 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 #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, !7, i64 8}
!6 = !{!"_ZTSN9NOMAD_4_38MeshBaseE", !7, i64 8, !10, i64 16, !14, i64 32, !14, i64 56, !14, i64 80, !14, i64 104, !14, i64 128, !14, i64 152, !14, i64 176, !14, i64 200, !14, i64 224, !15, i64 248, !15, i64 252, !16, i64 256}
!7 = !{!"long", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSSt10shared_ptrIN9NOMAD_4_312PbParametersEE", !11, i64 0}
!11 = !{!"_ZTSSt12__shared_ptrIN9NOMAD_4_312PbParametersELN9__gnu_cxx12_Lock_policyE2EE", !12, i64 0, !13, i64 8}
!12 = !{!"any pointer", !8, i64 0}
!13 = !{!"_ZTSSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EE", !12, i64 0}
!14 = !{!"_ZTSN9NOMAD_4_313ArrayOfDoubleE", !7, i64 8, !12, i64 16}
!15 = !{!"int", !8, i64 0}
!16 = !{!"bool", !8, i64 0}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}


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