; LLVM IR from Devaniti/BoolkaEngine :: ThirdParty/imgui/imgui_draw.ll (ZN11ImFontAtlas7AddFontEPK12ImFontConfig)

; 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.ImNewWrapper = type { i8 }
%struct.ImFontAtlas = type { i8, i32, ptr, i32, i32, ptr, ptr, i32, i32, %struct.ImVec2, %struct.ImVec2, %struct.ImVector.8, %struct.ImVector.9, %struct.ImVector.10, [64 x %struct.ImVec4], i32, i32 }
%struct.ImVec2 = type { float, float }
%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.ImFontConfig = type { ptr, i32, i8, i32, float, i32, i32, i8, %struct.ImVec2, %struct.ImVec2, ptr, float, float, i8, i32, float, i16, [40 x i8], ptr }
%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 }

@.str.1 = external hidden unnamed_addr constant [87 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [90 x i8], align 1
@__PRETTY_FUNCTION__._ZN11ImFontAtlas7AddFontEPK12ImFontConfig = external hidden unnamed_addr constant [51 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [59 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [60 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

declare noundef ptr @_ZN5ImGui8MemAllocEm(i64 noundef) #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_Znwm12ImNewWrapperPv(i64 noundef, ptr noundef) #3

declare i32 @__gxx_personality_v0(...)

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZdlPv12ImNewWrapperS_(ptr noundef, ptr noundef) #3

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11ImFontAtlas12ClearTexDataEv(ptr noundef nonnull align 8 dereferenceable(1144)) #5 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZN11ImFontAtlas7AddFontEPK12ImFontConfig(ptr noundef nonnull align 8 dereferenceable(1144) %0, ptr noundef %1) #5 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca %struct.ImNewWrapper, align 1
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %10 = load ptr, ptr %3, align 8
  %11 = getelementptr inbounds %struct.ImFontAtlas, ptr %10, i32 0, i32 0
  %12 = load i8, ptr %11, align 8, !tbaa !9, !range !18, !noundef !19
  %13 = trunc i8 %12 to i1
  br i1 %13, label %15, label %14

14:                                               ; preds = %2
  br label %15

15:                                               ; preds = %14, %2
  %16 = phi i1 [ false, %2 ], [ true, %14 ]
  br i1 %16, label %17, label %18

17:                                               ; preds = %15
  br label %20

18:                                               ; preds = %15
  call void @__assert_fail(ptr noundef @.str.8, ptr noundef @.str.1, i32 noundef 1898, ptr noundef @__PRETTY_FUNCTION__._ZN11ImFontAtlas7AddFontEPK12ImFontConfig) #7
  unreachable

19:                                               ; No predecessors!
  br label %20

20:                                               ; preds = %19, %17
  %21 = load ptr, ptr %4, align 8, !tbaa !5
  %22 = getelementptr inbounds %struct.ImFontConfig, ptr %21, i32 0, i32 0
  %23 = load ptr, ptr %22, align 8, !tbaa !20
  %24 = icmp ne ptr %23, null
  br i1 %24, label %25, label %30

25:                                               ; preds = %20
  %26 = load ptr, ptr %4, align 8, !tbaa !5
  %27 = getelementptr inbounds %struct.ImFontConfig, ptr %26, i32 0, i32 1
  %28 = load i32, ptr %27, align 8, !tbaa !23
  %29 = icmp sgt i32 %28, 0
  br label %30

30:                                               ; preds = %25, %20
  %31 = phi i1 [ false, %20 ], [ %29, %25 ]
  br i1 %31, label %32, label %33

32:                                               ; preds = %30
  br label %35

33:                                               ; preds = %30
  call void @__assert_fail(ptr noundef @.str.9, ptr noundef @.str.1, i32 noundef 1899, ptr noundef @__PRETTY_FUNCTION__._ZN11ImFontAtlas7AddFontEPK12ImFontConfig) #7
  unreachable

34:                                               ; No predecessors!
  br label %35

35:                                               ; preds = %34, %32
  %36 = load ptr, ptr %4, align 8, !tbaa !5
  %37 = getelementptr inbounds %struct.ImFontConfig, ptr %36, i32 0, i32 4
  %38 = load float, ptr %37, align 4, !tbaa !24
  %39 = fcmp ogt float %38, 0.000000e+00
  br i1 %39, label %40, label %41

40:                                               ; preds = %35
  br label %43

41:                                               ; preds = %35
  call void @__assert_fail(ptr noundef @.str.10, ptr noundef @.str.1, i32 noundef 1900, ptr noundef @__PRETTY_FUNCTION__._ZN11ImFontAtlas7AddFontEPK12ImFontConfig) #7
  unreachable

42:                                               ; No predecessors!
  br label %43

43:                                               ; preds = %42, %40
  %44 = load ptr, ptr %4, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.ImFontConfig, ptr %44, i32 0, i32 13
  %46 = load i8, ptr %45, align 8, !tbaa !25, !range !18, !noundef !19
  %47 = trunc i8 %46 to i1
  br i1 %47, label %57, label %48

48:                                               ; preds = %43
  %49 = getelementptr inbounds %struct.ImFontAtlas, ptr %10, i32 0, i32 11
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #8
  %50 = call noundef ptr @_ZN5ImGui8MemAllocEm(i64 noundef 112)
  %51 = call noundef ptr @_Znwm12ImNewWrapperPv(i64 noundef 112, ptr noundef %50)
  invoke void @_ZN6ImFontC1Ev(ptr noundef nonnull align 8 dereferenceable(106) %51)
          to label %52 unwind label %53

52:                                               ; preds = %48
  store ptr %51, ptr %5, align 8, !tbaa !5
  call void @_ZN8ImVectorIP6ImFontE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(16) %49, ptr noundef nonnull align 8 dereferenceable(8) %5)
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #8
  br label %67

53:                                               ; preds = %48
  %54 = landingpad { ptr, i32 }
          cleanup
  %55 = extractvalue { ptr, i32 } %54, 0
  store ptr %55, ptr %7, align 8
  %56 = extractvalue { ptr, i32 } %54, 1
  store i32 %56, ptr %8, align 4
  call void @_ZdlPv12ImNewWrapperS_(ptr noundef %51, ptr noundef %50) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #8
  br label %127

57:                                               ; preds = %43
  %58 = getelementptr inbounds %struct.ImFontAtlas, ptr %10, i32 0, i32 11
  %59 = call noundef zeroext i1 @_ZNK8ImVectorIP6ImFontE5emptyEv(ptr noundef nonnull align 8 dereferenceable(16) %58)
  br i1 %59, label %61, label %60

60:                                               ; preds = %57
  br label %61

61:                                               ; preds = %60, %57
  %62 = phi i1 [ false, %57 ], [ true, %60 ]
  br i1 %62, label %63, label %64

63:                                               ; preds = %61
  br label %66

64:                                               ; preds = %61
  call void @__assert_fail(ptr noundef @.str.12, ptr noundef @.str.1, i32 noundef 1906, ptr noundef @__PRETTY_FUNCTION__._ZN11ImFontAtlas7AddFontEPK12ImFontConfig) #7
  unreachable

65:                                               ; No predecessors!
  br label %66

66:                                               ; preds = %65, %63
  br label %67

67:                                               ; preds = %66, %52
  %68 = getelementptr inbounds %struct.ImFontAtlas, ptr %10, i32 0, i32 13
  %69 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN8ImVectorI12ImFontConfigE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(16) %68, ptr noundef nonnull align 8 dereferenceable(136) %69)
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #8
  %70 = getelementptr inbounds %struct.ImFontAtlas, ptr %10, i32 0, i32 13
  %71 = call noundef nonnull align 8 dereferenceable(136) ptr @_ZN8ImVectorI12ImFontConfigE4backEv(ptr noundef nonnull align 8 dereferenceable(16) %70)
  store ptr %71, ptr %9, align 8, !tbaa !5
  %72 = load ptr, ptr %9, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct.ImFontConfig, ptr %72, i32 0, i32 18
  %74 = load ptr, ptr %73, align 8, !tbaa !26
  %75 = icmp eq ptr %74, null
  br i1 %75, label %76, label %82

76:                                               ; preds = %67
  %77 = getelementptr inbounds %struct.ImFontAtlas, ptr %10, i32 0, i32 11
  %78 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN8ImVectorIP6ImFontE4backEv(ptr noundef nonnull align 8 dereferenceable(16) %77)
  %79 = load ptr, ptr %78, align 8, !tbaa !5
  %80 = load ptr, ptr %9, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct.ImFontConfig, ptr %80, i32 0, i32 18
  store ptr %79, ptr %81, align 8, !tbaa !26
  br label %82

82:                                               ; preds = %76, %67
  %83 = load ptr, ptr %9, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct.ImFontConfig, ptr %83, i32 0, i32 2
  %85 = load i8, ptr %84, align 4, !tbaa !27, !range !18, !noundef !19
  %86 = trunc i8 %85 to i1
  br i1 %86, label %107, label %87

87:                                               ; preds = %82
  %88 = load ptr, ptr %9, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct.ImFontConfig, ptr %88, i32 0, i32 1
  %90 = load i32, ptr %89, align 8, !tbaa !23
  %91 = sext i32 %90 to i64
  %92 = call noundef ptr @_ZN5ImGui8MemAllocEm(i64 noundef %91)
  %93 = load ptr, ptr %9, align 8, !tbaa !5
  %94 = getelementptr inbounds %struct.ImFontConfig, ptr %93, i32 0, i32 0
  store ptr %92, ptr %94, align 8, !tbaa !20
  %95 = load ptr, ptr %9, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct.ImFontConfig, ptr %95, i32 0, i32 2
  store i8 1, ptr %96, align 4, !tbaa !27
  %97 = load ptr, ptr %9, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct.ImFontConfig, ptr %97, i32 0, i32 0
  %99 = load ptr, ptr %98, align 8, !tbaa !20
  %100 = load ptr, ptr %4, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct.ImFontConfig, ptr %100, i32 0, i32 0
  %102 = load ptr, ptr %101, align 8, !tbaa !20
  %103 = load ptr, ptr %9, align 8, !tbaa !5
  %104 = getelementptr inbounds %struct.ImFontConfig, ptr %103, i32 0, i32 1
  %105 = load i32, ptr %104, align 8, !tbaa !23
  %106 = sext i32 %105 to i64
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %99, ptr align 1 %102, i64 %106, i1 false)
  br label %107

107:                                              ; preds = %87, %82
  %108 = load ptr, ptr %9, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct.ImFontConfig, ptr %108, i32 0, i32 18
  %110 = load ptr, ptr %109, align 8, !tbaa !26
  %111 = getelementptr inbounds %struct.ImFont, ptr %110, i32 0, i32 10
  %112 = load i16, ptr %111, align 4, !tbaa !28
  %113 = zext i16 %112 to i32
  %114 = icmp eq i32 %113, 65535
  br i1 %114, label %115, label %123

115:                                              ; preds = %107
  %116 = load ptr, ptr %4, align 8, !tbaa !5
  %117 = getelementptr inbounds %struct.ImFontConfig, ptr %116, i32 0, i32 16
  %118 = load i16, ptr %117, align 4, !tbaa !33
  %119 = load ptr, ptr %9, align 8, !tbaa !5
  %120 = getelementptr inbounds %struct.ImFontConfig, ptr %119, i32 0, i32 18
  %121 = load ptr, ptr %120, align 8, !tbaa !26
  %122 = getelementptr inbounds %struct.ImFont, ptr %121, i32 0, i32 10
  store i16 %118, ptr %122, align 4, !tbaa !28
  br label %123

123:                                              ; preds = %115, %107
  call void @_ZN11ImFontAtlas12ClearTexDataEv(ptr noundef nonnull align 8 dereferenceable(1144) %10)
  %124 = load ptr, ptr %9, align 8, !tbaa !5
  %125 = getelementptr inbounds %struct.ImFontConfig, ptr %124, i32 0, i32 18
  %126 = load ptr, ptr %125, align 8, !tbaa !26
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #8
  ret ptr %126

127:                                              ; preds = %53
  %128 = load ptr, ptr %7, align 8
  %129 = load i32, ptr %8, align 4
  %130 = insertvalue { ptr, i32 } poison, ptr %128, 0
  %131 = insertvalue { ptr, i32 } %130, i32 %129, 1
  resume { ptr, i32 } %131
}

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK8ImVectorIP6ImFontE5emptyEv(ptr noundef nonnull align 8 dereferenceable(16)) #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN8ImVectorI12ImFontConfigE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(136)) #6 align 2

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

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

declare void @_ZN6ImFontC1Ev(ptr)

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !11, i64 0}
!10 = !{!"_ZTS11ImFontAtlas", !11, i64 0, !12, i64 4, !6, i64 8, !12, i64 16, !12, i64 20, !6, i64 24, !6, i64 32, !12, i64 40, !12, i64 44, !13, i64 48, !13, i64 56, !15, i64 64, !16, i64 80, !17, i64 96, !7, i64 112, !12, i64 1136, !12, i64 1140}
!11 = !{!"bool", !7, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!"_ZTS6ImVec2", !14, i64 0, !14, i64 4}
!14 = !{!"float", !7, i64 0}
!15 = !{!"_ZTS8ImVectorIP6ImFontE", !12, i64 0, !12, i64 4, !6, i64 8}
!16 = !{!"_ZTS8ImVectorI21ImFontAtlasCustomRectE", !12, i64 0, !12, i64 4, !6, i64 8}
!17 = !{!"_ZTS8ImVectorI12ImFontConfigE", !12, i64 0, !12, i64 4, !6, i64 8}
!18 = !{i8 0, i8 2}
!19 = !{}
!20 = !{!21, !6, i64 0}
!21 = !{!"_ZTS12ImFontConfig", !6, i64 0, !12, i64 8, !11, i64 12, !12, i64 16, !14, i64 20, !12, i64 24, !12, i64 28, !11, i64 32, !13, i64 36, !13, i64 44, !6, i64 56, !14, i64 64, !14, i64 68, !11, i64 72, !12, i64 76, !14, i64 80, !22, i64 84, !7, i64 86, !6, i64 128}
!22 = !{!"short", !7, i64 0}
!23 = !{!21, !12, i64 8}
!24 = !{!21, !14, i64 20}
!25 = !{!21, !11, i64 72}
!26 = !{!21, !6, i64 128}
!27 = !{!21, !11, i64 12}
!28 = !{!29, !22, i64 84}
!29 = !{!"_ZTS6ImFont", !30, i64 0, !14, i64 16, !14, i64 20, !31, i64 24, !32, i64 40, !6, i64 56, !6, i64 64, !6, i64 72, !22, i64 80, !22, i64 82, !22, i64 84, !11, i64 86, !14, i64 88, !14, i64 92, !14, i64 96, !12, i64 100, !7, i64 104}
!30 = !{!"_ZTS8ImVectorIfE", !12, i64 0, !12, i64 4, !6, i64 8}
!31 = !{!"_ZTS8ImVectorItE", !12, i64 0, !12, i64 4, !6, i64 8}
!32 = !{!"_ZTS8ImVectorI11ImFontGlyphE", !12, i64 0, !12, i64 4, !6, i64 8}
!33 = !{!21, !22, i64 84}


; 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.8 = external hidden unnamed_addr constant [90 x i8], align 1
@__PRETTY_FUNCTION__._ZN11ImFontAtlas7AddFontEPK12ImFontConfig = external hidden unnamed_addr constant [51 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [59 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [60 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 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: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

declare noundef ptr @_ZN5ImGui8MemAllocEm(i64 noundef) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_Znwm12ImNewWrapperPv(i64 noundef, ptr noundef) local_unnamed_addr #3

declare i32 @__gxx_personality_v0(...)

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZdlPv12ImNewWrapperS_(ptr noundef, ptr noundef) local_unnamed_addr #3

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11ImFontAtlas12ClearTexDataEv(ptr noundef nonnull align 8 dereferenceable(1144)) local_unnamed_addr #5 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZN11ImFontAtlas7AddFontEPK12ImFontConfig(ptr noundef nonnull align 8 dereferenceable(1144) %0, ptr noundef %1) local_unnamed_addr #5 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = load i8, ptr %0, align 8, !tbaa !5, !range !17, !noundef !18
  %5 = trunc nuw i8 %4 to i1
  br i1 %5, label %6, label %7

6:                                                ; preds = %2
  tail call void @__assert_fail(ptr noundef nonnull @.str.8, ptr noundef nonnull @.str.1, i32 noundef 1898, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN11ImFontAtlas7AddFontEPK12ImFontConfig) #7
  unreachable

7:                                                ; preds = %2
  %8 = load ptr, ptr %1, align 8, !tbaa !19
  %.not = icmp eq ptr %8, null
  br i1 %.not, label %.critedge, label %9

9:                                                ; preds = %7
  %10 = getelementptr inbounds i8, ptr %1, i64 8
  %11 = load i32, ptr %10, align 8, !tbaa !22
  %12 = icmp sgt i32 %11, 0
  br i1 %12, label %13, label %.critedge

.critedge:                                        ; preds = %7, %9
  tail call void @__assert_fail(ptr noundef nonnull @.str.9, ptr noundef nonnull @.str.1, i32 noundef 1899, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN11ImFontAtlas7AddFontEPK12ImFontConfig) #7
  unreachable

13:                                               ; preds = %9
  %14 = getelementptr inbounds i8, ptr %1, i64 20
  %15 = load float, ptr %14, align 4, !tbaa !23
  %16 = fcmp ogt float %15, 0.000000e+00
  br i1 %16, label %18, label %17

17:                                               ; preds = %13
  tail call void @__assert_fail(ptr noundef nonnull @.str.10, ptr noundef nonnull @.str.1, i32 noundef 1900, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN11ImFontAtlas7AddFontEPK12ImFontConfig) #7
  unreachable

18:                                               ; preds = %13
  %19 = getelementptr inbounds i8, ptr %1, i64 72
  %20 = load i8, ptr %19, align 8, !tbaa !24, !range !17, !noundef !18
  %21 = trunc nuw i8 %20 to i1
  br i1 %21, label %29, label %22

22:                                               ; preds = %18
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #8
  %23 = tail call noundef ptr @_ZN5ImGui8MemAllocEm(i64 noundef 112)
  %24 = tail call noundef ptr @_Znwm12ImNewWrapperPv(i64 noundef 112, ptr noundef %23)
  invoke void @_ZN6ImFontC1Ev(ptr noundef nonnull align 8 dereferenceable(106) %24)
          to label %25 unwind label %27

25:                                               ; preds = %22
  %26 = getelementptr inbounds i8, ptr %0, i64 64
  store ptr %24, ptr %3, align 8, !tbaa !25
  call void @_ZN8ImVectorIP6ImFontE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(16) %26, ptr noundef nonnull align 8 dereferenceable(8) %3)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #8
  br label %33

27:                                               ; preds = %22
  %28 = landingpad { ptr, i32 }
          cleanup
  tail call void @_ZdlPv12ImNewWrapperS_(ptr noundef %24, ptr noundef %23) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #8
  resume { ptr, i32 } %28

29:                                               ; preds = %18
  %30 = getelementptr inbounds i8, ptr %0, i64 64
  %31 = tail call noundef zeroext i1 @_ZNK8ImVectorIP6ImFontE5emptyEv(ptr noundef nonnull align 8 dereferenceable(16) %30)
  br i1 %31, label %32, label %33

32:                                               ; preds = %29
  tail call void @__assert_fail(ptr noundef nonnull @.str.12, ptr noundef nonnull @.str.1, i32 noundef 1906, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN11ImFontAtlas7AddFontEPK12ImFontConfig) #7
  unreachable

33:                                               ; preds = %29, %25
  %34 = getelementptr inbounds i8, ptr %0, i64 96
  call void @_ZN8ImVectorI12ImFontConfigE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(16) %34, ptr noundef nonnull align 8 dereferenceable(136) %1)
  %35 = call noundef nonnull align 8 dereferenceable(136) ptr @_ZN8ImVectorI12ImFontConfigE4backEv(ptr noundef nonnull align 8 dereferenceable(16) %34)
  %36 = getelementptr inbounds i8, ptr %35, i64 128
  %37 = load ptr, ptr %36, align 8, !tbaa !26
  %38 = icmp eq ptr %37, null
  br i1 %38, label %39, label %43

39:                                               ; preds = %33
  %40 = getelementptr inbounds i8, ptr %0, i64 64
  %41 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN8ImVectorIP6ImFontE4backEv(ptr noundef nonnull align 8 dereferenceable(16) %40)
  %42 = load ptr, ptr %41, align 8, !tbaa !25
  store ptr %42, ptr %36, align 8, !tbaa !26
  br label %43

43:                                               ; preds = %39, %33
  %44 = phi ptr [ %42, %39 ], [ %37, %33 ]
  %45 = getelementptr inbounds i8, ptr %35, i64 12
  %46 = load i8, ptr %45, align 4, !tbaa !27, !range !17, !noundef !18
  %47 = trunc nuw i8 %46 to i1
  br i1 %47, label %56, label %48

48:                                               ; preds = %43
  %49 = getelementptr inbounds i8, ptr %35, i64 8
  %50 = load i32, ptr %49, align 8, !tbaa !22
  %51 = sext i32 %50 to i64
  %52 = call noundef ptr @_ZN5ImGui8MemAllocEm(i64 noundef %51)
  store ptr %52, ptr %35, align 8, !tbaa !19
  store i8 1, ptr %45, align 4, !tbaa !27
  %53 = load ptr, ptr %1, align 8, !tbaa !19
  %54 = load i32, ptr %49, align 8, !tbaa !22
  %55 = sext i32 %54 to i64
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %52, ptr align 1 %53, i64 %55, i1 false)
  %.pre = load ptr, ptr %36, align 8, !tbaa !26
  br label %56

56:                                               ; preds = %48, %43
  %57 = phi ptr [ %.pre, %48 ], [ %44, %43 ]
  %58 = getelementptr inbounds i8, ptr %57, i64 84
  %59 = load i16, ptr %58, align 4, !tbaa !28
  %60 = icmp eq i16 %59, -1
  br i1 %60, label %61, label %64

61:                                               ; preds = %56
  %62 = getelementptr inbounds i8, ptr %1, i64 84
  %63 = load i16, ptr %62, align 4, !tbaa !33
  store i16 %63, ptr %58, align 4, !tbaa !28
  br label %64

64:                                               ; preds = %61, %56
  call void @_ZN11ImFontAtlas12ClearTexDataEv(ptr noundef nonnull align 8 dereferenceable(1144) %0)
  %65 = load ptr, ptr %36, align 8, !tbaa !26
  ret ptr %65
}

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

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

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

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

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

declare void @_ZN6ImFontC1Ev(ptr) local_unnamed_addr

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 0}
!6 = !{!"_ZTS11ImFontAtlas", !7, i64 0, !10, i64 4, !11, i64 8, !10, i64 16, !10, i64 20, !11, i64 24, !11, i64 32, !10, i64 40, !10, i64 44, !12, i64 48, !12, i64 56, !14, i64 64, !15, i64 80, !16, i64 96, !8, i64 112, !10, i64 1136, !10, i64 1140}
!7 = !{!"bool", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"any pointer", !8, i64 0}
!12 = !{!"_ZTS6ImVec2", !13, i64 0, !13, i64 4}
!13 = !{!"float", !8, i64 0}
!14 = !{!"_ZTS8ImVectorIP6ImFontE", !10, i64 0, !10, i64 4, !11, i64 8}
!15 = !{!"_ZTS8ImVectorI21ImFontAtlasCustomRectE", !10, i64 0, !10, i64 4, !11, i64 8}
!16 = !{!"_ZTS8ImVectorI12ImFontConfigE", !10, i64 0, !10, i64 4, !11, i64 8}
!17 = !{i8 0, i8 2}
!18 = !{}
!19 = !{!20, !11, i64 0}
!20 = !{!"_ZTS12ImFontConfig", !11, i64 0, !10, i64 8, !7, i64 12, !10, i64 16, !13, i64 20, !10, i64 24, !10, i64 28, !7, i64 32, !12, i64 36, !12, i64 44, !11, i64 56, !13, i64 64, !13, i64 68, !7, i64 72, !10, i64 76, !13, i64 80, !21, i64 84, !8, i64 86, !11, i64 128}
!21 = !{!"short", !8, i64 0}
!22 = !{!20, !10, i64 8}
!23 = !{!20, !13, i64 20}
!24 = !{!20, !7, i64 72}
!25 = !{!11, !11, i64 0}
!26 = !{!20, !11, i64 128}
!27 = !{!20, !7, i64 12}
!28 = !{!29, !21, i64 84}
!29 = !{!"_ZTS6ImFont", !30, i64 0, !13, i64 16, !13, i64 20, !31, i64 24, !32, i64 40, !11, i64 56, !11, i64 64, !11, i64 72, !21, i64 80, !21, i64 82, !21, i64 84, !7, i64 86, !13, i64 88, !13, i64 92, !13, i64 96, !10, i64 100, !8, i64 104}
!30 = !{!"_ZTS8ImVectorIfE", !10, i64 0, !10, i64 4, !11, i64 8}
!31 = !{!"_ZTS8ImVectorItE", !10, i64 0, !10, i64 4, !11, i64 8}
!32 = !{!"_ZTS8ImVectorI11ImFontGlyphE", !10, i64 0, !10, i64 4, !11, i64 8}
!33 = !{!20, !21, i64 84}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,SROAPass,SimplifyCFGPass,TailCallElimPass