; LLVM IR from Devaniti/BoolkaEngine :: ThirdParty/imgui/imgui_draw.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 <{ %struct.ImVector.6, float, float, %struct.ImVector.0, %struct.ImVector.7, ptr, ptr, ptr, i16, i16, i16, i8, i8, float, float, float, i32, [2 x i8], [6 x i8] }>
%struct.ImVector.6 = type { i32, i32, ptr }
%struct.ImVector.0 = type { i32, i32, ptr }
%struct.ImVector.7 = type { i32, i32, ptr }
%struct.ImFontGlyph = type { i32, float, float, float, float, float, float, float, float, float }

@.str.1 = external hidden unnamed_addr constant [87 x i8], align 1
@.str.38 = external hidden unnamed_addr constant [21 x i8], align 1
@__PRETTY_FUNCTION__._ZN6ImFont16BuildLookupTableEv = external hidden unnamed_addr constant [32 x i8], align 1

; 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: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #2

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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #4

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

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

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

11:                                               ; preds = %26, %1
  %12 = load i32, ptr %4, align 4, !tbaa !9
  %13 = getelementptr inbounds %struct.ImFont, ptr %10, i32 0, i32 4
  %14 = getelementptr inbounds %struct.ImVector.7, ptr %13, i32 0, i32 0
  %15 = load i32, ptr %14, align 8, !tbaa !11
  %16 = icmp ne i32 %12, %15
  br i1 %16, label %18, label %17

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

18:                                               ; preds = %11
  %19 = load i32, ptr %3, align 4, !tbaa !9
  %20 = getelementptr inbounds %struct.ImFont, ptr %10, i32 0, i32 4
  %21 = load i32, ptr %4, align 4, !tbaa !9
  %22 = call noundef nonnull align 4 dereferenceable(40) ptr @_ZN8ImVectorI11ImFontGlyphEixEi(ptr noundef nonnull align 8 dereferenceable(16) %20, i32 noundef %21)
  %23 = load i32, ptr %22, align 4
  %24 = and i32 %23, 2147483647
  %25 = call noundef i32 @_ZL5ImMaxIiET_S0_S0_(i32 noundef %19, i32 noundef %24)
  store i32 %25, ptr %3, align 4, !tbaa !9
  br label %26

26:                                               ; preds = %18
  %27 = load i32, ptr %4, align 4, !tbaa !9
  %28 = add nsw i32 %27, 1
  store i32 %28, ptr %4, align 4, !tbaa !9
  br label %11, !llvm.loop !19

29:                                               ; preds = %17
  %30 = getelementptr inbounds %struct.ImFont, ptr %10, i32 0, i32 4
  %31 = getelementptr inbounds %struct.ImVector.7, ptr %30, i32 0, i32 0
  %32 = load i32, ptr %31, align 8, !tbaa !11
  %33 = icmp slt i32 %32, 65535
  br i1 %33, label %34, label %35

34:                                               ; preds = %29
  br label %37

35:                                               ; preds = %29
  call void @__assert_fail(ptr noundef @.str.38, ptr noundef @.str.1, i32 noundef 2903, ptr noundef @__PRETTY_FUNCTION__._ZN6ImFont16BuildLookupTableEv) #9
  unreachable

36:                                               ; No predecessors!
  br label %37

37:                                               ; preds = %36, %34
  %38 = getelementptr inbounds %struct.ImFont, ptr %10, i32 0, i32 0
  call void @_ZN8ImVectorIfE5clearEv(ptr noundef nonnull align 8 dereferenceable(16) %38)
  %39 = getelementptr inbounds %struct.ImFont, ptr %10, i32 0, i32 3
  call void @_ZN8ImVectorItE5clearEv(ptr noundef nonnull align 8 dereferenceable(16) %39)
  %40 = getelementptr inbounds %struct.ImFont, ptr %10, i32 0, i32 11
  store i8 0, ptr %40, align 2, !tbaa !21
  %41 = getelementptr inbounds %struct.ImFont, ptr %10, i32 0, i32 17
  %42 = getelementptr inbounds [2 x i8], ptr %41, i64 0, i64 0
  call void @llvm.memset.p0.i64(ptr align 8 %42, i8 0, i64 2, i1 false)
  %43 = load i32, ptr %3, align 4, !tbaa !9
  %44 = add nsw i32 %43, 1
  call void @_ZN6ImFont9GrowIndexEi(ptr noundef nonnull align 8 dereferenceable(106) %10, i32 noundef %44)
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #8
  store i32 0, ptr %5, align 4, !tbaa !9
  br label %45

45:                                               ; preds = %85, %37
  %46 = load i32, ptr %5, align 4, !tbaa !9
  %47 = getelementptr inbounds %struct.ImFont, ptr %10, i32 0, i32 4
  %48 = getelementptr inbounds %struct.ImVector.7, ptr %47, i32 0, i32 0
  %49 = load i32, ptr %48, align 8, !tbaa !11
  %50 = icmp slt i32 %46, %49
  br i1 %50, label %52, label %51

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

52:                                               ; preds = %45
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #8
  %53 = getelementptr inbounds %struct.ImFont, ptr %10, i32 0, i32 4
  %54 = load i32, ptr %5, align 4, !tbaa !9
  %55 = call noundef nonnull align 4 dereferenceable(40) ptr @_ZN8ImVectorI11ImFontGlyphEixEi(ptr noundef nonnull align 8 dereferenceable(16) %53, i32 noundef %54)
  %56 = load i32, ptr %55, align 4
  %57 = and i32 %56, 2147483647
  store i32 %57, ptr %6, align 4, !tbaa !9
  %58 = getelementptr inbounds %struct.ImFont, ptr %10, i32 0, i32 4
  %59 = load i32, ptr %5, align 4, !tbaa !9
  %60 = call noundef nonnull align 4 dereferenceable(40) ptr @_ZN8ImVectorI11ImFontGlyphEixEi(ptr noundef nonnull align 8 dereferenceable(16) %58, i32 noundef %59)
  %61 = getelementptr inbounds %struct.ImFontGlyph, ptr %60, i32 0, i32 1
  %62 = load float, ptr %61, align 4, !tbaa !22
  %63 = getelementptr inbounds %struct.ImFont, ptr %10, i32 0, i32 0
  %64 = load i32, ptr %6, align 4, !tbaa !9
  %65 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN8ImVectorIfEixEi(ptr noundef nonnull align 8 dereferenceable(16) %63, i32 noundef %64)
  store float %62, ptr %65, align 4, !tbaa !24
  %66 = load i32, ptr %5, align 4, !tbaa !9
  %67 = trunc i32 %66 to i16
  %68 = getelementptr inbounds %struct.ImFont, ptr %10, i32 0, i32 3
  %69 = load i32, ptr %6, align 4, !tbaa !9
  %70 = call noundef nonnull align 2 dereferenceable(2) ptr @_ZN8ImVectorItEixEi(ptr noundef nonnull align 8 dereferenceable(16) %68, i32 noundef %69)
  store i16 %67, ptr %70, align 2, !tbaa !25
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #8
  %71 = load i32, ptr %6, align 4, !tbaa !9
  %72 = sdiv i32 %71, 4096
  store i32 %72, ptr %7, align 4, !tbaa !9
  %73 = load i32, ptr %7, align 4, !tbaa !9
  %74 = and i32 %73, 7
  %75 = shl i32 1, %74
  %76 = getelementptr inbounds %struct.ImFont, ptr %10, i32 0, i32 17
  %77 = load i32, ptr %7, align 4, !tbaa !9
  %78 = ashr i32 %77, 3
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds [2 x i8], ptr %76, i64 0, i64 %79
  %81 = load i8, ptr %80, align 1, !tbaa !26
  %82 = zext i8 %81 to i32
  %83 = or i32 %82, %75
  %84 = trunc i32 %83 to i8
  store i8 %84, ptr %80, align 1, !tbaa !26
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #8
  br label %85

85:                                               ; preds = %52
  %86 = load i32, ptr %5, align 4, !tbaa !9
  %87 = add nsw i32 %86, 1
  store i32 %87, ptr %5, align 4, !tbaa !9
  br label %45, !llvm.loop !27

88:                                               ; preds = %51
  %89 = call noundef ptr @_ZNK6ImFont9FindGlyphEt(ptr noundef nonnull align 8 dereferenceable(106) %10, i16 noundef zeroext 32)
  %90 = icmp ne ptr %89, null
  br i1 %90, label %91, label %134

91:                                               ; preds = %88
  %92 = getelementptr inbounds %struct.ImFont, ptr %10, i32 0, i32 4
  %93 = call noundef nonnull align 4 dereferenceable(40) ptr @_ZN8ImVectorI11ImFontGlyphE4backEv(ptr noundef nonnull align 8 dereferenceable(16) %92)
  %94 = load i32, ptr %93, align 4
  %95 = and i32 %94, 2147483647
  %96 = icmp ne i32 %95, 9
  br i1 %96, label %97, label %103

97:                                               ; preds = %91
  %98 = getelementptr inbounds %struct.ImFont, ptr %10, i32 0, i32 4
  %99 = getelementptr inbounds %struct.ImFont, ptr %10, i32 0, i32 4
  %100 = getelementptr inbounds %struct.ImVector.7, ptr %99, i32 0, i32 0
  %101 = load i32, ptr %100, align 8, !tbaa !11
  %102 = add nsw i32 %101, 1
  call void @_ZN8ImVectorI11ImFontGlyphE6resizeEi(ptr noundef nonnull align 8 dereferenceable(16) %98, i32 noundef %102)
  br label %103

103:                                              ; preds = %97, %91
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #8
  %104 = getelementptr inbounds %struct.ImFont, ptr %10, i32 0, i32 4
  %105 = call noundef nonnull align 4 dereferenceable(40) ptr @_ZN8ImVectorI11ImFontGlyphE4backEv(ptr noundef nonnull align 8 dereferenceable(16) %104)
  store ptr %105, ptr %8, align 8, !tbaa !5
  %106 = call noundef ptr @_ZNK6ImFont9FindGlyphEt(ptr noundef nonnull align 8 dereferenceable(106) %10, i16 noundef zeroext 32)
  %107 = load ptr, ptr %8, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %107, ptr align 4 %106, i64 40, i1 false), !tbaa.struct !28
  %108 = load ptr, ptr %8, align 8, !tbaa !5
  %109 = load i32, ptr %108, align 4
  %110 = and i32 %109, -2147483648
  %111 = or i32 %110, 9
  store i32 %111, ptr %108, align 4
  %112 = load ptr, ptr %8, align 8, !tbaa !5
  %113 = getelementptr inbounds %struct.ImFontGlyph, ptr %112, i32 0, i32 1
  %114 = load float, ptr %113, align 4, !tbaa !22
  %115 = fmul float %114, 4.000000e+00
  store float %115, ptr %113, align 4, !tbaa !22
  %116 = load ptr, ptr %8, align 8, !tbaa !5
  %117 = getelementptr inbounds %struct.ImFontGlyph, ptr %116, i32 0, i32 1
  %118 = load float, ptr %117, align 4, !tbaa !22
  %119 = getelementptr inbounds %struct.ImFont, ptr %10, i32 0, i32 0
  %120 = load ptr, ptr %8, align 8, !tbaa !5
  %121 = load i32, ptr %120, align 4
  %122 = and i32 %121, 2147483647
  %123 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN8ImVectorIfEixEi(ptr noundef nonnull align 8 dereferenceable(16) %119, i32 noundef %122)
  store float %118, ptr %123, align 4, !tbaa !24
  %124 = getelementptr inbounds %struct.ImFont, ptr %10, i32 0, i32 4
  %125 = getelementptr inbounds %struct.ImVector.7, ptr %124, i32 0, i32 0
  %126 = load i32, ptr %125, align 8, !tbaa !11
  %127 = sub nsw i32 %126, 1
  %128 = trunc i32 %127 to i16
  %129 = getelementptr inbounds %struct.ImFont, ptr %10, i32 0, i32 3
  %130 = load ptr, ptr %8, align 8, !tbaa !5
  %131 = load i32, ptr %130, align 4
  %132 = and i32 %131, 2147483647
  %133 = call noundef nonnull align 2 dereferenceable(2) ptr @_ZN8ImVectorItEixEi(ptr noundef nonnull align 8 dereferenceable(16) %129, i32 noundef %132)
  store i16 %128, ptr %133, align 2, !tbaa !25
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #8
  br label %134

134:                                              ; preds = %103, %88
  call void @_ZN6ImFont15SetGlyphVisibleEtb(ptr noundef nonnull align 8 dereferenceable(106) %10, i16 noundef zeroext 32, i1 noundef zeroext false)
  call void @_ZN6ImFont15SetGlyphVisibleEtb(ptr noundef nonnull align 8 dereferenceable(106) %10, i16 noundef zeroext 9, i1 noundef zeroext false)
  %135 = getelementptr inbounds %struct.ImFont, ptr %10, i32 0, i32 9
  %136 = load i16, ptr %135, align 2, !tbaa !29
  %137 = call noundef ptr @_ZNK6ImFont19FindGlyphNoFallbackEt(ptr noundef nonnull align 8 dereferenceable(106) %10, i16 noundef zeroext %136)
  %138 = getelementptr inbounds %struct.ImFont, ptr %10, i32 0, i32 5
  store ptr %137, ptr %138, align 8, !tbaa !30
  %139 = getelementptr inbounds %struct.ImFont, ptr %10, i32 0, i32 5
  %140 = load ptr, ptr %139, align 8, !tbaa !30
  %141 = icmp ne ptr %140, null
  br i1 %141, label %142, label %147

142:                                              ; preds = %134
  %143 = getelementptr inbounds %struct.ImFont, ptr %10, i32 0, i32 5
  %144 = load ptr, ptr %143, align 8, !tbaa !30
  %145 = getelementptr inbounds %struct.ImFontGlyph, ptr %144, i32 0, i32 1
  %146 = load float, ptr %145, align 4, !tbaa !22
  br label %148

147:                                              ; preds = %134
  br label %148

148:                                              ; preds = %147, %142
  %149 = phi float [ %146, %142 ], [ 0.000000e+00, %147 ]
  %150 = getelementptr inbounds %struct.ImFont, ptr %10, i32 0, i32 1
  store float %149, ptr %150, align 8, !tbaa !31
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #8
  store i32 0, ptr %9, align 4, !tbaa !9
  br label %151

151:                                              ; preds = %170, %148
  %152 = load i32, ptr %9, align 4, !tbaa !9
  %153 = load i32, ptr %3, align 4, !tbaa !9
  %154 = add nsw i32 %153, 1
  %155 = icmp slt i32 %152, %154
  br i1 %155, label %157, label %156

156:                                              ; preds = %151
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #8
  br label %173

157:                                              ; preds = %151
  %158 = getelementptr inbounds %struct.ImFont, ptr %10, i32 0, i32 0
  %159 = load i32, ptr %9, align 4, !tbaa !9
  %160 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN8ImVectorIfEixEi(ptr noundef nonnull align 8 dereferenceable(16) %158, i32 noundef %159)
  %161 = load float, ptr %160, align 4, !tbaa !24
  %162 = fcmp olt float %161, 0.000000e+00
  br i1 %162, label %163, label %169

163:                                              ; preds = %157
  %164 = getelementptr inbounds %struct.ImFont, ptr %10, i32 0, i32 1
  %165 = load float, ptr %164, align 8, !tbaa !31
  %166 = getelementptr inbounds %struct.ImFont, ptr %10, i32 0, i32 0
  %167 = load i32, ptr %9, align 4, !tbaa !9
  %168 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN8ImVectorIfEixEi(ptr noundef nonnull align 8 dereferenceable(16) %166, i32 noundef %167)
  store float %165, ptr %168, align 4, !tbaa !24
  br label %169

169:                                              ; preds = %163, %157
  br label %170

170:                                              ; preds = %169
  %171 = load i32, ptr %9, align 4, !tbaa !9
  %172 = add nsw i32 %171, 1
  store i32 %172, ptr %9, align 4, !tbaa !9
  br label %151, !llvm.loop !32

173:                                              ; preds = %156
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #8
  ret void
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNK6ImFont19FindGlyphNoFallbackEt(ptr noundef nonnull align 8 dereferenceable(106), i16 noundef zeroext) #7 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6ImFont9GrowIndexEi(ptr noundef nonnull align 8 dereferenceable(106), i32 noundef) #6 align 2

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(40) ptr @_ZN8ImVectorI11ImFontGlyphE4backEv(ptr noundef nonnull align 8 dereferenceable(16)) #5 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN8ImVectorI11ImFontGlyphE6resizeEi(ptr noundef nonnull align 8 dereferenceable(16), i32 noundef) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6ImFont15SetGlyphVisibleEtb(ptr noundef nonnull align 8 dereferenceable(106), i16 noundef zeroext, i1 noundef zeroext) #6 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { 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 #4 = { noreturn nounwind "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 = { 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 #6 = { 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 #7 = { 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 #8 = { nounwind }
attributes #9 = { noreturn 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, !10, i64 40}
!12 = !{!"_ZTS6ImFont", !13, i64 0, !14, i64 16, !14, 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, !18, i64 86, !14, i64 88, !14, i64 92, !14, i64 96, !10, i64 100, !7, i64 104}
!13 = !{!"_ZTS8ImVectorIfE", !10, i64 0, !10, i64 4, !6, i64 8}
!14 = !{!"float", !7, i64 0}
!15 = !{!"_ZTS8ImVectorItE", !10, i64 0, !10, i64 4, !6, i64 8}
!16 = !{!"_ZTS8ImVectorI11ImFontGlyphE", !10, i64 0, !10, i64 4, !6, i64 8}
!17 = !{!"short", !7, i64 0}
!18 = !{!"bool", !7, i64 0}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = !{!12, !18, i64 86}
!22 = !{!23, !14, i64 4}
!23 = !{!"_ZTS11ImFontGlyph", !10, i64 0, !10, i64 3, !14, i64 4, !14, i64 8, !14, i64 12, !14, i64 16, !14, i64 20, !14, i64 24, !14, i64 28, !14, i64 32, !14, i64 36}
!24 = !{!14, !14, i64 0}
!25 = !{!17, !17, i64 0}
!26 = !{!7, !7, i64 0}
!27 = distinct !{!27, !20}
!28 = !{i64 0, i64 4, !26, i64 4, i64 4, !24, i64 8, i64 4, !24, i64 12, i64 4, !24, i64 16, i64 4, !24, i64 20, i64 4, !24, i64 24, i64 4, !24, i64 28, i64 4, !24, i64 32, i64 4, !24, i64 36, i64 4, !24}
!29 = !{!12, !17, i64 82}
!30 = !{!12, !6, i64 56}
!31 = !{!12, !14, i64 16}
!32 = distinct !{!32, !20}


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

@.str.1 = external hidden unnamed_addr constant [87 x i8], align 1
@.str.38 = external hidden unnamed_addr constant [21 x i8], align 1
@__PRETTY_FUNCTION__._ZN6ImFont16BuildLookupTableEv = external hidden unnamed_addr constant [32 x i8], align 1

; 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 @_ZN8ImVectorItE5clearEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #1 align 2

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #2

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6ImFont16BuildLookupTableEv(ptr noundef nonnull align 8 dereferenceable(106) %0) local_unnamed_addr #4 align 2 {
  %2 = getelementptr inbounds i8, ptr %0, i64 40
  %3 = load i32, ptr %2, align 8, !tbaa !5
  %.not36 = icmp eq i32 %3, 0
  br i1 %.not36, label %._crit_edge.thread, label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph
  %4 = icmp ult i32 %.02737, 65534
  br i1 %4, label %._crit_edge.thread, label %11

.lr.ph:                                           ; preds = %1, %.lr.ph
  %.02638 = phi i32 [ %8, %.lr.ph ], [ 0, %1 ]
  %.02737 = phi i32 [ %9, %.lr.ph ], [ 0, %1 ]
  %5 = tail call noundef nonnull align 4 dereferenceable(40) ptr @_ZN8ImVectorI11ImFontGlyphEixEi(ptr noundef nonnull align 8 dereferenceable(16) %2, i32 noundef %.02737)
  %6 = load i32, ptr %5, align 4
  %7 = and i32 %6, 2147483647
  %8 = tail call noundef i32 @_ZL5ImMaxIiET_S0_S0_(i32 noundef %.02638, i32 noundef %7)
  %9 = add nuw nsw i32 %.02737, 1
  %10 = load i32, ptr %2, align 8, !tbaa !5
  %.not = icmp eq i32 %9, %10
  br i1 %.not, label %._crit_edge, label %.lr.ph, !llvm.loop !17

11:                                               ; preds = %._crit_edge
  tail call void @__assert_fail(ptr noundef nonnull @.str.38, ptr noundef nonnull @.str.1, i32 noundef 2903, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN6ImFont16BuildLookupTableEv) #6
  unreachable

._crit_edge.thread:                               ; preds = %1, %._crit_edge
  %.026.lcssa54 = phi i32 [ %8, %._crit_edge ], [ 0, %1 ]
  tail call void @_ZN8ImVectorIfE5clearEv(ptr noundef nonnull align 8 dereferenceable(16) %0)
  %12 = getelementptr inbounds i8, ptr %0, i64 24
  tail call void @_ZN8ImVectorItE5clearEv(ptr noundef nonnull align 8 dereferenceable(16) %12)
  %13 = getelementptr inbounds i8, ptr %0, i64 86
  store i8 0, ptr %13, align 2, !tbaa !19
  %14 = getelementptr inbounds i8, ptr %0, i64 104
  store i16 0, ptr %14, align 8
  %15 = add i32 %.026.lcssa54, 1
  tail call void @_ZN6ImFont9GrowIndexEi(ptr noundef nonnull align 8 dereferenceable(106) %0, i32 noundef %15)
  %16 = load i32, ptr %2, align 8, !tbaa !5
  %17 = icmp sgt i32 %16, 0
  br i1 %17, label %.lr.ph43, label %._crit_edge44

._crit_edge44:                                    ; preds = %.lr.ph43, %._crit_edge.thread
  %18 = tail call noundef ptr @_ZNK6ImFont9FindGlyphEt(ptr noundef nonnull align 8 dereferenceable(106) %0, i16 noundef zeroext 32)
  %.not31 = icmp eq ptr %18, null
  br i1 %.not31, label %63, label %40

.lr.ph43:                                         ; preds = %._crit_edge.thread, %.lr.ph43
  %.02841 = phi i32 [ %37, %.lr.ph43 ], [ 0, %._crit_edge.thread ]
  %19 = tail call noundef nonnull align 4 dereferenceable(40) ptr @_ZN8ImVectorI11ImFontGlyphEixEi(ptr noundef nonnull align 8 dereferenceable(16) %2, i32 noundef %.02841)
  %20 = load i32, ptr %19, align 4
  %21 = and i32 %20, 2147483647
  %22 = tail call noundef nonnull align 4 dereferenceable(40) ptr @_ZN8ImVectorI11ImFontGlyphEixEi(ptr noundef nonnull align 8 dereferenceable(16) %2, i32 noundef %.02841)
  %23 = getelementptr inbounds i8, ptr %22, i64 4
  %24 = load float, ptr %23, align 4, !tbaa !20
  %25 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZN8ImVectorIfEixEi(ptr noundef nonnull align 8 dereferenceable(16) %0, i32 noundef %21)
  store float %24, ptr %25, align 4, !tbaa !22
  %26 = trunc i32 %.02841 to i16
  %27 = tail call noundef nonnull align 2 dereferenceable(2) ptr @_ZN8ImVectorItEixEi(ptr noundef nonnull align 8 dereferenceable(16) %12, i32 noundef %21)
  store i16 %26, ptr %27, align 2, !tbaa !23
  %28 = lshr i32 %20, 12
  %29 = and i32 %28, 7
  %30 = shl nuw nsw i32 1, %29
  %31 = lshr i32 %21, 15
  %32 = zext nneg i32 %31 to i64
  %33 = getelementptr inbounds [2 x i8], ptr %14, i64 0, i64 %32
  %34 = load i8, ptr %33, align 1, !tbaa !24
  %35 = trunc nuw i32 %30 to i8
  %36 = or i8 %34, %35
  store i8 %36, ptr %33, align 1, !tbaa !24
  %37 = add nuw nsw i32 %.02841, 1
  %38 = load i32, ptr %2, align 8, !tbaa !5
  %39 = icmp slt i32 %37, %38
  br i1 %39, label %.lr.ph43, label %._crit_edge44, !llvm.loop !25

40:                                               ; preds = %._crit_edge44
  %41 = tail call noundef nonnull align 4 dereferenceable(40) ptr @_ZN8ImVectorI11ImFontGlyphE4backEv(ptr noundef nonnull align 8 dereferenceable(16) %2)
  %42 = load i32, ptr %41, align 4
  %43 = and i32 %42, 2147483647
  %.not32 = icmp eq i32 %43, 9
  br i1 %.not32, label %47, label %44

44:                                               ; preds = %40
  %45 = load i32, ptr %2, align 8, !tbaa !5
  %46 = add nsw i32 %45, 1
  tail call void @_ZN8ImVectorI11ImFontGlyphE6resizeEi(ptr noundef nonnull align 8 dereferenceable(16) %2, i32 noundef %46)
  br label %47

47:                                               ; preds = %44, %40
  %48 = tail call noundef nonnull align 4 dereferenceable(40) ptr @_ZN8ImVectorI11ImFontGlyphE4backEv(ptr noundef nonnull align 8 dereferenceable(16) %2)
  %49 = tail call noundef ptr @_ZNK6ImFont9FindGlyphEt(ptr noundef nonnull align 8 dereferenceable(106) %0, i16 noundef zeroext 32)
  tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(40) %48, ptr noundef nonnull align 4 dereferenceable(40) %49, i64 40, i1 false), !tbaa.struct !26
  %50 = load i32, ptr %48, align 4
  %51 = and i32 %50, -2147483648
  %52 = or disjoint i32 %51, 9
  store i32 %52, ptr %48, align 4
  %53 = getelementptr inbounds i8, ptr %48, i64 4
  %54 = load float, ptr %53, align 4, !tbaa !20
  %55 = fmul float %54, 4.000000e+00
  store float %55, ptr %53, align 4, !tbaa !20
  %56 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZN8ImVectorIfEixEi(ptr noundef nonnull align 8 dereferenceable(16) %0, i32 noundef 9)
  store float %55, ptr %56, align 4, !tbaa !22
  %57 = load i32, ptr %2, align 8, !tbaa !5
  %58 = trunc i32 %57 to i16
  %59 = add i16 %58, -1
  %60 = load i32, ptr %48, align 4
  %61 = and i32 %60, 2147483647
  %62 = tail call noundef nonnull align 2 dereferenceable(2) ptr @_ZN8ImVectorItEixEi(ptr noundef nonnull align 8 dereferenceable(16) %12, i32 noundef %61)
  store i16 %59, ptr %62, align 2, !tbaa !23
  br label %63

63:                                               ; preds = %47, %._crit_edge44
  tail call void @_ZN6ImFont15SetGlyphVisibleEtb(ptr noundef nonnull align 8 dereferenceable(106) %0, i16 noundef zeroext 32, i1 noundef zeroext false)
  tail call void @_ZN6ImFont15SetGlyphVisibleEtb(ptr noundef nonnull align 8 dereferenceable(106) %0, i16 noundef zeroext 9, i1 noundef zeroext false)
  %64 = getelementptr inbounds i8, ptr %0, i64 82
  %65 = load i16, ptr %64, align 2, !tbaa !27
  %66 = tail call noundef ptr @_ZNK6ImFont19FindGlyphNoFallbackEt(ptr noundef nonnull align 8 dereferenceable(106) %0, i16 noundef zeroext %65)
  %67 = getelementptr inbounds i8, ptr %0, i64 56
  store ptr %66, ptr %67, align 8, !tbaa !28
  %.not33 = icmp eq ptr %66, null
  br i1 %.not33, label %71, label %68

68:                                               ; preds = %63
  %69 = getelementptr inbounds i8, ptr %66, i64 4
  %70 = load float, ptr %69, align 4, !tbaa !20
  br label %71

71:                                               ; preds = %63, %68
  %72 = phi float [ %70, %68 ], [ 0.000000e+00, %63 ]
  %73 = getelementptr inbounds i8, ptr %0, i64 16
  store float %72, ptr %73, align 8, !tbaa !29
  %.not3445 = icmp slt i32 %.026.lcssa54, 0
  br i1 %.not3445, label %._crit_edge49, label %.lr.ph48

._crit_edge49:                                    ; preds = %80, %71
  ret void

.lr.ph48:                                         ; preds = %71, %80
  %.046 = phi i32 [ %81, %80 ], [ 0, %71 ]
  %74 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZN8ImVectorIfEixEi(ptr noundef nonnull align 8 dereferenceable(16) %0, i32 noundef %.046)
  %75 = load float, ptr %74, align 4, !tbaa !22
  %76 = fcmp olt float %75, 0.000000e+00
  br i1 %76, label %77, label %80

77:                                               ; preds = %.lr.ph48
  %78 = load float, ptr %73, align 8, !tbaa !29
  %79 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZN8ImVectorIfEixEi(ptr noundef nonnull align 8 dereferenceable(16) %0, i32 noundef %.046)
  store float %78, ptr %79, align 4, !tbaa !22
  br label %80

80:                                               ; preds = %.lr.ph48, %77
  %81 = add nuw i32 %.046, 1
  %exitcond.not = icmp eq i32 %.046, %.026.lcssa54
  br i1 %exitcond.not, label %._crit_edge49, label %.lr.ph48, !llvm.loop !30
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNK6ImFont19FindGlyphNoFallbackEt(ptr noundef nonnull align 8 dereferenceable(106), i16 noundef zeroext) local_unnamed_addr #5 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6ImFont9GrowIndexEi(ptr noundef nonnull align 8 dereferenceable(106), i32 noundef) local_unnamed_addr #4 align 2

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6ImFont15SetGlyphVisibleEtb(ptr noundef nonnull align 8 dereferenceable(106), i16 noundef zeroext, i1 noundef zeroext) local_unnamed_addr #4 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 = { noreturn nounwind "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 = { 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 #6 = { noreturn 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, !8, i64 40}
!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, !16, i64 86, !12, i64 88, !12, i64 92, !12, i64 96, !8, i64 100, !9, i64 104}
!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 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = !{!6, !16, i64 86}
!20 = !{!21, !12, i64 4}
!21 = !{!"_ZTS11ImFontGlyph", !8, i64 0, !8, i64 3, !12, i64 4, !12, i64 8, !12, i64 12, !12, i64 16, !12, i64 20, !12, i64 24, !12, i64 28, !12, i64 32, !12, i64 36}
!22 = !{!12, !12, i64 0}
!23 = !{!15, !15, i64 0}
!24 = !{!9, !9, i64 0}
!25 = distinct !{!25, !18}
!26 = !{i64 0, i64 4, !24, i64 4, i64 4, !22, i64 8, i64 4, !22, i64 12, i64 4, !22, i64 16, i64 4, !22, i64 20, i64 4, !22, i64 24, i64 4, !22, i64 28, i64 4, !22, i64 32, i64 4, !22, i64 36, i64 4, !22}
!27 = !{!6, !15, i64 82}
!28 = !{!6, !11, i64 56}
!29 = !{!6, !12, i64 16}
!30 = distinct !{!30, !18}


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