; LLVM IR from Erkaman/fluid_sim :: deps/glfw-3.2/tests (events)

; 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.GLFWvidmode = type { i32, i32, i32, i32, i32, i32 }
%struct.Slot = type { ptr, i32, i32 }

@.str = external hidden unnamed_addr constant [1 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [5 x i8], align 1
@optarg = external global ptr, align 8
@stderr = external global ptr, align 8
@.str.3 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [20 x i8], align 1
@stdout = external global ptr, align 8

; Function Attrs: nounwind uwtable
define dso_local 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 ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca ptr, align 8
  %14 = alloca [128 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
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  store ptr null, ptr %7, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  store i32 1, ptr %12, align 4, !tbaa !5
  %15 = call ptr @setlocale(i32 noundef 6, ptr noundef @.str) #6
  %16 = call ptr @glfwSetErrorCallback(ptr noundef @error_callback)
  %17 = call i32 @glfwInit()
  %18 = icmp ne i32 %17, 0
  br i1 %18, label %20, label %19

19:                                               ; preds = %2
  call void @exit(i32 noundef 1) #7
  unreachable

20:                                               ; preds = %2
  %21 = call i32 (ptr, ...) @printf(ptr noundef @.str.1)
  %22 = call ptr @glfwSetMonitorCallback(ptr noundef @monitor_callback)
  %23 = call ptr @glfwSetJoystickCallback(ptr noundef @joystick_callback)
  br label %24

24:                                               ; preds = %39, %20
  %25 = load i32, ptr %4, align 4, !tbaa !5
  %26 = load ptr, ptr %5, align 8, !tbaa !9
  %27 = call i32 @getopt(i32 noundef %25, ptr noundef %26, ptr noundef @.str.2)
  store i32 %27, ptr %8, align 4, !tbaa !5
  %28 = icmp ne i32 %27, -1
  br i1 %28, label %29, label %40

29:                                               ; preds = %24
  %30 = load i32, ptr %8, align 4, !tbaa !5
  switch i32 %30, label %38 [
    i32 104, label %31
    i32 102, label %32
    i32 110, label %34
  ]

31:                                               ; preds = %29
  call void @usage()
  call void @exit(i32 noundef 0) #7
  unreachable

32:                                               ; preds = %29
  %33 = call ptr @glfwGetPrimaryMonitor()
  store ptr %33, ptr %7, align 8, !tbaa !9
  br label %39

34:                                               ; preds = %29
  %35 = load ptr, ptr @optarg, align 8, !tbaa !9
  %36 = call i64 @strtol(ptr noundef %35, ptr noundef null, i32 noundef 10) #6
  %37 = trunc i64 %36 to i32
  store i32 %37, ptr %12, align 4, !tbaa !5
  br label %39

38:                                               ; preds = %29
  call void @usage()
  call void @exit(i32 noundef 1) #7
  unreachable

39:                                               ; preds = %34, %32
  br label %24, !llvm.loop !11

40:                                               ; preds = %24
  %41 = load ptr, ptr %7, align 8, !tbaa !9
  %42 = icmp ne ptr %41, null
  br i1 %42, label %43, label %64

43:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  %44 = load ptr, ptr %7, align 8, !tbaa !9
  %45 = call ptr @glfwGetVideoMode(ptr noundef %44)
  store ptr %45, ptr %13, align 8, !tbaa !9
  %46 = load ptr, ptr %13, align 8, !tbaa !9
  %47 = getelementptr inbounds %struct.GLFWvidmode, ptr %46, i32 0, i32 5
  %48 = load i32, ptr %47, align 4, !tbaa !13
  call void @glfwWindowHint(i32 noundef 135183, i32 noundef %48)
  %49 = load ptr, ptr %13, align 8, !tbaa !9
  %50 = getelementptr inbounds %struct.GLFWvidmode, ptr %49, i32 0, i32 2
  %51 = load i32, ptr %50, align 4, !tbaa !15
  call void @glfwWindowHint(i32 noundef 135169, i32 noundef %51)
  %52 = load ptr, ptr %13, align 8, !tbaa !9
  %53 = getelementptr inbounds %struct.GLFWvidmode, ptr %52, i32 0, i32 3
  %54 = load i32, ptr %53, align 4, !tbaa !16
  call void @glfwWindowHint(i32 noundef 135170, i32 noundef %54)
  %55 = load ptr, ptr %13, align 8, !tbaa !9
  %56 = getelementptr inbounds %struct.GLFWvidmode, ptr %55, i32 0, i32 4
  %57 = load i32, ptr %56, align 4, !tbaa !17
  call void @glfwWindowHint(i32 noundef 135171, i32 noundef %57)
  %58 = load ptr, ptr %13, align 8, !tbaa !9
  %59 = getelementptr inbounds %struct.GLFWvidmode, ptr %58, i32 0, i32 0
  %60 = load i32, ptr %59, align 4, !tbaa !18
  store i32 %60, ptr %10, align 4, !tbaa !5
  %61 = load ptr, ptr %13, align 8, !tbaa !9
  %62 = getelementptr inbounds %struct.GLFWvidmode, ptr %61, i32 0, i32 1
  %63 = load i32, ptr %62, align 4, !tbaa !19
  store i32 %63, ptr %11, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  br label %65

64:                                               ; preds = %40
  store i32 640, ptr %10, align 4, !tbaa !5
  store i32 480, ptr %11, align 4, !tbaa !5
  br label %65

65:                                               ; preds = %64, %43
  %66 = load i32, ptr %12, align 4, !tbaa !5
  %67 = icmp ne i32 %66, 0
  br i1 %67, label %71, label %68

68:                                               ; preds = %65
  %69 = load ptr, ptr @stderr, align 8, !tbaa !9
  %70 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %69, ptr noundef @.str.3) #6
  call void @exit(i32 noundef 1) #7
  unreachable

71:                                               ; preds = %65
  %72 = load i32, ptr %12, align 4, !tbaa !5
  %73 = sext i32 %72 to i64
  %74 = call noalias ptr @calloc(i64 noundef %73, i64 noundef 16) #8
  store ptr %74, ptr %6, align 8, !tbaa !9
  store i32 0, ptr %9, align 4, !tbaa !5
  br label %75

75:                                               ; preds = %267, %71
  %76 = load i32, ptr %9, align 4, !tbaa !5
  %77 = load i32, ptr %12, align 4, !tbaa !5
  %78 = icmp slt i32 %76, %77
  br i1 %78, label %79, label %270

79:                                               ; preds = %75
  call void @llvm.lifetime.start.p0(i64 128, ptr %14) #6
  %80 = load ptr, ptr %6, align 8, !tbaa !9
  %81 = load i32, ptr %9, align 4, !tbaa !5
  %82 = sext i32 %81 to i64
  %83 = getelementptr inbounds %struct.Slot, ptr %80, i64 %82
  %84 = getelementptr inbounds %struct.Slot, ptr %83, i32 0, i32 2
  store i32 1, ptr %84, align 4, !tbaa !20
  %85 = load i32, ptr %9, align 4, !tbaa !5
  %86 = add nsw i32 %85, 1
  %87 = load ptr, ptr %6, align 8, !tbaa !9
  %88 = load i32, ptr %9, align 4, !tbaa !5
  %89 = sext i32 %88 to i64
  %90 = getelementptr inbounds %struct.Slot, ptr %87, i64 %89
  %91 = getelementptr inbounds %struct.Slot, ptr %90, i32 0, i32 1
  store i32 %86, ptr %91, align 8, !tbaa !22
  %92 = getelementptr inbounds [128 x i8], ptr %14, i64 0, i64 0
  %93 = load ptr, ptr %6, align 8, !tbaa !9
  %94 = load i32, ptr %9, align 4, !tbaa !5
  %95 = sext i32 %94 to i64
  %96 = getelementptr inbounds %struct.Slot, ptr %93, i64 %95
  %97 = getelementptr inbounds %struct.Slot, ptr %96, i32 0, i32 1
  %98 = load i32, ptr %97, align 8, !tbaa !22
  %99 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %92, ptr noundef @.str.4, i32 noundef %98) #6
  %100 = load ptr, ptr %7, align 8, !tbaa !9
  %101 = icmp ne ptr %100, null
  br i1 %101, label %102, label %114

102:                                              ; preds = %79
  %103 = load ptr, ptr %6, align 8, !tbaa !9
  %104 = load i32, ptr %9, align 4, !tbaa !5
  %105 = sext i32 %104 to i64
  %106 = getelementptr inbounds %struct.Slot, ptr %103, i64 %105
  %107 = getelementptr inbounds %struct.Slot, ptr %106, i32 0, i32 1
  %108 = load i32, ptr %107, align 8, !tbaa !22
  %109 = load i32, ptr %10, align 4, !tbaa !5
  %110 = load i32, ptr %11, align 4, !tbaa !5
  %111 = load ptr, ptr %7, align 8, !tbaa !9
  %112 = call ptr @glfwGetMonitorName(ptr noundef %111)
  %113 = call i32 (ptr, ...) @printf(ptr noundef @.str.5, i32 noundef %108, i32 noundef %109, i32 noundef %110, ptr noundef %112)
  br label %124

114:                                              ; preds = %79
  %115 = load ptr, ptr %6, align 8, !tbaa !9
  %116 = load i32, ptr %9, align 4, !tbaa !5
  %117 = sext i32 %116 to i64
  %118 = getelementptr inbounds %struct.Slot, ptr %115, i64 %117
  %119 = getelementptr inbounds %struct.Slot, ptr %118, i32 0, i32 1
  %120 = load i32, ptr %119, align 8, !tbaa !22
  %121 = load i32, ptr %10, align 4, !tbaa !5
  %122 = load i32, ptr %11, align 4, !tbaa !5
  %123 = call i32 (ptr, ...) @printf(ptr noundef @.str.6, i32 noundef %120, i32 noundef %121, i32 noundef %122)
  br label %124

124:                                              ; preds = %114, %102
  %125 = load i32, ptr %10, align 4, !tbaa !5
  %126 = load i32, ptr %11, align 4, !tbaa !5
  %127 = getelementptr inbounds [128 x i8], ptr %14, i64 0, i64 0
  %128 = load ptr, ptr %7, align 8, !tbaa !9
  %129 = call ptr @glfwCreateWindow(i32 noundef %125, i32 noundef %126, ptr noundef %127, ptr noundef %128, ptr noundef null)
  %130 = load ptr, ptr %6, align 8, !tbaa !9
  %131 = load i32, ptr %9, align 4, !tbaa !5
  %132 = sext i32 %131 to i64
  %133 = getelementptr inbounds %struct.Slot, ptr %130, i64 %132
  %134 = getelementptr inbounds %struct.Slot, ptr %133, i32 0, i32 0
  store ptr %129, ptr %134, align 8, !tbaa !23
  %135 = load ptr, ptr %6, align 8, !tbaa !9
  %136 = load i32, ptr %9, align 4, !tbaa !5
  %137 = sext i32 %136 to i64
  %138 = getelementptr inbounds %struct.Slot, ptr %135, i64 %137
  %139 = getelementptr inbounds %struct.Slot, ptr %138, i32 0, i32 0
  %140 = load ptr, ptr %139, align 8, !tbaa !23
  %141 = icmp ne ptr %140, null
  br i1 %141, label %144, label %142

142:                                              ; preds = %124
  %143 = load ptr, ptr %6, align 8, !tbaa !9
  call void @free(ptr noundef %143) #6
  call void @glfwTerminate()
  call void @exit(i32 noundef 1) #7
  unreachable

144:                                              ; preds = %124
  %145 = load ptr, ptr %6, align 8, !tbaa !9
  %146 = load i32, ptr %9, align 4, !tbaa !5
  %147 = sext i32 %146 to i64
  %148 = getelementptr inbounds %struct.Slot, ptr %145, i64 %147
  %149 = getelementptr inbounds %struct.Slot, ptr %148, i32 0, i32 0
  %150 = load ptr, ptr %149, align 8, !tbaa !23
  %151 = load ptr, ptr %6, align 8, !tbaa !9
  %152 = load i32, ptr %9, align 4, !tbaa !5
  %153 = sext i32 %152 to i64
  %154 = getelementptr inbounds %struct.Slot, ptr %151, i64 %153
  call void @glfwSetWindowUserPointer(ptr noundef %150, ptr noundef %154)
  %155 = load ptr, ptr %6, align 8, !tbaa !9
  %156 = load i32, ptr %9, align 4, !tbaa !5
  %157 = sext i32 %156 to i64
  %158 = getelementptr inbounds %struct.Slot, ptr %155, i64 %157
  %159 = getelementptr inbounds %struct.Slot, ptr %158, i32 0, i32 0
  %160 = load ptr, ptr %159, align 8, !tbaa !23
  %161 = call ptr @glfwSetWindowPosCallback(ptr noundef %160, ptr noundef @window_pos_callback)
  %162 = load ptr, ptr %6, align 8, !tbaa !9
  %163 = load i32, ptr %9, align 4, !tbaa !5
  %164 = sext i32 %163 to i64
  %165 = getelementptr inbounds %struct.Slot, ptr %162, i64 %164
  %166 = getelementptr inbounds %struct.Slot, ptr %165, i32 0, i32 0
  %167 = load ptr, ptr %166, align 8, !tbaa !23
  %168 = call ptr @glfwSetWindowSizeCallback(ptr noundef %167, ptr noundef @window_size_callback)
  %169 = load ptr, ptr %6, align 8, !tbaa !9
  %170 = load i32, ptr %9, align 4, !tbaa !5
  %171 = sext i32 %170 to i64
  %172 = getelementptr inbounds %struct.Slot, ptr %169, i64 %171
  %173 = getelementptr inbounds %struct.Slot, ptr %172, i32 0, i32 0
  %174 = load ptr, ptr %173, align 8, !tbaa !23
  %175 = call ptr @glfwSetFramebufferSizeCallback(ptr noundef %174, ptr noundef @framebuffer_size_callback)
  %176 = load ptr, ptr %6, align 8, !tbaa !9
  %177 = load i32, ptr %9, align 4, !tbaa !5
  %178 = sext i32 %177 to i64
  %179 = getelementptr inbounds %struct.Slot, ptr %176, i64 %178
  %180 = getelementptr inbounds %struct.Slot, ptr %179, i32 0, i32 0
  %181 = load ptr, ptr %180, align 8, !tbaa !23
  %182 = call ptr @glfwSetWindowCloseCallback(ptr noundef %181, ptr noundef @window_close_callback)
  %183 = load ptr, ptr %6, align 8, !tbaa !9
  %184 = load i32, ptr %9, align 4, !tbaa !5
  %185 = sext i32 %184 to i64
  %186 = getelementptr inbounds %struct.Slot, ptr %183, i64 %185
  %187 = getelementptr inbounds %struct.Slot, ptr %186, i32 0, i32 0
  %188 = load ptr, ptr %187, align 8, !tbaa !23
  %189 = call ptr @glfwSetWindowRefreshCallback(ptr noundef %188, ptr noundef @window_refresh_callback)
  %190 = load ptr, ptr %6, align 8, !tbaa !9
  %191 = load i32, ptr %9, align 4, !tbaa !5
  %192 = sext i32 %191 to i64
  %193 = getelementptr inbounds %struct.Slot, ptr %190, i64 %192
  %194 = getelementptr inbounds %struct.Slot, ptr %193, i32 0, i32 0
  %195 = load ptr, ptr %194, align 8, !tbaa !23
  %196 = call ptr @glfwSetWindowFocusCallback(ptr noundef %195, ptr noundef @window_focus_callback)
  %197 = load ptr, ptr %6, align 8, !tbaa !9
  %198 = load i32, ptr %9, align 4, !tbaa !5
  %199 = sext i32 %198 to i64
  %200 = getelementptr inbounds %struct.Slot, ptr %197, i64 %199
  %201 = getelementptr inbounds %struct.Slot, ptr %200, i32 0, i32 0
  %202 = load ptr, ptr %201, align 8, !tbaa !23
  %203 = call ptr @glfwSetWindowIconifyCallback(ptr noundef %202, ptr noundef @window_iconify_callback)
  %204 = load ptr, ptr %6, align 8, !tbaa !9
  %205 = load i32, ptr %9, align 4, !tbaa !5
  %206 = sext i32 %205 to i64
  %207 = getelementptr inbounds %struct.Slot, ptr %204, i64 %206
  %208 = getelementptr inbounds %struct.Slot, ptr %207, i32 0, i32 0
  %209 = load ptr, ptr %208, align 8, !tbaa !23
  %210 = call ptr @glfwSetMouseButtonCallback(ptr noundef %209, ptr noundef @mouse_button_callback)
  %211 = load ptr, ptr %6, align 8, !tbaa !9
  %212 = load i32, ptr %9, align 4, !tbaa !5
  %213 = sext i32 %212 to i64
  %214 = getelementptr inbounds %struct.Slot, ptr %211, i64 %213
  %215 = getelementptr inbounds %struct.Slot, ptr %214, i32 0, i32 0
  %216 = load ptr, ptr %215, align 8, !tbaa !23
  %217 = call ptr @glfwSetCursorPosCallback(ptr noundef %216, ptr noundef @cursor_position_callback)
  %218 = load ptr, ptr %6, align 8, !tbaa !9
  %219 = load i32, ptr %9, align 4, !tbaa !5
  %220 = sext i32 %219 to i64
  %221 = getelementptr inbounds %struct.Slot, ptr %218, i64 %220
  %222 = getelementptr inbounds %struct.Slot, ptr %221, i32 0, i32 0
  %223 = load ptr, ptr %222, align 8, !tbaa !23
  %224 = call ptr @glfwSetCursorEnterCallback(ptr noundef %223, ptr noundef @cursor_enter_callback)
  %225 = load ptr, ptr %6, align 8, !tbaa !9
  %226 = load i32, ptr %9, align 4, !tbaa !5
  %227 = sext i32 %226 to i64
  %228 = getelementptr inbounds %struct.Slot, ptr %225, i64 %227
  %229 = getelementptr inbounds %struct.Slot, ptr %228, i32 0, i32 0
  %230 = load ptr, ptr %229, align 8, !tbaa !23
  %231 = call ptr @glfwSetScrollCallback(ptr noundef %230, ptr noundef @scroll_callback)
  %232 = load ptr, ptr %6, align 8, !tbaa !9
  %233 = load i32, ptr %9, align 4, !tbaa !5
  %234 = sext i32 %233 to i64
  %235 = getelementptr inbounds %struct.Slot, ptr %232, i64 %234
  %236 = getelementptr inbounds %struct.Slot, ptr %235, i32 0, i32 0
  %237 = load ptr, ptr %236, align 8, !tbaa !23
  %238 = call ptr @glfwSetKeyCallback(ptr noundef %237, ptr noundef @key_callback)
  %239 = load ptr, ptr %6, align 8, !tbaa !9
  %240 = load i32, ptr %9, align 4, !tbaa !5
  %241 = sext i32 %240 to i64
  %242 = getelementptr inbounds %struct.Slot, ptr %239, i64 %241
  %243 = getelementptr inbounds %struct.Slot, ptr %242, i32 0, i32 0
  %244 = load ptr, ptr %243, align 8, !tbaa !23
  %245 = call ptr @glfwSetCharCallback(ptr noundef %244, ptr noundef @char_callback)
  %246 = load ptr, ptr %6, align 8, !tbaa !9
  %247 = load i32, ptr %9, align 4, !tbaa !5
  %248 = sext i32 %247 to i64
  %249 = getelementptr inbounds %struct.Slot, ptr %246, i64 %248
  %250 = getelementptr inbounds %struct.Slot, ptr %249, i32 0, i32 0
  %251 = load ptr, ptr %250, align 8, !tbaa !23
  %252 = call ptr @glfwSetCharModsCallback(ptr noundef %251, ptr noundef @char_mods_callback)
  %253 = load ptr, ptr %6, align 8, !tbaa !9
  %254 = load i32, ptr %9, align 4, !tbaa !5
  %255 = sext i32 %254 to i64
  %256 = getelementptr inbounds %struct.Slot, ptr %253, i64 %255
  %257 = getelementptr inbounds %struct.Slot, ptr %256, i32 0, i32 0
  %258 = load ptr, ptr %257, align 8, !tbaa !23
  %259 = call ptr @glfwSetDropCallback(ptr noundef %258, ptr noundef @drop_callback)
  %260 = load ptr, ptr %6, align 8, !tbaa !9
  %261 = load i32, ptr %9, align 4, !tbaa !5
  %262 = sext i32 %261 to i64
  %263 = getelementptr inbounds %struct.Slot, ptr %260, i64 %262
  %264 = getelementptr inbounds %struct.Slot, ptr %263, i32 0, i32 0
  %265 = load ptr, ptr %264, align 8, !tbaa !23
  call void @glfwMakeContextCurrent(ptr noundef %265)
  %266 = call i32 @gladLoadGLLoader(ptr noundef @glfwGetProcAddress)
  call void @glfwSwapInterval(i32 noundef 1)
  call void @llvm.lifetime.end.p0(i64 128, ptr %14) #6
  br label %267

267:                                              ; preds = %144
  %268 = load i32, ptr %9, align 4, !tbaa !5
  %269 = add nsw i32 %268, 1
  store i32 %269, ptr %9, align 4, !tbaa !5
  br label %75, !llvm.loop !24

270:                                              ; preds = %75
  %271 = call i32 (ptr, ...) @printf(ptr noundef @.str.7)
  br label %272

272:                                              ; preds = %296, %270
  store i32 0, ptr %9, align 4, !tbaa !5
  br label %273

273:                                              ; preds = %288, %272
  %274 = load i32, ptr %9, align 4, !tbaa !5
  %275 = load i32, ptr %12, align 4, !tbaa !5
  %276 = icmp slt i32 %274, %275
  br i1 %276, label %277, label %291

277:                                              ; preds = %273
  %278 = load ptr, ptr %6, align 8, !tbaa !9
  %279 = load i32, ptr %9, align 4, !tbaa !5
  %280 = sext i32 %279 to i64
  %281 = getelementptr inbounds %struct.Slot, ptr %278, i64 %280
  %282 = getelementptr inbounds %struct.Slot, ptr %281, i32 0, i32 0
  %283 = load ptr, ptr %282, align 8, !tbaa !23
  %284 = call i32 @glfwWindowShouldClose(ptr noundef %283)
  %285 = icmp ne i32 %284, 0
  br i1 %285, label %286, label %287

286:                                              ; preds = %277
  br label %291

287:                                              ; preds = %277
  br label %288

288:                                              ; preds = %287
  %289 = load i32, ptr %9, align 4, !tbaa !5
  %290 = add nsw i32 %289, 1
  store i32 %290, ptr %9, align 4, !tbaa !5
  br label %273, !llvm.loop !25

291:                                              ; preds = %286, %273
  %292 = load i32, ptr %9, align 4, !tbaa !5
  %293 = load i32, ptr %12, align 4, !tbaa !5
  %294 = icmp slt i32 %292, %293
  br i1 %294, label %295, label %296

295:                                              ; preds = %291
  br label %299

296:                                              ; preds = %291
  call void @glfwWaitEvents()
  %297 = load ptr, ptr @stdout, align 8, !tbaa !9
  %298 = call i32 @fflush(ptr noundef %297)
  br label %272

299:                                              ; preds = %295
  %300 = load ptr, ptr %6, align 8, !tbaa !9
  call void @free(ptr noundef %300) #6
  call void @glfwTerminate()
  call void @exit(i32 noundef 0) #7
  unreachable
}

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

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

declare ptr @glfwSetErrorCallback(ptr noundef) #3

; Function Attrs: nounwind uwtable
declare hidden void @error_callback(i32 noundef, ptr noundef) #0

declare i32 @glfwInit() #3

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

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

declare ptr @glfwSetMonitorCallback(ptr noundef) #3

; Function Attrs: nounwind uwtable
declare hidden void @monitor_callback(ptr noundef, i32 noundef) #0

declare ptr @glfwSetJoystickCallback(ptr noundef) #3

; Function Attrs: nounwind uwtable
declare hidden void @joystick_callback(i32 noundef, i32 noundef) #0

declare i32 @getopt(i32 noundef, ptr noundef, ptr noundef) #3

; Function Attrs: nounwind uwtable
declare hidden void @usage() #0

declare ptr @glfwGetPrimaryMonitor() #3

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

declare ptr @glfwGetVideoMode(ptr noundef) #3

declare void @glfwWindowHint(i32 noundef, i32 noundef) #3

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

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

; Function Attrs: nounwind allocsize(0,1)
declare noalias ptr @calloc(i64 noundef, i64 noundef) #5

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

declare ptr @glfwGetMonitorName(ptr noundef) #3

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

; Function Attrs: nounwind
declare void @free(ptr noundef) #2

declare void @glfwTerminate() #3

declare void @glfwSetWindowUserPointer(ptr noundef, ptr noundef) #3

declare ptr @glfwSetWindowPosCallback(ptr noundef, ptr noundef) #3

; Function Attrs: nounwind uwtable
declare hidden void @window_pos_callback(ptr noundef, i32 noundef, i32 noundef) #0

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

; Function Attrs: nounwind uwtable
declare hidden void @window_size_callback(ptr noundef, i32 noundef, i32 noundef) #0

declare ptr @glfwSetFramebufferSizeCallback(ptr noundef, ptr noundef) #3

; Function Attrs: nounwind uwtable
declare hidden void @framebuffer_size_callback(ptr noundef, i32 noundef, i32 noundef) #0

declare ptr @glfwSetWindowCloseCallback(ptr noundef, ptr noundef) #3

; Function Attrs: nounwind uwtable
declare hidden void @window_close_callback(ptr noundef) #0

declare ptr @glfwSetWindowRefreshCallback(ptr noundef, ptr noundef) #3

; Function Attrs: nounwind uwtable
declare hidden void @window_refresh_callback(ptr noundef) #0

declare ptr @glfwSetWindowFocusCallback(ptr noundef, ptr noundef) #3

; Function Attrs: nounwind uwtable
declare hidden void @window_focus_callback(ptr noundef, i32 noundef) #0

declare ptr @glfwSetWindowIconifyCallback(ptr noundef, ptr noundef) #3

; Function Attrs: nounwind uwtable
declare hidden void @window_iconify_callback(ptr noundef, i32 noundef) #0

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

; Function Attrs: nounwind uwtable
declare hidden void @mouse_button_callback(ptr noundef, i32 noundef, i32 noundef, i32 noundef) #0

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

; Function Attrs: nounwind uwtable
declare hidden void @cursor_position_callback(ptr noundef, double noundef, double noundef) #0

declare ptr @glfwSetCursorEnterCallback(ptr noundef, ptr noundef) #3

; Function Attrs: nounwind uwtable
declare hidden void @cursor_enter_callback(ptr noundef, i32 noundef) #0

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

; Function Attrs: nounwind uwtable
declare hidden void @scroll_callback(ptr noundef, double noundef, double noundef) #0

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

; Function Attrs: nounwind uwtable
declare hidden void @key_callback(ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) #0

declare ptr @glfwSetCharCallback(ptr noundef, ptr noundef) #3

; Function Attrs: nounwind uwtable
declare hidden void @char_callback(ptr noundef, i32 noundef) #0

declare ptr @glfwSetCharModsCallback(ptr noundef, ptr noundef) #3

; Function Attrs: nounwind uwtable
declare hidden void @char_mods_callback(ptr noundef, i32 noundef, i32 noundef) #0

declare ptr @glfwSetDropCallback(ptr noundef, ptr noundef) #3

; Function Attrs: nounwind uwtable
declare hidden void @drop_callback(ptr noundef, i32 noundef, ptr noundef) #0

declare void @glfwMakeContextCurrent(ptr noundef) #3

declare i32 @gladLoadGLLoader(ptr noundef) #3

declare ptr @glfwGetProcAddress(ptr noundef) #3

declare void @glfwSwapInterval(i32 noundef) #3

declare i32 @glfwWindowShouldClose(ptr noundef) #3

declare void @glfwWaitEvents() #3

declare i32 @fflush(ptr noundef) #3

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { "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 = { 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 #5 = { nounwind allocsize(0,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 #6 = { nounwind }
attributes #7 = { noreturn nounwind }
attributes #8 = { nounwind allocsize(0,1) }

!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/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!14, !6, i64 20}
!14 = !{!"GLFWvidmode", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12, !6, i64 16, !6, i64 20}
!15 = !{!14, !6, i64 8}
!16 = !{!14, !6, i64 12}
!17 = !{!14, !6, i64 16}
!18 = !{!14, !6, i64 0}
!19 = !{!14, !6, i64 4}
!20 = !{!21, !6, i64 12}
!21 = !{!"", !10, i64 0, !6, i64 8, !6, i64 12}
!22 = !{!21, !6, i64 8}
!23 = !{!21, !10, i64 0}
!24 = distinct !{!24, !12}
!25 = distinct !{!25, !12}


; 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.Slot = type { ptr, i32, i32 }

@.str = external hidden unnamed_addr constant [1 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [5 x i8], align 1
@optarg = external local_unnamed_addr global ptr, align 8
@stderr = external local_unnamed_addr global ptr, align 8
@.str.3 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [20 x i8], align 1
@stdout = external local_unnamed_addr global ptr, align 8

; Function Attrs: noreturn nounwind uwtable
define dso_local noundef i32 @main(i32 noundef %0, ptr noundef %1) local_unnamed_addr #0 {
  %3 = alloca [128 x i8], align 16
  %4 = tail call ptr @setlocale(i32 noundef 6, ptr noundef nonnull @.str) #10
  %5 = tail call ptr @glfwSetErrorCallback(ptr noundef nonnull @error_callback) #10
  %6 = tail call i32 @glfwInit() #10
  %.not = icmp eq i32 %6, 0
  br i1 %.not, label %7, label %8

7:                                                ; preds = %2
  tail call void @exit(i32 noundef 1) #11
  unreachable

8:                                                ; preds = %2
  %9 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1)
  %10 = tail call ptr @glfwSetMonitorCallback(ptr noundef nonnull @monitor_callback) #10
  %11 = tail call ptr @glfwSetJoystickCallback(ptr noundef nonnull @joystick_callback) #10
  br label %.outer

.outer:                                           ; preds = %17, %8
  %.084.ph = phi i32 [ %20, %17 ], [ 1, %8 ]
  %.0.ph = phi ptr [ %.0, %17 ], [ null, %8 ]
  br label %12

12:                                               ; preds = %.outer, %15
  %.0 = phi ptr [ %16, %15 ], [ %.0.ph, %.outer ]
  %13 = tail call i32 @getopt(i32 noundef %0, ptr noundef %1, ptr noundef nonnull @.str.2) #10
  switch i32 %13, label %21 [
    i32 -1, label %22
    i32 104, label %14
    i32 102, label %15
    i32 110, label %17
  ]

14:                                               ; preds = %12
  tail call void @usage()
  tail call void @exit(i32 noundef 0) #11
  unreachable

15:                                               ; preds = %12
  %16 = tail call ptr @glfwGetPrimaryMonitor() #10
  br label %12, !llvm.loop !5

17:                                               ; preds = %12
  %18 = load ptr, ptr @optarg, align 8, !tbaa !7
  %19 = tail call i64 @strtol(ptr nocapture noundef %18, ptr noundef null, i32 noundef 10) #10
  %20 = trunc i64 %19 to i32
  br label %.outer, !llvm.loop !5

21:                                               ; preds = %12
  tail call void @usage()
  tail call void @exit(i32 noundef 1) #11
  unreachable

22:                                               ; preds = %12
  %.not93 = icmp eq ptr %.0, null
  br i1 %.not93, label %36, label %23

23:                                               ; preds = %22
  %24 = tail call ptr @glfwGetVideoMode(ptr noundef nonnull %.0) #10
  %25 = getelementptr inbounds i8, ptr %24, i64 20
  %26 = load i32, ptr %25, align 4, !tbaa !11
  tail call void @glfwWindowHint(i32 noundef 135183, i32 noundef %26) #10
  %27 = getelementptr inbounds i8, ptr %24, i64 8
  %28 = load i32, ptr %27, align 4, !tbaa !14
  tail call void @glfwWindowHint(i32 noundef 135169, i32 noundef %28) #10
  %29 = getelementptr inbounds i8, ptr %24, i64 12
  %30 = load i32, ptr %29, align 4, !tbaa !15
  tail call void @glfwWindowHint(i32 noundef 135170, i32 noundef %30) #10
  %31 = getelementptr inbounds i8, ptr %24, i64 16
  %32 = load i32, ptr %31, align 4, !tbaa !16
  tail call void @glfwWindowHint(i32 noundef 135171, i32 noundef %32) #10
  %33 = load i32, ptr %24, align 4, !tbaa !17
  %34 = getelementptr inbounds i8, ptr %24, i64 4
  %35 = load i32, ptr %34, align 4, !tbaa !18
  br label %36

36:                                               ; preds = %22, %23
  %.087 = phi i32 [ %33, %23 ], [ 640, %22 ]
  %.086 = phi i32 [ %35, %23 ], [ 480, %22 ]
  %.not94 = icmp eq i32 %.084.ph, 0
  br i1 %.not94, label %37, label %40

37:                                               ; preds = %36
  %38 = load ptr, ptr @stderr, align 8, !tbaa !7
  %39 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %38, ptr noundef nonnull @.str.3) #12
  tail call void @exit(i32 noundef 1) #11
  unreachable

40:                                               ; preds = %36
  %41 = sext i32 %.084.ph to i64
  %42 = tail call noalias ptr @calloc(i64 noundef %41, i64 noundef 16) #13
  %43 = icmp sgt i32 %.084.ph, 0
  br i1 %43, label %.lr.ph.preheader, label %._crit_edge.thread

._crit_edge.thread:                               ; preds = %40
  %44 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7)
  br label %.critedge.preheader

.lr.ph.preheader:                                 ; preds = %40
  %wide.trip.count = zext nneg i32 %.084.ph to i64
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %59
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next, %59 ]
  call void @llvm.lifetime.start.p0(i64 128, ptr nonnull %3) #10
  %45 = getelementptr inbounds %struct.Slot, ptr %42, i64 %indvars.iv
  %46 = getelementptr inbounds i8, ptr %45, i64 12
  store i32 1, ptr %46, align 4, !tbaa !19
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %47 = getelementptr inbounds i8, ptr %45, i64 8
  %48 = trunc nuw nsw i64 %indvars.iv.next to i32
  store i32 %48, ptr %47, align 8, !tbaa !21
  %49 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %3, ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef %48) #10
  %50 = load i32, ptr %47, align 8, !tbaa !21
  br i1 %.not93, label %54, label %51

51:                                               ; preds = %.lr.ph
  %52 = call ptr @glfwGetMonitorName(ptr noundef nonnull %.0) #10
  %53 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef %50, i32 noundef %.087, i32 noundef %.086, ptr noundef %52)
  br label %56

54:                                               ; preds = %.lr.ph
  %55 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef %50, i32 noundef %.087, i32 noundef %.086)
  br label %56

56:                                               ; preds = %54, %51
  %57 = call ptr @glfwCreateWindow(i32 noundef %.087, i32 noundef %.086, ptr noundef nonnull %3, ptr noundef %.0, ptr noundef null) #10
  store ptr %57, ptr %45, align 8, !tbaa !22
  %.not96 = icmp eq ptr %57, null
  br i1 %.not96, label %58, label %59

58:                                               ; preds = %56
  call void @free(ptr noundef nonnull %42) #10
  call void @glfwTerminate() #10
  call void @exit(i32 noundef 1) #11
  unreachable

59:                                               ; preds = %56
  call void @glfwSetWindowUserPointer(ptr noundef nonnull %57, ptr noundef nonnull %45) #10
  %60 = load ptr, ptr %45, align 8, !tbaa !22
  %61 = call ptr @glfwSetWindowPosCallback(ptr noundef %60, ptr noundef nonnull @window_pos_callback) #10
  %62 = load ptr, ptr %45, align 8, !tbaa !22
  %63 = call ptr @glfwSetWindowSizeCallback(ptr noundef %62, ptr noundef nonnull @window_size_callback) #10
  %64 = load ptr, ptr %45, align 8, !tbaa !22
  %65 = call ptr @glfwSetFramebufferSizeCallback(ptr noundef %64, ptr noundef nonnull @framebuffer_size_callback) #10
  %66 = load ptr, ptr %45, align 8, !tbaa !22
  %67 = call ptr @glfwSetWindowCloseCallback(ptr noundef %66, ptr noundef nonnull @window_close_callback) #10
  %68 = load ptr, ptr %45, align 8, !tbaa !22
  %69 = call ptr @glfwSetWindowRefreshCallback(ptr noundef %68, ptr noundef nonnull @window_refresh_callback) #10
  %70 = load ptr, ptr %45, align 8, !tbaa !22
  %71 = call ptr @glfwSetWindowFocusCallback(ptr noundef %70, ptr noundef nonnull @window_focus_callback) #10
  %72 = load ptr, ptr %45, align 8, !tbaa !22
  %73 = call ptr @glfwSetWindowIconifyCallback(ptr noundef %72, ptr noundef nonnull @window_iconify_callback) #10
  %74 = load ptr, ptr %45, align 8, !tbaa !22
  %75 = call ptr @glfwSetMouseButtonCallback(ptr noundef %74, ptr noundef nonnull @mouse_button_callback) #10
  %76 = load ptr, ptr %45, align 8, !tbaa !22
  %77 = call ptr @glfwSetCursorPosCallback(ptr noundef %76, ptr noundef nonnull @cursor_position_callback) #10
  %78 = load ptr, ptr %45, align 8, !tbaa !22
  %79 = call ptr @glfwSetCursorEnterCallback(ptr noundef %78, ptr noundef nonnull @cursor_enter_callback) #10
  %80 = load ptr, ptr %45, align 8, !tbaa !22
  %81 = call ptr @glfwSetScrollCallback(ptr noundef %80, ptr noundef nonnull @scroll_callback) #10
  %82 = load ptr, ptr %45, align 8, !tbaa !22
  %83 = call ptr @glfwSetKeyCallback(ptr noundef %82, ptr noundef nonnull @key_callback) #10
  %84 = load ptr, ptr %45, align 8, !tbaa !22
  %85 = call ptr @glfwSetCharCallback(ptr noundef %84, ptr noundef nonnull @char_callback) #10
  %86 = load ptr, ptr %45, align 8, !tbaa !22
  %87 = call ptr @glfwSetCharModsCallback(ptr noundef %86, ptr noundef nonnull @char_mods_callback) #10
  %88 = load ptr, ptr %45, align 8, !tbaa !22
  %89 = call ptr @glfwSetDropCallback(ptr noundef %88, ptr noundef nonnull @drop_callback) #10
  %90 = load ptr, ptr %45, align 8, !tbaa !22
  call void @glfwMakeContextCurrent(ptr noundef %90) #10
  %91 = call i32 @gladLoadGLLoader(ptr noundef nonnull @glfwGetProcAddress) #10
  call void @glfwSwapInterval(i32 noundef 1) #10
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %3) #10
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !23

._crit_edge:                                      ; preds = %59
  %92 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7)
  br i1 %43, label %.lr.ph104.us.preheader, label %.critedge.preheader

.critedge.preheader:                              ; preds = %._crit_edge.thread, %._crit_edge
  br label %.critedge

.lr.ph104.us.preheader:                           ; preds = %._crit_edge
  %wide.trip.count115 = zext nneg i32 %.084.ph to i64
  br label %.lr.ph104.us

93:                                               ; preds = %.lr.ph104.us
  %indvars.iv.next113 = add nuw nsw i64 %indvars.iv112, 1
  %exitcond116.not = icmp eq i64 %indvars.iv.next113, %wide.trip.count115
  br i1 %exitcond116.not, label %..critedge_crit_edge.us, label %.lr.ph104.us.backedge

.lr.ph104.us.backedge:                            ; preds = %93, %..critedge_crit_edge.us
  %indvars.iv112.be = phi i64 [ %indvars.iv.next113, %93 ], [ 0, %..critedge_crit_edge.us ]
  br label %.lr.ph104.us, !llvm.loop !24

.lr.ph104.us:                                     ; preds = %.lr.ph104.us.backedge, %.lr.ph104.us.preheader
  %indvars.iv112 = phi i64 [ 0, %.lr.ph104.us.preheader ], [ %indvars.iv112.be, %.lr.ph104.us.backedge ]
  %94 = getelementptr inbounds %struct.Slot, ptr %42, i64 %indvars.iv112
  %95 = load ptr, ptr %94, align 8, !tbaa !22
  %96 = call i32 @glfwWindowShouldClose(ptr noundef %95) #10
  %.not95.us = icmp eq i32 %96, 0
  br i1 %.not95.us, label %93, label %.split106.us

..critedge_crit_edge.us:                          ; preds = %93
  call void @glfwWaitEvents() #10
  %97 = load ptr, ptr @stdout, align 8, !tbaa !7
  %98 = call i32 @fflush(ptr noundef %97)
  br label %.lr.ph104.us.backedge

.critedge:                                        ; preds = %.critedge.preheader, %.critedge
  call void @glfwWaitEvents() #10
  %99 = load ptr, ptr @stdout, align 8, !tbaa !7
  %100 = call i32 @fflush(ptr noundef %99)
  br label %.critedge

.split106.us:                                     ; preds = %.lr.ph104.us
  call void @free(ptr noundef nonnull %42) #10
  call void @glfwTerminate() #10
  call void @exit(i32 noundef 0) #11
  unreachable
}

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

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

declare ptr @glfwSetErrorCallback(ptr noundef) local_unnamed_addr #3

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

declare i32 @glfwInit() local_unnamed_addr #3

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

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

declare ptr @glfwSetMonitorCallback(ptr noundef) local_unnamed_addr #3

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

declare ptr @glfwSetJoystickCallback(ptr noundef) local_unnamed_addr #3

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

declare i32 @getopt(i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
declare hidden void @usage() local_unnamed_addr #4

declare ptr @glfwGetPrimaryMonitor() local_unnamed_addr #3

; Function Attrs: mustprogress nofree nounwind willreturn
declare i64 @strtol(ptr noundef readonly, ptr nocapture noundef, i32 noundef) local_unnamed_addr #7

declare ptr @glfwGetVideoMode(ptr noundef) local_unnamed_addr #3

declare void @glfwWindowHint(i32 noundef, i32 noundef) local_unnamed_addr #3

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

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

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @calloc(i64 noundef, i64 noundef) local_unnamed_addr #8

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

declare ptr @glfwGetMonitorName(ptr noundef) local_unnamed_addr #3

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

; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #9

declare void @glfwTerminate() local_unnamed_addr #3

declare void @glfwSetWindowUserPointer(ptr noundef, ptr noundef) local_unnamed_addr #3

declare ptr @glfwSetWindowPosCallback(ptr noundef, ptr noundef) local_unnamed_addr #3

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

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

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

declare ptr @glfwSetFramebufferSizeCallback(ptr noundef, ptr noundef) local_unnamed_addr #3

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

declare ptr @glfwSetWindowCloseCallback(ptr noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
declare hidden void @window_close_callback(ptr noundef) #4

declare ptr @glfwSetWindowRefreshCallback(ptr noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
declare hidden void @window_refresh_callback(ptr noundef) #4

declare ptr @glfwSetWindowFocusCallback(ptr noundef, ptr noundef) local_unnamed_addr #3

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

declare ptr @glfwSetWindowIconifyCallback(ptr noundef, ptr noundef) local_unnamed_addr #3

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

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

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

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

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

declare ptr @glfwSetCursorEnterCallback(ptr noundef, ptr noundef) local_unnamed_addr #3

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

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

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

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

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

declare ptr @glfwSetCharCallback(ptr noundef, ptr noundef) local_unnamed_addr #3

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

declare ptr @glfwSetCharModsCallback(ptr noundef, ptr noundef) local_unnamed_addr #3

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

declare ptr @glfwSetDropCallback(ptr noundef, ptr noundef) local_unnamed_addr #3

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

declare void @glfwMakeContextCurrent(ptr noundef) local_unnamed_addr #3

declare i32 @gladLoadGLLoader(ptr noundef) local_unnamed_addr #3

declare ptr @glfwGetProcAddress(ptr noundef) #3

declare void @glfwSwapInterval(i32 noundef) local_unnamed_addr #3

declare i32 @glfwWindowShouldClose(ptr noundef) local_unnamed_addr #3

declare void @glfwWaitEvents() local_unnamed_addr #3

; Function Attrs: nofree nounwind
declare noundef i32 @fflush(ptr nocapture noundef) local_unnamed_addr #6

attributes #0 = { noreturn 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { "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 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 = { 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 #6 = { 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 #7 = { mustprogress nofree nounwind willreturn "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 allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "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 nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "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 #10 = { nounwind }
attributes #11 = { noreturn nounwind }
attributes #12 = { cold nounwind }
attributes #13 = { nounwind allocsize(0,1) }

!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 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}
!7 = !{!8, !8, i64 0}
!8 = !{!"any pointer", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C/C++ TBAA"}
!11 = !{!12, !13, i64 20}
!12 = !{!"GLFWvidmode", !13, i64 0, !13, i64 4, !13, i64 8, !13, i64 12, !13, i64 16, !13, i64 20}
!13 = !{!"int", !9, i64 0}
!14 = !{!12, !13, i64 8}
!15 = !{!12, !13, i64 12}
!16 = !{!12, !13, i64 16}
!17 = !{!12, !13, i64 0}
!18 = !{!12, !13, i64 4}
!19 = !{!20, !13, i64 12}
!20 = !{!"", !8, i64 0, !13, i64 8, !13, i64 12}
!21 = !{!20, !13, i64 8}
!22 = !{!20, !8, i64 0}
!23 = distinct !{!23, !6}
!24 = distinct !{!24, !6}


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