; LLVM IR from Samson-Mano/EM_Propogation_simulation :: EM_Propogation_simulation/src/ImGui/imgui_impl_opengl3.ll (Z22ImGui_ImplOpenGL3_InitPKc)

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

%union.GL3WProcs = type { [59 x ptr] }
%struct.ImNewWrapper = type { i8 }
%struct.ImGuiIO = type { i32, i32, %struct.ImVec2, float, float, ptr, ptr, float, float, float, float, float, float, float, ptr, ptr, float, i8, ptr, %struct.ImVec2, i8, i8, i8, i8, i8, i8, i8, i8, float, i8, i8, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i8, i8, i8, i8, i8, i8, i8, float, i32, i32, i32, i32, i32, %struct.ImVec2, [652 x i32], [652 x i8], [16 x float], ptr, %struct.ImVec2, [5 x i8], float, float, i32, i8, i8, i8, i8, i32, [652 x %struct.ImGuiKeyData], i8, %struct.ImVec2, [5 x %struct.ImVec2], [5 x double], [5 x i8], [5 x i8], [5 x i16], [5 x i16], [5 x i8], [5 x i8], [5 x i8], i8, [5 x float], [5 x float], [5 x float], float, i8, i8, i8, i8, i16, %struct.ImVector }
%struct.ImGuiKeyData = type { i8, float, float, float }
%struct.ImVec2 = type { float, float }
%struct.ImVector = type { i32, i32, ptr }
%struct.anon.0 = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.ImGui_ImplOpenGL3_Data = type <{ i32, [32 x i8], i8, [3 x i8], i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i64, i64, i8, i8, [6 x i8] }>

@imgl3wProcs = external dso_local global %union.GL3WProcs, align 8
@.str.1 = external hidden unnamed_addr constant [83 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [130 x i8], align 1
@__PRETTY_FUNCTION__._Z22ImGui_ImplOpenGL3_InitPKc = external hidden unnamed_addr constant [42 x i8], align 1
@stderr = external global ptr, align 8
@.str.3 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [106 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [20 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local i32 @imgl3wInit() #0

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_Z22ImGui_ImplOpenGL3_InitPKc(ptr noundef %0) #0 personality ptr @__gxx_personality_v0 {
  %2 = alloca i1, align 1
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca %struct.ImNewWrapper, align 1
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca ptr, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #8
  %17 = call noundef nonnull align 8 dereferenceable(14280) ptr @_ZN5ImGui5GetIOEv()
  store ptr %17, ptr %4, align 8, !tbaa !5
  %18 = load ptr, ptr %4, align 8, !tbaa !5
  %19 = getelementptr inbounds %struct.ImGuiIO, ptr %18, i32 0, i32 34
  %20 = load ptr, ptr %19, align 8, !tbaa !9
  %21 = icmp eq ptr %20, null
  br i1 %21, label %22, label %23

22:                                               ; preds = %1
  br label %23

23:                                               ; preds = %22, %1
  %24 = phi i1 [ false, %1 ], [ true, %22 ]
  br i1 %24, label %25, label %26

25:                                               ; preds = %23
  br label %28

26:                                               ; preds = %23
  call void @__assert_fail(ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef 261, ptr noundef @__PRETTY_FUNCTION__._Z22ImGui_ImplOpenGL3_InitPKc) #9
  unreachable

27:                                               ; No predecessors!
  br label %28

28:                                               ; preds = %27, %25
  %29 = call i32 @imgl3wInit()
  %30 = icmp ne i32 %29, 0
  br i1 %30, label %31, label %34

31:                                               ; preds = %28
  %32 = load ptr, ptr @stderr, align 8, !tbaa !5
  %33 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %32, ptr noundef @.str.3) #8
  store i1 false, ptr %2, align 1
  store i32 1, ptr %5, align 4
  br label %144

34:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #8
  %35 = call noundef ptr @_ZN5ImGui8MemAllocEm(i64 noundef 104)
  %36 = call noundef ptr @_Znwm12ImNewWrapperPv(i64 noundef 104, ptr noundef %35)
  invoke void @_ZN22ImGui_ImplOpenGL3_DataC2Ev(ptr noundef nonnull align 8 dereferenceable(98) %36)
          to label %37 unwind label %55

37:                                               ; preds = %34
  store ptr %36, ptr %6, align 8, !tbaa !5
  %38 = load ptr, ptr %6, align 8, !tbaa !5
  %39 = load ptr, ptr %4, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.ImGuiIO, ptr %39, i32 0, i32 34
  store ptr %38, ptr %40, align 8, !tbaa !9
  %41 = load ptr, ptr %4, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct.ImGuiIO, ptr %41, i32 0, i32 32
  store ptr @.str.4, ptr %42, align 8, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #8
  store i32 0, ptr %10, align 4, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #8
  store i32 0, ptr %11, align 4, !tbaa !19
  %43 = load ptr, ptr getelementptr inbounds (%struct.anon.0, ptr @imgl3wProcs, i32 0, i32 34), align 8, !tbaa !20
  call void %43(i32 noundef 33307, ptr noundef %10)
  %44 = load ptr, ptr getelementptr inbounds (%struct.anon.0, ptr @imgl3wProcs, i32 0, i32 34), align 8, !tbaa !20
  call void %44(i32 noundef 33308, ptr noundef %11)
  %45 = load i32, ptr %10, align 4, !tbaa !19
  %46 = icmp eq i32 %45, 0
  br i1 %46, label %47, label %59

47:                                               ; preds = %37
  %48 = load i32, ptr %11, align 4, !tbaa !19
  %49 = icmp eq i32 %48, 0
  br i1 %49, label %50, label %59

50:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #8
  %51 = load ptr, ptr getelementptr inbounds (%struct.anon.0, ptr @imgl3wProcs, i32 0, i32 39), align 8, !tbaa !20
  %52 = call noundef ptr %51(i32 noundef 7938)
  store ptr %52, ptr %12, align 8, !tbaa !5
  %53 = load ptr, ptr %12, align 8, !tbaa !5
  %54 = call i32 (ptr, ptr, ...) @__isoc99_sscanf(ptr noundef %53, ptr noundef @.str.5, ptr noundef %10, ptr noundef %11) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #8
  br label %59

55:                                               ; preds = %34
  %56 = landingpad { ptr, i32 }
          cleanup
  %57 = extractvalue { ptr, i32 } %56, 0
  store ptr %57, ptr %8, align 8
  %58 = extractvalue { ptr, i32 } %56, 1
  store i32 %58, ptr %9, align 4
  call void @_ZdlPv12ImNewWrapperS_(ptr noundef %36, ptr noundef %35) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #8
  br label %146

59:                                               ; preds = %50, %47, %37
  %60 = load i32, ptr %10, align 4, !tbaa !19
  %61 = mul nsw i32 %60, 100
  %62 = load i32, ptr %11, align 4, !tbaa !19
  %63 = mul nsw i32 %62, 10
  %64 = add nsw i32 %61, %63
  %65 = load ptr, ptr %6, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.ImGui_ImplOpenGL3_Data, ptr %65, i32 0, i32 0
  store i32 %64, ptr %66, align 8, !tbaa !21
  %67 = load ptr, ptr getelementptr inbounds (%struct.anon.0, ptr @imgl3wProcs, i32 0, i32 34), align 8, !tbaa !20
  %68 = load ptr, ptr %6, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct.ImGui_ImplOpenGL3_Data, ptr %68, i32 0, i32 4
  call void %67(i32 noundef 37158, ptr noundef %69)
  %70 = load ptr, ptr %6, align 8, !tbaa !5
  %71 = getelementptr inbounds %struct.ImGui_ImplOpenGL3_Data, ptr %70, i32 0, i32 4
  %72 = load i32, ptr %71, align 8, !tbaa !24
  %73 = and i32 %72, 2
  %74 = icmp ne i32 %73, 0
  %75 = load ptr, ptr %6, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.ImGui_ImplOpenGL3_Data, ptr %75, i32 0, i32 2
  %77 = zext i1 %74 to i8
  store i8 %77, ptr %76, align 4, !tbaa !25
  %78 = load ptr, ptr %6, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct.ImGui_ImplOpenGL3_Data, ptr %78, i32 0, i32 17
  store i8 0, ptr %79, align 1, !tbaa !26
  %80 = load ptr, ptr %6, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct.ImGui_ImplOpenGL3_Data, ptr %80, i32 0, i32 0
  %82 = load i32, ptr %81, align 8, !tbaa !21
  %83 = icmp uge i32 %82, 320
  br i1 %83, label %84, label %89

84:                                               ; preds = %59
  %85 = load ptr, ptr %4, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct.ImGuiIO, ptr %85, i32 0, i32 1
  %87 = load i32, ptr %86, align 4, !tbaa !27
  %88 = or i32 %87, 8
  store i32 %88, ptr %86, align 4, !tbaa !27
  br label %89

89:                                               ; preds = %84, %59
  %90 = load ptr, ptr %3, align 8, !tbaa !5
  %91 = icmp eq ptr %90, null
  br i1 %91, label %92, label %93

92:                                               ; preds = %89
  store ptr @.str.6, ptr %3, align 8, !tbaa !5
  br label %93

93:                                               ; preds = %92, %89
  %94 = load ptr, ptr %3, align 8, !tbaa !5
  %95 = call i64 @strlen(ptr noundef %94) #10
  %96 = trunc i64 %95 to i32
  %97 = add nsw i32 %96, 2
  %98 = icmp slt i32 %97, 32
  br i1 %98, label %99, label %100

99:                                               ; preds = %93
  br label %102

100:                                              ; preds = %93
  call void @__assert_fail(ptr noundef @.str.7, ptr noundef @.str.2, i32 noundef 331, ptr noundef @__PRETTY_FUNCTION__._Z22ImGui_ImplOpenGL3_InitPKc) #9
  unreachable

101:                                              ; No predecessors!
  br label %102

102:                                              ; preds = %101, %99
  %103 = load ptr, ptr %6, align 8, !tbaa !5
  %104 = getelementptr inbounds %struct.ImGui_ImplOpenGL3_Data, ptr %103, i32 0, i32 1
  %105 = getelementptr inbounds [32 x i8], ptr %104, i64 0, i64 0
  %106 = load ptr, ptr %3, align 8, !tbaa !5
  %107 = call ptr @strcpy(ptr noundef %105, ptr noundef %106) #8
  %108 = load ptr, ptr %6, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct.ImGui_ImplOpenGL3_Data, ptr %108, i32 0, i32 1
  %110 = getelementptr inbounds [32 x i8], ptr %109, i64 0, i64 0
  %111 = call ptr @strcat(ptr noundef %110, ptr noundef @.str.8) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #8
  %112 = load ptr, ptr getelementptr inbounds (%struct.anon.0, ptr @imgl3wProcs, i32 0, i32 34), align 8, !tbaa !20
  call void %112(i32 noundef 32873, ptr noundef %13)
  %113 = load ptr, ptr %6, align 8, !tbaa !5
  %114 = getelementptr inbounds %struct.ImGui_ImplOpenGL3_Data, ptr %113, i32 0, i32 0
  %115 = load i32, ptr %114, align 8, !tbaa !21
  %116 = icmp uge i32 %115, 450
  %117 = load ptr, ptr %6, align 8, !tbaa !5
  %118 = getelementptr inbounds %struct.ImGui_ImplOpenGL3_Data, ptr %117, i32 0, i32 16
  %119 = zext i1 %116 to i8
  store i8 %119, ptr %118, align 8, !tbaa !28
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #8
  store i32 0, ptr %14, align 4, !tbaa !19
  %120 = load ptr, ptr getelementptr inbounds (%struct.anon.0, ptr @imgl3wProcs, i32 0, i32 34), align 8, !tbaa !20
  call void %120(i32 noundef 33309, ptr noundef %14)
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #8
  store i32 0, ptr %15, align 4, !tbaa !19
  br label %121

121:                                              ; preds = %140, %102
  %122 = load i32, ptr %15, align 4, !tbaa !19
  %123 = load i32, ptr %14, align 4, !tbaa !19
  %124 = icmp slt i32 %122, %123
  br i1 %124, label %126, label %125

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

126:                                              ; preds = %121
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #8
  %127 = load ptr, ptr getelementptr inbounds (%struct.anon.0, ptr @imgl3wProcs, i32 0, i32 40), align 8, !tbaa !20
  %128 = load i32, ptr %15, align 4, !tbaa !19
  %129 = call noundef ptr %127(i32 noundef 7939, i32 noundef %128)
  store ptr %129, ptr %16, align 8, !tbaa !5
  %130 = load ptr, ptr %16, align 8, !tbaa !5
  %131 = icmp ne ptr %130, null
  br i1 %131, label %132, label %139

132:                                              ; preds = %126
  %133 = load ptr, ptr %16, align 8, !tbaa !5
  %134 = call i32 @strcmp(ptr noundef %133, ptr noundef @.str.9) #10
  %135 = icmp eq i32 %134, 0
  br i1 %135, label %136, label %139

136:                                              ; preds = %132
  %137 = load ptr, ptr %6, align 8, !tbaa !5
  %138 = getelementptr inbounds %struct.ImGui_ImplOpenGL3_Data, ptr %137, i32 0, i32 16
  store i8 1, ptr %138, align 8, !tbaa !28
  br label %139

139:                                              ; preds = %136, %132, %126
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #8
  br label %140

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

143:                                              ; preds = %125
  store i1 true, ptr %2, align 1
  store i32 1, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #8
  br label %144

144:                                              ; preds = %143, %31
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #8
  %145 = load i1, ptr %2, align 1
  ret i1 %145

146:                                              ; preds = %55
  %147 = load ptr, ptr %8, align 8
  %148 = load i32, ptr %9, align 4
  %149 = insertvalue { ptr, i32 } poison, ptr %147, 0
  %150 = insertvalue { ptr, i32 } %149, i32 %148, 1
  resume { ptr, i32 } %150
}

declare noundef nonnull align 8 dereferenceable(14280) ptr @_ZN5ImGui5GetIOEv() #2

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

; Function Attrs: nounwind
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #4

declare noundef ptr @_ZN5ImGui8MemAllocEm(i64 noundef) #2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN22ImGui_ImplOpenGL3_DataC2Ev(ptr noundef nonnull align 8 dereferenceable(98)) unnamed_addr #6 align 2

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: nounwind
declare i32 @__isoc99_sscanf(ptr noundef, ptr noundef, ...) #4

; Function Attrs: nounwind willreturn memory(read)
declare i64 @strlen(ptr noundef) #7

; Function Attrs: nounwind
declare ptr @strcpy(ptr noundef, ptr noundef) #4

; Function Attrs: nounwind
declare ptr @strcat(ptr noundef, ptr noundef) #4

; Function Attrs: nounwind willreturn memory(read)
declare i32 @strcmp(ptr noundef, ptr noundef) #7

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

!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 152}
!10 = !{!"_ZTS7ImGuiIO", !11, i64 0, !11, i64 4, !12, i64 8, !13, i64 16, !13, i64 20, !6, i64 24, !6, i64 32, !13, i64 40, !13, i64 44, !13, i64 48, !13, i64 52, !13, i64 56, !13, i64 60, !13, i64 64, !6, i64 72, !6, i64 80, !13, i64 88, !14, i64 92, !6, i64 96, !12, i64 104, !14, i64 112, !14, i64 113, !14, i64 114, !14, i64 115, !14, i64 116, !14, i64 117, !14, i64 118, !14, i64 119, !13, i64 120, !14, i64 124, !14, i64 125, !6, i64 128, !6, i64 136, !6, i64 144, !6, i64 152, !6, i64 160, !6, i64 168, !6, i64 176, !6, i64 184, !6, i64 192, !6, i64 200, !14, i64 208, !14, i64 209, !14, i64 210, !14, i64 211, !14, i64 212, !14, i64 213, !14, i64 214, !13, i64 216, !11, i64 220, !11, i64 224, !11, i64 228, !11, i64 232, !11, i64 236, !12, i64 240, !7, i64 248, !7, i64 2856, !7, i64 3508, !6, i64 3576, !12, i64 3584, !7, i64 3592, !13, i64 3600, !13, i64 3604, !15, i64 3608, !14, i64 3612, !14, i64 3613, !14, i64 3614, !14, i64 3615, !11, i64 3616, !7, i64 3620, !14, i64 14052, !12, i64 14056, !7, i64 14064, !7, i64 14104, !7, i64 14144, !7, i64 14149, !7, i64 14154, !7, i64 14164, !7, i64 14174, !7, i64 14179, !7, i64 14184, !14, i64 14189, !7, i64 14192, !7, i64 14212, !7, i64 14232, !13, i64 14252, !14, i64 14256, !14, i64 14257, !7, i64 14258, !14, i64 14259, !16, i64 14260, !17, i64 14264}
!11 = !{!"int", !7, i64 0}
!12 = !{!"_ZTS6ImVec2", !13, i64 0, !13, i64 4}
!13 = !{!"float", !7, i64 0}
!14 = !{!"bool", !7, i64 0}
!15 = !{!"_ZTS16ImGuiMouseSource", !7, i64 0}
!16 = !{!"short", !7, i64 0}
!17 = !{!"_ZTS8ImVectorItE", !11, i64 0, !11, i64 4, !6, i64 8}
!18 = !{!10, !6, i64 136}
!19 = !{!11, !11, i64 0}
!20 = !{!7, !7, i64 0}
!21 = !{!22, !11, i64 0}
!22 = !{!"_ZTS22ImGui_ImplOpenGL3_Data", !11, i64 0, !7, i64 4, !14, i64 36, !11, i64 40, !11, i64 44, !11, i64 48, !11, i64 52, !11, i64 56, !11, i64 60, !11, i64 64, !11, i64 68, !11, i64 72, !11, i64 76, !23, i64 80, !23, i64 88, !14, i64 96, !14, i64 97}
!23 = !{!"long", !7, i64 0}
!24 = !{!22, !11, i64 40}
!25 = !{!22, !14, i64 36}
!26 = !{!22, !14, i64 97}
!27 = !{!10, !11, i64 4}
!28 = !{!22, !14, i64 96}
!29 = distinct !{!29, !30}
!30 = !{!"llvm.loop.mustprogress"}


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

