; LLVM IR from hasseily/SuperDuperDisplay :: imgui/examples/example_glfw_opengl2 (main)

; 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.ImVec4 = type { float, float, float, float }
%struct.ImVec2 = type { float, float }
%struct.ImGuiIO = type { i32, i32, %struct.ImVec2, float, float, ptr, ptr, ptr, ptr, float, i8, ptr, %struct.ImVec2, i8, i8, i8, i8, i8, i8, i8, i8, float, float, float, float, float, float, i8, i8, i8, i8, i8, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i16, i8, i8, i8, i8, i8, i8, i8, float, i32, i32, i32, i32, %struct.ImVec2, [666 x i32], [666 x i8], [16 x float], ptr, %struct.ImVec2, [5 x i8], float, float, i32, i8, i8, i8, i8, i32, [666 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.ImVector = type { i32, i32, ptr }

@.str = external hidden unnamed_addr constant [32 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [11 x i8], align 1
@_ZZ4mainE1f = external hidden global float, align 4
@_ZZ4mainE7counter = external hidden global i32, align 4
@.str.2 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [9 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main(i32 noundef %0, ptr noundef %1) #0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca i8, align 1
  %10 = alloca i8, align 1
  %11 = alloca %struct.ImVec4, align 4
  %12 = alloca %struct.ImVec2, align 4
  %13 = alloca %struct.ImVec2, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  store i32 0, ptr %3, align 4
  store i32 %0, ptr %4, align 4, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !9
  %16 = call ptr @glfwSetErrorCallback(ptr noundef @_ZL19glfw_error_callbackiPKc)
  %17 = call i32 @glfwInit()
  %18 = icmp ne i32 %17, 0
  br i1 %18, label %20, label %19

19:                                               ; preds = %2
  store i32 1, ptr %3, align 4
  br label %106

20:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #4
  %21 = call ptr @glfwCreateWindow(i32 noundef 1280, i32 noundef 720, ptr noundef @.str, ptr noundef null, ptr noundef null)
  store ptr %21, ptr %6, align 8, !tbaa !9
  %22 = load ptr, ptr %6, align 8, !tbaa !9
  %23 = icmp eq ptr %22, null
  br i1 %23, label %24, label %25

24:                                               ; preds = %20
  store i32 1, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %105

25:                                               ; preds = %20
  %26 = load ptr, ptr %6, align 8, !tbaa !9
  call void @glfwMakeContextCurrent(ptr noundef %26)
  call void @glfwSwapInterval(i32 noundef 1)
  %27 = call noundef zeroext i1 @_ZN5ImGui30DebugCheckVersionAndDataLayoutEPKcmmmmmm(ptr noundef @.str.1, i64 noundef 14560, i64 noundef 1096, i64 noundef 8, i64 noundef 16, i64 noundef 20, i64 noundef 2)
  %28 = call noundef ptr @_ZN5ImGui13CreateContextEP11ImFontAtlas(ptr noundef null)
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  %29 = call noundef nonnull align 8 dereferenceable(14560) ptr @_ZN5ImGui5GetIOEv()
  store ptr %29, ptr %8, align 8, !tbaa !9
  %30 = load ptr, ptr %8, align 8, !tbaa !9
  %31 = load ptr, ptr %8, align 8, !tbaa !9
  %32 = getelementptr inbounds %struct.ImGuiIO, ptr %31, i32 0, i32 0
  %33 = load i32, ptr %32, align 8, !tbaa !11
  %34 = or i32 %33, 1
  store i32 %34, ptr %32, align 8, !tbaa !11
  %35 = load ptr, ptr %8, align 8, !tbaa !9
  %36 = getelementptr inbounds %struct.ImGuiIO, ptr %35, i32 0, i32 0
  %37 = load i32, ptr %36, align 8, !tbaa !11
  %38 = or i32 %37, 2
  store i32 %38, ptr %36, align 8, !tbaa !11
  call void @_ZN5ImGui15StyleColorsDarkEP10ImGuiStyle(ptr noundef null)
  %39 = load ptr, ptr %6, align 8, !tbaa !9
  %40 = call noundef zeroext i1 @_Z28ImGui_ImplGlfw_InitForOpenGLP10GLFWwindowb(ptr noundef %39, i1 noundef zeroext true)
  %41 = call noundef zeroext i1 @_Z22ImGui_ImplOpenGL2_Initv()
  call void @llvm.lifetime.start.p0(i64 1, ptr %9) #4
  store i8 1, ptr %9, align 1, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 1, ptr %10) #4
  store i8 0, ptr %10, align 1, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 16, ptr %11) #4
  call void @_ZN6ImVec4C2Effff(ptr noundef nonnull align 4 dereferenceable(16) %11, float noundef 0x3FDCCCCCC0000000, float noundef 0x3FE19999A0000000, float noundef 0x3FE3333340000000, float noundef 1.000000e+00)
  br label %42

42:                                               ; preds = %79, %25
  %43 = load ptr, ptr %6, align 8, !tbaa !9
  %44 = call i32 @glfwWindowShouldClose(ptr noundef %43)
  %45 = icmp ne i32 %44, 0
  %46 = xor i1 %45, true
  br i1 %46, label %47, label %103

47:                                               ; preds = %42
  call void @glfwPollEvents()
  call void @_Z26ImGui_ImplOpenGL2_NewFramev()
  call void @_Z23ImGui_ImplGlfw_NewFramev()
  call void @_ZN5ImGui8NewFrameEv()
  %48 = load i8, ptr %9, align 1, !tbaa !19, !range !20, !noundef !21
  %49 = trunc i8 %48 to i1
  br i1 %49, label %50, label %51

50:                                               ; preds = %47
  call void @_ZN5ImGui14ShowDemoWindowEPb(ptr noundef %9)
  br label %51

51:                                               ; preds = %50, %47
  %52 = call noundef zeroext i1 @_ZN5ImGui5BeginEPKcPbi(ptr noundef @.str.2, ptr noundef null, i32 noundef 0)
  call void (ptr, ...) @_ZN5ImGui4TextEPKcz(ptr noundef @.str.3)
  %53 = call noundef zeroext i1 @_ZN5ImGui8CheckboxEPKcPb(ptr noundef @.str.4, ptr noundef %9)
  %54 = call noundef zeroext i1 @_ZN5ImGui8CheckboxEPKcPb(ptr noundef @.str.5, ptr noundef %10)
  %55 = call noundef zeroext i1 @_ZN5ImGui11SliderFloatEPKcPfffS1_i(ptr noundef @.str.6, ptr noundef @_ZZ4mainE1f, float noundef 0.000000e+00, float noundef 1.000000e+00, ptr noundef @.str.7, i32 noundef 0)
  %56 = call noundef zeroext i1 @_ZN5ImGui10ColorEdit3EPKcPfi(ptr noundef @.str.8, ptr noundef %11, i32 noundef 0)
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %12, float noundef 0.000000e+00, float noundef 0.000000e+00)
  %57 = call noundef zeroext i1 @_ZN5ImGui6ButtonEPKcRK6ImVec2(ptr noundef @.str.9, ptr noundef nonnull align 4 dereferenceable(8) %12)
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  br i1 %57, label %58, label %61

58:                                               ; preds = %51
  %59 = load i32, ptr @_ZZ4mainE7counter, align 4, !tbaa !5
  %60 = add nsw i32 %59, 1
  store i32 %60, ptr @_ZZ4mainE7counter, align 4, !tbaa !5
  br label %61

61:                                               ; preds = %58, %51
  call void @_ZN5ImGui8SameLineEff(float noundef 0.000000e+00, float noundef -1.000000e+00)
  %62 = load i32, ptr @_ZZ4mainE7counter, align 4, !tbaa !5
  call void (ptr, ...) @_ZN5ImGui4TextEPKcz(ptr noundef @.str.10, i32 noundef %62)
  %63 = load ptr, ptr %8, align 8, !tbaa !9
  %64 = getelementptr inbounds %struct.ImGuiIO, ptr %63, i32 0, i32 49
  %65 = load float, ptr %64, align 4, !tbaa !22
  %66 = fdiv float 1.000000e+03, %65
  %67 = fpext float %66 to double
  %68 = load ptr, ptr %8, align 8, !tbaa !9
  %69 = getelementptr inbounds %struct.ImGuiIO, ptr %68, i32 0, i32 49
  %70 = load float, ptr %69, align 4, !tbaa !22
  %71 = fpext float %70 to double
  call void (ptr, ...) @_ZN5ImGui4TextEPKcz(ptr noundef @.str.11, double noundef %67, double noundef %71)
  call void @_ZN5ImGui3EndEv()
  %72 = load i8, ptr %10, align 1, !tbaa !19, !range !20, !noundef !21
  %73 = trunc i8 %72 to i1
  br i1 %73, label %74, label %79

74:                                               ; preds = %61
  %75 = call noundef zeroext i1 @_ZN5ImGui5BeginEPKcPbi(ptr noundef @.str.5, ptr noundef %10, i32 noundef 0)
  call void (ptr, ...) @_ZN5ImGui4TextEPKcz(ptr noundef @.str.12)
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %13, float noundef 0.000000e+00, float noundef 0.000000e+00)
  %76 = call noundef zeroext i1 @_ZN5ImGui6ButtonEPKcRK6ImVec2(ptr noundef @.str.13, ptr noundef nonnull align 4 dereferenceable(8) %13)
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  br i1 %76, label %77, label %78

