; 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_vs_params_t = type { %struct.ImVec2, [8 x i8] }
%struct.ImVec2 = type { float, float }
%struct.sg_bindings = type { i32, [8 x %struct.sg_buffer], [8 x i32], %struct.sg_buffer, i32, [12 x %struct.sg_image], [12 x %struct.sg_image], i32 }
%struct.ImDrawData = type { i8, i32, i32, i32, ptr, %struct.ImVec2, %struct.ImVec2, %struct.ImVec2 }
%struct.ImDrawList = type { %struct.ImVector_ImDrawCmd, %struct.ImVector_ImDrawIdx, %struct.ImVector_ImDrawVert, i32, i32, ptr, ptr, ptr, ptr, %struct.ImVector_ImVec4, %struct.ImVector_ImTextureID, %struct.ImVector_ImVec2, %struct.ImDrawCmdHeader, %struct.ImDrawListSplitter, float }
%struct.ImVector_ImDrawCmd = type { i32, i32, ptr }
%struct.ImVector_ImDrawIdx = type { i32, i32, ptr }
%struct.ImVector_ImDrawVert = type { i32, i32, ptr }
%struct.ImVector_ImVec4 = type { i32, i32, ptr }
%struct.ImVector_ImTextureID = type { i32, i32, ptr }
%struct.ImVector_ImVec2 = type { i32, i32, ptr }
%struct.ImDrawCmdHeader = type { %struct.ImVec4, ptr, i32 }
%struct.ImVec4 = type { float, float, float, float }
%struct.ImDrawListSplitter = type { i32, i32, %struct.ImVector_ImDrawChannel }
%struct.ImVector_ImDrawChannel = type { i32, i32, ptr }
%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.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.ImDrawCmd = type { %struct.ImVec4, ptr, i32, i32, i32, ptr, ptr }

@_simgui = external hidden global %struct._simgui_state_t, align 8
@.str.85 = external hidden unnamed_addr constant [12 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: nounwind uwtable
declare dso_local void @sg_apply_viewport(i32 noundef, i32 noundef, i32 noundef, i32 noundef, i1 noundef zeroext) #2

; Function Attrs: nounwind uwtable
declare dso_local void @sg_apply_scissor_rect(i32 noundef, i32 noundef, i32 noundef, i32 noundef, i1 noundef zeroext) #2

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

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

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

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

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

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

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

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

declare ptr @igGetIO() #3

; Function Attrs: nounwind uwtable
define dso_local void @simgui_render() #2 {
  %1 = alloca ptr, align 8
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca i64, align 8
  %5 = alloca i64, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca %struct.sg_range, align 8
  %16 = alloca %struct.sg_range, align 8
  %17 = alloca float, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca %struct._simgui_vs_params_t, align 4
  %21 = alloca %struct.sg_range, align 8
  %22 = alloca %struct.sg_bindings, align 4
  %23 = alloca ptr, align 8
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  %27 = alloca ptr, align 8
  %28 = alloca i32, align 4
  %29 = alloca i32, align 4
  %30 = alloca i32, align 4
  %31 = alloca ptr, align 8
  %32 = alloca %struct.sg_range, align 8
  %33 = alloca i32, align 4
  %34 = alloca i32, align 4
  %35 = alloca i32, align 4
  %36 = alloca i32, align 4
  %37 = alloca i64, align 8
  %38 = alloca i64, align 8
  call void @igRender()
  call void @llvm.lifetime.start.p0(i64 8, ptr %1) #4
  %39 = call ptr @igGetDrawData()
  store ptr %39, ptr %1, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #4
  %40 = call ptr @igGetIO()
  store ptr %40, ptr %2, align 8, !tbaa !5
  %41 = load ptr, ptr %1, align 8, !tbaa !5
  %42 = icmp eq ptr null, %41
  br i1 %42, label %43, label %44

43:                                               ; preds = %0
  store i32 1, ptr %3, align 4
  br label %369

44:                                               ; preds = %0
  %45 = load ptr, ptr %1, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct.ImDrawData, ptr %45, i32 0, i32 1
  %47 = load i32, ptr %46, align 4, !tbaa !9
  %48 = icmp eq i32 %47, 0
  br i1 %48, label %49, label %50

49:                                               ; preds = %44
  store i32 1, ptr %3, align 4
  br label %369

50:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #4
  store i64 0, ptr %4, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #4
  store i64 0, ptr %5, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  store i32 0, ptr %6, align 4, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  store i32 0, ptr %7, align 4, !tbaa !17
  br label %51

51:                                               ; preds = %128, %50
  %52 = load i32, ptr %7, align 4, !tbaa !17
  %53 = load ptr, ptr %1, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.ImDrawData, ptr %53, i32 0, i32 1
  %55 = load i32, ptr %54, align 4, !tbaa !9
  %56 = icmp slt i32 %52, %55
  br i1 %56, label %58, label %57

57:                                               ; preds = %51
  store i32 2, ptr %3, align 4
  br label %133

58:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  %59 = load ptr, ptr %1, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.ImDrawData, ptr %59, i32 0, i32 4
  %61 = load ptr, ptr %60, align 8, !tbaa !18
  %62 = load i32, ptr %7, align 4, !tbaa !17
  %63 = sext i32 %62 to i64
  %64 = getelementptr inbounds ptr, ptr %61, i64 %63
  %65 = load ptr, ptr %64, align 8, !tbaa !5
  store ptr %65, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  %66 = load ptr, ptr %8, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.ImDrawList, ptr %66, i32 0, i32 2
  %68 = getelementptr inbounds %struct.ImVector_ImDrawVert, ptr %67, i32 0, i32 0
  %69 = load i32, ptr %68, align 8, !tbaa !19
  %70 = sext i32 %69 to i64
  %71 = mul i64 %70, 20
  store i64 %71, ptr %9, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  %72 = load ptr, ptr %8, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct.ImDrawList, ptr %72, i32 0, i32 1
  %74 = getelementptr inbounds %struct.ImVector_ImDrawIdx, ptr %73, i32 0, i32 0
  %75 = load i32, ptr %74, align 8, !tbaa !31
  %76 = sext i32 %75 to i64
  %77 = mul i64 %76, 2
  store i64 %77, ptr %10, align 8, !tbaa !15
  %78 = load i64, ptr %4, align 8, !tbaa !15
  %79 = load i64, ptr %9, align 8, !tbaa !15
  %80 = add i64 %78, %79
  %81 = 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 !32
  %82 = icmp ugt i64 %80, %81
  br i1 %82, label %89, label %83

83:                                               ; preds = %58
  %84 = load i64, ptr %5, align 8, !tbaa !15
  %85 = load i64, ptr %10, align 8, !tbaa !15
  %86 = add i64 %84, %85
  %87 = 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 !41
  %88 = icmp ugt i64 %86, %87
  br i1 %88, label %89, label %90

89:                                               ; preds = %83, %58
  store i32 2, ptr %3, align 4
  br label %125

90:                                               ; preds = %83
  %91 = load i64, ptr %9, align 8, !tbaa !15
  %92 = icmp ugt i64 %91, 0
  br i1 %92, label %93, label %104

93:                                               ; preds = %90
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  %94 = load ptr, ptr %8, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct.ImDrawList, ptr %94, i32 0, i32 2
  %96 = getelementptr inbounds %struct.ImVector_ImDrawVert, ptr %95, i32 0, i32 2
  %97 = load ptr, ptr %96, align 8, !tbaa !42
  store ptr %97, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  %98 = load ptr, ptr getelementptr inbounds (%struct._simgui_state_t, ptr @_simgui, i32 0, i32 7), align 8, !tbaa !43
  %99 = load i64, ptr %4, align 8, !tbaa !15
  %100 = getelementptr inbounds i8, ptr %98, i64 %99
  store ptr %100, ptr %12, align 8, !tbaa !5
  %101 = load ptr, ptr %12, align 8, !tbaa !5
  %102 = load ptr, ptr %11, align 8, !tbaa !5
  %103 = load i64, ptr %9, align 8, !tbaa !15
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %101, ptr align 4 %102, i64 %103, i1 false)
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  br label %104

104:                                              ; preds = %93, %90
  %105 = load i64, ptr %10, align 8, !tbaa !15
  %106 = icmp ugt i64 %105, 0
  br i1 %106, label %107, label %118

