; 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.sg_buffer_desc = type { i32, i64, i32, i32, %struct.sg_range, ptr, [2 x i32], [2 x ptr], ptr, ptr, i32 }
%struct.sg_image_desc = type { i32, i32, i8, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, float, float, %struct.sg_image_data, ptr, [2 x i32], i32, [2 x ptr], ptr, ptr, ptr, i32 }
%struct.sg_image_data = type { [6 x [16 x %struct.sg_range]] }
%struct.sg_shader_desc = type { i32, [16 x %struct.sg_shader_attr_desc], %struct.sg_shader_stage_desc, %struct.sg_shader_stage_desc, ptr, i32 }
%struct.sg_shader_attr_desc = type { ptr, ptr, i32 }
%struct.sg_shader_stage_desc = type { ptr, %struct.sg_range, ptr, ptr, [4 x %struct.sg_shader_uniform_block_desc], [12 x %struct.sg_shader_image_desc] }
%struct.sg_shader_uniform_block_desc = type { i64, i32, [16 x %struct.sg_shader_uniform_desc] }
%struct.sg_shader_uniform_desc = type { ptr, i32, i32 }
%struct.sg_shader_image_desc = type { ptr, i32, i32 }
%struct.sg_pipeline_desc = type { i32, %struct.sg_shader, %struct.sg_layout_desc, %struct.sg_depth_state, %struct.sg_stencil_state, i32, [4 x %struct.sg_color_state], i32, i32, i32, i32, i32, %struct.sg_color, i8, ptr, i32 }
%struct.sg_layout_desc = type { [8 x %struct.sg_buffer_layout_desc], [16 x %struct.sg_vertex_attr_desc] }
%struct.sg_buffer_layout_desc = type { i32, i32, i32 }
%struct.sg_vertex_attr_desc = type { i32, i32, i32 }
%struct.sg_depth_state = type { i32, i32, i8, float, float, float }
%struct.sg_stencil_state = type { i8, %struct.sg_stencil_face_state, %struct.sg_stencil_face_state, i8, i8, i8 }
%struct.sg_stencil_face_state = type { i32, i32, i32, i32 }
%struct.sg_color_state = type { i32, i32, %struct.sg_blend_state }
%struct.sg_blend_state = type { i8, i32, i32, i32, i32, i32, i32 }
%struct.sg_color = type { float, float, float, 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 }
%struct.ImFontAtlas = type { i32, ptr, i32, i32, i8, ptr, i8, i8, ptr, ptr, i32, i32, %struct.ImVec2, %struct.ImVec2, %struct.ImVector_ImFontPtr, %struct.ImVector_ImFontAtlasCustomRect, %struct.ImVector_ImFontConfig, [64 x %struct.ImVec4], ptr, i32, i32, i32 }
%struct.ImVector_ImFontPtr = type { i32, i32, ptr }
%struct.ImVector_ImFontAtlasCustomRect = type { i32, i32, ptr }
%struct.ImVector_ImFontConfig = type { i32, i32, ptr }
%struct.ImVec4 = type { float, float, float, float }

@.str.6 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.83 = external hidden unnamed_addr constant [83 x i8], align 1
@__PRETTY_FUNCTION__.simgui_setup = external hidden unnamed_addr constant [41 x i8], align 1
@_simgui = external hidden global %struct._simgui_state_t, align 8
@.str.84 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.85 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.86 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.87 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.88 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.89 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.90 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.91 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.92 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.93 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.94 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.95 = external hidden unnamed_addr constant [19 x i8], align 1
@_simgui_vs_source_glsl330 = external hidden constant [341 x i8], align 16
@_simgui_fs_source_glsl330 = external hidden constant [169 x i8], align 16
@.str.96 = external hidden unnamed_addr constant [21 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 dso_local i32 @sg_make_buffer(ptr noundef) #3

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

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

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

; Function Attrs: nounwind uwtable
declare dso_local void @sg_push_debug_group(ptr noundef) #3

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

; Function Attrs: nounwind uwtable
define dso_local void @simgui_setup(ptr noundef %0) #3 {
  %2 = alloca ptr, align 8
  %3 = alloca %struct.simgui_desc_t, align 8
  %4 = alloca ptr, align 8
  %5 = alloca %struct.sg_buffer_desc, align 8
  %6 = alloca %struct.sg_buffer, align 4
  %7 = alloca %struct.sg_buffer_desc, align 8
  %8 = alloca %struct.sg_buffer, align 4
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca %struct.sg_image_desc, align 8
  %14 = alloca %struct.sg_image, align 4
  %15 = alloca %struct.sg_shader_desc, align 8
  %16 = alloca ptr, align 8
  %17 = alloca %struct.sg_shader, align 4
  %18 = alloca %struct.sg_pipeline_desc, align 8
  %19 = alloca ptr, align 8
  %20 = alloca ptr, align 8
  %21 = alloca ptr, align 8
  %22 = alloca %struct.sg_pipeline, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  %23 = load ptr, ptr %2, align 8, !tbaa !5
  %24 = icmp ne ptr %23, null
  br i1 %24, label %25, label %26

25:                                               ; preds = %1
  br label %27

26:                                               ; preds = %1
  call void @__assert_fail(ptr noundef @.str.6, ptr noundef @.str.83, i32 noundef 1739, ptr noundef @__PRETTY_FUNCTION__.simgui_setup) #5
  unreachable

27:                                               ; preds = %25
  call void @_simgui_clear(ptr noundef @_simgui, i64 noundef 120)
  call void @llvm.lifetime.start.p0(i64 56, ptr %3) #6
  %28 = load ptr, ptr %2, align 8, !tbaa !5
  call void @_simgui_desc_defaults(ptr dead_on_unwind writable sret(%struct.simgui_desc_t) align 8 %3, ptr noundef %28)
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 @_simgui, ptr align 8 %3, i64 56, i1 false), !tbaa.struct !9
  call void @llvm.lifetime.end.p0(i64 56, ptr %3) #6
  store float 1.000000e+00, ptr getelementptr inbounds (%struct._simgui_state_t, ptr @_simgui, i32 0, i32 1), align 8, !tbaa !14
  %29 = call zeroext i1 @_simgui_is_osx()
  %30 = zext i1 %29 to i8
  store i8 %30, ptr getelementptr inbounds (%struct._simgui_state_t, ptr @_simgui, i32 0, i32 9), align 8, !tbaa !25
  %31 = load i32, ptr @_simgui, align 8, !tbaa !26
  %32 = icmp sgt i32 %31, 0
  br i1 %32, label %33, label %34

33:                                               ; preds = %27
  br label %35

34:                                               ; preds = %27
  call void @__assert_fail(ptr noundef @.str.84, ptr noundef @.str.83, i32 noundef 1751, ptr noundef @__PRETTY_FUNCTION__.simgui_setup) #5
  unreachable

35:                                               ; preds = %33
  %36 = load i32, ptr @_simgui, align 8, !tbaa !26
  %37 = sext i32 %36 to i64
  %38 = mul i64 %37, 20
  store i64 %38, ptr getelementptr inbounds (%struct.sg_range, ptr getelementptr inbounds (%struct._simgui_state_t, ptr @_simgui, i32 0, i32 7), i32 0, i32 1), align 8, !tbaa !27
  %39 = load i64, ptr getelementptr inbounds (%struct.sg_range, ptr getelementptr inbounds (%struct._simgui_state_t, ptr @_simgui, i32 0, i32 7), i32 0, i32 1), align 8, !tbaa !27
  %40 = call ptr @_simgui_malloc(i64 noundef %39)
  store ptr %40, ptr getelementptr inbounds (%struct._simgui_state_t, ptr @_simgui, i32 0, i32 7), align 8, !tbaa !28
  %41 = load i32, ptr @_simgui, align 8, !tbaa !26
  %42 = sext i32 %41 to i64
  %43 = mul i64 %42, 3
  %44 = mul i64 %43, 2
  store i64 %44, ptr getelementptr inbounds (%struct.sg_range, ptr getelementptr inbounds (%struct._simgui_state_t, ptr @_simgui, i32 0, i32 8), i32 0, i32 1), align 8, !tbaa !29
  %45 = load i64, ptr getelementptr inbounds (%struct.sg_range, ptr getelementptr inbounds (%struct._simgui_state_t, ptr @_simgui, i32 0, i32 8), i32 0, i32 1), align 8, !tbaa !29
  %46 = call ptr @_simgui_malloc(i64 noundef %45)
  store ptr %46, ptr getelementptr inbounds (%struct._simgui_state_t, ptr @_simgui, i32 0, i32 8), align 8, !tbaa !30
  %47 = call ptr @igCreateContext(ptr noundef null)
  %48 = call ptr @igGetStyle()
  call void @igStyleColorsDark(ptr noundef %48)
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #6
  %49 = call ptr @igGetIO()
  store ptr %49, ptr %4, align 8, !tbaa !5
  %50 = load i8, ptr getelementptr inbounds (%struct.simgui_desc_t, ptr @_simgui, i32 0, i32 5), align 8, !tbaa !31, !range !32, !noundef !33
  %51 = trunc i8 %50 to i1
  br i1 %51, label %57, label %52

52:                                               ; preds = %35
  %53 = load ptr, ptr %4, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.ImGuiIO, ptr %53, i32 0, i32 15
  %55 = load ptr, ptr %54, align 8, !tbaa !34
  %56 = call ptr @ImFontAtlas_AddFontDefault(ptr noundef %55, ptr noundef null)
  br label %57

57:                                               ; preds = %52, %35
  %58 = load ptr, ptr getelementptr inbounds (%struct.simgui_desc_t, ptr @_simgui, i32 0, i32 4), align 8, !tbaa !39
  %59 = load ptr, ptr %4, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.ImGuiIO, ptr %59, i32 0, i32 5
  store ptr %58, ptr %60, align 8, !tbaa !40
  %61 = call zeroext i1 @_simgui_is_osx()
  %62 = load ptr, ptr %4, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.ImGuiIO, ptr %62, i32 0, i32 21
  %64 = zext i1 %61 to i8
  store i8 %64, ptr %63, align 1, !tbaa !41
  %65 = load ptr, ptr %4, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.ImGuiIO, ptr %65, i32 0, i32 1
  %67 = load i32, ptr %66, align 4, !tbaa !42
  %68 = or i32 %67, 8
  store i32 %68, ptr %66, align 4, !tbaa !42
  %69 = load i8, ptr getelementptr inbounds (%struct.simgui_desc_t, ptr @_simgui, i32 0, i32 7), align 2, !tbaa !43, !range !32, !noundef !33
  %70 = trunc i8 %69 to i1
  br i1 %70, label %76, label %71

71:                                               ; preds = %57
  %72 = load ptr, ptr %4, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct.ImGuiIO, ptr %72, i32 0, i32 1
  %74 = load i32, ptr %73, align 4, !tbaa !42
  %75 = or i32 %74, 2
  store i32 %75, ptr %73, align 4, !tbaa !42
  br label %76

76:                                               ; preds = %71, %57
  %77 = load ptr, ptr %4, align 8, !tbaa !5
  %78 = getelementptr inbounds %struct.ImGuiIO, ptr %77, i32 0, i32 35
  store ptr @_simgui_set_clipboard, ptr %78, align 8, !tbaa !44
  %79 = load ptr, ptr %4, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct.ImGuiIO, ptr %79, i32 0, i32 34
  store ptr @_simgui_get_clipboard, ptr %80, align 8, !tbaa !45
  %81 = load i8, ptr getelementptr inbounds (%struct.simgui_desc_t, ptr @_simgui, i32 0, i32 8), align 1, !tbaa !46, !range !32, !noundef !33
  %82 = trunc i8 %81 to i1
  %83 = xor i1 %82, true
  %84 = load ptr, ptr %4, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct.ImGuiIO, ptr %84, i32 0, i32 26
  %86 = zext i1 %83 to i8
  store i8 %86, ptr %85, align 2, !tbaa !47
  call void @sg_push_debug_group(ptr noundef @.str.85)
  call void @llvm.lifetime.start.p0(i64 96, ptr %5) #6
  call void @_simgui_clear(ptr noundef %5, i64 noundef 96)
  %87 = getelementptr inbounds %struct.sg_buffer_desc, ptr %5, i32 0, i32 3
  store i32 3, ptr %87, align 4, !tbaa !48
  %88 = load i64, ptr getelementptr inbounds (%struct.sg_range, ptr getelementptr inbounds (%struct._simgui_state_t, ptr @_simgui, i32 0, i32 7), i32 0, i32 1), align 8, !tbaa !27
  %89 = getelementptr inbounds %struct.sg_buffer_desc, ptr %5, i32 0, i32 1
  store i64 %88, ptr %89, align 8, !tbaa !50
  %90 = getelementptr inbounds %struct.sg_buffer_desc, ptr %5, i32 0, i32 5
  store ptr @.str.86, ptr %90, align 8, !tbaa !51
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  %91 = call i32 @sg_make_buffer(ptr noundef %5)
  %92 = getelementptr inbounds %struct.sg_buffer, ptr %6, i32 0, i32 0
  store i32 %91, ptr %92, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 getelementptr inbounds (%struct._simgui_state_t, ptr @_simgui, i32 0, i32 2), ptr align 4 %6, i64 4, i1 false), !tbaa.struct !52
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.start.p0(i64 96, ptr %7) #6
  call void @_simgui_clear(ptr noundef %7, i64 noundef 96)
  %93 = getelementptr inbounds %struct.sg_buffer_desc, ptr %7, i32 0, i32 2
  store i32 2, ptr %93, align 8, !tbaa !53
  %94 = getelementptr inbounds %struct.sg_buffer_desc, ptr %7, i32 0, i32 3
  store i32 3, ptr %94, align 4, !tbaa !48
  %95 = load i64, ptr getelementptr inbounds (%struct.sg_range, ptr getelementptr inbounds (%struct._simgui_state_t, ptr @_simgui, i32 0, i32 8), i32 0, i32 1), align 8, !tbaa !29
  %96 = getelementptr inbounds %struct.sg_buffer_desc, ptr %7, i32 0, i32 1
  store i64 %95, ptr %96, align 8, !tbaa !50
  %97 = getelementptr inbounds %struct.sg_buffer_desc, ptr %7, i32 0, i32 5
  store ptr @.str.87, ptr %97, align 8, !tbaa !51
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  %98 = call i32 @sg_make_buffer(ptr noundef %7)
  %99 = getelementptr inbounds %struct.sg_buffer, ptr %8, i32 0, i32 0
  store i32 %98, ptr %99, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 getelementptr inbounds (%struct._simgui_state_t, ptr @_simgui, i32 0, i32 3), ptr align 4 %8, i64 4, i1 false), !tbaa.struct !52
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  %100 = load i8, ptr getelementptr inbounds (%struct.simgui_desc_t, ptr @_simgui, i32 0, i32 5), align 8, !tbaa !31, !range !32, !noundef !33
  %101 = trunc i8 %100 to i1
  br i1 %101, label %141, label %102

102:                                              ; preds = %76
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  %103 = load ptr, ptr %4, align 8, !tbaa !5
  %104 = getelementptr inbounds %struct.ImGuiIO, ptr %103, i32 0, i32 15
  %105 = load ptr, ptr %104, align 8, !tbaa !34
  call void @ImFontAtlas_GetTexDataAsRGBA32(ptr noundef %105, ptr noundef %9, ptr noundef %10, ptr noundef %11, ptr noundef %12)
  call void @llvm.lifetime.start.p0(i64 1688, ptr %13) #6
  call void @_simgui_clear(ptr noundef %13, i64 noundef 1688)
  %106 = load i32, ptr %10, align 4, !tbaa !10
  %107 = getelementptr inbounds %struct.sg_image_desc, ptr %13, i32 0, i32 3
  store i32 %106, ptr %107, align 4, !tbaa !54
  %108 = load i32, ptr %11, align 4, !tbaa !10
  %109 = getelementptr inbounds %struct.sg_image_desc, ptr %13, i32 0, i32 4
  store i32 %108, ptr %109, align 8, !tbaa !57
  %110 = getelementptr inbounds %struct.sg_image_desc, ptr %13, i32 0, i32 8
  store i32 23, ptr %110, align 8, !tbaa !58
  %111 = getelementptr inbounds %struct.sg_image_desc, ptr %13, i32 0, i32 12
  store i32 2, ptr %111, align 8, !tbaa !59
  %112 = getelementptr inbounds %struct.sg_image_desc, ptr %13, i32 0, i32 13
  store i32 2, ptr %112, align 4, !tbaa !60
  %113 = getelementptr inbounds %struct.sg_image_desc, ptr %13, i32 0, i32 10
  store i32 2, ptr %113, align 8, !tbaa !61
  %114 = getelementptr inbounds %struct.sg_image_desc, ptr %13, i32 0, i32 11
  store i32 2, ptr %114, align 4, !tbaa !62
  %115 = load ptr, ptr %9, align 8, !tbaa !5
  %116 = getelementptr inbounds %struct.sg_image_desc, ptr %13, i32 0, i32 19
  %117 = getelementptr inbounds %struct.sg_image_data, ptr %116, i32 0, i32 0
  %118 = getelementptr inbounds [6 x [16 x %struct.sg_range]], ptr %117, i64 0, i64 0
  %119 = getelementptr inbounds [16 x %struct.sg_range], ptr %118, i64 0, i64 0
  %120 = getelementptr inbounds %struct.sg_range, ptr %119, i32 0, i32 0
  store ptr %115, ptr %120, align 8, !tbaa !63
  %121 = load i32, ptr %10, align 4, !tbaa !10
  %122 = load i32, ptr %11, align 4, !tbaa !10
  %123 = mul nsw i32 %121, %122
  %124 = sext i32 %123 to i64
  %125 = mul i64 %124, 4
  %126 = getelementptr inbounds %struct.sg_image_desc, ptr %13, i32 0, i32 19
  %127 = getelementptr inbounds %struct.sg_image_data, ptr %126, i32 0, i32 0
  %128 = getelementptr inbounds [6 x [16 x %struct.sg_range]], ptr %127, i64 0, i64 0
  %129 = getelementptr inbounds [16 x %struct.sg_range], ptr %128, i64 0, i64 0
  %130 = getelementptr inbounds %struct.sg_range, ptr %129, i32 0, i32 1
  store i64 %125, ptr %130, align 8, !tbaa !64
  %131 = getelementptr inbounds %struct.sg_image_desc, ptr %13, i32 0, i32 20
  store ptr @.str.88, ptr %131, align 8, !tbaa !65
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  %132 = call i32 @sg_make_image(ptr noundef %13)
  %133 = getelementptr inbounds %struct.sg_image, ptr %14, i32 0, i32 0
  store i32 %132, ptr %133, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 getelementptr inbounds (%struct._simgui_state_t, ptr @_simgui, i32 0, i32 4), ptr align 4 %14, i64 4, i1 false), !tbaa.struct !52
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  %134 = load i32, ptr getelementptr inbounds (%struct._simgui_state_t, ptr @_simgui, i32 0, i32 4), align 4, !tbaa !66
  %135 = zext i32 %134 to i64
  %136 = inttoptr i64 %135 to ptr
  %137 = load ptr, ptr %4, align 8, !tbaa !5
  %138 = getelementptr inbounds %struct.ImGuiIO, ptr %137, i32 0, i32 15
  %139 = load ptr, ptr %138, align 8, !tbaa !34
  %140 = getelementptr inbounds %struct.ImFontAtlas, ptr %139, i32 0, i32 1
  store ptr %136, ptr %140, align 8, !tbaa !67
  call void @llvm.lifetime.end.p0(i64 1688, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  br label %141

141:                                              ; preds = %102, %76
  call void @llvm.lifetime.start.p0(i64 3048, ptr %15) #6
  call void @_simgui_clear(ptr noundef %15, i64 noundef 3048)
  %142 = getelementptr inbounds %struct.sg_shader_desc, ptr %15, i32 0, i32 1
  %143 = getelementptr inbounds [16 x %struct.sg_shader_attr_desc], ptr %142, i64 0, i64 0
  %144 = getelementptr inbounds %struct.sg_shader_attr_desc, ptr %143, i32 0, i32 0
  store ptr @.str.89, ptr %144, align 8, !tbaa !72
  %145 = getelementptr inbounds %struct.sg_shader_desc, ptr %15, i32 0, i32 1
  %146 = getelementptr inbounds [16 x %struct.sg_shader_attr_desc], ptr %145, i64 0, i64 1
  %147 = getelementptr inbounds %struct.sg_shader_attr_desc, ptr %146, i32 0, i32 0
  store ptr @.str.90, ptr %147, align 8, !tbaa !72
  %148 = getelementptr inbounds %struct.sg_shader_desc, ptr %15, i32 0, i32 1
  %149 = getelementptr inbounds [16 x %struct.sg_shader_attr_desc], ptr %148, i64 0, i64 2
  %150 = getelementptr inbounds %struct.sg_shader_attr_desc, ptr %149, i32 0, i32 0
  store ptr @.str.91, ptr %150, align 8, !tbaa !72
  %151 = getelementptr inbounds %struct.sg_shader_desc, ptr %15, i32 0, i32 1
  %152 = getelementptr inbounds [16 x %struct.sg_shader_attr_desc], ptr %151, i64 0, i64 0
  %153 = getelementptr inbounds %struct.sg_shader_attr_desc, ptr %152, i32 0, i32 1
  store ptr @.str.92, ptr %153, align 8, !tbaa !74
  %154 = getelementptr inbounds %struct.sg_shader_desc, ptr %15, i32 0, i32 1
  %155 = getelementptr inbounds [16 x %struct.sg_shader_attr_desc], ptr %154, i64 0, i64 0
  %156 = getelementptr inbounds %struct.sg_shader_attr_desc, ptr %155, i32 0, i32 2
  store i32 0, ptr %156, align 8, !tbaa !75
  %157 = getelementptr inbounds %struct.sg_shader_desc, ptr %15, i32 0, i32 1
  %158 = getelementptr inbounds [16 x %struct.sg_shader_attr_desc], ptr %157, i64 0, i64 1
  %159 = getelementptr inbounds %struct.sg_shader_attr_desc, ptr %158, i32 0, i32 1
  store ptr @.str.92, ptr %159, align 8, !tbaa !74
  %160 = getelementptr inbounds %struct.sg_shader_desc, ptr %15, i32 0, i32 1
  %161 = getelementptr inbounds [16 x %struct.sg_shader_attr_desc], ptr %160, i64 0, i64 1
  %162 = getelementptr inbounds %struct.sg_shader_attr_desc, ptr %161, i32 0, i32 2
  store i32 1, ptr %162, align 8, !tbaa !75
  %163 = getelementptr inbounds %struct.sg_shader_desc, ptr %15, i32 0, i32 1
  %164 = getelementptr inbounds [16 x %struct.sg_shader_attr_desc], ptr %163, i64 0, i64 2
  %165 = getelementptr inbounds %struct.sg_shader_attr_desc, ptr %164, i32 0, i32 1
  store ptr @.str.92, ptr %165, align 8, !tbaa !74
  %166 = getelementptr inbounds %struct.sg_shader_desc, ptr %15, i32 0, i32 1
  %167 = getelementptr inbounds [16 x %struct.sg_shader_attr_desc], ptr %166, i64 0, i64 2
  %168 = getelementptr inbounds %struct.sg_shader_attr_desc, ptr %167, i32 0, i32 2
  store i32 2, ptr %168, align 8, !tbaa !75
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  %169 = getelementptr inbounds %struct.sg_shader_desc, ptr %15, i32 0, i32 2
  %170 = getelementptr inbounds %struct.sg_shader_stage_desc, ptr %169, i32 0, i32 4
  %171 = getelementptr inbounds [4 x %struct.sg_shader_uniform_block_desc], ptr %170, i64 0, i64 0
  store ptr %171, ptr %16, align 8, !tbaa !5
  %172 = load ptr, ptr %16, align 8, !tbaa !5
  %173 = getelementptr inbounds %struct.sg_shader_uniform_block_desc, ptr %172, i32 0, i32 0
  store i64 16, ptr %173, align 8, !tbaa !76
  %174 = load ptr, ptr %16, align 8, !tbaa !5
  %175 = getelementptr inbounds %struct.sg_shader_uniform_block_desc, ptr %174, i32 0, i32 2
  %176 = getelementptr inbounds [16 x %struct.sg_shader_uniform_desc], ptr %175, i64 0, i64 0
  %177 = getelementptr inbounds %struct.sg_shader_uniform_desc, ptr %176, i32 0, i32 0
  store ptr @.str.93, ptr %177, align 8, !tbaa !78
  %178 = load ptr, ptr %16, align 8, !tbaa !5
  %179 = getelementptr inbounds %struct.sg_shader_uniform_block_desc, ptr %178, i32 0, i32 2
  %180 = getelementptr inbounds [16 x %struct.sg_shader_uniform_desc], ptr %179, i64 0, i64 0
  %181 = getelementptr inbounds %struct.sg_shader_uniform_desc, ptr %180, i32 0, i32 1
  store i32 4, ptr %181, align 8, !tbaa !80
  %182 = load ptr, ptr %16, align 8, !tbaa !5
  %183 = getelementptr inbounds %struct.sg_shader_uniform_block_desc, ptr %182, i32 0, i32 2
  %184 = getelementptr inbounds [16 x %struct.sg_shader_uniform_desc], ptr %183, i64 0, i64 0
  %185 = getelementptr inbounds %struct.sg_shader_uniform_desc, ptr %184, i32 0, i32 2
  store i32 1, ptr %185, align 4, !tbaa !81
  %186 = getelementptr inbounds %struct.sg_shader_desc, ptr %15, i32 0, i32 3
  %187 = getelementptr inbounds %struct.sg_shader_stage_desc, ptr %186, i32 0, i32 5
  %188 = getelementptr inbounds [12 x %struct.sg_shader_image_desc], ptr %187, i64 0, i64 0
  %189 = getelementptr inbounds %struct.sg_shader_image_desc, ptr %188, i32 0, i32 0
  store ptr @.str.94, ptr %189, align 8, !tbaa !82
  %190 = getelementptr inbounds %struct.sg_shader_desc, ptr %15, i32 0, i32 3
  %191 = getelementptr inbounds %struct.sg_shader_stage_desc, ptr %190, i32 0, i32 5
  %192 = getelementptr inbounds [12 x %struct.sg_shader_image_desc], ptr %191, i64 0, i64 0
  %193 = getelementptr inbounds %struct.sg_shader_image_desc, ptr %192, i32 0, i32 1
  store i32 1, ptr %193, align 8, !tbaa !84
  %194 = getelementptr inbounds %struct.sg_shader_desc, ptr %15, i32 0, i32 3
  %195 = getelementptr inbounds %struct.sg_shader_stage_desc, ptr %194, i32 0, i32 5
  %196 = getelementptr inbounds [12 x %struct.sg_shader_image_desc], ptr %195, i64 0, i64 0
  %197 = getelementptr inbounds %struct.sg_shader_image_desc, ptr %196, i32 0, i32 2
  store i32 1, ptr %197, align 4, !tbaa !85
  %198 = getelementptr inbounds %struct.sg_shader_desc, ptr %15, i32 0, i32 4
  store ptr @.str.95, ptr %198, align 8, !tbaa !86
  %199 = getelementptr inbounds %struct.sg_shader_desc, ptr %15, i32 0, i32 2
  %200 = getelementptr inbounds %struct.sg_shader_stage_desc, ptr %199, i32 0, i32 0
  store ptr @_simgui_vs_source_glsl330, ptr %200, align 8, !tbaa !89
  %201 = getelementptr inbounds %struct.sg_shader_desc, ptr %15, i32 0, i32 3
  %202 = getelementptr inbounds %struct.sg_shader_stage_desc, ptr %201, i32 0, i32 0
  store ptr @_simgui_fs_source_glsl330, ptr %202, align 8, !tbaa !90
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #6
  %203 = call i32 @sg_make_shader(ptr noundef %15)
  %204 = getelementptr inbounds %struct.sg_shader, ptr %17, i32 0, i32 0
  store i32 %203, ptr %204, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 getelementptr inbounds (%struct._simgui_state_t, ptr @_simgui, i32 0, i32 5), ptr align 4 %17, i64 4, i1 false), !tbaa.struct !52
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  call void @llvm.lifetime.start.p0(i64 568, ptr %18) #6
  call void @_simgui_clear(ptr noundef %18, i64 noundef 568)
  %205 = getelementptr inbounds %struct.sg_pipeline_desc, ptr %18, i32 0, i32 2
  %206 = getelementptr inbounds %struct.sg_layout_desc, ptr %205, i32 0, i32 0
  %207 = getelementptr inbounds [8 x %struct.sg_buffer_layout_desc], ptr %206, i64 0, i64 0
  %208 = getelementptr inbounds %struct.sg_buffer_layout_desc, ptr %207, i32 0, i32 0
  store i32 20, ptr %208, align 8, !tbaa !91
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #6
  %209 = getelementptr inbounds %struct.sg_pipeline_desc, ptr %18, i32 0, i32 2
  %210 = getelementptr inbounds %struct.sg_layout_desc, ptr %209, i32 0, i32 1
  %211 = getelementptr inbounds [16 x %struct.sg_vertex_attr_desc], ptr %210, i64 0, i64 0
  store ptr %211, ptr %19, align 8, !tbaa !5
  %212 = load ptr, ptr %19, align 8, !tbaa !5
  %213 = getelementptr inbounds %struct.sg_vertex_attr_desc, ptr %212, i32 0, i32 1
  store i32 0, ptr %213, align 4, !tbaa !93
  %214 = load ptr, ptr %19, align 8, !tbaa !5
  %215 = getelementptr inbounds %struct.sg_vertex_attr_desc, ptr %214, i32 0, i32 2
  store i32 2, ptr %215, align 4, !tbaa !95
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #6
  %216 = getelementptr inbounds %struct.sg_pipeline_desc, ptr %18, i32 0, i32 2
  %217 = getelementptr inbounds %struct.sg_layout_desc, ptr %216, i32 0, i32 1
  %218 = getelementptr inbounds [16 x %struct.sg_vertex_attr_desc], ptr %217, i64 0, i64 1
  store ptr %218, ptr %20, align 8, !tbaa !5
  %219 = load ptr, ptr %20, align 8, !tbaa !5
  %220 = getelementptr inbounds %struct.sg_vertex_attr_desc, ptr %219, i32 0, i32 1
  store i32 8, ptr %220, align 4, !tbaa !93
  %221 = load ptr, ptr %20, align 8, !tbaa !5
  %222 = getelementptr inbounds %struct.sg_vertex_attr_desc, ptr %221, i32 0, i32 2
  store i32 2, ptr %222, align 4, !tbaa !95
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #6
  %223 = getelementptr inbounds %struct.sg_pipeline_desc, ptr %18, i32 0, i32 2
  %224 = getelementptr inbounds %struct.sg_layout_desc, ptr %223, i32 0, i32 1
  %225 = getelementptr inbounds [16 x %struct.sg_vertex_attr_desc], ptr %224, i64 0, i64 2
  store ptr %225, ptr %21, align 8, !tbaa !5
  %226 = load ptr, ptr %21, align 8, !tbaa !5
  %227 = getelementptr inbounds %struct.sg_vertex_attr_desc, ptr %226, i32 0, i32 1
  store i32 16, ptr %227, align 4, !tbaa !93
  %228 = load ptr, ptr %21, align 8, !tbaa !5
  %229 = getelementptr inbounds %struct.sg_vertex_attr_desc, ptr %228, i32 0, i32 2
  store i32 8, ptr %229, align 4, !tbaa !95
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #6
  %230 = getelementptr inbounds %struct.sg_pipeline_desc, ptr %18, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %230, ptr align 8 getelementptr inbounds (%struct._simgui_state_t, ptr @_simgui, i32 0, i32 5), i64 4, i1 false), !tbaa.struct !52
  %231 = getelementptr inbounds %struct.sg_pipeline_desc, ptr %18, i32 0, i32 8
  store i32 2, ptr %231, align 8, !tbaa !96
  %232 = load i32, ptr getelementptr inbounds (%struct.simgui_desc_t, ptr @_simgui, i32 0, i32 3), align 4, !tbaa !103
  %233 = getelementptr inbounds %struct.sg_pipeline_desc, ptr %18, i32 0, i32 11
  store i32 %232, ptr %233, align 4, !tbaa !104
  %234 = load i32, ptr getelementptr inbounds (%struct.simgui_desc_t, ptr @_simgui, i32 0, i32 2), align 8, !tbaa !105
  %235 = getelementptr inbounds %struct.sg_pipeline_desc, ptr %18, i32 0, i32 3
  %236 = getelementptr inbounds %struct.sg_depth_state, ptr %235, i32 0, i32 0
  store i32 %234, ptr %236, align 8, !tbaa !106
  %237 = load i32, ptr getelementptr inbounds (%struct.simgui_desc_t, ptr @_simgui, i32 0, i32 1), align 4, !tbaa !107
  %238 = getelementptr inbounds %struct.sg_pipeline_desc, ptr %18, i32 0, i32 6
  %239 = getelementptr inbounds [4 x %struct.sg_color_state], ptr %238, i64 0, i64 0
  %240 = getelementptr inbounds %struct.sg_color_state, ptr %239, i32 0, i32 0
  store i32 %237, ptr %240, align 4, !tbaa !108
  %241 = load i8, ptr getelementptr inbounds (%struct.simgui_desc_t, ptr @_simgui, i32 0, i32 9), align 4, !tbaa !111, !range !32, !noundef !33
  %242 = trunc i8 %241 to i1
  %243 = zext i1 %242 to i64
  %244 = select i1 %242, i32 15, i32 7
  %245 = getelementptr inbounds %struct.sg_pipeline_desc, ptr %18, i32 0, i32 6
  %246 = getelementptr inbounds [4 x %struct.sg_color_state], ptr %245, i64 0, i64 0
  %247 = getelementptr inbounds %struct.sg_color_state, ptr %246, i32 0, i32 1
  store i32 %244, ptr %247, align 4, !tbaa !112
  %248 = getelementptr inbounds %struct.sg_pipeline_desc, ptr %18, i32 0, i32 6
  %249 = getelementptr inbounds [4 x %struct.sg_color_state], ptr %248, i64 0, i64 0
  %250 = getelementptr inbounds %struct.sg_color_state, ptr %249, i32 0, i32 2
  %251 = getelementptr inbounds %struct.sg_blend_state, ptr %250, i32 0, i32 0
  store i8 1, ptr %251, align 4, !tbaa !113
  %252 = getelementptr inbounds %struct.sg_pipeline_desc, ptr %18, i32 0, i32 6
  %253 = getelementptr inbounds [4 x %struct.sg_color_state], ptr %252, i64 0, i64 0
  %254 = getelementptr inbounds %struct.sg_color_state, ptr %253, i32 0, i32 2
  %255 = getelementptr inbounds %struct.sg_blend_state, ptr %254, i32 0, i32 1
  store i32 5, ptr %255, align 4, !tbaa !114
  %256 = getelementptr inbounds %struct.sg_pipeline_desc, ptr %18, i32 0, i32 6
  %257 = getelementptr inbounds [4 x %struct.sg_color_state], ptr %256, i64 0, i64 0
  %258 = getelementptr inbounds %struct.sg_color_state, ptr %257, i32 0, i32 2
  %259 = getelementptr inbounds %struct.sg_blend_state, ptr %258, i32 0, i32 2
  store i32 6, ptr %259, align 4, !tbaa !115
  %260 = load i8, ptr getelementptr inbounds (%struct.simgui_desc_t, ptr @_simgui, i32 0, i32 9), align 4, !tbaa !111, !range !32, !noundef !33
  %261 = trunc i8 %260 to i1
  br i1 %261, label %262, label %271

262:                                              ; preds = %141
  %263 = getelementptr inbounds %struct.sg_pipeline_desc, ptr %18, i32 0, i32 6
  %264 = getelementptr inbounds [4 x %struct.sg_color_state], ptr %263, i64 0, i64 0
  %265 = getelementptr inbounds %struct.sg_color_state, ptr %264, i32 0, i32 2
  %266 = getelementptr inbounds %struct.sg_blend_state, ptr %265, i32 0, i32 4
  store i32 2, ptr %266, align 4, !tbaa !116
  %267 = getelementptr inbounds %struct.sg_pipeline_desc, ptr %18, i32 0, i32 6
  %268 = getelementptr inbounds [4 x %struct.sg_color_state], ptr %267, i64 0, i64 0
  %269 = getelementptr inbounds %struct.sg_color_state, ptr %268, i32 0, i32 2
  %270 = getelementptr inbounds %struct.sg_blend_state, ptr %269, i32 0, i32 5
  store i32 2, ptr %270, align 4, !tbaa !117
  br label %271

271:                                              ; preds = %262, %141
  %272 = getelementptr inbounds %struct.sg_pipeline_desc, ptr %18, i32 0, i32 14
  store ptr @.str.96, ptr %272, align 8, !tbaa !118
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #6
  %273 = call i32 @sg_make_pipeline(ptr noundef %18)
  %274 = getelementptr inbounds %struct.sg_pipeline, ptr %22, i32 0, i32 0
  store i32 %273, ptr %274, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 getelementptr inbounds (%struct._simgui_state_t, ptr @_simgui, i32 0, i32 6), ptr align 4 %22, i64 4, i1 false), !tbaa.struct !52
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #6
  call void @sg_pop_debug_group()
  call void @llvm.lifetime.end.p0(i64 568, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 3048, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 96, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 96, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #6
  ret void
}

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

; Function Attrs: nounwind uwtable
declare hidden void @_simgui_desc_defaults(ptr dead_on_unwind noalias writable sret(%struct.simgui_desc_t) align 8, ptr noundef) #3

; Function Attrs: nounwind uwtable
declare hidden zeroext i1 @_simgui_is_osx() #3

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

declare ptr @igCreateContext(ptr noundef) #4

declare void @igStyleColorsDark(ptr noundef) #4

declare ptr @igGetStyle() #4

declare ptr @igGetIO() #4

declare ptr @ImFontAtlas_AddFontDefault(ptr noundef, ptr noundef) #4

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

; Function Attrs: nounwind uwtable
declare hidden ptr @_simgui_get_clipboard(ptr noundef) #3

declare void @ImFontAtlas_GetTexDataAsRGBA32(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #4

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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { noreturn nounwind }
attributes #6 = { 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 4, !10, i64 4, i64 4, !10, i64 8, i64 4, !10, i64 12, i64 4, !10, i64 16, i64 8, !5, i64 24, i64 1, !12, i64 25, i64 1, !12, i64 26, i64 1, !12, i64 27, i64 1, !12, i64 28, i64 1, !12, i64 32, i64 8, !5, i64 40, i64 8, !5, i64 48, i64 8, !5}
!10 = !{!11, !11, i64 0}
!11 = !{!"int", !7, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"_Bool", !7, i64 0}
!14 = !{!15, !18, i64 56}
!15 = !{!"", !16, i64 0, !18, i64 56, !19, i64 60, !19, i64 64, !20, i64 68, !21, i64 72, !22, i64 76, !23, i64 80, !23, i64 96, !13, i64 112}
!16 = !{!"simgui_desc_t", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !6, i64 16, !13, i64 24, !13, i64 25, !13, i64 26, !13, i64 27, !13, i64 28, !17, i64 32}
!17 = !{!"simgui_allocator_t", !6, i64 0, !6, i64 8, !6, i64 16}
!18 = !{!"float", !7, i64 0}
!19 = !{!"sg_buffer", !11, i64 0}
!20 = !{!"sg_image", !11, i64 0}
!21 = !{!"sg_shader", !11, i64 0}
!22 = !{!"sg_pipeline", !11, i64 0}
!23 = !{!"sg_range", !6, i64 0, !24, i64 8}
!24 = !{!"long", !7, i64 0}
!25 = !{!15, !13, i64 112}
!26 = !{!15, !11, i64 0}
!27 = !{!15, !24, i64 88}
!28 = !{!15, !6, i64 80}
!29 = !{!15, !24, i64 104}
!30 = !{!15, !6, i64 96}
!31 = !{!15, !13, i64 24}
!32 = !{i8 0, i8 2}
!33 = !{}
!34 = !{!35, !6, i64 80}
!35 = !{!"ImGuiIO", !11, i64 0, !11, i64 4, !36, i64 8, !18, i64 16, !18, i64 20, !6, i64 24, !6, i64 32, !18, i64 40, !18, i64 44, !18, i64 48, !18, i64 52, !18, i64 56, !18, i64 60, !18, i64 64, !6, i64 72, !6, i64 80, !18, i64 88, !13, i64 92, !6, i64 96, !36, i64 104, !13, i64 112, !13, i64 113, !13, i64 114, !13, i64 115, !13, i64 116, !13, i64 117, !13, i64 118, !13, i64 119, !18, 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, !13, i64 208, !13, i64 209, !13, i64 210, !13, i64 211, !13, i64 212, !13, i64 213, !13, i64 214, !18, i64 216, !11, i64 220, !11, i64 224, !11, i64 228, !11, i64 232, !11, i64 236, !36, i64 240, !7, i64 248, !7, i64 2856, !7, i64 3508, !36, i64 3572, !7, i64 3580, !18, i64 3588, !18, i64 3592, !13, i64 3596, !13, i64 3597, !13, i64 3598, !13, i64 3599, !11, i64 3600, !7, i64 3604, !13, i64 14036, !36, 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, !18, i64 14236, !13, i64 14240, !13, i64 14241, !7, i64 14242, !13, i64 14243, !37, i64 14244, !38, i64 14248}
!36 = !{!"ImVec2", !18, i64 0, !18, i64 4}
!37 = !{!"short", !7, i64 0}
!38 = !{!"ImVector_ImWchar", !11, i64 0, !11, i64 4, !6, i64 8}
!39 = !{!15, !6, i64 16}
!40 = !{!35, !6, i64 24}
!41 = !{!35, !13, i64 113}
!42 = !{!35, !11, i64 4}
!43 = !{!15, !13, i64 26}
!44 = !{!35, !6, i64 176}
!45 = !{!35, !6, i64 168}
!46 = !{!15, !13, i64 27}
!47 = !{!35, !13, i64 118}
!48 = !{!49, !11, i64 20}
!49 = !{!"sg_buffer_desc", !11, i64 0, !24, i64 8, !11, i64 16, !11, i64 20, !23, i64 24, !6, i64 40, !7, i64 48, !7, i64 56, !6, i64 72, !6, i64 80, !11, i64 88}
!50 = !{!49, !24, i64 8}
!51 = !{!49, !6, i64 40}
!52 = !{i64 0, i64 4, !10}
!53 = !{!49, !11, i64 16}
!54 = !{!55, !11, i64 12}
!55 = !{!"sg_image_desc", !11, i64 0, !11, i64 4, !13, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !11, i64 24, !11, i64 28, !11, i64 32, !11, i64 36, !11, i64 40, !11, i64 44, !11, i64 48, !11, i64 52, !11, i64 56, !11, i64 60, !11, i64 64, !18, i64 68, !18, i64 72, !56, i64 80, !6, i64 1616, !7, i64 1624, !11, i64 1632, !7, i64 1640, !6, i64 1656, !6, i64 1664, !6, i64 1672, !11, i64 1680}
!56 = !{!"sg_image_data", !7, i64 0}
!57 = !{!55, !11, i64 16}
!58 = !{!55, !11, i64 32}
!59 = !{!55, !11, i64 48}
!60 = !{!55, !11, i64 52}
!61 = !{!55, !11, i64 40}
!62 = !{!55, !11, i64 44}
!63 = !{!23, !6, i64 0}
!64 = !{!23, !24, i64 8}
!65 = !{!55, !6, i64 1616}
!66 = !{!15, !11, i64 68}
!67 = !{!68, !6, i64 8}
!68 = !{!"ImFontAtlas", !11, i64 0, !6, i64 8, !11, i64 16, !11, i64 20, !13, i64 24, !6, i64 32, !13, i64 40, !13, i64 41, !6, i64 48, !6, i64 56, !11, i64 64, !11, i64 68, !36, i64 72, !36, i64 80, !69, i64 88, !70, i64 104, !71, i64 120, !7, i64 136, !6, i64 1160, !11, i64 1168, !11, i64 1172, !11, i64 1176}
!69 = !{!"ImVector_ImFontPtr", !11, i64 0, !11, i64 4, !6, i64 8}
!70 = !{!"ImVector_ImFontAtlasCustomRect", !11, i64 0, !11, i64 4, !6, i64 8}
!71 = !{!"ImVector_ImFontConfig", !11, i64 0, !11, i64 4, !6, i64 8}
!72 = !{!73, !6, i64 0}
!73 = !{!"sg_shader_attr_desc", !6, i64 0, !6, i64 8, !11, i64 16}
!74 = !{!73, !6, i64 8}
!75 = !{!73, !11, i64 16}
!76 = !{!77, !24, i64 0}
!77 = !{!"sg_shader_uniform_block_desc", !24, i64 0, !11, i64 8, !7, i64 16}
!78 = !{!79, !6, i64 0}
!79 = !{!"sg_shader_uniform_desc", !6, i64 0, !11, i64 8, !11, i64 12}
!80 = !{!79, !11, i64 8}
!81 = !{!79, !11, i64 12}
!82 = !{!83, !6, i64 0}
!83 = !{!"sg_shader_image_desc", !6, i64 0, !11, i64 8, !11, i64 12}
!84 = !{!83, !11, i64 8}
!85 = !{!83, !11, i64 12}
!86 = !{!87, !6, i64 3032}
!87 = !{!"sg_shader_desc", !11, i64 0, !7, i64 8, !88, i64 392, !88, i64 1712, !6, i64 3032, !11, i64 3040}
!88 = !{!"sg_shader_stage_desc", !6, i64 0, !23, i64 8, !6, i64 24, !6, i64 32, !7, i64 40, !7, i64 1128}
!89 = !{!87, !6, i64 392}
!90 = !{!87, !6, i64 1712}
!91 = !{!92, !11, i64 0}
!92 = !{!"sg_buffer_layout_desc", !11, i64 0, !11, i64 4, !11, i64 8}
!93 = !{!94, !11, i64 4}
!94 = !{!"sg_vertex_attr_desc", !11, i64 0, !11, i64 4, !11, i64 8}
!95 = !{!94, !11, i64 8}
!96 = !{!97, !11, i64 512}
!97 = !{!"sg_pipeline_desc", !11, i64 0, !21, i64 4, !98, i64 8, !99, i64 296, !100, i64 320, !11, i64 360, !7, i64 364, !11, i64 508, !11, i64 512, !11, i64 516, !11, i64 520, !11, i64 524, !102, i64 528, !13, i64 544, !6, i64 552, !11, i64 560}
!98 = !{!"sg_layout_desc", !7, i64 0, !7, i64 96}
!99 = !{!"sg_depth_state", !11, i64 0, !11, i64 4, !13, i64 8, !18, i64 12, !18, i64 16, !18, i64 20}
!100 = !{!"sg_stencil_state", !13, i64 0, !101, i64 4, !101, i64 20, !7, i64 36, !7, i64 37, !7, i64 38}
!101 = !{!"sg_stencil_face_state", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12}
!102 = !{!"sg_color", !18, i64 0, !18, i64 4, !18, i64 8, !18, i64 12}
!103 = !{!15, !11, i64 12}
!104 = !{!97, !11, i64 524}
!105 = !{!15, !11, i64 8}
!106 = !{!97, !11, i64 296}
!107 = !{!15, !11, i64 4}
!108 = !{!109, !11, i64 0}
!109 = !{!"sg_color_state", !11, i64 0, !11, i64 4, !110, i64 8}
!110 = !{!"sg_blend_state", !13, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !11, i64 24}
!111 = !{!15, !13, i64 28}
!112 = !{!109, !11, i64 4}
!113 = !{!109, !13, i64 8}
!114 = !{!109, !11, i64 12}
!115 = !{!109, !11, i64 16}
!116 = !{!109, !11, i64 24}
!117 = !{!109, !11, i64 28}
!118 = !{!97, !6, i64 552}


; 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 }
%struct.sg_buffer_desc = type { i32, i64, i32, i32, %struct.sg_range, ptr, [2 x i32], [2 x ptr], ptr, ptr, i32 }
%struct.sg_image_desc = type { i32, i32, i8, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, float, float, %struct.sg_image_data, ptr, [2 x i32], i32, [2 x ptr], ptr, ptr, ptr, i32 }
%struct.sg_image_data = type { [6 x [16 x %struct.sg_range]] }
%struct.sg_shader_desc = type { i32, [16 x %struct.sg_shader_attr_desc], %struct.sg_shader_stage_desc, %struct.sg_shader_stage_desc, ptr, i32 }
%struct.sg_shader_attr_desc = type { ptr, ptr, i32 }
%struct.sg_shader_stage_desc = type { ptr, %struct.sg_range, ptr, ptr, [4 x %struct.sg_shader_uniform_block_desc], [12 x %struct.sg_shader_image_desc] }
%struct.sg_shader_uniform_block_desc = type { i64, i32, [16 x %struct.sg_shader_uniform_desc] }
%struct.sg_shader_uniform_desc = type { ptr, i32, i32 }
%struct.sg_shader_image_desc = type { ptr, i32, i32 }
%struct.sg_pipeline_desc = type { i32, %struct.sg_shader, %struct.sg_layout_desc, %struct.sg_depth_state, %struct.sg_stencil_state, i32, [4 x %struct.sg_color_state], i32, i32, i32, i32, i32, %struct.sg_color, i8, ptr, i32 }
%struct.sg_layout_desc = type { [8 x %struct.sg_buffer_layout_desc], [16 x %struct.sg_vertex_attr_desc] }
%struct.sg_buffer_layout_desc = type { i32, i32, i32 }
%struct.sg_vertex_attr_desc = type { i32, i32, i32 }
%struct.sg_depth_state = type { i32, i32, i8, float, float, float }
%struct.sg_stencil_state = type { i8, %struct.sg_stencil_face_state, %struct.sg_stencil_face_state, i8, i8, i8 }
%struct.sg_stencil_face_state = type { i32, i32, i32, i32 }
%struct.sg_color_state = type { i32, i32, %struct.sg_blend_state }
%struct.sg_blend_state = type { i8, i32, i32, i32, i32, i32, i32 }
%struct.sg_color = type { float, float, float, float }

@.str.6 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.83 = external hidden unnamed_addr constant [83 x i8], align 1
@__PRETTY_FUNCTION__.simgui_setup = external hidden unnamed_addr constant [41 x i8], align 1
@_simgui = external hidden global %struct._simgui_state_t, align 8
@.str.84 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.85 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.86 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.87 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.88 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.89 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.90 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.91 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.92 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.93 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.94 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.95 = external hidden unnamed_addr constant [19 x i8], align 1
@_simgui_vs_source_glsl330 = external hidden constant [341 x i8], align 16
@_simgui_fs_source_glsl330 = external hidden constant [169 x i8], align 16
@.str.96 = external hidden unnamed_addr constant [21 x i8], align 1

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

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

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

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

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

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

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local void @simgui_setup(ptr noundef %0) local_unnamed_addr #3 {
  %2 = alloca %struct.simgui_desc_t, align 8
  %3 = alloca %struct.sg_buffer_desc, align 8
  %4 = alloca %struct.sg_buffer_desc, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca %struct.sg_image_desc, align 8
  %10 = alloca %struct.sg_shader_desc, align 8
  %11 = alloca %struct.sg_pipeline_desc, align 8
  %.not = icmp eq ptr %0, null
  br i1 %.not, label %12, label %13

12:                                               ; preds = %1
  tail call void @__assert_fail(ptr noundef nonnull @.str.6, ptr noundef nonnull @.str.83, i32 noundef 1739, ptr noundef nonnull @__PRETTY_FUNCTION__.simgui_setup) #5
  unreachable

13:                                               ; preds = %1
  tail call void @_simgui_clear(ptr noundef nonnull @_simgui, i64 noundef 120)
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %2) #6
  call void @_simgui_desc_defaults(ptr dead_on_unwind nonnull writable sret(%struct.simgui_desc_t) align 8 %2, ptr noundef nonnull %0)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(56) @_simgui, ptr noundef nonnull align 8 dereferenceable(56) %2, i64 56, i1 false), !tbaa.struct !5
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %2) #6
  store float 1.000000e+00, ptr getelementptr inbounds (i8, ptr @_simgui, i64 56), align 8, !tbaa !14
  %14 = call zeroext i1 @_simgui_is_osx()
  %15 = zext i1 %14 to i8
  store i8 %15, ptr getelementptr inbounds (i8, ptr @_simgui, i64 112), align 8, !tbaa !25
  %16 = load i32, ptr @_simgui, align 8, !tbaa !26
  %17 = icmp sgt i32 %16, 0
  br i1 %17, label %19, label %18

18:                                               ; preds = %13
  call void @__assert_fail(ptr noundef nonnull @.str.84, ptr noundef nonnull @.str.83, i32 noundef 1751, ptr noundef nonnull @__PRETTY_FUNCTION__.simgui_setup) #5
  unreachable

19:                                               ; preds = %13
  %20 = zext nneg i32 %16 to i64
  %21 = mul nuw nsw i64 %20, 20
  store i64 %21, ptr getelementptr inbounds (i8, ptr @_simgui, i64 88), align 8, !tbaa !27
  %22 = call ptr @_simgui_malloc(i64 noundef %21)
  store ptr %22, ptr getelementptr inbounds (i8, ptr @_simgui, i64 80), align 8, !tbaa !28
  %23 = load i32, ptr @_simgui, align 8, !tbaa !26
  %24 = sext i32 %23 to i64
  %25 = mul nsw i64 %24, 6
  store i64 %25, ptr getelementptr inbounds (i8, ptr @_simgui, i64 104), align 8, !tbaa !29
  %26 = call ptr @_simgui_malloc(i64 noundef %25)
  store ptr %26, ptr getelementptr inbounds (i8, ptr @_simgui, i64 96), align 8, !tbaa !30
  %27 = call ptr @igCreateContext(ptr noundef null) #6
  %28 = call ptr @igGetStyle() #6
  call void @igStyleColorsDark(ptr noundef %28) #6
  %29 = call ptr @igGetIO() #6
  %30 = load i8, ptr getelementptr inbounds (i8, ptr @_simgui, i64 24), align 8, !tbaa !31, !range !32, !noundef !33
  %31 = trunc nuw i8 %30 to i1
  br i1 %31, label %36, label %32

32:                                               ; preds = %19
  %33 = getelementptr inbounds i8, ptr %29, i64 80
  %34 = load ptr, ptr %33, align 8, !tbaa !34
  %35 = call ptr @ImFontAtlas_AddFontDefault(ptr noundef %34, ptr noundef null) #6
  br label %36

36:                                               ; preds = %32, %19
  %37 = load ptr, ptr getelementptr inbounds (i8, ptr @_simgui, i64 16), align 8, !tbaa !39
  %38 = getelementptr inbounds i8, ptr %29, i64 24
  store ptr %37, ptr %38, align 8, !tbaa !40
  %39 = call zeroext i1 @_simgui_is_osx()
  %40 = getelementptr inbounds i8, ptr %29, i64 113
  %41 = zext i1 %39 to i8
  store i8 %41, ptr %40, align 1, !tbaa !41
  %42 = getelementptr inbounds i8, ptr %29, i64 4
  %43 = load i32, ptr %42, align 4, !tbaa !42
  %44 = or i32 %43, 8
  store i32 %44, ptr %42, align 4, !tbaa !42
  %45 = load i8, ptr getelementptr inbounds (i8, ptr @_simgui, i64 26), align 2, !tbaa !43, !range !32, !noundef !33
  %46 = trunc nuw i8 %45 to i1
  br i1 %46, label %49, label %47

47:                                               ; preds = %36
  %48 = or i32 %43, 10
  store i32 %48, ptr %42, align 4, !tbaa !42
  br label %49

49:                                               ; preds = %47, %36
  %50 = getelementptr inbounds i8, ptr %29, i64 176
  store ptr @_simgui_set_clipboard, ptr %50, align 8, !tbaa !44
  %51 = getelementptr inbounds i8, ptr %29, i64 168
  store ptr @_simgui_get_clipboard, ptr %51, align 8, !tbaa !45
  %52 = load i8, ptr getelementptr inbounds (i8, ptr @_simgui, i64 27), align 1, !tbaa !46, !range !32, !noundef !33
  %53 = xor i8 %52, 1
  %54 = getelementptr inbounds i8, ptr %29, i64 118
  store i8 %53, ptr %54, align 2, !tbaa !47
  call void @sg_push_debug_group(ptr noundef nonnull @.str.85)
  call void @llvm.lifetime.start.p0(i64 96, ptr nonnull %3) #6
  call void @_simgui_clear(ptr noundef nonnull %3, i64 noundef 96)
  %55 = getelementptr inbounds i8, ptr %3, i64 20
  store i32 3, ptr %55, align 4, !tbaa !48
  %56 = load i64, ptr getelementptr inbounds (i8, ptr @_simgui, i64 88), align 8, !tbaa !27
  %57 = getelementptr inbounds i8, ptr %3, i64 8
  store i64 %56, ptr %57, align 8, !tbaa !50
  %58 = getelementptr inbounds i8, ptr %3, i64 40
  store ptr @.str.86, ptr %58, align 8, !tbaa !51
  %59 = call i32 @sg_make_buffer(ptr noundef nonnull %3)
  store i32 %59, ptr getelementptr inbounds (i8, ptr @_simgui, i64 60), align 4, !tbaa !6
  call void @llvm.lifetime.start.p0(i64 96, ptr nonnull %4) #6
  call void @_simgui_clear(ptr noundef nonnull %4, i64 noundef 96)
  %60 = getelementptr inbounds i8, ptr %4, i64 16
  store i32 2, ptr %60, align 8, !tbaa !52
  %61 = getelementptr inbounds i8, ptr %4, i64 20
  store i32 3, ptr %61, align 4, !tbaa !48
  %62 = load i64, ptr getelementptr inbounds (i8, ptr @_simgui, i64 104), align 8, !tbaa !29
  %63 = getelementptr inbounds i8, ptr %4, i64 8
  store i64 %62, ptr %63, align 8, !tbaa !50
  %64 = getelementptr inbounds i8, ptr %4, i64 40
  store ptr @.str.87, ptr %64, align 8, !tbaa !51
  %65 = call i32 @sg_make_buffer(ptr noundef nonnull %4)
  store i32 %65, ptr getelementptr inbounds (i8, ptr @_simgui, i64 64), align 8, !tbaa !6
  %66 = load i8, ptr getelementptr inbounds (i8, ptr @_simgui, i64 24), align 8, !tbaa !31, !range !32, !noundef !33
  %67 = trunc nuw i8 %66 to i1
  br i1 %67, label %89, label %68

68:                                               ; preds = %49
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #6
  %69 = getelementptr inbounds i8, ptr %29, i64 80
  %70 = load ptr, ptr %69, align 8, !tbaa !34
  call void @ImFontAtlas_GetTexDataAsRGBA32(ptr noundef %70, ptr noundef nonnull %5, ptr noundef nonnull %6, ptr noundef nonnull %7, ptr noundef nonnull %8) #6
  call void @llvm.lifetime.start.p0(i64 1688, ptr nonnull %9) #6
  call void @_simgui_clear(ptr noundef nonnull %9, i64 noundef 1688)
  %71 = load i32, ptr %6, align 4, !tbaa !6
  %72 = getelementptr inbounds i8, ptr %9, i64 12
  store i32 %71, ptr %72, align 4, !tbaa !53
  %73 = load i32, ptr %7, align 4, !tbaa !6
  %74 = getelementptr inbounds i8, ptr %9, i64 16
  store i32 %73, ptr %74, align 8, !tbaa !56
  %75 = getelementptr inbounds i8, ptr %9, i64 32
  store i32 23, ptr %75, align 8, !tbaa !57
  %76 = getelementptr inbounds i8, ptr %9, i64 40
  store <4 x i32> <i32 2, i32 2, i32 2, i32 2>, ptr %76, align 8, !tbaa !6
  %77 = load ptr, ptr %5, align 8, !tbaa !10
  %78 = getelementptr inbounds i8, ptr %9, i64 80
  store ptr %77, ptr %78, align 8, !tbaa !58
  %79 = mul nsw i32 %73, %71
  %80 = sext i32 %79 to i64
  %81 = shl nsw i64 %80, 2
  %82 = getelementptr inbounds i8, ptr %9, i64 88
  store i64 %81, ptr %82, align 8, !tbaa !59
  %83 = getelementptr inbounds i8, ptr %9, i64 1616
  store ptr @.str.88, ptr %83, align 8, !tbaa !60
  %84 = call i32 @sg_make_image(ptr noundef nonnull %9)
  store i32 %84, ptr getelementptr inbounds (i8, ptr @_simgui, i64 68), align 4, !tbaa !6
  %85 = zext i32 %84 to i64
  %86 = inttoptr i64 %85 to ptr
  %87 = load ptr, ptr %69, align 8, !tbaa !34
  %88 = getelementptr inbounds i8, ptr %87, i64 8
  store ptr %86, ptr %88, align 8, !tbaa !61
  call void @llvm.lifetime.end.p0(i64 1688, ptr nonnull %9) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  br label %89

89:                                               ; preds = %68, %49
  call void @llvm.lifetime.start.p0(i64 3048, ptr nonnull %10) #6
  call void @_simgui_clear(ptr noundef nonnull %10, i64 noundef 3048)
  %90 = getelementptr inbounds i8, ptr %10, i64 8
  store ptr @.str.89, ptr %90, align 8, !tbaa !66
  %91 = getelementptr inbounds i8, ptr %10, i64 32
  store ptr @.str.90, ptr %91, align 8, !tbaa !66
  %92 = getelementptr inbounds i8, ptr %10, i64 56
  store ptr @.str.91, ptr %92, align 8, !tbaa !66
  %93 = getelementptr inbounds i8, ptr %10, i64 16
  store ptr @.str.92, ptr %93, align 8, !tbaa !68
  %94 = getelementptr inbounds i8, ptr %10, i64 24
  store i32 0, ptr %94, align 8, !tbaa !69
  %95 = getelementptr inbounds i8, ptr %10, i64 40
  store ptr @.str.92, ptr %95, align 8, !tbaa !68
  %96 = getelementptr inbounds i8, ptr %10, i64 48
  store i32 1, ptr %96, align 8, !tbaa !69
  %97 = getelementptr inbounds i8, ptr %10, i64 64
  store ptr @.str.92, ptr %97, align 8, !tbaa !68
  %98 = getelementptr inbounds i8, ptr %10, i64 72
  store i32 2, ptr %98, align 8, !tbaa !69
  %99 = getelementptr inbounds i8, ptr %10, i64 392
  %100 = getelementptr inbounds i8, ptr %10, i64 432
  store i64 16, ptr %100, align 8, !tbaa !70
  %101 = getelementptr inbounds i8, ptr %10, i64 448
  store ptr @.str.93, ptr %101, align 8, !tbaa !72
  %102 = getelementptr inbounds i8, ptr %10, i64 456
  store i32 4, ptr %102, align 8, !tbaa !74
  %103 = getelementptr inbounds i8, ptr %10, i64 460
  store i32 1, ptr %103, align 4, !tbaa !75
  %104 = getelementptr inbounds i8, ptr %10, i64 1712
  %105 = getelementptr inbounds i8, ptr %10, i64 2840
  store ptr @.str.94, ptr %105, align 8, !tbaa !76
  %106 = getelementptr inbounds i8, ptr %10, i64 2848
  store i32 1, ptr %106, align 8, !tbaa !78
  %107 = getelementptr inbounds i8, ptr %10, i64 2852
  store i32 1, ptr %107, align 4, !tbaa !79
  %108 = getelementptr inbounds i8, ptr %10, i64 3032
  store ptr @.str.95, ptr %108, align 8, !tbaa !80
  store ptr @_simgui_vs_source_glsl330, ptr %99, align 8, !tbaa !83
  store ptr @_simgui_fs_source_glsl330, ptr %104, align 8, !tbaa !84
  %109 = call i32 @sg_make_shader(ptr noundef nonnull %10)
  store i32 %109, ptr getelementptr inbounds (i8, ptr @_simgui, i64 72), align 8, !tbaa !6
  call void @llvm.lifetime.start.p0(i64 568, ptr nonnull %11) #6
  call void @_simgui_clear(ptr noundef nonnull %11, i64 noundef 568)
  %110 = getelementptr inbounds i8, ptr %11, i64 8
  store i32 20, ptr %110, align 8, !tbaa !85
  %111 = getelementptr inbounds i8, ptr %11, i64 108
  store i32 0, ptr %111, align 4, !tbaa !87
  %112 = getelementptr inbounds i8, ptr %11, i64 112
  store i32 2, ptr %112, align 8, !tbaa !89
  %113 = getelementptr inbounds i8, ptr %11, i64 120
  store i32 8, ptr %113, align 8, !tbaa !87
  %114 = getelementptr inbounds i8, ptr %11, i64 124
  store i32 2, ptr %114, align 4, !tbaa !89
  %115 = getelementptr inbounds i8, ptr %11, i64 132
  store i32 16, ptr %115, align 4, !tbaa !87
  %116 = getelementptr inbounds i8, ptr %11, i64 136
  store i32 8, ptr %116, align 8, !tbaa !89
  %117 = getelementptr inbounds i8, ptr %11, i64 4
  %118 = load i32, ptr getelementptr inbounds (i8, ptr @_simgui, i64 72), align 8, !tbaa !6
  store i32 %118, ptr %117, align 4, !tbaa !6
  %119 = getelementptr inbounds i8, ptr %11, i64 512
  store i32 2, ptr %119, align 8, !tbaa !90
  %120 = load i32, ptr getelementptr inbounds (i8, ptr @_simgui, i64 12), align 4, !tbaa !97
  %121 = getelementptr inbounds i8, ptr %11, i64 524
  store i32 %120, ptr %121, align 4, !tbaa !98
  %122 = load i32, ptr getelementptr inbounds (i8, ptr @_simgui, i64 8), align 8, !tbaa !99
  %123 = getelementptr inbounds i8, ptr %11, i64 296
  store i32 %122, ptr %123, align 8, !tbaa !100
  %124 = load i32, ptr getelementptr inbounds (i8, ptr @_simgui, i64 4), align 4, !tbaa !101
  %125 = getelementptr inbounds i8, ptr %11, i64 364
  store i32 %124, ptr %125, align 4, !tbaa !102
  %126 = load i8, ptr getelementptr inbounds (i8, ptr @_simgui, i64 28), align 4, !tbaa !105, !range !32, !noundef !33
  %127 = trunc nuw i8 %126 to i1
  %128 = select i1 %127, i32 15, i32 7
  %129 = getelementptr inbounds i8, ptr %11, i64 368
  store i32 %128, ptr %129, align 8, !tbaa !106
  %130 = getelementptr inbounds i8, ptr %11, i64 372
  store i8 1, ptr %130, align 4, !tbaa !107
  %131 = getelementptr inbounds i8, ptr %11, i64 376
  store i32 5, ptr %131, align 8, !tbaa !108
  %132 = getelementptr inbounds i8, ptr %11, i64 380
  store i32 6, ptr %132, align 4, !tbaa !109
  br i1 %127, label %133, label %136

133:                                              ; preds = %89
  %134 = getelementptr inbounds i8, ptr %11, i64 388
  store i32 2, ptr %134, align 4, !tbaa !110
  %135 = getelementptr inbounds i8, ptr %11, i64 392
  store i32 2, ptr %135, align 8, !tbaa !111
  br label %136

136:                                              ; preds = %133, %89
  %137 = getelementptr inbounds i8, ptr %11, i64 552
  store ptr @.str.96, ptr %137, align 8, !tbaa !112
  %138 = call i32 @sg_make_pipeline(ptr noundef nonnull %11)
  store i32 %138, ptr getelementptr inbounds (i8, ptr @_simgui, i64 76), align 4, !tbaa !6
  call void @sg_pop_debug_group()
  call void @llvm.lifetime.end.p0(i64 568, ptr nonnull %11) #6
  call void @llvm.lifetime.end.p0(i64 3048, ptr nonnull %10) #6
  call void @llvm.lifetime.end.p0(i64 96, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 96, ptr nonnull %3) #6
  ret void
}

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

; Function Attrs: nounwind uwtable
declare hidden void @_simgui_desc_defaults(ptr dead_on_unwind noalias writable sret(%struct.simgui_desc_t) align 8, ptr noundef) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
declare hidden zeroext i1 @_simgui_is_osx() local_unnamed_addr #3

; Function Attrs: nounwind uwtable
declare hidden ptr @_simgui_malloc(i64 noundef) local_unnamed_addr #3

declare ptr @igCreateContext(ptr noundef) local_unnamed_addr #4

declare void @igStyleColorsDark(ptr noundef) local_unnamed_addr #4

declare ptr @igGetStyle() local_unnamed_addr #4

declare ptr @igGetIO() local_unnamed_addr #4

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

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

; Function Attrs: nounwind uwtable
declare hidden ptr @_simgui_get_clipboard(ptr noundef) #3

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress 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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { noreturn nounwind }
attributes #6 = { 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 4, !6, i64 4, i64 4, !6, i64 8, i64 4, !6, i64 12, i64 4, !6, i64 16, i64 8, !10, i64 24, i64 1, !12, i64 25, i64 1, !12, i64 26, i64 1, !12, i64 27, i64 1, !12, i64 28, i64 1, !12, i64 32, i64 8, !10, i64 40, i64 8, !10, i64 48, i64 8, !10}
!6 = !{!7, !7, i64 0}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!11, !11, i64 0}
!11 = !{!"any pointer", !8, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"_Bool", !8, i64 0}
!14 = !{!15, !18, i64 56}
!15 = !{!"", !16, i64 0, !18, i64 56, !19, i64 60, !19, i64 64, !20, i64 68, !21, i64 72, !22, i64 76, !23, i64 80, !23, i64 96, !13, i64 112}
!16 = !{!"simgui_desc_t", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !11, i64 16, !13, i64 24, !13, i64 25, !13, i64 26, !13, i64 27, !13, i64 28, !17, i64 32}
!17 = !{!"simgui_allocator_t", !11, i64 0, !11, i64 8, !11, i64 16}
!18 = !{!"float", !8, i64 0}
!19 = !{!"sg_buffer", !7, i64 0}
!20 = !{!"sg_image", !7, i64 0}
!21 = !{!"sg_shader", !7, i64 0}
!22 = !{!"sg_pipeline", !7, i64 0}
!23 = !{!"sg_range", !11, i64 0, !24, i64 8}
!24 = !{!"long", !8, i64 0}
!25 = !{!15, !13, i64 112}
!26 = !{!15, !7, i64 0}
!27 = !{!15, !24, i64 88}
!28 = !{!15, !11, i64 80}
!29 = !{!15, !24, i64 104}
!30 = !{!15, !11, i64 96}
!31 = !{!15, !13, i64 24}
!32 = !{i8 0, i8 2}
!33 = !{}
!34 = !{!35, !11, i64 80}
!35 = !{!"ImGuiIO", !7, i64 0, !7, i64 4, !36, i64 8, !18, i64 16, !18, i64 20, !11, i64 24, !11, i64 32, !18, i64 40, !18, i64 44, !18, i64 48, !18, i64 52, !18, i64 56, !18, i64 60, !18, i64 64, !11, i64 72, !11, i64 80, !18, i64 88, !13, i64 92, !11, i64 96, !36, i64 104, !13, i64 112, !13, i64 113, !13, i64 114, !13, i64 115, !13, i64 116, !13, i64 117, !13, i64 118, !13, i64 119, !18, i64 120, !11, i64 128, !11, i64 136, !11, i64 144, !11, i64 152, !11, i64 160, !11, i64 168, !11, i64 176, !11, i64 184, !11, i64 192, !11, i64 200, !13, i64 208, !13, i64 209, !13, i64 210, !13, i64 211, !13, i64 212, !13, i64 213, !13, i64 214, !18, i64 216, !7, i64 220, !7, i64 224, !7, i64 228, !7, i64 232, !7, i64 236, !36, i64 240, !8, i64 248, !8, i64 2856, !8, i64 3508, !36, i64 3572, !8, i64 3580, !18, i64 3588, !18, i64 3592, !13, i64 3596, !13, i64 3597, !13, i64 3598, !13, i64 3599, !7, i64 3600, !8, i64 3604, !13, i64 14036, !36, 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, !18, i64 14236, !13, i64 14240, !13, i64 14241, !8, i64 14242, !13, i64 14243, !37, i64 14244, !38, i64 14248}
!36 = !{!"ImVec2", !18, i64 0, !18, i64 4}
!37 = !{!"short", !8, i64 0}
!38 = !{!"ImVector_ImWchar", !7, i64 0, !7, i64 4, !11, i64 8}
!39 = !{!15, !11, i64 16}
!40 = !{!35, !11, i64 24}
!41 = !{!35, !13, i64 113}
!42 = !{!35, !7, i64 4}
!43 = !{!15, !13, i64 26}
!44 = !{!35, !11, i64 176}
!45 = !{!35, !11, i64 168}
!46 = !{!15, !13, i64 27}
!47 = !{!35, !13, i64 118}
!48 = !{!49, !7, i64 20}
!49 = !{!"sg_buffer_desc", !7, i64 0, !24, i64 8, !7, i64 16, !7, i64 20, !23, i64 24, !11, i64 40, !8, i64 48, !8, i64 56, !11, i64 72, !11, i64 80, !7, i64 88}
!50 = !{!49, !24, i64 8}
!51 = !{!49, !11, i64 40}
!52 = !{!49, !7, i64 16}
!53 = !{!54, !7, i64 12}
!54 = !{!"sg_image_desc", !7, i64 0, !7, i64 4, !13, i64 8, !7, i64 12, !7, i64 16, !7, i64 20, !7, i64 24, !7, i64 28, !7, i64 32, !7, i64 36, !7, i64 40, !7, i64 44, !7, i64 48, !7, i64 52, !7, i64 56, !7, i64 60, !7, i64 64, !18, i64 68, !18, i64 72, !55, i64 80, !11, i64 1616, !8, i64 1624, !7, i64 1632, !8, i64 1640, !11, i64 1656, !11, i64 1664, !11, i64 1672, !7, i64 1680}
!55 = !{!"sg_image_data", !8, i64 0}
!56 = !{!54, !7, i64 16}
!57 = !{!54, !7, i64 32}
!58 = !{!23, !11, i64 0}
!59 = !{!23, !24, i64 8}
!60 = !{!54, !11, i64 1616}
!61 = !{!62, !11, i64 8}
!62 = !{!"ImFontAtlas", !7, i64 0, !11, i64 8, !7, i64 16, !7, i64 20, !13, i64 24, !11, i64 32, !13, i64 40, !13, i64 41, !11, i64 48, !11, i64 56, !7, i64 64, !7, i64 68, !36, i64 72, !36, i64 80, !63, i64 88, !64, i64 104, !65, i64 120, !8, i64 136, !11, i64 1160, !7, i64 1168, !7, i64 1172, !7, i64 1176}
!63 = !{!"ImVector_ImFontPtr", !7, i64 0, !7, i64 4, !11, i64 8}
!64 = !{!"ImVector_ImFontAtlasCustomRect", !7, i64 0, !7, i64 4, !11, i64 8}
!65 = !{!"ImVector_ImFontConfig", !7, i64 0, !7, i64 4, !11, i64 8}
!66 = !{!67, !11, i64 0}
!67 = !{!"sg_shader_attr_desc", !11, i64 0, !11, i64 8, !7, i64 16}
!68 = !{!67, !11, i64 8}
!69 = !{!67, !7, i64 16}
!70 = !{!71, !24, i64 0}
!71 = !{!"sg_shader_uniform_block_desc", !24, i64 0, !7, i64 8, !8, i64 16}
!72 = !{!73, !11, i64 0}
!73 = !{!"sg_shader_uniform_desc", !11, i64 0, !7, i64 8, !7, i64 12}
!74 = !{!73, !7, i64 8}
!75 = !{!73, !7, i64 12}
!76 = !{!77, !11, i64 0}
!77 = !{!"sg_shader_image_desc", !11, i64 0, !7, i64 8, !7, i64 12}
!78 = !{!77, !7, i64 8}
!79 = !{!77, !7, i64 12}
!80 = !{!81, !11, i64 3032}
!81 = !{!"sg_shader_desc", !7, i64 0, !8, i64 8, !82, i64 392, !82, i64 1712, !11, i64 3032, !7, i64 3040}
!82 = !{!"sg_shader_stage_desc", !11, i64 0, !23, i64 8, !11, i64 24, !11, i64 32, !8, i64 40, !8, i64 1128}
!83 = !{!81, !11, i64 392}
!84 = !{!81, !11, i64 1712}
!85 = !{!86, !7, i64 0}
!86 = !{!"sg_buffer_layout_desc", !7, i64 0, !7, i64 4, !7, i64 8}
!87 = !{!88, !7, i64 4}
!88 = !{!"sg_vertex_attr_desc", !7, i64 0, !7, i64 4, !7, i64 8}
!89 = !{!88, !7, i64 8}
!90 = !{!91, !7, i64 512}
!91 = !{!"sg_pipeline_desc", !7, i64 0, !21, i64 4, !92, i64 8, !93, i64 296, !94, i64 320, !7, i64 360, !8, i64 364, !7, i64 508, !7, i64 512, !7, i64 516, !7, i64 520, !7, i64 524, !96, i64 528, !13, i64 544, !11, i64 552, !7, i64 560}
!92 = !{!"sg_layout_desc", !8, i64 0, !8, i64 96}
!93 = !{!"sg_depth_state", !7, i64 0, !7, i64 4, !13, i64 8, !18, i64 12, !18, i64 16, !18, i64 20}
!94 = !{!"sg_stencil_state", !13, i64 0, !95, i64 4, !95, i64 20, !8, i64 36, !8, i64 37, !8, i64 38}
!95 = !{!"sg_stencil_face_state", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12}
!96 = !{!"sg_color", !18, i64 0, !18, i64 4, !18, i64 8, !18, i64 12}
!97 = !{!15, !7, i64 12}
!98 = !{!91, !7, i64 524}
!99 = !{!15, !7, i64 8}
!100 = !{!91, !7, i64 296}
!101 = !{!15, !7, i64 4}
!102 = !{!103, !7, i64 0}
!103 = !{!"sg_color_state", !7, i64 0, !7, i64 4, !104, i64 8}
!104 = !{!"sg_blend_state", !13, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20, !7, i64 24}
!105 = !{!15, !13, i64 28}
!106 = !{!103, !7, i64 4}
!107 = !{!103, !13, i64 8}
!108 = !{!103, !7, i64 12}
!109 = !{!103, !7, i64 16}
!110 = !{!103, !7, i64 24}
!111 = !{!103, !7, i64 28}
!112 = !{!91, !11, i64 552}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,ReassociatePass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass