; LLVM IR from unitreerobotics/kinect_teleoperate :: src/extern/glfw/src/tests (inputlag)

; 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.nk_vec2 = type { float, float }
%struct.nk_rect = type { float, float, float, float }
%struct.GLFWvidmode = type { i32, i32, i32, i32, i32, i32 }

@glad_glClear = external dso_local global ptr, align 8
@cursor_method = external dso_local global i32, align 4
@cursor_pos = external dso_local global %struct.nk_vec2, align 4
@cursor_vel = external dso_local global %struct.nk_vec2, align 4
@enable_vsync = external dso_local global i32, align 4
@swap_clear = external dso_local global i32, align 4
@swap_finish = external dso_local global i32, align 4
@swap_occlusion_query = external dso_local global i32, align 4
@swap_read_pixels = external dso_local global i32, align 4
@.str.145 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.146 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.147 = external hidden unnamed_addr constant [1 x i8], align 1
@.str.148 = external hidden unnamed_addr constant [52 x i8], align 1
@.str.149 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.150 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.151 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.152 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.153 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.154 = external hidden unnamed_addr constant [48 x i8], align 1
@.str.155 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.156 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.157 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.158 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.159 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.160 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.161 = external hidden unnamed_addr constant [13 x i8], align 1

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

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @gladLoadGL(ptr noundef) #1

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

; Function Attrs: nounwind uwtable
declare dso_local { <2 x float>, <2 x float> } @nk_rect(float noundef, float noundef, float noundef, float noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local <2 x float> @nk_vec2(float noundef, float noundef) #3

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #4

; Function Attrs: nounwind uwtable
declare dso_local i32 @nk_begin(ptr noundef, ptr noundef, <2 x float>, <2 x float>, i32 noundef) #3

; Function Attrs: nounwind uwtable
declare dso_local void @nk_end(ptr noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local ptr @nk_window_get_canvas(ptr noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local void @nk_layout_row_dynamic(ptr noundef, float noundef, i32 noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local void @nk_layout_row_begin(ptr noundef, i32 noundef, float noundef, i32 noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local void @nk_layout_row_push(ptr noundef, float noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local void @nk_layout_row_end(ptr noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local <2 x float> @nk_layout_space_to_screen(ptr noundef, <2 x float>) #3

; Function Attrs: nounwind uwtable
declare dso_local void @nk_labelf(ptr noundef, i32 noundef, ptr noundef, ...) #1

; Function Attrs: nounwind uwtable
declare dso_local void @nk_label(ptr noundef, ptr noundef, i32 noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local void @nk_value_float(ptr noundef, ptr noundef, float noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local i32 @nk_checkbox_label(ptr noundef, ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local i32 @nk_option_label(ptr noundef, ptr noundef, i32 noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local void @nk_glfw3_render(i32 noundef) #1

declare double @glfwGetTime() #5

; Function Attrs: nounwind uwtable
declare dso_local ptr @nk_glfw3_init(ptr noundef, i32 noundef) #3

; Function Attrs: nounwind uwtable
declare dso_local void @nk_glfw3_font_stash_begin(ptr noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local void @nk_glfw3_font_stash_end() #1

; Function Attrs: nounwind uwtable
declare dso_local void @nk_glfw3_new_frame() #3

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

; Function Attrs: nounwind uwtable
declare dso_local void @usage() #1

; Function Attrs: nounwind uwtable
declare dso_local void @sample_input(ptr noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local void @cursor_pos_callback(ptr noundef, double noundef, double noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local void @update_vsync() #1

; Function Attrs: nounwind uwtable
declare dso_local void @swap_buffers(ptr noundef) #1

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

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

; Function Attrs: nounwind uwtable
declare dso_local void @draw_marker(ptr noundef, i32 noundef, <2 x float>) #3

; Function Attrs: nounwind uwtable
define dso_local i32 @main(i32 noundef %0, ptr noundef %1) #3 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i64, align 8
  %10 = alloca double, align 8
  %11 = alloca double, align 8
  %12 = alloca double, align 8
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca i32, align 4
  %19 = alloca ptr, align 8
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca %struct.nk_rect, align 4
  %23 = alloca %struct.nk_rect, align 4
  %24 = alloca i32, align 4
  %25 = alloca ptr, align 8
  %26 = alloca i32, align 4
  %27 = alloca %struct.nk_vec2, align 4
  %28 = alloca %struct.nk_vec2, align 4
  %29 = alloca %struct.nk_vec2, align 4
  store i32 0, ptr %3, align 4
  store i32 %0, ptr %4, align 4, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  store i64 0, ptr %9, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  store double 0.000000e+00, ptr %12, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  store i32 0, ptr %13, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  store ptr null, ptr %14, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #7
  store i32 1, ptr %18, align 4, !tbaa !5
  br label %30

30:                                               ; preds = %39, %2
  %31 = load i32, ptr %4, align 4, !tbaa !5
  %32 = load ptr, ptr %5, align 8, !tbaa !9
  %33 = call i32 @getopt(i32 noundef %31, ptr noundef %32, ptr noundef @.str.145)
  store i32 %33, ptr %6, align 4, !tbaa !5
  %34 = icmp ne i32 %33, -1
  br i1 %34, label %35, label %40

35:                                               ; preds = %30
  %36 = load i32, ptr %6, align 4, !tbaa !5
  switch i32 %36, label %39 [
    i32 104, label %37
    i32 102, label %38
  ]

37:                                               ; preds = %35
  call void @usage()
  call void @exit(i32 noundef 0) #8
  unreachable

38:                                               ; preds = %35
  store i32 1, ptr %13, align 4, !tbaa !5
  br label %39

39:                                               ; preds = %38, %35
  br label %30, !llvm.loop !15

40:                                               ; preds = %30
  %41 = call ptr @glfwSetErrorCallback(ptr noundef @error_callback)
  %42 = call i32 @glfwInit()
  %43 = icmp ne i32 %42, 0
  br i1 %43, label %45, label %44

44:                                               ; preds = %40
  call void @exit(i32 noundef 1) #8
  unreachable

45:                                               ; preds = %40
  %46 = load i32, ptr %13, align 4, !tbaa !5
  %47 = icmp ne i32 %46, 0
  br i1 %47, label %48, label %58

48:                                               ; preds = %45
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #7
  %49 = call ptr @glfwGetPrimaryMonitor()
  store ptr %49, ptr %14, align 8, !tbaa !9
  %50 = load ptr, ptr %14, align 8, !tbaa !9
  %51 = call ptr @glfwGetVideoMode(ptr noundef %50)
  store ptr %51, ptr %19, align 8, !tbaa !9
  %52 = load ptr, ptr %19, align 8, !tbaa !9
  %53 = getelementptr inbounds %struct.GLFWvidmode, ptr %52, i32 0, i32 0
  %54 = load i32, ptr %53, align 4, !tbaa !17
  store i32 %54, ptr %7, align 4, !tbaa !5
  %55 = load ptr, ptr %19, align 8, !tbaa !9
  %56 = getelementptr inbounds %struct.GLFWvidmode, ptr %55, i32 0, i32 1
  %57 = load i32, ptr %56, align 4, !tbaa !19
  store i32 %57, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  br label %59

58:                                               ; preds = %45
  store i32 640, ptr %7, align 4, !tbaa !5
  store i32 480, ptr %8, align 4, !tbaa !5
  br label %59

59:                                               ; preds = %58, %48
  call void @glfwWindowHint(i32 noundef 139266, i32 noundef 2)
  call void @glfwWindowHint(i32 noundef 139267, i32 noundef 0)
  call void @glfwWindowHint(i32 noundef 139276, i32 noundef 1)
  call void @glfwWindowHint(i32 noundef 151553, i32 noundef 1)
  %60 = load i32, ptr %7, align 4, !tbaa !5
  %61 = load i32, ptr %8, align 4, !tbaa !5
  %62 = load ptr, ptr %14, align 8, !tbaa !9
  %63 = call ptr @glfwCreateWindow(i32 noundef %60, i32 noundef %61, ptr noundef @.str.146, ptr noundef %62, ptr noundef null)
  store ptr %63, ptr %15, align 8, !tbaa !9
  %64 = load ptr, ptr %15, align 8, !tbaa !9
  %65 = icmp ne ptr %64, null
  br i1 %65, label %67, label %66

66:                                               ; preds = %59
  call void @glfwTerminate()
  call void @exit(i32 noundef 1) #8
  unreachable

67:                                               ; preds = %59
  %68 = load ptr, ptr %15, align 8, !tbaa !9
  call void @glfwMakeContextCurrent(ptr noundef %68)
  %69 = call i32 @gladLoadGL(ptr noundef @glfwGetProcAddress)
  call void @update_vsync()
  %70 = call double @glfwGetTime()
  store double %70, ptr %10, align 8, !tbaa !13
  %71 = load ptr, ptr %15, align 8, !tbaa !9
  %72 = call ptr @nk_glfw3_init(ptr noundef %71, i32 noundef 1)
  store ptr %72, ptr %16, align 8, !tbaa !9
  call void @nk_glfw3_font_stash_begin(ptr noundef %17)
  call void @nk_glfw3_font_stash_end()
  %73 = load ptr, ptr %15, align 8, !tbaa !9
  %74 = call ptr @glfwSetKeyCallback(ptr noundef %73, ptr noundef @key_callback)
  %75 = load ptr, ptr %15, align 8, !tbaa !9
  %76 = call ptr @glfwSetCursorPosCallback(ptr noundef %75, ptr noundef @cursor_pos_callback)
  br label %77

77:                                               ; preds = %224, %67
  %78 = load ptr, ptr %15, align 8, !tbaa !9
  %79 = call i32 @glfwWindowShouldClose(ptr noundef %78)
  %80 = icmp ne i32 %79, 0
  %81 = xor i1 %80, true
  br i1 %81, label %82, label %225

82:                                               ; preds = %77
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr %22) #7
  call void @glfwPollEvents()
  %83 = load ptr, ptr %15, align 8, !tbaa !9
  call void @sample_input(ptr noundef %83)
  %84 = load ptr, ptr %15, align 8, !tbaa !9
  call void @glfwGetWindowSize(ptr noundef %84, ptr noundef %20, ptr noundef %21)
  call void @llvm.lifetime.start.p0(i64 16, ptr %23) #7
  %85 = load i32, ptr %20, align 4, !tbaa !5
  %86 = sitofp i32 %85 to float
  %87 = load i32, ptr %21, align 4, !tbaa !5
  %88 = sitofp i32 %87 to float
  %89 = call { <2 x float>, <2 x float> } @nk_rect(float noundef 0.000000e+00, float noundef 0.000000e+00, float noundef %86, float noundef %88)
  %90 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %23, i32 0, i32 0
  %91 = extractvalue { <2 x float>, <2 x float> } %89, 0
  store <2 x float> %91, ptr %90, align 4
  %92 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %23, i32 0, i32 1
  %93 = extractvalue { <2 x float>, <2 x float> } %89, 1
  store <2 x float> %93, ptr %92, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %22, ptr align 4 %23, i64 16, i1 false), !tbaa.struct !20
  call void @llvm.lifetime.end.p0(i64 16, ptr %23) #7
  %94 = load ptr, ptr @glad_glClear, align 8, !tbaa !9
  call void %94(i32 noundef 16384)
  call void @nk_glfw3_new_frame()
  %95 = load ptr, ptr %16, align 8, !tbaa !9
  %96 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %22, i32 0, i32 0
  %97 = load <2 x float>, ptr %96, align 4
  %98 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %22, i32 0, i32 1
  %99 = load <2 x float>, ptr %98, align 4
  %100 = call i32 @nk_begin(ptr noundef %95, ptr noundef @.str.147, <2 x float> %97, <2 x float> %99, i32 noundef 0)
  %101 = icmp ne i32 %100, 0
  br i1 %101, label %102, label %206

102:                                              ; preds = %82
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #7
  store i32 17, ptr %24, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #7
  %103 = load ptr, ptr %16, align 8, !tbaa !9
  %104 = call ptr @nk_window_get_canvas(ptr noundef %103)
  store ptr %104, ptr %25, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #7
  %105 = load i32, ptr %18, align 4, !tbaa !5
  %106 = icmp ne i32 %105, 0
  %107 = zext i1 %106 to i64
  %108 = select i1 %106, i32 3, i32 0
  store i32 %108, ptr %26, align 4, !tbaa !5
  br label %109

109:                                              ; preds = %127, %102
  %110 = load i32, ptr %26, align 4, !tbaa !5
  %111 = icmp sge i32 %110, 0
  br i1 %111, label %112, label %130

112:                                              ; preds = %109
  %113 = load ptr, ptr %25, align 8, !tbaa !9
  %114 = load i32, ptr %26, align 4, !tbaa !5
  %115 = load float, ptr @cursor_pos, align 4, !tbaa !23
  %116 = load float, ptr @cursor_vel, align 4, !tbaa !23
  %117 = load i32, ptr %26, align 4, !tbaa !5
  %118 = sitofp i32 %117 to float
  %119 = call float @llvm.fmuladd.f32(float %116, float %118, float %115)
  %120 = load float, ptr getelementptr inbounds (%struct.nk_vec2, ptr @cursor_pos, i32 0, i32 1), align 4, !tbaa !25
  %121 = load float, ptr getelementptr inbounds (%struct.nk_vec2, ptr @cursor_vel, i32 0, i32 1), align 4, !tbaa !25
  %122 = load i32, ptr %26, align 4, !tbaa !5
  %123 = sitofp i32 %122 to float
  %124 = call float @llvm.fmuladd.f32(float %121, float %123, float %120)
  %125 = call <2 x float> @nk_vec2(float noundef %119, float noundef %124)
  store <2 x float> %125, ptr %27, align 4
  %126 = load <2 x float>, ptr %27, align 4
  call void @draw_marker(ptr noundef %113, i32 noundef %114, <2 x float> %126)
  br label %127

127:                                              ; preds = %112
  %128 = load i32, ptr %26, align 4, !tbaa !5
  %129 = add nsw i32 %128, -1
  store i32 %129, ptr %26, align 4, !tbaa !5
  br label %109, !llvm.loop !26

130:                                              ; preds = %109
  %131 = load ptr, ptr %16, align 8, !tbaa !9
  call void @nk_layout_row_dynamic(ptr noundef %131, float noundef 2.000000e+01, i32 noundef 1)
  %132 = load ptr, ptr %16, align 8, !tbaa !9
  %133 = load i32, ptr %24, align 4, !tbaa !5
  call void @nk_label(ptr noundef %132, ptr noundef @.str.148, i32 noundef %133)
  store i32 0, ptr %26, align 4, !tbaa !5
  br label %134

134:                                              ; preds = %161, %130
  %135 = load i32, ptr %26, align 4, !tbaa !5
  %136 = icmp sle i32 %135, 3
  br i1 %136, label %137, label %164

137:                                              ; preds = %134
  %138 = load ptr, ptr %16, align 8, !tbaa !9
  call void @nk_layout_row_begin(ptr noundef %138, i32 noundef 1, float noundef 1.200000e+01, i32 noundef 2)
  %139 = load ptr, ptr %16, align 8, !tbaa !9
  call void @nk_layout_row_push(ptr noundef %139, float noundef 2.500000e+01)
  %140 = load ptr, ptr %25, align 8, !tbaa !9
  %141 = load i32, ptr %26, align 4, !tbaa !5
  %142 = load ptr, ptr %16, align 8, !tbaa !9
  %143 = call <2 x float> @nk_vec2(float noundef 2.000000e+01, float noundef 5.000000e+00)
  store <2 x float> %143, ptr %29, align 4
  %144 = load <2 x float>, ptr %29, align 4
  %145 = call <2 x float> @nk_layout_space_to_screen(ptr noundef %142, <2 x float> %144)
  store <2 x float> %145, ptr %28, align 4
  %146 = load <2 x float>, ptr %28, align 4
  call void @draw_marker(ptr noundef %140, i32 noundef %141, <2 x float> %146)
  %147 = load ptr, ptr %16, align 8, !tbaa !9
  call void @nk_label(ptr noundef %147, ptr noundef @.str.147, i32 noundef 0)
  %148 = load ptr, ptr %16, align 8, !tbaa !9
  call void @nk_layout_row_push(ptr noundef %148, float noundef 5.000000e+02)
  %149 = load i32, ptr %26, align 4, !tbaa !5
  %150 = icmp eq i32 %149, 0
  br i1 %150, label %151, label %154

151:                                              ; preds = %137
  %152 = load ptr, ptr %16, align 8, !tbaa !9
  %153 = load i32, ptr %24, align 4, !tbaa !5
  call void @nk_label(ptr noundef %152, ptr noundef @.str.149, i32 noundef %153)
  br label %159

154:                                              ; preds = %137
  %155 = load ptr, ptr %16, align 8, !tbaa !9
  %156 = load i32, ptr %24, align 4, !tbaa !5
  %157 = load i32, ptr %26, align 4, !tbaa !5
  %158 = load i32, ptr %26, align 4, !tbaa !5
  call void (ptr, i32, ptr, ...) @nk_labelf(ptr noundef %155, i32 noundef %156, ptr noundef @.str.150, i32 noundef %157, i32 noundef %158)
  br label %159

159:                                              ; preds = %154, %151
  %160 = load ptr, ptr %16, align 8, !tbaa !9
  call void @nk_layout_row_end(ptr noundef %160)
  br label %161

161:                                              ; preds = %159
  %162 = load i32, ptr %26, align 4, !tbaa !5
  %163 = add nsw i32 %162, 1
  store i32 %163, ptr %26, align 4, !tbaa !5
  br label %134, !llvm.loop !27

164:                                              ; preds = %134
  %165 = load ptr, ptr %16, align 8, !tbaa !9
  call void @nk_layout_row_dynamic(ptr noundef %165, float noundef 2.000000e+01, i32 noundef 1)
  %166 = load ptr, ptr %16, align 8, !tbaa !9
  %167 = call i32 @nk_checkbox_label(ptr noundef %166, ptr noundef @.str.151, ptr noundef %18)
  %168 = load ptr, ptr %16, align 8, !tbaa !9
  %169 = load i32, ptr %24, align 4, !tbaa !5
  call void @nk_label(ptr noundef %168, ptr noundef @.str.152, i32 noundef %169)
  %170 = load ptr, ptr %16, align 8, !tbaa !9
  %171 = load i32, ptr @cursor_method, align 4, !tbaa !5
  %172 = icmp eq i32 %171, 0
  %173 = zext i1 %172 to i32
  %174 = call i32 @nk_option_label(ptr noundef %170, ptr noundef @.str.153, i32 noundef %173)
  %175 = icmp ne i32 %174, 0
  br i1 %175, label %176, label %177

176:                                              ; preds = %164
  store i32 0, ptr @cursor_method, align 4, !tbaa !5
  br label %177

177:                                              ; preds = %176, %164
  %178 = load ptr, ptr %16, align 8, !tbaa !9
  %179 = load i32, ptr @cursor_method, align 4, !tbaa !5
  %180 = icmp eq i32 %179, 1
  %181 = zext i1 %180 to i32
  %182 = call i32 @nk_option_label(ptr noundef %178, ptr noundef @.str.154, i32 noundef %181)
  %183 = icmp ne i32 %182, 0
  br i1 %183, label %184, label %185

184:                                              ; preds = %177
  store i32 1, ptr @cursor_method, align 4, !tbaa !5
  br label %185

185:                                              ; preds = %184, %177
  %186 = load ptr, ptr %16, align 8, !tbaa !9
  call void @nk_label(ptr noundef %186, ptr noundef @.str.147, i32 noundef 0)
  %187 = load ptr, ptr %16, align 8, !tbaa !9
  %188 = load double, ptr %12, align 8, !tbaa !13
  %189 = fptrunc double %188 to float
  call void @nk_value_float(ptr noundef %187, ptr noundef @.str.155, float noundef %189)
  %190 = load ptr, ptr %16, align 8, !tbaa !9
  %191 = call i32 @nk_checkbox_label(ptr noundef %190, ptr noundef @.str.156, ptr noundef @enable_vsync)
  %192 = icmp ne i32 %191, 0
  br i1 %192, label %193, label %194

193:                                              ; preds = %185
  call void @update_vsync()
  br label %194

194:                                              ; preds = %193, %185
  %195 = load ptr, ptr %16, align 8, !tbaa !9
  call void @nk_label(ptr noundef %195, ptr noundef @.str.147, i32 noundef 0)
  %196 = load ptr, ptr %16, align 8, !tbaa !9
  %197 = load i32, ptr %24, align 4, !tbaa !5
  call void @nk_label(ptr noundef %196, ptr noundef @.str.157, i32 noundef %197)
  %198 = load ptr, ptr %16, align 8, !tbaa !9
  %199 = call i32 @nk_checkbox_label(ptr noundef %198, ptr noundef @.str.158, ptr noundef @swap_clear)
  %200 = load ptr, ptr %16, align 8, !tbaa !9
  %201 = call i32 @nk_checkbox_label(ptr noundef %200, ptr noundef @.str.159, ptr noundef @swap_finish)
  %202 = load ptr, ptr %16, align 8, !tbaa !9
  %203 = call i32 @nk_checkbox_label(ptr noundef %202, ptr noundef @.str.160, ptr noundef @swap_occlusion_query)
  %204 = load ptr, ptr %16, align 8, !tbaa !9
  %205 = call i32 @nk_checkbox_label(ptr noundef %204, ptr noundef @.str.161, ptr noundef @swap_read_pixels)
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #7
  br label %206

206:                                              ; preds = %194, %82
  %207 = load ptr, ptr %16, align 8, !tbaa !9
  call void @nk_end(ptr noundef %207)
  call void @nk_glfw3_render(i32 noundef 1)
  %208 = load ptr, ptr %15, align 8, !tbaa !9
  call void @swap_buffers(ptr noundef %208)
  %209 = load i64, ptr %9, align 8, !tbaa !11
  %210 = add i64 %209, 1
  store i64 %210, ptr %9, align 8, !tbaa !11
  %211 = call double @glfwGetTime()
  store double %211, ptr %11, align 8, !tbaa !13
  %212 = load double, ptr %11, align 8, !tbaa !13
  %213 = load double, ptr %10, align 8, !tbaa !13
  %214 = fsub double %212, %213
  %215 = fcmp ogt double %214, 1.000000e+00
  br i1 %215, label %216, label %224

216:                                              ; preds = %206
  %217 = load i64, ptr %9, align 8, !tbaa !11
  %218 = uitofp i64 %217 to double
  %219 = load double, ptr %11, align 8, !tbaa !13
  %220 = load double, ptr %10, align 8, !tbaa !13
  %221 = fsub double %219, %220
  %222 = fdiv double %218, %221
  store double %222, ptr %12, align 8, !tbaa !13
  store i64 0, ptr %9, align 8, !tbaa !11
  %223 = load double, ptr %11, align 8, !tbaa !13
  store double %223, ptr %10, align 8, !tbaa !13
  br label %224

224:                                              ; preds = %216, %206
  call void @llvm.lifetime.end.p0(i64 16, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #7
  br label %77, !llvm.loop !28

225:                                              ; preds = %77
  call void @glfwTerminate()
  call void @exit(i32 noundef 0) #8
  unreachable
}

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

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

declare ptr @glfwSetErrorCallback(ptr noundef) #5

declare i32 @glfwInit() #5

declare ptr @glfwGetPrimaryMonitor() #5

declare ptr @glfwGetVideoMode(ptr noundef) #5

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

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

declare void @glfwTerminate() #5

declare void @glfwMakeContextCurrent(ptr noundef) #5

declare ptr @glfwGetProcAddress(ptr noundef) #5

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

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

declare i32 @glfwWindowShouldClose(ptr noundef) #5

declare void @glfwPollEvents() #5

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { nounwind 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 #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { "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 = { 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 #7 = { nounwind }
attributes #8 = { 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/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"double", !7, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = !{!18, !6, i64 0}
!18 = !{!"GLFWvidmode", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12, !6, i64 16, !6, i64 20}
!19 = !{!18, !6, i64 4}
!20 = !{i64 0, i64 4, !21, i64 4, i64 4, !21, i64 8, i64 4, !21, i64 12, i64 4, !21}
!21 = !{!22, !22, i64 0}
!22 = !{!"float", !7, i64 0}
!23 = !{!24, !22, i64 0}
!24 = !{!"nk_vec2", !22, i64 0, !22, i64 4}
!25 = !{!24, !22, i64 4}
!26 = distinct !{!26, !16}
!27 = distinct !{!27, !16}
!28 = distinct !{!28, !16}


; 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.nk_vec2 = type { float, float }

@glad_glClear = external dso_local local_unnamed_addr global ptr, align 8
@cursor_method = external dso_local local_unnamed_addr global i32, align 4
@cursor_pos = external dso_local local_unnamed_addr global %struct.nk_vec2, align 4
@cursor_vel = external dso_local local_unnamed_addr global %struct.nk_vec2, align 4
@enable_vsync = external dso_local global i32, align 4
@swap_clear = external dso_local global i32, align 4
@swap_finish = external dso_local global i32, align 4
@swap_occlusion_query = external dso_local global i32, align 4
@swap_read_pixels = external dso_local global i32, align 4
@.str.145 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.146 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.147 = external hidden unnamed_addr constant [1 x i8], align 1
@.str.148 = external hidden unnamed_addr constant [52 x i8], align 1
@.str.149 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.150 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.151 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.152 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.153 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.154 = external hidden unnamed_addr constant [48 x i8], align 1
@.str.155 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.156 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.157 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.158 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.159 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.160 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.161 = external hidden unnamed_addr constant [13 x i8], align 1

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

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @gladLoadGL(ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local { <2 x float>, <2 x float> } @nk_rect(float noundef, float noundef, float noundef, float noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local <2 x float> @nk_vec2(float noundef, float noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #3

; Function Attrs: nounwind uwtable
declare dso_local i32 @nk_begin(ptr noundef, ptr noundef, <2 x float>, <2 x float>, i32 noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare dso_local void @nk_end(ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local ptr @nk_window_get_canvas(ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local void @nk_layout_row_dynamic(ptr noundef, float noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local void @nk_layout_row_begin(ptr noundef, i32 noundef, float noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local void @nk_layout_row_push(ptr noundef, float noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local void @nk_layout_row_end(ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local <2 x float> @nk_layout_space_to_screen(ptr noundef, <2 x float>) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare dso_local void @nk_labelf(ptr noundef, i32 noundef, ptr noundef, ...) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local void @nk_label(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local void @nk_value_float(ptr noundef, ptr noundef, float noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local i32 @nk_checkbox_label(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local i32 @nk_option_label(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local void @nk_glfw3_render(i32 noundef) local_unnamed_addr #1

declare double @glfwGetTime() local_unnamed_addr #4

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

; Function Attrs: nounwind uwtable
declare dso_local void @nk_glfw3_font_stash_begin(ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local void @nk_glfw3_font_stash_end() local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local void @nk_glfw3_new_frame() local_unnamed_addr #2

declare void @glfwGetWindowSize(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #4

; Function Attrs: nounwind uwtable
declare dso_local void @usage() local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local void @sample_input(ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local void @cursor_pos_callback(ptr noundef, double noundef, double noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local void @update_vsync() local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local void @swap_buffers(ptr noundef) local_unnamed_addr #1

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

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

; Function Attrs: nounwind uwtable
declare dso_local void @draw_marker(ptr noundef, i32 noundef, <2 x float>) local_unnamed_addr #2

; Function Attrs: noreturn nounwind uwtable
define dso_local noundef i32 @main(i32 noundef %0, ptr noundef %1) local_unnamed_addr #5 {
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #7
  store i32 1, ptr %4, align 4, !tbaa !5
  br label %.outer

.outer:                                           ; preds = %10, %2
  %.not91 = phi i1 [ false, %10 ], [ true, %2 ]
  br label %7

7:                                                ; preds = %.outer, %7
  %8 = tail call i32 @getopt(i32 noundef %0, ptr noundef %1, ptr noundef nonnull @.str.145) #7
  switch i32 %8, label %7 [
    i32 -1, label %11
    i32 104, label %9
    i32 102, label %10
  ], !llvm.loop !9

9:                                                ; preds = %7
  tail call void @usage()
  tail call void @exit(i32 noundef 0) #8
  unreachable

10:                                               ; preds = %7
  br label %.outer, !llvm.loop !9

11:                                               ; preds = %7
  %12 = tail call ptr @glfwSetErrorCallback(ptr noundef nonnull @error_callback) #7
  %13 = tail call i32 @glfwInit() #7
  %.not90 = icmp eq i32 %13, 0
  br i1 %.not90, label %14, label %15

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

15:                                               ; preds = %11
  br i1 %.not91, label %22, label %16

16:                                               ; preds = %15
  %17 = tail call ptr @glfwGetPrimaryMonitor() #7
  %18 = tail call ptr @glfwGetVideoMode(ptr noundef %17) #7
  %19 = load i32, ptr %18, align 4, !tbaa !11
  %20 = getelementptr inbounds i8, ptr %18, i64 4
  %21 = load i32, ptr %20, align 4, !tbaa !13
  br label %22

22:                                               ; preds = %15, %16
  %.086 = phi ptr [ %17, %16 ], [ null, %15 ]
  %.076 = phi i32 [ %21, %16 ], [ 480, %15 ]
  %.0 = phi i32 [ %19, %16 ], [ 640, %15 ]
  tail call void @glfwWindowHint(i32 noundef 139266, i32 noundef 2) #7
  tail call void @glfwWindowHint(i32 noundef 139267, i32 noundef 0) #7
  tail call void @glfwWindowHint(i32 noundef 139276, i32 noundef 1) #7
  tail call void @glfwWindowHint(i32 noundef 151553, i32 noundef 1) #7
  %23 = tail call ptr @glfwCreateWindow(i32 noundef %.0, i32 noundef %.076, ptr noundef nonnull @.str.146, ptr noundef %.086, ptr noundef null) #7
  %.not92 = icmp eq ptr %23, null
  br i1 %.not92, label %24, label %25

24:                                               ; preds = %22
  tail call void @glfwTerminate() #7
  tail call void @exit(i32 noundef 1) #8
  unreachable

25:                                               ; preds = %22
  tail call void @glfwMakeContextCurrent(ptr noundef nonnull %23) #7
  %26 = tail call i32 @gladLoadGL(ptr noundef nonnull @glfwGetProcAddress)
  tail call void @update_vsync()
  %27 = tail call double @glfwGetTime() #7
  %28 = tail call ptr @nk_glfw3_init(ptr noundef nonnull %23, i32 noundef 1)
  call void @nk_glfw3_font_stash_begin(ptr noundef nonnull %3)
  call void @nk_glfw3_font_stash_end()
  %29 = call ptr @glfwSetKeyCallback(ptr noundef nonnull %23, ptr noundef nonnull @key_callback) #7
  %30 = call ptr @glfwSetCursorPosCallback(ptr noundef nonnull %23, ptr noundef nonnull @cursor_pos_callback) #7
  %31 = call i32 @glfwWindowShouldClose(ptr noundef nonnull %23) #7
  %.not93102 = icmp eq i32 %31, 0
  br i1 %.not93102, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %25, %83
  %.077105 = phi i64 [ %.1, %83 ], [ 0, %25 ]
  %.080104 = phi double [ %.181, %83 ], [ %27, %25 ]
  %.082103 = phi double [ %.183, %83 ], [ 0.000000e+00, %25 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #7
  call void @glfwPollEvents() #7
  call void @sample_input(ptr noundef nonnull %23)
  call void @glfwGetWindowSize(ptr noundef nonnull %23, ptr noundef nonnull %5, ptr noundef nonnull %6) #7
  %32 = load i32, ptr %5, align 4, !tbaa !5
  %33 = sitofp i32 %32 to float
  %34 = load i32, ptr %6, align 4, !tbaa !5
  %35 = sitofp i32 %34 to float
  %36 = call { <2 x float>, <2 x float> } @nk_rect(float noundef 0.000000e+00, float noundef 0.000000e+00, float noundef %33, float noundef %35)
  %37 = extractvalue { <2 x float>, <2 x float> } %36, 0
  %38 = extractvalue { <2 x float>, <2 x float> } %36, 1
  %39 = load ptr, ptr @glad_glClear, align 8, !tbaa !14
  call void %39(i32 noundef 16384) #7
  call void @nk_glfw3_new_frame()
  %40 = call i32 @nk_begin(ptr noundef %28, ptr noundef nonnull @.str.147, <2 x float> %37, <2 x float> %38, i32 noundef 0)
  %.not94 = icmp eq i32 %40, 0
  br i1 %.not94, label %83, label %.preheader

.preheader:                                       ; preds = %.lr.ph
  %41 = call ptr @nk_window_get_canvas(ptr noundef %28)
  %42 = load i32, ptr %4, align 4, !tbaa !5
  %.not95 = icmp eq i32 %42, 0
  %spec.select = select i1 %.not95, i32 0, i32 3
  br label %43

43:                                               ; preds = %.preheader, %43
  %.078100 = phi i32 [ %52, %43 ], [ %spec.select, %.preheader ]
  %44 = load float, ptr @cursor_pos, align 4, !tbaa !16
  %45 = load float, ptr @cursor_vel, align 4, !tbaa !16
  %46 = uitofp nneg i32 %.078100 to float
  %47 = call float @llvm.fmuladd.f32(float %45, float %46, float %44)
  %48 = load float, ptr getelementptr inbounds (i8, ptr @cursor_pos, i64 4), align 4, !tbaa !19
  %49 = load float, ptr getelementptr inbounds (i8, ptr @cursor_vel, i64 4), align 4, !tbaa !19
  %50 = call float @llvm.fmuladd.f32(float %49, float %46, float %48)
  %51 = call <2 x float> @nk_vec2(float noundef %47, float noundef %50)
  call void @draw_marker(ptr noundef %41, i32 noundef %.078100, <2 x float> %51)
  %52 = add nsw i32 %.078100, -1
  %.not = icmp eq i32 %.078100, 0
  br i1 %.not, label %53, label %43, !llvm.loop !20

53:                                               ; preds = %43
  call void @nk_layout_row_dynamic(ptr noundef %28, float noundef 2.000000e+01, i32 noundef 1)
  call void @nk_label(ptr noundef %28, ptr noundef nonnull @.str.148, i32 noundef 17)
  call void @nk_layout_row_begin(ptr noundef %28, i32 noundef 1, float noundef 1.200000e+01, i32 noundef 2)
  call void @nk_layout_row_push(ptr noundef %28, float noundef 2.500000e+01)
  %54 = call <2 x float> @nk_vec2(float noundef 2.000000e+01, float noundef 5.000000e+00)
  %55 = call <2 x float> @nk_layout_space_to_screen(ptr noundef %28, <2 x float> %54)
  call void @draw_marker(ptr noundef %41, i32 noundef 0, <2 x float> %55)
  call void @nk_label(ptr noundef %28, ptr noundef nonnull @.str.147, i32 noundef 0)
  call void @nk_layout_row_push(ptr noundef %28, float noundef 5.000000e+02)
  call void @nk_label(ptr noundef %28, ptr noundef nonnull @.str.149, i32 noundef 17)
  call void @nk_layout_row_end(ptr noundef %28)
  call void @nk_layout_row_begin(ptr noundef %28, i32 noundef 1, float noundef 1.200000e+01, i32 noundef 2)
  call void @nk_layout_row_push(ptr noundef %28, float noundef 2.500000e+01)
  %56 = call <2 x float> @nk_vec2(float noundef 2.000000e+01, float noundef 5.000000e+00)
  %57 = call <2 x float> @nk_layout_space_to_screen(ptr noundef %28, <2 x float> %56)
  call void @draw_marker(ptr noundef %41, i32 noundef 1, <2 x float> %57)
  call void @nk_label(ptr noundef %28, ptr noundef nonnull @.str.147, i32 noundef 0)
  call void @nk_layout_row_push(ptr noundef %28, float noundef 5.000000e+02)
  call void (ptr, i32, ptr, ...) @nk_labelf(ptr noundef %28, i32 noundef 17, ptr noundef nonnull @.str.150, i32 noundef 1, i32 noundef 1)
  call void @nk_layout_row_end(ptr noundef %28)
  call void @nk_layout_row_begin(ptr noundef %28, i32 noundef 1, float noundef 1.200000e+01, i32 noundef 2)
  call void @nk_layout_row_push(ptr noundef %28, float noundef 2.500000e+01)
  %58 = call <2 x float> @nk_vec2(float noundef 2.000000e+01, float noundef 5.000000e+00)
  %59 = call <2 x float> @nk_layout_space_to_screen(ptr noundef %28, <2 x float> %58)
  call void @draw_marker(ptr noundef %41, i32 noundef 2, <2 x float> %59)
  call void @nk_label(ptr noundef %28, ptr noundef nonnull @.str.147, i32 noundef 0)
  call void @nk_layout_row_push(ptr noundef %28, float noundef 5.000000e+02)
  call void (ptr, i32, ptr, ...) @nk_labelf(ptr noundef %28, i32 noundef 17, ptr noundef nonnull @.str.150, i32 noundef 2, i32 noundef 2)
  call void @nk_layout_row_end(ptr noundef %28)
  call void @nk_layout_row_begin(ptr noundef %28, i32 noundef 1, float noundef 1.200000e+01, i32 noundef 2)
  call void @nk_layout_row_push(ptr noundef %28, float noundef 2.500000e+01)
  %60 = call <2 x float> @nk_vec2(float noundef 2.000000e+01, float noundef 5.000000e+00)
  %61 = call <2 x float> @nk_layout_space_to_screen(ptr noundef %28, <2 x float> %60)
  call void @draw_marker(ptr noundef %41, i32 noundef 3, <2 x float> %61)
  call void @nk_label(ptr noundef %28, ptr noundef nonnull @.str.147, i32 noundef 0)
  call void @nk_layout_row_push(ptr noundef %28, float noundef 5.000000e+02)
  call void (ptr, i32, ptr, ...) @nk_labelf(ptr noundef %28, i32 noundef 17, ptr noundef nonnull @.str.150, i32 noundef 3, i32 noundef 3)
  call void @nk_layout_row_end(ptr noundef %28)
  call void @nk_layout_row_dynamic(ptr noundef %28, float noundef 2.000000e+01, i32 noundef 1)
  %62 = call i32 @nk_checkbox_label(ptr noundef %28, ptr noundef nonnull @.str.151, ptr noundef nonnull %4)
  call void @nk_label(ptr noundef %28, ptr noundef nonnull @.str.152, i32 noundef 17)
  %63 = load i32, ptr @cursor_method, align 4, !tbaa !5
  %64 = icmp eq i32 %63, 0
  %65 = zext i1 %64 to i32
  %66 = call i32 @nk_option_label(ptr noundef %28, ptr noundef nonnull @.str.153, i32 noundef %65)
  %.not96 = icmp eq i32 %66, 0
  br i1 %.not96, label %._crit_edge107, label %67

._crit_edge107:                                   ; preds = %53
  %.pre = load i32, ptr @cursor_method, align 4, !tbaa !5
  br label %68

67:                                               ; preds = %53
  store i32 0, ptr @cursor_method, align 4, !tbaa !5
  br label %68

68:                                               ; preds = %._crit_edge107, %67
  %69 = phi i32 [ %.pre, %._crit_edge107 ], [ 0, %67 ]
  %70 = icmp eq i32 %69, 1
  %71 = zext i1 %70 to i32
  %72 = call i32 @nk_option_label(ptr noundef %28, ptr noundef nonnull @.str.154, i32 noundef %71)
  %.not97 = icmp eq i32 %72, 0
  br i1 %.not97, label %74, label %73

73:                                               ; preds = %68
  store i32 1, ptr @cursor_method, align 4, !tbaa !5
  br label %74

74:                                               ; preds = %73, %68
  call void @nk_label(ptr noundef %28, ptr noundef nonnull @.str.147, i32 noundef 0)
  %75 = fptrunc double %.082103 to float
  call void @nk_value_float(ptr noundef %28, ptr noundef nonnull @.str.155, float noundef %75)
  %76 = call i32 @nk_checkbox_label(ptr noundef %28, ptr noundef nonnull @.str.156, ptr noundef nonnull @enable_vsync)
  %.not98 = icmp eq i32 %76, 0
  br i1 %.not98, label %78, label %77

77:                                               ; preds = %74
  call void @update_vsync()
  br label %78

78:                                               ; preds = %77, %74
  call void @nk_label(ptr noundef %28, ptr noundef nonnull @.str.147, i32 noundef 0)
  call void @nk_label(ptr noundef %28, ptr noundef nonnull @.str.157, i32 noundef 17)
  %79 = call i32 @nk_checkbox_label(ptr noundef %28, ptr noundef nonnull @.str.158, ptr noundef nonnull @swap_clear)
  %80 = call i32 @nk_checkbox_label(ptr noundef %28, ptr noundef nonnull @.str.159, ptr noundef nonnull @swap_finish)
  %81 = call i32 @nk_checkbox_label(ptr noundef %28, ptr noundef nonnull @.str.160, ptr noundef nonnull @swap_occlusion_query)
  %82 = call i32 @nk_checkbox_label(ptr noundef %28, ptr noundef nonnull @.str.161, ptr noundef nonnull @swap_read_pixels)
  br label %83

83:                                               ; preds = %78, %.lr.ph
  call void @nk_end(ptr noundef %28)
  call void @nk_glfw3_render(i32 noundef 1)
  call void @swap_buffers(ptr noundef nonnull %23)
  %84 = add i64 %.077105, 1
  %85 = call double @glfwGetTime() #7
  %86 = fsub double %85, %.080104
  %87 = fcmp ogt double %86, 1.000000e+00
  %88 = uitofp i64 %84 to double
  %89 = fdiv double %88, %86
  %.183 = select i1 %87, double %89, double %.082103
  %.181 = select i1 %87, double %85, double %.080104
  %.1 = select i1 %87, i64 0, i64 %84
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #7
  %90 = call i32 @glfwWindowShouldClose(ptr noundef nonnull %23) #7
  %.not93 = icmp eq i32 %90, 0
  br i1 %.not93, label %.lr.ph, label %._crit_edge, !llvm.loop !21

._crit_edge:                                      ; preds = %83, %25
  call void @glfwTerminate() #7
  call void @exit(i32 noundef 0) #8
  unreachable
}

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

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

declare ptr @glfwSetErrorCallback(ptr noundef) local_unnamed_addr #4

declare i32 @glfwInit() local_unnamed_addr #4

declare ptr @glfwGetPrimaryMonitor() local_unnamed_addr #4

declare ptr @glfwGetVideoMode(ptr noundef) local_unnamed_addr #4

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

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

declare void @glfwTerminate() local_unnamed_addr #4

declare void @glfwMakeContextCurrent(ptr noundef) local_unnamed_addr #4

declare ptr @glfwGetProcAddress(ptr noundef) #4

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

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

declare i32 @glfwWindowShouldClose(ptr noundef) local_unnamed_addr #4

declare void @glfwPollEvents() local_unnamed_addr #4

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { nounwind 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 #3 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { "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 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 #6 = { 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 #7 = { nounwind }
attributes #8 = { 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/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!12, !6, i64 0}
!12 = !{!"GLFWvidmode", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12, !6, i64 16, !6, i64 20}
!13 = !{!12, !6, i64 4}
!14 = !{!15, !15, i64 0}
!15 = !{!"any pointer", !7, i64 0}
!16 = !{!17, !18, i64 0}
!17 = !{!"nk_vec2", !18, i64 0, !18, i64 4}
!18 = !{!"float", !7, i64 0}
!19 = !{!17, !18, i64 4}
!20 = distinct !{!20, !10}
!21 = distinct !{!21, !10}


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