107:                                              ; preds = %104
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  %108 = load ptr, ptr %8, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct.ImDrawList, ptr %108, i32 0, i32 1
  %110 = getelementptr inbounds %struct.ImVector_ImDrawIdx, ptr %109, i32 0, i32 2
  %111 = load ptr, ptr %110, align 8, !tbaa !44
  store ptr %111, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  %112 = load ptr, ptr getelementptr inbounds (%struct._simgui_state_t, ptr @_simgui, i32 0, i32 8), align 8, !tbaa !45
  %113 = load i64, ptr %5, align 8, !tbaa !15
  %114 = getelementptr inbounds i8, ptr %112, i64 %113
  store ptr %114, ptr %14, align 8, !tbaa !5
  %115 = load ptr, ptr %14, align 8, !tbaa !5
  %116 = load ptr, ptr %13, align 8, !tbaa !5
  %117 = load i64, ptr %10, align 8, !tbaa !15
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %115, ptr align 2 %116, i64 %117, i1 false)
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  br label %118

118:                                              ; preds = %107, %104
  %119 = load i64, ptr %9, align 8, !tbaa !15
  %120 = load i64, ptr %4, align 8, !tbaa !15
  %121 = add i64 %120, %119
  store i64 %121, ptr %4, align 8, !tbaa !15
  %122 = load i64, ptr %10, align 8, !tbaa !15
  %123 = load i64, ptr %5, align 8, !tbaa !15
  %124 = add i64 %123, %122
  store i64 %124, ptr %5, align 8, !tbaa !15
  store i32 0, ptr %3, align 4
  br label %125

125:                                              ; preds = %118, %89
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  %126 = load i32, ptr %3, align 4
  switch i32 %126, label %133 [
    i32 0, label %127
  ]

127:                                              ; preds = %125
  br label %128

128:                                              ; preds = %127
  %129 = load i32, ptr %7, align 4, !tbaa !17
  %130 = add nsw i32 %129, 1
  store i32 %130, ptr %7, align 4, !tbaa !17
  %131 = load i32, ptr %6, align 4, !tbaa !17
  %132 = add nsw i32 %131, 1
  store i32 %132, ptr %6, align 4, !tbaa !17
  br label %51, !llvm.loop !46

133:                                              ; preds = %125, %57
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  br label %134

134:                                              ; preds = %133
  %135 = load i32, ptr %6, align 4, !tbaa !17
  %136 = icmp eq i32 0, %135
  br i1 %136, label %137, label %138

137:                                              ; preds = %134
  store i32 1, ptr %3, align 4
  br label %368

138:                                              ; preds = %134
  call void @sg_push_debug_group(ptr noundef @.str.85)
  %139 = load i64, ptr %4, align 8, !tbaa !15
  %140 = icmp ugt i64 %139, 0
  br i1 %140, label %141, label %145

141:                                              ; preds = %138
  call void @llvm.lifetime.start.p0(i64 16, ptr %15) #4
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %15, ptr align 8 getelementptr inbounds (%struct._simgui_state_t, ptr @_simgui, i32 0, i32 7), i64 16, i1 false), !tbaa.struct !48
  %142 = load i64, ptr %4, align 8, !tbaa !15
  %143 = getelementptr inbounds %struct.sg_range, ptr %15, i32 0, i32 1
  store i64 %142, ptr %143, align 8, !tbaa !49
  %144 = load i32, ptr getelementptr inbounds (%struct._simgui_state_t, ptr @_simgui, i32 0, i32 2), align 4
  call void @sg_update_buffer(i32 %144, ptr noundef %15)
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #4
  br label %145

145:                                              ; preds = %141, %138
  %146 = load i64, ptr %5, align 8, !tbaa !15
  %147 = icmp ugt i64 %146, 0
  br i1 %147, label %148, label %152

148:                                              ; preds = %145
  call void @llvm.lifetime.start.p0(i64 16, ptr %16) #4
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %16, ptr align 8 getelementptr inbounds (%struct._simgui_state_t, ptr @_simgui, i32 0, i32 8), i64 16, i1 false), !tbaa.struct !48
  %149 = load i64, ptr %5, align 8, !tbaa !15
  %150 = getelementptr inbounds %struct.sg_range, ptr %16, i32 0, i32 1
  store i64 %149, ptr %150, align 8, !tbaa !49
  %151 = load i32, ptr getelementptr inbounds (%struct._simgui_state_t, ptr @_simgui, i32 0, i32 3), align 8
  call void @sg_update_buffer(i32 %151, ptr noundef %16)
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #4
  br label %152

152:                                              ; preds = %148, %145
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #4
  %153 = load float, ptr getelementptr inbounds (%struct._simgui_state_t, ptr @_simgui, i32 0, i32 1), align 8, !tbaa !50
  store float %153, ptr %17, align 4, !tbaa !51
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #4
  %154 = load ptr, ptr %2, align 8, !tbaa !5
  %155 = getelementptr inbounds %struct.ImGuiIO, ptr %154, i32 0, i32 2
  %156 = getelementptr inbounds %struct.ImVec2, ptr %155, i32 0, i32 0
  %157 = load float, ptr %156, align 8, !tbaa !52
  %158 = load float, ptr %17, align 4, !tbaa !51
  %159 = fmul float %157, %158
  %160 = fptosi float %159 to i32
  store i32 %160, ptr %18, align 4, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #4
  %161 = load ptr, ptr %2, align 8, !tbaa !5
  %162 = getelementptr inbounds %struct.ImGuiIO, ptr %161, i32 0, i32 2
  %163 = getelementptr inbounds %struct.ImVec2, ptr %162, i32 0, i32 1
  %164 = load float, ptr %163, align 4, !tbaa !56
  %165 = load float, ptr %17, align 4, !tbaa !51
  %166 = fmul float %164, %165
  %167 = fptosi float %166 to i32
  store i32 %167, ptr %19, align 4, !tbaa !17
  %168 = load i32, ptr %18, align 4, !tbaa !17
  %169 = load i32, ptr %19, align 4, !tbaa !17
  call void @sg_apply_viewport(i32 noundef 0, i32 noundef 0, i32 noundef %168, i32 noundef %169, i1 noundef zeroext true)
  %170 = load i32, ptr %18, align 4, !tbaa !17
  %171 = load i32, ptr %19, align 4, !tbaa !17
  call void @sg_apply_scissor_rect(i32 noundef 0, i32 noundef 0, i32 noundef %170, i32 noundef %171, i1 noundef zeroext true)
  %172 = load i32, ptr getelementptr inbounds (%struct._simgui_state_t, ptr @_simgui, i32 0, i32 6), align 4
  call void @sg_apply_pipeline(i32 %172)
  call void @llvm.lifetime.start.p0(i64 16, ptr %20) #4
  call void @_simgui_clear(ptr noundef %20, i64 noundef 16)
  %173 = load ptr, ptr %2, align 8, !tbaa !5
  %174 = getelementptr inbounds %struct.ImGuiIO, ptr %173, i32 0, i32 2
  %175 = getelementptr inbounds %struct.ImVec2, ptr %174, i32 0, i32 0
  %176 = load float, ptr %175, align 8, !tbaa !52
  %177 = getelementptr inbounds %struct._simgui_vs_params_t, ptr %20, i32 0, i32 0
  %178 = getelementptr inbounds %struct.ImVec2, ptr %177, i32 0, i32 0
  store float %176, ptr %178, align 4, !tbaa !57
  %179 = load ptr, ptr %2, align 8, !tbaa !5
  %180 = getelementptr inbounds %struct.ImGuiIO, ptr %179, i32 0, i32 2
  %181 = getelementptr inbounds %struct.ImVec2, ptr %180, i32 0, i32 1
  %182 = load float, ptr %181, align 4, !tbaa !56
  %183 = getelementptr inbounds %struct._simgui_vs_params_t, ptr %20, i32 0, i32 0
  %184 = getelementptr inbounds %struct.ImVec2, ptr %183, i32 0, i32 1
  store float %182, ptr %184, align 4, !tbaa !59
  %185 = getelementptr inbounds %struct.sg_range, ptr %21, i32 0, i32 0
  store ptr %20, ptr %185, align 8, !tbaa !60
  %186 = getelementptr inbounds %struct.sg_range, ptr %21, i32 0, i32 1
  store i64 16, ptr %186, align 8, !tbaa !49
  call void @sg_apply_uniforms(i32 noundef 0, i32 noundef 0, ptr noundef %21)
  call void @llvm.lifetime.start.p0(i64 176, ptr %22) #4
  call void @_simgui_clear(ptr noundef %22, i64 noundef 176)
  %187 = getelementptr inbounds %struct.sg_bindings, ptr %22, i32 0, i32 1
  %188 = getelementptr inbounds [8 x %struct.sg_buffer], ptr %187, i64 0, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %188, ptr align 4 getelementptr inbounds (%struct._simgui_state_t, ptr @_simgui, i32 0, i32 2), i64 4, i1 false), !tbaa.struct !61
  %189 = getelementptr inbounds %struct.sg_bindings, ptr %22, i32 0, i32 3
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %189, ptr align 8 getelementptr inbounds (%struct._simgui_state_t, ptr @_simgui, i32 0, i32 3), i64 4, i1 false), !tbaa.struct !61
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #4
  %190 = load ptr, ptr %2, align 8, !tbaa !5
  %191 = getelementptr inbounds %struct.ImGuiIO, ptr %190, i32 0, i32 15
  %192 = load ptr, ptr %191, align 8, !tbaa !62
  %193 = getelementptr inbounds %struct.ImFontAtlas, ptr %192, i32 0, i32 1
  %194 = load ptr, ptr %193, align 8, !tbaa !63
  store ptr %194, ptr %23, align 8, !tbaa !5
  %195 = load ptr, ptr %23, align 8, !tbaa !5
  %196 = ptrtoint ptr %195 to i64
  %197 = trunc i64 %196 to i32
  %198 = getelementptr inbounds %struct.sg_bindings, ptr %22, i32 0, i32 6
  %199 = getelementptr inbounds [12 x %struct.sg_image], ptr %198, i64 0, i64 0
  %200 = getelementptr inbounds %struct.sg_image, ptr %199, i32 0, i32 0
  store i32 %197, ptr %200, align 4, !tbaa !68
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #4
  store i32 0, ptr %24, align 4, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #4
  store i32 0, ptr %25, align 4, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #4
  store i32 0, ptr %26, align 4, !tbaa !17
  br label %201

