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

; 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_context = type { %struct.nk_input, %struct.nk_style, %struct.nk_buffer, %struct.nk_clipboard, i32, i32, %struct.nk_configuration_stacks, float, %struct.nk_draw_list, %struct.nk_text_edit, %struct.nk_command_buffer, i32, i32, %struct.nk_pool, ptr, ptr, ptr, ptr, ptr, i32, i32 }
%struct.nk_input = type { %struct.nk_keyboard, %struct.nk_mouse }
%struct.nk_keyboard = type { [30 x %struct.nk_key], [16 x i8], i32 }
%struct.nk_key = type { i32, i32 }
%struct.nk_mouse = type { [4 x %struct.nk_mouse_button], %struct.nk_vec2, %struct.nk_vec2, %struct.nk_vec2, %struct.nk_vec2, i8, i8, i8 }
%struct.nk_mouse_button = type { i32, i32, %struct.nk_vec2 }
%struct.nk_vec2 = type { float, float }
%struct.nk_style = type { ptr, [7 x ptr], ptr, ptr, i32, %struct.nk_style_text, %struct.nk_style_button, %struct.nk_style_button, %struct.nk_style_button, %struct.nk_style_toggle, %struct.nk_style_toggle, %struct.nk_style_selectable, %struct.nk_style_slider, %struct.nk_style_progress, %struct.nk_style_property, %struct.nk_style_edit, %struct.nk_style_chart, %struct.nk_style_scrollbar, %struct.nk_style_scrollbar, %struct.nk_style_tab, %struct.nk_style_combo, %struct.nk_style_window }
%struct.nk_style_text = type { %struct.nk_color, %struct.nk_vec2 }
%struct.nk_color = type { i8, i8, i8, i8 }
%struct.nk_style_button = type { %struct.nk_style_item, %struct.nk_style_item, %struct.nk_style_item, %struct.nk_color, %struct.nk_color, %struct.nk_color, %struct.nk_color, %struct.nk_color, i32, float, float, %struct.nk_vec2, %struct.nk_vec2, %struct.nk_vec2, %union.nk_handle, ptr, ptr }
%struct.nk_style_item = type { i32, %union.nk_style_item_data }
%union.nk_style_item_data = type { %struct.nk_image }
%struct.nk_image = type { %union.nk_handle, i16, i16, [4 x i16] }
%union.nk_handle = type { ptr }
%struct.nk_style_toggle = type { %struct.nk_style_item, %struct.nk_style_item, %struct.nk_style_item, %struct.nk_color, %struct.nk_style_item, %struct.nk_style_item, %struct.nk_color, %struct.nk_color, %struct.nk_color, %struct.nk_color, i32, %struct.nk_vec2, %struct.nk_vec2, float, float, %union.nk_handle, ptr, ptr }
%struct.nk_style_selectable = type { %struct.nk_style_item, %struct.nk_style_item, %struct.nk_style_item, %struct.nk_style_item, %struct.nk_style_item, %struct.nk_style_item, %struct.nk_color, %struct.nk_color, %struct.nk_color, %struct.nk_color, %struct.nk_color, %struct.nk_color, %struct.nk_color, i32, float, %struct.nk_vec2, %struct.nk_vec2, %struct.nk_vec2, %union.nk_handle, ptr, ptr }
%struct.nk_style_slider = type { %struct.nk_style_item, %struct.nk_style_item, %struct.nk_style_item, %struct.nk_color, %struct.nk_color, %struct.nk_color, %struct.nk_color, %struct.nk_color, %struct.nk_style_item, %struct.nk_style_item, %struct.nk_style_item, float, float, float, %struct.nk_vec2, %struct.nk_vec2, %struct.nk_vec2, i32, %struct.nk_style_button, %struct.nk_style_button, i32, i32, %union.nk_handle, ptr, ptr }
%struct.nk_style_progress = type { %struct.nk_style_item, %struct.nk_style_item, %struct.nk_style_item, %struct.nk_color, %struct.nk_style_item, %struct.nk_style_item, %struct.nk_style_item, %struct.nk_color, float, float, float, float, %struct.nk_vec2, %union.nk_handle, ptr, ptr }
%struct.nk_style_property = type { %struct.nk_style_item, %struct.nk_style_item, %struct.nk_style_item, %struct.nk_color, %struct.nk_color, %struct.nk_color, %struct.nk_color, i32, i32, float, float, %struct.nk_vec2, %struct.nk_style_edit, %struct.nk_style_button, %struct.nk_style_button, %union.nk_handle, ptr, ptr }
%struct.nk_style_edit = type { %struct.nk_style_item, %struct.nk_style_item, %struct.nk_style_item, %struct.nk_color, %struct.nk_style_scrollbar, %struct.nk_color, %struct.nk_color, %struct.nk_color, %struct.nk_color, %struct.nk_color, %struct.nk_color, %struct.nk_color, %struct.nk_color, %struct.nk_color, %struct.nk_color, %struct.nk_color, float, float, float, %struct.nk_vec2, %struct.nk_vec2, float }
%struct.nk_style_chart = type { %struct.nk_style_item, %struct.nk_color, %struct.nk_color, %struct.nk_color, float, float, %struct.nk_vec2 }
%struct.nk_style_scrollbar = type { %struct.nk_style_item, %struct.nk_style_item, %struct.nk_style_item, %struct.nk_color, %struct.nk_style_item, %struct.nk_style_item, %struct.nk_style_item, %struct.nk_color, float, float, float, float, %struct.nk_vec2, i32, %struct.nk_style_button, %struct.nk_style_button, i32, i32, %union.nk_handle, ptr, ptr }
%struct.nk_style_tab = type { %struct.nk_style_item, %struct.nk_color, %struct.nk_color, %struct.nk_style_button, %struct.nk_style_button, %struct.nk_style_button, %struct.nk_style_button, i32, i32, float, float, float, %struct.nk_vec2, %struct.nk_vec2 }
%struct.nk_style_combo = type { %struct.nk_style_item, %struct.nk_style_item, %struct.nk_style_item, %struct.nk_color, %struct.nk_color, %struct.nk_color, %struct.nk_color, %struct.nk_color, %struct.nk_color, %struct.nk_color, %struct.nk_style_button, i32, i32, i32, float, float, %struct.nk_vec2, %struct.nk_vec2, %struct.nk_vec2 }
%struct.nk_style_window = type { %struct.nk_style_window_header, %struct.nk_style_item, %struct.nk_color, %struct.nk_color, %struct.nk_color, %struct.nk_color, %struct.nk_color, %struct.nk_color, %struct.nk_color, %struct.nk_color, %struct.nk_style_item, float, float, float, float, float, float, float, float, float, %struct.nk_vec2, %struct.nk_vec2, %struct.nk_vec2, %struct.nk_vec2, %struct.nk_vec2, %struct.nk_vec2, %struct.nk_vec2, %struct.nk_vec2, %struct.nk_vec2, %struct.nk_vec2 }
%struct.nk_style_window_header = type { %struct.nk_style_item, %struct.nk_style_item, %struct.nk_style_item, %struct.nk_style_button, %struct.nk_style_button, i32, i32, i32, %struct.nk_color, %struct.nk_color, %struct.nk_color, i32, %struct.nk_vec2, %struct.nk_vec2, %struct.nk_vec2 }
%struct.nk_buffer = type { [2 x %struct.nk_buffer_marker], %struct.nk_allocator, i32, %struct.nk_memory, float, i64, i64, i64, i64 }
%struct.nk_buffer_marker = type { i32, i64 }
%struct.nk_allocator = type { %union.nk_handle, ptr, ptr }
%struct.nk_memory = type { ptr, i64 }
%struct.nk_clipboard = type { %union.nk_handle, ptr, ptr }
%struct.nk_configuration_stacks = type { %struct.nk_config_stack_style_item, %struct.nk_config_stack_float, %struct.nk_config_stack_vec2, %struct.nk_config_stack_flags, %struct.nk_config_stack_color, %struct.nk_config_stack_user_font, %struct.nk_config_stack_button_behavior }
%struct.nk_config_stack_style_item = type { i32, [16 x %struct.nk_config_stack_style_item_element] }
%struct.nk_config_stack_style_item_element = type { ptr, %struct.nk_style_item }
%struct.nk_config_stack_float = type { i32, [32 x %struct.nk_config_stack_float_element] }
%struct.nk_config_stack_float_element = type { ptr, float }
%struct.nk_config_stack_vec2 = type { i32, [16 x %struct.nk_config_stack_vec2_element] }
%struct.nk_config_stack_vec2_element = type { ptr, %struct.nk_vec2 }
%struct.nk_config_stack_flags = type { i32, [32 x %struct.nk_config_stack_flags_element] }
%struct.nk_config_stack_flags_element = type { ptr, i32 }
%struct.nk_config_stack_color = type { i32, [32 x %struct.nk_config_stack_color_element] }
%struct.nk_config_stack_color_element = type { ptr, %struct.nk_color }
%struct.nk_config_stack_user_font = type { i32, [8 x %struct.nk_config_stack_user_font_element] }
%struct.nk_config_stack_user_font_element = type { ptr, ptr }
%struct.nk_config_stack_button_behavior = type { i32, [8 x %struct.nk_config_stack_button_behavior_element] }
%struct.nk_config_stack_button_behavior_element = type { ptr, i32 }
%struct.nk_draw_list = type { %struct.nk_rect, [12 x %struct.nk_vec2], %struct.nk_convert_config, ptr, ptr, ptr, i32, i32, i32, i64, i32, i32, i32, i32 }
%struct.nk_rect = type { float, float, float, float }
%struct.nk_convert_config = type { float, i32, i32, i32, i32, i32, %struct.nk_draw_null_texture, ptr, i64, i64 }
%struct.nk_draw_null_texture = type { %union.nk_handle, %struct.nk_vec2 }
%struct.nk_text_edit = type { %struct.nk_clipboard, %struct.nk_str, ptr, %struct.nk_vec2, i32, i32, i32, i8, i8, i8, i8, i8, i8, i8, float, %struct.nk_text_undo_state }
%struct.nk_str = type { %struct.nk_buffer, i32 }
%struct.nk_text_undo_state = type { [99 x %struct.nk_text_undo_record], [999 x i32], i16, i16, i16, i16 }
%struct.nk_text_undo_record = type { i32, i16, i16, i16 }
%struct.nk_command_buffer = type { ptr, %struct.nk_rect, i32, %union.nk_handle, i64, i64, i64 }
%struct.nk_pool = type { %struct.nk_allocator, i32, i32, ptr, ptr, i32, i64, i64 }
%struct.nk_window = type { i32, i32, [64 x i8], i32, %struct.nk_rect, %struct.nk_scroll, %struct.nk_command_buffer, ptr, float, %struct.nk_property_state, %struct.nk_popup_state, %struct.nk_edit_state, i32, ptr, i32, ptr, ptr, ptr }
%struct.nk_scroll = type { i32, i32 }
%struct.nk_property_state = type { i32, i32, [64 x i8], i32, i32, i32, i32, i32, i32, i32, i32 }
%struct.nk_popup_state = type { ptr, i32, %struct.nk_popup_buffer, i32, i32, i32, i32, i32, i32, %struct.nk_rect }
%struct.nk_popup_buffer = type { i64, i64, i64, i64, i32 }
%struct.nk_edit_state = type { i32, i32, i32, i32, i32, i32, i32, i32, %struct.nk_scroll, i8, i8 }
%struct.nk_table = type { i32, i32, [59 x i32], [59 x i32], ptr, ptr }

