; LLVM IR from theolundqvist/parallax-voxel-ray-marcher :: src/external/Dear 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 { [52 x ptr] }
%struct.ImNewWrapper = type { i8 }
%struct.ImGuiIO = type { i32, i32, %struct.ImVec2, float, float, ptr, ptr, float, float, float, [22 x i32], float, float, ptr, ptr, float, i8, ptr, %struct.ImVec2, i8, i8, i8, i8, i8, i8, float, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, %struct.ImVec2, [5 x i8], float, float, i8, i8, i8, i8, [512 x i8], [20 x float], i8, i8, i8, i8, i8, i8, i8, float, i32, i32, i32, i32, i32, %struct.ImVec2, i32, i32, %struct.ImVec2, [5 x %struct.ImVec2], [5 x double], [5 x i8], [5 x i8], [5 x i8], [5 x i8], [5 x i8], [5 x float], [5 x float], [5 x %struct.ImVec2], [5 x float], [512 x float], [512 x float], [20 x float], [20 x float], float, i16, %struct.ImVector }
%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 }
%struct.ImGui_ImplOpenGL3_Data = type <{ i32, [32 x i8], i32, i32, i32, i32, i32, i32, i32, i32, i32, i8, [3 x i8] }>

@gl3wProcs = external dso_local global %union.GL3WProcs, align 8
@.str.1 = external hidden unnamed_addr constant [82 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [121 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(5456) 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 29
  %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 190, 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 %131

34:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #8
  %35 = call noundef ptr @_ZN5ImGui8MemAllocEm(i64 noundef 76)
  %36 = call noundef ptr @_Znwm12ImNewWrapperPv(i64 noundef 76, ptr noundef %35)
  invoke void @_ZN22ImGui_ImplOpenGL3_DataC2Ev(ptr noundef nonnull align 4 dereferenceable(73) %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 29
  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 27
  store ptr @.str.4, ptr %42, align 8, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #8
  store i32 0, ptr %10, align 4, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #8
  store i32 0, ptr %11, align 4, !tbaa !18
  %43 = load ptr, ptr getelementptr inbounds (%struct.anon.0, ptr @gl3wProcs, i32 0, i32 30), align 8, !tbaa !19
  call void %43(i32 noundef 33307, ptr noundef %10)
  %44 = load ptr, ptr getelementptr inbounds (%struct.anon.0, ptr @gl3wProcs, i32 0, i32 30), align 8, !tbaa !19
  call void %44(i32 noundef 33308, ptr noundef %11)
  %45 = load i32, ptr %10, align 4, !tbaa !18
  %46 = icmp eq i32 %45, 0
  br i1 %46, label %47, label %59

47:                                               ; preds = %37
  %48 = load i32, ptr %11, align 4, !tbaa !18
  %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 @gl3wProcs, i32 0, i32 35), align 8, !tbaa !19
  %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 %133

59:                                               ; preds = %50, %47, %37
  %60 = load i32, ptr %10, align 4, !tbaa !18
  %61 = mul nsw i32 %60, 100
  %62 = load i32, ptr %11, align 4, !tbaa !18
  %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 4, !tbaa !20
  %67 = load ptr, ptr %6, align 8, !tbaa !5
  %68 = getelementptr inbounds %struct.ImGui_ImplOpenGL3_Data, ptr %67, i32 0, i32 0
  %69 = load i32, ptr %68, align 4, !tbaa !20
  %70 = icmp uge i32 %69, 320
  br i1 %70, label %71, label %76

71:                                               ; preds = %59
  %72 = load ptr, ptr %4, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct.ImGuiIO, ptr %72, i32 0, i32 1
  %74 = load i32, ptr %73, align 4, !tbaa !22
  %75 = or i32 %74, 8
  store i32 %75, ptr %73, align 4, !tbaa !22
  br label %76

76:                                               ; preds = %71, %59
  %77 = load ptr, ptr %3, align 8, !tbaa !5
  %78 = icmp eq ptr %77, null
  br i1 %78, label %79, label %80

79:                                               ; preds = %76
  store ptr @.str.6, ptr %3, align 8, !tbaa !5
  br label %80

80:                                               ; preds = %79, %76
  %81 = load ptr, ptr %3, align 8, !tbaa !5
  %82 = call i64 @strlen(ptr noundef %81) #10
  %83 = trunc i64 %82 to i32
  %84 = add nsw i32 %83, 2
  %85 = icmp slt i32 %84, 32
  br i1 %85, label %86, label %87

86:                                               ; preds = %80
  br label %89

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

88:                                               ; No predecessors!
  br label %89

89:                                               ; preds = %88, %86
  %90 = load ptr, ptr %6, align 8, !tbaa !5
  %91 = getelementptr inbounds %struct.ImGui_ImplOpenGL3_Data, ptr %90, i32 0, i32 1
  %92 = getelementptr inbounds [32 x i8], ptr %91, i64 0, i64 0
  %93 = load ptr, ptr %3, align 8, !tbaa !5
  %94 = call ptr @strcpy(ptr noundef %92, ptr noundef %93) #8
  %95 = load ptr, ptr %6, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct.ImGui_ImplOpenGL3_Data, ptr %95, i32 0, i32 1
  %97 = getelementptr inbounds [32 x i8], ptr %96, i64 0, i64 0
  %98 = call ptr @strcat(ptr noundef %97, ptr noundef @.str.8) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #8
  %99 = load ptr, ptr getelementptr inbounds (%struct.anon.0, ptr @gl3wProcs, i32 0, i32 30), align 8, !tbaa !19
  call void %99(i32 noundef 32873, ptr noundef %13)
  %100 = load ptr, ptr %6, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct.ImGui_ImplOpenGL3_Data, ptr %100, i32 0, i32 0
  %102 = load i32, ptr %101, align 4, !tbaa !20
  %103 = icmp uge i32 %102, 450
  %104 = load ptr, ptr %6, align 8, !tbaa !5
  %105 = getelementptr inbounds %struct.ImGui_ImplOpenGL3_Data, ptr %104, i32 0, i32 11
  %106 = zext i1 %103 to i8
  store i8 %106, ptr %105, align 4, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #8
  store i32 0, ptr %14, align 4, !tbaa !18
  %107 = load ptr, ptr getelementptr inbounds (%struct.anon.0, ptr @gl3wProcs, i32 0, i32 30), align 8, !tbaa !19
  call void %107(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 !18
  br label %108

108:                                              ; preds = %127, %89
  %109 = load i32, ptr %15, align 4, !tbaa !18
  %110 = load i32, ptr %14, align 4, !tbaa !18
  %111 = icmp slt i32 %109, %110
  br i1 %111, label %113, label %112

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

113:                                              ; preds = %108
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #8
  %114 = load ptr, ptr getelementptr inbounds (%struct.anon.0, ptr @gl3wProcs, i32 0, i32 36), align 8, !tbaa !19
  %115 = load i32, ptr %15, align 4, !tbaa !18
  %116 = call noundef ptr %114(i32 noundef 7939, i32 noundef %115)
  store ptr %116, ptr %16, align 8, !tbaa !5
  %117 = load ptr, ptr %16, align 8, !tbaa !5
  %118 = icmp ne ptr %117, null
  br i1 %118, label %119, label %126

119:                                              ; preds = %113
  %120 = load ptr, ptr %16, align 8, !tbaa !5
  %121 = call i32 @strcmp(ptr noundef %120, ptr noundef @.str.9) #10
  %122 = icmp eq i32 %121, 0
  br i1 %122, label %123, label %126

123:                                              ; preds = %119
  %124 = load ptr, ptr %6, align 8, !tbaa !5
  %125 = getelementptr inbounds %struct.ImGui_ImplOpenGL3_Data, ptr %124, i32 0, i32 11
  store i8 1, ptr %125, align 4, !tbaa !23
  br label %126

126:                                              ; preds = %123, %119, %113
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #8
  br label %127

127:                                              ; preds = %126
  %128 = load i32, ptr %15, align 4, !tbaa !18
  %129 = add nsw i32 %128, 1
  store i32 %129, ptr %15, align 4, !tbaa !18
  br label %108, !llvm.loop !24

130:                                              ; preds = %112
  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 %131

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

133:                                              ; preds = %55
  %134 = load ptr, ptr %8, align 8
  %135 = load i32, ptr %9, align 4
  %136 = insertvalue { ptr, i32 } poison, ptr %134, 0
  %137 = insertvalue { ptr, i32 } %136, i32 %135, 1
  resume { ptr, i32 } %137
}

declare noundef nonnull align 8 dereferenceable(5456) 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 4 dereferenceable(73)) 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 232}
!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, !7, i64 52, !13, i64 140, !13, i64 144, !6, i64 152, !6, i64 160, !13, i64 168, !14, i64 172, !6, i64 176, !12, i64 184, !14, i64 192, !14, i64 193, !14, i64 194, !14, i64 195, !14, i64 196, !14, i64 197, !13, i64 200, !6, i64 208, !6, i64 216, !6, i64 224, !6, i64 232, !6, i64 240, !6, i64 248, !6, i64 256, !6, i64 264, !6, i64 272, !6, i64 280, !12, i64 288, !7, i64 296, !13, i64 304, !13, i64 308, !14, i64 312, !14, i64 313, !14, i64 314, !14, i64 315, !7, i64 316, !7, i64 828, !14, i64 908, !14, i64 909, !14, i64 910, !14, i64 911, !14, i64 912, !14, i64 913, !14, i64 914, !13, i64 916, !11, i64 920, !11, i64 924, !11, i64 928, !11, i64 932, !11, i64 936, !12, i64 940, !11, i64 948, !11, i64 952, !12, i64 956, !7, i64 964, !7, i64 1008, !7, i64 1048, !7, i64 1053, !7, i64 1058, !7, i64 1063, !7, i64 1068, !7, i64 1076, !7, i64 1096, !7, i64 1116, !7, i64 1156, !7, i64 1176, !7, i64 3224, !7, i64 5272, !7, i64 5352, !13, i64 5432, !15, i64 5436, !16, i64 5440}
!11 = !{!"int", !7, i64 0}
!12 = !{!"_ZTS6ImVec2", !13, i64 0, !13, i64 4}
!13 = !{!"float", !7, i64 0}
!14 = !{!"bool", !7, i64 0}
!15 = !{!"short", !7, i64 0}
!16 = !{!"_ZTS8ImVectorItE", !11, i64 0, !11, i64 4, !6, i64 8}
!17 = !{!10, !6, i64 216}
!18 = !{!11, !11, i64 0}
!19 = !{!7, !7, i64 0}
!20 = !{!21, !11, i64 0}
!21 = !{!"_ZTS22ImGui_ImplOpenGL3_Data", !11, i64 0, !7, i64 4, !11, 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, !14, i64 72}
!22 = !{!10, !11, i64 4}
!23 = !{!21, !14, i64 72}
!24 = distinct !{!24, !25}
!25 = !{!"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 { [52 x ptr] }

@gl3wProcs = external dso_local local_unnamed_addr global %union.GL3WProcs, align 8
@.str.1 = external hidden unnamed_addr constant [82 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [121 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(5456) ptr @_ZN5ImGui5GetIOEv()
  %7 = getelementptr inbounds i8, ptr %6, i64 232
  %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 190, 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 !16
  %15 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %14, ptr noundef nonnull @.str.3) #10
  br label %69

16:                                               ; preds = %11
  %17 = tail call noundef ptr @_ZN5ImGui8MemAllocEm(i64 noundef 76)
  %18 = tail call noundef ptr @_Znwm12ImNewWrapperPv(i64 noundef 76, ptr noundef %17)
  tail call void @_ZN22ImGui_ImplOpenGL3_DataC2Ev(ptr noundef nonnull align 4 dereferenceable(73) %18)
  store ptr %18, ptr %7, align 8, !tbaa !5
  %19 = getelementptr inbounds i8, ptr %6, i64 216
  store ptr @.str.4, ptr %19, align 8, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #11
  store i32 0, ptr %2, align 4, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #11
  store i32 0, ptr %3, align 4, !tbaa !18
  %20 = load ptr, ptr getelementptr inbounds (i8, ptr @gl3wProcs, i64 240), align 8, !tbaa !19
  call void %20(i32 noundef 33307, ptr noundef nonnull %2)
  %21 = load ptr, ptr getelementptr inbounds (i8, ptr @gl3wProcs, i64 240), align 8, !tbaa !19
  call void %21(i32 noundef 33308, ptr noundef nonnull %3)
  %22 = load i32, ptr %2, align 4, !tbaa !18
  %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 @gl3wProcs, i64 280), align 8, !tbaa !19
  %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 !18
  %.pre26 = load i32, ptr %3, align 4, !tbaa !18
  br label %30

30:                                               ; preds = %26, %16
  %31 = phi i32 [ %.pre26, %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 4, !tbaa !20
  %36 = icmp ugt i32 %35, 319
  br i1 %36, label %37, label %41

37:                                               ; preds = %30
  %38 = getelementptr inbounds i8, ptr %6, i64 4
  %39 = load i32, ptr %38, align 4, !tbaa !22
  %40 = or i32 %39, 8
  store i32 %40, ptr %38, align 4, !tbaa !22
  br label %41

41:                                               ; preds = %37, %30
  %42 = icmp eq ptr %0, null
  %spec.store.select = select i1 %42, ptr @.str.6, ptr %0
  %43 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %spec.store.select) #12
  %44 = trunc i64 %43 to i32
  %45 = icmp slt i32 %44, 30
  br i1 %45, label %47, label %46

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

47:                                               ; preds = %41
  %48 = getelementptr inbounds i8, ptr %18, i64 4
  %49 = call ptr @strcpy(ptr noundef nonnull dereferenceable(1) %48, ptr noundef nonnull dereferenceable(1) %spec.store.select) #11
  %50 = call ptr @strcat(ptr noundef nonnull dereferenceable(1) %48, ptr noundef nonnull dereferenceable(1) @.str.8) #11
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #11
  %51 = load ptr, ptr getelementptr inbounds (i8, ptr @gl3wProcs, i64 240), align 8, !tbaa !19
  call void %51(i32 noundef 32873, ptr noundef nonnull %4)
  %52 = load i32, ptr %18, align 4, !tbaa !20
  %53 = icmp ugt i32 %52, 449
  %54 = getelementptr inbounds i8, ptr %18, i64 72
  %55 = zext i1 %53 to i8
  store i8 %55, ptr %54, align 4, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #11
  store i32 0, ptr %5, align 4, !tbaa !18
  %56 = load ptr, ptr getelementptr inbounds (i8, ptr @gl3wProcs, i64 240), align 8, !tbaa !19
  call void %56(i32 noundef 33309, ptr noundef nonnull %5)
  %57 = load i32, ptr %5, align 4, !tbaa !18
  %58 = icmp sgt i32 %57, 0
  br i1 %58, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %65, %47
  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 %69

.lr.ph:                                           ; preds = %47, %65
  %.02225 = phi i32 [ %66, %65 ], [ 0, %47 ]
  %59 = load ptr, ptr getelementptr inbounds (i8, ptr @gl3wProcs, i64 288), align 8, !tbaa !19
  %60 = call noundef ptr %59(i32 noundef 7939, i32 noundef %.02225)
  %.not24 = icmp eq ptr %60, null
  br i1 %.not24, label %65, label %61

61:                                               ; preds = %.lr.ph
  %62 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %60, ptr noundef nonnull dereferenceable(1) @.str.9) #12
  %63 = icmp eq i32 %62, 0
  br i1 %63, label %64, label %65

64:                                               ; preds = %61
  store i8 1, ptr %54, align 4, !tbaa !23
  br label %65

65:                                               ; preds = %64, %61, %.lr.ph
  %66 = add nuw nsw i32 %.02225, 1
  %67 = load i32, ptr %5, align 4, !tbaa !18
  %68 = icmp slt i32 %66, %67
  br i1 %68, label %.lr.ph, label %._crit_edge, !llvm.loop !24

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

declare noundef nonnull align 8 dereferenceable(5456) 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 4 dereferenceable(73)) 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 232}
!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, !8, i64 52, !11, i64 140, !11, i64 144, !12, i64 152, !12, i64 160, !11, i64 168, !13, i64 172, !12, i64 176, !10, i64 184, !13, i64 192, !13, i64 193, !13, i64 194, !13, i64 195, !13, i64 196, !13, i64 197, !11, i64 200, !12, i64 208, !12, i64 216, !12, i64 224, !12, i64 232, !12, i64 240, !12, i64 248, !12, i64 256, !12, i64 264, !12, i64 272, !12, i64 280, !10, i64 288, !8, i64 296, !11, i64 304, !11, i64 308, !13, i64 312, !13, i64 313, !13, i64 314, !13, i64 315, !8, i64 316, !8, i64 828, !13, i64 908, !13, i64 909, !13, i64 910, !13, i64 911, !13, i64 912, !13, i64 913, !13, i64 914, !11, i64 916, !7, i64 920, !7, i64 924, !7, i64 928, !7, i64 932, !7, i64 936, !10, i64 940, !7, i64 948, !7, i64 952, !10, i64 956, !8, i64 964, !8, i64 1008, !8, i64 1048, !8, i64 1053, !8, i64 1058, !8, i64 1063, !8, i64 1068, !8, i64 1076, !8, i64 1096, !8, i64 1116, !8, i64 1156, !8, i64 1176, !8, i64 3224, !8, i64 5272, !8, i64 5352, !11, i64 5432, !14, i64 5436, !15, i64 5440}
!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 = !{!"short", !8, i64 0}
!15 = !{!"_ZTS8ImVectorItE", !7, i64 0, !7, i64 4, !12, i64 8}
!16 = !{!12, !12, i64 0}
!17 = !{!6, !12, i64 216}
!18 = !{!7, !7, i64 0}
!19 = !{!8, !8, i64 0}
!20 = !{!21, !7, i64 0}
!21 = !{!"_ZTS22ImGui_ImplOpenGL3_Data", !7, i64 0, !8, i64 4, !7, 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, !13, i64 72}
!22 = !{!6, !7, i64 4}
!23 = !{!21, !13, i64 72}
!24 = distinct !{!24, !25}
!25 = !{!"llvm.loop.mustprogress"}


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