%union.GL3WProcs = type { [59 x ptr] }

@imgl3wProcs = external dso_local local_unnamed_addr global %union.GL3WProcs, align 8
@.str.1 = external hidden unnamed_addr constant [83 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [130 x i8], align 1
@__PRETTY_FUNCTION__._Z22ImGui_ImplOpenGL3_InitPKc = external hidden unnamed_addr constant [42 x i8], align 1
@stderr = external local_unnamed_addr global ptr, align 8
@.str.3 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [106 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [20 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local i32 @imgl3wInit() local_unnamed_addr #0

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_Z22ImGui_ImplOpenGL3_InitPKc(ptr noundef readonly %0) local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = tail call noundef nonnull align 8 dereferenceable(14280) ptr @_ZN5ImGui5GetIOEv()
  %7 = getelementptr inbounds i8, ptr %6, i64 152
  %8 = load ptr, ptr %7, align 8, !tbaa !5
  %9 = icmp eq ptr %8, null
  br i1 %9, label %11, label %10

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

11:                                               ; preds = %1
  %12 = tail call i32 @imgl3wInit()
  %.not = icmp eq i32 %12, 0
  br i1 %.not, label %16, label %13

13:                                               ; preds = %11
  %14 = load ptr, ptr @stderr, align 8, !tbaa !17
  %15 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %14, ptr noundef nonnull @.str.3) #10
  br label %78

16:                                               ; preds = %11
  %17 = tail call noundef ptr @_ZN5ImGui8MemAllocEm(i64 noundef 104)
  %18 = tail call noundef ptr @_Znwm12ImNewWrapperPv(i64 noundef 104, ptr noundef %17)
  tail call void @_ZN22ImGui_ImplOpenGL3_DataC2Ev(ptr noundef nonnull align 8 dereferenceable(98) %18)
  store ptr %18, ptr %7, align 8, !tbaa !5
  %19 = getelementptr inbounds i8, ptr %6, i64 136
  store ptr @.str.4, ptr %19, align 8, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #11
  store i32 0, ptr %2, align 4, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #11
  store i32 0, ptr %3, align 4, !tbaa !19
  %20 = load ptr, ptr getelementptr inbounds (i8, ptr @imgl3wProcs, i64 272), align 8, !tbaa !20
  call void %20(i32 noundef 33307, ptr noundef nonnull %2)
  %21 = load ptr, ptr getelementptr inbounds (i8, ptr @imgl3wProcs, i64 272), align 8, !tbaa !20
  call void %21(i32 noundef 33308, ptr noundef nonnull %3)
  %22 = load i32, ptr %2, align 4, !tbaa !19
  %23 = icmp eq i32 %22, 0
  %24 = load i32, ptr %3, align 4
  %25 = icmp eq i32 %24, 0
  %or.cond = select i1 %23, i1 %25, i1 false
  br i1 %or.cond, label %26, label %30

26:                                               ; preds = %16
  %27 = load ptr, ptr getelementptr inbounds (i8, ptr @imgl3wProcs, i64 312), align 8, !tbaa !20
  %28 = call noundef ptr %27(i32 noundef 7938)
  %29 = call i32 (ptr, ptr, ...) @__isoc99_sscanf(ptr noundef %28, ptr noundef nonnull @.str.5, ptr noundef nonnull %2, ptr noundef nonnull %3) #11
  %.pre = load i32, ptr %2, align 4, !tbaa !19
  %.pre30 = load i32, ptr %3, align 4, !tbaa !19
  br label %30

30:                                               ; preds = %26, %16
  %31 = phi i32 [ %.pre30, %26 ], [ %24, %16 ]
  %32 = phi i32 [ %.pre, %26 ], [ %22, %16 ]
  %33 = mul nsw i32 %32, 100
  %34 = mul nsw i32 %31, 10
  %35 = add nsw i32 %34, %33
  store i32 %35, ptr %18, align 8, !tbaa !21
  %36 = load ptr, ptr getelementptr inbounds (i8, ptr @imgl3wProcs, i64 272), align 8, !tbaa !20
  %37 = getelementptr inbounds i8, ptr %18, i64 40
  call void %36(i32 noundef 37158, ptr noundef nonnull %37)
  %38 = load i32, ptr %37, align 8, !tbaa !24
  %39 = getelementptr inbounds i8, ptr %18, i64 36
  %40 = trunc i32 %38 to i8
  %41 = lshr i8 %40, 1
  %42 = and i8 %41, 1
  store i8 %42, ptr %39, align 4, !tbaa !25
  %43 = getelementptr inbounds i8, ptr %18, i64 97
  store i8 0, ptr %43, align 1, !tbaa !26
  %44 = load i32, ptr %18, align 8, !tbaa !21
  %45 = icmp ugt i32 %44, 319
  br i1 %45, label %46, label %50

46:                                               ; preds = %30
  %47 = getelementptr inbounds i8, ptr %6, i64 4
  %48 = load i32, ptr %47, align 4, !tbaa !27
  %49 = or i32 %48, 8
  store i32 %49, ptr %47, align 4, !tbaa !27
  br label %50

50:                                               ; preds = %46, %30
  %51 = icmp eq ptr %0, null
  %spec.store.select = select i1 %51, ptr @.str.6, ptr %0
  %52 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %spec.store.select) #12
  %53 = trunc i64 %52 to i32
  %54 = icmp slt i32 %53, 30
  br i1 %54, label %56, label %55

55:                                               ; preds = %50
  call void @__assert_fail(ptr noundef nonnull @.str.7, ptr noundef nonnull @.str.2, i32 noundef 331, ptr noundef nonnull @__PRETTY_FUNCTION__._Z22ImGui_ImplOpenGL3_InitPKc) #9
  unreachable

56:                                               ; preds = %50
  %57 = getelementptr inbounds i8, ptr %18, i64 4
  %58 = call ptr @strcpy(ptr noundef nonnull dereferenceable(1) %57, ptr noundef nonnull dereferenceable(1) %spec.store.select) #11
  %59 = call ptr @strcat(ptr noundef nonnull dereferenceable(1) %57, ptr noundef nonnull dereferenceable(1) @.str.8) #11
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #11
  %60 = load ptr, ptr getelementptr inbounds (i8, ptr @imgl3wProcs, i64 272), align 8, !tbaa !20
  call void %60(i32 noundef 32873, ptr noundef nonnull %4)
  %61 = load i32, ptr %18, align 8, !tbaa !21
  %62 = icmp ugt i32 %61, 449
  %63 = getelementptr inbounds i8, ptr %18, i64 96
  %64 = zext i1 %62 to i8
  store i8 %64, ptr %63, align 8, !tbaa !28
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #11
  store i32 0, ptr %5, align 4, !tbaa !19
  %65 = load ptr, ptr getelementptr inbounds (i8, ptr @imgl3wProcs, i64 272), align 8, !tbaa !20
  call void %65(i32 noundef 33309, ptr noundef nonnull %5)
  %66 = load i32, ptr %5, align 4, !tbaa !19
  %67 = icmp sgt i32 %66, 0
  br i1 %67, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %74, %56
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #11
  br label %78

.lr.ph:                                           ; preds = %56, %74
  %.02629 = phi i32 [ %75, %74 ], [ 0, %56 ]
  %68 = load ptr, ptr getelementptr inbounds (i8, ptr @imgl3wProcs, i64 320), align 8, !tbaa !20
  %69 = call noundef ptr %68(i32 noundef 7939, i32 noundef %.02629)
  %.not28 = icmp eq ptr %69, null
  br i1 %.not28, label %74, label %70

70:                                               ; preds = %.lr.ph
  %71 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %69, ptr noundef nonnull dereferenceable(1) @.str.9) #12
  %72 = icmp eq i32 %71, 0
  br i1 %72, label %73, label %74

73:                                               ; preds = %70
  store i8 1, ptr %63, align 8, !tbaa !28
  br label %74

74:                                               ; preds = %73, %70, %.lr.ph
  %75 = add nuw nsw i32 %.02629, 1
  %76 = load i32, ptr %5, align 4, !tbaa !19
  %77 = icmp slt i32 %75, %76
  br i1 %77, label %.lr.ph, label %._crit_edge, !llvm.loop !29

78:                                               ; preds = %._crit_edge, %13
  ret i1 %.not
}

declare noundef nonnull align 8 dereferenceable(14280) ptr @_ZN5ImGui5GetIOEv() local_unnamed_addr #2

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

; Function Attrs: nofree nounwind
declare noundef i32 @fprintf(ptr nocapture noundef, ptr nocapture noundef readonly, ...) local_unnamed_addr #4

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 #5

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN22ImGui_ImplOpenGL3_DataC2Ev(ptr noundef nonnull align 8 dereferenceable(98)) unnamed_addr #6 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_sscanf(ptr nocapture noundef readonly, ptr nocapture noundef readonly, ...) local_unnamed_addr #4

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #7

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: readwrite)
declare ptr @strcpy(ptr noalias noundef returned writeonly, ptr noalias nocapture noundef readonly) local_unnamed_addr #8

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: readwrite)
declare ptr @strcat(ptr noalias noundef returned, ptr noalias nocapture noundef readonly) local_unnamed_addr #8

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i32 @strcmp(ptr nocapture noundef, ptr nocapture noundef) local_unnamed_addr #7

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

!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, !12, i64 152}
!6 = !{!"_ZTS7ImGuiIO", !7, i64 0, !7, i64 4, !10, i64 8, !11, i64 16, !11, i64 20, !12, i64 24, !12, i64 32, !11, i64 40, !11, i64 44, !11, i64 48, !11, i64 52, !11, i64 56, !11, i64 60, !11, i64 64, !12, i64 72, !12, i64 80, !11, i64 88, !13, i64 92, !12, i64 96, !10, i64 104, !13, i64 112, !13, i64 113, !13, i64 114, !13, i64 115, !13, i64 116, !13, i64 117, !13, i64 118, !13, i64 119, !11, i64 120, !13, i64 124, !13, i64 125, !12, i64 128, !12, i64 136, !12, i64 144, !12, i64 152, !12, i64 160, !12, i64 168, !12, i64 176, !12, i64 184, !12, i64 192, !12, i64 200, !13, i64 208, !13, i64 209, !13, i64 210, !13, i64 211, !13, i64 212, !13, i64 213, !13, i64 214, !11, i64 216, !7, i64 220, !7, i64 224, !7, i64 228, !7, i64 232, !7, i64 236, !10, i64 240, !8, i64 248, !8, i64 2856, !8, i64 3508, !12, i64 3576, !10, i64 3584, !8, i64 3592, !11, i64 3600, !11, i64 3604, !14, i64 3608, !13, i64 3612, !13, i64 3613, !13, i64 3614, !13, i64 3615, !7, i64 3616, !8, i64 3620, !13, i64 14052, !10, i64 14056, !8, i64 14064, !8, i64 14104, !8, i64 14144, !8, i64 14149, !8, i64 14154, !8, i64 14164, !8, i64 14174, !8, i64 14179, !8, i64 14184, !13, i64 14189, !8, i64 14192, !8, i64 14212, !8, i64 14232, !11, i64 14252, !13, i64 14256, !13, i64 14257, !8, i64 14258, !13, i64 14259, !15, i64 14260, !16, i64 14264}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTS6ImVec2", !11, i64 0, !11, i64 4}
!11 = !{!"float", !8, i64 0}
!12 = !{!"any pointer", !8, i64 0}
!13 = !{!"bool", !8, i64 0}
!14 = !{!"_ZTS16ImGuiMouseSource", !8, i64 0}
!15 = !{!"short", !8, i64 0}
!16 = !{!"_ZTS8ImVectorItE", !7, i64 0, !7, i64 4, !12, i64 8}
!17 = !{!12, !12, i64 0}
!18 = !{!6, !12, i64 136}
!19 = !{!7, !7, i64 0}
!20 = !{!8, !8, i64 0}
!21 = !{!22, !7, i64 0}
!22 = !{!"_ZTS22ImGui_ImplOpenGL3_Data", !7, i64 0, !8, i64 4, !13, i64 36, !7, i64 40, !7, i64 44, !7, i64 48, !7, i64 52, !7, i64 56, !7, i64 60, !7, i64 64, !7, i64 68, !7, i64 72, !7, i64 76, !23, i64 80, !23, i64 88, !13, i64 96, !13, i64 97}
!23 = !{!"long", !8, i64 0}
!24 = !{!22, !7, i64 40}
!25 = !{!22, !13, i64 36}
!26 = !{!22, !13, i64 97}
!27 = !{!6, !7, i64 4}
!28 = !{!22, !13, i64 96}
!29 = distinct !{!29, !30}
!30 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass