; LLVM IR from atlantis13579/Riemann :: Src/Geometry (GeometryAttributes)

; 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] }

@_ZN7Riemann14UVChannelNamesB5cxx11E = external dso_local global [8 x %"class.std::__cxx11::basic_string"], align 16

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) #1

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

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) #3

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7Riemann23DynamicMeshAttributeSet16EnableUVChannelsEPNS_11DynamicMeshEibb(ptr noundef %0, i32 noundef %1, i1 noundef zeroext %2, i1 noundef zeroext %3) #4 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i8, align 1
  %8 = alloca i8, align 1
  %9 = alloca i32, align 4
  %10 = alloca %"class.std::__cxx11::basic_string", align 8
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca %"class.std::__cxx11::basic_string", align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store i32 %1, ptr %6, align 4, !tbaa !9
  %15 = zext i1 %2 to i8
  store i8 %15, ptr %7, align 1, !tbaa !11
  %16 = zext i1 %3 to i8
  store i8 %16, ptr %8, align 1, !tbaa !11
  %17 = load ptr, ptr %5, align 8, !tbaa !5
  call void @_ZN7Riemann11DynamicMesh16EnableAttributesEv(ptr noundef nonnull align 8 dereferenceable(452) %17)
  %18 = load i32, ptr %6, align 4, !tbaa !9
  %19 = icmp sle i32 %18, 8
  br i1 %19, label %21, label %20

20:                                               ; preds = %4
  store i32 8, ptr %6, align 4, !tbaa !9
  br label %21

21:                                               ; preds = %20, %4
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  store i32 0, ptr %9, align 4, !tbaa !9
  br label %22

22:                                               ; preds = %49, %21
  %23 = load i32, ptr %9, align 4, !tbaa !9
  %24 = load i32, ptr %6, align 4, !tbaa !9
  %25 = icmp slt i32 %23, %24
  br i1 %25, label %27, label %26

26:                                               ; preds = %22
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  br label %61

27:                                               ; preds = %22
  %28 = load i8, ptr %7, align 1, !tbaa !11, !range !13, !noundef !14
  %29 = trunc i8 %28 to i1
  br i1 %29, label %38, label %30

30:                                               ; preds = %27
  %31 = load ptr, ptr %5, align 8, !tbaa !5
  %32 = call noundef ptr @_ZN7Riemann11DynamicMesh10AttributesEv(ptr noundef nonnull align 8 dereferenceable(452) %31)
  %33 = load i32, ptr %9, align 4, !tbaa !9
  %34 = sext i32 %33 to i64
  %35 = getelementptr inbounds [8 x %"class.std::__cxx11::basic_string"], ptr @_ZN7Riemann14UVChannelNamesB5cxx11E, i64 0, i64 %34
  %36 = call noundef zeroext i1 @_ZNK7Riemann23DynamicMeshAttributeSet20HasAttachedAttributeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(168) %32, ptr noundef nonnull align 8 dereferenceable(32) %35)
  br i1 %36, label %37, label %38

37:                                               ; preds = %30
  br label %49

38:                                               ; preds = %30, %27
  %39 = load ptr, ptr %5, align 8, !tbaa !5
  %40 = call noundef ptr @_ZN7Riemann11DynamicMesh10AttributesEv(ptr noundef nonnull align 8 dereferenceable(452) %39)
  %41 = load i32, ptr %9, align 4, !tbaa !9
  %42 = sext i32 %41 to i64
  %43 = getelementptr inbounds [8 x %"class.std::__cxx11::basic_string"], ptr @_ZN7Riemann14UVChannelNamesB5cxx11E, i64 0, i64 %42
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %10, ptr noundef nonnull align 8 dereferenceable(32) %43)
  %44 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 72) #6
          to label %45 unwind label %52

45:                                               ; preds = %38
  %46 = load ptr, ptr %5, align 8, !tbaa !5
  invoke void @_ZN7Riemann23TDynamicVertexAttributeIfLi2EEC2EPNS_11DynamicMeshEb(ptr noundef nonnull align 8 dereferenceable(72) %44, ptr noundef %46, i1 noundef zeroext true)
          to label %47 unwind label %56

47:                                               ; preds = %45
  invoke void @_ZN7Riemann23DynamicMeshAttributeSet15AttachAttributeENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPNS_21TDynamicAttributeBaseE(ptr noundef nonnull align 8 dereferenceable(168) %40, ptr noundef %10, ptr noundef %44)
          to label %48 unwind label %52

48:                                               ; preds = %47
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #5
  br label %49

49:                                               ; preds = %48, %37
  %50 = load i32, ptr %9, align 4, !tbaa !9
  %51 = add nsw i32 %50, 1
  store i32 %51, ptr %9, align 4, !tbaa !9
  br label %22, !llvm.loop !15

52:                                               ; preds = %47, %38
  %53 = landingpad { ptr, i32 }
          cleanup
  %54 = extractvalue { ptr, i32 } %53, 0
  store ptr %54, ptr %11, align 8
  %55 = extractvalue { ptr, i32 } %53, 1
  store i32 %55, ptr %12, align 4
  br label %60

56:                                               ; preds = %45
  %57 = landingpad { ptr, i32 }
          cleanup
  %58 = extractvalue { ptr, i32 } %57, 0
  store ptr %58, ptr %11, align 8
  %59 = extractvalue { ptr, i32 } %57, 1
  store i32 %59, ptr %12, align 4
  call void @_ZdlPvm(ptr noundef %44, i64 noundef 72) #7
  br label %60

60:                                               ; preds = %56, %52
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  br label %86

61:                                               ; preds = %26
  %62 = load i8, ptr %8, align 1, !tbaa !11, !range !13, !noundef !14
  %63 = trunc i8 %62 to i1
  br i1 %63, label %64, label %85

64:                                               ; preds = %61
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  %65 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %65, ptr %13, align 4, !tbaa !9
  br label %66

66:                                               ; preds = %77, %64
  %67 = load i32, ptr %13, align 4, !tbaa !9
  %68 = icmp slt i32 %67, 8
  br i1 %68, label %70, label %69

69:                                               ; preds = %66
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  br label %84

70:                                               ; preds = %66
  %71 = load ptr, ptr %5, align 8, !tbaa !5
  %72 = call noundef ptr @_ZN7Riemann11DynamicMesh10AttributesEv(ptr noundef nonnull align 8 dereferenceable(452) %71)
  %73 = load i32, ptr %13, align 4, !tbaa !9
  %74 = sext i32 %73 to i64
  %75 = getelementptr inbounds [8 x %"class.std::__cxx11::basic_string"], ptr @_ZN7Riemann14UVChannelNamesB5cxx11E, i64 0, i64 %74
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %14, ptr noundef nonnull align 8 dereferenceable(32) %75)
  invoke void @_ZN7Riemann23DynamicMeshAttributeSet15RemoveAttributeENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(168) %72, ptr noundef %14)
          to label %76 unwind label %80

76:                                               ; preds = %70
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #5
  br label %77

77:                                               ; preds = %76
  %78 = load i32, ptr %13, align 4, !tbaa !9
  %79 = add nsw i32 %78, 1
  store i32 %79, ptr %13, align 4, !tbaa !9
  br label %66, !llvm.loop !17

80:                                               ; preds = %70
  %81 = landingpad { ptr, i32 }
          cleanup
  %82 = extractvalue { ptr, i32 } %81, 0
  store ptr %82, ptr %11, align 8
  %83 = extractvalue { ptr, i32 } %81, 1
  store i32 %83, ptr %12, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  br label %86

84:                                               ; preds = %69
  br label %85

85:                                               ; preds = %84, %61
  ret void

86:                                               ; preds = %80, %60
  %87 = load ptr, ptr %11, align 8
  %88 = load i32, ptr %12, align 4
  %89 = insertvalue { ptr, i32 } poison, ptr %87, 0
  %90 = insertvalue { ptr, i32 } %89, i32 %88, 1
  resume { ptr, i32 } %90
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7Riemann11DynamicMesh16EnableAttributesEv(ptr noundef nonnull align 8 dereferenceable(452)) #4 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7Riemann23DynamicMeshAttributeSet15AttachAttributeENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPNS_21TDynamicAttributeBaseE(ptr noundef nonnull align 8 dereferenceable(168), ptr noundef, ptr noundef) #4 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 #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7Riemann23TDynamicVertexAttributeIfLi2EEC2EPNS_11DynamicMeshEb(ptr noundef nonnull align 8 dereferenceable(72), ptr noundef, i1 noundef zeroext) unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7Riemann23DynamicMeshAttributeSet15RemoveAttributeENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(168), ptr noundef) #4 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nobuiltin 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 = { 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 #3 = { nobuiltin allocsize(0) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind }
attributes #6 = { builtin allocsize(0) }
attributes #7 = { builtin 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 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{i8 0, i8 2}
!14 = !{}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = distinct !{!17, !16}


