; LLVM IR from Samson-Mano/EM_Propogation_simulation :: EM_Propogation_simulation/src/ImGui (imgui_draw)

; 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.ImVec2 = type { float, float }
%struct.ImFont = type <{ %struct.ImVector.6, float, float, %struct.ImVector.1, %struct.ImVector.7, ptr, ptr, ptr, i16, i16, i16, i16, float, float, i8, [3 x i8], float, float, float, i32, [2 x i8], [2 x i8] }>
%struct.ImVector.6 = type { i32, i32, ptr }
%struct.ImVector.1 = type { i32, i32, ptr }
%struct.ImVector.7 = type { i32, i32, 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 dso_local void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8), float noundef, float noundef) unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef float @_ZL5ImMaxIfET_S0_S0_(float noundef, float noundef) #2

; Function Attrs: nounwind willreturn memory(read)
declare i64 @strlen(ptr noundef) #3

declare noundef i32 @_Z18ImTextCharFromUtf8PjPKcS1_(ptr noundef, ptr noundef, ptr noundef) #4

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZNK6ImFont21CalcWordWrapPositionAEfPKcS1_f(ptr noundef nonnull align 8 dereferenceable(118), float noundef, ptr noundef, ptr noundef, float noundef) #5 align 2

; Function Attrs: mustprogress uwtable
define dso_local <2 x float> @_ZNK6ImFont13CalcTextSizeAEfffPKcS1_PS1_(ptr noundef nonnull align 8 dereferenceable(118) %0, float noundef %1, float noundef %2, float noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6) #6 align 2 {
  %8 = alloca %struct.ImVec2, align 4
  %9 = alloca ptr, align 8
  %10 = alloca float, align 4
  %11 = alloca float, align 4
  %12 = alloca float, align 4
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca float, align 4
  %17 = alloca float, align 4
  %18 = alloca float, align 4
  %19 = alloca i8, align 1
  %20 = alloca ptr, align 8
  %21 = alloca ptr, align 8
  %22 = alloca ptr, align 8
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca float, align 4
  store ptr %0, ptr %9, align 8, !tbaa !5
  store float %1, ptr %10, align 4, !tbaa !9
  store float %2, ptr %11, align 4, !tbaa !9
  store float %3, ptr %12, align 4, !tbaa !9
  store ptr %4, ptr %13, align 8, !tbaa !5
  store ptr %5, ptr %14, align 8, !tbaa !5
  store ptr %6, ptr %15, align 8, !tbaa !5
  %26 = load ptr, ptr %9, align 8
  %27 = load ptr, ptr %14, align 8, !tbaa !5
  %28 = icmp ne ptr %27, null
  br i1 %28, label %34, label %29

29:                                               ; preds = %7
  %30 = load ptr, ptr %13, align 8, !tbaa !5
  %31 = load ptr, ptr %13, align 8, !tbaa !5
  %32 = call i64 @strlen(ptr noundef %31) #8
  %33 = getelementptr inbounds i8, ptr %30, i64 %32
  store ptr %33, ptr %14, align 8, !tbaa !5
  br label %34

34:                                               ; preds = %29, %7
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #9
  %35 = load float, ptr %10, align 4, !tbaa !9
  store float %35, ptr %16, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #9
  %36 = load float, ptr %10, align 4, !tbaa !9
  %37 = getelementptr inbounds %struct.ImFont, ptr %26, i32 0, i32 2
  %38 = load float, ptr %37, align 4, !tbaa !11
  %39 = fdiv float %36, %38
  store float %39, ptr %17, align 4, !tbaa !9
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %8, float noundef 0.000000e+00, float noundef 0.000000e+00)
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #9
  store float 0.000000e+00, ptr %18, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr %19) #9
  %40 = load float, ptr %12, align 4, !tbaa !9
  %41 = fcmp ogt float %40, 0.000000e+00
  %42 = zext i1 %41 to i8
  store i8 %42, ptr %19, align 1, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #9
  store ptr null, ptr %20, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #9
  %43 = load ptr, ptr %13, align 8, !tbaa !5
  store ptr %43, ptr %21, align 8, !tbaa !5
  br label %44

44:                                               ; preds = %156, %154, %74, %34
  %45 = load ptr, ptr %21, align 8, !tbaa !5
  %46 = load ptr, ptr %14, align 8, !tbaa !5
  %47 = icmp ult ptr %45, %46
  br i1 %47, label %48, label %157

48:                                               ; preds = %44
  %49 = load i8, ptr %19, align 1, !tbaa !19, !range !20, !noundef !21
  %50 = trunc i8 %49 to i1
  br i1 %50, label %51, label %83

51:                                               ; preds = %48
  %52 = load ptr, ptr %20, align 8, !tbaa !5
  %53 = icmp ne ptr %52, null
  br i1 %53, label %62, label %54

54:                                               ; preds = %51
  %55 = load float, ptr %17, align 4, !tbaa !9
  %56 = load ptr, ptr %21, align 8, !tbaa !5
  %57 = load ptr, ptr %14, align 8, !tbaa !5
  %58 = load float, ptr %12, align 4, !tbaa !9
  %59 = load float, ptr %18, align 4, !tbaa !9
  %60 = fsub float %58, %59
  %61 = call noundef ptr @_ZNK6ImFont21CalcWordWrapPositionAEfPKcS1_f(ptr noundef nonnull align 8 dereferenceable(118) %26, float noundef %55, ptr noundef %56, ptr noundef %57, float noundef %60)
  store ptr %61, ptr %20, align 8, !tbaa !5
  br label %62

62:                                               ; preds = %54, %51
  %63 = load ptr, ptr %21, align 8, !tbaa !5
  %64 = load ptr, ptr %20, align 8, !tbaa !5
  %65 = icmp uge ptr %63, %64
  br i1 %65, label %66, label %82

66:                                               ; preds = %62
  %67 = getelementptr inbounds %struct.ImVec2, ptr %8, i32 0, i32 0
  %68 = load float, ptr %67, align 4, !tbaa !22
  %69 = load float, ptr %18, align 4, !tbaa !9
  %70 = fcmp olt float %68, %69
  br i1 %70, label %71, label %74

71:                                               ; preds = %66
  %72 = load float, ptr %18, align 4, !tbaa !9
  %73 = getelementptr inbounds %struct.ImVec2, ptr %8, i32 0, i32 0
  store float %72, ptr %73, align 4, !tbaa !22
  br label %74

74:                                               ; preds = %71, %66
  %75 = load float, ptr %16, align 4, !tbaa !9
  %76 = getelementptr inbounds %struct.ImVec2, ptr %8, i32 0, i32 1
  %77 = load float, ptr %76, align 4, !tbaa !24
  %78 = fadd float %77, %75
  store float %78, ptr %76, align 4, !tbaa !24
  store float 0.000000e+00, ptr %18, align 4, !tbaa !9
  store ptr null, ptr %20, align 8, !tbaa !5
  %79 = load ptr, ptr %21, align 8, !tbaa !5
  %80 = load ptr, ptr %14, align 8, !tbaa !5
  %81 = call noundef ptr @_ZL26CalcWordWrapNextLineStartAPKcS0_(ptr noundef %79, ptr noundef %80)
  store ptr %81, ptr %21, align 8, !tbaa !5
  br label %44, !llvm.loop !25

82:                                               ; preds = %62
  br label %83

83:                                               ; preds = %82, %48
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #9
  %84 = load ptr, ptr %21, align 8, !tbaa !5
  store ptr %84, ptr %22, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #9
  %85 = load ptr, ptr %21, align 8, !tbaa !5
  %86 = load i8, ptr %85, align 1, !tbaa !27
  %87 = sext i8 %86 to i32
  store i32 %87, ptr %23, align 4, !tbaa !28
  %88 = load i32, ptr %23, align 4, !tbaa !28
  %89 = icmp ult i32 %88, 128
  br i1 %89, label %90, label %93

90:                                               ; preds = %83
  %91 = load ptr, ptr %21, align 8, !tbaa !5
  %92 = getelementptr inbounds i8, ptr %91, i64 1
  store ptr %92, ptr %21, align 8, !tbaa !5
  br label %100

93:                                               ; preds = %83
  %94 = load ptr, ptr %21, align 8, !tbaa !5
  %95 = load ptr, ptr %14, align 8, !tbaa !5
  %96 = call noundef i32 @_Z18ImTextCharFromUtf8PjPKcS1_(ptr noundef %23, ptr noundef %94, ptr noundef %95)
  %97 = load ptr, ptr %21, align 8, !tbaa !5
  %98 = sext i32 %96 to i64
  %99 = getelementptr inbounds i8, ptr %97, i64 %98
  store ptr %99, ptr %21, align 8, !tbaa !5
  br label %100

100:                                              ; preds = %93, %90
  %101 = load i32, ptr %23, align 4, !tbaa !28
  %102 = icmp ult i32 %101, 32
  br i1 %102, label %103, label %121

103:                                              ; preds = %100
  %104 = load i32, ptr %23, align 4, !tbaa !28
  %105 = icmp eq i32 %104, 10
  br i1 %105, label %106, label %116

106:                                              ; preds = %103
  %107 = getelementptr inbounds %struct.ImVec2, ptr %8, i32 0, i32 0
  %108 = load float, ptr %107, align 4, !tbaa !22
  %109 = load float, ptr %18, align 4, !tbaa !9
  %110 = call noundef float @_ZL5ImMaxIfET_S0_S0_(float noundef %108, float noundef %109)
  %111 = getelementptr inbounds %struct.ImVec2, ptr %8, i32 0, i32 0
  store float %110, ptr %111, align 4, !tbaa !22
  %112 = load float, ptr %16, align 4, !tbaa !9
  %113 = getelementptr inbounds %struct.ImVec2, ptr %8, i32 0, i32 1
  %114 = load float, ptr %113, align 4, !tbaa !24
  %115 = fadd float %114, %112
  store float %115, ptr %113, align 4, !tbaa !24
  store float 0.000000e+00, ptr %18, align 4, !tbaa !9
  store i32 2, ptr %24, align 4
  br label %154, !llvm.loop !25

116:                                              ; preds = %103
  %117 = load i32, ptr %23, align 4, !tbaa !28
  %118 = icmp eq i32 %117, 13
  br i1 %118, label %119, label %120

119:                                              ; preds = %116
  store i32 2, ptr %24, align 4
  br label %154, !llvm.loop !25

120:                                              ; preds = %116
  br label %121

121:                                              ; preds = %120, %100
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #9
  %122 = load i32, ptr %23, align 4, !tbaa !28
  %123 = getelementptr inbounds %struct.ImFont, ptr %26, i32 0, i32 0
  %124 = getelementptr inbounds %struct.ImVector.6, ptr %123, i32 0, i32 0
  %125 = load i32, ptr %124, align 8, !tbaa !29
  %126 = icmp slt i32 %122, %125
  br i1 %126, label %127, label %135

127:                                              ; preds = %121
  %128 = getelementptr inbounds %struct.ImFont, ptr %26, i32 0, i32 0
  %129 = getelementptr inbounds %struct.ImVector.6, ptr %128, i32 0, i32 2
  %130 = load ptr, ptr %129, align 8, !tbaa !30
  %131 = load i32, ptr %23, align 4, !tbaa !28
  %132 = zext i32 %131 to i64
  %133 = getelementptr inbounds float, ptr %130, i64 %132
  %134 = load float, ptr %133, align 4, !tbaa !9
  br label %138

135:                                              ; preds = %121
  %136 = getelementptr inbounds %struct.ImFont, ptr %26, i32 0, i32 1
  %137 = load float, ptr %136, align 8, !tbaa !31
  br label %138

138:                                              ; preds = %135, %127
  %139 = phi float [ %134, %127 ], [ %137, %135 ]
  %140 = load float, ptr %17, align 4, !tbaa !9
  %141 = fmul float %139, %140
  store float %141, ptr %25, align 4, !tbaa !9
  %142 = load float, ptr %18, align 4, !tbaa !9
  %143 = load float, ptr %25, align 4, !tbaa !9
  %144 = fadd float %142, %143
  %145 = load float, ptr %11, align 4, !tbaa !9
  %146 = fcmp oge float %144, %145
  br i1 %146, label %147, label %149

147:                                              ; preds = %138
  %148 = load ptr, ptr %22, align 8, !tbaa !5
  store ptr %148, ptr %21, align 8, !tbaa !5
  store i32 3, ptr %24, align 4
  br label %153

149:                                              ; preds = %138
  %150 = load float, ptr %25, align 4, !tbaa !9
  %151 = load float, ptr %18, align 4, !tbaa !9
  %152 = fadd float %151, %150
  store float %152, ptr %18, align 4, !tbaa !9
  store i32 0, ptr %24, align 4
  br label %153

153:                                              ; preds = %149, %147
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #9
  br label %154

154:                                              ; preds = %153, %119, %106
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #9
  %155 = load i32, ptr %24, align 4
  switch i32 %155, label %185 [
    i32 0, label %156
    i32 2, label %44
    i32 3, label %157
  ]

156:                                              ; preds = %154
  br label %44, !llvm.loop !25

157:                                              ; preds = %154, %44
  %158 = getelementptr inbounds %struct.ImVec2, ptr %8, i32 0, i32 0
  %159 = load float, ptr %158, align 4, !tbaa !22
  %160 = load float, ptr %18, align 4, !tbaa !9
  %161 = fcmp olt float %159, %160
  br i1 %161, label %162, label %165

162:                                              ; preds = %157
  %163 = load float, ptr %18, align 4, !tbaa !9
  %164 = getelementptr inbounds %struct.ImVec2, ptr %8, i32 0, i32 0
  store float %163, ptr %164, align 4, !tbaa !22
  br label %165

165:                                              ; preds = %162, %157
  %166 = load float, ptr %18, align 4, !tbaa !9
  %167 = fcmp ogt float %166, 0.000000e+00
  br i1 %167, label %172, label %168

168:                                              ; preds = %165
  %169 = getelementptr inbounds %struct.ImVec2, ptr %8, i32 0, i32 1
  %170 = load float, ptr %169, align 4, !tbaa !24
  %171 = fcmp oeq float %170, 0.000000e+00
  br i1 %171, label %172, label %177

172:                                              ; preds = %168, %165
  %173 = load float, ptr %16, align 4, !tbaa !9
  %174 = getelementptr inbounds %struct.ImVec2, ptr %8, i32 0, i32 1
  %175 = load float, ptr %174, align 4, !tbaa !24
  %176 = fadd float %175, %173
  store float %176, ptr %174, align 4, !tbaa !24
  br label %177

177:                                              ; preds = %172, %168
  %178 = load ptr, ptr %15, align 8, !tbaa !5
  %179 = icmp ne ptr %178, null
  br i1 %179, label %180, label %183

180:                                              ; preds = %177
  %181 = load ptr, ptr %21, align 8, !tbaa !5
  %182 = load ptr, ptr %15, align 8, !tbaa !5
  store ptr %181, ptr %182, align 8, !tbaa !5
  br label %183

183:                                              ; preds = %180, %177
  store i32 1, ptr %24, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %19) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #9
  %184 = load <2 x float>, ptr %8, align 4
  ret <2 x float> %184

185:                                              ; preds = %154
  unreachable
}

; Function Attrs: inlinehint mustprogress uwtable
declare hidden noundef ptr @_ZL26CalcWordWrapNextLineStartAPKcS0_(ptr noundef, ptr noundef) #7

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 = { nounwind willreturn memory(read) "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 = { "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 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { mustprogress uwtable "min-legal-vector-width"="64" "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 #7 = { 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 #8 = { nounwind willreturn memory(read) }
attributes #9 = { 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, !10, i64 20}
!12 = !{!"_ZTS6ImFont", !13, i64 0, !10, i64 16, !10, i64 20, !15, i64 24, !16, i64 40, !6, i64 56, !6, i64 64, !6, i64 72, !17, i64 80, !17, i64 82, !17, i64 84, !17, i64 86, !10, i64 88, !10, i64 92, !18, i64 96, !10, i64 100, !10, i64 104, !10, i64 108, !14, i64 112, !7, i64 116}
!13 = !{!"_ZTS8ImVectorIfE", !14, i64 0, !14, i64 4, !6, i64 8}
!14 = !{!"int", !7, i64 0}
!15 = !{!"_ZTS8ImVectorItE", !14, i64 0, !14, i64 4, !6, i64 8}
!16 = !{!"_ZTS8ImVectorI11ImFontGlyphE", !14, i64 0, !14, i64 4, !6, i64 8}
!17 = !{!"short", !7, i64 0}
!18 = !{!"bool", !7, i64 0}
!19 = !{!18, !18, i64 0}
!20 = !{i8 0, i8 2}
!21 = !{}
!22 = !{!23, !10, i64 0}
!23 = !{!"_ZTS6ImVec2", !10, i64 0, !10, i64 4}
!24 = !{!23, !10, i64 4}
!25 = distinct !{!25, !26}
!26 = !{!"llvm.loop.mustprogress"}
!27 = !{!7, !7, i64 0}
!28 = !{!14, !14, i64 0}
!29 = !{!12, !14, i64 0}
!30 = !{!12, !6, i64 8}
!31 = !{!12, !10, i64 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"

%struct.ImVec2 = type { float, float }

; 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 dso_local void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8), float noundef, float noundef) unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef float @_ZL5ImMaxIfET_S0_S0_(float noundef, float noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #3

declare noundef i32 @_Z18ImTextCharFromUtf8PjPKcS1_(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZNK6ImFont21CalcWordWrapPositionAEfPKcS1_f(ptr noundef nonnull align 8 dereferenceable(118), float noundef, ptr noundef, ptr noundef, float noundef) local_unnamed_addr #5 align 2

; Function Attrs: mustprogress uwtable
define dso_local <2 x float> @_ZNK6ImFont13CalcTextSizeAEfffPKcS1_PS1_(ptr noundef nonnull align 8 dereferenceable(118) %0, float noundef %1, float noundef %2, float noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef writeonly %6) local_unnamed_addr #6 align 2 {
  %8 = alloca %struct.ImVec2, align 8
  %9 = alloca i32, align 4
  %.not = icmp eq ptr %5, null
  br i1 %.not, label %10, label %13

10:                                               ; preds = %7
  %11 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) %4) #8
  %12 = getelementptr inbounds i8, ptr %4, i64 %11
  br label %13

13:                                               ; preds = %10, %7
  %.0 = phi ptr [ %5, %7 ], [ %12, %10 ]
  %14 = getelementptr inbounds i8, ptr %0, i64 20
  %15 = load float, ptr %14, align 4, !tbaa !5
  %16 = fdiv float %1, %15
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %8, float noundef 0.000000e+00, float noundef 0.000000e+00)
  %17 = icmp ugt ptr %.0, %4
  br i1 %17, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %13
  %18 = fcmp ogt float %3, 0.000000e+00
  %19 = getelementptr inbounds i8, ptr %8, i64 4
  %20 = getelementptr inbounds i8, ptr %0, i64 8
  %21 = getelementptr inbounds i8, ptr %0, i64 16
  br i1 %18, label %.lr.ph.split.us, label %.lr.ph.split

.lr.ph.split.us:                                  ; preds = %.lr.ph, %.backedge.us
  %.04969.us = phi float [ %.049.be.us, %.backedge.us ], [ 0.000000e+00, %.lr.ph ]
  %.05168.us = phi ptr [ %.051.be.us, %.backedge.us ], [ %4, %.lr.ph ]
  %.05567.us = phi ptr [ %.055.be.us, %.backedge.us ], [ null, %.lr.ph ]
  %.not64.us = icmp eq ptr %.05567.us, null
  br i1 %.not64.us, label %22, label %25

22:                                               ; preds = %.lr.ph.split.us
  %23 = fsub float %3, %.04969.us
  %24 = call noundef ptr @_ZNK6ImFont21CalcWordWrapPositionAEfPKcS1_f(ptr noundef nonnull align 8 dereferenceable(118) %0, float noundef %16, ptr noundef %.05168.us, ptr noundef nonnull %.0, float noundef %23)
  br label %25

25:                                               ; preds = %22, %.lr.ph.split.us
  %.156.us = phi ptr [ %.05567.us, %.lr.ph.split.us ], [ %24, %22 ]
  %.not65.us = icmp ult ptr %.05168.us, %.156.us
  br i1 %.not65.us, label %34, label %26

26:                                               ; preds = %25
  %27 = load float, ptr %8, align 8, !tbaa !17
  %28 = fcmp olt float %27, %.04969.us
  br i1 %28, label %29, label %30

29:                                               ; preds = %26
  store float %.04969.us, ptr %8, align 8, !tbaa !17
  br label %30

30:                                               ; preds = %29, %26
  %31 = load float, ptr %19, align 4, !tbaa !19
  %32 = fadd float %31, %1
  store float %32, ptr %19, align 4, !tbaa !19
  %33 = call noundef ptr @_ZL26CalcWordWrapNextLineStartAPKcS0_(ptr noundef %.05168.us, ptr noundef nonnull %.0)
  br label %.backedge.us

34:                                               ; preds = %25
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #9
  %35 = load i8, ptr %.05168.us, align 1, !tbaa !20
  %36 = sext i8 %35 to i32
  store i32 %36, ptr %9, align 4, !tbaa !21
  %37 = icmp sgt i8 %35, -1
  br i1 %37, label %42, label %38

38:                                               ; preds = %34
  %39 = call noundef i32 @_Z18ImTextCharFromUtf8PjPKcS1_(ptr noundef nonnull %9, ptr noundef nonnull %.05168.us, ptr noundef nonnull %.0)
  %40 = sext i32 %39 to i64
  %41 = getelementptr inbounds i8, ptr %.05168.us, i64 %40
  %.pr.us = load i32, ptr %9, align 4, !tbaa !21
  br label %44

42:                                               ; preds = %34
  %43 = getelementptr inbounds i8, ptr %.05168.us, i64 1
  br label %44

44:                                               ; preds = %42, %38
  %45 = phi i32 [ %.pr.us, %38 ], [ %36, %42 ]
  %.152.us = phi ptr [ %41, %38 ], [ %43, %42 ]
  %46 = icmp ult i32 %45, 32
  br i1 %46, label %47, label %53

47:                                               ; preds = %44
  switch i32 %45, label %53 [
    i32 10, label %48
    i32 13, label %.thread
  ], !llvm.loop !22

48:                                               ; preds = %47
  %49 = load float, ptr %8, align 8, !tbaa !17
  %50 = call noundef float @_ZL5ImMaxIfET_S0_S0_(float noundef %49, float noundef %.04969.us)
  store float %50, ptr %8, align 8, !tbaa !17
  %51 = load float, ptr %19, align 4, !tbaa !19
  %52 = fadd float %51, %1
  store float %52, ptr %19, align 4, !tbaa !19
  br label %.thread, !llvm.loop !22

53:                                               ; preds = %47, %44
  %54 = load i32, ptr %0, align 8, !tbaa !24
  %55 = icmp slt i32 %45, %54
  %56 = load ptr, ptr %20, align 8
  %57 = zext i32 %45 to i64
  %58 = getelementptr inbounds float, ptr %56, i64 %57
  %.in.us = select i1 %55, ptr %58, ptr %21
  %59 = load float, ptr %.in.us, align 4, !tbaa !25
  %60 = fmul float %16, %59
  %61 = fadd float %.04969.us, %60
  %62 = fcmp ult float %61, %2
  br i1 %62, label %.thread, label %63

.thread:                                          ; preds = %48, %47, %53
  %.2.us.ph = phi float [ %.04969.us, %47 ], [ 0.000000e+00, %48 ], [ %61, %53 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #9
  br label %.backedge.us

63:                                               ; preds = %53
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #9
  br label %._crit_edge

.backedge.us:                                     ; preds = %.thread, %30
  %.055.be.us = phi ptr [ null, %30 ], [ %.156.us, %.thread ]
  %.051.be.us = phi ptr [ %33, %30 ], [ %.152.us, %.thread ]
  %.049.be.us = phi float [ 0.000000e+00, %30 ], [ %.2.us.ph, %.thread ]
  %64 = icmp ult ptr %.051.be.us, %.0
  br i1 %64, label %.lr.ph.split.us, label %._crit_edge, !llvm.loop !22

.lr.ph.split:                                     ; preds = %.lr.ph, %93
  %.04969 = phi float [ %.2, %93 ], [ 0.000000e+00, %.lr.ph ]
  %.05168 = phi ptr [ %.354, %93 ], [ %4, %.lr.ph ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #9
  %65 = load i8, ptr %.05168, align 1, !tbaa !20
  %66 = sext i8 %65 to i32
  store i32 %66, ptr %9, align 4, !tbaa !21
  %67 = icmp sgt i8 %65, -1
  br i1 %67, label %68, label %70

68:                                               ; preds = %.lr.ph.split
  %69 = getelementptr inbounds i8, ptr %.05168, i64 1
  br label %74

70:                                               ; preds = %.lr.ph.split
  %71 = call noundef i32 @_Z18ImTextCharFromUtf8PjPKcS1_(ptr noundef nonnull %9, ptr noundef nonnull %.05168, ptr noundef nonnull %.0)
  %72 = sext i32 %71 to i64
  %73 = getelementptr inbounds i8, ptr %.05168, i64 %72
  %.pr = load i32, ptr %9, align 4, !tbaa !21
  br label %74

74:                                               ; preds = %70, %68
  %75 = phi i32 [ %.pr, %70 ], [ %66, %68 ]
  %.152 = phi ptr [ %73, %70 ], [ %69, %68 ]
  %76 = icmp ult i32 %75, 32
  br i1 %76, label %77, label %83

77:                                               ; preds = %74
  switch i32 %75, label %83 [
    i32 10, label %78
    i32 13, label %93
  ], !llvm.loop !22

78:                                               ; preds = %77
  %79 = load float, ptr %8, align 8, !tbaa !17
  %80 = call noundef float @_ZL5ImMaxIfET_S0_S0_(float noundef %79, float noundef %.04969)
  store float %80, ptr %8, align 8, !tbaa !17
  %81 = load float, ptr %19, align 4, !tbaa !19
  %82 = fadd float %81, %1
  store float %82, ptr %19, align 4, !tbaa !19
  br label %93, !llvm.loop !22

83:                                               ; preds = %77, %74
  %84 = load i32, ptr %0, align 8, !tbaa !24
  %85 = icmp slt i32 %75, %84
  %86 = load ptr, ptr %20, align 8
  %87 = zext i32 %75 to i64
  %88 = getelementptr inbounds float, ptr %86, i64 %87
  %.in = select i1 %85, ptr %88, ptr %21
  %89 = load float, ptr %.in, align 4, !tbaa !25
  %90 = fmul float %16, %89
  %91 = fadd float %.04969, %90
  %92 = fcmp ult float %91, %2
  %.253 = select i1 %92, ptr %.152, ptr %.05168
  %.150 = select i1 %92, float %91, float %.04969
  br label %93

93:                                               ; preds = %77, %83, %78
  %.354 = phi ptr [ %.152, %78 ], [ %.253, %83 ], [ %.152, %77 ]
  %.2 = phi float [ 0.000000e+00, %78 ], [ %.150, %83 ], [ %.04969, %77 ]
  %.1 = phi i1 [ true, %78 ], [ %92, %83 ], [ true, %77 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #9
  %94 = icmp ult ptr %.354, %.0
  %or.cond77 = select i1 %.1, i1 %94, i1 false
  br i1 %or.cond77, label %.lr.ph.split, label %._crit_edge, !llvm.loop !22

._crit_edge:                                      ; preds = %93, %.backedge.us, %63, %13
  %.4 = phi ptr [ %4, %13 ], [ %.05168.us, %63 ], [ %.051.be.us, %.backedge.us ], [ %.354, %93 ]
  %.3 = phi float [ 0.000000e+00, %13 ], [ %.04969.us, %63 ], [ %.049.be.us, %.backedge.us ], [ %.2, %93 ]
  %95 = load float, ptr %8, align 8, !tbaa !17
  %96 = fcmp olt float %95, %.3
  br i1 %96, label %97, label %98

97:                                               ; preds = %._crit_edge
  store float %.3, ptr %8, align 8, !tbaa !17
  br label %98

98:                                               ; preds = %97, %._crit_edge
  %99 = fcmp ogt float %.3, 0.000000e+00
  %100 = getelementptr inbounds i8, ptr %8, i64 4
  %101 = load float, ptr %100, align 4
  %102 = fcmp oeq float %101, 0.000000e+00
  %or.cond = select i1 %99, i1 true, i1 %102
  br i1 %or.cond, label %103, label %105

103:                                              ; preds = %98
  %104 = fadd float %101, %1
  store float %104, ptr %100, align 4, !tbaa !19
  br label %105

105:                                              ; preds = %98, %103
  %.not66 = icmp eq ptr %6, null
  br i1 %.not66, label %107, label %106

106:                                              ; preds = %105
  store ptr %.4, ptr %6, align 8, !tbaa !26
  br label %107

107:                                              ; preds = %106, %105
  %108 = load <2 x float>, ptr %8, align 8
  ret <2 x float> %108
}

; Function Attrs: inlinehint mustprogress uwtable
declare hidden noundef ptr @_ZL26CalcWordWrapNextLineStartAPKcS0_(ptr noundef, ptr noundef) local_unnamed_addr #7

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 = { mustprogress nofree nounwind willreturn memory(argmem: read) "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 = { "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 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { mustprogress uwtable "min-legal-vector-width"="64" "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 #7 = { 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 #8 = { nounwind willreturn memory(read) }
attributes #9 = { 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, !12, i64 20}
!6 = !{!"_ZTS6ImFont", !7, i64 0, !12, i64 16, !12, i64 20, !13, i64 24, !14, i64 40, !11, i64 56, !11, i64 64, !11, i64 72, !15, i64 80, !15, i64 82, !15, i64 84, !15, i64 86, !12, i64 88, !12, i64 92, !16, i64 96, !12, i64 100, !12, i64 104, !12, i64 108, !8, i64 112, !9, i64 116}
!7 = !{!"_ZTS8ImVectorIfE", !8, i64 0, !8, i64 4, !11, i64 8}
!8 = !{!"int", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!"any pointer", !9, i64 0}
!12 = !{!"float", !9, i64 0}
!13 = !{!"_ZTS8ImVectorItE", !8, i64 0, !8, i64 4, !11, i64 8}
!14 = !{!"_ZTS8ImVectorI11ImFontGlyphE", !8, i64 0, !8, i64 4, !11, i64 8}
!15 = !{!"short", !9, i64 0}
!16 = !{!"bool", !9, i64 0}
!17 = !{!18, !12, i64 0}
!18 = !{!"_ZTS6ImVec2", !12, i64 0, !12, i64 4}
!19 = !{!18, !12, i64 4}
!20 = !{!9, !9, i64 0}
!21 = !{!8, !8, i64 0}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = !{!6, !8, i64 0}
!25 = !{!12, !12, i64 0}
!26 = !{!11, !11, i64 0}


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