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

@.str.2 = external hidden unnamed_addr constant [103 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [5 x i8], align 1
@__PRETTY_FUNCTION__.nk_init_custom = external hidden unnamed_addr constant [109 x i8], align 1
@.str.68 = external hidden unnamed_addr constant [5 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: 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) #1

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

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

; Function Attrs: nounwind uwtable
define dso_local i32 @nk_init_custom(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3) #3 {
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store ptr %2, ptr %8, align 8, !tbaa !5
  store ptr %3, ptr %9, align 8, !tbaa !5
  %11 = load ptr, ptr %7, align 8, !tbaa !5
  %12 = icmp ne ptr %11, null
  br i1 %12, label %13, label %14

13:                                               ; preds = %4
  br label %15

14:                                               ; preds = %4
  call void @__assert_fail(ptr noundef @.str.29, ptr noundef @.str.2, i32 noundef 15005, ptr noundef @__PRETTY_FUNCTION__.nk_init_custom) #4
  unreachable

15:                                               ; preds = %13
  %16 = load ptr, ptr %8, align 8, !tbaa !5
  %17 = icmp ne ptr %16, null
  br i1 %17, label %18, label %19

18:                                               ; preds = %15
  br label %20

19:                                               ; preds = %15
  call void @__assert_fail(ptr noundef @.str.68, ptr noundef @.str.2, i32 noundef 15006, ptr noundef @__PRETTY_FUNCTION__.nk_init_custom) #4
  unreachable

20:                                               ; preds = %18
  %21 = load ptr, ptr %7, align 8, !tbaa !5
  %22 = icmp ne ptr %21, null
  br i1 %22, label %23, label %26

23:                                               ; preds = %20
  %24 = load ptr, ptr %8, align 8, !tbaa !5
  %25 = icmp ne ptr %24, null
  br i1 %25, label %27, label %26

26:                                               ; preds = %23, %20
  store i32 0, ptr %5, align 4
  br label %57

27:                                               ; preds = %23
  %28 = load ptr, ptr %6, align 8, !tbaa !5
  %29 = load ptr, ptr %9, align 8, !tbaa !5
  call void @nk_setup(ptr noundef %28, ptr noundef %29)
  %30 = load ptr, ptr %6, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct.nk_context, ptr %30, i32 0, i32 2
  %32 = load ptr, ptr %7, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %31, ptr align 8 %32, i64 120, i1 false), !tbaa.struct !9
  %33 = load ptr, ptr %8, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct.nk_buffer, ptr %33, i32 0, i32 2
  %35 = load i32, ptr %34, align 8, !tbaa !17
  %36 = icmp eq i32 %35, 0
  br i1 %36, label %37, label %48

37:                                               ; preds = %27
  %38 = load ptr, ptr %6, align 8, !tbaa !5
  %39 = getelementptr inbounds %struct.nk_context, ptr %38, i32 0, i32 13
  %40 = load ptr, ptr %8, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.nk_buffer, ptr %40, i32 0, i32 3
  %42 = getelementptr inbounds %struct.nk_memory, ptr %41, i32 0, i32 0
  %43 = load ptr, ptr %42, align 8, !tbaa !21
  %44 = load ptr, ptr %8, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.nk_buffer, ptr %44, i32 0, i32 3
  %46 = getelementptr inbounds %struct.nk_memory, ptr %45, i32 0, i32 1
  %47 = load i64, ptr %46, align 8, !tbaa !22
  call void @nk_pool_init_fixed(ptr noundef %39, ptr noundef %43, i64 noundef %47)
  br label %54

48:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  %49 = load ptr, ptr %8, align 8, !tbaa !5
  %50 = getelementptr inbounds %struct.nk_buffer, ptr %49, i32 0, i32 1
  store ptr %50, ptr %10, align 8, !tbaa !5
  %51 = load ptr, ptr %6, align 8, !tbaa !5
  %52 = getelementptr inbounds %struct.nk_context, ptr %51, i32 0, i32 13
  %53 = load ptr, ptr %10, align 8, !tbaa !5
  call void @nk_pool_init(ptr noundef %52, ptr noundef %53, i32 noundef 16)
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  br label %54

54:                                               ; preds = %48, %37
  %55 = load ptr, ptr %6, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.nk_context, ptr %55, i32 0, i32 12
  store i32 1, ptr %56, align 4, !tbaa !23
  store i32 1, ptr %5, align 4
  br label %57

57:                                               ; preds = %54, %26
  %58 = load i32, ptr %5, align 4
  ret i32 %58
}

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { 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 #4 = { noreturn nounwind }
attributes #5 = { 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 = !{i64 0, i64 32, !10, i64 32, i64 8, !10, i64 40, i64 8, !5, i64 48, i64 8, !5, i64 56, i64 4, !11, i64 64, i64 8, !5, i64 72, i64 8, !13, i64 80, i64 4, !15, i64 88, i64 8, !13, i64 96, i64 8, !13, i64 104, i64 8, !13, i64 112, i64 8, !13}
!10 = !{!7, !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"long", !7, i64 0}
!15 = !{!16, !16, i64 0}
!16 = !{!"float", !7, i64 0}
!17 = !{!18, !12, i64 56}
!18 = !{!"nk_buffer", !7, i64 0, !19, i64 32, !12, i64 56, !20, i64 64, !16, i64 80, !14, i64 88, !14, i64 96, !14, i64 104, !14, i64 112}
!19 = !{!"nk_allocator", !7, i64 0, !6, i64 8, !6, i64 16}
!20 = !{!"nk_memory", !6, i64 0, !14, i64 8}
!21 = !{!18, !6, i64 64}
!22 = !{!18, !14, i64 72}
!23 = !{!24, !12, i64 16500}
!24 = !{!"nk_context", !25, i64 0, !29, i64 360, !18, i64 7904, !46, i64 8024, !12, i64 8048, !12, i64 8052, !47, i64 8056, !16, i64 10800, !55, i64 10808, !59, i64 11048, !63, i64 16432, !12, i64 16496, !12, i64 16500, !64, i64 16504, !6, i64 16576, !6, i64 16584, !6, i64 16592, !6, i64 16600, !6, i64 16608, !12, i64 16616, !12, i64 16620}
!25 = !{!"nk_input", !26, i64 0, !27, i64 260}
!26 = !{!"nk_keyboard", !7, i64 0, !7, i64 240, !12, i64 256}
!27 = !{!"nk_mouse", !7, i64 0, !28, i64 64, !28, i64 72, !28, i64 80, !28, i64 88, !7, i64 96, !7, i64 97, !7, i64 98}
!28 = !{!"nk_vec2", !16, i64 0, !16, i64 4}
!29 = !{!"nk_style", !6, i64 0, !7, i64 8, !6, i64 64, !6, i64 72, !12, i64 80, !30, i64 84, !32, i64 96, !32, i64 272, !32, i64 448, !34, i64 624, !34, i64 864, !35, i64 1104, !36, i64 1384, !37, i64 2024, !38, i64 2280, !39, i64 3592, !41, i64 4392, !40, i64 4456, !40, i64 5072, !42, i64 5688, !43, i64 6472, !44, i64 6824}
!30 = !{!"nk_style_text", !31, i64 0, !28, i64 4}
!31 = !{!"nk_color", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 3}
!32 = !{!"nk_style_button", !33, i64 0, !33, i64 32, !33, i64 64, !31, i64 96, !31, i64 100, !31, i64 104, !31, i64 108, !31, i64 112, !12, i64 116, !16, i64 120, !16, i64 124, !28, i64 128, !28, i64 136, !28, i64 144, !7, i64 152, !6, i64 160, !6, i64 168}
!33 = !{!"nk_style_item", !12, i64 0, !7, i64 8}
!34 = !{!"nk_style_toggle", !33, i64 0, !33, i64 32, !33, i64 64, !31, i64 96, !33, i64 104, !33, i64 136, !31, i64 168, !31, i64 172, !31, i64 176, !31, i64 180, !12, i64 184, !28, i64 188, !28, i64 196, !16, i64 204, !16, i64 208, !7, i64 216, !6, i64 224, !6, i64 232}
!35 = !{!"nk_style_selectable", !33, i64 0, !33, i64 32, !33, i64 64, !33, i64 96, !33, i64 128, !33, i64 160, !31, i64 192, !31, i64 196, !31, i64 200, !31, i64 204, !31, i64 208, !31, i64 212, !31, i64 216, !12, i64 220, !16, i64 224, !28, i64 228, !28, i64 236, !28, i64 244, !7, i64 256, !6, i64 264, !6, i64 272}
!36 = !{!"nk_style_slider", !33, i64 0, !33, i64 32, !33, i64 64, !31, i64 96, !31, i64 100, !31, i64 104, !31, i64 108, !31, i64 112, !33, i64 120, !33, i64 152, !33, i64 184, !16, i64 216, !16, i64 220, !16, i64 224, !28, i64 228, !28, i64 236, !28, i64 244, !12, i64 252, !32, i64 256, !32, i64 432, !12, i64 608, !12, i64 612, !7, i64 616, !6, i64 624, !6, i64 632}
!37 = !{!"nk_style_progress", !33, i64 0, !33, i64 32, !33, i64 64, !31, i64 96, !33, i64 104, !33, i64 136, !33, i64 168, !31, i64 200, !16, i64 204, !16, i64 208, !16, i64 212, !16, i64 216, !28, i64 220, !7, i64 232, !6, i64 240, !6, i64 248}
!38 = !{!"nk_style_property", !33, i64 0, !33, i64 32, !33, i64 64, !31, i64 96, !31, i64 100, !31, i64 104, !31, i64 108, !12, i64 112, !12, i64 116, !16, i64 120, !16, i64 124, !28, i64 128, !39, i64 136, !32, i64 936, !32, i64 1112, !7, i64 1288, !6, i64 1296, !6, i64 1304}
!39 = !{!"nk_style_edit", !33, i64 0, !33, i64 32, !33, i64 64, !31, i64 96, !40, i64 104, !31, i64 720, !31, i64 724, !31, i64 728, !31, i64 732, !31, i64 736, !31, i64 740, !31, i64 744, !31, i64 748, !31, i64 752, !31, i64 756, !31, i64 760, !16, i64 764, !16, i64 768, !16, i64 772, !28, i64 776, !28, i64 784, !16, i64 792}
!40 = !{!"nk_style_scrollbar", !33, i64 0, !33, i64 32, !33, i64 64, !31, i64 96, !33, i64 104, !33, i64 136, !33, i64 168, !31, i64 200, !16, i64 204, !16, i64 208, !16, i64 212, !16, i64 216, !28, i64 220, !12, i64 228, !32, i64 232, !32, i64 408, !12, i64 584, !12, i64 588, !7, i64 592, !6, i64 600, !6, i64 608}
!41 = !{!"nk_style_chart", !33, i64 0, !31, i64 32, !31, i64 36, !31, i64 40, !16, i64 44, !16, i64 48, !28, i64 52}
!42 = !{!"nk_style_tab", !33, i64 0, !31, i64 32, !31, i64 36, !32, i64 40, !32, i64 216, !32, i64 392, !32, i64 568, !12, i64 744, !12, i64 748, !16, i64 752, !16, i64 756, !16, i64 760, !28, i64 764, !28, i64 772}
!43 = !{!"nk_style_combo", !33, i64 0, !33, i64 32, !33, i64 64, !31, i64 96, !31, i64 100, !31, i64 104, !31, i64 108, !31, i64 112, !31, i64 116, !31, i64 120, !32, i64 128, !12, i64 304, !12, i64 308, !12, i64 312, !16, i64 316, !16, i64 320, !28, i64 324, !28, i64 332, !28, i64 340}
!44 = !{!"nk_style_window", !45, i64 0, !33, i64 504, !31, i64 536, !31, i64 540, !31, i64 544, !31, i64 548, !31, i64 552, !31, i64 556, !31, i64 560, !31, i64 564, !33, 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, !28, i64 636, !28, i64 644, !28, i64 652, !28, i64 660, !28, i64 668, !28, i64 676, !28, i64 684, !28, i64 692, !28, i64 700, !28, i64 708}
!45 = !{!"nk_style_window_header", !33, i64 0, !33, i64 32, !33, i64 64, !32, i64 96, !32, i64 272, !12, i64 448, !12, i64 452, !12, i64 456, !31, i64 460, !31, i64 464, !31, i64 468, !12, i64 472, !28, i64 476, !28, i64 484, !28, i64 492}
!46 = !{!"nk_clipboard", !7, i64 0, !6, i64 8, !6, i64 16}
!47 = !{!"nk_configuration_stacks", !48, i64 0, !49, i64 648, !50, i64 1168, !51, i64 1432, !52, i64 1952, !53, i64 2472, !54, i64 2608}
!48 = !{!"nk_config_stack_style_item", !12, i64 0, !7, i64 8}
!49 = !{!"nk_config_stack_float", !12, i64 0, !7, i64 8}
!50 = !{!"nk_config_stack_vec2", !12, i64 0, !7, i64 8}
!51 = !{!"nk_config_stack_flags", !12, i64 0, !7, i64 8}
!52 = !{!"nk_config_stack_color", !12, i64 0, !7, i64 8}
!53 = !{!"nk_config_stack_user_font", !12, i64 0, !7, i64 8}
!54 = !{!"nk_config_stack_button_behavior", !12, i64 0, !7, i64 8}
!55 = !{!"nk_draw_list", !56, i64 0, !7, i64 16, !57, i64 112, !6, i64 176, !6, i64 184, !6, i64 192, !12, i64 200, !12, i64 204, !12, i64 208, !14, i64 216, !12, i64 224, !12, i64 228, !12, i64 232, !12, i64 236}
!56 = !{!"nk_rect", !16, i64 0, !16, i64 4, !16, i64 8, !16, i64 12}
!57 = !{!"nk_convert_config", !16, i64 0, !12, i64 4, !12, i64 8, !12, i64 12, !12, i64 16, !12, i64 20, !58, i64 24, !6, i64 40, !14, i64 48, !14, i64 56}
!58 = !{!"nk_draw_null_texture", !7, i64 0, !28, i64 8}
!59 = !{!"nk_text_edit", !46, i64 0, !60, i64 24, !6, i64 152, !28, i64 160, !12, i64 168, !12, i64 172, !12, 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, !61, i64 192}
!60 = !{!"nk_str", !18, i64 0, !12, i64 120}
!61 = !{!"nk_text_undo_state", !7, i64 0, !7, i64 1188, !62, i64 5184, !62, i64 5186, !62, i64 5188, !62, i64 5190}
!62 = !{!"short", !7, i64 0}
!63 = !{!"nk_command_buffer", !6, i64 0, !56, i64 8, !12, i64 24, !7, i64 32, !14, i64 40, !14, i64 48, !14, i64 56}
!64 = !{!"nk_pool", !19, i64 0, !12, i64 24, !12, i64 28, !6, i64 32, !6, i64 40, !12, i64 48, !14, i64 56, !14, i64 64}


; 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.29 = external hidden unnamed_addr constant [5 x i8], align 1
@__PRETTY_FUNCTION__.nk_init_custom = external hidden unnamed_addr constant [109 x i8], align 1
@.str.68 = external hidden unnamed_addr constant [5 x i8], align 1

; Function Attrs: mustprogress 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) #0

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

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

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

5:                                                ; preds = %4
  tail call void @__assert_fail(ptr noundef nonnull @.str.29, ptr noundef nonnull @.str.2, i32 noundef 15005, ptr noundef nonnull @__PRETTY_FUNCTION__.nk_init_custom) #3
  unreachable

6:                                                ; preds = %4
  %.not19 = icmp eq ptr %2, null
  br i1 %.not19, label %7, label %8

7:                                                ; preds = %6
  tail call void @__assert_fail(ptr noundef nonnull @.str.68, ptr noundef nonnull @.str.2, i32 noundef 15006, ptr noundef nonnull @__PRETTY_FUNCTION__.nk_init_custom) #3
  unreachable

8:                                                ; preds = %6
  tail call void @nk_setup(ptr noundef %0, ptr noundef %3)
  %9 = getelementptr inbounds i8, ptr %0, i64 7904
  tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(120) %9, ptr noundef nonnull align 8 dereferenceable(120) %1, i64 120, i1 false), !tbaa.struct !5
  %10 = getelementptr inbounds i8, ptr %2, i64 56
  %11 = load i32, ptr %10, align 8, !tbaa !17
  %12 = icmp eq i32 %11, 0
  br i1 %12, label %13, label %19

13:                                               ; preds = %8
  %14 = getelementptr inbounds i8, ptr %0, i64 16504
  %15 = getelementptr inbounds i8, ptr %2, i64 64
  %16 = load ptr, ptr %15, align 8, !tbaa !21
  %17 = getelementptr inbounds i8, ptr %2, i64 72
  %18 = load i64, ptr %17, align 8, !tbaa !22
  tail call void @nk_pool_init_fixed(ptr noundef nonnull %14, ptr noundef %16, i64 noundef %18)
  br label %22

19:                                               ; preds = %8
  %20 = getelementptr inbounds i8, ptr %2, i64 32
  %21 = getelementptr inbounds i8, ptr %0, i64 16504
  tail call void @nk_pool_init(ptr noundef nonnull %21, ptr noundef nonnull %20, i32 noundef 16)
  br label %22

22:                                               ; preds = %19, %13
  %23 = getelementptr inbounds i8, ptr %0, i64 16500
  store i32 1, ptr %23, align 4, !tbaa !23
  ret i32 1
}

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

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

attributes #0 = { mustprogress nocallback nofree 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 = { 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 = !{i64 0, i64 32, !6, i64 32, i64 8, !6, i64 40, i64 8, !9, i64 48, i64 8, !9, i64 56, i64 4, !11, i64 64, i64 8, !9, i64 72, i64 8, !13, i64 80, i64 4, !15, i64 88, i64 8, !13, i64 96, i64 8, !13, i64 104, i64 8, !13, i64 112, i64 8, !13}
!6 = !{!7, !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 = !{!"int", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"long", !7, i64 0}
!15 = !{!16, !16, i64 0}
!16 = !{!"float", !7, i64 0}
!17 = !{!18, !12, i64 56}
!18 = !{!"nk_buffer", !7, i64 0, !19, i64 32, !12, i64 56, !20, i64 64, !16, i64 80, !14, i64 88, !14, i64 96, !14, i64 104, !14, i64 112}
!19 = !{!"nk_allocator", !7, i64 0, !10, i64 8, !10, i64 16}
!20 = !{!"nk_memory", !10, i64 0, !14, i64 8}
!21 = !{!18, !10, i64 64}
!22 = !{!18, !14, i64 72}
!23 = !{!24, !12, i64 16500}
!24 = !{!"nk_context", !25, i64 0, !29, i64 360, !18, i64 7904, !46, i64 8024, !12, i64 8048, !12, i64 8052, !47, i64 8056, !16, i64 10800, !55, i64 10808, !59, i64 11048, !63, i64 16432, !12, i64 16496, !12, i64 16500, !64, i64 16504, !10, i64 16576, !10, i64 16584, !10, i64 16592, !10, i64 16600, !10, i64 16608, !12, i64 16616, !12, i64 16620}
!25 = !{!"nk_input", !26, i64 0, !27, i64 260}
!26 = !{!"nk_keyboard", !7, i64 0, !7, i64 240, !12, i64 256}
!27 = !{!"nk_mouse", !7, i64 0, !28, i64 64, !28, i64 72, !28, i64 80, !28, i64 88, !7, i64 96, !7, i64 97, !7, i64 98}
!28 = !{!"nk_vec2", !16, i64 0, !16, i64 4}
!29 = !{!"nk_style", !10, i64 0, !7, i64 8, !10, i64 64, !10, i64 72, !12, i64 80, !30, i64 84, !32, i64 96, !32, i64 272, !32, i64 448, !34, i64 624, !34, i64 864, !35, i64 1104, !36, i64 1384, !37, i64 2024, !38, i64 2280, !39, i64 3592, !41, i64 4392, !40, i64 4456, !40, i64 5072, !42, i64 5688, !43, i64 6472, !44, i64 6824}
!30 = !{!"nk_style_text", !31, i64 0, !28, i64 4}
!31 = !{!"nk_color", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 3}
!32 = !{!"nk_style_button", !33, i64 0, !33, i64 32, !33, i64 64, !31, i64 96, !31, i64 100, !31, i64 104, !31, i64 108, !31, i64 112, !12, i64 116, !16, i64 120, !16, i64 124, !28, i64 128, !28, i64 136, !28, i64 144, !7, i64 152, !10, i64 160, !10, i64 168}
!33 = !{!"nk_style_item", !12, i64 0, !7, i64 8}
!34 = !{!"nk_style_toggle", !33, i64 0, !33, i64 32, !33, i64 64, !31, i64 96, !33, i64 104, !33, i64 136, !31, i64 168, !31, i64 172, !31, i64 176, !31, i64 180, !12, i64 184, !28, i64 188, !28, i64 196, !16, i64 204, !16, i64 208, !7, i64 216, !10, i64 224, !10, i64 232}
!35 = !{!"nk_style_selectable", !33, i64 0, !33, i64 32, !33, i64 64, !33, i64 96, !33, i64 128, !33, i64 160, !31, i64 192, !31, i64 196, !31, i64 200, !31, i64 204, !31, i64 208, !31, i64 212, !31, i64 216, !12, i64 220, !16, i64 224, !28, i64 228, !28, i64 236, !28, i64 244, !7, i64 256, !10, i64 264, !10, i64 272}
!36 = !{!"nk_style_slider", !33, i64 0, !33, i64 32, !33, i64 64, !31, i64 96, !31, i64 100, !31, i64 104, !31, i64 108, !31, i64 112, !33, i64 120, !33, i64 152, !33, i64 184, !16, i64 216, !16, i64 220, !16, i64 224, !28, i64 228, !28, i64 236, !28, i64 244, !12, i64 252, !32, i64 256, !32, i64 432, !12, i64 608, !12, i64 612, !7, i64 616, !10, i64 624, !10, i64 632}
!37 = !{!"nk_style_progress", !33, i64 0, !33, i64 32, !33, i64 64, !31, i64 96, !33, i64 104, !33, i64 136, !33, i64 168, !31, i64 200, !16, i64 204, !16, i64 208, !16, i64 212, !16, i64 216, !28, i64 220, !7, i64 232, !10, i64 240, !10, i64 248}
!38 = !{!"nk_style_property", !33, i64 0, !33, i64 32, !33, i64 64, !31, i64 96, !31, i64 100, !31, i64 104, !31, i64 108, !12, i64 112, !12, i64 116, !16, i64 120, !16, i64 124, !28, i64 128, !39, i64 136, !32, i64 936, !32, i64 1112, !7, i64 1288, !10, i64 1296, !10, i64 1304}
!39 = !{!"nk_style_edit", !33, i64 0, !33, i64 32, !33, i64 64, !31, i64 96, !40, i64 104, !31, i64 720, !31, i64 724, !31, i64 728, !31, i64 732, !31, i64 736, !31, i64 740, !31, i64 744, !31, i64 748, !31, i64 752, !31, i64 756, !31, i64 760, !16, i64 764, !16, i64 768, !16, i64 772, !28, i64 776, !28, i64 784, !16, i64 792}
!40 = !{!"nk_style_scrollbar", !33, i64 0, !33, i64 32, !33, i64 64, !31, i64 96, !33, i64 104, !33, i64 136, !33, i64 168, !31, i64 200, !16, i64 204, !16, i64 208, !16, i64 212, !16, i64 216, !28, i64 220, !12, i64 228, !32, i64 232, !32, i64 408, !12, i64 584, !12, i64 588, !7, i64 592, !10, i64 600, !10, i64 608}
!41 = !{!"nk_style_chart", !33, i64 0, !31, i64 32, !31, i64 36, !31, i64 40, !16, i64 44, !16, i64 48, !28, i64 52}
!42 = !{!"nk_style_tab", !33, i64 0, !31, i64 32, !31, i64 36, !32, i64 40, !32, i64 216, !32, i64 392, !32, i64 568, !12, i64 744, !12, i64 748, !16, i64 752, !16, i64 756, !16, i64 760, !28, i64 764, !28, i64 772}
!43 = !{!"nk_style_combo", !33, i64 0, !33, i64 32, !33, i64 64, !31, i64 96, !31, i64 100, !31, i64 104, !31, i64 108, !31, i64 112, !31, i64 116, !31, i64 120, !32, i64 128, !12, i64 304, !12, i64 308, !12, i64 312, !16, i64 316, !16, i64 320, !28, i64 324, !28, i64 332, !28, i64 340}
!44 = !{!"nk_style_window", !45, i64 0, !33, i64 504, !31, i64 536, !31, i64 540, !31, i64 544, !31, i64 548, !31, i64 552, !31, i64 556, !31, i64 560, !31, i64 564, !33, 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, !28, i64 636, !28, i64 644, !28, i64 652, !28, i64 660, !28, i64 668, !28, i64 676, !28, i64 684, !28, i64 692, !28, i64 700, !28, i64 708}
!45 = !{!"nk_style_window_header", !33, i64 0, !33, i64 32, !33, i64 64, !32, i64 96, !32, i64 272, !12, i64 448, !12, i64 452, !12, i64 456, !31, i64 460, !31, i64 464, !31, i64 468, !12, i64 472, !28, i64 476, !28, i64 484, !28, i64 492}
!46 = !{!"nk_clipboard", !7, i64 0, !10, i64 8, !10, i64 16}
!47 = !{!"nk_configuration_stacks", !48, i64 0, !49, i64 648, !50, i64 1168, !51, i64 1432, !52, i64 1952, !53, i64 2472, !54, i64 2608}
!48 = !{!"nk_config_stack_style_item", !12, i64 0, !7, i64 8}
!49 = !{!"nk_config_stack_float", !12, i64 0, !7, i64 8}
!50 = !{!"nk_config_stack_vec2", !12, i64 0, !7, i64 8}
!51 = !{!"nk_config_stack_flags", !12, i64 0, !7, i64 8}
!52 = !{!"nk_config_stack_color", !12, i64 0, !7, i64 8}
!53 = !{!"nk_config_stack_user_font", !12, i64 0, !7, i64 8}
!54 = !{!"nk_config_stack_button_behavior", !12, i64 0, !7, i64 8}
!55 = !{!"nk_draw_list", !56, i64 0, !7, i64 16, !57, i64 112, !10, i64 176, !10, i64 184, !10, i64 192, !12, i64 200, !12, i64 204, !12, i64 208, !14, i64 216, !12, i64 224, !12, i64 228, !12, i64 232, !12, i64 236}
!56 = !{!"nk_rect", !16, i64 0, !16, i64 4, !16, i64 8, !16, i64 12}
!57 = !{!"nk_convert_config", !16, i64 0, !12, i64 4, !12, i64 8, !12, i64 12, !12, i64 16, !12, i64 20, !58, i64 24, !10, i64 40, !14, i64 48, !14, i64 56}
!58 = !{!"nk_draw_null_texture", !7, i64 0, !28, i64 8}
!59 = !{!"nk_text_edit", !46, i64 0, !60, i64 24, !10, i64 152, !28, i64 160, !12, i64 168, !12, i64 172, !12, 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, !61, i64 192}
!60 = !{!"nk_str", !18, i64 0, !12, i64 120}
!61 = !{!"nk_text_undo_state", !7, i64 0, !7, i64 1188, !62, i64 5184, !62, i64 5186, !62, i64 5188, !62, i64 5190}
!62 = !{!"short", !7, i64 0}
!63 = !{!"nk_command_buffer", !10, i64 0, !56, i64 8, !12, i64 24, !7, i64 32, !14, i64 40, !14, i64 48, !14, i64 56}
!64 = !{!"nk_pool", !19, i64 0, !12, i64 24, !12, i64 28, !10, i64 32, !10, i64 40, !12, i64 48, !14, i64 56, !14, i64 64}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass