; LLVM IR from l1mey112/yr11-physics-applied :: sokol (sokol)

; 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._simgui_state_t = type { %struct.simgui_desc_t, float, %struct.sg_buffer, %struct.sg_buffer, %struct.sg_image, %struct.sg_shader, %struct.sg_pipeline, %struct.sg_range, %struct.sg_range, i8 }
%struct.simgui_desc_t = type { i32, i32, i32, i32, ptr, i8, i8, i8, i8, i8, %struct.simgui_allocator_t }
%struct.simgui_allocator_t = type { ptr, ptr, ptr }
%struct.sg_buffer = type { i32 }
%struct.sg_image = type { i32 }
%struct.sg_shader = type { i32 }
%struct.sg_pipeline = type { i32 }
%struct.sg_range = type { ptr, i64 }
%struct.simgui_frame_desc_t = type { i32, i32, double, float }
%struct.ImGuiIO = type { i32, i32, %struct.ImVec2, float, float, ptr, ptr, float, float, float, float, float, float, float, ptr, ptr, float, i8, ptr, %struct.ImVec2, i8, i8, i8, i8, i8, i8, i8, i8, float, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i8, i8, i8, i8, i8, i8, i8, float, i32, i32, i32, i32, i32, %struct.ImVec2, [652 x i32], [652 x i8], [16 x float], %struct.ImVec2, [5 x i8], float, float, i8, i8, i8, i8, i32, [652 x %struct.ImGuiKeyData], i8, %struct.ImVec2, [5 x %struct.ImVec2], [5 x double], [5 x i8], [5 x i8], [5 x i16], [5 x i16], [5 x i8], [5 x i8], [5 x i8], [5 x float], [5 x float], [5 x float], float, i8, i8, i8, i8, i16, %struct.ImVector_ImWchar }
%struct.ImGuiKeyData = type { i8, float, float, float }
%struct.ImVec2 = type { float, float }
%struct.ImVector_ImWchar = type { i32, i32, ptr }

@.str.6 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.83 = external hidden unnamed_addr constant [83 x i8], align 1
@_simgui = external hidden global %struct._simgui_state_t, align 8
@__PRETTY_FUNCTION__.simgui_new_frame = external hidden unnamed_addr constant [51 x i8], align 1
@.str.99 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.100 = external hidden unnamed_addr constant [17 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 dso_local void @sapp_show_keyboard(i1 noundef zeroext) #2

; Function Attrs: nounwind uwtable
declare dso_local zeroext i1 @sapp_keyboard_shown() #2

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @sapp_get_mouse_cursor() #2

declare ptr @igGetIO() #3

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

8:                                                ; preds = %1
  br label %10

9:                                                ; preds = %1
  call void @__assert_fail(ptr noundef @.str.6, ptr noundef @.str.83, i32 noundef 1945, ptr noundef @__PRETTY_FUNCTION__.simgui_new_frame) #4
  unreachable

10:                                               ; preds = %8
  %11 = load ptr, ptr %2, align 8, !tbaa !5
  %12 = getelementptr inbounds %struct.simgui_frame_desc_t, ptr %11, i32 0, i32 0
  %13 = load i32, ptr %12, align 8, !tbaa !9
  %14 = icmp sgt i32 %13, 0
  br i1 %14, label %15, label %16

15:                                               ; preds = %10
  br label %17

16:                                               ; preds = %10
  call void @__assert_fail(ptr noundef @.str.99, ptr noundef @.str.83, i32 noundef 1946, ptr noundef @__PRETTY_FUNCTION__.simgui_new_frame) #4
  unreachable

17:                                               ; preds = %15
  %18 = load ptr, ptr %2, align 8, !tbaa !5
  %19 = getelementptr inbounds %struct.simgui_frame_desc_t, ptr %18, i32 0, i32 1
  %20 = load i32, ptr %19, align 4, !tbaa !14
  %21 = icmp sgt i32 %20, 0
  br i1 %21, label %22, label %23

22:                                               ; preds = %17
  br label %24

23:                                               ; preds = %17
  call void @__assert_fail(ptr noundef @.str.100, ptr noundef @.str.83, i32 noundef 1947, ptr noundef @__PRETTY_FUNCTION__.simgui_new_frame) #4
  unreachable

24:                                               ; preds = %22
  %25 = load ptr, ptr %2, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct.simgui_frame_desc_t, ptr %25, i32 0, i32 3
  %27 = load float, ptr %26, align 8, !tbaa !15
  %28 = fcmp oeq float %27, 0.000000e+00
  br i1 %28, label %29, label %30

29:                                               ; preds = %24
  br label %34

30:                                               ; preds = %24
  %31 = load ptr, ptr %2, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct.simgui_frame_desc_t, ptr %31, i32 0, i32 3
  %33 = load float, ptr %32, align 8, !tbaa !15
  br label %34

34:                                               ; preds = %30, %29
  %35 = phi float [ 1.000000e+00, %29 ], [ %33, %30 ]
  store float %35, ptr getelementptr inbounds (%struct._simgui_state_t, ptr @_simgui, i32 0, i32 1), align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #5
  %36 = call ptr @igGetIO()
  store ptr %36, ptr %3, align 8, !tbaa !5
  %37 = load ptr, ptr %2, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.simgui_frame_desc_t, ptr %37, i32 0, i32 0
  %39 = load i32, ptr %38, align 8, !tbaa !9
  %40 = sitofp i32 %39 to float
  %41 = load float, ptr getelementptr inbounds (%struct._simgui_state_t, ptr @_simgui, i32 0, i32 1), align 8, !tbaa !16
  %42 = fdiv float %40, %41
  %43 = load ptr, ptr %3, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.ImGuiIO, ptr %43, i32 0, i32 2
  %45 = getelementptr inbounds %struct.ImVec2, ptr %44, i32 0, i32 0
  store float %42, ptr %45, align 8, !tbaa !27
  %46 = load ptr, ptr %2, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct.simgui_frame_desc_t, ptr %46, i32 0, i32 1
  %48 = load i32, ptr %47, align 4, !tbaa !14
  %49 = sitofp i32 %48 to float
  %50 = load float, ptr getelementptr inbounds (%struct._simgui_state_t, ptr @_simgui, i32 0, i32 1), align 8, !tbaa !16
  %51 = fdiv float %49, %50
  %52 = load ptr, ptr %3, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.ImGuiIO, ptr %52, i32 0, i32 2
  %54 = getelementptr inbounds %struct.ImVec2, ptr %53, i32 0, i32 1
  store float %51, ptr %54, align 4, !tbaa !32
  %55 = load ptr, ptr %2, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.simgui_frame_desc_t, ptr %55, i32 0, i32 2
  %57 = load double, ptr %56, align 8, !tbaa !33
  %58 = fptrunc double %57 to float
  %59 = load ptr, ptr %3, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.ImGuiIO, ptr %59, i32 0, i32 3
  store float %58, ptr %60, align 8, !tbaa !34
  %61 = load ptr, ptr %3, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.ImGuiIO, ptr %61, i32 0, i32 41
  %63 = load i8, ptr %62, align 2, !tbaa !35, !range !36, !noundef !37
  %64 = trunc i8 %63 to i1
  br i1 %64, label %65, label %68

65:                                               ; preds = %34
  %66 = call zeroext i1 @sapp_keyboard_shown()
  br i1 %66, label %68, label %67

67:                                               ; preds = %65
  call void @sapp_show_keyboard(i1 noundef zeroext true)
  br label %68

68:                                               ; preds = %67, %65, %34
  %69 = load ptr, ptr %3, align 8, !tbaa !5
  %70 = getelementptr inbounds %struct.ImGuiIO, ptr %69, i32 0, i32 41
  %71 = load i8, ptr %70, align 2, !tbaa !35, !range !36, !noundef !37
  %72 = trunc i8 %71 to i1
  br i1 %72, label %76, label %73

73:                                               ; preds = %68
  %74 = call zeroext i1 @sapp_keyboard_shown()
  br i1 %74, label %75, label %76

75:                                               ; preds = %73
  call void @sapp_show_keyboard(i1 noundef zeroext false)
  br label %76

76:                                               ; preds = %75, %73, %68
  %77 = load i8, ptr getelementptr inbounds (%struct.simgui_desc_t, ptr @_simgui, i32 0, i32 7), align 2, !tbaa !38, !range !36, !noundef !37
  %78 = trunc i8 %77 to i1
  br i1 %78, label %95, label %79

79:                                               ; preds = %76
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #5
  %80 = call i32 @igGetMouseCursor()
  store i32 %80, ptr %4, align 4, !tbaa !39
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  %81 = call i32 @sapp_get_mouse_cursor()
  store i32 %81, ptr %5, align 4, !tbaa !39
  %82 = load i32, ptr %4, align 4, !tbaa !39
  switch i32 %82, label %92 [
    i32 0, label %83
    i32 1, label %84
    i32 2, label %85
    i32 3, label %86
    i32 4, label %87
    i32 5, label %88
    i32 6, label %89
    i32 7, label %90
    i32 8, label %91
  ]

83:                                               ; preds = %79
  store i32 1, ptr %5, align 4, !tbaa !39
  br label %93

84:                                               ; preds = %79
  store i32 2, ptr %5, align 4, !tbaa !39
  br label %93

85:                                               ; preds = %79
  store i32 9, ptr %5, align 4, !tbaa !39
  br label %93

86:                                               ; preds = %79
  store i32 6, ptr %5, align 4, !tbaa !39
  br label %93

87:                                               ; preds = %79
  store i32 5, ptr %5, align 4, !tbaa !39
  br label %93

88:                                               ; preds = %79
  store i32 8, ptr %5, align 4, !tbaa !39
  br label %93

89:                                               ; preds = %79
  store i32 7, ptr %5, align 4, !tbaa !39
  br label %93

90:                                               ; preds = %79
  store i32 4, ptr %5, align 4, !tbaa !39
  br label %93

91:                                               ; preds = %79
  store i32 10, ptr %5, align 4, !tbaa !39
  br label %93

92:                                               ; preds = %79
  br label %93

93:                                               ; preds = %92, %91, %90, %89, %88, %87, %86, %85, %84, %83
  %94 = load i32, ptr %5, align 4, !tbaa !39
  call void @sapp_set_mouse_cursor(i32 noundef %94)
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #5
  br label %95

95:                                               ; preds = %93, %76
  call void @igNewFrame()
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #5
  ret void
}

declare i32 @igGetMouseCursor() #3

declare void @igNewFrame() #3

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 = { "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 = !{!10, !11, i64 0}
!10 = !{!"simgui_frame_desc_t", !11, i64 0, !11, i64 4, !12, i64 8, !13, i64 16}
!11 = !{!"int", !7, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = !{!"float", !7, i64 0}
!14 = !{!10, !11, i64 4}
!15 = !{!10, !13, i64 16}
!16 = !{!17, !13, i64 56}
!17 = !{!"", !18, i64 0, !13, i64 56, !21, i64 60, !21, i64 64, !22, i64 68, !23, i64 72, !24, i64 76, !25, i64 80, !25, i64 96, !19, i64 112}
!18 = !{!"simgui_desc_t", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !6, i64 16, !19, i64 24, !19, i64 25, !19, i64 26, !19, i64 27, !19, i64 28, !20, i64 32}
!19 = !{!"_Bool", !7, i64 0}
!20 = !{!"simgui_allocator_t", !6, i64 0, !6, i64 8, !6, i64 16}
!21 = !{!"sg_buffer", !11, i64 0}
!22 = !{!"sg_image", !11, i64 0}
!23 = !{!"sg_shader", !11, i64 0}
!24 = !{!"sg_pipeline", !11, i64 0}
!25 = !{!"sg_range", !6, i64 0, !26, i64 8}
!26 = !{!"long", !7, i64 0}
!27 = !{!28, !13, i64 8}
!28 = !{!"ImGuiIO", !11, i64 0, !11, i64 4, !29, i64 8, !13, i64 16, !13, i64 20, !6, i64 24, !6, i64 32, !13, i64 40, !13, i64 44, !13, i64 48, !13, i64 52, !13, i64 56, !13, i64 60, !13, i64 64, !6, i64 72, !6, i64 80, !13, i64 88, !19, i64 92, !6, i64 96, !29, i64 104, !19, i64 112, !19, i64 113, !19, i64 114, !19, i64 115, !19, i64 116, !19, i64 117, !19, i64 118, !19, i64 119, !13, i64 120, !6, i64 128, !6, i64 136, !6, i64 144, !6, i64 152, !6, i64 160, !6, i64 168, !6, i64 176, !6, i64 184, !6, i64 192, !6, i64 200, !19, i64 208, !19, i64 209, !19, i64 210, !19, i64 211, !19, i64 212, !19, i64 213, !19, i64 214, !13, i64 216, !11, i64 220, !11, i64 224, !11, i64 228, !11, i64 232, !11, i64 236, !29, i64 240, !7, i64 248, !7, i64 2856, !7, i64 3508, !29, i64 3572, !7, i64 3580, !13, i64 3588, !13, i64 3592, !19, i64 3596, !19, i64 3597, !19, i64 3598, !19, i64 3599, !11, i64 3600, !7, i64 3604, !19, i64 14036, !29, i64 14040, !7, i64 14048, !7, i64 14088, !7, i64 14128, !7, i64 14133, !7, i64 14138, !7, i64 14148, !7, i64 14158, !7, i64 14163, !7, i64 14168, !7, i64 14176, !7, i64 14196, !7, i64 14216, !13, i64 14236, !19, i64 14240, !19, i64 14241, !7, i64 14242, !19, i64 14243, !30, i64 14244, !31, i64 14248}
!29 = !{!"ImVec2", !13, i64 0, !13, i64 4}
!30 = !{!"short", !7, i64 0}
!31 = !{!"ImVector_ImWchar", !11, i64 0, !11, i64 4, !6, i64 8}
!32 = !{!28, !13, i64 12}
!33 = !{!10, !12, i64 8}
!34 = !{!28, !13, i64 16}
!35 = !{!28, !19, i64 210}
!36 = !{i8 0, i8 2}
!37 = !{}
!38 = !{!17, !19, i64 26}
!39 = !{!11, !11, i64 0}


; 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._simgui_state_t = type { %struct.simgui_desc_t, float, %struct.sg_buffer, %struct.sg_buffer, %struct.sg_image, %struct.sg_shader, %struct.sg_pipeline, %struct.sg_range, %struct.sg_range, i8 }
%struct.simgui_desc_t = type { i32, i32, i32, i32, ptr, i8, i8, i8, i8, i8, %struct.simgui_allocator_t }
%struct.simgui_allocator_t = type { ptr, ptr, ptr }
%struct.sg_buffer = type { i32 }
%struct.sg_image = type { i32 }
%struct.sg_shader = type { i32 }
%struct.sg_pipeline = type { i32 }
%struct.sg_range = type { ptr, i64 }

@.str.6 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.83 = external hidden unnamed_addr constant [83 x i8], align 1
@_simgui = external hidden local_unnamed_addr global %struct._simgui_state_t, align 8
@__PRETTY_FUNCTION__.simgui_new_frame = external hidden unnamed_addr constant [51 x i8], align 1
@.str.99 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.100 = external hidden unnamed_addr constant [17 x i8], align 1
@switch.table.simgui_new_frame = private unnamed_addr constant [9 x i32] [i32 1, i32 2, i32 9, i32 6, i32 5, i32 8, i32 7, i32 4, i32 10], align 4

; 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 dso_local void @sapp_show_keyboard(i1 noundef zeroext) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local zeroext i1 @sapp_keyboard_shown() local_unnamed_addr #1

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @sapp_get_mouse_cursor() local_unnamed_addr #1

declare ptr @igGetIO() local_unnamed_addr #2

; Function Attrs: nounwind uwtable
define dso_local void @simgui_new_frame(ptr noundef readonly %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.6, ptr noundef nonnull @.str.83, i32 noundef 1945, ptr noundef nonnull @__PRETTY_FUNCTION__.simgui_new_frame) #3
  unreachable

3:                                                ; preds = %1
  %4 = load i32, ptr %0, align 8, !tbaa !5
  %5 = icmp sgt i32 %4, 0
  br i1 %5, label %7, label %6

6:                                                ; preds = %3
  tail call void @__assert_fail(ptr noundef nonnull @.str.99, ptr noundef nonnull @.str.83, i32 noundef 1946, ptr noundef nonnull @__PRETTY_FUNCTION__.simgui_new_frame) #3
  unreachable

7:                                                ; preds = %3
  %8 = getelementptr inbounds i8, ptr %0, i64 4
  %9 = load i32, ptr %8, align 4, !tbaa !12
  %10 = icmp sgt i32 %9, 0
  br i1 %10, label %12, label %11

11:                                               ; preds = %7
  tail call void @__assert_fail(ptr noundef nonnull @.str.100, ptr noundef nonnull @.str.83, i32 noundef 1947, ptr noundef nonnull @__PRETTY_FUNCTION__.simgui_new_frame) #3
  unreachable

12:                                               ; preds = %7
  %13 = getelementptr inbounds i8, ptr %0, i64 16
  %14 = load float, ptr %13, align 8, !tbaa !13
  %15 = fcmp oeq float %14, 0.000000e+00
  %16 = select i1 %15, float 1.000000e+00, float %14
  store float %16, ptr getelementptr inbounds (i8, ptr @_simgui, i64 56), align 8, !tbaa !14
  %17 = tail call ptr @igGetIO() #4
  %18 = load <4 x float>, ptr getelementptr inbounds (i8, ptr @_simgui, i64 56), align 8
  %19 = getelementptr inbounds i8, ptr %17, i64 8
  %20 = load <2 x i32>, ptr %0, align 8, !tbaa !26
  %21 = sitofp <2 x i32> %20 to <2 x float>
  %22 = shufflevector <4 x float> %18, <4 x float> poison, <2 x i32> zeroinitializer
  %23 = fdiv <2 x float> %21, %22
  store <2 x float> %23, ptr %19, align 8, !tbaa !27
  %24 = getelementptr inbounds i8, ptr %0, i64 8
  %25 = load double, ptr %24, align 8, !tbaa !28
  %26 = fptrunc double %25 to float
  %27 = getelementptr inbounds i8, ptr %17, i64 16
  store float %26, ptr %27, align 8, !tbaa !29
  %28 = getelementptr inbounds i8, ptr %17, i64 210
  %29 = load i8, ptr %28, align 2, !tbaa !34, !range !35, !noundef !36
  %30 = trunc nuw i8 %29 to i1
  br i1 %30, label %31, label %34

31:                                               ; preds = %12
  %32 = tail call zeroext i1 @sapp_keyboard_shown()
  br i1 %32, label %34, label %33

33:                                               ; preds = %31
  tail call void @sapp_show_keyboard(i1 noundef zeroext true)
  br label %34

34:                                               ; preds = %33, %31, %12
  %35 = load i8, ptr %28, align 2, !tbaa !34, !range !35, !noundef !36
  %36 = trunc nuw i8 %35 to i1
  br i1 %36, label %40, label %37

37:                                               ; preds = %34
  %38 = tail call zeroext i1 @sapp_keyboard_shown()
  br i1 %38, label %39, label %40

39:                                               ; preds = %37
  tail call void @sapp_show_keyboard(i1 noundef zeroext false)
  br label %40

40:                                               ; preds = %39, %37, %34
  %41 = load i8, ptr getelementptr inbounds (i8, ptr @_simgui, i64 26), align 2, !tbaa !37, !range !35, !noundef !36
  %42 = trunc nuw i8 %41 to i1
  br i1 %42, label %49, label %43

43:                                               ; preds = %40
  %44 = tail call i32 @igGetMouseCursor() #4
  %45 = tail call i32 @sapp_get_mouse_cursor()
  %46 = icmp ult i32 %44, 9
  br i1 %46, label %switch.lookup, label %48

switch.lookup:                                    ; preds = %43
  %47 = zext nneg i32 %44 to i64
  %switch.gep = getelementptr inbounds [9 x i32], ptr @switch.table.simgui_new_frame, i64 0, i64 %47
  %switch.load = load i32, ptr %switch.gep, align 4
  br label %48

48:                                               ; preds = %switch.lookup, %43
  %.0 = phi i32 [ %45, %43 ], [ %switch.load, %switch.lookup ]
  tail call void @sapp_set_mouse_cursor(i32 noundef %.0)
  br label %49

49:                                               ; preds = %48, %40
  tail call void @igNewFrame() #4
  ret void
}

declare i32 @igGetMouseCursor() local_unnamed_addr #2

declare void @igNewFrame() local_unnamed_addr #2

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 = { "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 }
attributes #4 = { 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, !7, i64 0}
!6 = !{!"simgui_frame_desc_t", !7, i64 0, !7, i64 4, !10, i64 8, !11, i64 16}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"double", !8, i64 0}
!11 = !{!"float", !8, i64 0}
!12 = !{!6, !7, i64 4}
!13 = !{!6, !11, i64 16}
!14 = !{!15, !11, i64 56}
!15 = !{!"", !16, i64 0, !11, i64 56, !20, i64 60, !20, i64 64, !21, i64 68, !22, i64 72, !23, i64 76, !24, i64 80, !24, i64 96, !18, i64 112}
!16 = !{!"simgui_desc_t", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !17, i64 16, !18, i64 24, !18, i64 25, !18, i64 26, !18, i64 27, !18, i64 28, !19, i64 32}
!17 = !{!"any pointer", !8, i64 0}
!18 = !{!"_Bool", !8, i64 0}
!19 = !{!"simgui_allocator_t", !17, i64 0, !17, i64 8, !17, i64 16}
!20 = !{!"sg_buffer", !7, i64 0}
!21 = !{!"sg_image", !7, i64 0}
!22 = !{!"sg_shader", !7, i64 0}
!23 = !{!"sg_pipeline", !7, i64 0}
!24 = !{!"sg_range", !17, i64 0, !25, i64 8}
!25 = !{!"long", !8, i64 0}
!26 = !{!7, !7, i64 0}
!27 = !{!11, !11, i64 0}
!28 = !{!6, !10, i64 8}
!29 = !{!30, !11, i64 16}
!30 = !{!"ImGuiIO", !7, i64 0, !7, i64 4, !31, i64 8, !11, i64 16, !11, i64 20, !17, i64 24, !17, i64 32, !11, i64 40, !11, i64 44, !11, i64 48, !11, i64 52, !11, i64 56, !11, i64 60, !11, i64 64, !17, i64 72, !17, i64 80, !11, i64 88, !18, i64 92, !17, i64 96, !31, i64 104, !18, i64 112, !18, i64 113, !18, i64 114, !18, i64 115, !18, i64 116, !18, i64 117, !18, i64 118, !18, i64 119, !11, i64 120, !17, i64 128, !17, i64 136, !17, i64 144, !17, i64 152, !17, i64 160, !17, i64 168, !17, i64 176, !17, i64 184, !17, i64 192, !17, i64 200, !18, i64 208, !18, i64 209, !18, i64 210, !18, i64 211, !18, i64 212, !18, i64 213, !18, i64 214, !11, i64 216, !7, i64 220, !7, i64 224, !7, i64 228, !7, i64 232, !7, i64 236, !31, i64 240, !8, i64 248, !8, i64 2856, !8, i64 3508, !31, i64 3572, !8, i64 3580, !11, i64 3588, !11, i64 3592, !18, i64 3596, !18, i64 3597, !18, i64 3598, !18, i64 3599, !7, i64 3600, !8, i64 3604, !18, i64 14036, !31, i64 14040, !8, i64 14048, !8, i64 14088, !8, i64 14128, !8, i64 14133, !8, i64 14138, !8, i64 14148, !8, i64 14158, !8, i64 14163, !8, i64 14168, !8, i64 14176, !8, i64 14196, !8, i64 14216, !11, i64 14236, !18, i64 14240, !18, i64 14241, !8, i64 14242, !18, i64 14243, !32, i64 14244, !33, i64 14248}
!31 = !{!"ImVec2", !11, i64 0, !11, i64 4}
!32 = !{!"short", !8, i64 0}
!33 = !{!"ImVector_ImWchar", !7, i64 0, !7, i64 4, !17, i64 8}
!34 = !{!30, !18, i64 210}
!35 = !{i8 0, i8 2}
!36 = !{}
!37 = !{!15, !18, i64 26}


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