201:                                              ; preds = %360, %152
  %202 = load i32, ptr %26, align 4, !tbaa !17
  %203 = load i32, ptr %6, align 4, !tbaa !17
  %204 = icmp slt i32 %202, %203
  br i1 %204, label %206, label %205

205:                                              ; preds = %201
  store i32 5, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #4
  br label %363

206:                                              ; preds = %201
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #4
  %207 = load ptr, ptr %1, align 8, !tbaa !5
  %208 = getelementptr inbounds %struct.ImDrawData, ptr %207, i32 0, i32 4
  %209 = load ptr, ptr %208, align 8, !tbaa !18
  %210 = load i32, ptr %26, align 4, !tbaa !17
  %211 = sext i32 %210 to i64
  %212 = getelementptr inbounds ptr, ptr %209, i64 %211
  %213 = load ptr, ptr %212, align 8, !tbaa !5
  store ptr %213, ptr %27, align 8, !tbaa !5
  %214 = load i32, ptr %24, align 4, !tbaa !17
  %215 = getelementptr inbounds %struct.sg_bindings, ptr %22, i32 0, i32 2
  %216 = getelementptr inbounds [8 x i32], ptr %215, i64 0, i64 0
  store i32 %214, ptr %216, align 4, !tbaa !17
  %217 = load i32, ptr %25, align 4, !tbaa !17
  %218 = getelementptr inbounds %struct.sg_bindings, ptr %22, i32 0, i32 4
  store i32 %217, ptr %218, align 4, !tbaa !69
  call void @sg_apply_bindings(ptr noundef %22)
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #4
  %219 = load ptr, ptr %27, align 8, !tbaa !5
  %220 = getelementptr inbounds %struct.ImDrawList, ptr %219, i32 0, i32 0
  %221 = getelementptr inbounds %struct.ImVector_ImDrawCmd, ptr %220, i32 0, i32 0
  %222 = load i32, ptr %221, align 8, !tbaa !71
  store i32 %222, ptr %28, align 4, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #4
  store i32 0, ptr %29, align 4, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #4
  store i32 0, ptr %30, align 4, !tbaa !17
  br label %223

223:                                              ; preds = %336, %206
  %224 = load i32, ptr %30, align 4, !tbaa !17
  %225 = load i32, ptr %28, align 4, !tbaa !17
  %226 = icmp slt i32 %224, %225
  br i1 %226, label %228, label %227

227:                                              ; preds = %223
  store i32 8, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #4
  br label %339

228:                                              ; preds = %223
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #4
  %229 = load ptr, ptr %27, align 8, !tbaa !5
  %230 = getelementptr inbounds %struct.ImDrawList, ptr %229, i32 0, i32 0
  %231 = getelementptr inbounds %struct.ImVector_ImDrawCmd, ptr %230, i32 0, i32 2
  %232 = load ptr, ptr %231, align 8, !tbaa !72
  %233 = load i32, ptr %30, align 4, !tbaa !17
  %234 = sext i32 %233 to i64
  %235 = getelementptr inbounds %struct.ImDrawCmd, ptr %232, i64 %234
  store ptr %235, ptr %31, align 8, !tbaa !5
  %236 = load ptr, ptr %31, align 8, !tbaa !5
  %237 = getelementptr inbounds %struct.ImDrawCmd, ptr %236, i32 0, i32 5
  %238 = load ptr, ptr %237, align 8, !tbaa !73
  %239 = icmp ne ptr %238, null
  br i1 %239, label %240, label %251

240:                                              ; preds = %228
  %241 = load ptr, ptr %31, align 8, !tbaa !5
  %242 = getelementptr inbounds %struct.ImDrawCmd, ptr %241, i32 0, i32 5
  %243 = load ptr, ptr %242, align 8, !tbaa !73
  %244 = load ptr, ptr %27, align 8, !tbaa !5
  %245 = load ptr, ptr %31, align 8, !tbaa !5
  call void %243(ptr noundef %244, ptr noundef %245)
  %246 = load i32, ptr %18, align 4, !tbaa !17
  %247 = load i32, ptr %19, align 4, !tbaa !17
  call void @sg_apply_viewport(i32 noundef 0, i32 noundef 0, i32 noundef %246, i32 noundef %247, i1 noundef zeroext true)
  %248 = load i32, ptr getelementptr inbounds (%struct._simgui_state_t, ptr @_simgui, i32 0, i32 6), align 4
  call void @sg_apply_pipeline(i32 %248)
  %249 = getelementptr inbounds %struct.sg_range, ptr %32, i32 0, i32 0
  store ptr %20, ptr %249, align 8, !tbaa !60
  %250 = getelementptr inbounds %struct.sg_range, ptr %32, i32 0, i32 1
  store i64 16, ptr %250, align 8, !tbaa !49
  call void @sg_apply_uniforms(i32 noundef 0, i32 noundef 0, ptr noundef %32)
  call void @sg_apply_bindings(ptr noundef %22)
  br label %335

251:                                              ; preds = %228
  %252 = load ptr, ptr %23, align 8, !tbaa !5
  %253 = load ptr, ptr %31, align 8, !tbaa !5
  %254 = getelementptr inbounds %struct.ImDrawCmd, ptr %253, i32 0, i32 1
  %255 = load ptr, ptr %254, align 8, !tbaa !75
  %256 = icmp ne ptr %252, %255
  br i1 %256, label %263, label %257

257:                                              ; preds = %251
  %258 = load i32, ptr %29, align 4, !tbaa !17
  %259 = load ptr, ptr %31, align 8, !tbaa !5
  %260 = getelementptr inbounds %struct.ImDrawCmd, ptr %259, i32 0, i32 2
  %261 = load i32, ptr %260, align 8, !tbaa !76
  %262 = icmp ne i32 %258, %261
  br i1 %262, label %263, label %286

263:                                              ; preds = %257, %251
  %264 = load ptr, ptr %31, align 8, !tbaa !5
  %265 = getelementptr inbounds %struct.ImDrawCmd, ptr %264, i32 0, i32 1
  %266 = load ptr, ptr %265, align 8, !tbaa !75
  store ptr %266, ptr %23, align 8, !tbaa !5
  %267 = load ptr, ptr %31, align 8, !tbaa !5
  %268 = getelementptr inbounds %struct.ImDrawCmd, ptr %267, i32 0, i32 2
  %269 = load i32, ptr %268, align 8, !tbaa !76
  store i32 %269, ptr %29, align 4, !tbaa !17
  %270 = load ptr, ptr %23, align 8, !tbaa !5
  %271 = ptrtoint ptr %270 to i64
  %272 = trunc i64 %271 to i32
  %273 = getelementptr inbounds %struct.sg_bindings, ptr %22, i32 0, i32 6
  %274 = getelementptr inbounds [12 x %struct.sg_image], ptr %273, i64 0, i64 0
  %275 = getelementptr inbounds %struct.sg_image, ptr %274, i32 0, i32 0
  store i32 %272, ptr %275, align 4, !tbaa !68
  %276 = load i32, ptr %24, align 4, !tbaa !17
  %277 = load ptr, ptr %31, align 8, !tbaa !5
  %278 = getelementptr inbounds %struct.ImDrawCmd, ptr %277, i32 0, i32 2
  %279 = load i32, ptr %278, align 8, !tbaa !76
  %280 = zext i32 %279 to i64
  %281 = mul i64 %280, 20
  %282 = trunc i64 %281 to i32
  %283 = add nsw i32 %276, %282
  %284 = getelementptr inbounds %struct.sg_bindings, ptr %22, i32 0, i32 2
  %285 = getelementptr inbounds [8 x i32], ptr %284, i64 0, i64 0
  store i32 %283, ptr %285, align 4, !tbaa !17
  call void @sg_apply_bindings(ptr noundef %22)
  br label %286

286:                                              ; preds = %263, %257
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #4
  %287 = load ptr, ptr %31, align 8, !tbaa !5
  %288 = getelementptr inbounds %struct.ImDrawCmd, ptr %287, i32 0, i32 0
  %289 = getelementptr inbounds %struct.ImVec4, ptr %288, i32 0, i32 0
  %290 = load float, ptr %289, align 8, !tbaa !77
  %291 = load float, ptr %17, align 4, !tbaa !51
  %292 = fmul float %290, %291
  %293 = fptosi float %292 to i32
  store i32 %293, ptr %33, align 4, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 4, ptr %34) #4
  %294 = load ptr, ptr %31, align 8, !tbaa !5
  %295 = getelementptr inbounds %struct.ImDrawCmd, ptr %294, i32 0, i32 0
  %296 = getelementptr inbounds %struct.ImVec4, ptr %295, i32 0, i32 1
  %297 = load float, ptr %296, align 4, !tbaa !78
  %298 = load float, ptr %17, align 4, !tbaa !51
  %299 = fmul float %297, %298
  %300 = fptosi float %299 to i32
  store i32 %300, ptr %34, align 4, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 4, ptr %35) #4
  %301 = load ptr, ptr %31, align 8, !tbaa !5
  %302 = getelementptr inbounds %struct.ImDrawCmd, ptr %301, i32 0, i32 0
  %303 = getelementptr inbounds %struct.ImVec4, ptr %302, i32 0, i32 2
  %304 = load float, ptr %303, align 8, !tbaa !79
  %305 = load ptr, ptr %31, align 8, !tbaa !5
  %306 = getelementptr inbounds %struct.ImDrawCmd, ptr %305, i32 0, i32 0
  %307 = getelementptr inbounds %struct.ImVec4, ptr %306, i32 0, i32 0
  %308 = load float, ptr %307, align 8, !tbaa !77
  %309 = fsub float %304, %308
  %310 = load float, ptr %17, align 4, !tbaa !51
  %311 = fmul float %309, %310
  %312 = fptosi float %311 to i32
  store i32 %312, ptr %35, align 4, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 4, ptr %36) #4
  %313 = load ptr, ptr %31, align 8, !tbaa !5
  %314 = getelementptr inbounds %struct.ImDrawCmd, ptr %313, i32 0, i32 0
  %315 = getelementptr inbounds %struct.ImVec4, ptr %314, i32 0, i32 3
  %316 = load float, ptr %315, align 4, !tbaa !80
  %317 = load ptr, ptr %31, align 8, !tbaa !5
  %318 = getelementptr inbounds %struct.ImDrawCmd, ptr %317, i32 0, i32 0
  %319 = getelementptr inbounds %struct.ImVec4, ptr %318, i32 0, i32 1
  %320 = load float, ptr %319, align 4, !tbaa !78
  %321 = fsub float %316, %320
  %322 = load float, ptr %17, align 4, !tbaa !51
  %323 = fmul float %321, %322
  %324 = fptosi float %323 to i32
  store i32 %324, ptr %36, align 4, !tbaa !17
  %325 = load i32, ptr %33, align 4, !tbaa !17
  %326 = load i32, ptr %34, align 4, !tbaa !17
  %327 = load i32, ptr %35, align 4, !tbaa !17
  %328 = load i32, ptr %36, align 4, !tbaa !17
  call void @sg_apply_scissor_rect(i32 noundef %325, i32 noundef %326, i32 noundef %327, i32 noundef %328, i1 noundef zeroext true)
  %329 = load ptr, ptr %31, align 8, !tbaa !5
  %330 = getelementptr inbounds %struct.ImDrawCmd, ptr %329, i32 0, i32 3
  %331 = load i32, ptr %330, align 4, !tbaa !81
  %332 = load ptr, ptr %31, align 8, !tbaa !5
  %333 = getelementptr inbounds %struct.ImDrawCmd, ptr %332, i32 0, i32 4
  %334 = load i32, ptr %333, align 8, !tbaa !82
  call void @sg_draw(i32 noundef %331, i32 noundef %334, i32 noundef 1)
  call void @llvm.lifetime.end.p0(i64 4, ptr %36) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #4
  br label %335

335:                                              ; preds = %286, %240
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #4
  br label %336

336:                                              ; preds = %335
  %337 = load i32, ptr %30, align 4, !tbaa !17
  %338 = add nsw i32 %337, 1
  store i32 %338, ptr %30, align 4, !tbaa !17
  br label %223, !llvm.loop !83

339:                                              ; preds = %227
  call void @llvm.lifetime.start.p0(i64 8, ptr %37) #4
  %340 = load ptr, ptr %27, align 8, !tbaa !5
  %341 = getelementptr inbounds %struct.ImDrawList, ptr %340, i32 0, i32 2
  %342 = getelementptr inbounds %struct.ImVector_ImDrawVert, ptr %341, i32 0, i32 0
  %343 = load i32, ptr %342, align 8, !tbaa !19
  %344 = sext i32 %343 to i64
  %345 = mul i64 %344, 20
  store i64 %345, ptr %37, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %38) #4
  %346 = load ptr, ptr %27, align 8, !tbaa !5
  %347 = getelementptr inbounds %struct.ImDrawList, ptr %346, i32 0, i32 1
  %348 = getelementptr inbounds %struct.ImVector_ImDrawIdx, ptr %347, i32 0, i32 0
  %349 = load i32, ptr %348, align 8, !tbaa !31
  %350 = sext i32 %349 to i64
  %351 = mul i64 %350, 2
  store i64 %351, ptr %38, align 8, !tbaa !15
  %352 = load i64, ptr %37, align 8, !tbaa !15
  %353 = trunc i64 %352 to i32
  %354 = load i32, ptr %24, align 4, !tbaa !17
  %355 = add nsw i32 %354, %353
  store i32 %355, ptr %24, align 4, !tbaa !17
  %356 = load i64, ptr %38, align 8, !tbaa !15
  %357 = trunc i64 %356 to i32
  %358 = load i32, ptr %25, align 4, !tbaa !17
  %359 = add nsw i32 %358, %357
  store i32 %359, ptr %25, align 4, !tbaa !17
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #4
  br label %360

360:                                              ; preds = %339
  %361 = load i32, ptr %26, align 4, !tbaa !17
  %362 = add nsw i32 %361, 1
  store i32 %362, ptr %26, align 4, !tbaa !17
  br label %201, !llvm.loop !84

363:                                              ; preds = %205
  %364 = load i32, ptr %18, align 4, !tbaa !17
  %365 = load i32, ptr %19, align 4, !tbaa !17
  call void @sg_apply_viewport(i32 noundef 0, i32 noundef 0, i32 noundef %364, i32 noundef %365, i1 noundef zeroext true)
  %366 = load i32, ptr %18, align 4, !tbaa !17
  %367 = load i32, ptr %19, align 4, !tbaa !17
  call void @sg_apply_scissor_rect(i32 noundef 0, i32 noundef 0, i32 noundef %366, i32 noundef %367, i1 noundef zeroext true)
  call void @sg_pop_debug_group()
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #4
  call void @llvm.lifetime.end.p0(i64 176, ptr %22) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %20) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #4
  store i32 0, ptr %3, align 4
  br label %368

368:                                              ; preds = %363, %137
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #4
  br label %369

369:                                              ; preds = %368, %49, %43
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %1) #4
  %370 = load i32, ptr %3, align 4
  switch i32 %370, label %372 [
    i32 0, label %371
    i32 1, label %371
  ]

371:                                              ; preds = %369, %369
  ret void

372:                                              ; preds = %369
  unreachable
}

declare void @igRender() #3

declare ptr @igGetDrawData() #3

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = { 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, !12, i64 4}
!10 = !{!"ImDrawData", !11, i64 0, !12, i64 4, !12, i64 8, !12, i64 12, !6, i64 16, !13, i64 24, !13, i64 32, !13, i64 40}
!11 = !{!"_Bool", !7, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!"ImVec2", !14, i64 0, !14, i64 4}
!14 = !{!"float", !7, i64 0}
!15 = !{!16, !16, i64 0}
!16 = !{!"long", !7, i64 0}
!17 = !{!12, !12, i64 0}
!18 = !{!10, !6, i64 16}
!19 = !{!20, !12, i64 32}
!20 = !{!"ImDrawList", !21, i64 0, !22, i64 16, !23, i64 32, !12, i64 48, !12, i64 52, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !24, i64 88, !25, i64 104, !26, i64 120, !27, i64 136, !29, i64 168, !14, i64 192}
!21 = !{!"ImVector_ImDrawCmd", !12, i64 0, !12, i64 4, !6, i64 8}
!22 = !{!"ImVector_ImDrawIdx", !12, i64 0, !12, i64 4, !6, i64 8}
!23 = !{!"ImVector_ImDrawVert", !12, i64 0, !12, i64 4, !6, i64 8}
!24 = !{!"ImVector_ImVec4", !12, i64 0, !12, i64 4, !6, i64 8}
!25 = !{!"ImVector_ImTextureID", !12, i64 0, !12, i64 4, !6, i64 8}
!26 = !{!"ImVector_ImVec2", !12, i64 0, !12, i64 4, !6, i64 8}
!27 = !{!"ImDrawCmdHeader", !28, i64 0, !6, i64 16, !12, i64 24}
!28 = !{!"ImVec4", !14, i64 0, !14, i64 4, !14, i64 8, !14, i64 12}
!29 = !{!"ImDrawListSplitter", !12, i64 0, !12, i64 4, !30, i64 8}
!30 = !{!"ImVector_ImDrawChannel", !12, i64 0, !12, i64 4, !6, i64 8}
!31 = !{!20, !12, i64 16}
!32 = !{!33, !16, i64 88}
!33 = !{!"", !34, i64 0, !14, i64 56, !36, i64 60, !36, i64 64, !37, i64 68, !38, i64 72, !39, i64 76, !40, i64 80, !40, i64 96, !11, i64 112}
!34 = !{!"simgui_desc_t", !12, i64 0, !12, i64 4, !12, i64 8, !12, i64 12, !6, i64 16, !11, i64 24, !11, i64 25, !11, i64 26, !11, i64 27, !11, i64 28, !35, i64 32}
!35 = !{!"simgui_allocator_t", !6, i64 0, !6, i64 8, !6, i64 16}
!36 = !{!"sg_buffer", !12, i64 0}
!37 = !{!"sg_image", !12, i64 0}
!38 = !{!"sg_shader", !12, i64 0}
!39 = !{!"sg_pipeline", !12, i64 0}
!40 = !{!"sg_range", !6, i64 0, !16, i64 8}
!41 = !{!33, !16, i64 104}
!42 = !{!20, !6, i64 40}
!43 = !{!33, !6, i64 80}
!44 = !{!20, !6, i64 24}
!45 = !{!33, !6, i64 96}
!46 = distinct !{!46, !47}
!47 = !{!"llvm.loop.mustprogress"}
!48 = !{i64 0, i64 8, !5, i64 8, i64 8, !15}
!49 = !{!40, !16, i64 8}
!50 = !{!33, !14, i64 56}
!51 = !{!14, !14, i64 0}
!52 = !{!53, !14, i64 8}
!53 = !{!"ImGuiIO", !12, i64 0, !12, i64 4, !13, i64 8, !14, i64 16, !14, i64 20, !6, i64 24, !6, i64 32, !14, i64 40, !14, i64 44, !14, i64 48, !14, i64 52, !14, i64 56, !14, i64 60, !14, i64 64, !6, i64 72, !6, i64 80, !14, i64 88, !11, i64 92, !6, i64 96, !13, i64 104, !11, i64 112, !11, i64 113, !11, i64 114, !11, i64 115, !11, i64 116, !11, i64 117, !11, i64 118, !11, i64 119, !14, 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, !11, i64 208, !11, i64 209, !11, i64 210, !11, i64 211, !11, i64 212, !11, i64 213, !11, i64 214, !14, i64 216, !12, i64 220, !12, i64 224, !12, i64 228, !12, i64 232, !12, i64 236, !13, i64 240, !7, i64 248, !7, i64 2856, !7, i64 3508, !13, i64 3572, !7, i64 3580, !14, i64 3588, !14, i64 3592, !11, i64 3596, !11, i64 3597, !11, i64 3598, !11, i64 3599, !12, i64 3600, !7, i64 3604, !11, i64 14036, !13, 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, !14, i64 14236, !11, i64 14240, !11, i64 14241, !7, i64 14242, !11, i64 14243, !54, i64 14244, !55, i64 14248}
!54 = !{!"short", !7, i64 0}
!55 = !{!"ImVector_ImWchar", !12, i64 0, !12, i64 4, !6, i64 8}
!56 = !{!53, !14, i64 12}
!57 = !{!58, !14, i64 0}
!58 = !{!"", !13, i64 0, !7, i64 8}
!59 = !{!58, !14, i64 4}
!60 = !{!40, !6, i64 0}
!61 = !{i64 0, i64 4, !17}
!62 = !{!53, !6, i64 80}
!63 = !{!64, !6, i64 8}
!64 = !{!"ImFontAtlas", !12, i64 0, !6, i64 8, !12, i64 16, !12, i64 20, !11, i64 24, !6, i64 32, !11, i64 40, !11, i64 41, !6, i64 48, !6, i64 56, !12, i64 64, !12, i64 68, !13, i64 72, !13, i64 80, !65, i64 88, !66, i64 104, !67, i64 120, !7, i64 136, !6, i64 1160, !12, i64 1168, !12, i64 1172, !12, i64 1176}
!65 = !{!"ImVector_ImFontPtr", !12, i64 0, !12, i64 4, !6, i64 8}
!66 = !{!"ImVector_ImFontAtlasCustomRect", !12, i64 0, !12, i64 4, !6, i64 8}
!67 = !{!"ImVector_ImFontConfig", !12, i64 0, !12, i64 4, !6, i64 8}
!68 = !{!37, !12, i64 0}
!69 = !{!70, !12, i64 72}
!70 = !{!"sg_bindings", !12, i64 0, !7, i64 4, !7, i64 36, !36, i64 68, !12, i64 72, !7, i64 76, !7, i64 124, !12, i64 172}
!71 = !{!20, !12, i64 0}
!72 = !{!20, !6, i64 8}
!73 = !{!74, !6, i64 40}
!74 = !{!"ImDrawCmd", !28, i64 0, !6, i64 16, !12, i64 24, !12, i64 28, !12, i64 32, !6, i64 40, !6, i64 48}
!75 = !{!74, !6, i64 16}
!76 = !{!74, !12, i64 24}
!77 = !{!74, !14, i64 0}
!78 = !{!74, !14, i64 4}
!79 = !{!74, !14, i64 8}
!80 = !{!74, !14, i64 12}
!81 = !{!74, !12, i64 28}
!82 = !{!74, !12, i64 32}
!83 = distinct !{!83, !47}
!84 = distinct !{!84, !47}


; 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._simgui_vs_params_t = type { %struct.ImVec2, [8 x i8] }
%struct.ImVec2 = type { float, float }
%struct.sg_bindings = type { i32, [8 x %struct.sg_buffer], [8 x i32], %struct.sg_buffer, i32, [12 x %struct.sg_image], [12 x %struct.sg_image], i32 }
%struct.ImDrawCmd = type { %struct.ImVec4, ptr, i32, i32, i32, ptr, ptr }
%struct.ImVec4 = type { float, float, float, float }

@_simgui = external hidden local_unnamed_addr global %struct._simgui_state_t, align 8
@.str.85 = external hidden unnamed_addr constant [12 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: nounwind uwtable
declare dso_local void @sg_apply_viewport(i32 noundef, i32 noundef, i32 noundef, i32 noundef, i1 noundef zeroext) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare dso_local void @sg_apply_scissor_rect(i32 noundef, i32 noundef, i32 noundef, i32 noundef, i1 noundef zeroext) local_unnamed_addr #2

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

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

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

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

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

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

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

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

declare ptr @igGetIO() local_unnamed_addr #3

; Function Attrs: nounwind uwtable
define dso_local void @simgui_render() local_unnamed_addr #2 {
  %1 = alloca %struct.sg_range, align 8
  %2 = alloca %struct.sg_range, align 8
  %3 = alloca %struct._simgui_vs_params_t, align 8
  %4 = alloca %struct.sg_range, align 8
  %5 = alloca %struct.sg_bindings, align 4
  %6 = alloca %struct.sg_range, align 8
  tail call void @igRender() #4
  %7 = tail call ptr @igGetDrawData() #4
  %8 = tail call ptr @igGetIO() #4
  %9 = icmp eq ptr %7, null
  br i1 %9, label %._crit_edge.thread, label %10

10:                                               ; preds = %0
  %11 = getelementptr inbounds i8, ptr %7, i64 4
  %12 = load i32, ptr %11, align 4, !tbaa !5
  %13 = icmp eq i32 %12, 0
  br i1 %13, label %._crit_edge.thread, label %.preheader

.preheader:                                       ; preds = %10
  %14 = getelementptr inbounds i8, ptr %7, i64 16
  %15 = icmp sgt i32 %12, 0
  br i1 %15, label %.lr.ph, label %._crit_edge.thread

.lr.ph:                                           ; preds = %.preheader, %46
  %indvars.iv = phi i64 [ %indvars.iv.next, %46 ], [ 0, %.preheader ]
  %.0101137 = phi i64 [ %27, %46 ], [ 0, %.preheader ]
  %.0102136 = phi i64 [ %31, %46 ], [ 0, %.preheader ]
  %16 = load ptr, ptr %14, align 8, !tbaa !14
  %17 = getelementptr inbounds ptr, ptr %16, i64 %indvars.iv
  %18 = load ptr, ptr %17, align 8, !tbaa !15
  %19 = getelementptr inbounds i8, ptr %18, i64 32
  %20 = load i32, ptr %19, align 8, !tbaa !16
  %21 = sext i32 %20 to i64
  %22 = mul nsw i64 %21, 20
  %23 = getelementptr inbounds i8, ptr %18, i64 16
  %24 = load i32, ptr %23, align 8, !tbaa !28
  %25 = sext i32 %24 to i64
  %26 = shl nsw i64 %25, 1
  %27 = add i64 %22, %.0101137
  %28 = load i64, ptr getelementptr inbounds (i8, ptr @_simgui, i64 88), align 8, !tbaa !29
  %29 = icmp ugt i64 %27, %28
  br i1 %29, label %._crit_edge, label %30

30:                                               ; preds = %.lr.ph
  %31 = add i64 %26, %.0102136
  %32 = load i64, ptr getelementptr inbounds (i8, ptr @_simgui, i64 104), align 8, !tbaa !39
  %33 = icmp ugt i64 %31, %32
  br i1 %33, label %._crit_edge, label %34

34:                                               ; preds = %30
  %.not = icmp eq i32 %20, 0
  br i1 %.not, label %40, label %35

35:                                               ; preds = %34
  %36 = getelementptr inbounds i8, ptr %18, i64 40
  %37 = load ptr, ptr %36, align 8, !tbaa !40
  %38 = load ptr, ptr getelementptr inbounds (i8, ptr @_simgui, i64 80), align 8, !tbaa !41
  %39 = getelementptr inbounds i8, ptr %38, i64 %.0101137
  tail call void @llvm.memcpy.p0.p0.i64(ptr align 1 %39, ptr align 4 %37, i64 %22, i1 false)
  br label %40

40:                                               ; preds = %35, %34
  %.not123 = icmp eq i32 %24, 0
  br i1 %.not123, label %46, label %41

41:                                               ; preds = %40
  %42 = getelementptr inbounds i8, ptr %18, i64 24
  %43 = load ptr, ptr %42, align 8, !tbaa !42
  %44 = load ptr, ptr getelementptr inbounds (i8, ptr @_simgui, i64 96), align 8, !tbaa !43
  %45 = getelementptr inbounds i8, ptr %44, i64 %.0102136
  tail call void @llvm.memcpy.p0.p0.i64(ptr align 1 %45, ptr align 2 %43, i64 %26, i1 false)
  br label %46

46:                                               ; preds = %41, %40
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %47 = load i32, ptr %11, align 4, !tbaa !5
  %48 = sext i32 %47 to i64
  %49 = icmp slt i64 %indvars.iv.next, %48
  br i1 %49, label %.lr.ph, label %._crit_edge, !llvm.loop !44

._crit_edge:                                      ; preds = %46, %.lr.ph, %30
  %.0105.lcssa.ph.in = phi i64 [ %indvars.iv.next, %46 ], [ %indvars.iv, %.lr.ph ], [ %indvars.iv, %30 ]
  %.0102.lcssa.ph = phi i64 [ %31, %46 ], [ %.0102136, %.lr.ph ], [ %.0102136, %30 ]
  %.0101.lcssa.ph = phi i64 [ %27, %46 ], [ %.0101137, %.lr.ph ], [ %.0101137, %30 ]
  %50 = and i64 %.0105.lcssa.ph.in, 4294967295
  %51 = icmp eq i64 %50, 0
  br i1 %51, label %._crit_edge.thread, label %52

52:                                               ; preds = %._crit_edge
  tail call void @sg_push_debug_group(ptr noundef nonnull @.str.85)
  %.not124 = icmp eq i64 %.0101.lcssa.ph, 0
  br i1 %.not124, label %57, label %53

53:                                               ; preds = %52
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %1) #4
  %54 = load i64, ptr getelementptr inbounds (i8, ptr @_simgui, i64 80), align 8, !tbaa !15
  store i64 %54, ptr %1, align 8, !tbaa !15
  %55 = getelementptr inbounds i8, ptr %1, i64 8
  store i64 %.0101.lcssa.ph, ptr %55, align 8, !tbaa !46
  %56 = load i32, ptr getelementptr inbounds (i8, ptr @_simgui, i64 60), align 4
  call void @sg_update_buffer(i32 %56, ptr noundef nonnull %1)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %1) #4
  br label %57

57:                                               ; preds = %53, %52
  %.not125 = icmp eq i64 %.0102.lcssa.ph, 0
  br i1 %.not125, label %62, label %58

58:                                               ; preds = %57
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %2) #4
  %59 = load i64, ptr getelementptr inbounds (i8, ptr @_simgui, i64 96), align 8, !tbaa !15
  store i64 %59, ptr %2, align 8, !tbaa !15
  %60 = getelementptr inbounds i8, ptr %2, i64 8
  store i64 %.0102.lcssa.ph, ptr %60, align 8, !tbaa !46
  %61 = load i32, ptr getelementptr inbounds (i8, ptr @_simgui, i64 64), align 8
  call void @sg_update_buffer(i32 %61, ptr noundef nonnull %2)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %2) #4
  br label %62

62:                                               ; preds = %58, %57
  %63 = load float, ptr getelementptr inbounds (i8, ptr @_simgui, i64 56), align 8, !tbaa !47
  %64 = getelementptr inbounds i8, ptr %8, i64 8
  %65 = load float, ptr %64, align 8, !tbaa !48
  %66 = fmul float %63, %65
  %67 = fptosi float %66 to i32
  %68 = getelementptr inbounds i8, ptr %8, i64 12
  %69 = load float, ptr %68, align 4, !tbaa !52
  %70 = fmul float %63, %69
  %71 = fptosi float %70 to i32
  call void @sg_apply_viewport(i32 noundef 0, i32 noundef 0, i32 noundef %67, i32 noundef %71, i1 noundef zeroext true)
  call void @sg_apply_scissor_rect(i32 noundef 0, i32 noundef 0, i32 noundef %67, i32 noundef %71, i1 noundef zeroext true)
  %72 = load i32, ptr getelementptr inbounds (i8, ptr @_simgui, i64 76), align 4
  call void @sg_apply_pipeline(i32 %72)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #4
  call void @_simgui_clear(ptr noundef nonnull %3, i64 noundef 16)
  %73 = load <2 x float>, ptr %64, align 8, !tbaa !53
  store <2 x float> %73, ptr %3, align 8, !tbaa !53
  store ptr %3, ptr %4, align 8, !tbaa !54
  %74 = getelementptr inbounds i8, ptr %4, i64 8
  store i64 16, ptr %74, align 8, !tbaa !46
  call void @sg_apply_uniforms(i32 noundef 0, i32 noundef 0, ptr noundef nonnull %4)
  call void @llvm.lifetime.start.p0(i64 176, ptr nonnull %5) #4
  call void @_simgui_clear(ptr noundef nonnull %5, i64 noundef 176)
  %75 = getelementptr inbounds i8, ptr %5, i64 4
  %76 = load i32, ptr getelementptr inbounds (i8, ptr @_simgui, i64 60), align 4, !tbaa !55
  store i32 %76, ptr %75, align 4, !tbaa !55
  %77 = getelementptr inbounds i8, ptr %5, i64 68
  %78 = load i32, ptr getelementptr inbounds (i8, ptr @_simgui, i64 64), align 8, !tbaa !55
  store i32 %78, ptr %77, align 4, !tbaa !55
  %79 = getelementptr inbounds i8, ptr %8, i64 80
  %80 = load ptr, ptr %79, align 8, !tbaa !56
  %81 = getelementptr inbounds i8, ptr %80, i64 8
  %82 = load ptr, ptr %81, align 8, !tbaa !57
  %83 = ptrtoint ptr %82 to i64
  %84 = trunc i64 %83 to i32
  %85 = getelementptr inbounds i8, ptr %5, i64 124
  store i32 %84, ptr %85, align 4, !tbaa !62
  %86 = getelementptr inbounds i8, ptr %5, i64 36
  %87 = getelementptr inbounds i8, ptr %5, i64 72
  %88 = getelementptr inbounds i8, ptr %6, i64 8
  %wide.trip.count170 = and i64 %.0105.lcssa.ph.in, 4294967295
  br label %90

89:                                               ; preds = %._crit_edge153
  call void @sg_apply_viewport(i32 noundef 0, i32 noundef 0, i32 noundef %67, i32 noundef %71, i1 noundef zeroext true)
  call void @sg_apply_scissor_rect(i32 noundef 0, i32 noundef 0, i32 noundef %67, i32 noundef %71, i1 noundef zeroext true)
  call void @sg_pop_debug_group()
  call void @llvm.lifetime.end.p0(i64 176, ptr nonnull %5) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #4
  br label %._crit_edge.thread

90:                                               ; preds = %62, %._crit_edge153
  %indvars.iv166 = phi i64 [ 0, %62 ], [ %indvars.iv.next167, %._crit_edge153 ]
  %.0107158 = phi ptr [ %82, %62 ], [ %.1108.lcssa, %._crit_edge153 ]
  %.0110157 = phi i32 [ 0, %62 ], [ %103, %._crit_edge153 ]
  %.0115156 = phi i32 [ 0, %62 ], [ %104, %._crit_edge153 ]
  %91 = load ptr, ptr %14, align 8, !tbaa !14
  %92 = getelementptr inbounds ptr, ptr %91, i64 %indvars.iv166
  %93 = load ptr, ptr %92, align 8, !tbaa !15
  store i32 %.0110157, ptr %86, align 4, !tbaa !55
  store i32 %.0115156, ptr %87, align 4, !tbaa !63
  call void @sg_apply_bindings(ptr noundef nonnull %5)
  %94 = load i32, ptr %93, align 8, !tbaa !65
  %95 = icmp sgt i32 %94, 0
  br i1 %95, label %.lr.ph152, label %._crit_edge153

.lr.ph152:                                        ; preds = %90
  %96 = getelementptr inbounds i8, ptr %93, i64 8
  %wide.trip.count = zext nneg i32 %94 to i64
  br label %105

._crit_edge153:                                   ; preds = %143, %90
  %.1108.lcssa = phi ptr [ %.0107158, %90 ], [ %.3, %143 ]
  %97 = getelementptr inbounds i8, ptr %93, i64 32
  %98 = load i32, ptr %97, align 8, !tbaa !16
  %99 = mul i32 %98, 20
  %100 = getelementptr inbounds i8, ptr %93, i64 16
  %101 = load i32, ptr %100, align 8, !tbaa !28
  %102 = shl i32 %101, 1
  %103 = add nsw i32 %99, %.0110157
  %104 = add nsw i32 %102, %.0115156
  %indvars.iv.next167 = add nuw nsw i64 %indvars.iv166, 1
  %exitcond171.not = icmp eq i64 %indvars.iv.next167, %wide.trip.count170
  br i1 %exitcond171.not, label %89, label %90, !llvm.loop !66

105:                                              ; preds = %.lr.ph152, %143
  %indvars.iv162 = phi i64 [ 0, %.lr.ph152 ], [ %indvars.iv.next163, %143 ]
  %.1108150 = phi ptr [ %.0107158, %.lr.ph152 ], [ %.3, %143 ]
  %.0112148 = phi i32 [ 0, %.lr.ph152 ], [ %.2114, %143 ]
  %106 = load ptr, ptr %96, align 8, !tbaa !67
  %107 = getelementptr inbounds %struct.ImDrawCmd, ptr %106, i64 %indvars.iv162
  %108 = getelementptr inbounds i8, ptr %107, i64 40
  %109 = load ptr, ptr %108, align 8, !tbaa !68
  %.not126 = icmp eq ptr %109, null
  br i1 %.not126, label %112, label %110

110:                                              ; preds = %105
  call void %109(ptr noundef nonnull %93, ptr noundef nonnull %107) #4
  call void @sg_apply_viewport(i32 noundef 0, i32 noundef 0, i32 noundef %67, i32 noundef %71, i1 noundef zeroext true)
  %111 = load i32, ptr getelementptr inbounds (i8, ptr @_simgui, i64 76), align 4
  call void @sg_apply_pipeline(i32 %111)
  store ptr %3, ptr %6, align 8, !tbaa !54
  store i64 16, ptr %88, align 8, !tbaa !46
  call void @sg_apply_uniforms(i32 noundef 0, i32 noundef 0, ptr noundef nonnull %6)
  call void @sg_apply_bindings(ptr noundef nonnull %5)
  br label %143

112:                                              ; preds = %105
  %113 = getelementptr inbounds i8, ptr %107, i64 16
  %114 = load ptr, ptr %113, align 8, !tbaa !70
  %.not127 = icmp eq ptr %.1108150, %114
  %115 = getelementptr inbounds i8, ptr %107, i64 24
  %116 = load i32, ptr %115, align 8, !tbaa !71
  %.not128 = icmp eq i32 %.0112148, %116
  %or.cond = select i1 %.not127, i1 %.not128, i1 false
  br i1 %or.cond, label %121, label %._crit_edge172

._crit_edge172:                                   ; preds = %112
  %117 = ptrtoint ptr %114 to i64
  %118 = trunc i64 %117 to i32
  store i32 %118, ptr %85, align 4, !tbaa !62
  %119 = mul i32 %116, 20
  %120 = add nsw i32 %119, %.0110157
  store i32 %120, ptr %86, align 4, !tbaa !55
  call void @sg_apply_bindings(ptr noundef nonnull %5)
  br label %121

121:                                              ; preds = %112, %._crit_edge172
  %.1113 = phi i32 [ %116, %._crit_edge172 ], [ %.0112148, %112 ]
  %.2109 = phi ptr [ %114, %._crit_edge172 ], [ %.1108150, %112 ]
  %122 = load float, ptr %107, align 8, !tbaa !72
  %123 = fmul float %63, %122
  %124 = fptosi float %123 to i32
  %125 = getelementptr inbounds i8, ptr %107, i64 4
  %126 = load float, ptr %125, align 4, !tbaa !73
  %127 = fmul float %63, %126
  %128 = fptosi float %127 to i32
  %129 = getelementptr inbounds i8, ptr %107, i64 8
  %130 = load float, ptr %129, align 8, !tbaa !74
  %131 = fsub float %130, %122
  %132 = fmul float %63, %131
  %133 = fptosi float %132 to i32
  %134 = getelementptr inbounds i8, ptr %107, i64 12
  %135 = load float, ptr %134, align 4, !tbaa !75
  %136 = fsub float %135, %126
  %137 = fmul float %63, %136
  %138 = fptosi float %137 to i32
  call void @sg_apply_scissor_rect(i32 noundef %124, i32 noundef %128, i32 noundef %133, i32 noundef %138, i1 noundef zeroext true)
  %139 = getelementptr inbounds i8, ptr %107, i64 28
  %140 = load i32, ptr %139, align 4, !tbaa !76
  %141 = getelementptr inbounds i8, ptr %107, i64 32
  %142 = load i32, ptr %141, align 8, !tbaa !77
  call void @sg_draw(i32 noundef %140, i32 noundef %142, i32 noundef 1)
  br label %143

143:                                              ; preds = %121, %110
  %.2114 = phi i32 [ %.0112148, %110 ], [ %.1113, %121 ]
  %.3 = phi ptr [ %.1108150, %110 ], [ %.2109, %121 ]
  %indvars.iv.next163 = add nuw nsw i64 %indvars.iv162, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next163, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge153, label %105, !llvm.loop !78

._crit_edge.thread:                               ; preds = %.preheader, %89, %._crit_edge, %10, %0
  ret void
}

declare void @igRender() local_unnamed_addr #3

declare ptr @igGetDrawData() local_unnamed_addr #3

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = { 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, !10, i64 4}
!6 = !{!"ImDrawData", !7, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !11, i64 16, !12, i64 24, !12, i64 32, !12, i64 40}
!7 = !{!"_Bool", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"any pointer", !8, i64 0}
!12 = !{!"ImVec2", !13, i64 0, !13, i64 4}
!13 = !{!"float", !8, i64 0}
!14 = !{!6, !11, i64 16}
!15 = !{!11, !11, i64 0}
!16 = !{!17, !10, i64 32}
!17 = !{!"ImDrawList", !18, i64 0, !19, i64 16, !20, i64 32, !10, i64 48, !10, i64 52, !11, i64 56, !11, i64 64, !11, i64 72, !11, i64 80, !21, i64 88, !22, i64 104, !23, i64 120, !24, i64 136, !26, i64 168, !13, i64 192}
!18 = !{!"ImVector_ImDrawCmd", !10, i64 0, !10, i64 4, !11, i64 8}
!19 = !{!"ImVector_ImDrawIdx", !10, i64 0, !10, i64 4, !11, i64 8}
!20 = !{!"ImVector_ImDrawVert", !10, i64 0, !10, i64 4, !11, i64 8}
!21 = !{!"ImVector_ImVec4", !10, i64 0, !10, i64 4, !11, i64 8}
!22 = !{!"ImVector_ImTextureID", !10, i64 0, !10, i64 4, !11, i64 8}
!23 = !{!"ImVector_ImVec2", !10, i64 0, !10, i64 4, !11, i64 8}
!24 = !{!"ImDrawCmdHeader", !25, i64 0, !11, i64 16, !10, i64 24}
!25 = !{!"ImVec4", !13, i64 0, !13, i64 4, !13, i64 8, !13, i64 12}
!26 = !{!"ImDrawListSplitter", !10, i64 0, !10, i64 4, !27, i64 8}
!27 = !{!"ImVector_ImDrawChannel", !10, i64 0, !10, i64 4, !11, i64 8}
!28 = !{!17, !10, i64 16}
!29 = !{!30, !38, i64 88}
!30 = !{!"", !31, i64 0, !13, i64 56, !33, i64 60, !33, i64 64, !34, i64 68, !35, i64 72, !36, i64 76, !37, i64 80, !37, i64 96, !7, i64 112}
!31 = !{!"simgui_desc_t", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !11, i64 16, !7, i64 24, !7, i64 25, !7, i64 26, !7, i64 27, !7, i64 28, !32, i64 32}
!32 = !{!"simgui_allocator_t", !11, i64 0, !11, i64 8, !11, i64 16}
!33 = !{!"sg_buffer", !10, i64 0}
!34 = !{!"sg_image", !10, i64 0}
!35 = !{!"sg_shader", !10, i64 0}
!36 = !{!"sg_pipeline", !10, i64 0}
!37 = !{!"sg_range", !11, i64 0, !38, i64 8}
!38 = !{!"long", !8, i64 0}
!39 = !{!30, !38, i64 104}
!40 = !{!17, !11, i64 40}
!41 = !{!30, !11, i64 80}
!42 = !{!17, !11, i64 24}
!43 = !{!30, !11, i64 96}
!44 = distinct !{!44, !45}
!45 = !{!"llvm.loop.mustprogress"}
!46 = !{!37, !38, i64 8}
!47 = !{!30, !13, i64 56}
!48 = !{!49, !13, i64 8}
!49 = !{!"ImGuiIO", !10, i64 0, !10, i64 4, !12, i64 8, !13, i64 16, !13, i64 20, !11, i64 24, !11, i64 32, !13, i64 40, !13, i64 44, !13, i64 48, !13, i64 52, !13, i64 56, !13, i64 60, !13, i64 64, !11, i64 72, !11, i64 80, !13, i64 88, !7, i64 92, !11, i64 96, !12, i64 104, !7, i64 112, !7, i64 113, !7, i64 114, !7, i64 115, !7, i64 116, !7, i64 117, !7, i64 118, !7, i64 119, !13, 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, !7, i64 208, !7, i64 209, !7, i64 210, !7, i64 211, !7, i64 212, !7, i64 213, !7, i64 214, !13, i64 216, !10, i64 220, !10, i64 224, !10, i64 228, !10, i64 232, !10, i64 236, !12, i64 240, !8, i64 248, !8, i64 2856, !8, i64 3508, !12, i64 3572, !8, i64 3580, !13, i64 3588, !13, i64 3592, !7, i64 3596, !7, i64 3597, !7, i64 3598, !7, i64 3599, !10, i64 3600, !8, i64 3604, !7, i64 14036, !12, 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, !13, i64 14236, !7, i64 14240, !7, i64 14241, !8, i64 14242, !7, i64 14243, !50, i64 14244, !51, i64 14248}
!50 = !{!"short", !8, i64 0}
!51 = !{!"ImVector_ImWchar", !10, i64 0, !10, i64 4, !11, i64 8}
!52 = !{!49, !13, i64 12}
!53 = !{!13, !13, i64 0}
!54 = !{!37, !11, i64 0}
!55 = !{!10, !10, i64 0}
!56 = !{!49, !11, i64 80}
!57 = !{!58, !11, i64 8}
!58 = !{!"ImFontAtlas", !10, i64 0, !11, i64 8, !10, i64 16, !10, i64 20, !7, i64 24, !11, i64 32, !7, i64 40, !7, i64 41, !11, i64 48, !11, i64 56, !10, i64 64, !10, i64 68, !12, i64 72, !12, i64 80, !59, i64 88, !60, i64 104, !61, i64 120, !8, i64 136, !11, i64 1160, !10, i64 1168, !10, i64 1172, !10, i64 1176}
!59 = !{!"ImVector_ImFontPtr", !10, i64 0, !10, i64 4, !11, i64 8}
!60 = !{!"ImVector_ImFontAtlasCustomRect", !10, i64 0, !10, i64 4, !11, i64 8}
!61 = !{!"ImVector_ImFontConfig", !10, i64 0, !10, i64 4, !11, i64 8}
!62 = !{!34, !10, i64 0}
!63 = !{!64, !10, i64 72}
!64 = !{!"sg_bindings", !10, i64 0, !8, i64 4, !8, i64 36, !33, i64 68, !10, i64 72, !8, i64 76, !8, i64 124, !10, i64 172}
!65 = !{!17, !10, i64 0}
!66 = distinct !{!66, !45}
!67 = !{!17, !11, i64 8}
!68 = !{!69, !11, i64 40}
!69 = !{!"ImDrawCmd", !25, i64 0, !11, i64 16, !10, i64 24, !10, i64 28, !10, i64 32, !11, i64 40, !11, i64 48}
!70 = !{!69, !11, i64 16}
!71 = !{!69, !10, i64 24}
!72 = !{!69, !13, i64 0}
!73 = !{!69, !13, i64 4}
!74 = !{!69, !13, i64 8}
!75 = !{!69, !13, i64 12}
!76 = !{!69, !10, i64 28}
!77 = !{!69, !10, i64 32}
!78 = distinct !{!78, !45}


; Effective O3 passes: BDCEPass,CorrelatedValuePropagationPass,DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass