; LLVM IR from DarrenSweeney/3D-Physics-Engine :: Physics Engine/Imgui/imgui.ll (ZNK6ImFont21CalcWordWrapPositionAEfPKcS1_f)

; 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"

%struct.ImFont = type { float, float, %struct.ImVec2, i16, ptr, %class.ImVector.16, ptr, float, %class.ImVector.10, %class.ImVector.17 }
%struct.ImVec2 = type { float, float }
%class.ImVector.16 = type { i64, i64, ptr }
%class.ImVector.10 = type { i64, i64, ptr }
%class.ImVector.17 = type { i64, i64, ptr }

; 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

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef i32 @_ZL18ImTextCharFromUtf8PjPKcS1_(ptr noundef, ptr noundef, ptr noundef) #1

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef zeroext i1 @_ZL13ImCharIsSpacei(i32 noundef) #2

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

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZNK6ImFont21CalcWordWrapPositionAEfPKcS1_f(ptr noundef nonnull align 8 dereferenceable(120) %0, float noundef %1, ptr noundef %2, ptr noundef %3, float noundef %4) #3 align 2 {
  %6 = alloca ptr, align 8
  %7 = alloca float, align 4
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca float, align 4
  %11 = alloca float, align 4
  %12 = alloca float, align 4
  %13 = alloca float, align 4
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca i8, align 1
  %17 = alloca ptr, align 8
  %18 = alloca i32, align 4
  %19 = alloca ptr, align 8
  %20 = alloca i32, align 4
  %21 = alloca float, align 4
  store ptr %0, ptr %6, align 8, !tbaa !5
  store float %1, ptr %7, align 4, !tbaa !9
  store ptr %2, ptr %8, align 8, !tbaa !5
  store ptr %3, ptr %9, align 8, !tbaa !5
  store float %4, ptr %10, align 4, !tbaa !9
  %22 = load ptr, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  store float 0.000000e+00, ptr %11, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  store float 0.000000e+00, ptr %12, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  store float 0.000000e+00, ptr %13, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  %23 = load ptr, ptr %8, align 8, !tbaa !5
  store ptr %23, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #4
  store ptr null, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %16) #4
  store i8 1, ptr %16, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #4
  %24 = load ptr, ptr %8, align 8, !tbaa !5
  store ptr %24, ptr %17, align 8, !tbaa !5
  br label %25

25:                                               ; preds = %144, %142, %5
  %26 = load ptr, ptr %17, align 8, !tbaa !5
  %27 = load ptr, ptr %9, align 8, !tbaa !5
  %28 = icmp ult ptr %26, %27
  br i1 %28, label %29, label %145

29:                                               ; preds = %25
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #4
  %30 = load ptr, ptr %17, align 8, !tbaa !5
  %31 = load i8, ptr %30, align 1, !tbaa !13
  %32 = sext i8 %31 to i32
  store i32 %32, ptr %18, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #4
  %33 = load i32, ptr %18, align 4, !tbaa !14
  %34 = icmp ult i32 %33, 128
  br i1 %34, label %35, label %38

35:                                               ; preds = %29
  %36 = load ptr, ptr %17, align 8, !tbaa !5
  %37 = getelementptr inbounds i8, ptr %36, i64 1
  store ptr %37, ptr %19, align 8, !tbaa !5
  br label %45

38:                                               ; preds = %29
  %39 = load ptr, ptr %17, align 8, !tbaa !5
  %40 = load ptr, ptr %17, align 8, !tbaa !5
  %41 = load ptr, ptr %9, align 8, !tbaa !5
  %42 = call noundef i32 @_ZL18ImTextCharFromUtf8PjPKcS1_(ptr noundef %18, ptr noundef %40, ptr noundef %41)
  %43 = sext i32 %42 to i64
  %44 = getelementptr inbounds i8, ptr %39, i64 %43
  store ptr %44, ptr %19, align 8, !tbaa !5
  br label %45

45:                                               ; preds = %38, %35
  %46 = load i32, ptr %18, align 4, !tbaa !14
  %47 = icmp eq i32 %46, 10
  br i1 %47, label %48, label %50

48:                                               ; preds = %45
  store float 0.000000e+00, ptr %13, align 4, !tbaa !9
  store float 0.000000e+00, ptr %12, align 4, !tbaa !9
  store float 0.000000e+00, ptr %11, align 4, !tbaa !9
  store i8 1, ptr %16, align 1, !tbaa !11
  %49 = load ptr, ptr %19, align 8, !tbaa !5
  store ptr %49, ptr %17, align 8, !tbaa !5
  store i32 2, ptr %20, align 4
  br label %142, !llvm.loop !16

50:                                               ; preds = %45
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #4
  %51 = load i32, ptr %18, align 4, !tbaa !14
  %52 = zext i32 %51 to i64
  %53 = getelementptr inbounds %struct.ImFont, ptr %22, i32 0, i32 8
  %54 = call noundef i64 @_ZNK8ImVectorIfE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %53)
  %55 = icmp ult i64 %52, %54
  br i1 %55, label %56, label %64

56:                                               ; preds = %50
  %57 = getelementptr inbounds %struct.ImFont, ptr %22, i32 0, i32 8
  %58 = load i32, ptr %18, align 4, !tbaa !14
  %59 = zext i32 %58 to i64
  %60 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK8ImVectorIfEixEm(ptr noundef nonnull align 8 dereferenceable(24) %57, i64 noundef %59)
  %61 = load float, ptr %60, align 4, !tbaa !9
  %62 = load float, ptr %7, align 4, !tbaa !9
  %63 = fmul float %61, %62
  br label %67

64:                                               ; preds = %50
  %65 = getelementptr inbounds %struct.ImFont, ptr %22, i32 0, i32 7
  %66 = load float, ptr %65, align 8, !tbaa !18
  br label %67

67:                                               ; preds = %64, %56
  %68 = phi float [ %63, %56 ], [ %66, %64 ]
  store float %68, ptr %21, align 4, !tbaa !9
  %69 = load i32, ptr %18, align 4, !tbaa !14
  %70 = call noundef zeroext i1 @_ZL13ImCharIsSpacei(i32 noundef %69)
  br i1 %70, label %71, label %82

71:                                               ; preds = %67
  %72 = load i8, ptr %16, align 1, !tbaa !11, !range !26, !noundef !27
  %73 = trunc i8 %72 to i1
  br i1 %73, label %74, label %78

74:                                               ; preds = %71
  %75 = load float, ptr %13, align 4, !tbaa !9
  %76 = load float, ptr %11, align 4, !tbaa !9
  %77 = fadd float %76, %75
  store float %77, ptr %11, align 4, !tbaa !9
  store float 0.000000e+00, ptr %13, align 4, !tbaa !9
  br label %78

78:                                               ; preds = %74, %71
  %79 = load float, ptr %21, align 4, !tbaa !9
  %80 = load float, ptr %13, align 4, !tbaa !9
  %81 = fadd float %80, %79
  store float %81, ptr %13, align 4, !tbaa !9
  store i8 0, ptr %16, align 1, !tbaa !11
  br label %119

82:                                               ; preds = %67
  %83 = load float, ptr %21, align 4, !tbaa !9
  %84 = load float, ptr %12, align 4, !tbaa !9
  %85 = fadd float %84, %83
  store float %85, ptr %12, align 4, !tbaa !9
  %86 = load i8, ptr %16, align 1, !tbaa !11, !range !26, !noundef !27
  %87 = trunc i8 %86 to i1
  br i1 %87, label %88, label %90

88:                                               ; preds = %82
  %89 = load ptr, ptr %19, align 8, !tbaa !5
  store ptr %89, ptr %14, align 8, !tbaa !5
  br label %97

90:                                               ; preds = %82
  %91 = load ptr, ptr %14, align 8, !tbaa !5
  store ptr %91, ptr %15, align 8, !tbaa !5
  %92 = load float, ptr %12, align 4, !tbaa !9
  %93 = load float, ptr %13, align 4, !tbaa !9
  %94 = fadd float %92, %93
  %95 = load float, ptr %11, align 4, !tbaa !9
  %96 = fadd float %95, %94
  store float %96, ptr %11, align 4, !tbaa !9
  store float 0.000000e+00, ptr %13, align 4, !tbaa !9
  store float 0.000000e+00, ptr %12, align 4, !tbaa !9
  br label %97

97:                                               ; preds = %90, %88
  %98 = load i32, ptr %18, align 4, !tbaa !14
  %99 = icmp eq i32 %98, 46
  br i1 %99, label %115, label %100

100:                                              ; preds = %97
  %101 = load i32, ptr %18, align 4, !tbaa !14
  %102 = icmp eq i32 %101, 44
  br i1 %102, label %115, label %103

103:                                              ; preds = %100
  %104 = load i32, ptr %18, align 4, !tbaa !14
  %105 = icmp eq i32 %104, 59
  br i1 %105, label %115, label %106

106:                                              ; preds = %103
  %107 = load i32, ptr %18, align 4, !tbaa !14
  %108 = icmp eq i32 %107, 33
  br i1 %108, label %115, label %109

109:                                              ; preds = %106
  %110 = load i32, ptr %18, align 4, !tbaa !14
  %111 = icmp eq i32 %110, 63
  br i1 %111, label %115, label %112

112:                                              ; preds = %109
  %113 = load i32, ptr %18, align 4, !tbaa !14
  %114 = icmp eq i32 %113, 34
  br label %115

115:                                              ; preds = %112, %109, %106, %103, %100, %97
  %116 = phi i1 [ true, %109 ], [ true, %106 ], [ true, %103 ], [ true, %100 ], [ true, %97 ], [ %114, %112 ]
  %117 = xor i1 %116, true
  %118 = zext i1 %117 to i8
  store i8 %118, ptr %16, align 1, !tbaa !11
  br label %119

119:                                              ; preds = %115, %78
  %120 = load float, ptr %11, align 4, !tbaa !9
  %121 = load float, ptr %12, align 4, !tbaa !9
  %122 = fadd float %120, %121
  %123 = load float, ptr %10, align 4, !tbaa !9
  %124 = fcmp oge float %122, %123
  br i1 %124, label %125, label %139

125:                                              ; preds = %119
  %126 = load float, ptr %12, align 4, !tbaa !9
  %127 = load float, ptr %10, align 4, !tbaa !9
  %128 = fcmp olt float %126, %127
  br i1 %128, label %129, label %138

129:                                              ; preds = %125
  %130 = load ptr, ptr %15, align 8, !tbaa !5
  %131 = icmp ne ptr %130, null
  br i1 %131, label %132, label %134

132:                                              ; preds = %129
  %133 = load ptr, ptr %15, align 8, !tbaa !5
  br label %136

134:                                              ; preds = %129
  %135 = load ptr, ptr %14, align 8, !tbaa !5
  br label %136

136:                                              ; preds = %134, %132
  %137 = phi ptr [ %133, %132 ], [ %135, %134 ]
  store ptr %137, ptr %17, align 8, !tbaa !5
  br label %138

138:                                              ; preds = %136, %125
  store i32 3, ptr %20, align 4
  br label %141

139:                                              ; preds = %119
  %140 = load ptr, ptr %19, align 8, !tbaa !5
  store ptr %140, ptr %17, align 8, !tbaa !5
  store i32 0, ptr %20, align 4
  br label %141

141:                                              ; preds = %139, %138
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #4
  br label %142

142:                                              ; preds = %141, %48
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #4
  %143 = load i32, ptr %20, align 4
  switch i32 %143, label %147 [
    i32 0, label %144
    i32 2, label %25
    i32 3, label %145
  ]

144:                                              ; preds = %142
  br label %25, !llvm.loop !16

145:                                              ; preds = %142, %25
  %146 = load ptr, ptr %17, align 8, !tbaa !5
  store i32 1, ptr %20, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  ret ptr %146

147:                                              ; preds = %142
  unreachable
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNK8ImVectorIfEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #2 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 = { inlinehint 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 = { 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 = { 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 = !{!"float", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{!7, !7, i64 0}
!14 = !{!15, !15, i64 0}
!15 = !{!"int", !7, i64 0}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = !{!19, !10, i64 64}
!19 = !{!"_ZTS6ImFont", !10, i64 0, !10, i64 4, !20, i64 8, !21, i64 16, !6, i64 24, !22, i64 32, !6, i64 56, !10, i64 64, !24, i64 72, !25, i64 96}
!20 = !{!"_ZTS6ImVec2", !10, i64 0, !10, i64 4}
!21 = !{!"short", !7, i64 0}
!22 = !{!"_ZTS8ImVectorIN6ImFont5GlyphEE", !23, i64 0, !23, i64 8, !6, i64 16}
!23 = !{!"long", !7, i64 0}
!24 = !{!"_ZTS8ImVectorIfE", !23, i64 0, !23, i64 8, !6, i64 16}
!25 = !{!"_ZTS8ImVectorIiE", !23, i64 0, !23, i64 8, !6, i64 16}
!26 = !{i8 0, i8 2}
!27 = !{}


; 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"

; 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 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 hidden noundef i32 @_ZL18ImTextCharFromUtf8PjPKcS1_(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef zeroext i1 @_ZL13ImCharIsSpacei(i32 noundef) local_unnamed_addr #2

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

; Function Attrs: mustprogress nounwind uwtable
define dso_local noundef ptr @_ZNK6ImFont21CalcWordWrapPositionAEfPKcS1_f(ptr noundef nonnull align 8 dereferenceable(120) %0, float noundef %1, ptr noundef %2, ptr noundef %3, float noundef %4) local_unnamed_addr #1 align 2 {
  %6 = alloca i32, align 4
  %7 = icmp ult ptr %2, %3
  br i1 %7, label %.lr.ph, label %.loopexit

.lr.ph:                                           ; preds = %5
  %8 = getelementptr inbounds i8, ptr %0, i64 72
  %9 = getelementptr inbounds i8, ptr %0, i64 64
  br label %10

10:                                               ; preds = %.lr.ph, %56
  %.091 = phi float [ 0.000000e+00, %.lr.ph ], [ %.4, %56 ]
  %.04590 = phi ptr [ %2, %.lr.ph ], [ %.044, %56 ]
  %.05089 = phi i8 [ 1, %.lr.ph ], [ %.252, %56 ]
  %.05388 = phi ptr [ null, %.lr.ph ], [ %.356, %56 ]
  %.05787 = phi ptr [ %2, %.lr.ph ], [ %.360, %56 ]
  %.06186 = phi float [ 0.000000e+00, %.lr.ph ], [ %.465, %56 ]
  %.06685 = phi float [ 0.000000e+00, %.lr.ph ], [ %.369, %56 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #3
  %11 = load i8, ptr %.04590, align 1, !tbaa !5
  %12 = sext i8 %11 to i32
  store i32 %12, ptr %6, align 4, !tbaa !8
  %13 = icmp sgt i8 %11, -1
  br i1 %13, label %14, label %16

14:                                               ; preds = %10
  %15 = getelementptr inbounds i8, ptr %.04590, i64 1
  br label %20

16:                                               ; preds = %10
  %17 = call noundef i32 @_ZL18ImTextCharFromUtf8PjPKcS1_(ptr noundef nonnull %6, ptr noundef nonnull %.04590, ptr noundef nonnull %3)
  %18 = sext i32 %17 to i64
  %19 = getelementptr inbounds i8, ptr %.04590, i64 %18
  %.pr = load i32, ptr %6, align 4, !tbaa !8
  br label %20

20:                                               ; preds = %16, %14
  %21 = phi i32 [ %.pr, %16 ], [ %12, %14 ]
  %.044 = phi ptr [ %19, %16 ], [ %15, %14 ]
  %22 = icmp eq i32 %21, 10
  br i1 %22, label %56, label %23, !llvm.loop !10

23:                                               ; preds = %20
  %24 = zext i32 %21 to i64
  %25 = call noundef i64 @_ZNK8ImVectorIfE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %8)
  %26 = icmp ugt i64 %25, %24
  br i1 %26, label %27, label %33

27:                                               ; preds = %23
  %28 = load i32, ptr %6, align 4, !tbaa !8
  %29 = zext i32 %28 to i64
  %30 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK8ImVectorIfEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %29)
  %31 = load float, ptr %30, align 4, !tbaa !12
  %32 = fmul float %31, %1
  br label %35

33:                                               ; preds = %23
  %34 = load float, ptr %9, align 8, !tbaa !14
  br label %35

35:                                               ; preds = %33, %27
  %36 = phi float [ %32, %27 ], [ %34, %33 ]
  %37 = load i32, ptr %6, align 4, !tbaa !8
  %38 = call noundef zeroext i1 @_ZL13ImCharIsSpacei(i32 noundef %37)
  br i1 %38, label %39, label %43

39:                                               ; preds = %35
  %40 = trunc nuw i8 %.05089 to i1
  %41 = fadd float %.06186, %.091
  %.162 = select i1 %40, float 0.000000e+00, float %.06186
  %.1 = select i1 %40, float %41, float %.091
  %42 = fadd float %.162, %36
  br label %switch.edge

43:                                               ; preds = %35
  %44 = fadd float %.06685, %36
  %45 = trunc nuw i8 %.05089 to i1
  br i1 %45, label %49, label %46

46:                                               ; preds = %43
  %47 = fadd float %.06186, %44
  %48 = fadd float %.091, %47
  br label %49

49:                                               ; preds = %43, %46
  %.167 = phi float [ 0.000000e+00, %46 ], [ %44, %43 ]
  %.263 = phi float [ 0.000000e+00, %46 ], [ %.06186, %43 ]
  %.158 = phi ptr [ %.05787, %46 ], [ %.044, %43 ]
  %.154 = phi ptr [ %.05787, %46 ], [ %.05388, %43 ]
  %.2 = phi float [ %48, %46 ], [ %.091, %43 ]
  %50 = load i32, ptr %6, align 4
  switch i32 %50, label %51 [
    i32 63, label %switch.edge
    i32 59, label %switch.edge
    i32 46, label %switch.edge
    i32 44, label %switch.edge
    i32 33, label %switch.edge
    i32 34, label %switch.edge
  ]

51:                                               ; preds = %49
  br label %switch.edge

switch.edge:                                      ; preds = %51, %49, %49, %49, %49, %49, %49, %39
  %.268 = phi float [ %.06685, %39 ], [ %.167, %49 ], [ %.167, %49 ], [ %.167, %49 ], [ %.167, %49 ], [ %.167, %49 ], [ %.167, %49 ], [ %.167, %51 ]
  %.364 = phi float [ %42, %39 ], [ %.263, %49 ], [ %.263, %49 ], [ %.263, %49 ], [ %.263, %49 ], [ %.263, %49 ], [ %.263, %49 ], [ %.263, %51 ]
  %.259 = phi ptr [ %.05787, %39 ], [ %.158, %49 ], [ %.158, %49 ], [ %.158, %49 ], [ %.158, %49 ], [ %.158, %49 ], [ %.158, %49 ], [ %.158, %51 ]
  %.255 = phi ptr [ %.05388, %39 ], [ %.154, %49 ], [ %.154, %49 ], [ %.154, %49 ], [ %.154, %49 ], [ %.154, %49 ], [ %.154, %49 ], [ %.154, %51 ]
  %.151 = phi i8 [ 0, %39 ], [ 0, %49 ], [ 0, %49 ], [ 0, %49 ], [ 0, %49 ], [ 0, %49 ], [ 0, %49 ], [ 1, %51 ]
  %.3 = phi float [ %.1, %39 ], [ %.2, %49 ], [ %.2, %49 ], [ %.2, %49 ], [ %.2, %49 ], [ %.2, %49 ], [ %.2, %49 ], [ %.2, %51 ]
  %52 = fadd float %.268, %.3
  %53 = fcmp ult float %52, %4
  br i1 %53, label %56, label %.thread

.thread:                                          ; preds = %switch.edge
  %54 = fcmp olt float %.268, %4
  %.not = icmp eq ptr %.255, null
  %55 = select i1 %.not, ptr %.259, ptr %.255
  %.146 = select i1 %54, ptr %55, ptr %.04590
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #3
  br label %.loopexit

56:                                               ; preds = %switch.edge, %20
  %.369 = phi float [ 0.000000e+00, %20 ], [ %.268, %switch.edge ]
  %.465 = phi float [ 0.000000e+00, %20 ], [ %.364, %switch.edge ]
  %.360 = phi ptr [ %.05787, %20 ], [ %.259, %switch.edge ]
  %.356 = phi ptr [ %.05388, %20 ], [ %.255, %switch.edge ]
  %.252 = phi i8 [ 1, %20 ], [ %.151, %switch.edge ]
  %.4 = phi float [ 0.000000e+00, %20 ], [ %.3, %switch.edge ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #3
  %57 = icmp ult ptr %.044, %3
  br i1 %57, label %10, label %.loopexit

.loopexit:                                        ; preds = %56, %5, %.thread
  %.449 = phi ptr [ %.146, %.thread ], [ %2, %5 ], [ %.044, %56 ]
  ret ptr %.449
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNK8ImVectorIfEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #2 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 = { inlinehint 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 = { 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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"int", !6, i64 0}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}
!12 = !{!13, !13, i64 0}
!13 = !{!"float", !6, i64 0}
!14 = !{!15, !13, i64 64}
!15 = !{!"_ZTS6ImFont", !13, i64 0, !13, i64 4, !16, i64 8, !17, i64 16, !18, i64 24, !19, i64 32, !18, i64 56, !13, i64 64, !21, i64 72, !22, i64 96}
!16 = !{!"_ZTS6ImVec2", !13, i64 0, !13, i64 4}
!17 = !{!"short", !6, i64 0}
!18 = !{!"any pointer", !6, i64 0}
!19 = !{!"_ZTS8ImVectorIN6ImFont5GlyphEE", !20, i64 0, !20, i64 8, !18, i64 16}
!20 = !{!"long", !6, i64 0}
!21 = !{!"_ZTS8ImVectorIfE", !20, i64 0, !20, i64 8, !18, i64 16}
!22 = !{!"_ZTS8ImVectorIiE", !20, i64 0, !20, i64 8, !18, i64 16}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass