; LLVM IR from godofecht/GANN-Object-Avoidance :: Box2D/Testbed/Framework (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.Camera = type { %struct.b2Vec2, float, float, i32, i32 }
%struct.b2Vec2 = type { float, float }
%struct.b2Version = type { i32, i32, i32 }
%class.DebugDraw = type { %class.b2Draw.base, ptr, ptr, ptr }
%class.b2Draw.base = type <{ ptr, i32 }>
%struct.TestEntry = type { ptr, ptr }
%struct.UIState = type { i8, i32, i32, i8, i8 }

@g_camera = external global %struct.Camera, align 4
@stderr = external global ptr, align 8
@.str = external hidden unnamed_addr constant [27 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [31 x i8], align 1
@b2_version = external global %struct.b2Version, align 4
@_ZN12_GLOBAL__N_110mainWindowE = external hidden global ptr, align 8
@.str.3 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [11 x i8], align 1
@g_debugDraw = external global %class.DebugDraw, align 8
@_ZN12_GLOBAL__N_19testCountE = external hidden global i32, align 4
@g_testEntries = external global [0 x %struct.TestEntry], align 8
@_ZN12_GLOBAL__N_19testIndexE = external hidden global i32, align 4
@_ZN12_GLOBAL__N_113testSelectionE = external hidden global i32, align 4
@_ZN12_GLOBAL__N_15entryE = external hidden global ptr, align 8
@_ZN12_GLOBAL__N_14testE = external hidden global ptr, align 8
@_ZN12_GLOBAL__N_12uiE = external hidden global %struct.UIState, align 4
@.str.6 = external hidden unnamed_addr constant [8 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 [64 x i8], align 16
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca double, align 8
  %10 = alloca double, align 8
  %11 = alloca i8, align 1
  %12 = alloca i32, align 4
  %13 = alloca double, align 8
  %14 = alloca double, align 8
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca double, align 8
  %19 = alloca double, align 8
  %20 = alloca [32 x i8], align 16
  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
  store i32 1024, ptr getelementptr inbounds (%struct.Camera, ptr @g_camera, i32 0, i32 3), align 4, !tbaa !11
  store i32 640, ptr getelementptr inbounds (%struct.Camera, ptr @g_camera, i32 0, i32 4), align 4, !tbaa !15
  %21 = call i32 @glfwInit()
  %22 = icmp eq i32 %21, 0
  br i1 %22, label %23, label %26

23:                                               ; preds = %2
  %24 = load ptr, ptr @stderr, align 8, !tbaa !9
  %25 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %24, ptr noundef @.str) #10
  store i32 -1, ptr %3, align 4
  br label %144

26:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 64, ptr %6) #10
  %27 = getelementptr inbounds [64 x i8], ptr %6, i64 0, i64 0
  %28 = load i32, ptr @b2_version, align 4, !tbaa !16
  %29 = load i32, ptr getelementptr inbounds (%struct.b2Version, ptr @b2_version, i32 0, i32 1), align 4, !tbaa !18
  %30 = load i32, ptr getelementptr inbounds (%struct.b2Version, ptr @b2_version, i32 0, i32 2), align 4, !tbaa !19
  %31 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %27, ptr noundef @.str.2, i32 noundef %28, i32 noundef %29, i32 noundef %30) #10
  %32 = load i32, ptr getelementptr inbounds (%struct.Camera, ptr @g_camera, i32 0, i32 3), align 4, !tbaa !11
  %33 = load i32, ptr getelementptr inbounds (%struct.Camera, ptr @g_camera, i32 0, i32 4), align 4, !tbaa !15
  %34 = getelementptr inbounds [64 x i8], ptr %6, i64 0, i64 0
  %35 = call ptr @glfwCreateWindow(i32 noundef %32, i32 noundef %33, ptr noundef %34, ptr noundef null, ptr noundef null)
  store ptr %35, ptr @_ZN12_GLOBAL__N_110mainWindowE, align 8, !tbaa !9
  %36 = load ptr, ptr @_ZN12_GLOBAL__N_110mainWindowE, align 8, !tbaa !9
  %37 = icmp eq ptr %36, null
  br i1 %37, label %38, label %41

38:                                               ; preds = %26
  %39 = load ptr, ptr @stderr, align 8, !tbaa !9
  %40 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %39, ptr noundef @.str.3) #10
  call void @glfwTerminate()
  store i32 -1, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %143

41:                                               ; preds = %26
  %42 = load ptr, ptr @_ZN12_GLOBAL__N_110mainWindowE, align 8, !tbaa !9
  call void @glfwMakeContextCurrent(ptr noundef %42)
  %43 = call ptr @glGetString(i32 noundef 7938)
  %44 = call ptr @glGetString(i32 noundef 35724)
  %45 = call i32 (ptr, ...) @printf(ptr noundef @.str.4, ptr noundef %43, ptr noundef %44)
  %46 = load ptr, ptr @_ZN12_GLOBAL__N_110mainWindowE, align 8, !tbaa !9
  %47 = call ptr @glfwSetScrollCallback(ptr noundef %46, ptr noundef @_ZL15sScrollCallbackP10GLFWwindowdd)
  %48 = load ptr, ptr @_ZN12_GLOBAL__N_110mainWindowE, align 8, !tbaa !9
  %49 = call ptr @glfwSetWindowSizeCallback(ptr noundef %48, ptr noundef @_ZL13sResizeWindowP10GLFWwindowii)
  %50 = load ptr, ptr @_ZN12_GLOBAL__N_110mainWindowE, align 8, !tbaa !9
  %51 = call ptr @glfwSetKeyCallback(ptr noundef %50, ptr noundef @_ZL12sKeyCallbackP10GLFWwindowiiii)
  %52 = load ptr, ptr @_ZN12_GLOBAL__N_110mainWindowE, align 8, !tbaa !9
  %53 = call ptr @glfwSetMouseButtonCallback(ptr noundef %52, ptr noundef @_ZL12sMouseButtonP10GLFWwindowiii)
  %54 = load ptr, ptr @_ZN12_GLOBAL__N_110mainWindowE, align 8, !tbaa !9
  %55 = call ptr @glfwSetCursorPosCallback(ptr noundef %54, ptr noundef @_ZL12sMouseMotionP10GLFWwindowdd)
  %56 = load ptr, ptr @_ZN12_GLOBAL__N_110mainWindowE, align 8, !tbaa !9
  %57 = call ptr @glfwSetScrollCallback(ptr noundef %56, ptr noundef @_ZL15sScrollCallbackP10GLFWwindowdd)
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #10
  %58 = call i32 @glewInit()
  store i32 %58, ptr %8, align 4, !tbaa !5
  %59 = load i32, ptr %8, align 4, !tbaa !5
  %60 = icmp ne i32 0, %59
  br i1 %60, label %61, label %66

61:                                               ; preds = %41
  %62 = load ptr, ptr @stderr, align 8, !tbaa !9
  %63 = load i32, ptr %8, align 4, !tbaa !5
  %64 = call ptr @glewGetErrorString(i32 noundef %63)
  %65 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %62, ptr noundef @.str.5, ptr noundef %64) #10
  call void @exit(i32 noundef 1) #11
  unreachable

66:                                               ; preds = %41
  call void @_ZN9DebugDraw6CreateEv(ptr noundef nonnull align 8 dereferenceable(40) @g_debugDraw)
  call void @_ZL9sCreateUIv()
  store i32 0, ptr @_ZN12_GLOBAL__N_19testCountE, align 4, !tbaa !5
  br label %67

67:                                               ; preds = %74, %66
  %68 = load i32, ptr @_ZN12_GLOBAL__N_19testCountE, align 4, !tbaa !5
  %69 = sext i32 %68 to i64
  %70 = getelementptr inbounds [0 x %struct.TestEntry], ptr @g_testEntries, i64 0, i64 %69
  %71 = getelementptr inbounds %struct.TestEntry, ptr %70, i32 0, i32 1
  %72 = load ptr, ptr %71, align 8, !tbaa !20
  %73 = icmp ne ptr %72, null
  br i1 %73, label %74, label %77

74:                                               ; preds = %67
  %75 = load i32, ptr @_ZN12_GLOBAL__N_19testCountE, align 4, !tbaa !5
  %76 = add nsw i32 %75, 1
  store i32 %76, ptr @_ZN12_GLOBAL__N_19testCountE, align 4, !tbaa !5
  br label %67, !llvm.loop !22

77:                                               ; preds = %67
  %78 = load i32, ptr @_ZN12_GLOBAL__N_19testIndexE, align 4, !tbaa !5
  %79 = load i32, ptr @_ZN12_GLOBAL__N_19testCountE, align 4, !tbaa !5
  %80 = sub nsw i32 %79, 1
  %81 = call noundef i32 @_Z7b2ClampIiET_S0_S0_S0_(i32 noundef %78, i32 noundef 0, i32 noundef %80)
  store i32 %81, ptr @_ZN12_GLOBAL__N_19testIndexE, align 4, !tbaa !5
  %82 = load i32, ptr @_ZN12_GLOBAL__N_19testIndexE, align 4, !tbaa !5
  store i32 %82, ptr @_ZN12_GLOBAL__N_113testSelectionE, align 4, !tbaa !5
  %83 = load i32, ptr @_ZN12_GLOBAL__N_19testIndexE, align 4, !tbaa !5
  %84 = sext i32 %83 to i64
  %85 = getelementptr inbounds %struct.TestEntry, ptr @g_testEntries, i64 %84
  store ptr %85, ptr @_ZN12_GLOBAL__N_15entryE, align 8, !tbaa !9
  %86 = load ptr, ptr @_ZN12_GLOBAL__N_15entryE, align 8, !tbaa !9
  %87 = getelementptr inbounds %struct.TestEntry, ptr %86, i32 0, i32 1
  %88 = load ptr, ptr %87, align 8, !tbaa !20
  %89 = call noundef ptr %88()
  store ptr %89, ptr @_ZN12_GLOBAL__N_14testE, align 8, !tbaa !9
  call void @glfwSwapInterval(i32 noundef 1)
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #10
  %90 = call double @glfwGetTime()
  store double %90, ptr %9, align 8, !tbaa !24
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #10
  store double 0.000000e+00, ptr %10, align 8, !tbaa !24
  call void @glClearColor(float noundef 0x3FD3333340000000, float noundef 0x3FD3333340000000, float noundef 0x3FD3333340000000, float noundef 1.000000e+00)
  br label %91

91:                                               ; preds = %118, %77
  %92 = load ptr, ptr @_ZN12_GLOBAL__N_110mainWindowE, align 8, !tbaa !9
  %93 = call i32 @glfwWindowShouldClose(ptr noundef %92)
  %94 = icmp ne i32 %93, 0
  %95 = xor i1 %94, true
  br i1 %95, label %96, label %142

96:                                               ; preds = %91
  %97 = load ptr, ptr @_ZN12_GLOBAL__N_110mainWindowE, align 8, !tbaa !9
  call void @glfwGetWindowSize(ptr noundef %97, ptr noundef getelementptr inbounds (%struct.Camera, ptr @g_camera, i32 0, i32 3), ptr noundef getelementptr inbounds (%struct.Camera, ptr @g_camera, i32 0, i32 4))
  %98 = load i32, ptr getelementptr inbounds (%struct.Camera, ptr @g_camera, i32 0, i32 3), align 4, !tbaa !11
  %99 = load i32, ptr getelementptr inbounds (%struct.Camera, ptr @g_camera, i32 0, i32 4), align 4, !tbaa !15
  call void @glViewport(i32 noundef 0, i32 noundef 0, i32 noundef %98, i32 noundef %99)
  call void @glClear(i32 noundef 16640)
  call void @llvm.lifetime.start.p0(i64 1, ptr %11) #10
  store i8 0, ptr %11, align 1, !tbaa !26
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #10
  %100 = load i32, ptr getelementptr inbounds (%struct.UIState, ptr @_ZN12_GLOBAL__N_12uiE, i32 0, i32 1), align 4, !tbaa !27
  store i32 %100, ptr %12, align 4, !tbaa !5
  store i32 0, ptr getelementptr inbounds (%struct.UIState, ptr @_ZN12_GLOBAL__N_12uiE, i32 0, i32 1), align 4, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #10
  %101 = load ptr, ptr @_ZN12_GLOBAL__N_110mainWindowE, align 8, !tbaa !9
  call void @glfwGetCursorPos(ptr noundef %101, ptr noundef %13, ptr noundef %14)
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #10
  %102 = load double, ptr %13, align 8, !tbaa !24
  %103 = fptosi double %102 to i32
  store i32 %103, ptr %15, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #10
  %104 = load double, ptr %14, align 8, !tbaa !24
  %105 = fptosi double %104 to i32
  store i32 %105, ptr %16, align 4, !tbaa !5
  %106 = load i32, ptr getelementptr inbounds (%struct.Camera, ptr @g_camera, i32 0, i32 4), align 4, !tbaa !15
  %107 = load i32, ptr %16, align 4, !tbaa !5
  %108 = sub nsw i32 %106, %107
  store i32 %108, ptr %16, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #10
  %109 = load ptr, ptr @_ZN12_GLOBAL__N_110mainWindowE, align 8, !tbaa !9
  %110 = call i32 @glfwGetMouseButton(ptr noundef %109, i32 noundef 0)
  store i32 %110, ptr %17, align 4, !tbaa !5
  %111 = load i32, ptr %17, align 4, !tbaa !5
  %112 = icmp eq i32 %111, 1
  br i1 %112, label %113, label %118

113:                                              ; preds = %96
  %114 = load i8, ptr %11, align 1, !tbaa !26
  %115 = zext i8 %114 to i32
  %116 = or i32 %115, 1
  %117 = trunc i32 %116 to i8
  store i8 %117, ptr %11, align 1, !tbaa !26
  br label %118

118:                                              ; preds = %113, %96
  %119 = load i32, ptr %15, align 4, !tbaa !5
  %120 = load i32, ptr %16, align 4, !tbaa !5
  %121 = load i8, ptr %11, align 1, !tbaa !26
  %122 = load i32, ptr %12, align 4, !tbaa !5
  call void @_Z15imguiBeginFrameiihi(i32 noundef %119, i32 noundef %120, i8 noundef zeroext %121, i32 noundef %122)
  call void @_ZL9sSimulatev()
  call void @_ZL10sInterfacev()
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #10
  %123 = call double @glfwGetTime()
  store double %123, ptr %18, align 8, !tbaa !24
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #10
  store double 0x3FECCCCCC0000000, ptr %19, align 8, !tbaa !24
  %124 = load double, ptr %19, align 8, !tbaa !24
  %125 = load double, ptr %10, align 8, !tbaa !24
  %126 = load double, ptr %19, align 8, !tbaa !24
  %127 = fsub double 1.000000e+00, %126
  %128 = load double, ptr %18, align 8, !tbaa !24
  %129 = load double, ptr %9, align 8, !tbaa !24
  %130 = fsub double %128, %129
  %131 = fmul double %127, %130
  %132 = call double @llvm.fmuladd.f64(double %124, double %125, double %131)
  store double %132, ptr %10, align 8, !tbaa !24
  %133 = load double, ptr %18, align 8, !tbaa !24
  store double %133, ptr %9, align 8, !tbaa !24
  call void @llvm.lifetime.start.p0(i64 32, ptr %20) #10
  %134 = getelementptr inbounds [32 x i8], ptr %20, i64 0, i64 0
  %135 = load double, ptr %10, align 8, !tbaa !24
  %136 = fmul double 1.000000e+03, %135
  %137 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef %134, i64 noundef 32, ptr noundef @.str.6, double noundef %136) #10
  %138 = getelementptr inbounds [32 x i8], ptr %20, i64 0, i64 0
  call void @_Z13AddGfxCmdTextii9TextAlignPKcj(i32 noundef 5, i32 noundef 5, i32 noundef 0, ptr noundef %138, i32 noundef -1)
  call void @glEnable(i32 noundef 3042)
  call void @glBlendFunc(i32 noundef 770, i32 noundef 771)
  call void @glDisable(i32 noundef 2929)
  %139 = load i32, ptr getelementptr inbounds (%struct.Camera, ptr @g_camera, i32 0, i32 3), align 4, !tbaa !11
  %140 = load i32, ptr getelementptr inbounds (%struct.Camera, ptr @g_camera, i32 0, i32 4), align 4, !tbaa !15
  call void @_Z13RenderGLFlushii(i32 noundef %139, i32 noundef %140)
  %141 = load ptr, ptr @_ZN12_GLOBAL__N_110mainWindowE, align 8, !tbaa !9
  call void @glfwSwapBuffers(ptr noundef %141)
  call void @glfwPollEvents()
  call void @llvm.lifetime.end.p0(i64 32, ptr %20) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #10
  br label %91, !llvm.loop !30

142:                                              ; preds = %91
  call void @_ZN9DebugDraw7DestroyEv(ptr noundef nonnull align 8 dereferenceable(40) @g_debugDraw)
  call void @_Z15RenderGLDestroyv()
  call void @glfwTerminate()
  store i32 0, ptr %3, align 4
  store i32 1, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #10
  br label %143

143:                                              ; preds = %142, %38
  call void @llvm.lifetime.end.p0(i64 64, ptr %6) #10
  br label %144

144:                                              ; preds = %143, %23
  %145 = load i32, ptr %3, align 4
  ret i32 %145
}

declare i32 @glfwInit() #1

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

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

; Function Attrs: nounwind
declare i32 @sprintf(ptr noundef, ptr noundef, ...) #2

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

declare void @glfwTerminate() #1

declare void @glfwMakeContextCurrent(ptr noundef) #1

declare i32 @printf(ptr noundef, ...) #1

declare ptr @glGetString(i32 noundef) #1

declare ptr @glfwSetScrollCallback(ptr noundef, ptr noundef) #1

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @_ZL15sScrollCallbackP10GLFWwindowdd(ptr noundef, double noundef, double noundef) #4

declare ptr @glfwSetWindowSizeCallback(ptr noundef, ptr noundef) #1

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

declare ptr @glfwSetKeyCallback(ptr noundef, ptr noundef) #1

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL12sKeyCallbackP10GLFWwindowiiii(ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) #5

declare ptr @glfwSetMouseButtonCallback(ptr noundef, ptr noundef) #1

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL12sMouseButtonP10GLFWwindowiii(ptr noundef, i32 noundef, i32 noundef, i32 noundef) #6

declare ptr @glfwSetCursorPosCallback(ptr noundef, ptr noundef) #1

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL12sMouseMotionP10GLFWwindowdd(ptr noundef, double noundef, double noundef) #6

declare i32 @glewInit() #1

declare ptr @glewGetErrorString(i32 noundef) #1

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) #7

declare void @_ZN9DebugDraw6CreateEv(ptr noundef nonnull align 8 dereferenceable(40)) #1

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL9sCreateUIv() #5

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_Z7b2ClampIiET_S0_S0_S0_(i32 noundef, i32 noundef, i32 noundef) #8

declare void @glfwSwapInterval(i32 noundef) #1

declare double @glfwGetTime() #1

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

declare i32 @glfwWindowShouldClose(ptr noundef) #1

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

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

declare void @glClear(i32 noundef) #1

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

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

declare void @_Z15imguiBeginFrameiihi(i32 noundef, i32 noundef, i8 noundef zeroext, i32 noundef) #1

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL9sSimulatev() #5

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL10sInterfacev() #5

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #9

; Function Attrs: nounwind
declare i32 @snprintf(ptr noundef, i64 noundef, ptr noundef, ...) #2

declare void @_Z13AddGfxCmdTextii9TextAlignPKcj(i32 noundef, i32 noundef, i32 noundef, ptr noundef, i32 noundef) #1

declare void @glEnable(i32 noundef) #1

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

declare void @glDisable(i32 noundef) #1

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

declare void @glfwSwapBuffers(ptr noundef) #1

declare void @glfwPollEvents() #1

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

declare void @_ZN9DebugDraw7DestroyEv(ptr noundef nonnull align 8 dereferenceable(40)) #1

declare void @_Z15RenderGLDestroyv() #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 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { mustprogress uwtable "min-legal-vector-width"="64" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { noreturn nounwind "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 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #9 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #10 = { nounwind }
attributes #11 = { noreturn 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 16}
!12 = !{!"_ZTS6Camera", !13, i64 0, !14, i64 8, !14, i64 12, !6, i64 16, !6, i64 20}
!13 = !{!"_ZTS6b2Vec2", !14, i64 0, !14, i64 4}
!14 = !{!"float", !7, i64 0}
!15 = !{!12, !6, i64 20}
!16 = !{!17, !6, i64 0}
!17 = !{!"_ZTS9b2Version", !6, i64 0, !6, i64 4, !6, i64 8}
!18 = !{!17, !6, i64 4}
!19 = !{!17, !6, i64 8}
!20 = !{!21, !10, i64 8}
!21 = !{!"_ZTS9TestEntry", !10, i64 0, !10, i64 8}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = !{!25, !25, i64 0}
!25 = !{!"double", !7, i64 0}
!26 = !{!7, !7, i64 0}
!27 = !{!28, !6, i64 4}
!28 = !{!"_ZTS7UIState", !29, i64 0, !6, i64 4, !6, i64 8, !29, i64 12, !29, i64 13}
!29 = !{!"bool", !7, i64 0}
!30 = distinct !{!30, !23}


; 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.Camera = type { %struct.b2Vec2, float, float, i32, i32 }
%struct.b2Vec2 = type { float, float }
%struct.b2Version = type { i32, i32, i32 }
%class.DebugDraw = type { %class.b2Draw.base, ptr, ptr, ptr }
%class.b2Draw.base = type <{ ptr, i32 }>
%struct.TestEntry = type { ptr, ptr }
%struct.UIState = type { i8, i32, i32, i8, i8 }

@g_camera = external global %struct.Camera, align 4
@stderr = external local_unnamed_addr global ptr, align 8
@.str = external hidden unnamed_addr constant [27 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [31 x i8], align 1
@b2_version = external local_unnamed_addr global %struct.b2Version, align 4
@_ZN12_GLOBAL__N_110mainWindowE = external hidden local_unnamed_addr global ptr, align 8
@.str.3 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [11 x i8], align 1
@g_debugDraw = external global %class.DebugDraw, align 8
@_ZN12_GLOBAL__N_19testCountE = external hidden local_unnamed_addr global i32, align 4
@g_testEntries = external global [0 x %struct.TestEntry], align 8
@_ZN12_GLOBAL__N_19testIndexE = external hidden local_unnamed_addr global i32, align 4
@_ZN12_GLOBAL__N_113testSelectionE = external hidden local_unnamed_addr global i32, align 4
@_ZN12_GLOBAL__N_15entryE = external hidden local_unnamed_addr global ptr, align 8
@_ZN12_GLOBAL__N_14testE = external hidden local_unnamed_addr global ptr, align 8
@_ZN12_GLOBAL__N_12uiE = external hidden local_unnamed_addr global %struct.UIState, align 4
@.str.6 = external hidden unnamed_addr constant [8 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef range(i32 -1, 1) i32 @main(i32 noundef %0, ptr nocapture noundef readnone %1) local_unnamed_addr #0 {
  %3 = alloca [64 x i8], align 16
  %4 = alloca double, align 8
  %5 = alloca double, align 8
  %6 = alloca [32 x i8], align 16
  store i32 1024, ptr getelementptr inbounds (i8, ptr @g_camera, i64 16), align 4, !tbaa !5
  store i32 640, ptr getelementptr inbounds (i8, ptr @g_camera, i64 20), align 4, !tbaa !12
  %7 = tail call i32 @glfwInit()
  %8 = icmp eq i32 %7, 0
  br i1 %8, label %9, label %12

9:                                                ; preds = %2
  %10 = load ptr, ptr @stderr, align 8, !tbaa !13
  %11 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %10, ptr noundef nonnull @.str) #10
  br label %88

12:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %3) #11
  %13 = load i32, ptr @b2_version, align 4, !tbaa !15
  %14 = load i32, ptr getelementptr inbounds (i8, ptr @b2_version, i64 4), align 4, !tbaa !17
  %15 = load i32, ptr getelementptr inbounds (i8, ptr @b2_version, i64 8), align 4, !tbaa !18
  %16 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %3, ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %13, i32 noundef %14, i32 noundef %15) #11
  %17 = load i32, ptr getelementptr inbounds (i8, ptr @g_camera, i64 16), align 4, !tbaa !5
  %18 = load i32, ptr getelementptr inbounds (i8, ptr @g_camera, i64 20), align 4, !tbaa !12
  %19 = call ptr @glfwCreateWindow(i32 noundef %17, i32 noundef %18, ptr noundef nonnull %3, ptr noundef null, ptr noundef null)
  store ptr %19, ptr @_ZN12_GLOBAL__N_110mainWindowE, align 8, !tbaa !13
  %20 = icmp eq ptr %19, null
  br i1 %20, label %21, label %24

21:                                               ; preds = %12
  %22 = load ptr, ptr @stderr, align 8, !tbaa !13
  %23 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %22, ptr noundef nonnull @.str.3) #10
  br label %87

24:                                               ; preds = %12
  call void @glfwMakeContextCurrent(ptr noundef nonnull %19)
  %25 = call ptr @glGetString(i32 noundef 7938)
  %26 = call ptr @glGetString(i32 noundef 35724)
  %27 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, ptr noundef %25, ptr noundef %26)
  %28 = load ptr, ptr @_ZN12_GLOBAL__N_110mainWindowE, align 8, !tbaa !13
  %29 = call ptr @glfwSetScrollCallback(ptr noundef %28, ptr noundef nonnull @_ZL15sScrollCallbackP10GLFWwindowdd)
  %30 = load ptr, ptr @_ZN12_GLOBAL__N_110mainWindowE, align 8, !tbaa !13
  %31 = call ptr @glfwSetWindowSizeCallback(ptr noundef %30, ptr noundef nonnull @_ZL13sResizeWindowP10GLFWwindowii)
  %32 = load ptr, ptr @_ZN12_GLOBAL__N_110mainWindowE, align 8, !tbaa !13
  %33 = call ptr @glfwSetKeyCallback(ptr noundef %32, ptr noundef nonnull @_ZL12sKeyCallbackP10GLFWwindowiiii)
  %34 = load ptr, ptr @_ZN12_GLOBAL__N_110mainWindowE, align 8, !tbaa !13
  %35 = call ptr @glfwSetMouseButtonCallback(ptr noundef %34, ptr noundef nonnull @_ZL12sMouseButtonP10GLFWwindowiii)
  %36 = load ptr, ptr @_ZN12_GLOBAL__N_110mainWindowE, align 8, !tbaa !13
  %37 = call ptr @glfwSetCursorPosCallback(ptr noundef %36, ptr noundef nonnull @_ZL12sMouseMotionP10GLFWwindowdd)
  %38 = load ptr, ptr @_ZN12_GLOBAL__N_110mainWindowE, align 8, !tbaa !13
  %39 = call ptr @glfwSetScrollCallback(ptr noundef %38, ptr noundef nonnull @_ZL15sScrollCallbackP10GLFWwindowdd)
  %40 = call i32 @glewInit()
  %.not = icmp eq i32 %40, 0
  br i1 %.not, label %45, label %41

41:                                               ; preds = %24
  %42 = load ptr, ptr @stderr, align 8, !tbaa !13
  %43 = call ptr @glewGetErrorString(i32 noundef %40)
  %44 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %42, ptr noundef nonnull @.str.5, ptr noundef %43) #10
  call void @exit(i32 noundef 1) #12
  unreachable

45:                                               ; preds = %24
  call void @_ZN9DebugDraw6CreateEv(ptr noundef nonnull align 8 dereferenceable(40) @g_debugDraw)
  call void @_ZL9sCreateUIv()
  br label %46

46:                                               ; preds = %46, %45
  %indvars.iv = phi i64 [ %indvars.iv.next, %46 ], [ 0, %45 ]
  %47 = getelementptr inbounds [0 x %struct.TestEntry], ptr @g_testEntries, i64 0, i64 %indvars.iv, i32 1
  %48 = load ptr, ptr %47, align 8, !tbaa !19
  %.not21 = icmp eq ptr %48, null
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  br i1 %.not21, label %49, label %46, !llvm.loop !21

49:                                               ; preds = %46
  %50 = trunc nuw nsw i64 %indvars.iv to i32
  store i32 %50, ptr @_ZN12_GLOBAL__N_19testCountE, align 4, !tbaa !23
  %51 = load i32, ptr @_ZN12_GLOBAL__N_19testIndexE, align 4, !tbaa !23
  %52 = add nsw i32 %50, -1
  %53 = call noundef i32 @_Z7b2ClampIiET_S0_S0_S0_(i32 noundef %51, i32 noundef 0, i32 noundef %52)
  store i32 %53, ptr @_ZN12_GLOBAL__N_19testIndexE, align 4, !tbaa !23
  store i32 %53, ptr @_ZN12_GLOBAL__N_113testSelectionE, align 4, !tbaa !23
  %54 = sext i32 %53 to i64
  %55 = getelementptr inbounds %struct.TestEntry, ptr @g_testEntries, i64 %54
  store ptr %55, ptr @_ZN12_GLOBAL__N_15entryE, align 8, !tbaa !13
  %56 = getelementptr inbounds i8, ptr %55, i64 8
  %57 = load ptr, ptr %56, align 8, !tbaa !19
  %58 = call noundef ptr %57()
  store ptr %58, ptr @_ZN12_GLOBAL__N_14testE, align 8, !tbaa !13
  call void @glfwSwapInterval(i32 noundef 1)
  %59 = call double @glfwGetTime()
  call void @glClearColor(float noundef 0x3FD3333340000000, float noundef 0x3FD3333340000000, float noundef 0x3FD3333340000000, float noundef 1.000000e+00)
  %60 = load ptr, ptr @_ZN12_GLOBAL__N_110mainWindowE, align 8, !tbaa !13
  %61 = call i32 @glfwWindowShouldClose(ptr noundef %60)
  %.not2224 = icmp eq i32 %61, 0
  br i1 %.not2224, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %49, %.lr.ph
  %.01626 = phi double [ %76, %.lr.ph ], [ %59, %49 ]
  %.01725 = phi double [ %79, %.lr.ph ], [ 0.000000e+00, %49 ]
  %62 = load ptr, ptr @_ZN12_GLOBAL__N_110mainWindowE, align 8, !tbaa !13
  call void @glfwGetWindowSize(ptr noundef %62, ptr noundef nonnull getelementptr inbounds (i8, ptr @g_camera, i64 16), ptr noundef nonnull getelementptr inbounds (i8, ptr @g_camera, i64 20))
  %63 = load i32, ptr getelementptr inbounds (i8, ptr @g_camera, i64 16), align 4, !tbaa !5
  %64 = load i32, ptr getelementptr inbounds (i8, ptr @g_camera, i64 20), align 4, !tbaa !12
  call void @glViewport(i32 noundef 0, i32 noundef 0, i32 noundef %63, i32 noundef %64)
  call void @glClear(i32 noundef 16640)
  %65 = load i32, ptr getelementptr inbounds (i8, ptr @_ZN12_GLOBAL__N_12uiE, i64 4), align 4, !tbaa !24
  store i32 0, ptr getelementptr inbounds (i8, ptr @_ZN12_GLOBAL__N_12uiE, i64 4), align 4, !tbaa !24
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #11
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #11
  %66 = load ptr, ptr @_ZN12_GLOBAL__N_110mainWindowE, align 8, !tbaa !13
  call void @glfwGetCursorPos(ptr noundef %66, ptr noundef nonnull %4, ptr noundef nonnull %5)
  %67 = load double, ptr %4, align 8, !tbaa !27
  %68 = fptosi double %67 to i32
  %69 = load double, ptr %5, align 8, !tbaa !27
  %70 = fptosi double %69 to i32
  %71 = load i32, ptr getelementptr inbounds (i8, ptr @g_camera, i64 20), align 4, !tbaa !12
  %72 = sub nsw i32 %71, %70
  %73 = load ptr, ptr @_ZN12_GLOBAL__N_110mainWindowE, align 8, !tbaa !13
  %74 = call i32 @glfwGetMouseButton(ptr noundef %73, i32 noundef 0)
  %75 = icmp eq i32 %74, 1
  %spec.select = zext i1 %75 to i8
  call void @_Z15imguiBeginFrameiihi(i32 noundef %68, i32 noundef %72, i8 noundef zeroext %spec.select, i32 noundef %65)
  call void @_ZL9sSimulatev()
  call void @_ZL10sInterfacev()
  %76 = call double @glfwGetTime()
  %77 = fsub double %76, %.01626
  %78 = fmul double %77, 0x3FB9999A00000000
  %79 = call double @llvm.fmuladd.f64(double %.01725, double 0x3FECCCCCC0000000, double %78)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #11
  %80 = fmul double %79, 1.000000e+03
  %81 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef nonnull dereferenceable(1) %6, i64 noundef 32, ptr noundef nonnull @.str.6, double noundef %80) #11
  call void @_Z13AddGfxCmdTextii9TextAlignPKcj(i32 noundef 5, i32 noundef 5, i32 noundef 0, ptr noundef nonnull %6, i32 noundef -1)
  call void @glEnable(i32 noundef 3042)
  call void @glBlendFunc(i32 noundef 770, i32 noundef 771)
  call void @glDisable(i32 noundef 2929)
  %82 = load i32, ptr getelementptr inbounds (i8, ptr @g_camera, i64 16), align 4, !tbaa !5
  %83 = load i32, ptr getelementptr inbounds (i8, ptr @g_camera, i64 20), align 4, !tbaa !12
  call void @_Z13RenderGLFlushii(i32 noundef %82, i32 noundef %83)
  %84 = load ptr, ptr @_ZN12_GLOBAL__N_110mainWindowE, align 8, !tbaa !13
  call void @glfwSwapBuffers(ptr noundef %84)
  call void @glfwPollEvents()
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #11
  %85 = load ptr, ptr @_ZN12_GLOBAL__N_110mainWindowE, align 8, !tbaa !13
  %86 = call i32 @glfwWindowShouldClose(ptr noundef %85)
  %.not22 = icmp eq i32 %86, 0
  br i1 %.not22, label %.lr.ph, label %._crit_edge, !llvm.loop !29

._crit_edge:                                      ; preds = %.lr.ph, %49
  call void @_ZN9DebugDraw7DestroyEv(ptr noundef nonnull align 8 dereferenceable(40) @g_debugDraw)
  call void @_Z15RenderGLDestroyv()
  br label %87

87:                                               ; preds = %._crit_edge, %21
  %.0 = phi i32 [ -1, %21 ], [ 0, %._crit_edge ]
  call void @glfwTerminate()
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %3) #11
  br label %88

88:                                               ; preds = %87, %9
  %.1 = phi i32 [ -1, %9 ], [ %.0, %87 ]
  ret i32 %.1
}

declare i32 @glfwInit() local_unnamed_addr #1

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

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

; Function Attrs: nofree nounwind
declare noundef i32 @sprintf(ptr noalias nocapture noundef writeonly, ptr nocapture noundef readonly, ...) local_unnamed_addr #2

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

declare void @glfwTerminate() local_unnamed_addr #1

declare void @glfwMakeContextCurrent(ptr noundef) local_unnamed_addr #1

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

declare ptr @glGetString(i32 noundef) local_unnamed_addr #1

declare ptr @glfwSetScrollCallback(ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @_ZL15sScrollCallbackP10GLFWwindowdd(ptr noundef, double noundef, double noundef) #4

declare ptr @glfwSetWindowSizeCallback(ptr noundef, ptr noundef) local_unnamed_addr #1

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

declare ptr @glfwSetKeyCallback(ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL12sKeyCallbackP10GLFWwindowiiii(ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) #5

declare ptr @glfwSetMouseButtonCallback(ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL12sMouseButtonP10GLFWwindowiii(ptr noundef, i32 noundef, i32 noundef, i32 noundef) #6

declare ptr @glfwSetCursorPosCallback(ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL12sMouseMotionP10GLFWwindowdd(ptr noundef, double noundef, double noundef) #6

declare i32 @glewInit() local_unnamed_addr #1

declare ptr @glewGetErrorString(i32 noundef) local_unnamed_addr #1

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) local_unnamed_addr #7

declare void @_ZN9DebugDraw6CreateEv(ptr noundef nonnull align 8 dereferenceable(40)) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL9sCreateUIv() local_unnamed_addr #5

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_Z7b2ClampIiET_S0_S0_S0_(i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #8

declare void @glfwSwapInterval(i32 noundef) local_unnamed_addr #1

declare double @glfwGetTime() local_unnamed_addr #1

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

declare i32 @glfwWindowShouldClose(ptr noundef) local_unnamed_addr #1

declare void @glfwGetWindowSize(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 @glClear(i32 noundef) local_unnamed_addr #1

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

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

declare void @_Z15imguiBeginFrameiihi(i32 noundef, i32 noundef, i8 noundef zeroext, i32 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL9sSimulatev() local_unnamed_addr #5

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL10sInterfacev() local_unnamed_addr #5

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #9

; Function Attrs: nofree nounwind
declare noundef i32 @snprintf(ptr noalias nocapture noundef writeonly, i64 noundef, ptr nocapture noundef readonly, ...) local_unnamed_addr #2

declare void @_Z13AddGfxCmdTextii9TextAlignPKcj(i32 noundef, i32 noundef, i32 noundef, ptr noundef, i32 noundef) local_unnamed_addr #1

declare void @glEnable(i32 noundef) local_unnamed_addr #1

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

declare void @glDisable(i32 noundef) local_unnamed_addr #1

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

declare void @glfwSwapBuffers(ptr noundef) local_unnamed_addr #1

declare void @glfwPollEvents() local_unnamed_addr #1

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

declare void @_ZN9DebugDraw7DestroyEv(ptr noundef nonnull align 8 dereferenceable(40)) local_unnamed_addr #1

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !11, i64 16}
!6 = !{!"_ZTS6Camera", !7, i64 0, !8, i64 8, !8, i64 12, !11, i64 16, !11, i64 20}
!7 = !{!"_ZTS6b2Vec2", !8, i64 0, !8, i64 4}
!8 = !{!"float", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!"int", !9, i64 0}
!12 = !{!6, !11, i64 20}
!13 = !{!14, !14, i64 0}
!14 = !{!"any pointer", !9, i64 0}
!15 = !{!16, !11, i64 0}
!16 = !{!"_ZTS9b2Version", !11, i64 0, !11, i64 4, !11, i64 8}
!17 = !{!16, !11, i64 4}
!18 = !{!16, !11, i64 8}
!19 = !{!20, !14, i64 8}
!20 = !{!"_ZTS9TestEntry", !14, i64 0, !14, i64 8}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}
!23 = !{!11, !11, i64 0}
!24 = !{!25, !11, i64 4}
!25 = !{!"_ZTS7UIState", !26, i64 0, !11, i64 4, !11, i64 8, !26, i64 12, !26, i64 13}
!26 = !{!"bool", !9, i64 0}
!27 = !{!28, !28, i64 0}
!28 = !{!"double", !9, i64 0}
!29 = distinct !{!29, !22}


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