; LLVM IR from Eukky/TRender :: lib/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 { float, float, %struct.ImVec2, %class.ImVector.6, %class.ImVector.7, %class.ImVector.0, ptr, float, i16, i16, ptr, ptr, float, float, i8, i32 }
%class.ImVector.6 = type { i32, i32, ptr }
%class.ImVector.7 = type { i32, i32, ptr }
%class.ImVector.0 = 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(112), float noundef, ptr noundef, ptr noundef, float noundef) #5 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNK8ImVectorIfEixEi(ptr noundef nonnull align 8 dereferenceable(16), i32 noundef) #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local <2 x float> @_ZNK6ImFont13CalcTextSizeAEfffPKcS1_PS1_(ptr noundef nonnull align 8 dereferenceable(112) %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 0
  %39 = load float, ptr %38, align 8, !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 !20
  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 = %187, %185, %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 %188

49:                                               ; preds = %45
  %50 = load i8, ptr %19, align 1, !tbaa !20, !range !21, !noundef !22
  %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(112) %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 !23
  %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 !23
  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 %216 [
    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 %185

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 !23
  %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 !23
  %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 %185, !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 %185, !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 4
  %158 = getelementptr inbounds %class.ImVector.7, 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 %166

161:                                              ; preds = %155
  %162 = getelementptr inbounds %struct.ImFont, ptr %27, i32 0, i32 4
  %163 = load i32, ptr %25, align 4, !tbaa !29
  %164 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK8ImVectorIfEixEi(ptr noundef nonnull align 8 dereferenceable(16) %162, i32 noundef %163)
  %165 = load float, ptr %164, align 4, !tbaa !9
  br label %169

166:                                              ; preds = %155
  %167 = getelementptr inbounds %struct.ImFont, ptr %27, i32 0, i32 7
  %168 = load float, ptr %167, align 8, !tbaa !31
  br label %169

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

178:                                              ; preds = %169
  %179 = load ptr, ptr %24, align 8, !tbaa !5
  store ptr %179, ptr %21, align 8, !tbaa !5
  store i32 3, ptr %23, align 4
  br label %184

180:                                              ; preds = %169
  %181 = load float, ptr %26, align 4, !tbaa !9
  %182 = load float, ptr %18, align 4, !tbaa !9
  %183 = fadd float %182, %181
  store float %183, ptr %18, align 4, !tbaa !9
  store i32 0, ptr %23, align 4
  br label %184

184:                                              ; preds = %180, %178
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #8
  br label %185

185:                                              ; preds = %184, %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
  %186 = load i32, ptr %23, align 4
  switch i32 %186, label %216 [
    i32 0, label %187
    i32 3, label %188
    i32 2, label %45
  ]

187:                                              ; preds = %185
  br label %45, !llvm.loop !28

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

193:                                              ; preds = %188
  %194 = load float, ptr %18, align 4, !tbaa !9
  %195 = getelementptr inbounds %struct.ImVec2, ptr %8, i32 0, i32 0
  store float %194, ptr %195, align 4, !tbaa !23
  br label %196

196:                                              ; preds = %193, %188
  %197 = load float, ptr %18, align 4, !tbaa !9
  %198 = fcmp ogt float %197, 0.000000e+00
  br i1 %198, label %203, label %199

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

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

208:                                              ; preds = %203, %199
  %209 = load ptr, ptr %15, align 8, !tbaa !5
  %210 = icmp ne ptr %209, null
  br i1 %210, label %211, label %214

211:                                              ; preds = %208
  %212 = load ptr, ptr %21, align 8, !tbaa !5
  %213 = load ptr, ptr %15, align 8, !tbaa !5
  store ptr %212, ptr %213, align 8, !tbaa !5
  br label %214

214:                                              ; preds = %211, %208
  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
  %215 = load <2 x float>, ptr %8, align 4
  ret <2 x float> %215

216:                                              ; preds = %185, %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 0}
!12 = !{!"_ZTS6ImFont", !10, i64 0, !10, i64 4, !13, i64 8, !14, i64 16, !16, i64 32, !17, i64 48, !6, i64 64, !10, i64 72, !18, i64 76, !18, i64 78, !6, i64 80, !6, i64 88, !10, i64 96, !10, i64 100, !19, i64 104, !15, i64 108}
!13 = !{!"_ZTS6ImVec2", !10, i64 0, !10, i64 4}
!14 = !{!"_ZTS8ImVectorI11ImFontGlyphE", !15, i64 0, !15, i64 4, !6, i64 8}
!15 = !{!"int", !7, i64 0}
!16 = !{!"_ZTS8ImVectorIfE", !15, i64 0, !15, i64 4, !6, i64 8}
!17 = !{!"_ZTS8ImVectorItE", !15, i64 0, !15, i64 4, !6, i64 8}
!18 = !{!"short", !7, i64 0}
!19 = !{!"bool", !7, i64 0}
!20 = !{!19, !19, i64 0}
!21 = !{i8 0, i8 2}
!22 = !{}
!23 = !{!13, !10, i64 0}
!24 = !{!13, !10, i64 4}
!25 = !{!7, !7, i64 0}
!26 = distinct !{!26, !27}
!27 = !{!"llvm.loop.mustprogress"}
!28 = distinct !{!28, !27}
!29 = !{!15, !15, i64 0}
!30 = !{!12, !15, i64 32}
!31 = !{!12, !10, i64 72}


; 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(112), float noundef, ptr noundef, ptr noundef, float noundef) local_unnamed_addr #5 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNK8ImVectorIfEixEi(ptr noundef nonnull align 8 dereferenceable(16), i32 noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local <2 x float> @_ZNK6ImFont13CalcTextSizeAEfffPKcS1_PS1_(ptr noundef nonnull align 8 dereferenceable(112) %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 = load float, ptr %0, align 8, !tbaa !5
  %15 = fdiv float %1, %14
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %8, float noundef 0.000000e+00, float noundef 0.000000e+00)
  %16 = icmp ugt ptr %.0, %4
  br i1 %16, label %.lr.ph, label %.loopexit

.lr.ph:                                           ; preds = %13
  %17 = fcmp ogt float %3, 0.000000e+00
  %18 = getelementptr inbounds i8, ptr %8, i64 4
  %19 = getelementptr inbounds i8, ptr %0, i64 32
  %20 = getelementptr inbounds i8, ptr %0, i64 72
  br i1 %17, 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 %21, label %25

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

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

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

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

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

33:                                               ; preds = %35, %30
  %.165.us = phi ptr [ %.06493.us, %30 ], [ %38, %35 ]
  %34 = icmp ult ptr %.165.us, %.0
  br i1 %34, label %35, label %.backedge.us

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

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

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

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

51:                                               ; preds = %49, %43
  %52 = phi i32 [ %47, %43 ], [ %41, %49 ]
  %.4.us = phi ptr [ %46, %43 ], [ %50, %49 ]
  %53 = icmp ult i32 %52, 32
  br i1 %53, label %54, label %60

54:                                               ; preds = %51
  switch i32 %52, label %60 [
    i32 10, label %55
    i32 13, label %.thread114
  ], !llvm.loop !22

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

60:                                               ; preds = %54, %51
  %61 = load i32, ptr %19, align 8, !tbaa !24
  %62 = icmp slt i32 %52, %61
  br i1 %62, label %63, label %65

63:                                               ; preds = %60
  %64 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK8ImVectorIfEixEi(ptr noundef nonnull align 8 dereferenceable(16) %19, i32 noundef %52)
  br label %65

65:                                               ; preds = %60, %63
  %.in.us = phi ptr [ %64, %63 ], [ %20, %60 ]
  %66 = load float, ptr %.in.us, align 4, !tbaa !25
  %67 = fmul float %15, %66
  %68 = fadd float %.05795.us, %67
  %69 = fcmp ult float %68, %2
  br i1 %69, label %.thread114, label %70

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

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

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

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

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

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

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

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

84:                                               ; preds = %78, %76
  %85 = phi i32 [ %82, %78 ], [ %74, %76 ]
  %.4 = phi ptr [ %81, %78 ], [ %77, %76 ]
  %86 = icmp ult i32 %85, 32
  br i1 %86, label %87, label %93

87:                                               ; preds = %84
  switch i32 %85, label %93 [
    i32 10, label %88
    i32 13, label %103
  ], !llvm.loop !22

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

93:                                               ; preds = %87, %84
  %94 = load i32, ptr %19, align 8, !tbaa !24
  %95 = icmp slt i32 %85, %94
  br i1 %95, label %96, label %98

96:                                               ; preds = %93
  %97 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK8ImVectorIfEixEi(ptr noundef nonnull align 8 dereferenceable(16) %19, i32 noundef %85)
  br label %98

98:                                               ; preds = %93, %96
  %.in = phi ptr [ %97, %96 ], [ %20, %93 ]
  %99 = load float, ptr %.in, align 4, !tbaa !25
  %100 = fmul float %15, %99
  %101 = fadd float %.05795, %100
  %102 = fcmp ult float %101, %2
  %.4..064 = select i1 %102, ptr %.4, ptr %.06493
  %..057 = select i1 %102, float %101, float %.05795
  br label %103

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

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

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

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

113:                                              ; preds = %108
  %114 = fadd float %111, %1
  store float %114, ptr %110, align 4, !tbaa !19
  br label %115

115:                                              ; preds = %108, %113
  %.not78 = icmp eq ptr %6, null
  br i1 %.not78, label %117, label %116

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

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

; 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, !7, i64 0}
!6 = !{!"_ZTS6ImFont", !7, i64 0, !7, i64 4, !10, i64 8, !11, i64 16, !14, i64 32, !15, i64 48, !13, i64 64, !7, i64 72, !16, i64 76, !16, i64 78, !13, i64 80, !13, i64 88, !7, i64 96, !7, i64 100, !17, i64 104, !12, i64 108}
!7 = !{!"float", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTS6ImVec2", !7, i64 0, !7, i64 4}
!11 = !{!"_ZTS8ImVectorI11ImFontGlyphE", !12, i64 0, !12, i64 4, !13, i64 8}
!12 = !{!"int", !8, i64 0}
!13 = !{!"any pointer", !8, i64 0}
!14 = !{!"_ZTS8ImVectorIfE", !12, i64 0, !12, i64 4, !13, i64 8}
!15 = !{!"_ZTS8ImVectorItE", !12, i64 0, !12, i64 4, !13, i64 8}
!16 = !{!"short", !8, i64 0}
!17 = !{!"bool", !8, i64 0}
!18 = !{!10, !7, i64 0}
!19 = !{!10, !7, i64 4}
!20 = !{!8, !8, i64 0}
!21 = !{!12, !12, i64 0}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = !{!6, !12, i64 32}
!25 = !{!7, !7, i64 0}
!26 = !{!13, !13, 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