; 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.ImNewWrapper = type { i8 }
%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.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.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.10 = external hidden unnamed_addr constant [90 x i8], align 1
@__PRETTY_FUNCTION__._ZN11ImFontAtlas7AddFontEPK12ImFontConfig = external hidden unnamed_addr constant [51 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [59 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.14 = 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 i32 @__gxx_personality_v0(...)

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

declare noundef ptr @_ZN5ImGui8MemAllocEm(i64 noundef) #3

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZN11ImFontAtlas7AddFontEPK12ImFontConfig(ptr noundef nonnull align 8 dereferenceable(1180) %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 5
  %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.10, ptr noundef @.str.1, i32 noundef 2069, 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.11, ptr noundef @.str.1, i32 noundef 2070, 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.12, ptr noundef @.str.1, i32 noundef 2071, 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 17
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #8
  %50 = call noundef ptr @_ZN5ImGui8MemAllocEm(i64 noundef 120)
  %51 = call noundef ptr @_Znwm12ImNewWrapperPv(i64 noundef 120, ptr noundef %50)
  invoke void @_ZN6ImFontC1Ev(ptr noundef nonnull align 8 dereferenceable(118) %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 %128

57:                                               ; preds = %43
  %58 = getelementptr inbounds %struct.ImFontAtlas, ptr %10, i32 0, i32 17
  %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.14, ptr noundef @.str.1, i32 noundef 2077, 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 19
  %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 19
  %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 17
  %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
  %124 = getelementptr inbounds %struct.ImFontAtlas, ptr %10, i32 0, i32 8
  store i8 0, ptr %124, align 8, !tbaa !34
  call void @_ZN11ImFontAtlas12ClearTexDataEv(ptr noundef nonnull align 8 dereferenceable(1180) %10)
  %125 = load ptr, ptr %9, align 8, !tbaa !5
  %126 = getelementptr inbounds %struct.ImFontConfig, ptr %125, i32 0, i32 18
  %127 = load ptr, ptr %126, align 8, !tbaa !26
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #8
  ret ptr %127

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

; 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)) #4 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)) #4 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)) #4 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 = { 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 = { "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 = { 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 #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, !12, i64 24}
!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 = !{i8 0, i8 2}
!19 = !{}
!20 = !{!21, !6, i64 0}
!21 = !{!"_ZTS12ImFontConfig", !6, i64 0, !11, i64 8, !12, i64 12, !11, i64 16, !14, i64 20, !11, i64 24, !11, i64 28, !12, i64 32, !13, i64 36, !13, i64 44, !6, i64 56, !14, i64 64, !14, i64 68, !12, i64 72, !11, i64 76, !14, i64 80, !22, i64 84, !7, i64 86, !6, i64 128}
!22 = !{!"short", !7, i64 0}
!23 = !{!21, !11, i64 8}
!24 = !{!21, !14, i64 20}
!25 = !{!21, !12, i64 72}
!26 = !{!21, !6, i64 128}
!27 = !{!21, !12, 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, !22, 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}
!30 = !{!"_ZTS8ImVectorIfE", !11, i64 0, !11, i64 4, !6, i64 8}
!31 = !{!"_ZTS8ImVectorItE", !11, i64 0, !11, i64 4, !6, i64 8}
!32 = !{!"_ZTS8ImVectorI11ImFontGlyphE", !11, i64 0, !11, i64 4, !6, i64 8}
!33 = !{!21, !22, i64 84}
!34 = !{!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"

@.str.1 = external hidden unnamed_addr constant [122 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [90 x i8], align 1
@__PRETTY_FUNCTION__._ZN11ImFontAtlas7AddFontEPK12ImFontConfig = external hidden unnamed_addr constant [51 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [59 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.14 = 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 i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

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

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

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

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

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

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

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

23:                                               ; preds = %19
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #8
  %24 = tail call noundef ptr @_ZN5ImGui8MemAllocEm(i64 noundef 120)
  %25 = tail call noundef ptr @_Znwm12ImNewWrapperPv(i64 noundef 120, ptr noundef %24)
  invoke void @_ZN6ImFontC1Ev(ptr noundef nonnull align 8 dereferenceable(118) %25)
          to label %26 unwind label %28

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

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

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

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

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

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

44:                                               ; preds = %40, %34
  %45 = phi ptr [ %43, %40 ], [ %38, %34 ]
  %46 = getelementptr inbounds i8, ptr %36, i64 12
  %47 = load i8, ptr %46, align 4, !tbaa !27, !range !17, !noundef !18
  %48 = trunc nuw i8 %47 to i1
  br i1 %48, label %57, label %49

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

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

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

65:                                               ; preds = %62, %57
  %66 = getelementptr inbounds i8, ptr %0, i64 40
  store i8 0, ptr %66, align 8, !tbaa !34
  call void @_ZN11ImFontAtlas12ClearTexDataEv(ptr noundef nonnull align 8 dereferenceable(1180) %0)
  %67 = load ptr, ptr %37, align 8, !tbaa !26
  ret ptr %67
}

; 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 #4 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 #4 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 #4 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 = { 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 = { "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 = { 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 #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, !11, i64 24}
!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 = !{i8 0, i8 2}
!18 = !{}
!19 = !{!20, !10, i64 0}
!20 = !{!"_ZTS12ImFontConfig", !10, i64 0, !7, i64 8, !11, i64 12, !7, i64 16, !13, i64 20, !7, i64 24, !7, i64 28, !11, i64 32, !12, i64 36, !12, i64 44, !10, i64 56, !13, i64 64, !13, i64 68, !11, i64 72, !7, i64 76, !13, i64 80, !21, i64 84, !8, i64 86, !10, i64 128}
!21 = !{!"short", !8, i64 0}
!22 = !{!20, !7, i64 8}
!23 = !{!20, !13, i64 20}
!24 = !{!20, !11, i64 72}
!25 = !{!10, !10, i64 0}
!26 = !{!20, !10, i64 128}
!27 = !{!20, !11, i64 12}
!28 = !{!29, !21, i64 84}
!29 = !{!"_ZTS6ImFont", !30, i64 0, !13, i64 16, !13, i64 20, !31, i64 24, !32, i64 40, !10, i64 56, !10, i64 64, !10, i64 72, !21, i64 80, !21, i64 82, !21, i64 84, !21, 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}
!30 = !{!"_ZTS8ImVectorIfE", !7, i64 0, !7, i64 4, !10, i64 8}
!31 = !{!"_ZTS8ImVectorItE", !7, i64 0, !7, i64 4, !10, i64 8}
!32 = !{!"_ZTS8ImVectorI11ImFontGlyphE", !7, i64 0, !7, i64 4, !10, i64 8}
!33 = !{!20, !21, i64 84}
!34 = !{!6, !11, i64 40}


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