@.str.2 = external hidden unnamed_addr constant [103 x i8], align 1
@.str.33 = external hidden unnamed_addr constant [4 x i8], align 1
@__PRETTY_FUNCTION__.nk_clear = external hidden unnamed_addr constant [35 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: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
declare hidden void @nk_zero(ptr noundef, i64 noundef) #2

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

; Function Attrs: nounwind uwtable
declare dso_local void @nk_buffer_clear(ptr noundef) #2

; Function Attrs: nounwind uwtable
define dso_local void @nk_clear(ptr noundef %0) #2 {
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #3
  %8 = load ptr, ptr %2, align 8, !tbaa !5
  %9 = icmp ne ptr %8, null
  br i1 %9, label %10, label %11

10:                                               ; preds = %1
  br label %12

11:                                               ; preds = %1
  call void @__assert_fail(ptr noundef @.str.33, ptr noundef @.str.2, i32 noundef 15071, ptr noundef @__PRETTY_FUNCTION__.nk_clear) #4
  unreachable

12:                                               ; preds = %10
  %13 = load ptr, ptr %2, align 8, !tbaa !5
  %14 = icmp ne ptr %13, null
  br i1 %14, label %16, label %15

15:                                               ; preds = %12
  store i32 1, ptr %5, align 4
  br label %219

16:                                               ; preds = %12
  %17 = load ptr, ptr %2, align 8, !tbaa !5
  %18 = getelementptr inbounds %struct.nk_context, ptr %17, i32 0, i32 12
  %19 = load i32, ptr %18, align 4, !tbaa !9
  %20 = icmp ne i32 %19, 0
  br i1 %20, label %21, label %24

21:                                               ; preds = %16
  %22 = load ptr, ptr %2, align 8, !tbaa !5
  %23 = getelementptr inbounds %struct.nk_context, ptr %22, i32 0, i32 2
  call void @nk_buffer_clear(ptr noundef %23)
  br label %27

24:                                               ; preds = %16
  %25 = load ptr, ptr %2, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct.nk_context, ptr %25, i32 0, i32 2
  call void @nk_buffer_reset(ptr noundef %26, i32 noundef 0)
  br label %27

27:                                               ; preds = %24, %21
  %28 = load ptr, ptr %2, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct.nk_context, ptr %28, i32 0, i32 11
  store i32 0, ptr %29, align 8, !tbaa !57
  %30 = load ptr, ptr %2, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct.nk_context, ptr %30, i32 0, i32 2
  %32 = getelementptr inbounds %struct.nk_buffer, ptr %31, i32 0, i32 7
  store i64 0, ptr %32, align 8, !tbaa !58
  %33 = load ptr, ptr %2, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct.nk_context, ptr %33, i32 0, i32 4
  store i32 0, ptr %34, align 8, !tbaa !59
  %35 = load ptr, ptr %2, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.nk_context, ptr %35, i32 0, i32 1
  %37 = getelementptr inbounds %struct.nk_style, ptr %36, i32 0, i32 1
  %38 = getelementptr inbounds [7 x ptr], ptr %37, i64 0, i64 0
  %39 = load ptr, ptr %38, align 8, !tbaa !5
  %40 = load ptr, ptr %2, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.nk_context, ptr %40, i32 0, i32 1
  %42 = getelementptr inbounds %struct.nk_style, ptr %41, i32 0, i32 2
  store ptr %39, ptr %42, align 8, !tbaa !60
  %43 = load ptr, ptr %2, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.nk_context, ptr %43, i32 0, i32 10
  call void @nk_memset(ptr noundef %44, i32 noundef 0, i64 noundef 64)
  %45 = load ptr, ptr %2, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct.nk_context, ptr %45, i32 0, i32 14
  %47 = load ptr, ptr %46, align 8, !tbaa !61
  store ptr %47, ptr %3, align 8, !tbaa !5
  br label %48

48:                                               ; preds = %213, %71, %27
  %49 = load ptr, ptr %3, align 8, !tbaa !5
  %50 = icmp ne ptr %49, null
  br i1 %50, label %51, label %214

51:                                               ; preds = %48
  %52 = load ptr, ptr %3, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.nk_window, ptr %52, i32 0, i32 3
  %54 = load i32, ptr %53, align 8, !tbaa !62
  %55 = and i32 %54, 32768
  %56 = icmp ne i32 %55, 0
  br i1 %56, label %57, label %75

57:                                               ; preds = %51
  %58 = load ptr, ptr %3, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct.nk_window, ptr %58, i32 0, i32 3
  %60 = load i32, ptr %59, align 8, !tbaa !62
  %61 = and i32 %60, 16384
  %62 = icmp ne i32 %61, 0
  br i1 %62, label %75, label %63

63:                                               ; preds = %57
  %64 = load ptr, ptr %3, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct.nk_window, ptr %64, i32 0, i32 0
  %66 = load i32, ptr %65, align 8, !tbaa !69
  %67 = load ptr, ptr %2, align 8, !tbaa !5
  %68 = getelementptr inbounds %struct.nk_context, ptr %67, i32 0, i32 20
  %69 = load i32, ptr %68, align 4, !tbaa !70
  %70 = icmp eq i32 %66, %69
  br i1 %70, label %71, label %75

71:                                               ; preds = %63
  %72 = load ptr, ptr %3, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct.nk_window, ptr %72, i32 0, i32 15
  %74 = load ptr, ptr %73, align 8, !tbaa !71
  store ptr %74, ptr %3, align 8, !tbaa !5
  br label %48, !llvm.loop !72

75:                                               ; preds = %63, %57, %51
  %76 = load ptr, ptr %3, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.nk_window, ptr %76, i32 0, i32 3
  %78 = load i32, ptr %77, align 8, !tbaa !62
  %79 = and i32 %78, 8192
  %80 = icmp ne i32 %79, 0
  br i1 %80, label %87, label %81

81:                                               ; preds = %75
  %82 = load ptr, ptr %3, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct.nk_window, ptr %82, i32 0, i32 3
  %84 = load i32, ptr %83, align 8, !tbaa !62
  %85 = and i32 %84, 16384
  %86 = icmp ne i32 %85, 0
  br i1 %86, label %87, label %124

87:                                               ; preds = %81, %75
  %88 = load ptr, ptr %3, align 8, !tbaa !5
  %89 = load ptr, ptr %2, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct.nk_context, ptr %89, i32 0, i32 16
  %91 = load ptr, ptr %90, align 8, !tbaa !74
  %92 = icmp eq ptr %88, %91
  br i1 %92, label %93, label %124

93:                                               ; preds = %87
  %94 = load ptr, ptr %3, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct.nk_window, ptr %94, i32 0, i32 16
  %96 = load ptr, ptr %95, align 8, !tbaa !75
  %97 = load ptr, ptr %2, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct.nk_context, ptr %97, i32 0, i32 16
  store ptr %96, ptr %98, align 8, !tbaa !74
  %99 = load ptr, ptr %3, align 8, !tbaa !5
  %100 = getelementptr inbounds %struct.nk_window, ptr %99, i32 0, i32 16
  %101 = load ptr, ptr %100, align 8, !tbaa !75
  %102 = load ptr, ptr %2, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct.nk_context, ptr %102, i32 0, i32 15
  store ptr %101, ptr %103, align 8, !tbaa !76
  %104 = load ptr, ptr %2, align 8, !tbaa !5
  %105 = getelementptr inbounds %struct.nk_context, ptr %104, i32 0, i32 15
  %106 = load ptr, ptr %105, align 8, !tbaa !76
  %107 = icmp ne ptr %106, null
  br i1 %107, label %111, label %108

108:                                              ; preds = %93
  %109 = load ptr, ptr %2, align 8, !tbaa !5
  %110 = getelementptr inbounds %struct.nk_context, ptr %109, i32 0, i32 14
  store ptr null, ptr %110, align 8, !tbaa !61
  br label %111

111:                                              ; preds = %108, %93
  %112 = load ptr, ptr %2, align 8, !tbaa !5
  %113 = getelementptr inbounds %struct.nk_context, ptr %112, i32 0, i32 16
  %114 = load ptr, ptr %113, align 8, !tbaa !74
  %115 = icmp ne ptr %114, null
  br i1 %115, label %116, label %123

116:                                              ; preds = %111
  %117 = load ptr, ptr %2, align 8, !tbaa !5
  %118 = getelementptr inbounds %struct.nk_context, ptr %117, i32 0, i32 16
  %119 = load ptr, ptr %118, align 8, !tbaa !74
  %120 = getelementptr inbounds %struct.nk_window, ptr %119, i32 0, i32 3
  %121 = load i32, ptr %120, align 8, !tbaa !62
  %122 = and i32 %121, -4097
  store i32 %122, ptr %120, align 8, !tbaa !62
  br label %123

123:                                              ; preds = %116, %111
  br label %124

124:                                              ; preds = %123, %87, %81
  %125 = load ptr, ptr %3, align 8, !tbaa !5
  %126 = getelementptr inbounds %struct.nk_window, ptr %125, i32 0, i32 10
  %127 = getelementptr inbounds %struct.nk_popup_state, ptr %126, i32 0, i32 0
  %128 = load ptr, ptr %127, align 8, !tbaa !77
  %129 = icmp ne ptr %128, null
  br i1 %129, label %130, label %150

130:                                              ; preds = %124
  %131 = load ptr, ptr %3, align 8, !tbaa !5
  %132 = getelementptr inbounds %struct.nk_window, ptr %131, i32 0, i32 10
  %133 = getelementptr inbounds %struct.nk_popup_state, ptr %132, i32 0, i32 0
  %134 = load ptr, ptr %133, align 8, !tbaa !77
  %135 = getelementptr inbounds %struct.nk_window, ptr %134, i32 0, i32 0
  %136 = load i32, ptr %135, align 8, !tbaa !69
  %137 = load ptr, ptr %2, align 8, !tbaa !5
  %138 = getelementptr inbounds %struct.nk_context, ptr %137, i32 0, i32 20
  %139 = load i32, ptr %138, align 4, !tbaa !70
  %140 = icmp ne i32 %136, %139
  br i1 %140, label %141, label %150

141:                                              ; preds = %130
  %142 = load ptr, ptr %2, align 8, !tbaa !5
  %143 = load ptr, ptr %3, align 8, !tbaa !5
  %144 = getelementptr inbounds %struct.nk_window, ptr %143, i32 0, i32 10
  %145 = getelementptr inbounds %struct.nk_popup_state, ptr %144, i32 0, i32 0
  %146 = load ptr, ptr %145, align 8, !tbaa !77
  call void @nk_free_window(ptr noundef %142, ptr noundef %146)
  %147 = load ptr, ptr %3, align 8, !tbaa !5
  %148 = getelementptr inbounds %struct.nk_window, ptr %147, i32 0, i32 10
  %149 = getelementptr inbounds %struct.nk_popup_state, ptr %148, i32 0, i32 0
  store ptr null, ptr %149, align 8, !tbaa !77
  br label %150

150:                                              ; preds = %141, %130, %124
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #3
  %151 = load ptr, ptr %3, align 8, !tbaa !5
  %152 = getelementptr inbounds %struct.nk_window, ptr %151, i32 0, i32 13
  %153 = load ptr, ptr %152, align 8, !tbaa !78
  store ptr %153, ptr %7, align 8, !tbaa !5
  br label %154

154:                                              ; preds = %184, %150
  %155 = load ptr, ptr %7, align 8, !tbaa !5
  %156 = icmp ne ptr %155, null
  br i1 %156, label %157, label %186

157:                                              ; preds = %154
  %158 = load ptr, ptr %7, align 8, !tbaa !5
  %159 = getelementptr inbounds %struct.nk_table, ptr %158, i32 0, i32 4
  %160 = load ptr, ptr %159, align 8, !tbaa !79
  store ptr %160, ptr %6, align 8, !tbaa !5
  %161 = load ptr, ptr %7, align 8, !tbaa !5
  %162 = getelementptr inbounds %struct.nk_table, ptr %161, i32 0, i32 0
  %163 = load i32, ptr %162, align 8, !tbaa !81
  %164 = load ptr, ptr %2, align 8, !tbaa !5
  %165 = getelementptr inbounds %struct.nk_context, ptr %164, i32 0, i32 20
  %166 = load i32, ptr %165, align 4, !tbaa !70
  %167 = icmp ne i32 %163, %166
  br i1 %167, label %168, label %184

168:                                              ; preds = %157
  %169 = load ptr, ptr %3, align 8, !tbaa !5
  %170 = load ptr, ptr %7, align 8, !tbaa !5
  call void @nk_remove_table(ptr noundef %169, ptr noundef %170)
  %171 = load ptr, ptr %7, align 8, !tbaa !5
  call void @nk_zero(ptr noundef %171, i64 noundef 496)
  %172 = load ptr, ptr %2, align 8, !tbaa !5
  %173 = load ptr, ptr %7, align 8, !tbaa !5
  call void @nk_free_table(ptr noundef %172, ptr noundef %173)
  %174 = load ptr, ptr %7, align 8, !tbaa !5
  %175 = load ptr, ptr %3, align 8, !tbaa !5
  %176 = getelementptr inbounds %struct.nk_window, ptr %175, i32 0, i32 13
  %177 = load ptr, ptr %176, align 8, !tbaa !78
  %178 = icmp eq ptr %174, %177
  br i1 %178, label %179, label %183

179:                                              ; preds = %168
  %180 = load ptr, ptr %6, align 8, !tbaa !5
  %181 = load ptr, ptr %3, align 8, !tbaa !5
  %182 = getelementptr inbounds %struct.nk_window, ptr %181, i32 0, i32 13
  store ptr %180, ptr %182, align 8, !tbaa !78
  br label %183

183:                                              ; preds = %179, %168
  br label %184

184:                                              ; preds = %183, %157
  %185 = load ptr, ptr %6, align 8, !tbaa !5
  store ptr %185, ptr %7, align 8, !tbaa !5
  br label %154, !llvm.loop !82

186:                                              ; preds = %154
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #3
  %187 = load ptr, ptr %3, align 8, !tbaa !5
  %188 = getelementptr inbounds %struct.nk_window, ptr %187, i32 0, i32 0
  %189 = load i32, ptr %188, align 8, !tbaa !69
  %190 = load ptr, ptr %2, align 8, !tbaa !5
  %191 = getelementptr inbounds %struct.nk_context, ptr %190, i32 0, i32 20
  %192 = load i32, ptr %191, align 4, !tbaa !70
  %193 = icmp ne i32 %189, %192
  br i1 %193, label %200, label %194

194:                                              ; preds = %186
  %195 = load ptr, ptr %3, align 8, !tbaa !5
  %196 = getelementptr inbounds %struct.nk_window, ptr %195, i32 0, i32 3
  %197 = load i32, ptr %196, align 8, !tbaa !62
  %198 = and i32 %197, 16384
  %199 = icmp ne i32 %198, 0
  br i1 %199, label %200, label %209

200:                                              ; preds = %194, %186
  %201 = load ptr, ptr %3, align 8, !tbaa !5
  %202 = getelementptr inbounds %struct.nk_window, ptr %201, i32 0, i32 15
  %203 = load ptr, ptr %202, align 8, !tbaa !71
  store ptr %203, ptr %4, align 8, !tbaa !5
  %204 = load ptr, ptr %2, align 8, !tbaa !5
  %205 = load ptr, ptr %3, align 8, !tbaa !5
  call void @nk_remove_window(ptr noundef %204, ptr noundef %205)
  %206 = load ptr, ptr %2, align 8, !tbaa !5
  %207 = load ptr, ptr %3, align 8, !tbaa !5
  call void @nk_free_window(ptr noundef %206, ptr noundef %207)
  %208 = load ptr, ptr %4, align 8, !tbaa !5
  store ptr %208, ptr %3, align 8, !tbaa !5
  br label %213

209:                                              ; preds = %194
  %210 = load ptr, ptr %3, align 8, !tbaa !5
  %211 = getelementptr inbounds %struct.nk_window, ptr %210, i32 0, i32 15
  %212 = load ptr, ptr %211, align 8, !tbaa !71
  store ptr %212, ptr %3, align 8, !tbaa !5
  br label %213

213:                                              ; preds = %209, %200
  br label %48, !llvm.loop !72

214:                                              ; preds = %48
  %215 = load ptr, ptr %2, align 8, !tbaa !5
  %216 = getelementptr inbounds %struct.nk_context, ptr %215, i32 0, i32 20
  %217 = load i32, ptr %216, align 4, !tbaa !70
  %218 = add i32 %217, 1
  store i32 %218, ptr %216, align 4, !tbaa !70
  store i32 0, ptr %5, align 4
  br label %219

219:                                              ; preds = %214, %15
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #3
  %220 = load i32, ptr %5, align 4
  switch i32 %220, label %222 [
    i32 0, label %221
    i32 1, label %221
  ]

221:                                              ; preds = %219, %219
  ret void

222:                                              ; preds = %219
  unreachable
}

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

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

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

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
attributes #4 = { 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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !13, i64 16500}
!10 = !{!"nk_context", !11, i64 0, !17, i64 360, !34, i64 7904, !38, i64 8024, !13, i64 8048, !13, i64 8052, !39, i64 8056, !16, i64 10800, !47, i64 10808, !51, i64 11048, !55, i64 16432, !13, i64 16496, !13, i64 16500, !56, i64 16504, !6, i64 16576, !6, i64 16584, !6, i64 16592, !6, i64 16600, !6, i64 16608, !13, i64 16616, !13, i64 16620}
!11 = !{!"nk_input", !12, i64 0, !14, i64 260}
!12 = !{!"nk_keyboard", !7, i64 0, !7, i64 240, !13, i64 256}
!13 = !{!"int", !7, i64 0}
!14 = !{!"nk_mouse", !7, i64 0, !15, i64 64, !15, i64 72, !15, i64 80, !15, i64 88, !7, i64 96, !7, i64 97, !7, i64 98}
!15 = !{!"nk_vec2", !16, i64 0, !16, i64 4}
!16 = !{!"float", !7, i64 0}
!17 = !{!"nk_style", !6, i64 0, !7, i64 8, !6, i64 64, !6, i64 72, !13, i64 80, !18, i64 84, !20, i64 96, !20, i64 272, !20, i64 448, !22, i64 624, !22, i64 864, !23, i64 1104, !24, i64 1384, !25, i64 2024, !26, i64 2280, !27, i64 3592, !29, i64 4392, !28, i64 4456, !28, i64 5072, !30, i64 5688, !31, i64 6472, !32, i64 6824}
!18 = !{!"nk_style_text", !19, i64 0, !15, i64 4}
!19 = !{!"nk_color", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 3}
!20 = !{!"nk_style_button", !21, i64 0, !21, i64 32, !21, i64 64, !19, i64 96, !19, i64 100, !19, i64 104, !19, i64 108, !19, i64 112, !13, i64 116, !16, i64 120, !16, i64 124, !15, i64 128, !15, i64 136, !15, i64 144, !7, i64 152, !6, i64 160, !6, i64 168}
!21 = !{!"nk_style_item", !13, i64 0, !7, i64 8}
!22 = !{!"nk_style_toggle", !21, i64 0, !21, i64 32, !21, i64 64, !19, i64 96, !21, i64 104, !21, i64 136, !19, i64 168, !19, i64 172, !19, i64 176, !19, i64 180, !13, i64 184, !15, i64 188, !15, i64 196, !16, i64 204, !16, i64 208, !7, i64 216, !6, i64 224, !6, i64 232}
!23 = !{!"nk_style_selectable", !21, i64 0, !21, i64 32, !21, i64 64, !21, i64 96, !21, i64 128, !21, i64 160, !19, i64 192, !19, i64 196, !19, i64 200, !19, i64 204, !19, i64 208, !19, i64 212, !19, i64 216, !13, i64 220, !16, i64 224, !15, i64 228, !15, i64 236, !15, i64 244, !7, i64 256, !6, i64 264, !6, i64 272}
!24 = !{!"nk_style_slider", !21, i64 0, !21, i64 32, !21, i64 64, !19, i64 96, !19, i64 100, !19, i64 104, !19, i64 108, !19, i64 112, !21, i64 120, !21, i64 152, !21, i64 184, !16, i64 216, !16, i64 220, !16, i64 224, !15, i64 228, !15, i64 236, !15, i64 244, !13, i64 252, !20, i64 256, !20, i64 432, !13, i64 608, !13, i64 612, !7, i64 616, !6, i64 624, !6, i64 632}
!25 = !{!"nk_style_progress", !21, i64 0, !21, i64 32, !21, i64 64, !19, i64 96, !21, i64 104, !21, i64 136, !21, i64 168, !19, i64 200, !16, i64 204, !16, i64 208, !16, i64 212, !16, i64 216, !15, i64 220, !7, i64 232, !6, i64 240, !6, i64 248}
!26 = !{!"nk_style_property", !21, i64 0, !21, i64 32, !21, i64 64, !19, i64 96, !19, i64 100, !19, i64 104, !19, i64 108, !13, i64 112, !13, i64 116, !16, i64 120, !16, i64 124, !15, i64 128, !27, i64 136, !20, i64 936, !20, i64 1112, !7, i64 1288, !6, i64 1296, !6, i64 1304}
!27 = !{!"nk_style_edit", !21, i64 0, !21, i64 32, !21, i64 64, !19, i64 96, !28, i64 104, !19, i64 720, !19, i64 724, !19, i64 728, !19, i64 732, !19, i64 736, !19, i64 740, !19, i64 744, !19, i64 748, !19, i64 752, !19, i64 756, !19, i64 760, !16, i64 764, !16, i64 768, !16, i64 772, !15, i64 776, !15, i64 784, !16, i64 792}
!28 = !{!"nk_style_scrollbar", !21, i64 0, !21, i64 32, !21, i64 64, !19, i64 96, !21, i64 104, !21, i64 136, !21, i64 168, !19, i64 200, !16, i64 204, !16, i64 208, !16, i64 212, !16, i64 216, !15, i64 220, !13, i64 228, !20, i64 232, !20, i64 408, !13, i64 584, !13, i64 588, !7, i64 592, !6, i64 600, !6, i64 608}
!29 = !{!"nk_style_chart", !21, i64 0, !19, i64 32, !19, i64 36, !19, i64 40, !16, i64 44, !16, i64 48, !15, i64 52}
!30 = !{!"nk_style_tab", !21, i64 0, !19, i64 32, !19, i64 36, !20, i64 40, !20, i64 216, !20, i64 392, !20, i64 568, !13, i64 744, !13, i64 748, !16, i64 752, !16, i64 756, !16, i64 760, !15, i64 764, !15, i64 772}
!31 = !{!"nk_style_combo", !21, i64 0, !21, i64 32, !21, i64 64, !19, i64 96, !19, i64 100, !19, i64 104, !19, i64 108, !19, i64 112, !19, i64 116, !19, i64 120, !20, i64 128, !13, i64 304, !13, i64 308, !13, i64 312, !16, i64 316, !16, i64 320, !15, i64 324, !15, i64 332, !15, i64 340}
!32 = !{!"nk_style_window", !33, i64 0, !21, i64 504, !19, i64 536, !19, i64 540, !19, i64 544, !19, i64 548, !19, i64 552, !19, i64 556, !19, i64 560, !19, i64 564, !21, i64 568, !16, i64 600, !16, i64 604, !16, i64 608, !16, i64 612, !16, i64 616, !16, i64 620, !16, i64 624, !16, i64 628, !16, i64 632, !15, i64 636, !15, i64 644, !15, i64 652, !15, i64 660, !15, i64 668, !15, i64 676, !15, i64 684, !15, i64 692, !15, i64 700, !15, i64 708}
!33 = !{!"nk_style_window_header", !21, i64 0, !21, i64 32, !21, i64 64, !20, i64 96, !20, i64 272, !13, i64 448, !13, i64 452, !13, i64 456, !19, i64 460, !19, i64 464, !19, i64 468, !13, i64 472, !15, i64 476, !15, i64 484, !15, i64 492}
!34 = !{!"nk_buffer", !7, i64 0, !35, i64 32, !13, i64 56, !36, i64 64, !16, i64 80, !37, i64 88, !37, i64 96, !37, i64 104, !37, i64 112}
!35 = !{!"nk_allocator", !7, i64 0, !6, i64 8, !6, i64 16}
!36 = !{!"nk_memory", !6, i64 0, !37, i64 8}
!37 = !{!"long", !7, i64 0}
!38 = !{!"nk_clipboard", !7, i64 0, !6, i64 8, !6, i64 16}
!39 = !{!"nk_configuration_stacks", !40, i64 0, !41, i64 648, !42, i64 1168, !43, i64 1432, !44, i64 1952, !45, i64 2472, !46, i64 2608}
!40 = !{!"nk_config_stack_style_item", !13, i64 0, !7, i64 8}
!41 = !{!"nk_config_stack_float", !13, i64 0, !7, i64 8}
!42 = !{!"nk_config_stack_vec2", !13, i64 0, !7, i64 8}
!43 = !{!"nk_config_stack_flags", !13, i64 0, !7, i64 8}
!44 = !{!"nk_config_stack_color", !13, i64 0, !7, i64 8}
!45 = !{!"nk_config_stack_user_font", !13, i64 0, !7, i64 8}
!46 = !{!"nk_config_stack_button_behavior", !13, i64 0, !7, i64 8}
!47 = !{!"nk_draw_list", !48, i64 0, !7, i64 16, !49, i64 112, !6, i64 176, !6, i64 184, !6, i64 192, !13, i64 200, !13, i64 204, !13, i64 208, !37, i64 216, !13, i64 224, !13, i64 228, !13, i64 232, !13, i64 236}
!48 = !{!"nk_rect", !16, i64 0, !16, i64 4, !16, i64 8, !16, i64 12}
!49 = !{!"nk_convert_config", !16, i64 0, !13, i64 4, !13, i64 8, !13, i64 12, !13, i64 16, !13, i64 20, !50, i64 24, !6, i64 40, !37, i64 48, !37, i64 56}
!50 = !{!"nk_draw_null_texture", !7, i64 0, !15, i64 8}
!51 = !{!"nk_text_edit", !38, i64 0, !52, i64 24, !6, i64 152, !15, i64 160, !13, i64 168, !13, i64 172, !13, i64 176, !7, i64 180, !7, i64 181, !7, i64 182, !7, i64 183, !7, i64 184, !7, i64 185, !7, i64 186, !16, i64 188, !53, i64 192}
!52 = !{!"nk_str", !34, i64 0, !13, i64 120}
!53 = !{!"nk_text_undo_state", !7, i64 0, !7, i64 1188, !54, i64 5184, !54, i64 5186, !54, i64 5188, !54, i64 5190}
!54 = !{!"short", !7, i64 0}
!55 = !{!"nk_command_buffer", !6, i64 0, !48, i64 8, !13, i64 24, !7, i64 32, !37, i64 40, !37, i64 48, !37, i64 56}
!56 = !{!"nk_pool", !35, i64 0, !13, i64 24, !13, i64 28, !6, i64 32, !6, i64 40, !13, i64 48, !37, i64 56, !37, i64 64}
!57 = !{!10, !13, i64 16496}
!58 = !{!10, !37, i64 8008}
!59 = !{!10, !13, i64 8048}
!60 = !{!10, !6, i64 424}
!61 = !{!10, !6, i64 16576}
!62 = !{!63, !13, i64 72}
!63 = !{!"nk_window", !13, i64 0, !13, i64 4, !7, i64 8, !13, i64 72, !48, i64 76, !64, i64 92, !55, i64 104, !6, i64 168, !16, i64 176, !65, i64 180, !66, i64 288, !68, i64 384, !13, i64 428, !6, i64 432, !13, i64 440, !6, i64 448, !6, i64 456, !6, i64 464}
!64 = !{!"nk_scroll", !13, i64 0, !13, i64 4}
!65 = !{!"nk_property_state", !13, i64 0, !13, i64 4, !7, i64 8, !13, i64 72, !13, i64 76, !13, i64 80, !13, i64 84, !13, i64 88, !13, i64 92, !13, i64 96, !13, i64 100}
!66 = !{!"nk_popup_state", !6, i64 0, !13, i64 8, !67, i64 16, !13, i64 56, !13, i64 60, !13, i64 64, !13, i64 68, !13, i64 72, !13, i64 76, !48, i64 80}
!67 = !{!"nk_popup_buffer", !37, i64 0, !37, i64 8, !37, i64 16, !37, i64 24, !13, i64 32}
!68 = !{!"nk_edit_state", !13, i64 0, !13, i64 4, !13, i64 8, !13, i64 12, !13, i64 16, !13, i64 20, !13, i64 24, !13, i64 28, !64, i64 32, !7, i64 40, !7, i64 41}
!69 = !{!63, !13, i64 0}
!70 = !{!10, !13, i64 16620}
!71 = !{!63, !6, i64 448}
!72 = distinct !{!72, !73}
!73 = !{!"llvm.loop.mustprogress"}
!74 = !{!10, !6, i64 16592}
!75 = !{!63, !6, i64 456}
!76 = !{!10, !6, i64 16584}
!77 = !{!63, !6, i64 288}
!78 = !{!63, !6, i64 432}
!79 = !{!80, !6, i64 480}
!80 = !{!"nk_table", !13, i64 0, !13, i64 4, !7, i64 8, !7, i64 244, !6, i64 480, !6, i64 488}
!81 = !{!80, !13, i64 0}
!82 = distinct !{!82, !73}


; 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"

@.str.2 = external hidden unnamed_addr constant [103 x i8], align 1
@.str.33 = external hidden unnamed_addr constant [4 x i8], align 1
@__PRETTY_FUNCTION__.nk_clear = external hidden unnamed_addr constant [35 x i8], align 1

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden void @nk_zero(ptr noundef, i64 noundef) local_unnamed_addr #1

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

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

; Function Attrs: nounwind uwtable
define dso_local void @nk_clear(ptr noundef %0) local_unnamed_addr #1 {
  %.not = icmp eq ptr %0, null
  br i1 %.not, label %2, label %3

2:                                                ; preds = %1
  tail call void @__assert_fail(ptr noundef nonnull @.str.33, ptr noundef nonnull @.str.2, i32 noundef 15071, ptr noundef nonnull @__PRETTY_FUNCTION__.nk_clear) #2
  unreachable

3:                                                ; preds = %1
  %4 = getelementptr inbounds i8, ptr %0, i64 16500
  %5 = load i32, ptr %4, align 4, !tbaa !5
  %.not66 = icmp eq i32 %5, 0
  %6 = getelementptr inbounds i8, ptr %0, i64 7904
  br i1 %.not66, label %8, label %7

7:                                                ; preds = %3
  tail call void @nk_buffer_clear(ptr noundef nonnull %6)
  br label %9

8:                                                ; preds = %3
  tail call void @nk_buffer_reset(ptr noundef nonnull %6, i32 noundef 0)
  br label %9

9:                                                ; preds = %8, %7
  %10 = getelementptr inbounds i8, ptr %0, i64 16496
  store i32 0, ptr %10, align 8, !tbaa !56
  %11 = getelementptr inbounds i8, ptr %0, i64 8008
  store i64 0, ptr %11, align 8, !tbaa !57
  %12 = getelementptr inbounds i8, ptr %0, i64 8048
  store i32 0, ptr %12, align 8, !tbaa !58
  %13 = getelementptr inbounds i8, ptr %0, i64 368
  %14 = load ptr, ptr %13, align 8, !tbaa !59
  %15 = getelementptr inbounds i8, ptr %0, i64 424
  store ptr %14, ptr %15, align 8, !tbaa !60
  %16 = getelementptr inbounds i8, ptr %0, i64 16432
  tail call void @nk_memset(ptr noundef nonnull %16, i32 noundef 0, i64 noundef 64)
  %17 = getelementptr inbounds i8, ptr %0, i64 16576
  %18 = load ptr, ptr %17, align 8, !tbaa !61
  %.not6783 = icmp eq ptr %18, null
  br i1 %.not6783, label %._crit_edge87, label %.lr.ph86

.lr.ph86:                                         ; preds = %9
  %19 = getelementptr inbounds i8, ptr %0, i64 16620
  %20 = getelementptr inbounds i8, ptr %0, i64 16592
  %21 = getelementptr inbounds i8, ptr %0, i64 16584
  br label %22

22:                                               ; preds = %.lr.ph86, %.backedge
  %.06284 = phi ptr [ %18, %.lr.ph86 ], [ %.062.be, %.backedge ]
  %23 = getelementptr inbounds i8, ptr %.06284, i64 72
  %24 = load i32, ptr %23, align 8, !tbaa !62
  %25 = and i32 %24, 49152
  %or.cond = icmp eq i32 %25, 32768
  br i1 %or.cond, label %26, label %33

26:                                               ; preds = %22
  %27 = load i32, ptr %.06284, align 8, !tbaa !69
  %28 = load i32, ptr %19, align 4, !tbaa !70
  %29 = icmp eq i32 %27, %28
  br i1 %29, label %30, label %33

30:                                               ; preds = %26
  %31 = getelementptr inbounds i8, ptr %.06284, i64 448
  %32 = load ptr, ptr %31, align 8, !tbaa !71
  br label %.backedge

.backedge:                                        ; preds = %69, %72, %30
  %.062.be = phi ptr [ %32, %30 ], [ %71, %69 ], [ %74, %72 ]
  %.not67 = icmp eq ptr %.062.be, null
  br i1 %.not67, label %._crit_edge87, label %22, !llvm.loop !72

33:                                               ; preds = %26, %22
  %34 = and i32 %24, 24576
  %or.cond80 = icmp eq i32 %34, 0
  br i1 %or.cond80, label %45, label %35

35:                                               ; preds = %33
  %36 = load ptr, ptr %20, align 8, !tbaa !74
  %37 = icmp eq ptr %.06284, %36
  br i1 %37, label %38, label %45

38:                                               ; preds = %35
  %39 = getelementptr inbounds i8, ptr %.06284, i64 456
  %40 = load ptr, ptr %39, align 8, !tbaa !75
  store ptr %40, ptr %20, align 8, !tbaa !74
  store ptr %40, ptr %21, align 8, !tbaa !76
  %.not72 = icmp eq ptr %40, null
  br i1 %.not72, label %.thread, label %41

.thread:                                          ; preds = %38
  store ptr null, ptr %17, align 8, !tbaa !61
  br label %45

41:                                               ; preds = %38
  %42 = getelementptr inbounds i8, ptr %40, i64 72
  %43 = load i32, ptr %42, align 8, !tbaa !62
  %44 = and i32 %43, -4097
  store i32 %44, ptr %42, align 8, !tbaa !62
  br label %45

45:                                               ; preds = %.thread, %33, %41, %35
  %46 = getelementptr inbounds i8, ptr %.06284, i64 288
  %47 = load ptr, ptr %46, align 8, !tbaa !77
  %.not74 = icmp eq ptr %47, null
  br i1 %.not74, label %52, label %48

48:                                               ; preds = %45
  %49 = load i32, ptr %47, align 8, !tbaa !69
  %50 = load i32, ptr %19, align 4, !tbaa !70
  %.not75 = icmp eq i32 %49, %50
  br i1 %.not75, label %52, label %51

51:                                               ; preds = %48
  tail call void @nk_free_window(ptr noundef nonnull %0, ptr noundef nonnull %47)
  store ptr null, ptr %46, align 8, !tbaa !77
  br label %52

52:                                               ; preds = %51, %48, %45
  %53 = getelementptr inbounds i8, ptr %.06284, i64 432
  %54 = load ptr, ptr %53, align 8, !tbaa !78
  %.not7681 = icmp eq ptr %54, null
  br i1 %.not7681, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %52, %63
  %.082 = phi ptr [ %56, %63 ], [ %54, %52 ]
  %55 = getelementptr inbounds i8, ptr %.082, i64 480
  %56 = load ptr, ptr %55, align 8, !tbaa !79
  %57 = load i32, ptr %.082, align 8, !tbaa !81
  %58 = load i32, ptr %19, align 4, !tbaa !70
  %.not79 = icmp eq i32 %57, %58
  br i1 %.not79, label %63, label %59

59:                                               ; preds = %.lr.ph
  tail call void @nk_remove_table(ptr noundef nonnull %.06284, ptr noundef nonnull %.082)
  tail call void @nk_zero(ptr noundef nonnull %.082, i64 noundef 496)
  tail call void @nk_free_table(ptr noundef nonnull %0, ptr noundef nonnull %.082)
  %60 = load ptr, ptr %53, align 8, !tbaa !78
  %61 = icmp eq ptr %.082, %60
  br i1 %61, label %62, label %63

62:                                               ; preds = %59
  store ptr %56, ptr %53, align 8, !tbaa !78
  br label %63

63:                                               ; preds = %59, %62, %.lr.ph
  %.not76 = icmp eq ptr %56, null
  br i1 %.not76, label %._crit_edge, label %.lr.ph, !llvm.loop !82

._crit_edge:                                      ; preds = %63, %52
  %64 = load i32, ptr %.06284, align 8, !tbaa !69
  %65 = load i32, ptr %19, align 4, !tbaa !70
  %.not77 = icmp eq i32 %64, %65
  br i1 %.not77, label %66, label %69

66:                                               ; preds = %._crit_edge
  %67 = load i32, ptr %23, align 8, !tbaa !62
  %68 = and i32 %67, 16384
  %.not78 = icmp eq i32 %68, 0
  br i1 %.not78, label %72, label %69

69:                                               ; preds = %66, %._crit_edge
  %70 = getelementptr inbounds i8, ptr %.06284, i64 448
  %71 = load ptr, ptr %70, align 8, !tbaa !71
  tail call void @nk_remove_window(ptr noundef nonnull %0, ptr noundef nonnull %.06284)
  tail call void @nk_free_window(ptr noundef nonnull %0, ptr noundef nonnull %.06284)
  br label %.backedge

72:                                               ; preds = %66
  %73 = getelementptr inbounds i8, ptr %.06284, i64 448
  %74 = load ptr, ptr %73, align 8, !tbaa !71
  br label %.backedge

._crit_edge87:                                    ; preds = %.backedge, %9
  %75 = getelementptr inbounds i8, ptr %0, i64 16620
  %76 = load i32, ptr %75, align 4, !tbaa !70
  %77 = add i32 %76, 1
  store i32 %77, ptr %75, align 4, !tbaa !70
  ret void
}

; Function Attrs: nounwind uwtable
declare hidden void @nk_memset(ptr noundef, i32 noundef, i64 noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare hidden void @nk_free_window(ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare hidden void @nk_remove_table(ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare hidden void @nk_free_table(ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare hidden void @nk_remove_window(ptr noundef, ptr noundef) local_unnamed_addr #1

attributes #0 = { 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 #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 = { noreturn nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !11, i64 16500}
!6 = !{!"nk_context", !7, i64 0, !15, i64 360, !33, i64 7904, !37, i64 8024, !11, i64 8048, !11, i64 8052, !38, i64 8056, !14, i64 10800, !46, i64 10808, !50, i64 11048, !54, i64 16432, !11, i64 16496, !11, i64 16500, !55, i64 16504, !16, i64 16576, !16, i64 16584, !16, i64 16592, !16, i64 16600, !16, i64 16608, !11, i64 16616, !11, i64 16620}
!7 = !{!"nk_input", !8, i64 0, !12, i64 260}
!8 = !{!"nk_keyboard", !9, i64 0, !9, i64 240, !11, i64 256}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C/C++ TBAA"}
!11 = !{!"int", !9, i64 0}
!12 = !{!"nk_mouse", !9, i64 0, !13, i64 64, !13, i64 72, !13, i64 80, !13, i64 88, !9, i64 96, !9, i64 97, !9, i64 98}
!13 = !{!"nk_vec2", !14, i64 0, !14, i64 4}
!14 = !{!"float", !9, i64 0}
!15 = !{!"nk_style", !16, i64 0, !9, i64 8, !16, i64 64, !16, i64 72, !11, i64 80, !17, i64 84, !19, i64 96, !19, i64 272, !19, i64 448, !21, i64 624, !21, i64 864, !22, i64 1104, !23, i64 1384, !24, i64 2024, !25, i64 2280, !26, i64 3592, !28, i64 4392, !27, i64 4456, !27, i64 5072, !29, i64 5688, !30, i64 6472, !31, i64 6824}
!16 = !{!"any pointer", !9, i64 0}
!17 = !{!"nk_style_text", !18, i64 0, !13, i64 4}
!18 = !{!"nk_color", !9, i64 0, !9, i64 1, !9, i64 2, !9, i64 3}
!19 = !{!"nk_style_button", !20, i64 0, !20, i64 32, !20, i64 64, !18, i64 96, !18, i64 100, !18, i64 104, !18, i64 108, !18, i64 112, !11, i64 116, !14, i64 120, !14, i64 124, !13, i64 128, !13, i64 136, !13, i64 144, !9, i64 152, !16, i64 160, !16, i64 168}
!20 = !{!"nk_style_item", !11, i64 0, !9, i64 8}
!21 = !{!"nk_style_toggle", !20, i64 0, !20, i64 32, !20, i64 64, !18, i64 96, !20, i64 104, !20, i64 136, !18, i64 168, !18, i64 172, !18, i64 176, !18, i64 180, !11, i64 184, !13, i64 188, !13, i64 196, !14, i64 204, !14, i64 208, !9, i64 216, !16, i64 224, !16, i64 232}
!22 = !{!"nk_style_selectable", !20, i64 0, !20, i64 32, !20, i64 64, !20, i64 96, !20, i64 128, !20, i64 160, !18, i64 192, !18, i64 196, !18, i64 200, !18, i64 204, !18, i64 208, !18, i64 212, !18, i64 216, !11, i64 220, !14, i64 224, !13, i64 228, !13, i64 236, !13, i64 244, !9, i64 256, !16, i64 264, !16, i64 272}
!23 = !{!"nk_style_slider", !20, i64 0, !20, i64 32, !20, i64 64, !18, i64 96, !18, i64 100, !18, i64 104, !18, i64 108, !18, i64 112, !20, i64 120, !20, i64 152, !20, i64 184, !14, i64 216, !14, i64 220, !14, i64 224, !13, i64 228, !13, i64 236, !13, i64 244, !11, i64 252, !19, i64 256, !19, i64 432, !11, i64 608, !11, i64 612, !9, i64 616, !16, i64 624, !16, i64 632}
!24 = !{!"nk_style_progress", !20, i64 0, !20, i64 32, !20, i64 64, !18, i64 96, !20, i64 104, !20, i64 136, !20, i64 168, !18, i64 200, !14, i64 204, !14, i64 208, !14, i64 212, !14, i64 216, !13, i64 220, !9, i64 232, !16, i64 240, !16, i64 248}
!25 = !{!"nk_style_property", !20, i64 0, !20, i64 32, !20, i64 64, !18, i64 96, !18, i64 100, !18, i64 104, !18, i64 108, !11, i64 112, !11, i64 116, !14, i64 120, !14, i64 124, !13, i64 128, !26, i64 136, !19, i64 936, !19, i64 1112, !9, i64 1288, !16, i64 1296, !16, i64 1304}
!26 = !{!"nk_style_edit", !20, i64 0, !20, i64 32, !20, i64 64, !18, i64 96, !27, i64 104, !18, i64 720, !18, i64 724, !18, i64 728, !18, i64 732, !18, i64 736, !18, i64 740, !18, i64 744, !18, i64 748, !18, i64 752, !18, i64 756, !18, i64 760, !14, i64 764, !14, i64 768, !14, i64 772, !13, i64 776, !13, i64 784, !14, i64 792}
!27 = !{!"nk_style_scrollbar", !20, i64 0, !20, i64 32, !20, i64 64, !18, i64 96, !20, i64 104, !20, i64 136, !20, i64 168, !18, i64 200, !14, i64 204, !14, i64 208, !14, i64 212, !14, i64 216, !13, i64 220, !11, i64 228, !19, i64 232, !19, i64 408, !11, i64 584, !11, i64 588, !9, i64 592, !16, i64 600, !16, i64 608}
!28 = !{!"nk_style_chart", !20, i64 0, !18, i64 32, !18, i64 36, !18, i64 40, !14, i64 44, !14, i64 48, !13, i64 52}
!29 = !{!"nk_style_tab", !20, i64 0, !18, i64 32, !18, i64 36, !19, i64 40, !19, i64 216, !19, i64 392, !19, i64 568, !11, i64 744, !11, i64 748, !14, i64 752, !14, i64 756, !14, i64 760, !13, i64 764, !13, i64 772}
!30 = !{!"nk_style_combo", !20, i64 0, !20, i64 32, !20, i64 64, !18, i64 96, !18, i64 100, !18, i64 104, !18, i64 108, !18, i64 112, !18, i64 116, !18, i64 120, !19, i64 128, !11, i64 304, !11, i64 308, !11, i64 312, !14, i64 316, !14, i64 320, !13, i64 324, !13, i64 332, !13, i64 340}
!31 = !{!"nk_style_window", !32, i64 0, !20, i64 504, !18, i64 536, !18, i64 540, !18, i64 544, !18, i64 548, !18, i64 552, !18, i64 556, !18, i64 560, !18, i64 564, !20, i64 568, !14, i64 600, !14, i64 604, !14, i64 608, !14, i64 612, !14, i64 616, !14, i64 620, !14, i64 624, !14, i64 628, !14, i64 632, !13, i64 636, !13, i64 644, !13, i64 652, !13, i64 660, !13, i64 668, !13, i64 676, !13, i64 684, !13, i64 692, !13, i64 700, !13, i64 708}
!32 = !{!"nk_style_window_header", !20, i64 0, !20, i64 32, !20, i64 64, !19, i64 96, !19, i64 272, !11, i64 448, !11, i64 452, !11, i64 456, !18, i64 460, !18, i64 464, !18, i64 468, !11, i64 472, !13, i64 476, !13, i64 484, !13, i64 492}
!33 = !{!"nk_buffer", !9, i64 0, !34, i64 32, !11, i64 56, !35, i64 64, !14, i64 80, !36, i64 88, !36, i64 96, !36, i64 104, !36, i64 112}
!34 = !{!"nk_allocator", !9, i64 0, !16, i64 8, !16, i64 16}
!35 = !{!"nk_memory", !16, i64 0, !36, i64 8}
!36 = !{!"long", !9, i64 0}
!37 = !{!"nk_clipboard", !9, i64 0, !16, i64 8, !16, i64 16}
!38 = !{!"nk_configuration_stacks", !39, i64 0, !40, i64 648, !41, i64 1168, !42, i64 1432, !43, i64 1952, !44, i64 2472, !45, i64 2608}
!39 = !{!"nk_config_stack_style_item", !11, i64 0, !9, i64 8}
!40 = !{!"nk_config_stack_float", !11, i64 0, !9, i64 8}
!41 = !{!"nk_config_stack_vec2", !11, i64 0, !9, i64 8}
!42 = !{!"nk_config_stack_flags", !11, i64 0, !9, i64 8}
!43 = !{!"nk_config_stack_color", !11, i64 0, !9, i64 8}
!44 = !{!"nk_config_stack_user_font", !11, i64 0, !9, i64 8}
!45 = !{!"nk_config_stack_button_behavior", !11, i64 0, !9, i64 8}
!46 = !{!"nk_draw_list", !47, i64 0, !9, i64 16, !48, i64 112, !16, i64 176, !16, i64 184, !16, i64 192, !11, i64 200, !11, i64 204, !11, i64 208, !36, i64 216, !11, i64 224, !11, i64 228, !11, i64 232, !11, i64 236}
!47 = !{!"nk_rect", !14, i64 0, !14, i64 4, !14, i64 8, !14, i64 12}
!48 = !{!"nk_convert_config", !14, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !49, i64 24, !16, i64 40, !36, i64 48, !36, i64 56}
!49 = !{!"nk_draw_null_texture", !9, i64 0, !13, i64 8}
!50 = !{!"nk_text_edit", !37, i64 0, !51, i64 24, !16, i64 152, !13, i64 160, !11, i64 168, !11, i64 172, !11, i64 176, !9, i64 180, !9, i64 181, !9, i64 182, !9, i64 183, !9, i64 184, !9, i64 185, !9, i64 186, !14, i64 188, !52, i64 192}
!51 = !{!"nk_str", !33, i64 0, !11, i64 120}
!52 = !{!"nk_text_undo_state", !9, i64 0, !9, i64 1188, !53, i64 5184, !53, i64 5186, !53, i64 5188, !53, i64 5190}
!53 = !{!"short", !9, i64 0}
!54 = !{!"nk_command_buffer", !16, i64 0, !47, i64 8, !11, i64 24, !9, i64 32, !36, i64 40, !36, i64 48, !36, i64 56}
!55 = !{!"nk_pool", !34, i64 0, !11, i64 24, !11, i64 28, !16, i64 32, !16, i64 40, !11, i64 48, !36, i64 56, !36, i64 64}
!56 = !{!6, !11, i64 16496}
!57 = !{!6, !36, i64 8008}
!58 = !{!6, !11, i64 8048}
!59 = !{!16, !16, i64 0}
!60 = !{!6, !16, i64 424}
!61 = !{!6, !16, i64 16576}
!62 = !{!63, !11, i64 72}
!63 = !{!"nk_window", !11, i64 0, !11, i64 4, !9, i64 8, !11, i64 72, !47, i64 76, !64, i64 92, !54, i64 104, !16, i64 168, !14, i64 176, !65, i64 180, !66, i64 288, !68, i64 384, !11, i64 428, !16, i64 432, !11, i64 440, !16, i64 448, !16, i64 456, !16, i64 464}
!64 = !{!"nk_scroll", !11, i64 0, !11, i64 4}
!65 = !{!"nk_property_state", !11, i64 0, !11, i64 4, !9, i64 8, !11, i64 72, !11, i64 76, !11, i64 80, !11, i64 84, !11, i64 88, !11, i64 92, !11, i64 96, !11, i64 100}
!66 = !{!"nk_popup_state", !16, i64 0, !11, i64 8, !67, i64 16, !11, i64 56, !11, i64 60, !11, i64 64, !11, i64 68, !11, i64 72, !11, i64 76, !47, i64 80}
!67 = !{!"nk_popup_buffer", !36, i64 0, !36, i64 8, !36, i64 16, !36, i64 24, !11, i64 32}
!68 = !{!"nk_edit_state", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !11, i64 24, !11, i64 28, !64, i64 32, !9, i64 40, !9, i64 41}
!69 = !{!63, !11, i64 0}
!70 = !{!6, !11, i64 16620}
!71 = !{!63, !16, i64 448}
!72 = distinct !{!72, !73}
!73 = !{!"llvm.loop.mustprogress"}
!74 = !{!6, !16, i64 16592}
!75 = !{!63, !16, i64 456}
!76 = !{!6, !16, i64 16584}
!77 = !{!63, !16, i64 288}
!78 = !{!63, !16, i64 432}
!79 = !{!80, !16, i64 480}
!80 = !{!"nk_table", !11, i64 0, !11, i64 4, !9, i64 8, !9, i64 244, !16, i64 480, !16, i64 488}
!81 = !{!80, !11, i64 0}
!82 = distinct !{!82, !73}


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