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

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

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

; 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 nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #1

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef i32 @_ZL5ImMaxii(i32 noundef, i32 noundef) #3

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(28) ptr @_ZN8ImVectorIN6ImFont5GlyphEE4backEv(ptr noundef nonnull align 8 dereferenceable(24)) #3 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6ImFont16BuildLookupTableEv(ptr noundef nonnull align 8 dereferenceable(120) %0) #4 align 2 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca i64, align 8
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i64, align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  %10 = load ptr, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #5
  store i32 0, ptr %3, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #5
  store i64 0, ptr %4, align 8, !tbaa !11
  br label %11

11:                                               ; preds = %26, %1
  %12 = load i64, ptr %4, align 8, !tbaa !11
  %13 = getelementptr inbounds %struct.ImFont, ptr %10, i32 0, i32 5
  %14 = call noundef i64 @_ZNK8ImVectorIN6ImFont5GlyphEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %13)
  %15 = icmp ne i64 %12, %14
  br i1 %15, label %17, label %16

16:                                               ; preds = %11
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #5
  br label %29

17:                                               ; preds = %11
  %18 = load i32, ptr %3, align 4, !tbaa !9
  %19 = getelementptr inbounds %struct.ImFont, ptr %10, i32 0, i32 5
  %20 = load i64, ptr %4, align 8, !tbaa !11
  %21 = call noundef nonnull align 4 dereferenceable(28) ptr @_ZN8ImVectorIN6ImFont5GlyphEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %19, i64 noundef %20)
  %22 = getelementptr inbounds %"struct.ImFont::Glyph", ptr %21, i32 0, i32 0
  %23 = load i16, ptr %22, align 4, !tbaa !13
  %24 = zext i16 %23 to i32
  %25 = call noundef i32 @_ZL5ImMaxii(i32 noundef %18, i32 noundef %24)
  store i32 %25, ptr %3, align 4, !tbaa !9
  br label %26

26:                                               ; preds = %17
  %27 = load i64, ptr %4, align 8, !tbaa !11
  %28 = add i64 %27, 1
  store i64 %28, ptr %4, align 8, !tbaa !11
  br label %11, !llvm.loop !17

29:                                               ; preds = %16
  %30 = getelementptr inbounds %struct.ImFont, ptr %10, i32 0, i32 8
  call void @_ZN8ImVectorIfE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %30)
  %31 = getelementptr inbounds %struct.ImFont, ptr %10, i32 0, i32 8
  %32 = load i32, ptr %3, align 4, !tbaa !9
  %33 = sext i32 %32 to i64
  %34 = add i64 %33, 1
  call void @_ZN8ImVectorIfE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %31, i64 noundef %34)
  %35 = getelementptr inbounds %struct.ImFont, ptr %10, i32 0, i32 9
  call void @_ZN8ImVectorIiE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %35)
  %36 = getelementptr inbounds %struct.ImFont, ptr %10, i32 0, i32 9
  %37 = load i32, ptr %3, align 4, !tbaa !9
  %38 = sext i32 %37 to i64
  %39 = add i64 %38, 1
  call void @_ZN8ImVectorIiE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %36, i64 noundef %39)
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #5
  store i64 0, ptr %5, align 8, !tbaa !11
  br label %40

40:                                               ; preds = %54, %29
  %41 = load i64, ptr %5, align 8, !tbaa !11
  %42 = load i32, ptr %3, align 4, !tbaa !9
  %43 = sext i32 %42 to i64
  %44 = add i64 %43, 1
  %45 = icmp ult i64 %41, %44
  br i1 %45, label %47, label %46

46:                                               ; preds = %40
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  br label %57

47:                                               ; preds = %40
  %48 = getelementptr inbounds %struct.ImFont, ptr %10, i32 0, i32 8
  %49 = load i64, ptr %5, align 8, !tbaa !11
  %50 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN8ImVectorIfEixEm(ptr noundef nonnull align 8 dereferenceable(24) %48, i64 noundef %49)
  store float -1.000000e+00, ptr %50, align 4, !tbaa !19
  %51 = getelementptr inbounds %struct.ImFont, ptr %10, i32 0, i32 9
  %52 = load i64, ptr %5, align 8, !tbaa !11
  %53 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN8ImVectorIiEixEm(ptr noundef nonnull align 8 dereferenceable(24) %51, i64 noundef %52)
  store i32 -1, ptr %53, align 4, !tbaa !9
  br label %54

54:                                               ; preds = %47
  %55 = load i64, ptr %5, align 8, !tbaa !11
  %56 = add i64 %55, 1
  store i64 %56, ptr %5, align 8, !tbaa !11
  br label %40, !llvm.loop !20

57:                                               ; preds = %46
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  store i64 0, ptr %6, align 8, !tbaa !11
  br label %58

58:                                               ; preds = %86, %57
  %59 = load i64, ptr %6, align 8, !tbaa !11
  %60 = getelementptr inbounds %struct.ImFont, ptr %10, i32 0, i32 5
  %61 = call noundef i64 @_ZNK8ImVectorIN6ImFont5GlyphEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %60)
  %62 = icmp ult i64 %59, %61
  br i1 %62, label %64, label %63

63:                                               ; preds = %58
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  br label %89

64:                                               ; preds = %58
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  %65 = getelementptr inbounds %struct.ImFont, ptr %10, i32 0, i32 5
  %66 = load i64, ptr %6, align 8, !tbaa !11
  %67 = call noundef nonnull align 4 dereferenceable(28) ptr @_ZN8ImVectorIN6ImFont5GlyphEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %65, i64 noundef %66)
  %68 = getelementptr inbounds %"struct.ImFont::Glyph", ptr %67, i32 0, i32 0
  %69 = load i16, ptr %68, align 4, !tbaa !13
  %70 = zext i16 %69 to i32
  %71 = sext i32 %70 to i64
  store i64 %71, ptr %7, align 8, !tbaa !11
  %72 = getelementptr inbounds %struct.ImFont, ptr %10, i32 0, i32 5
  %73 = load i64, ptr %6, align 8, !tbaa !11
  %74 = call noundef nonnull align 4 dereferenceable(28) ptr @_ZN8ImVectorIN6ImFont5GlyphEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %72, i64 noundef %73)
  %75 = getelementptr inbounds %"struct.ImFont::Glyph", ptr %74, i32 0, i32 1
  %76 = load i16, ptr %75, align 2, !tbaa !21
  %77 = sitofp i16 %76 to float
  %78 = getelementptr inbounds %struct.ImFont, ptr %10, i32 0, i32 8
  %79 = load i64, ptr %7, align 8, !tbaa !11
  %80 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN8ImVectorIfEixEm(ptr noundef nonnull align 8 dereferenceable(24) %78, i64 noundef %79)
  store float %77, ptr %80, align 4, !tbaa !19
  %81 = load i64, ptr %6, align 8, !tbaa !11
  %82 = trunc i64 %81 to i32
  %83 = getelementptr inbounds %struct.ImFont, ptr %10, i32 0, i32 9
  %84 = load i64, ptr %7, align 8, !tbaa !11
  %85 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN8ImVectorIiEixEm(ptr noundef nonnull align 8 dereferenceable(24) %83, i64 noundef %84)
  store i32 %82, ptr %85, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  br label %86

86:                                               ; preds = %64
  %87 = load i64, ptr %6, align 8, !tbaa !11
  %88 = add i64 %87, 1
  store i64 %88, ptr %6, align 8, !tbaa !11
  br label %58, !llvm.loop !22

89:                                               ; preds = %63
  %90 = call noundef ptr @_ZNK6ImFont9FindGlyphEt(ptr noundef nonnull align 8 dereferenceable(120) %10, i16 noundef zeroext 32)
  %91 = icmp ne ptr %90, null
  br i1 %91, label %92, label %137

92:                                               ; preds = %89
  %93 = getelementptr inbounds %struct.ImFont, ptr %10, i32 0, i32 5
  %94 = call noundef nonnull align 4 dereferenceable(28) ptr @_ZN8ImVectorIN6ImFont5GlyphEE4backEv(ptr noundef nonnull align 8 dereferenceable(24) %93)
  %95 = getelementptr inbounds %"struct.ImFont::Glyph", ptr %94, i32 0, i32 0
  %96 = load i16, ptr %95, align 4, !tbaa !13
  %97 = zext i16 %96 to i32
  %98 = icmp ne i32 %97, 9
  br i1 %98, label %99, label %104

99:                                               ; preds = %92
  %100 = getelementptr inbounds %struct.ImFont, ptr %10, i32 0, i32 5
  %101 = getelementptr inbounds %struct.ImFont, ptr %10, i32 0, i32 5
  %102 = call noundef i64 @_ZNK8ImVectorIN6ImFont5GlyphEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %101)
  %103 = add i64 %102, 1
  call void @_ZN8ImVectorIN6ImFont5GlyphEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %100, i64 noundef %103)
  br label %104

104:                                              ; preds = %99, %92
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  %105 = getelementptr inbounds %struct.ImFont, ptr %10, i32 0, i32 5
  %106 = call noundef nonnull align 4 dereferenceable(28) ptr @_ZN8ImVectorIN6ImFont5GlyphEE4backEv(ptr noundef nonnull align 8 dereferenceable(24) %105)
  store ptr %106, ptr %8, align 8, !tbaa !5
  %107 = call noundef ptr @_ZNK6ImFont9FindGlyphEt(ptr noundef nonnull align 8 dereferenceable(120) %10, i16 noundef zeroext 32)
  %108 = load ptr, ptr %8, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %108, ptr align 4 %107, i64 28, i1 false), !tbaa.struct !23
  %109 = load ptr, ptr %8, align 8, !tbaa !5
  %110 = getelementptr inbounds %"struct.ImFont::Glyph", ptr %109, i32 0, i32 0
  store i16 9, ptr %110, align 4, !tbaa !13
  %111 = load ptr, ptr %8, align 8, !tbaa !5
  %112 = getelementptr inbounds %"struct.ImFont::Glyph", ptr %111, i32 0, i32 1
  %113 = load i16, ptr %112, align 2, !tbaa !21
  %114 = sext i16 %113 to i32
  %115 = mul nsw i32 %114, 4
  %116 = trunc i32 %115 to i16
  store i16 %116, ptr %112, align 2, !tbaa !21
  %117 = load ptr, ptr %8, align 8, !tbaa !5
  %118 = getelementptr inbounds %"struct.ImFont::Glyph", ptr %117, i32 0, i32 1
  %119 = load i16, ptr %118, align 2, !tbaa !21
  %120 = sitofp i16 %119 to float
  %121 = getelementptr inbounds %struct.ImFont, ptr %10, i32 0, i32 8
  %122 = load ptr, ptr %8, align 8, !tbaa !5
  %123 = getelementptr inbounds %"struct.ImFont::Glyph", ptr %122, i32 0, i32 0
  %124 = load i16, ptr %123, align 4, !tbaa !13
  %125 = zext i16 %124 to i64
  %126 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN8ImVectorIfEixEm(ptr noundef nonnull align 8 dereferenceable(24) %121, i64 noundef %125)
  store float %120, ptr %126, align 4, !tbaa !19
  %127 = getelementptr inbounds %struct.ImFont, ptr %10, i32 0, i32 5
  %128 = call noundef i64 @_ZNK8ImVectorIN6ImFont5GlyphEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %127)
  %129 = sub i64 %128, 1
  %130 = trunc i64 %129 to i32
  %131 = getelementptr inbounds %struct.ImFont, ptr %10, i32 0, i32 9
  %132 = load ptr, ptr %8, align 8, !tbaa !5
  %133 = getelementptr inbounds %"struct.ImFont::Glyph", ptr %132, i32 0, i32 0
  %134 = load i16, ptr %133, align 4, !tbaa !13
  %135 = zext i16 %134 to i64
  %136 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN8ImVectorIiEixEm(ptr noundef nonnull align 8 dereferenceable(24) %131, i64 noundef %135)
  store i32 %130, ptr %136, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  br label %137

137:                                              ; preds = %104, %89
  %138 = getelementptr inbounds %struct.ImFont, ptr %10, i32 0, i32 6
  store ptr null, ptr %138, align 8, !tbaa !25
  %139 = getelementptr inbounds %struct.ImFont, ptr %10, i32 0, i32 3
  %140 = load i16, ptr %139, align 8, !tbaa !31
  %141 = call noundef ptr @_ZNK6ImFont9FindGlyphEt(ptr noundef nonnull align 8 dereferenceable(120) %10, i16 noundef zeroext %140)
  %142 = getelementptr inbounds %struct.ImFont, ptr %10, i32 0, i32 6
  store ptr %141, ptr %142, align 8, !tbaa !25
  %143 = getelementptr inbounds %struct.ImFont, ptr %10, i32 0, i32 6
  %144 = load ptr, ptr %143, align 8, !tbaa !25
  %145 = icmp ne ptr %144, null
  br i1 %145, label %146, label %153

146:                                              ; preds = %137
  %147 = getelementptr inbounds %struct.ImFont, ptr %10, i32 0, i32 6
  %148 = load ptr, ptr %147, align 8, !tbaa !25
  %149 = getelementptr inbounds %"struct.ImFont::Glyph", ptr %148, i32 0, i32 1
  %150 = load i16, ptr %149, align 2, !tbaa !21
  %151 = sext i16 %150 to i32
  %152 = sitofp i32 %151 to float
  br label %154

153:                                              ; preds = %137
  br label %154

154:                                              ; preds = %153, %146
  %155 = phi float [ %152, %146 ], [ 0.000000e+00, %153 ]
  %156 = getelementptr inbounds %struct.ImFont, ptr %10, i32 0, i32 7
  store float %155, ptr %156, align 8, !tbaa !32
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  store i64 0, ptr %9, align 8, !tbaa !11
  br label %157

157:                                              ; preds = %177, %154
  %158 = load i64, ptr %9, align 8, !tbaa !11
  %159 = load i32, ptr %3, align 4, !tbaa !9
  %160 = sext i32 %159 to i64
  %161 = add i64 %160, 1
  %162 = icmp ult i64 %158, %161
  br i1 %162, label %164, label %163

163:                                              ; preds = %157
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  br label %180

164:                                              ; preds = %157
  %165 = getelementptr inbounds %struct.ImFont, ptr %10, i32 0, i32 8
  %166 = load i64, ptr %9, align 8, !tbaa !11
  %167 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN8ImVectorIfEixEm(ptr noundef nonnull align 8 dereferenceable(24) %165, i64 noundef %166)
  %168 = load float, ptr %167, align 4, !tbaa !19
  %169 = fcmp olt float %168, 0.000000e+00
  br i1 %169, label %170, label %176

170:                                              ; preds = %164
  %171 = getelementptr inbounds %struct.ImFont, ptr %10, i32 0, i32 7
  %172 = load float, ptr %171, align 8, !tbaa !32
  %173 = getelementptr inbounds %struct.ImFont, ptr %10, i32 0, i32 8
  %174 = load i64, ptr %9, align 8, !tbaa !11
  %175 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN8ImVectorIfEixEm(ptr noundef nonnull align 8 dereferenceable(24) %173, i64 noundef %174)
  store float %172, ptr %175, align 4, !tbaa !19
  br label %176

176:                                              ; preds = %170, %164
  br label %177

177:                                              ; preds = %176
  %178 = load i64, ptr %9, align 8, !tbaa !11
  %179 = add i64 %178, 1
  store i64 %179, ptr %9, align 8, !tbaa !11
  br label %157, !llvm.loop !33

180:                                              ; preds = %163
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  ret void
}

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(28) ptr @_ZN8ImVectorIN6ImFont5GlyphEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #3 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZNK6ImFont9FindGlyphEt(ptr noundef nonnull align 8 dereferenceable(120), i16 noundef zeroext) #4 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { 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 #4 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!14, !15, i64 0}
!14 = !{!"_ZTSN6ImFont5GlyphE", !15, i64 0, !15, i64 2, !15, i64 4, !15, i64 6, !15, i64 8, !15, i64 10, !16, i64 12, !16, i64 16, !16, i64 20, !16, i64 24}
!15 = !{!"short", !7, i64 0}
!16 = !{!"float", !7, i64 0}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = !{!16, !16, i64 0}
!20 = distinct !{!20, !18}
!21 = !{!14, !15, i64 2}
!22 = distinct !{!22, !18}
!23 = !{i64 0, i64 2, !24, i64 2, i64 2, !24, i64 4, i64 2, !24, i64 6, i64 2, !24, i64 8, i64 2, !24, i64 10, i64 2, !24, i64 12, i64 4, !19, i64 16, i64 4, !19, i64 20, i64 4, !19, i64 24, i64 4, !19}
!24 = !{!15, !15, i64 0}
!25 = !{!26, !6, i64 56}
!26 = !{!"_ZTS6ImFont", !16, i64 0, !16, i64 4, !27, i64 8, !15, i64 16, !6, i64 24, !28, i64 32, !6, i64 56, !16, i64 64, !29, i64 72, !30, i64 96}
!27 = !{!"_ZTS6ImVec2", !16, i64 0, !16, i64 4}
!28 = !{!"_ZTS8ImVectorIN6ImFont5GlyphEE", !12, i64 0, !12, i64 8, !6, i64 16}
!29 = !{!"_ZTS8ImVectorIfE", !12, i64 0, !12, i64 8, !6, i64 16}
!30 = !{!"_ZTS8ImVectorIiE", !12, i64 0, !12, i64 8, !6, i64 16}
!31 = !{!26, !15, i64 16}
!32 = !{!26, !16, i64 64}
!33 = distinct !{!33, !18}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #0

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN8ImVectorIfE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #1 align 2

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN8ImVectorIN6ImFont5GlyphEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #1 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6ImFont16BuildLookupTableEv(ptr noundef nonnull align 8 dereferenceable(120) %0) local_unnamed_addr #3 align 2 {
  %2 = getelementptr inbounds i8, ptr %0, i64 32
  %3 = tail call noundef i64 @_ZNK8ImVectorIN6ImFont5GlyphEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %2)
  %.not38 = icmp eq i64 %3, 0
  br i1 %.not38, label %._crit_edge, label %.lr.ph

._crit_edge.loopexit:                             ; preds = %.lr.ph
  %4 = sext i32 %11 to i64
  %5 = add nsw i64 %4, 1
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %1
  %.029.lcssa = phi i64 [ 1, %1 ], [ %5, %._crit_edge.loopexit ]
  %6 = getelementptr inbounds i8, ptr %0, i64 72
  tail call void @_ZN8ImVectorIfE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %6)
  tail call void @_ZN8ImVectorIfE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %.029.lcssa)
  %7 = getelementptr inbounds i8, ptr %0, i64 96
  tail call void @_ZN8ImVectorIiE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %7)
  tail call void @_ZN8ImVectorIiE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %.029.lcssa)
  %.not52 = icmp eq i64 %.029.lcssa, 0
  br i1 %.not52, label %.preheader, label %.lr.ph44

.lr.ph:                                           ; preds = %1, %.lr.ph
  %.02940 = phi i32 [ %11, %.lr.ph ], [ 0, %1 ]
  %.03039 = phi i64 [ %12, %.lr.ph ], [ 0, %1 ]
  %8 = tail call noundef nonnull align 4 dereferenceable(28) ptr @_ZN8ImVectorIN6ImFont5GlyphEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %.03039)
  %9 = load i16, ptr %8, align 4, !tbaa !5
  %10 = zext i16 %9 to i32
  %11 = tail call noundef i32 @_ZL5ImMaxii(i32 noundef %.02940, i32 noundef %10)
  %12 = add i64 %.03039, 1
  %13 = tail call noundef i64 @_ZNK8ImVectorIN6ImFont5GlyphEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %2)
  %.not = icmp eq i64 %12, %13
  br i1 %.not, label %._crit_edge.loopexit, label %.lr.ph, !llvm.loop !11

.preheader:                                       ; preds = %.lr.ph44, %._crit_edge
  %14 = tail call noundef i64 @_ZNK8ImVectorIN6ImFont5GlyphEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %2)
  %.not53 = icmp eq i64 %14, 0
  br i1 %.not53, label %._crit_edge47, label %.lr.ph46

.lr.ph44:                                         ; preds = %._crit_edge, %.lr.ph44
  %.03242 = phi i64 [ %17, %.lr.ph44 ], [ 0, %._crit_edge ]
  %15 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZN8ImVectorIfEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %.03242)
  store float -1.000000e+00, ptr %15, align 4, !tbaa !13
  %16 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZN8ImVectorIiEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %.03242)
  store i32 -1, ptr %16, align 4, !tbaa !14
  %17 = add nuw i64 %.03242, 1
  %exitcond.not = icmp eq i64 %17, %.029.lcssa
  br i1 %exitcond.not, label %.preheader, label %.lr.ph44, !llvm.loop !16

._crit_edge47:                                    ; preds = %.lr.ph46, %.preheader
  %18 = tail call noundef ptr @_ZNK6ImFont9FindGlyphEt(ptr noundef nonnull align 8 dereferenceable(120) %0, i16 noundef zeroext 32)
  %.not35 = icmp eq ptr %18, null
  br i1 %.not35, label %52, label %32

.lr.ph46:                                         ; preds = %.preheader, %.lr.ph46
  %.03145 = phi i64 [ %29, %.lr.ph46 ], [ 0, %.preheader ]
  %19 = tail call noundef nonnull align 4 dereferenceable(28) ptr @_ZN8ImVectorIN6ImFont5GlyphEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %.03145)
  %20 = load i16, ptr %19, align 4, !tbaa !5
  %21 = zext i16 %20 to i64
  %22 = tail call noundef nonnull align 4 dereferenceable(28) ptr @_ZN8ImVectorIN6ImFont5GlyphEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %.03145)
  %23 = getelementptr inbounds i8, ptr %22, i64 2
  %24 = load i16, ptr %23, align 2, !tbaa !17
  %25 = sitofp i16 %24 to float
  %26 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZN8ImVectorIfEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %21)
  store float %25, ptr %26, align 4, !tbaa !13
  %27 = trunc i64 %.03145 to i32
  %28 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZN8ImVectorIiEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %21)
  store i32 %27, ptr %28, align 4, !tbaa !14
  %29 = add nuw i64 %.03145, 1
  %30 = tail call noundef i64 @_ZNK8ImVectorIN6ImFont5GlyphEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %2)
  %31 = icmp ult i64 %29, %30
  br i1 %31, label %.lr.ph46, label %._crit_edge47, !llvm.loop !18

32:                                               ; preds = %._crit_edge47
  %33 = tail call noundef nonnull align 4 dereferenceable(28) ptr @_ZN8ImVectorIN6ImFont5GlyphEE4backEv(ptr noundef nonnull align 8 dereferenceable(24) %2)
  %34 = load i16, ptr %33, align 4, !tbaa !5
  %.not36 = icmp eq i16 %34, 9
  br i1 %.not36, label %38, label %35

35:                                               ; preds = %32
  %36 = tail call noundef i64 @_ZNK8ImVectorIN6ImFont5GlyphEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %2)
  %37 = add i64 %36, 1
  tail call void @_ZN8ImVectorIN6ImFont5GlyphEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %37)
  br label %38

38:                                               ; preds = %35, %32
  %39 = tail call noundef nonnull align 4 dereferenceable(28) ptr @_ZN8ImVectorIN6ImFont5GlyphEE4backEv(ptr noundef nonnull align 8 dereferenceable(24) %2)
  %40 = tail call noundef ptr @_ZNK6ImFont9FindGlyphEt(ptr noundef nonnull align 8 dereferenceable(120) %0, i16 noundef zeroext 32)
  tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(28) %39, ptr noundef nonnull align 4 dereferenceable(28) %40, i64 28, i1 false), !tbaa.struct !19
  store i16 9, ptr %39, align 4, !tbaa !5
  %41 = getelementptr inbounds i8, ptr %39, i64 2
  %42 = load i16, ptr %41, align 2, !tbaa !17
  %43 = shl i16 %42, 2
  store i16 %43, ptr %41, align 2, !tbaa !17
  %44 = sitofp i16 %43 to float
  %45 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZN8ImVectorIfEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef 9)
  store float %44, ptr %45, align 4, !tbaa !13
  %46 = tail call noundef i64 @_ZNK8ImVectorIN6ImFont5GlyphEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %2)
  %47 = trunc i64 %46 to i32
  %48 = add i32 %47, -1
  %49 = load i16, ptr %39, align 4, !tbaa !5
  %50 = zext i16 %49 to i64
  %51 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZN8ImVectorIiEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %50)
  store i32 %48, ptr %51, align 4, !tbaa !14
  br label %52

52:                                               ; preds = %38, %._crit_edge47
  %53 = getelementptr inbounds i8, ptr %0, i64 56
  store ptr null, ptr %53, align 8, !tbaa !21
  %54 = getelementptr inbounds i8, ptr %0, i64 16
  %55 = load i16, ptr %54, align 8, !tbaa !29
  %56 = tail call noundef ptr @_ZNK6ImFont9FindGlyphEt(ptr noundef nonnull align 8 dereferenceable(120) %0, i16 noundef zeroext %55)
  store ptr %56, ptr %53, align 8, !tbaa !21
  %.not37 = icmp eq ptr %56, null
  br i1 %.not37, label %61, label %57

57:                                               ; preds = %52
  %58 = getelementptr inbounds i8, ptr %56, i64 2
  %59 = load i16, ptr %58, align 2, !tbaa !17
  %60 = sitofp i16 %59 to float
  br label %61

61:                                               ; preds = %52, %57
  %62 = phi float [ %60, %57 ], [ 0.000000e+00, %52 ]
  %63 = getelementptr inbounds i8, ptr %0, i64 64
  store float %62, ptr %63, align 8, !tbaa !30
  br i1 %.not52, label %._crit_edge51, label %.lr.ph50

._crit_edge51:                                    ; preds = %70, %61
  ret void

.lr.ph50:                                         ; preds = %61, %70
  %.048 = phi i64 [ %71, %70 ], [ 0, %61 ]
  %64 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZN8ImVectorIfEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %.048)
  %65 = load float, ptr %64, align 4, !tbaa !13
  %66 = fcmp olt float %65, 0.000000e+00
  br i1 %66, label %67, label %70

67:                                               ; preds = %.lr.ph50
  %68 = load float, ptr %63, align 8, !tbaa !30
  %69 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZN8ImVectorIfEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %.048)
  store float %68, ptr %69, align 4, !tbaa !13
  br label %70

70:                                               ; preds = %.lr.ph50, %67
  %71 = add nuw i64 %.048, 1
  %exitcond55.not = icmp eq i64 %71, %.029.lcssa
  br i1 %exitcond55.not, label %._crit_edge51, label %.lr.ph50, !llvm.loop !31
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN8ImVectorIfE5clearEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN8ImVectorIiE5clearEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN8ImVectorIiE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZNK6ImFont9FindGlyphEt(ptr noundef nonnull align 8 dereferenceable(120), i16 noundef zeroext) local_unnamed_addr #3 align 2

attributes #0 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }

!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 = !{!"_ZTSN6ImFont5GlyphE", !7, i64 0, !7, i64 2, !7, i64 4, !7, i64 6, !7, i64 8, !7, i64 10, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24}
!7 = !{!"short", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"float", !8, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!10, !10, i64 0}
!14 = !{!15, !15, i64 0}
!15 = !{!"int", !8, i64 0}
!16 = distinct !{!16, !12}
!17 = !{!6, !7, i64 2}
!18 = distinct !{!18, !12}
!19 = !{i64 0, i64 2, !20, i64 2, i64 2, !20, i64 4, i64 2, !20, i64 6, i64 2, !20, i64 8, i64 2, !20, i64 10, i64 2, !20, i64 12, i64 4, !13, i64 16, i64 4, !13, i64 20, i64 4, !13, i64 24, i64 4, !13}
!20 = !{!7, !7, i64 0}
!21 = !{!22, !24, i64 56}
!22 = !{!"_ZTS6ImFont", !10, i64 0, !10, i64 4, !23, i64 8, !7, i64 16, !24, i64 24, !25, i64 32, !24, i64 56, !10, i64 64, !27, i64 72, !28, i64 96}
!23 = !{!"_ZTS6ImVec2", !10, i64 0, !10, i64 4}
!24 = !{!"any pointer", !8, i64 0}
!25 = !{!"_ZTS8ImVectorIN6ImFont5GlyphEE", !26, i64 0, !26, i64 8, !24, i64 16}
!26 = !{!"long", !8, i64 0}
!27 = !{!"_ZTS8ImVectorIfE", !26, i64 0, !26, i64 8, !24, i64 16}
!28 = !{!"_ZTS8ImVectorIiE", !26, i64 0, !26, i64 8, !24, i64 16}
!29 = !{!22, !7, i64 16}
!30 = !{!22, !10, i64 64}
!31 = distinct !{!31, !12}


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