; 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] }

@_ZN7Riemann14UVChannelNamesB5cxx11E = external dso_local global [8 x %"class.std::__cxx11::basic_string"], align 16

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) local_unnamed_addr #0

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

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7Riemann23DynamicMeshAttributeSet16EnableUVChannelsEPNS_11DynamicMeshEibb(ptr noundef nonnull %0, i32 noundef %1, i1 noundef zeroext %2, i1 noundef zeroext %3) local_unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca %"class.std::__cxx11::basic_string", align 8
  %6 = alloca %"class.std::__cxx11::basic_string", align 8
  tail call void @_ZN7Riemann11DynamicMesh16EnableAttributesEv(ptr noundef nonnull align 8 dereferenceable(452) %0)
  %7 = icmp sgt i32 %1, 0
  br i1 %7, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %4
  %spec.store.select = tail call i32 @llvm.smin.i32(i32 %1, i32 8)
  %wide.trip.count38 = zext nneg i32 %spec.store.select to i64
  br i1 %2, label %.lr.ph.split.us, label %.lr.ph.split

.lr.ph.split.us:                                  ; preds = %.lr.ph, %13
  %indvars.iv35 = phi i64 [ %indvars.iv.next36, %13 ], [ 0, %.lr.ph ]
  %8 = call noundef ptr @_ZN7Riemann11DynamicMesh10AttributesEv(ptr noundef nonnull align 8 dereferenceable(452) %0)
  %9 = getelementptr inbounds [8 x %"class.std::__cxx11::basic_string"], ptr @_ZN7Riemann14UVChannelNamesB5cxx11E, i64 0, i64 %indvars.iv35
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef nonnull align 8 dereferenceable(32) %9)
  %10 = invoke noalias noundef nonnull dereferenceable(72) ptr @_Znwm(i64 noundef 72) #5
          to label %11 unwind label %.split.us

11:                                               ; preds = %.lr.ph.split.us
  invoke void @_ZN7Riemann23TDynamicVertexAttributeIfLi2EEC2EPNS_11DynamicMeshEb(ptr noundef nonnull align 8 dereferenceable(72) %10, ptr noundef nonnull %0, i1 noundef zeroext true)
          to label %12 unwind label %.split26.us

12:                                               ; preds = %11
  invoke void @_ZN7Riemann23DynamicMeshAttributeSet15AttachAttributeENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPNS_21TDynamicAttributeBaseE(ptr noundef nonnull align 8 dereferenceable(168) %8, ptr noundef nonnull %5, ptr noundef nonnull %10)
          to label %13 unwind label %.split.us

13:                                               ; preds = %12
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #6
  %indvars.iv.next36 = add nuw nsw i64 %indvars.iv35, 1
  %exitcond39.not = icmp eq i64 %indvars.iv.next36, %wide.trip.count38
  br i1 %exitcond39.not, label %._crit_edge, label %.lr.ph.split.us, !llvm.loop !5

.split.us:                                        ; preds = %12, %.lr.ph.split.us
  %14 = landingpad { ptr, i32 }
          cleanup
  br label %37

.split26.us:                                      ; preds = %11
  %15 = landingpad { ptr, i32 }
          cleanup
  br label %30

._crit_edge:                                      ; preds = %27, %13, %4
  %16 = icmp slt i32 %1, 8
  %or.cond = and i1 %16, %3
  br i1 %or.cond, label %.lr.ph30.preheader, label %.loopexit

.lr.ph30.preheader:                               ; preds = %._crit_edge
  %17 = sext i32 %1 to i64
  br label %.lr.ph30

.lr.ph.split:                                     ; preds = %.lr.ph, %27
  %indvars.iv = phi i64 [ %indvars.iv.next, %27 ], [ 0, %.lr.ph ]
  %18 = call noundef ptr @_ZN7Riemann11DynamicMesh10AttributesEv(ptr noundef nonnull align 8 dereferenceable(452) %0)
  %19 = getelementptr inbounds [8 x %"class.std::__cxx11::basic_string"], ptr @_ZN7Riemann14UVChannelNamesB5cxx11E, i64 0, i64 %indvars.iv
  %20 = call noundef zeroext i1 @_ZNK7Riemann23DynamicMeshAttributeSet20HasAttachedAttributeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(168) %18, ptr noundef nonnull align 8 dereferenceable(32) %19)
  br i1 %20, label %27, label %21

