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

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

%struct.ImVec2 = type { float, float }
%struct.ImFontAtlas = type <{ i32, [4 x i8], ptr, i32, i32, i8, [7 x i8], ptr, i8, i8, [6 x i8], ptr, ptr, i32, i32, %struct.ImVec2, %struct.ImVec2, %struct.ImVector.8, %struct.ImVector.9, %struct.ImVector.10, [64 x %struct.ImVec4], ptr, i32, i32, i32, [4 x i8] }>
%struct.ImVector.8 = type { i32, i32, ptr }
%struct.ImVector.9 = type { i32, i32, ptr }
%struct.ImVector.10 = type { i32, i32, ptr }
%struct.ImVec4 = type { float, float, float, float }
%struct.ImFontAtlasCustomRect = type { i16, i16, i16, i16, i32, float, %struct.ImVec2, ptr }
%struct.ImFont = type <{ %struct.ImVector.6, float, float, %struct.ImVector.1, %struct.ImVector.7, ptr, ptr, ptr, i16, i16, i16, i16, float, float, i8, [3 x i8], float, float, float, i32, [2 x i8], [2 x i8] }>
%struct.ImVector.6 = type { i32, i32, ptr }
%struct.ImVector.1 = type { i32, i32, ptr }
%struct.ImVector.7 = type { i32, i32, ptr }

@.str.1 = external hidden unnamed_addr constant [122 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [69 x i8], align 1
@__PRETTY_FUNCTION__._Z22ImFontAtlasBuildFinishP11ImFontAtlas = external hidden unnamed_addr constant [43 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [33 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 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 @_ZN6ImVec2C2Ev(ptr noundef nonnull align 4 dereferenceable(8)) unnamed_addr #1 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK11ImFontAtlas16CalcCustomRectUVEPK21ImFontAtlasCustomRectP6ImVec2S4_(ptr noundef nonnull align 8 dereferenceable(1180), ptr noundef, ptr noundef, ptr noundef) #4 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z22ImFontAtlasBuildFinishP11ImFontAtlas(ptr noundef %0) #4 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca %struct.ImVec2, align 4
  %7 = alloca %struct.ImVec2, align 4
  %8 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  %9 = load ptr, ptr %2, align 8, !tbaa !5
  %10 = getelementptr inbounds %struct.ImFontAtlas, ptr %9, i32 0, i32 11
  %11 = load ptr, ptr %10, align 8, !tbaa !9
  %12 = icmp ne ptr %11, null
  br i1 %12, label %18, label %13

13:                                               ; preds = %1
  %14 = load ptr, ptr %2, align 8, !tbaa !5
  %15 = getelementptr inbounds %struct.ImFontAtlas, ptr %14, i32 0, i32 12
  %16 = load ptr, ptr %15, align 8, !tbaa !18
  %17 = icmp ne ptr %16, null
  br label %18

18:                                               ; preds = %13, %1
  %19 = phi i1 [ true, %1 ], [ %17, %13 ]
  br i1 %19, label %20, label %21

20:                                               ; preds = %18
  br label %23

21:                                               ; preds = %18
  call void @__assert_fail(ptr noundef @.str.31, ptr noundef @.str.1, i32 noundef 2782, ptr noundef @__PRETTY_FUNCTION__._Z22ImFontAtlasBuildFinishP11ImFontAtlas) #6
  unreachable

22:                                               ; No predecessors!
  br label %23

23:                                               ; preds = %22, %20
  %24 = load ptr, ptr %2, align 8, !tbaa !5
  call void @_ZL36ImFontAtlasBuildRenderDefaultTexDataP11ImFontAtlas(ptr noundef %24)
  %25 = load ptr, ptr %2, align 8, !tbaa !5
  call void @_ZL34ImFontAtlasBuildRenderLinesTexDataP11ImFontAtlas(ptr noundef %25)
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #7
  store i32 0, ptr %3, align 4, !tbaa !19
  br label %26

26:                                               ; preds = %112, %23
  %27 = load i32, ptr %3, align 4, !tbaa !19
  %28 = load ptr, ptr %2, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct.ImFontAtlas, ptr %28, i32 0, i32 18
  %30 = getelementptr inbounds %struct.ImVector.9, ptr %29, i32 0, i32 0
  %31 = load i32, ptr %30, align 8, !tbaa !20
  %32 = icmp slt i32 %27, %31
  br i1 %32, label %34, label %33

33:                                               ; preds = %26
  store i32 2, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #7
  br label %115

34:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #7
  %35 = load ptr, ptr %2, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.ImFontAtlas, ptr %35, i32 0, i32 18
  %37 = load i32, ptr %3, align 4, !tbaa !19
  %38 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZN8ImVectorI21ImFontAtlasCustomRectEixEi(ptr noundef nonnull align 8 dereferenceable(16) %36, i32 noundef %37)
  store ptr %38, ptr %5, align 8, !tbaa !5
  %39 = load ptr, ptr %5, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.ImFontAtlasCustomRect, ptr %39, i32 0, i32 7
  %41 = load ptr, ptr %40, align 8, !tbaa !21
  %42 = icmp eq ptr %41, null
  br i1 %42, label %48, label %43

43:                                               ; preds = %34
  %44 = load ptr, ptr %5, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.ImFontAtlasCustomRect, ptr %44, i32 0, i32 4
  %46 = load i32, ptr %45, align 8, !tbaa !24
  %47 = icmp eq i32 %46, 0
  br i1 %47, label %48, label %49

48:                                               ; preds = %43, %34
  store i32 4, ptr %4, align 4
  br label %109

49:                                               ; preds = %43
  %50 = load ptr, ptr %5, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.ImFontAtlasCustomRect, ptr %50, i32 0, i32 7
  %52 = load ptr, ptr %51, align 8, !tbaa !21
  %53 = getelementptr inbounds %struct.ImFont, ptr %52, i32 0, i32 6
  %54 = load ptr, ptr %53, align 8, !tbaa !25
  %55 = load ptr, ptr %2, align 8, !tbaa !5
  %56 = icmp eq ptr %54, %55
  br i1 %56, label %57, label %58

57:                                               ; preds = %49
  br label %60

58:                                               ; preds = %49
  call void @__assert_fail(ptr noundef @.str.32, ptr noundef @.str.1, i32 noundef 2794, ptr noundef @__PRETTY_FUNCTION__._Z22ImFontAtlasBuildFinishP11ImFontAtlas) #6
  unreachable

59:                                               ; No predecessors!
  br label %60

60:                                               ; preds = %59, %57
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #7
  call void @_ZN6ImVec2C2Ev(ptr noundef nonnull align 4 dereferenceable(8) %6)
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #7
  call void @_ZN6ImVec2C2Ev(ptr noundef nonnull align 4 dereferenceable(8) %7)
  %61 = load ptr, ptr %2, align 8, !tbaa !5
  %62 = load ptr, ptr %5, align 8, !tbaa !5
  call void @_ZNK11ImFontAtlas16CalcCustomRectUVEPK21ImFontAtlasCustomRectP6ImVec2S4_(ptr noundef nonnull align 8 dereferenceable(1180) %61, ptr noundef %62, ptr noundef %6, ptr noundef %7)
  %63 = load ptr, ptr %5, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct.ImFontAtlasCustomRect, ptr %63, i32 0, i32 7
  %65 = load ptr, ptr %64, align 8, !tbaa !21
  %66 = load ptr, ptr %5, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.ImFontAtlasCustomRect, ptr %66, i32 0, i32 4
  %68 = load i32, ptr %67, align 8, !tbaa !24
  %69 = trunc i32 %68 to i16
  %70 = load ptr, ptr %5, align 8, !tbaa !5
  %71 = getelementptr inbounds %struct.ImFontAtlasCustomRect, ptr %70, i32 0, i32 6
  %72 = getelementptr inbounds %struct.ImVec2, ptr %71, i32 0, i32 0
  %73 = load float, ptr %72, align 8, !tbaa !30
  %74 = load ptr, ptr %5, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.ImFontAtlasCustomRect, ptr %74, i32 0, i32 6
  %76 = getelementptr inbounds %struct.ImVec2, ptr %75, i32 0, i32 1
  %77 = load float, ptr %76, align 4, !tbaa !31
  %78 = load ptr, ptr %5, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct.ImFontAtlasCustomRect, ptr %78, i32 0, i32 6
  %80 = getelementptr inbounds %struct.ImVec2, ptr %79, i32 0, i32 0
  %81 = load float, ptr %80, align 8, !tbaa !30
  %82 = load ptr, ptr %5, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct.ImFontAtlasCustomRect, ptr %82, i32 0, i32 0
  %84 = load i16, ptr %83, align 8, !tbaa !32
  %85 = zext i16 %84 to i32
  %86 = sitofp i32 %85 to float
  %87 = fadd float %81, %86
  %88 = load ptr, ptr %5, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct.ImFontAtlasCustomRect, ptr %88, i32 0, i32 6
  %90 = getelementptr inbounds %struct.ImVec2, ptr %89, i32 0, i32 1
  %91 = load float, ptr %90, align 4, !tbaa !31
  %92 = load ptr, ptr %5, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct.ImFontAtlasCustomRect, ptr %92, i32 0, i32 1
  %94 = load i16, ptr %93, align 2, !tbaa !33
  %95 = zext i16 %94 to i32
  %96 = sitofp i32 %95 to float
  %97 = fadd float %91, %96
  %98 = getelementptr inbounds %struct.ImVec2, ptr %6, i32 0, i32 0
  %99 = load float, ptr %98, align 4, !tbaa !34
  %100 = getelementptr inbounds %struct.ImVec2, ptr %6, i32 0, i32 1
  %101 = load float, ptr %100, align 4, !tbaa !35
  %102 = getelementptr inbounds %struct.ImVec2, ptr %7, i32 0, i32 0
  %103 = load float, ptr %102, align 4, !tbaa !34
  %104 = getelementptr inbounds %struct.ImVec2, ptr %7, i32 0, i32 1
  %105 = load float, ptr %104, align 4, !tbaa !35
  %106 = load ptr, ptr %5, align 8, !tbaa !5
  %107 = getelementptr inbounds %struct.ImFontAtlasCustomRect, ptr %106, i32 0, i32 5
  %108 = load float, ptr %107, align 4, !tbaa !36
  call void @_ZN6ImFont8AddGlyphEPK12ImFontConfigtfffffffff(ptr noundef nonnull align 8 dereferenceable(118) %65, ptr noundef null, i16 noundef zeroext %69, float noundef %73, float noundef %77, float noundef %87, float noundef %97, float noundef %99, float noundef %101, float noundef %103, float noundef %105, float noundef %108)
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  store i32 0, ptr %4, align 4
  br label %109

109:                                              ; preds = %60, %48
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #7
  %110 = load i32, ptr %4, align 4
  switch i32 %110, label %146 [
    i32 0, label %111
    i32 4, label %112
  ]

111:                                              ; preds = %109
  br label %112

112:                                              ; preds = %111, %109
  %113 = load i32, ptr %3, align 4, !tbaa !19
  %114 = add nsw i32 %113, 1
  store i32 %114, ptr %3, align 4, !tbaa !19
  br label %26, !llvm.loop !37

115:                                              ; preds = %33
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  store i32 0, ptr %8, align 4, !tbaa !19
  br label %116

116:                                              ; preds = %140, %115
  %117 = load i32, ptr %8, align 4, !tbaa !19
  %118 = load ptr, ptr %2, align 8, !tbaa !5
  %119 = getelementptr inbounds %struct.ImFontAtlas, ptr %118, i32 0, i32 17
  %120 = getelementptr inbounds %struct.ImVector.8, ptr %119, i32 0, i32 0
  %121 = load i32, ptr %120, align 8, !tbaa !39
  %122 = icmp slt i32 %117, %121
  br i1 %122, label %124, label %123

123:                                              ; preds = %116
  store i32 5, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  br label %143

124:                                              ; preds = %116
  %125 = load ptr, ptr %2, align 8, !tbaa !5
  %126 = getelementptr inbounds %struct.ImFontAtlas, ptr %125, i32 0, i32 17
  %127 = load i32, ptr %8, align 4, !tbaa !19
  %128 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN8ImVectorIP6ImFontEixEi(ptr noundef nonnull align 8 dereferenceable(16) %126, i32 noundef %127)
  %129 = load ptr, ptr %128, align 8, !tbaa !5
  %130 = getelementptr inbounds %struct.ImFont, ptr %129, i32 0, i32 14
  %131 = load i8, ptr %130, align 8, !tbaa !40, !range !41, !noundef !42
  %132 = trunc i8 %131 to i1
  br i1 %132, label %133, label %139

133:                                              ; preds = %124
  %134 = load ptr, ptr %2, align 8, !tbaa !5
  %135 = getelementptr inbounds %struct.ImFontAtlas, ptr %134, i32 0, i32 17
  %136 = load i32, ptr %8, align 4, !tbaa !19
  %137 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN8ImVectorIP6ImFontEixEi(ptr noundef nonnull align 8 dereferenceable(16) %135, i32 noundef %136)
  %138 = load ptr, ptr %137, align 8, !tbaa !5
  call void @_ZN6ImFont16BuildLookupTableEv(ptr noundef nonnull align 8 dereferenceable(118) %138)
  br label %139

139:                                              ; preds = %133, %124
  br label %140

140:                                              ; preds = %139
  %141 = load i32, ptr %8, align 4, !tbaa !19
  %142 = add nsw i32 %141, 1
  store i32 %142, ptr %8, align 4, !tbaa !19
  br label %116, !llvm.loop !43

143:                                              ; preds = %123
  %144 = load ptr, ptr %2, align 8, !tbaa !5
  %145 = getelementptr inbounds %struct.ImFontAtlas, ptr %144, i32 0, i32 8
  store i8 1, ptr %145, align 8, !tbaa !44
  ret void

146:                                              ; preds = %109
  unreachable
}

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL36ImFontAtlasBuildRenderDefaultTexDataP11ImFontAtlas(ptr noundef) #4

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL34ImFontAtlasBuildRenderLinesTexDataP11ImFontAtlas(ptr noundef) #5

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6ImFont8AddGlyphEPK12ImFontConfigtfffffffff(ptr noundef nonnull align 8 dereferenceable(118), ptr noundef, i16 noundef zeroext, float noundef, float noundef, float noundef, float noundef, float noundef, float noundef, float noundef, float noundef, float noundef) #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6ImFont16BuildLookupTableEv(ptr noundef nonnull align 8 dereferenceable(118)) #4 align 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 = { 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 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 #6 = { noreturn nounwind }
attributes #7 = { 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, !6, i64 48}
!10 = !{!"_ZTS11ImFontAtlas", !11, i64 0, !6, i64 8, !11, i64 16, !11, i64 20, !12, i64 24, !6, i64 32, !12, i64 40, !12, i64 41, !6, i64 48, !6, i64 56, !11, i64 64, !11, i64 68, !13, i64 72, !13, i64 80, !15, i64 88, !16, i64 104, !17, i64 120, !7, i64 136, !6, i64 1160, !11, i64 1168, !11, i64 1172, !11, i64 1176}
!11 = !{!"int", !7, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{!"_ZTS6ImVec2", !14, i64 0, !14, i64 4}
!14 = !{!"float", !7, i64 0}
!15 = !{!"_ZTS8ImVectorIP6ImFontE", !11, i64 0, !11, i64 4, !6, i64 8}
!16 = !{!"_ZTS8ImVectorI21ImFontAtlasCustomRectE", !11, i64 0, !11, i64 4, !6, i64 8}
!17 = !{!"_ZTS8ImVectorI12ImFontConfigE", !11, i64 0, !11, i64 4, !6, i64 8}
!18 = !{!10, !6, i64 56}
!19 = !{!11, !11, i64 0}
!20 = !{!10, !11, i64 104}
!21 = !{!22, !6, i64 24}
!22 = !{!"_ZTS21ImFontAtlasCustomRect", !23, i64 0, !23, i64 2, !23, i64 4, !23, i64 6, !11, i64 8, !14, i64 12, !13, i64 16, !6, i64 24}
!23 = !{!"short", !7, i64 0}
!24 = !{!22, !11, i64 8}
!25 = !{!26, !6, i64 64}
!26 = !{!"_ZTS6ImFont", !27, i64 0, !14, i64 16, !14, i64 20, !28, i64 24, !29, i64 40, !6, i64 56, !6, i64 64, !6, i64 72, !23, i64 80, !23, i64 82, !23, i64 84, !23, i64 86, !14, i64 88, !14, i64 92, !12, i64 96, !14, i64 100, !14, i64 104, !14, i64 108, !11, i64 112, !7, i64 116}
!27 = !{!"_ZTS8ImVectorIfE", !11, i64 0, !11, i64 4, !6, i64 8}
!28 = !{!"_ZTS8ImVectorItE", !11, i64 0, !11, i64 4, !6, i64 8}
!29 = !{!"_ZTS8ImVectorI11ImFontGlyphE", !11, i64 0, !11, i64 4, !6, i64 8}
!30 = !{!22, !14, i64 16}
!31 = !{!22, !14, i64 20}
!32 = !{!22, !23, i64 0}
!33 = !{!22, !23, i64 2}
!34 = !{!13, !14, i64 0}
!35 = !{!13, !14, i64 4}
!36 = !{!22, !14, i64 12}
!37 = distinct !{!37, !38}
!38 = !{!"llvm.loop.mustprogress"}
!39 = !{!10, !11, i64 88}
!40 = !{!26, !12, i64 96}
!41 = !{i8 0, i8 2}
!42 = !{}
!43 = distinct !{!43, !38}
!44 = !{!10, !12, i64 40}


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

@.str.1 = external hidden unnamed_addr constant [122 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [69 x i8], align 1
@__PRETTY_FUNCTION__._Z22ImFontAtlasBuildFinishP11ImFontAtlas = external hidden unnamed_addr constant [43 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [33 x i8], align 1

; 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 @_ZN6ImVec2C2Ev(ptr noundef nonnull align 4 dereferenceable(8)) 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 8 dereferenceable(8) ptr @_ZN8ImVectorIP6ImFontEixEi(ptr noundef nonnull align 8 dereferenceable(16), i32 noundef) local_unnamed_addr #3 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z22ImFontAtlasBuildFinishP11ImFontAtlas(ptr noundef %0) local_unnamed_addr #4 {
  %2 = alloca %struct.ImVec2, align 4
  %3 = alloca %struct.ImVec2, align 4
  %4 = getelementptr inbounds i8, ptr %0, i64 48
  %5 = load ptr, ptr %4, align 8, !tbaa !5
  %.not = icmp eq ptr %5, null
  br i1 %.not, label %6, label %.critedge

6:                                                ; preds = %1
  %7 = getelementptr inbounds i8, ptr %0, i64 56
  %8 = load ptr, ptr %7, align 8, !tbaa !17
  %.not34 = icmp eq ptr %8, null
  br i1 %.not34, label %9, label %.critedge

9:                                                ; preds = %6
  tail call void @__assert_fail(ptr noundef nonnull @.str.31, ptr noundef nonnull @.str.1, i32 noundef 2782, ptr noundef nonnull @__PRETTY_FUNCTION__._Z22ImFontAtlasBuildFinishP11ImFontAtlas) #6
  unreachable

.critedge:                                        ; preds = %1, %6
  tail call void @_ZL36ImFontAtlasBuildRenderDefaultTexDataP11ImFontAtlas(ptr noundef nonnull %0)
  tail call void @_ZL34ImFontAtlasBuildRenderLinesTexDataP11ImFontAtlas(ptr noundef nonnull %0)
  %10 = getelementptr inbounds i8, ptr %0, i64 104
  %11 = load i32, ptr %10, align 8, !tbaa !18
  %12 = icmp sgt i32 %11, 0
  br i1 %12, label %.lr.ph, label %.preheader

.lr.ph:                                           ; preds = %.critedge
  %13 = getelementptr inbounds i8, ptr %2, i64 4
  %14 = getelementptr inbounds i8, ptr %3, i64 4
  br label %18

.preheader:                                       ; preds = %53, %.critedge
  %15 = getelementptr inbounds i8, ptr %0, i64 88
  %16 = load i32, ptr %15, align 8, !tbaa !19
  %17 = icmp sgt i32 %16, 0
  br i1 %17, label %.lr.ph37, label %._crit_edge

18:                                               ; preds = %.lr.ph, %53
  %.03135 = phi i32 [ 0, %.lr.ph ], [ %54, %53 ]
  %19 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZN8ImVectorI21ImFontAtlasCustomRectEixEi(ptr noundef nonnull align 8 dereferenceable(16) %10, i32 noundef %.03135)
  %20 = getelementptr inbounds i8, ptr %19, i64 24
  %21 = load ptr, ptr %20, align 8, !tbaa !20
  %22 = icmp eq ptr %21, null
  br i1 %22, label %53, label %23

23:                                               ; preds = %18
  %24 = getelementptr inbounds i8, ptr %19, i64 8
  %25 = load i32, ptr %24, align 8, !tbaa !23
  %26 = icmp eq i32 %25, 0
  br i1 %26, label %53, label %27

27:                                               ; preds = %23
  %28 = getelementptr inbounds i8, ptr %21, i64 64
  %29 = load ptr, ptr %28, align 8, !tbaa !24
  %30 = icmp eq ptr %29, %0
  br i1 %30, label %32, label %31

31:                                               ; preds = %27
  call void @__assert_fail(ptr noundef nonnull @.str.32, ptr noundef nonnull @.str.1, i32 noundef 2794, ptr noundef nonnull @__PRETTY_FUNCTION__._Z22ImFontAtlasBuildFinishP11ImFontAtlas) #6
  unreachable

32:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #7
  call void @_ZN6ImVec2C2Ev(ptr noundef nonnull align 4 dereferenceable(8) %2)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #7
  call void @_ZN6ImVec2C2Ev(ptr noundef nonnull align 4 dereferenceable(8) %3)
  call void @_ZNK11ImFontAtlas16CalcCustomRectUVEPK21ImFontAtlasCustomRectP6ImVec2S4_(ptr noundef nonnull align 8 dereferenceable(1180) %0, ptr noundef nonnull %19, ptr noundef nonnull %2, ptr noundef nonnull %3)
  %33 = load ptr, ptr %20, align 8, !tbaa !20
  %34 = load i32, ptr %24, align 8, !tbaa !23
  %35 = trunc i32 %34 to i16
  %36 = getelementptr inbounds i8, ptr %19, i64 16
  %37 = load float, ptr %36, align 8, !tbaa !29
  %38 = getelementptr inbounds i8, ptr %19, i64 20
  %39 = load float, ptr %38, align 4, !tbaa !30
  %40 = load i16, ptr %19, align 8, !tbaa !31
  %41 = uitofp i16 %40 to float
  %42 = fadd float %37, %41
  %43 = getelementptr inbounds i8, ptr %19, i64 2
  %44 = load i16, ptr %43, align 2, !tbaa !32
  %45 = uitofp i16 %44 to float
  %46 = fadd float %39, %45
  %47 = load float, ptr %2, align 4, !tbaa !33
  %48 = load float, ptr %13, align 4, !tbaa !34
  %49 = load float, ptr %3, align 4, !tbaa !33
  %50 = load float, ptr %14, align 4, !tbaa !34
  %51 = getelementptr inbounds i8, ptr %19, i64 12
  %52 = load float, ptr %51, align 4, !tbaa !35
  call void @_ZN6ImFont8AddGlyphEPK12ImFontConfigtfffffffff(ptr noundef nonnull align 8 dereferenceable(118) %33, ptr noundef null, i16 noundef zeroext %35, float noundef %37, float noundef %39, float noundef %42, float noundef %46, float noundef %47, float noundef %48, float noundef %49, float noundef %50, float noundef %52)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #7
  br label %53

53:                                               ; preds = %18, %23, %32
  %54 = add nuw nsw i32 %.03135, 1
  %55 = load i32, ptr %10, align 8, !tbaa !18
  %56 = icmp slt i32 %54, %55
  br i1 %56, label %18, label %.preheader, !llvm.loop !36

._crit_edge:                                      ; preds = %66, %.preheader
  %57 = getelementptr inbounds i8, ptr %0, i64 40
  store i8 1, ptr %57, align 8, !tbaa !38
  ret void

.lr.ph37:                                         ; preds = %.preheader, %66
  %.036 = phi i32 [ %67, %66 ], [ 0, %.preheader ]
  %58 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN8ImVectorIP6ImFontEixEi(ptr noundef nonnull align 8 dereferenceable(16) %15, i32 noundef %.036)
  %59 = load ptr, ptr %58, align 8, !tbaa !39
  %60 = getelementptr inbounds i8, ptr %59, i64 96
  %61 = load i8, ptr %60, align 8, !tbaa !40, !range !41, !noundef !42
  %62 = trunc nuw i8 %61 to i1
  br i1 %62, label %63, label %66

63:                                               ; preds = %.lr.ph37
  %64 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN8ImVectorIP6ImFontEixEi(ptr noundef nonnull align 8 dereferenceable(16) %15, i32 noundef %.036)
  %65 = load ptr, ptr %64, align 8, !tbaa !39
  call void @_ZN6ImFont16BuildLookupTableEv(ptr noundef nonnull align 8 dereferenceable(118) %65)
  br label %66

66:                                               ; preds = %.lr.ph37, %63
  %67 = add nuw nsw i32 %.036, 1
  %68 = load i32, ptr %15, align 8, !tbaa !19
  %69 = icmp slt i32 %67, %68
  br i1 %69, label %.lr.ph37, label %._crit_edge, !llvm.loop !43
}

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL36ImFontAtlasBuildRenderDefaultTexDataP11ImFontAtlas(ptr noundef) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL34ImFontAtlasBuildRenderLinesTexDataP11ImFontAtlas(ptr noundef) local_unnamed_addr #5

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6ImFont8AddGlyphEPK12ImFontConfigtfffffffff(ptr noundef nonnull align 8 dereferenceable(118), ptr noundef, i16 noundef zeroext, float noundef, float noundef, float noundef, float noundef, float noundef, float noundef, float noundef, float noundef, float noundef) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6ImFont16BuildLookupTableEv(ptr noundef nonnull align 8 dereferenceable(118)) local_unnamed_addr #4 align 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 = { 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 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 #6 = { noreturn nounwind }
attributes #7 = { 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, !10, i64 48}
!6 = !{!"_ZTS11ImFontAtlas", !7, i64 0, !10, i64 8, !7, i64 16, !7, i64 20, !11, i64 24, !10, i64 32, !11, i64 40, !11, i64 41, !10, i64 48, !10, i64 56, !7, i64 64, !7, i64 68, !12, i64 72, !12, i64 80, !14, i64 88, !15, i64 104, !16, i64 120, !8, i64 136, !10, i64 1160, !7, i64 1168, !7, i64 1172, !7, i64 1176}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!"bool", !8, i64 0}
!12 = !{!"_ZTS6ImVec2", !13, i64 0, !13, i64 4}
!13 = !{!"float", !8, i64 0}
!14 = !{!"_ZTS8ImVectorIP6ImFontE", !7, i64 0, !7, i64 4, !10, i64 8}
!15 = !{!"_ZTS8ImVectorI21ImFontAtlasCustomRectE", !7, i64 0, !7, i64 4, !10, i64 8}
!16 = !{!"_ZTS8ImVectorI12ImFontConfigE", !7, i64 0, !7, i64 4, !10, i64 8}
!17 = !{!6, !10, i64 56}
!18 = !{!6, !7, i64 104}
!19 = !{!6, !7, i64 88}
!20 = !{!21, !10, i64 24}
!21 = !{!"_ZTS21ImFontAtlasCustomRect", !22, i64 0, !22, i64 2, !22, i64 4, !22, i64 6, !7, i64 8, !13, i64 12, !12, i64 16, !10, i64 24}
!22 = !{!"short", !8, i64 0}
!23 = !{!21, !7, i64 8}
!24 = !{!25, !10, i64 64}
!25 = !{!"_ZTS6ImFont", !26, i64 0, !13, i64 16, !13, i64 20, !27, i64 24, !28, i64 40, !10, i64 56, !10, i64 64, !10, i64 72, !22, i64 80, !22, i64 82, !22, i64 84, !22, i64 86, !13, i64 88, !13, i64 92, !11, i64 96, !13, i64 100, !13, i64 104, !13, i64 108, !7, i64 112, !8, i64 116}
!26 = !{!"_ZTS8ImVectorIfE", !7, i64 0, !7, i64 4, !10, i64 8}
!27 = !{!"_ZTS8ImVectorItE", !7, i64 0, !7, i64 4, !10, i64 8}
!28 = !{!"_ZTS8ImVectorI11ImFontGlyphE", !7, i64 0, !7, i64 4, !10, i64 8}
!29 = !{!21, !13, i64 16}
!30 = !{!21, !13, i64 20}
!31 = !{!21, !22, i64 0}
!32 = !{!21, !22, i64 2}
!33 = !{!12, !13, i64 0}
!34 = !{!12, !13, i64 4}
!35 = !{!21, !13, i64 12}
!36 = distinct !{!36, !37}
!37 = !{!"llvm.loop.mustprogress"}
!38 = !{!6, !11, i64 40}
!39 = !{!10, !10, i64 0}
!40 = !{!25, !11, i64 96}
!41 = !{i8 0, i8 2}
!42 = !{}
!43 = distinct !{!43, !37}


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