; LLVM IR from artvns/SimpleFvm :: simplefvm/src/FVMSolver/ResidualsCalculation (ResidualsCalculator)

; 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.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.fvmsolver::ResidualsCalculator" = type { ptr, %"class.std::shared_ptr", double }
%"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 }

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN9fvmsolver19ResidualsCalculator17calculateResidualEv(ptr noundef nonnull align 8 dereferenceable(32) %0) #0 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca i64, align 8
  %4 = alloca i64, align 8
  %5 = alloca i32, align 4
  %6 = alloca %"class.std::__cxx11::basic_string", align 8
  %7 = alloca ptr, align 8
  %8 = alloca %"class.std::__cxx11::basic_string", align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca i64, align 8
  %12 = alloca %"class.std::__cxx11::basic_string", align 8
  %13 = alloca i64, align 8
  %14 = alloca double, align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  %15 = load ptr, ptr %2, align 8
  %16 = getelementptr inbounds %"class.fvmsolver::ResidualsCalculator", ptr %15, i32 0, i32 2
  store double 0.000000e+00, ptr %16, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #4
  %17 = getelementptr inbounds %"class.fvmsolver::ResidualsCalculator", ptr %15, i32 0, i32 0
  %18 = load ptr, ptr %17, align 8, !tbaa !15
  %19 = call noundef i64 @_ZNK9fvmsolver8MeshInfo20getDomainPartsAmountEv(ptr noundef nonnull align 8 dereferenceable(88) %18)
  store i64 %19, ptr %3, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #4
  store i64 0, ptr %4, align 8, !tbaa !16
  br label %20

20:                                               ; preds = %85, %1
  %21 = load i64, ptr %4, align 8, !tbaa !16
  %22 = load i64, ptr %3, align 8, !tbaa !16
  %23 = icmp ult i64 %21, %22
  br i1 %23, label %25, label %24

24:                                               ; preds = %20
  store i32 2, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #4
  br label %90

25:                                               ; preds = %20
  call void @llvm.lifetime.start.p0(i64 32, ptr %6) #4
  %26 = getelementptr inbounds %"class.fvmsolver::ResidualsCalculator", ptr %15, i32 0, i32 0
  %27 = load ptr, ptr %26, align 8, !tbaa !15
  %28 = load i64, ptr %4, align 8, !tbaa !16
  call void @_ZNK9fvmsolver8MeshInfo11getPartNameB5cxx11Em(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %6, ptr noundef nonnull align 8 dereferenceable(88) %27, i64 noundef %28)
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  %29 = getelementptr inbounds %"class.fvmsolver::ResidualsCalculator", ptr %15, i32 0, i32 1
  %30 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN9fvmsolver6MapAdtISt10unique_ptrINS0_17IResidsCalculatorESt14default_deleteIS3_EEEELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %29) #4
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef nonnull align 8 dereferenceable(32) %6)
          to label %31 unwind label %45

31:                                               ; preds = %25
  %32 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN9fvmsolver6MapAdtISt10unique_ptrINS_17IResidsCalculatorESt14default_deleteIS2_EEE9getObjectENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(56) %30, ptr noundef %8)
          to label %33 unwind label %49

33:                                               ; preds = %31
  %34 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt10unique_ptrIN9fvmsolver17IResidsCalculatorESt14default_deleteIS1_EEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %32) #4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #4
  store ptr %34, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  %35 = getelementptr inbounds %"class.fvmsolver::ResidualsCalculator", ptr %15, i32 0, i32 0
  %36 = load ptr, ptr %35, align 8, !tbaa !15
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %12, ptr noundef nonnull align 8 dereferenceable(32) %6)
          to label %37 unwind label %53

37:                                               ; preds = %33
  %38 = invoke noundef i64 @_ZNK9fvmsolver8MeshInfo18getPartCellsAmountENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(88) %36, ptr noundef %12)
          to label %39 unwind label %57

39:                                               ; preds = %37
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #4
  store i64 %38, ptr %11, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  store i64 0, ptr %13, align 8, !tbaa !16
  br label %40

40:                                               ; preds = %81, %39
  %41 = load i64, ptr %13, align 8, !tbaa !16
  %42 = load i64, ptr %11, align 8, !tbaa !16
  %43 = icmp ult i64 %41, %42
  br i1 %43, label %61, label %44

44:                                               ; preds = %40
  store i32 5, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  br label %84

45:                                               ; preds = %25
  %46 = landingpad { ptr, i32 }
          cleanup
  %47 = extractvalue { ptr, i32 } %46, 0
  store ptr %47, ptr %9, align 8
  %48 = extractvalue { ptr, i32 } %46, 1
  store i32 %48, ptr %10, align 4
  br label %89

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

53:                                               ; preds = %33
  %54 = landingpad { ptr, i32 }
          cleanup
  %55 = extractvalue { ptr, i32 } %54, 0
  store ptr %55, ptr %9, align 8
  %56 = extractvalue { ptr, i32 } %54, 1
  store i32 %56, ptr %10, align 4
  br label %88

57:                                               ; preds = %37
  %58 = landingpad { ptr, i32 }
          cleanup
  %59 = extractvalue { ptr, i32 } %58, 0
  store ptr %59, ptr %9, align 8
  %60 = extractvalue { ptr, i32 } %58, 1
  store i32 %60, ptr %10, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #4
  br label %88

61:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  %62 = load ptr, ptr %7, align 8, !tbaa !5
  %63 = load i64, ptr %13, align 8, !tbaa !16
  %64 = load ptr, ptr %62, align 8, !tbaa !18
  %65 = getelementptr inbounds ptr, ptr %64, i64 0
  %66 = load ptr, ptr %65, align 8
  %67 = invoke noundef double %66(ptr noundef nonnull align 8 dereferenceable(8) %62, i64 noundef %63)
          to label %68 unwind label %76

68:                                               ; preds = %61
  store double %67, ptr %14, align 8, !tbaa !20
  %69 = getelementptr inbounds %"class.fvmsolver::ResidualsCalculator", ptr %15, i32 0, i32 2
  %70 = load double, ptr %69, align 8, !tbaa !9
  %71 = load double, ptr %14, align 8, !tbaa !20
  %72 = fcmp olt double %70, %71
  br i1 %72, label %73, label %80

73:                                               ; preds = %68
  %74 = load double, ptr %14, align 8, !tbaa !20
  %75 = getelementptr inbounds %"class.fvmsolver::ResidualsCalculator", ptr %15, i32 0, i32 2
  store double %74, ptr %75, align 8, !tbaa !9
  br label %80

76:                                               ; preds = %61
  %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 @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  br label %88

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

81:                                               ; preds = %80
  %82 = load i64, ptr %13, align 8, !tbaa !16
  %83 = add i64 %82, 1
  store i64 %83, ptr %13, align 8, !tbaa !16
  br label %40, !llvm.loop !21

84:                                               ; preds = %44
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %6) #4
  br label %85

85:                                               ; preds = %84
  %86 = load i64, ptr %4, align 8, !tbaa !16
  %87 = add i64 %86, 1
  store i64 %87, ptr %4, align 8, !tbaa !16
  br label %20, !llvm.loop !23

88:                                               ; preds = %76, %57, %53
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  br label %89

89:                                               ; preds = %88, %49, %45
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #4
  br label %91

90:                                               ; preds = %24
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #4
  ret void

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

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

declare noundef i64 @_ZNK9fvmsolver8MeshInfo20getDomainPartsAmountEv(ptr noundef nonnull align 8 dereferenceable(88)) #2

declare void @_ZNK9fvmsolver8MeshInfo11getPartNameB5cxx11Em(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(88), i64 noundef) #2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN9fvmsolver6MapAdtISt10unique_ptrINS_17IResidsCalculatorESt14default_deleteIS2_EEE9getObjectENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef) #0 align 2

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #3 align 2

declare noundef i64 @_ZNK9fvmsolver8MeshInfo18getPartCellsAmountENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(88), ptr noundef) #2

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

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 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 = { 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, !14, i64 24}
!10 = !{!"_ZTSN9fvmsolver19ResidualsCalculatorE", !6, i64 0, !11, i64 8, !14, i64 24}
!11 = !{!"_ZTSSt10shared_ptrIN9fvmsolver6MapAdtISt10unique_ptrINS0_17IResidsCalculatorESt14default_deleteIS3_EEEEE", !12, i64 0}
!12 = !{!"_ZTSSt12__shared_ptrIN9fvmsolver6MapAdtISt10unique_ptrINS0_17IResidsCalculatorESt14default_deleteIS3_EEEELN9__gnu_cxx12_Lock_policyE2EE", !6, i64 0, !13, i64 8}
!13 = !{!"_ZTSSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EE", !6, i64 0}
!14 = !{!"double", !7, i64 0}
!15 = !{!10, !6, i64 0}
!16 = !{!17, !17, i64 0}
!17 = !{!"long", !7, i64 0}
!18 = !{!19, !19, i64 0}
!19 = !{!"vtable pointer", !8, i64 0}
!20 = !{!14, !14, i64 0}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}
!23 = distinct !{!23, !22}


; 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.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: mustprogress uwtable
define dso_local void @_ZN9fvmsolver19ResidualsCalculator17calculateResidualEv(ptr noundef nonnull align 8 dereferenceable(32) %0) local_unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.std::__cxx11::basic_string", align 8
  %3 = alloca %"class.std::__cxx11::basic_string", align 8
  %4 = alloca %"class.std::__cxx11::basic_string", align 8
  %5 = getelementptr inbounds i8, ptr %0, i64 24
  store double 0.000000e+00, ptr %5, align 8, !tbaa !5
  %6 = load ptr, ptr %0, align 8, !tbaa !14
  %7 = tail call noundef i64 @_ZNK9fvmsolver8MeshInfo20getDomainPartsAmountEv(ptr noundef nonnull align 8 dereferenceable(88) %6)
  %.not = icmp eq i64 %7, 0
  br i1 %.not, label %._crit_edge24, label %.lr.ph23

.lr.ph23:                                         ; preds = %1
  %8 = getelementptr inbounds i8, ptr %0, i64 8
  br label %9

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

9:                                                ; preds = %.lr.ph23, %._crit_edge
  %.021 = phi i64 [ 0, %.lr.ph23 ], [ %20, %._crit_edge ]
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %2) #4
  %10 = load ptr, ptr %0, align 8, !tbaa !14
  call void @_ZNK9fvmsolver8MeshInfo11getPartNameB5cxx11Em(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %2, ptr noundef nonnull align 8 dereferenceable(88) %10, i64 noundef %.021)
  %11 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN9fvmsolver6MapAdtISt10unique_ptrINS0_17IResidsCalculatorESt14default_deleteIS3_EEEELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %8) #4
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %3, ptr noundef nonnull align 8 dereferenceable(32) %2)
          to label %12 unwind label %21

12:                                               ; preds = %9
  %13 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN9fvmsolver6MapAdtISt10unique_ptrINS_17IResidsCalculatorESt14default_deleteIS2_EEE9getObjectENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(56) %11, ptr noundef nonnull %3)
          to label %14 unwind label %23

14:                                               ; preds = %12
  %15 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt10unique_ptrIN9fvmsolver17IResidsCalculatorESt14default_deleteIS1_EEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %13) #4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #4
  %16 = load ptr, ptr %0, align 8, !tbaa !14
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef nonnull align 8 dereferenceable(32) %2)
          to label %17 unwind label %25

17:                                               ; preds = %14
  %18 = invoke noundef i64 @_ZNK9fvmsolver8MeshInfo18getPartCellsAmountENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(88) %16, ptr noundef nonnull %4)
          to label %19 unwind label %27

19:                                               ; preds = %17
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #4
  %.not25 = icmp eq i64 %18, 0
  br i1 %.not25, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %38, %19
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %2) #4
  %20 = add nuw i64 %.021, 1
  %exitcond26.not = icmp eq i64 %20, %7
  br i1 %exitcond26.not, label %._crit_edge24, label %9, !llvm.loop !15

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

23:                                               ; preds = %12
  %24 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #4
  br label %40

25:                                               ; preds = %14
  %26 = landingpad { ptr, i32 }
          cleanup
  br label %40

27:                                               ; preds = %17
  %28 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #4
  br label %40

.lr.ph:                                           ; preds = %19, %38
  %.01320 = phi i64 [ %39, %38 ], [ 0, %19 ]
  %29 = load ptr, ptr %15, align 8, !tbaa !17
  %30 = load ptr, ptr %29, align 8
  %31 = invoke noundef double %30(ptr noundef nonnull align 8 dereferenceable(8) %15, i64 noundef %.01320)
          to label %32 unwind label %36

32:                                               ; preds = %.lr.ph
  %33 = load double, ptr %5, align 8, !tbaa !5
  %34 = fcmp olt double %33, %31
  br i1 %34, label %35, label %38

35:                                               ; preds = %32
  store double %31, ptr %5, align 8, !tbaa !5
  br label %38

36:                                               ; preds = %.lr.ph
  %37 = landingpad { ptr, i32 }
          cleanup
  br label %40

38:                                               ; preds = %35, %32
  %39 = add nuw i64 %.01320, 1
  %exitcond.not = icmp eq i64 %39, %18
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !19

40:                                               ; preds = %25, %27, %36, %23, %21
  %.pn.pn = phi { ptr, i32 } [ %24, %23 ], [ %22, %21 ], [ %37, %36 ], [ %28, %27 ], [ %26, %25 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %2) #4
  resume { ptr, i32 } %.pn.pn
}

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

declare noundef i64 @_ZNK9fvmsolver8MeshInfo20getDomainPartsAmountEv(ptr noundef nonnull align 8 dereferenceable(88)) local_unnamed_addr #2

declare void @_ZNK9fvmsolver8MeshInfo11getPartNameB5cxx11Em(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(88), i64 noundef) local_unnamed_addr #2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN9fvmsolver6MapAdtISt10unique_ptrINS_17IResidsCalculatorESt14default_deleteIS2_EEE9getObjectENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef) local_unnamed_addr #0 align 2

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #3 align 2

declare noundef i64 @_ZNK9fvmsolver8MeshInfo18getPartCellsAmountENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(88), ptr noundef) local_unnamed_addr #2

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

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


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