; LLVM IR from theolundqvist/parallax-voxel-ray-marcher :: src/external/Dear ImGui/imgui_draw.ll (ZNK6ImFont13CalcTextSizeAEfffPKcS1_PS1_)

; 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.0, %struct.ImVector.7, ptr, ptr, ptr, i16, i16, i16, i16, i8, [3 x i8], float, float, float, i32, [2 x i8], [2 x i8] }>
%struct.ImVector.6 = type { i32, i32, ptr }
%struct.ImVector.0 = 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(110), 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(110) %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 i8, align 1
  %23 = alloca i32, align 4
  %24 = alloca ptr, align 8
  %25 = alloca i32, align 4
  %26 = 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
  %27 = load ptr, ptr %9, align 8
  %28 = load ptr, ptr %14, align 8, !tbaa !5
  %29 = icmp ne ptr %28, null
  br i1 %29, label %35, label %30

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

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

45:                                               ; preds = %190, %188, %111, %35
  %46 = load ptr, ptr %21, align 8, !tbaa !5
  %47 = load ptr, ptr %14, align 8, !tbaa !5
  %48 = icmp ult ptr %46, %47
  br i1 %48, label %49, label %191

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

52:                                               ; preds = %49
  %53 = load ptr, ptr %20, align 8, !tbaa !5
  %54 = icmp ne ptr %53, null
  br i1 %54, label %70, label %55

55:                                               ; preds = %52
  %56 = load float, ptr %17, align 4, !tbaa !9
  %57 = load ptr, ptr %21, align 8, !tbaa !5
  %58 = load ptr, ptr %14, align 8, !tbaa !5
  %59 = load float, ptr %12, align 4, !tbaa !9
  %60 = load float, ptr %18, align 4, !tbaa !9
  %61 = fsub float %59, %60
  %62 = call noundef ptr @_ZNK6ImFont21CalcWordWrapPositionAEfPKcS1_f(ptr noundef nonnull align 8 dereferenceable(110) %27, float noundef %56, ptr noundef %57, ptr noundef %58, float noundef %61)
  store ptr %62, ptr %20, align 8, !tbaa !5
  %63 = load ptr, ptr %20, align 8, !tbaa !5
  %64 = load ptr, ptr %21, align 8, !tbaa !5
  %65 = icmp eq ptr %63, %64
  br i1 %65, label %66, label %69

66:                                               ; preds = %55
  %67 = load ptr, ptr %20, align 8, !tbaa !5
  %68 = getelementptr inbounds i8, ptr %67, i32 1
  store ptr %68, ptr %20, align 8, !tbaa !5
  br label %69

69:                                               ; preds = %66, %55
  br label %70

70:                                               ; preds = %69, %52
  %71 = load ptr, ptr %21, align 8, !tbaa !5
  %72 = load ptr, ptr %20, align 8, !tbaa !5
  %73 = icmp uge ptr %71, %72
  br i1 %73, label %74, label %112

74:                                               ; preds = %70
  %75 = getelementptr inbounds %struct.ImVec2, ptr %8, i32 0, i32 0
  %76 = load float, ptr %75, align 4, !tbaa !22
  %77 = load float, ptr %18, align 4, !tbaa !9
  %78 = fcmp olt float %76, %77
  br i1 %78, label %79, label %82

79:                                               ; preds = %74
  %80 = load float, ptr %18, align 4, !tbaa !9
  %81 = getelementptr inbounds %struct.ImVec2, ptr %8, i32 0, i32 0
  store float %80, ptr %81, align 4, !tbaa !22
  br label %82

82:                                               ; preds = %79, %74
  %83 = load float, ptr %16, align 4, !tbaa !9
  %84 = getelementptr inbounds %struct.ImVec2, ptr %8, i32 0, i32 1
  %85 = load float, ptr %84, align 4, !tbaa !24
  %86 = fadd float %85, %83
  store float %86, ptr %84, align 4, !tbaa !24
  store float 0.000000e+00, ptr %18, align 4, !tbaa !9
  store ptr null, ptr %20, align 8, !tbaa !5
  br label %87

87:                                               ; preds = %110, %82
  %88 = load ptr, ptr %21, align 8, !tbaa !5
  %89 = load ptr, ptr %14, align 8, !tbaa !5
  %90 = icmp ult ptr %88, %89
  br i1 %90, label %91, label %111

91:                                               ; preds = %87
  call void @llvm.lifetime.start.p0(i64 1, ptr %22) #8
  %92 = load ptr, ptr %21, align 8, !tbaa !5
  %93 = load i8, ptr %92, align 1, !tbaa !25
  store i8 %93, ptr %22, align 1, !tbaa !25
  %94 = load i8, ptr %22, align 1, !tbaa !25
  %95 = call noundef zeroext i1 @_ZL14ImCharIsBlankAc(i8 noundef signext %94)
  br i1 %95, label %96, label %99

96:                                               ; preds = %91
  %97 = load ptr, ptr %21, align 8, !tbaa !5
  %98 = getelementptr inbounds i8, ptr %97, i32 1
  store ptr %98, ptr %21, align 8, !tbaa !5
  br label %107

99:                                               ; preds = %91
  %100 = load i8, ptr %22, align 1, !tbaa !25
  %101 = sext i8 %100 to i32
  %102 = icmp eq i32 %101, 10
  br i1 %102, label %103, label %106

103:                                              ; preds = %99
  %104 = load ptr, ptr %21, align 8, !tbaa !5
  %105 = getelementptr inbounds i8, ptr %104, i32 1
  store ptr %105, ptr %21, align 8, !tbaa !5
  store i32 5, ptr %23, align 4
  br label %108

106:                                              ; preds = %99
  store i32 5, ptr %23, align 4
  br label %108

107:                                              ; preds = %96
  store i32 0, ptr %23, align 4
  br label %108

108:                                              ; preds = %107, %106, %103
  call void @llvm.lifetime.end.p0(i64 1, ptr %22) #8
  %109 = load i32, ptr %23, align 4
  switch i32 %109, label %219 [
    i32 0, label %110
    i32 5, label %111
  ]

110:                                              ; preds = %108
  br label %87, !llvm.loop !26

111:                                              ; preds = %108, %87
  br label %45, !llvm.loop !28

112:                                              ; preds = %70
  br label %113

113:                                              ; preds = %112, %49
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #8
  %114 = load ptr, ptr %21, align 8, !tbaa !5
  store ptr %114, ptr %24, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #8
  %115 = load ptr, ptr %21, align 8, !tbaa !5
  %116 = load i8, ptr %115, align 1, !tbaa !25
  %117 = sext i8 %116 to i32
  store i32 %117, ptr %25, align 4, !tbaa !29
  %118 = load i32, ptr %25, align 4, !tbaa !29
  %119 = icmp ult i32 %118, 128
  br i1 %119, label %120, label %123

120:                                              ; preds = %113
  %121 = load ptr, ptr %21, align 8, !tbaa !5
  %122 = getelementptr inbounds i8, ptr %121, i64 1
  store ptr %122, ptr %21, align 8, !tbaa !5
  br label %134

123:                                              ; preds = %113
  %124 = load ptr, ptr %21, align 8, !tbaa !5
  %125 = load ptr, ptr %14, align 8, !tbaa !5
  %126 = call noundef i32 @_Z18ImTextCharFromUtf8PjPKcS1_(ptr noundef %25, ptr noundef %124, ptr noundef %125)
  %127 = load ptr, ptr %21, align 8, !tbaa !5
  %128 = sext i32 %126 to i64
  %129 = getelementptr inbounds i8, ptr %127, i64 %128
  store ptr %129, ptr %21, align 8, !tbaa !5
  %130 = load i32, ptr %25, align 4, !tbaa !29
  %131 = icmp eq i32 %130, 0
  br i1 %131, label %132, label %133

132:                                              ; preds = %123
  store i32 3, ptr %23, align 4
  br label %188

133:                                              ; preds = %123
  br label %134

134:                                              ; preds = %133, %120
  %135 = load i32, ptr %25, align 4, !tbaa !29
  %136 = icmp ult i32 %135, 32
  br i1 %136, label %137, label %155

137:                                              ; preds = %134
  %138 = load i32, ptr %25, align 4, !tbaa !29
  %139 = icmp eq i32 %138, 10
  br i1 %139, label %140, label %150

140:                                              ; preds = %137
  %141 = getelementptr inbounds %struct.ImVec2, ptr %8, i32 0, i32 0
  %142 = load float, ptr %141, align 4, !tbaa !22
  %143 = load float, ptr %18, align 4, !tbaa !9
  %144 = call noundef float @_ZL5ImMaxIfET_S0_S0_(float noundef %142, float noundef %143)
  %145 = getelementptr inbounds %struct.ImVec2, ptr %8, i32 0, i32 0
  store float %144, ptr %145, align 4, !tbaa !22
  %146 = load float, ptr %16, align 4, !tbaa !9
  %147 = getelementptr inbounds %struct.ImVec2, ptr %8, i32 0, i32 1
  %148 = load float, ptr %147, align 4, !tbaa !24
  %149 = fadd float %148, %146
  store float %149, ptr %147, align 4, !tbaa !24
  store float 0.000000e+00, ptr %18, align 4, !tbaa !9
  store i32 2, ptr %23, align 4
  br label %188, !llvm.loop !28

150:                                              ; preds = %137
  %151 = load i32, ptr %25, align 4, !tbaa !29
  %152 = icmp eq i32 %151, 13
  br i1 %152, label %153, label %154

153:                                              ; preds = %150
  store i32 2, ptr %23, align 4
  br label %188, !llvm.loop !28

154:                                              ; preds = %150
  br label %155

155:                                              ; preds = %154, %134
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #8
  %156 = load i32, ptr %25, align 4, !tbaa !29
  %157 = getelementptr inbounds %struct.ImFont, ptr %27, i32 0, i32 0
  %158 = getelementptr inbounds %struct.ImVector.6, ptr %157, i32 0, i32 0
  %159 = load i32, ptr %158, align 8, !tbaa !30
  %160 = icmp slt i32 %156, %159
  br i1 %160, label %161, label %169

161:                                              ; preds = %155
  %162 = getelementptr inbounds %struct.ImFont, ptr %27, i32 0, i32 0
  %163 = getelementptr inbounds %struct.ImVector.6, ptr %162, i32 0, i32 2
  %164 = load ptr, ptr %163, align 8, !tbaa !31
  %165 = load i32, ptr %25, align 4, !tbaa !29
  %166 = zext i32 %165 to i64
  %167 = getelementptr inbounds float, ptr %164, i64 %166
  %168 = load float, ptr %167, align 4, !tbaa !9
  br label %172

169:                                              ; preds = %155
  %170 = getelementptr inbounds %struct.ImFont, ptr %27, i32 0, i32 1
  %171 = load float, ptr %170, align 8, !tbaa !32
  br label %172

172:                                              ; preds = %169, %161
  %173 = phi float [ %168, %161 ], [ %171, %169 ]
  %174 = load float, ptr %17, align 4, !tbaa !9
  %175 = fmul float %173, %174
  store float %175, ptr %26, align 4, !tbaa !9
  %176 = load float, ptr %18, align 4, !tbaa !9
  %177 = load float, ptr %26, align 4, !tbaa !9
  %178 = fadd float %176, %177
  %179 = load float, ptr %11, align 4, !tbaa !9
  %180 = fcmp oge float %178, %179
  br i1 %180, label %181, label %183

181:                                              ; preds = %172
  %182 = load ptr, ptr %24, align 8, !tbaa !5
  store ptr %182, ptr %21, align 8, !tbaa !5
  store i32 3, ptr %23, align 4
  br label %187

183:                                              ; preds = %172
  %184 = load float, ptr %26, align 4, !tbaa !9
  %185 = load float, ptr %18, align 4, !tbaa !9
  %186 = fadd float %185, %184
  store float %186, ptr %18, align 4, !tbaa !9
  store i32 0, ptr %23, align 4
  br label %187

187:                                              ; preds = %183, %181
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #8
  br label %188

188:                                              ; preds = %187, %153, %140, %132
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #8
  %189 = load i32, ptr %23, align 4
  switch i32 %189, label %219 [
    i32 0, label %190
    i32 3, label %191
    i32 2, label %45
  ]

190:                                              ; preds = %188
  br label %45, !llvm.loop !28

191:                                              ; preds = %188, %45
  %192 = getelementptr inbounds %struct.ImVec2, ptr %8, i32 0, i32 0
  %193 = load float, ptr %192, align 4, !tbaa !22
  %194 = load float, ptr %18, align 4, !tbaa !9
  %195 = fcmp olt float %193, %194
  br i1 %195, label %196, label %199

196:                                              ; preds = %191
  %197 = load float, ptr %18, align 4, !tbaa !9
  %198 = getelementptr inbounds %struct.ImVec2, ptr %8, i32 0, i32 0
  store float %197, ptr %198, align 4, !tbaa !22
  br label %199

199:                                              ; preds = %196, %191
  %200 = load float, ptr %18, align 4, !tbaa !9
  %201 = fcmp ogt float %200, 0.000000e+00
  br i1 %201, label %206, label %202

202:                                              ; preds = %199
  %203 = getelementptr inbounds %struct.ImVec2, ptr %8, i32 0, i32 1
  %204 = load float, ptr %203, align 4, !tbaa !24
  %205 = fcmp oeq float %204, 0.000000e+00
  br i1 %205, label %206, label %211

206:                                              ; preds = %202, %199
  %207 = load float, ptr %16, align 4, !tbaa !9
  %208 = getelementptr inbounds %struct.ImVec2, ptr %8, i32 0, i32 1
  %209 = load float, ptr %208, align 4, !tbaa !24
  %210 = fadd float %209, %207
  store float %210, ptr %208, align 4, !tbaa !24
  br label %211

211:                                              ; preds = %206, %202
  %212 = load ptr, ptr %15, align 8, !tbaa !5
  %213 = icmp ne ptr %212, null
  br i1 %213, label %214, label %217

214:                                              ; preds = %211
  %215 = load ptr, ptr %21, align 8, !tbaa !5
  %216 = load ptr, ptr %15, align 8, !tbaa !5
  store ptr %215, ptr %216, align 8, !tbaa !5
  br label %217

217:                                              ; preds = %214, %211
  store i32 1, ptr %23, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #8
  %218 = load <2 x float>, ptr %8, align 4
  ret <2 x float> %218

219:                                              ; preds = %188, %108
  unreachable
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef zeroext i1 @_ZL14ImCharIsBlankAc(i8 noundef signext) #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 = { 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 = { nounwind willreturn memory(read) }
attributes #8 = { 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, !18, i64 88, !10, i64 92, !10, i64 96, !10, i64 100, !14, i64 104, !7, i64 108}
!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 = !{!7, !7, i64 0}
!26 = distinct !{!26, !27}
!27 = !{!"llvm.loop.mustprogress"}
!28 = distinct !{!28, !27}
!29 = !{!14, !14, i64 0}
!30 = !{!12, !14, i64 0}
!31 = !{!12, !6, i64 8}
!32 = !{!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(110), 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(110) %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) #7
  %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 %.loopexit

.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
  %.05795.us = phi float [ %.057.be.us, %.backedge.us ], [ 0.000000e+00, %.lr.ph ]
  %.06194.us = phi ptr [ %.061.be.us, %.backedge.us ], [ null, %.lr.ph ]
  %.06493.us = phi ptr [ %.064.be.us, %.backedge.us ], [ %4, %.lr.ph ]
  %.not76.us = icmp eq ptr %.06194.us, null
  br i1 %.not76.us, label %22, label %26

22:                                               ; preds = %.lr.ph.split.us
  %23 = fsub float %3, %.05795.us
  %24 = call noundef ptr @_ZNK6ImFont21CalcWordWrapPositionAEfPKcS1_f(ptr noundef nonnull align 8 dereferenceable(110) %0, float noundef %16, ptr noundef %.06493.us, ptr noundef nonnull %.0, float noundef %23)
  %25 = icmp eq ptr %24, %.06493.us
  %spec.select.idx.us = zext i1 %25 to i64
  %spec.select.us = getelementptr inbounds i8, ptr %24, i64 %spec.select.idx.us
  br label %26

26:                                               ; preds = %22, %.lr.ph.split.us
  %.162.us = phi ptr [ %.06194.us, %.lr.ph.split.us ], [ %spec.select.us, %22 ]
  %.not77.us = icmp ult ptr %.06493.us, %.162.us
  br i1 %.not77.us, label %40, label %27

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

30:                                               ; preds = %27
  store float %.05795.us, ptr %8, align 8, !tbaa !17
  br label %31

31:                                               ; preds = %30, %27
  %32 = load float, ptr %19, align 4, !tbaa !19
  %33 = fadd float %32, %1
  store float %33, ptr %19, align 4, !tbaa !19
  br label %34

34:                                               ; preds = %36, %31
  %.165.us = phi ptr [ %.06493.us, %31 ], [ %39, %36 ]
  %35 = icmp ult ptr %.165.us, %.0
  br i1 %35, label %36, label %.backedge.us

36:                                               ; preds = %34
  %37 = load i8, ptr %.165.us, align 1, !tbaa !20
  %38 = call noundef zeroext i1 @_ZL14ImCharIsBlankAc(i8 noundef signext %37)
  %39 = getelementptr inbounds i8, ptr %.165.us, i64 1
  br i1 %38, label %34, label %.split.loop.exit.us

40:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #8
  %41 = load i8, ptr %.06493.us, align 1, !tbaa !20
  %42 = sext i8 %41 to i32
  store i32 %42, ptr %9, align 4, !tbaa !21
  %43 = icmp sgt i8 %41, -1
  br i1 %43, label %50, label %44

44:                                               ; preds = %40
  %45 = call noundef i32 @_Z18ImTextCharFromUtf8PjPKcS1_(ptr noundef nonnull %9, ptr noundef nonnull %.06493.us, ptr noundef nonnull %.0)
  %46 = sext i32 %45 to i64
  %47 = getelementptr inbounds i8, ptr %.06493.us, i64 %46
  %48 = load i32, ptr %9, align 4, !tbaa !21
  %49 = icmp eq i32 %48, 0
  br i1 %49, label %.thread, label %52

50:                                               ; preds = %40
  %51 = getelementptr inbounds i8, ptr %.06493.us, i64 1
  br label %52

52:                                               ; preds = %50, %44
  %53 = phi i32 [ %48, %44 ], [ %42, %50 ]
  %.4.us = phi ptr [ %47, %44 ], [ %51, %50 ]
  %54 = icmp ult i32 %53, 32
  br i1 %54, label %55, label %61

55:                                               ; preds = %52
  switch i32 %53, label %61 [
    i32 10, label %56
    i32 13, label %.thread114
  ], !llvm.loop !22

56:                                               ; preds = %55
  %57 = load float, ptr %8, align 8, !tbaa !17
  %58 = call noundef float @_ZL5ImMaxIfET_S0_S0_(float noundef %57, float noundef %.05795.us)
  store float %58, ptr %8, align 8, !tbaa !17
  %59 = load float, ptr %19, align 4, !tbaa !19
  %60 = fadd float %59, %1
  store float %60, ptr %19, align 4, !tbaa !19
  br label %.thread114, !llvm.loop !22

61:                                               ; preds = %55, %52
  %62 = load i32, ptr %0, align 8, !tbaa !24
  %63 = icmp slt i32 %53, %62
  %64 = load ptr, ptr %20, align 8
  %65 = zext i32 %53 to i64
  %66 = getelementptr inbounds float, ptr %64, i64 %65
  %.in.us = select i1 %63, ptr %66, ptr %21
  %67 = load float, ptr %.in.us, align 4, !tbaa !25
  %68 = fmul float %16, %67
  %69 = fadd float %.05795.us, %68
  %70 = fcmp ult float %69, %2
  br i1 %70, label %.thread114, label %71

.thread114:                                       ; preds = %56, %55, %61
  %.2.us.ph = phi float [ %.05795.us, %55 ], [ 0.000000e+00, %56 ], [ %69, %61 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #8
  br label %.backedge.us

71:                                               ; preds = %61
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #8
  br label %.loopexit

.backedge.us:                                     ; preds = %34, %.thread114, %.split.loop.exit.us
  %.064.be.us = phi ptr [ %spec.select81.le.us, %.split.loop.exit.us ], [ %.4.us, %.thread114 ], [ %.165.us, %34 ]
  %.061.be.us = phi ptr [ null, %.split.loop.exit.us ], [ %.162.us, %.thread114 ], [ null, %34 ]
  %.057.be.us = phi float [ 0.000000e+00, %.split.loop.exit.us ], [ %.2.us.ph, %.thread114 ], [ 0.000000e+00, %34 ]
  %72 = icmp ult ptr %.064.be.us, %.0
  br i1 %72, label %.lr.ph.split.us, label %.loopexit, !llvm.loop !22

.split.loop.exit.us:                              ; preds = %36
  %73 = icmp eq i8 %37, 10
  %spec.select81.le.us = select i1 %73, ptr %39, ptr %.165.us
  br label %.backedge.us

.lr.ph.split:                                     ; preds = %.lr.ph, %104
  %.05795 = phi float [ %.2, %104 ], [ 0.000000e+00, %.lr.ph ]
  %.06493 = phi ptr [ %.6, %104 ], [ %4, %.lr.ph ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #8
  %74 = load i8, ptr %.06493, align 1, !tbaa !20
  %75 = sext i8 %74 to i32
  store i32 %75, ptr %9, align 4, !tbaa !21
  %76 = icmp sgt i8 %74, -1
  br i1 %76, label %77, label %79

77:                                               ; preds = %.lr.ph.split
  %78 = getelementptr inbounds i8, ptr %.06493, i64 1
  br label %85

79:                                               ; preds = %.lr.ph.split
  %80 = call noundef i32 @_Z18ImTextCharFromUtf8PjPKcS1_(ptr noundef nonnull %9, ptr noundef nonnull %.06493, ptr noundef nonnull %.0)
  %81 = sext i32 %80 to i64
  %82 = getelementptr inbounds i8, ptr %.06493, i64 %81
  %83 = load i32, ptr %9, align 4, !tbaa !21
  %84 = icmp eq i32 %83, 0
  br i1 %84, label %.thread, label %85

.thread:                                          ; preds = %79, %44
  %.us-phi = phi float [ %.05795.us, %44 ], [ %.05795, %79 ]
  %.us-phi100 = phi ptr [ %47, %44 ], [ %82, %79 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #8
  br label %.loopexit

85:                                               ; preds = %79, %77
  %86 = phi i32 [ %83, %79 ], [ %75, %77 ]
  %.4 = phi ptr [ %82, %79 ], [ %78, %77 ]
  %87 = icmp ult i32 %86, 32
  br i1 %87, label %88, label %94

88:                                               ; preds = %85
  switch i32 %86, label %94 [
    i32 10, label %89
    i32 13, label %104
  ], !llvm.loop !22

89:                                               ; preds = %88
  %90 = load float, ptr %8, align 8, !tbaa !17
  %91 = call noundef float @_ZL5ImMaxIfET_S0_S0_(float noundef %90, float noundef %.05795)
  store float %91, ptr %8, align 8, !tbaa !17
  %92 = load float, ptr %19, align 4, !tbaa !19
  %93 = fadd float %92, %1
  store float %93, ptr %19, align 4, !tbaa !19
  br label %104, !llvm.loop !22

94:                                               ; preds = %88, %85
  %95 = load i32, ptr %0, align 8, !tbaa !24
  %96 = icmp slt i32 %86, %95
  %97 = load ptr, ptr %20, align 8
  %98 = zext i32 %86 to i64
  %99 = getelementptr inbounds float, ptr %97, i64 %98
  %.in = select i1 %96, ptr %99, ptr %21
  %100 = load float, ptr %.in, align 4, !tbaa !25
  %101 = fmul float %16, %100
  %102 = fadd float %.05795, %101
  %103 = fcmp ult float %102, %2
  %.5 = select i1 %103, ptr %.4, ptr %.06493
  %.1 = select i1 %103, float %102, float %.05795
  br label %104

104:                                              ; preds = %88, %94, %89
  %.6 = phi ptr [ %.4, %89 ], [ %.5, %94 ], [ %.4, %88 ]
  %.260 = phi i1 [ true, %89 ], [ %103, %94 ], [ true, %88 ]
  %.2 = phi float [ 0.000000e+00, %89 ], [ %.1, %94 ], [ %.05795, %88 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #8
  %105 = icmp ult ptr %.6, %.0
  %or.cond105 = select i1 %.260, i1 %105, i1 false
  br i1 %or.cond105, label %.lr.ph.split, label %.loopexit, !llvm.loop !22

.loopexit:                                        ; preds = %104, %.backedge.us, %71, %13, %.thread
  %.7 = phi ptr [ %.us-phi100, %.thread ], [ %4, %13 ], [ %.06493.us, %71 ], [ %.064.be.us, %.backedge.us ], [ %.6, %104 ]
  %.3 = phi float [ %.us-phi, %.thread ], [ 0.000000e+00, %13 ], [ %.05795.us, %71 ], [ %.057.be.us, %.backedge.us ], [ %.2, %104 ]
  %106 = load float, ptr %8, align 8, !tbaa !17
  %107 = fcmp olt float %106, %.3
  br i1 %107, label %108, label %109

108:                                              ; preds = %.loopexit
  store float %.3, ptr %8, align 8, !tbaa !17
  br label %109

109:                                              ; preds = %108, %.loopexit
  %110 = fcmp ogt float %.3, 0.000000e+00
  %111 = getelementptr inbounds i8, ptr %8, i64 4
  %112 = load float, ptr %111, align 4
  %113 = fcmp oeq float %112, 0.000000e+00
  %or.cond = select i1 %110, i1 true, i1 %113
  br i1 %or.cond, label %114, label %116

114:                                              ; preds = %109
  %115 = fadd float %112, %1
  store float %115, ptr %111, align 4, !tbaa !19
  br label %116

116:                                              ; preds = %109, %114
  %.not78 = icmp eq ptr %6, null
  br i1 %.not78, label %118, label %117

117:                                              ; preds = %116
  store ptr %.7, ptr %6, align 8, !tbaa !26
  br label %118

118:                                              ; preds = %117, %116
  %119 = load <2 x float>, ptr %8, align 8
  ret <2 x float> %119
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef zeroext i1 @_ZL14ImCharIsBlankAc(i8 noundef signext) local_unnamed_addr #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 = { 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 = { nounwind willreturn memory(read) }
attributes #8 = { 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, !16, i64 88, !12, i64 92, !12, i64 96, !12, i64 100, !8, i64 104, !9, i64 108}
!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