21:                                               ; preds = %.lr.ph.split
  %22 = call noundef ptr @_ZN7Riemann11DynamicMesh10AttributesEv(ptr noundef nonnull align 8 dereferenceable(452) %0)
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef nonnull align 8 dereferenceable(32) %19)
  %23 = invoke noalias noundef nonnull dereferenceable(72) ptr @_Znwm(i64 noundef 72) #5
          to label %24 unwind label %.split

24:                                               ; preds = %21
  invoke void @_ZN7Riemann23TDynamicVertexAttributeIfLi2EEC2EPNS_11DynamicMeshEb(ptr noundef nonnull align 8 dereferenceable(72) %23, ptr noundef nonnull %0, i1 noundef zeroext true)
          to label %25 unwind label %.split26

25:                                               ; preds = %24
  invoke void @_ZN7Riemann23DynamicMeshAttributeSet15AttachAttributeENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPNS_21TDynamicAttributeBaseE(ptr noundef nonnull align 8 dereferenceable(168) %22, ptr noundef nonnull %5, ptr noundef nonnull %23)
          to label %26 unwind label %.split

26:                                               ; preds = %25
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #6
  br label %27

27:                                               ; preds = %.lr.ph.split, %26
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count38
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph.split, !llvm.loop !5

.split:                                           ; preds = %25, %21
  %28 = landingpad { ptr, i32 }
          cleanup
  br label %37

.split26:                                         ; preds = %24
  %29 = landingpad { ptr, i32 }
          cleanup
  br label %30

30:                                               ; preds = %.split26.us, %.split26
  %.us-phi27 = phi ptr [ %23, %.split26 ], [ %10, %.split26.us ]
  %.us-phi28 = phi { ptr, i32 } [ %29, %.split26 ], [ %15, %.split26.us ]
  call void @_ZdlPvm(ptr noundef nonnull %.us-phi27, i64 noundef 72) #7
  br label %37

.lr.ph30:                                         ; preds = %.lr.ph30.preheader, %33
  %indvars.iv40 = phi i64 [ %17, %.lr.ph30.preheader ], [ %indvars.iv.next41, %33 ]
  %31 = call noundef ptr @_ZN7Riemann11DynamicMesh10AttributesEv(ptr noundef nonnull align 8 dereferenceable(452) %0)
  %32 = getelementptr inbounds [8 x %"class.std::__cxx11::basic_string"], ptr @_ZN7Riemann14UVChannelNamesB5cxx11E, i64 0, i64 %indvars.iv40
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef nonnull align 8 dereferenceable(32) %32)
  invoke void @_ZN7Riemann23DynamicMeshAttributeSet15RemoveAttributeENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(168) %31, ptr noundef nonnull %6)
          to label %33 unwind label %35

33:                                               ; preds = %.lr.ph30
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #6
  %indvars.iv.next41 = add nsw i64 %indvars.iv40, 1
  %34 = and i64 %indvars.iv.next41, 4294967295
  %exitcond42.not = icmp eq i64 %34, 8
  br i1 %exitcond42.not, label %.loopexit, label %.lr.ph30, !llvm.loop !7

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

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

37:                                               ; preds = %30, %.split.us, %.split, %35
  %.sink = phi ptr [ %6, %35 ], [ %5, %.split ], [ %5, %.split.us ], [ %5, %30 ]
  %.pn.pn = phi { ptr, i32 } [ %36, %35 ], [ %28, %.split ], [ %14, %.split.us ], [ %.us-phi28, %30 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %.sink) #6
  resume { ptr, i32 } %.pn.pn
}

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7Riemann23DynamicMeshAttributeSet15AttachAttributeENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPNS_21TDynamicAttributeBaseE(ptr noundef nonnull align 8 dereferenceable(168), ptr noundef, ptr noundef) local_unnamed_addr #3 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 #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7Riemann23TDynamicVertexAttributeIfLi2EEC2EPNS_11DynamicMeshEb(ptr noundef nonnull align 8 dereferenceable(72), ptr noundef, i1 noundef zeroext) unnamed_addr #3 align 2

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smin.i32(i32, i32) #4

attributes #0 = { nobuiltin 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 #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 = { nobuiltin allocsize(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 = { 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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { builtin allocsize(0) }
attributes #6 = { nounwind }
attributes #7 = { builtin 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 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}
!7 = distinct !{!7, !6}


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