77:                                               ; preds = %74
  store i8 0, ptr %10, align 1, !tbaa !19
  br label %78

78:                                               ; preds = %77, %74
  call void @_ZN5ImGui3EndEv()
  br label %79

79:                                               ; preds = %78, %61
  call void @_ZN5ImGui6RenderEv()
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #4
  %80 = load ptr, ptr %6, align 8, !tbaa !9
  call void @glfwGetFramebufferSize(ptr noundef %80, ptr noundef %14, ptr noundef %15)
  %81 = load i32, ptr %14, align 4, !tbaa !5
  %82 = load i32, ptr %15, align 4, !tbaa !5
  call void @glViewport(i32 noundef 0, i32 noundef 0, i32 noundef %81, i32 noundef %82)
  %83 = getelementptr inbounds %struct.ImVec4, ptr %11, i32 0, i32 0
  %84 = load float, ptr %83, align 4, !tbaa !23
  %85 = getelementptr inbounds %struct.ImVec4, ptr %11, i32 0, i32 3
  %86 = load float, ptr %85, align 4, !tbaa !25
  %87 = fmul float %84, %86
  %88 = getelementptr inbounds %struct.ImVec4, ptr %11, i32 0, i32 1
  %89 = load float, ptr %88, align 4, !tbaa !26
  %90 = getelementptr inbounds %struct.ImVec4, ptr %11, i32 0, i32 3
  %91 = load float, ptr %90, align 4, !tbaa !25
  %92 = fmul float %89, %91
  %93 = getelementptr inbounds %struct.ImVec4, ptr %11, i32 0, i32 2
  %94 = load float, ptr %93, align 4, !tbaa !27
  %95 = getelementptr inbounds %struct.ImVec4, ptr %11, i32 0, i32 3
  %96 = load float, ptr %95, align 4, !tbaa !25
  %97 = fmul float %94, %96
  %98 = getelementptr inbounds %struct.ImVec4, ptr %11, i32 0, i32 3
  %99 = load float, ptr %98, align 4, !tbaa !25
  call void @glClearColor(float noundef %87, float noundef %92, float noundef %97, float noundef %99)
  call void @glClear(i32 noundef 16384)
  %100 = call noundef ptr @_ZN5ImGui11GetDrawDataEv()
  call void @_Z32ImGui_ImplOpenGL2_RenderDrawDataP10ImDrawData(ptr noundef %100)
  %101 = load ptr, ptr %6, align 8, !tbaa !9
  call void @glfwMakeContextCurrent(ptr noundef %101)
  %102 = load ptr, ptr %6, align 8, !tbaa !9
  call void @glfwSwapBuffers(ptr noundef %102)
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  br label %42, !llvm.loop !28

103:                                              ; preds = %42
  call void @_Z26ImGui_ImplOpenGL2_Shutdownv()
  call void @_Z23ImGui_ImplGlfw_Shutdownv()
  call void @_ZN5ImGui14DestroyContextEP12ImGuiContext(ptr noundef null)
  %104 = load ptr, ptr %6, align 8, !tbaa !9
  call void @glfwDestroyWindow(ptr noundef %104)
  call void @glfwTerminate()
  store i32 0, ptr %3, align 4
  store i32 1, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  br label %105

105:                                              ; preds = %103, %24
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  br label %106

106:                                              ; preds = %105, %19
  %107 = load i32, ptr %3, align 4
  ret i32 %107
}

declare ptr @glfwSetErrorCallback(ptr noundef) #1

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @_ZL19glfw_error_callbackiPKc(i32 noundef, ptr noundef) #2

declare i32 @glfwInit() #1

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

declare ptr @glfwCreateWindow(i32 noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef) #1

declare void @glfwMakeContextCurrent(ptr noundef) #1

declare void @glfwSwapInterval(i32 noundef) #1

declare noundef zeroext i1 @_ZN5ImGui30DebugCheckVersionAndDataLayoutEPKcmmmmmm(ptr noundef, i64 noundef, i64 noundef, i64 noundef, i64 noundef, i64 noundef, i64 noundef) #1

declare noundef ptr @_ZN5ImGui13CreateContextEP11ImFontAtlas(ptr noundef) #1

declare noundef nonnull align 8 dereferenceable(14560) ptr @_ZN5ImGui5GetIOEv() #1

declare void @_ZN5ImGui15StyleColorsDarkEP10ImGuiStyle(ptr noundef) #1

declare noundef zeroext i1 @_Z28ImGui_ImplGlfw_InitForOpenGLP10GLFWwindowb(ptr noundef, i1 noundef zeroext) #1

declare noundef zeroext i1 @_Z22ImGui_ImplOpenGL2_Initv() #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6ImVec4C2Effff(ptr noundef nonnull align 4 dereferenceable(16), float noundef, float noundef, float noundef, float noundef) unnamed_addr #2 align 2

declare i32 @glfwWindowShouldClose(ptr noundef) #1

declare void @glfwPollEvents() #1

declare void @_Z26ImGui_ImplOpenGL2_NewFramev() #1

declare void @_Z23ImGui_ImplGlfw_NewFramev() #1

declare void @_ZN5ImGui8NewFrameEv() #1

declare void @_ZN5ImGui14ShowDemoWindowEPb(ptr noundef) #1

declare noundef zeroext i1 @_ZN5ImGui5BeginEPKcPbi(ptr noundef, ptr noundef, i32 noundef) #1

declare void @_ZN5ImGui4TextEPKcz(ptr noundef, ...) #1

declare noundef zeroext i1 @_ZN5ImGui8CheckboxEPKcPb(ptr noundef, ptr noundef) #1

declare noundef zeroext i1 @_ZN5ImGui11SliderFloatEPKcPfffS1_i(ptr noundef, ptr noundef, float noundef, float noundef, ptr noundef, i32 noundef) #1

declare noundef zeroext i1 @_ZN5ImGui10ColorEdit3EPKcPfi(ptr noundef, ptr noundef, i32 noundef) #1

declare noundef zeroext i1 @_ZN5ImGui6ButtonEPKcRK6ImVec2(ptr noundef, ptr noundef nonnull align 4 dereferenceable(8)) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8), float noundef, float noundef) unnamed_addr #2 align 2

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

declare void @_ZN5ImGui8SameLineEff(float noundef, float noundef) #1

declare void @_ZN5ImGui3EndEv() #1

declare void @_ZN5ImGui6RenderEv() #1

declare void @glfwGetFramebufferSize(ptr noundef, ptr noundef, ptr noundef) #1

declare void @glViewport(i32 noundef, i32 noundef, i32 noundef, i32 noundef) #1

declare void @glClearColor(float noundef, float noundef, float noundef, float noundef) #1

declare void @glClear(i32 noundef) #1

declare void @_Z32ImGui_ImplOpenGL2_RenderDrawDataP10ImDrawData(ptr noundef) #1

declare noundef ptr @_ZN5ImGui11GetDrawDataEv() #1

declare void @glfwSwapBuffers(ptr noundef) #1

declare void @_Z26ImGui_ImplOpenGL2_Shutdownv() #1

declare void @_Z23ImGui_ImplGlfw_Shutdownv() #1

declare void @_ZN5ImGui14DestroyContextEP12ImGuiContext(ptr noundef) #1

declare void @glfwDestroyWindow(ptr noundef) #1

declare void @glfwTerminate() #1

attributes #0 = { mustprogress norecurse 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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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 #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !6, i64 0}
!12 = !{!"_ZTS7ImGuiIO", !6, i64 0, !6, i64 4, !13, i64 8, !14, i64 16, !14, i64 20, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !14, i64 56, !15, i64 60, !10, i64 64, !13, i64 72, !15, i64 80, !15, i64 81, !15, i64 82, !15, i64 83, !15, i64 84, !15, i64 85, !15, i64 86, !15, i64 87, !14, i64 88, !14, i64 92, !14, i64 96, !14, i64 100, !14, i64 104, !14, i64 108, !15, i64 112, !15, i64 113, !15, i64 114, !15, i64 115, !15, i64 116, !10, i64 120, !10, i64 128, !10, i64 136, !10, i64 144, !10, i64 152, !10, i64 160, !10, i64 168, !10, i64 176, !10, i64 184, !16, i64 192, !15, i64 194, !15, i64 195, !15, i64 196, !15, i64 197, !15, i64 198, !15, i64 199, !15, i64 200, !14, i64 204, !6, i64 208, !6, i64 212, !6, i64 216, !6, i64 220, !13, i64 224, !7, i64 232, !7, i64 2896, !7, i64 3564, !10, i64 3632, !13, i64 3640, !7, i64 3648, !14, i64 3656, !14, i64 3660, !17, i64 3664, !15, i64 3668, !15, i64 3669, !15, i64 3670, !15, i64 3671, !6, i64 3672, !7, i64 3676, !15, i64 14332, !13, i64 14336, !7, i64 14344, !7, i64 14384, !7, i64 14424, !7, i64 14429, !7, i64 14434, !7, i64 14444, !7, i64 14454, !7, i64 14459, !7, i64 14464, !15, i64 14469, !7, i64 14472, !7, i64 14492, !7, i64 14512, !14, i64 14532, !15, i64 14536, !15, i64 14537, !7, i64 14538, !15, i64 14539, !16, i64 14540, !18, i64 14544}
!13 = !{!"_ZTS6ImVec2", !14, i64 0, !14, i64 4}
!14 = !{!"float", !7, i64 0}
!15 = !{!"bool", !7, i64 0}
!16 = !{!"short", !7, i64 0}
!17 = !{!"_ZTS16ImGuiMouseSource", !7, i64 0}
!18 = !{!"_ZTS8ImVectorItE", !6, i64 0, !6, i64 4, !10, i64 8}
!19 = !{!15, !15, i64 0}
!20 = !{i8 0, i8 2}
!21 = !{}
!22 = !{!12, !14, i64 204}
!23 = !{!24, !14, i64 0}
!24 = !{!"_ZTS6ImVec4", !14, i64 0, !14, i64 4, !14, i64 8, !14, i64 12}
!25 = !{!24, !14, i64 12}
!26 = !{!24, !14, i64 4}
!27 = !{!24, !14, i64 8}
!28 = distinct !{!28, !29}
!29 = !{!"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"

%struct.ImVec4 = type { float, float, float, float }
%struct.ImVec2 = type { float, float }

@.str = external hidden unnamed_addr constant [32 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [11 x i8], align 1
@_ZZ4mainE1f = external hidden global float, align 4
@_ZZ4mainE7counter = external hidden local_unnamed_addr global i32, align 4
@.str.2 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [9 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef range(i32 0, 2) i32 @main(i32 noundef %0, ptr nocapture noundef readnone %1) local_unnamed_addr #0 {
  %3 = alloca i8, align 1
  %4 = alloca i8, align 1
  %5 = alloca %struct.ImVec4, align 4
  %6 = alloca %struct.ImVec2, align 4
  %7 = alloca %struct.ImVec2, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = tail call ptr @glfwSetErrorCallback(ptr noundef nonnull @_ZL19glfw_error_callbackiPKc)
  %11 = tail call i32 @glfwInit()
  %.not = icmp eq i32 %11, 0
  br i1 %.not, label %67, label %12

12:                                               ; preds = %2
  %13 = tail call ptr @glfwCreateWindow(i32 noundef 1280, i32 noundef 720, ptr noundef nonnull @.str, ptr noundef null, ptr noundef null)
  %14 = icmp eq ptr %13, null
  br i1 %14, label %67, label %15

15:                                               ; preds = %12
  tail call void @glfwMakeContextCurrent(ptr noundef nonnull %13)
  tail call void @glfwSwapInterval(i32 noundef 1)
  %16 = tail call noundef zeroext i1 @_ZN5ImGui30DebugCheckVersionAndDataLayoutEPKcmmmmmm(ptr noundef nonnull @.str.1, i64 noundef 14560, i64 noundef 1096, i64 noundef 8, i64 noundef 16, i64 noundef 20, i64 noundef 2)
  %17 = tail call noundef ptr @_ZN5ImGui13CreateContextEP11ImFontAtlas(ptr noundef null)
  %18 = tail call noundef nonnull align 8 dereferenceable(14560) ptr @_ZN5ImGui5GetIOEv()
  %19 = load i32, ptr %18, align 8, !tbaa !5
  %20 = or i32 %19, 3
  store i32 %20, ptr %18, align 8, !tbaa !5
  tail call void @_ZN5ImGui15StyleColorsDarkEP10ImGuiStyle(ptr noundef null)
  %21 = tail call noundef zeroext i1 @_Z28ImGui_ImplGlfw_InitForOpenGLP10GLFWwindowb(ptr noundef nonnull %13, i1 noundef zeroext true)
  %22 = tail call noundef zeroext i1 @_Z22ImGui_ImplOpenGL2_Initv()
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %3) #4
  store i8 1, ptr %3, align 1, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %4) #4
  store i8 0, ptr %4, align 1, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #4
  call void @_ZN6ImVec4C2Effff(ptr noundef nonnull align 4 dereferenceable(16) %5, float noundef 0x3FDCCCCCC0000000, float noundef 0x3FE19999A0000000, float noundef 0x3FE3333340000000, float noundef 1.000000e+00)
  %23 = call i32 @glfwWindowShouldClose(ptr noundef nonnull %13)
  %.not1415 = icmp eq i32 %23, 0
  br i1 %.not1415, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %15
  %24 = getelementptr inbounds i8, ptr %18, i64 204
  %25 = getelementptr inbounds i8, ptr %5, i64 12
  %26 = getelementptr inbounds i8, ptr %5, i64 4
  %27 = getelementptr inbounds i8, ptr %5, i64 8
  br label %28

28:                                               ; preds = %.lr.ph, %55
  call void @glfwPollEvents()
  call void @_Z26ImGui_ImplOpenGL2_NewFramev()
  call void @_Z23ImGui_ImplGlfw_NewFramev()
  call void @_ZN5ImGui8NewFrameEv()
  %29 = load i8, ptr %3, align 1, !tbaa !17, !range !18, !noundef !19
  %30 = trunc nuw i8 %29 to i1
  br i1 %30, label %31, label %32

31:                                               ; preds = %28
  call void @_ZN5ImGui14ShowDemoWindowEPb(ptr noundef nonnull %3)
  br label %32

32:                                               ; preds = %31, %28
  %33 = call noundef zeroext i1 @_ZN5ImGui5BeginEPKcPbi(ptr noundef nonnull @.str.2, ptr noundef null, i32 noundef 0)
  call void (ptr, ...) @_ZN5ImGui4TextEPKcz(ptr noundef nonnull @.str.3)
  %34 = call noundef zeroext i1 @_ZN5ImGui8CheckboxEPKcPb(ptr noundef nonnull @.str.4, ptr noundef nonnull %3)
  %35 = call noundef zeroext i1 @_ZN5ImGui8CheckboxEPKcPb(ptr noundef nonnull @.str.5, ptr noundef nonnull %4)
  %36 = call noundef zeroext i1 @_ZN5ImGui11SliderFloatEPKcPfffS1_i(ptr noundef nonnull @.str.6, ptr noundef nonnull @_ZZ4mainE1f, float noundef 0.000000e+00, float noundef 1.000000e+00, ptr noundef nonnull @.str.7, i32 noundef 0)
  %37 = call noundef zeroext i1 @_ZN5ImGui10ColorEdit3EPKcPfi(ptr noundef nonnull @.str.8, ptr noundef nonnull %5, i32 noundef 0)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #4
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %6, float noundef 0.000000e+00, float noundef 0.000000e+00)
  %38 = call noundef zeroext i1 @_ZN5ImGui6ButtonEPKcRK6ImVec2(ptr noundef nonnull @.str.9, ptr noundef nonnull align 4 dereferenceable(8) %6)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #4
  br i1 %38, label %39, label %42

39:                                               ; preds = %32
  %40 = load i32, ptr @_ZZ4mainE7counter, align 4, !tbaa !20
  %41 = add nsw i32 %40, 1
  store i32 %41, ptr @_ZZ4mainE7counter, align 4, !tbaa !20
  br label %42

42:                                               ; preds = %39, %32
  call void @_ZN5ImGui8SameLineEff(float noundef 0.000000e+00, float noundef -1.000000e+00)
  %43 = load i32, ptr @_ZZ4mainE7counter, align 4, !tbaa !20
  call void (ptr, ...) @_ZN5ImGui4TextEPKcz(ptr noundef nonnull @.str.10, i32 noundef %43)
  %44 = load float, ptr %24, align 4, !tbaa !21
  %45 = fdiv float 1.000000e+03, %44
  %46 = fpext float %45 to double
  %47 = fpext float %44 to double
  call void (ptr, ...) @_ZN5ImGui4TextEPKcz(ptr noundef nonnull @.str.11, double noundef %46, double noundef %47)
  call void @_ZN5ImGui3EndEv()
  %48 = load i8, ptr %4, align 1, !tbaa !17, !range !18, !noundef !19
  %49 = trunc nuw i8 %48 to i1
  br i1 %49, label %50, label %55

50:                                               ; preds = %42
  %51 = call noundef zeroext i1 @_ZN5ImGui5BeginEPKcPbi(ptr noundef nonnull @.str.5, ptr noundef nonnull %4, i32 noundef 0)
  call void (ptr, ...) @_ZN5ImGui4TextEPKcz(ptr noundef nonnull @.str.12)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #4
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %7, float noundef 0.000000e+00, float noundef 0.000000e+00)
  %52 = call noundef zeroext i1 @_ZN5ImGui6ButtonEPKcRK6ImVec2(ptr noundef nonnull @.str.13, ptr noundef nonnull align 4 dereferenceable(8) %7)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #4
  br i1 %52, label %53, label %54

53:                                               ; preds = %50
  store i8 0, ptr %4, align 1, !tbaa !17
  br label %54

54:                                               ; preds = %53, %50
  call void @_ZN5ImGui3EndEv()
  br label %55

55:                                               ; preds = %54, %42
  call void @_ZN5ImGui6RenderEv()
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #4
  call void @glfwGetFramebufferSize(ptr noundef nonnull %13, ptr noundef nonnull %8, ptr noundef nonnull %9)
  %56 = load i32, ptr %8, align 4, !tbaa !20
  %57 = load i32, ptr %9, align 4, !tbaa !20
  call void @glViewport(i32 noundef 0, i32 noundef 0, i32 noundef %56, i32 noundef %57)
  %58 = load float, ptr %5, align 4, !tbaa !22
  %59 = load float, ptr %25, align 4, !tbaa !24
  %60 = fmul float %58, %59
  %61 = load float, ptr %26, align 4, !tbaa !25
  %62 = fmul float %59, %61
  %63 = load float, ptr %27, align 4, !tbaa !26
  %64 = fmul float %59, %63
  call void @glClearColor(float noundef %60, float noundef %62, float noundef %64, float noundef %59)
  call void @glClear(i32 noundef 16384)
  %65 = call noundef ptr @_ZN5ImGui11GetDrawDataEv()
  call void @_Z32ImGui_ImplOpenGL2_RenderDrawDataP10ImDrawData(ptr noundef %65)
  call void @glfwMakeContextCurrent(ptr noundef nonnull %13)
  call void @glfwSwapBuffers(ptr noundef nonnull %13)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #4
  %66 = call i32 @glfwWindowShouldClose(ptr noundef nonnull %13)
  %.not14 = icmp eq i32 %66, 0
  br i1 %.not14, label %28, label %._crit_edge, !llvm.loop !27

._crit_edge:                                      ; preds = %55, %15
  call void @_Z26ImGui_ImplOpenGL2_Shutdownv()
  call void @_Z23ImGui_ImplGlfw_Shutdownv()
  call void @_ZN5ImGui14DestroyContextEP12ImGuiContext(ptr noundef null)
  call void @glfwDestroyWindow(ptr noundef nonnull %13)
  call void @glfwTerminate()
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #4
  br label %67

67:                                               ; preds = %._crit_edge, %12, %2
  %.1 = phi i32 [ 1, %2 ], [ 0, %._crit_edge ], [ 1, %12 ]
  ret i32 %.1
}

declare ptr @glfwSetErrorCallback(ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @_ZL19glfw_error_callbackiPKc(i32 noundef, ptr noundef) #2

declare i32 @glfwInit() local_unnamed_addr #1

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

declare ptr @glfwCreateWindow(i32 noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

declare void @glfwMakeContextCurrent(ptr noundef) local_unnamed_addr #1

declare void @glfwSwapInterval(i32 noundef) local_unnamed_addr #1

declare noundef zeroext i1 @_ZN5ImGui30DebugCheckVersionAndDataLayoutEPKcmmmmmm(ptr noundef, i64 noundef, i64 noundef, i64 noundef, i64 noundef, i64 noundef, i64 noundef) local_unnamed_addr #1

declare noundef ptr @_ZN5ImGui13CreateContextEP11ImFontAtlas(ptr noundef) local_unnamed_addr #1

declare noundef nonnull align 8 dereferenceable(14560) ptr @_ZN5ImGui5GetIOEv() local_unnamed_addr #1

declare void @_ZN5ImGui15StyleColorsDarkEP10ImGuiStyle(ptr noundef) local_unnamed_addr #1

declare noundef zeroext i1 @_Z28ImGui_ImplGlfw_InitForOpenGLP10GLFWwindowb(ptr noundef, i1 noundef zeroext) local_unnamed_addr #1

declare noundef zeroext i1 @_Z22ImGui_ImplOpenGL2_Initv() local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6ImVec4C2Effff(ptr noundef nonnull align 4 dereferenceable(16), float noundef, float noundef, float noundef, float noundef) unnamed_addr #2 align 2

declare i32 @glfwWindowShouldClose(ptr noundef) local_unnamed_addr #1

declare void @glfwPollEvents() local_unnamed_addr #1

declare void @_Z26ImGui_ImplOpenGL2_NewFramev() local_unnamed_addr #1

declare void @_Z23ImGui_ImplGlfw_NewFramev() local_unnamed_addr #1

declare void @_ZN5ImGui8NewFrameEv() local_unnamed_addr #1

declare void @_ZN5ImGui14ShowDemoWindowEPb(ptr noundef) local_unnamed_addr #1

declare noundef zeroext i1 @_ZN5ImGui5BeginEPKcPbi(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #1

declare void @_ZN5ImGui4TextEPKcz(ptr noundef, ...) local_unnamed_addr #1

declare noundef zeroext i1 @_ZN5ImGui8CheckboxEPKcPb(ptr noundef, ptr noundef) local_unnamed_addr #1

declare noundef zeroext i1 @_ZN5ImGui11SliderFloatEPKcPfffS1_i(ptr noundef, ptr noundef, float noundef, float noundef, ptr noundef, i32 noundef) local_unnamed_addr #1

declare noundef zeroext i1 @_ZN5ImGui10ColorEdit3EPKcPfi(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #1

declare noundef zeroext i1 @_ZN5ImGui6ButtonEPKcRK6ImVec2(ptr noundef, ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8), float noundef, float noundef) unnamed_addr #2 align 2

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

declare void @_ZN5ImGui8SameLineEff(float noundef, float noundef) local_unnamed_addr #1

declare void @_ZN5ImGui3EndEv() local_unnamed_addr #1

declare void @_ZN5ImGui6RenderEv() local_unnamed_addr #1

declare void @glfwGetFramebufferSize(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

declare void @glViewport(i32 noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #1

declare void @glClearColor(float noundef, float noundef, float noundef, float noundef) local_unnamed_addr #1

declare void @glClear(i32 noundef) local_unnamed_addr #1

declare void @_Z32ImGui_ImplOpenGL2_RenderDrawDataP10ImDrawData(ptr noundef) local_unnamed_addr #1

declare noundef ptr @_ZN5ImGui11GetDrawDataEv() local_unnamed_addr #1

declare void @glfwSwapBuffers(ptr noundef) local_unnamed_addr #1

declare void @_Z26ImGui_ImplOpenGL2_Shutdownv() local_unnamed_addr #1

declare void @_Z23ImGui_ImplGlfw_Shutdownv() local_unnamed_addr #1

declare void @_ZN5ImGui14DestroyContextEP12ImGuiContext(ptr noundef) local_unnamed_addr #1

declare void @glfwDestroyWindow(ptr noundef) local_unnamed_addr #1

declare void @glfwTerminate() local_unnamed_addr #1

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 0}
!6 = !{!"_ZTS7ImGuiIO", !7, i64 0, !7, i64 4, !10, i64 8, !11, i64 16, !11, i64 20, !12, i64 24, !12, i64 32, !12, i64 40, !12, i64 48, !11, i64 56, !13, i64 60, !12, i64 64, !10, i64 72, !13, i64 80, !13, i64 81, !13, i64 82, !13, i64 83, !13, i64 84, !13, i64 85, !13, i64 86, !13, i64 87, !11, i64 88, !11, i64 92, !11, i64 96, !11, i64 100, !11, i64 104, !11, i64 108, !13, i64 112, !13, i64 113, !13, i64 114, !13, i64 115, !13, i64 116, !12, i64 120, !12, i64 128, !12, i64 136, !12, i64 144, !12, i64 152, !12, i64 160, !12, i64 168, !12, i64 176, !12, i64 184, !14, i64 192, !13, i64 194, !13, i64 195, !13, i64 196, !13, i64 197, !13, i64 198, !13, i64 199, !13, i64 200, !11, i64 204, !7, i64 208, !7, i64 212, !7, i64 216, !7, i64 220, !10, i64 224, !8, i64 232, !8, i64 2896, !8, i64 3564, !12, i64 3632, !10, i64 3640, !8, i64 3648, !11, i64 3656, !11, i64 3660, !15, i64 3664, !13, i64 3668, !13, i64 3669, !13, i64 3670, !13, i64 3671, !7, i64 3672, !8, i64 3676, !13, i64 14332, !10, i64 14336, !8, i64 14344, !8, i64 14384, !8, i64 14424, !8, i64 14429, !8, i64 14434, !8, i64 14444, !8, i64 14454, !8, i64 14459, !8, i64 14464, !13, i64 14469, !8, i64 14472, !8, i64 14492, !8, i64 14512, !11, i64 14532, !13, i64 14536, !13, i64 14537, !8, i64 14538, !13, i64 14539, !14, i64 14540, !16, i64 14544}
!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 = !{!"_ZTS16ImGuiMouseSource", !8, i64 0}
!16 = !{!"_ZTS8ImVectorItE", !7, i64 0, !7, i64 4, !12, i64 8}
!17 = !{!13, !13, i64 0}
!18 = !{i8 0, i8 2}
!19 = !{}
!20 = !{!7, !7, i64 0}
!21 = !{!6, !11, i64 204}
!22 = !{!23, !11, i64 0}
!23 = !{!"_ZTS6ImVec4", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12}
!24 = !{!23, !11, i64 12}
!25 = !{!23, !11, i64 4}
!26 = !{!23, !11, i64 8}
!27 = distinct !{!27, !28}
!28 = !{!"llvm.loop.mustprogress"}


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