; LLVM IR from ClementineAccount/Albuquerque :: src/HelloSDL (main)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.nk_font_config = type { ptr, ptr, i64, i8, i8, i8, i8, i8, [3 x i8], float, i32, %struct.nk_vec2, ptr, ptr, i32, ptr, ptr }
%struct.nk_vec2 = type { float, float }
%struct.nk_colorf = type { float, float, float, float }
%union.SDL_Event = type { %struct.SDL_SensorEvent, [8 x i8] }
%struct.SDL_SensorEvent = type { i32, i32, i32, [6 x float], i64 }
%struct.nk_rect = type { float, float, float, float }
%struct.nk_color = type { i8, i8, i8, i8 }
%struct.nk_font = type { ptr, %struct.nk_user_font, %struct.nk_baked_font, float, ptr, ptr, i32, %union.nk_handle, ptr }
%struct.nk_user_font = type { %union.nk_handle, float, ptr, ptr, %union.nk_handle }
%struct.nk_baked_font = type { float, float, float, i32, i32, ptr }
%union.nk_handle = type { ptr }

@.str.36 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.148 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.149 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.150 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.151 = external hidden unnamed_addr constant [28 x i8], align 1
@_ZZ4mainE2op = external hidden global i32, align 4
@_ZZ4mainE8property = external hidden global i32, align 4
@.str.152 = external hidden unnamed_addr constant [7 x i8], align 1
@stdout = external global ptr, align 8
@.str.153 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.154 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.155 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.156 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.157 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.158 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.159 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.160 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.161 = external hidden unnamed_addr constant [4 x i8], align 1

; 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) #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local { <2 x float>, <2 x float> } @nk_rect(float noundef, float noundef, float noundef, float noundef) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local <2 x float> @nk_vec2(float noundef, float noundef) #2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local i32 @nk_rgb_cf(<2 x float>, <2 x float>) #2

; Function Attrs: mustprogress uwtable
declare dso_local void @nk_font_config(ptr dead_on_unwind noalias writable sret(%struct.nk_font_config) align 8, float noundef) #4

; Function Attrs: mustprogress uwtable
declare dso_local ptr @nk_font_atlas_add_default(ptr noundef, float noundef, ptr noundef) #5

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @nk_style_set_font(ptr noundef, ptr noundef) #5

; Function Attrs: mustprogress uwtable
declare dso_local i32 @nk_begin(ptr noundef, ptr noundef, <2 x float>, <2 x float>, i32 noundef) #4

; Function Attrs: mustprogress uwtable
declare dso_local void @nk_end(ptr noundef) #5

; Function Attrs: mustprogress uwtable
declare dso_local void @nk_layout_row_dynamic(ptr noundef, float noundef, i32 noundef) #5

; Function Attrs: mustprogress uwtable
declare dso_local void @nk_layout_row_static(ptr noundef, float noundef, i32 noundef, i32 noundef) #5

; Function Attrs: mustprogress uwtable
declare dso_local float @nk_widget_width(ptr noundef) #5

; Function Attrs: mustprogress uwtable
declare dso_local void @nk_label(ptr noundef, ptr noundef, i32 noundef) #5

; Function Attrs: mustprogress uwtable
declare dso_local i32 @nk_button_label(ptr noundef, ptr noundef) #5

; Function Attrs: mustprogress uwtable
declare dso_local i32 @nk_option_label(ptr noundef, ptr noundef, i32 noundef) #5

; Function Attrs: mustprogress uwtable
declare dso_local void @nk_property_int(ptr noundef, ptr noundef, i32 noundef, ptr noundef, i32 noundef, i32 noundef, float noundef) #5

; Function Attrs: mustprogress uwtable
declare dso_local float @nk_propertyf(ptr noundef, ptr noundef, float noundef, float noundef, float noundef, float noundef, float noundef) #5

; Function Attrs: mustprogress uwtable
declare dso_local { <2 x float>, <2 x float> } @nk_color_picker(ptr noundef, <2 x float>, <2 x float>, i32 noundef) #4

; Function Attrs: mustprogress uwtable
declare dso_local i32 @nk_combo_begin_color(ptr noundef, i32, <2 x float>) #4

; Function Attrs: mustprogress uwtable
declare dso_local void @nk_combo_end(ptr noundef) #5

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z13nk_sdl_render16nk_anti_aliasing(i32 noundef) #5

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_Z11nk_sdl_initP10SDL_WindowP12SDL_Renderer(ptr noundef, ptr noundef) #5

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z23nk_sdl_font_stash_beginPP13nk_font_atlas(ptr noundef) #5

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z21nk_sdl_font_stash_endv() #5

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_Z19nk_sdl_handle_eventP9SDL_Event(ptr noundef) #4

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z15nk_sdl_shutdownv() #5

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main(i32 noundef %0, ptr noundef %1) #6 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca float, align 4
  %11 = alloca ptr, align 8
  %12 = alloca %struct.nk_colorf, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca float, align 4
  %18 = alloca float, align 4
  %19 = alloca ptr, align 8
  %20 = alloca %struct.nk_font_config, align 8
  %21 = alloca ptr, align 8
  %22 = alloca %union.SDL_Event, align 8
  %23 = alloca %struct.nk_rect, align 4
  %24 = alloca %struct.nk_color, align 1
  %25 = alloca %struct.nk_colorf, align 4
  %26 = alloca %struct.nk_vec2, align 4
  %27 = alloca %struct.nk_colorf, align 4
  %28 = alloca %struct.nk_colorf, align 4
  %29 = alloca i32, align 4
  store i32 0, ptr %3, align 4
  store i32 %0, ptr %4, align 4, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #10
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #10
  store i32 1, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #10
  store i32 0, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #10
  store float 1.000000e+00, ptr %10, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #10
  call void @llvm.lifetime.start.p0(i64 16, ptr %12) #10
  %30 = call i32 @SDL_SetHint(ptr noundef @.str.148, ptr noundef @.str.36)
  %31 = call i32 @SDL_Init(i32 noundef 32)
  %32 = call ptr @SDL_CreateWindow(ptr noundef @.str.149, i32 noundef 805240832, i32 noundef 805240832, i32 noundef 1200, i32 noundef 800, i32 noundef 8196)
  store ptr %32, ptr %6, align 8, !tbaa !9
  %33 = load ptr, ptr %6, align 8, !tbaa !9
  %34 = icmp eq ptr %33, null
  br i1 %34, label %35, label %37

35:                                               ; preds = %2
  %36 = call ptr @SDL_GetError()
  call void (ptr, ...) @SDL_Log(ptr noundef @.str.150, ptr noundef %36)
  call void @exit(i32 noundef -1) #11
  unreachable

37:                                               ; preds = %2
  %38 = load i32, ptr %9, align 4, !tbaa !5
  %39 = or i32 %38, 2
  store i32 %39, ptr %9, align 4, !tbaa !5
  %40 = load i32, ptr %9, align 4, !tbaa !5
  %41 = or i32 %40, 4
  store i32 %41, ptr %9, align 4, !tbaa !5
  %42 = load ptr, ptr %6, align 8, !tbaa !9
  %43 = load i32, ptr %9, align 4, !tbaa !5
  %44 = call ptr @SDL_CreateRenderer(ptr noundef %42, i32 noundef -1, i32 noundef %43)
  store ptr %44, ptr %7, align 8, !tbaa !9
  %45 = load ptr, ptr %7, align 8, !tbaa !9
  %46 = icmp eq ptr %45, null
  br i1 %46, label %47, label %49

47:                                               ; preds = %37
  %48 = call ptr @SDL_GetError()
  call void (ptr, ...) @SDL_Log(ptr noundef @.str.151, ptr noundef %48)
  call void @exit(i32 noundef -1) #11
  unreachable

49:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #10
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #10
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #10
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #10
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #10
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #10
  %50 = load ptr, ptr %7, align 8, !tbaa !9
  %51 = call i32 @SDL_GetRendererOutputSize(ptr noundef %50, ptr noundef %13, ptr noundef %14)
  %52 = load ptr, ptr %6, align 8, !tbaa !9
  call void @SDL_GetWindowSize(ptr noundef %52, ptr noundef %15, ptr noundef %16)
  %53 = load i32, ptr %13, align 4, !tbaa !5
  %54 = sitofp i32 %53 to float
  %55 = load i32, ptr %15, align 4, !tbaa !5
  %56 = sitofp i32 %55 to float
  %57 = fdiv float %54, %56
  store float %57, ptr %17, align 4, !tbaa !11
  %58 = load i32, ptr %14, align 4, !tbaa !5
  %59 = sitofp i32 %58 to float
  %60 = load i32, ptr %16, align 4, !tbaa !5
  %61 = sitofp i32 %60 to float
  %62 = fdiv float %59, %61
  store float %62, ptr %18, align 4, !tbaa !11
  %63 = load ptr, ptr %7, align 8, !tbaa !9
  %64 = load float, ptr %17, align 4, !tbaa !11
  %65 = load float, ptr %18, align 4, !tbaa !11
  %66 = call i32 @SDL_RenderSetScale(ptr noundef %63, float noundef %64, float noundef %65)
  %67 = load float, ptr %18, align 4, !tbaa !11
  store float %67, ptr %10, align 4, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #10
  %68 = load ptr, ptr %6, align 8, !tbaa !9
  %69 = load ptr, ptr %7, align 8, !tbaa !9
  %70 = call noundef ptr @_Z11nk_sdl_initP10SDL_WindowP12SDL_Renderer(ptr noundef %68, ptr noundef %69)
  store ptr %70, ptr %11, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #10
  call void @llvm.lifetime.start.p0(i64 88, ptr %20) #10
  call void @nk_font_config(ptr dead_on_unwind writable sret(%struct.nk_font_config) align 8 %20, float noundef 0.000000e+00)
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #10
  call void @_Z23nk_sdl_font_stash_beginPP13nk_font_atlas(ptr noundef %19)
  %71 = load ptr, ptr %19, align 8, !tbaa !9
  %72 = load float, ptr %10, align 4, !tbaa !11
  %73 = fmul float 1.300000e+01, %72
  %74 = call ptr @nk_font_atlas_add_default(ptr noundef %71, float noundef %73, ptr noundef %20)
  store ptr %74, ptr %21, align 8, !tbaa !9
  call void @_Z21nk_sdl_font_stash_endv()
  %75 = load float, ptr %10, align 4, !tbaa !11
  %76 = load ptr, ptr %21, align 8, !tbaa !9
  %77 = getelementptr inbounds %struct.nk_font, ptr %76, i32 0, i32 1
  %78 = getelementptr inbounds %struct.nk_user_font, ptr %77, i32 0, i32 1
  %79 = load float, ptr %78, align 8, !tbaa !13
  %80 = fdiv float %79, %75
  store float %80, ptr %78, align 8, !tbaa !13
  %81 = load ptr, ptr %11, align 8, !tbaa !9
  %82 = load ptr, ptr %21, align 8, !tbaa !9
  %83 = getelementptr inbounds %struct.nk_font, ptr %82, i32 0, i32 1
  call void @nk_style_set_font(ptr noundef %81, ptr noundef %83)
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #10
  call void @llvm.lifetime.end.p0(i64 88, ptr %20) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #10
  %84 = getelementptr inbounds %struct.nk_colorf, ptr %12, i32 0, i32 0
  store float 0x3FB99999A0000000, ptr %84, align 4, !tbaa !17
  %85 = getelementptr inbounds %struct.nk_colorf, ptr %12, i32 0, i32 1
  store float 0x3FC70A3D80000000, ptr %85, align 4, !tbaa !19
  %86 = getelementptr inbounds %struct.nk_colorf, ptr %12, i32 0, i32 2
  store float 0x3FCEB851E0000000, ptr %86, align 4, !tbaa !20
  %87 = getelementptr inbounds %struct.nk_colorf, ptr %12, i32 0, i32 3
  store float 1.000000e+00, ptr %87, align 4, !tbaa !21
  br label %88

88:                                               ; preds = %220, %49
  %89 = load i32, ptr %8, align 4, !tbaa !5
  %90 = icmp ne i32 %89, 0
  br i1 %90, label %91, label %221

91:                                               ; preds = %88
  call void @llvm.lifetime.start.p0(i64 56, ptr %22) #10
  %92 = load ptr, ptr %11, align 8, !tbaa !9
  call void @nk_input_begin(ptr noundef %92)
  br label %93

93:                                               ; preds = %100, %91
  %94 = call i32 @SDL_PollEvent(ptr noundef %22)
  %95 = icmp ne i32 %94, 0
  br i1 %95, label %96, label %102

96:                                               ; preds = %93
  %97 = load i32, ptr %22, align 8, !tbaa !22
  %98 = icmp eq i32 %97, 256
  br i1 %98, label %99, label %100

99:                                               ; preds = %96
  store i32 6, ptr %29, align 4
  br label %218

100:                                              ; preds = %96
  %101 = call noundef i32 @_Z19nk_sdl_handle_eventP9SDL_Event(ptr noundef %22)
  br label %93, !llvm.loop !23

102:                                              ; preds = %93
  %103 = load ptr, ptr %11, align 8, !tbaa !9
  call void @nk_input_end(ptr noundef %103)
  %104 = load ptr, ptr %11, align 8, !tbaa !9
  %105 = call { <2 x float>, <2 x float> } @nk_rect(float noundef 5.000000e+01, float noundef 5.000000e+01, float noundef 2.300000e+02, float noundef 2.500000e+02)
  %106 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %23, i32 0, i32 0
  %107 = extractvalue { <2 x float>, <2 x float> } %105, 0
  store <2 x float> %107, ptr %106, align 4
  %108 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %23, i32 0, i32 1
  %109 = extractvalue { <2 x float>, <2 x float> } %105, 1
  store <2 x float> %109, ptr %108, align 4
  %110 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %23, i32 0, i32 0
  %111 = load <2 x float>, ptr %110, align 4
  %112 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %23, i32 0, i32 1
  %113 = load <2 x float>, ptr %112, align 4
  %114 = call i32 @nk_begin(ptr noundef %104, ptr noundef @.str.149, <2 x float> %111, <2 x float> %113, i32 noundef 87)
  %115 = icmp ne i32 %114, 0
  br i1 %115, label %116, label %195

116:                                              ; preds = %102
  %117 = load ptr, ptr %11, align 8, !tbaa !9
  call void @nk_layout_row_static(ptr noundef %117, float noundef 3.000000e+01, i32 noundef 80, i32 noundef 1)
  %118 = load ptr, ptr %11, align 8, !tbaa !9
  %119 = call i32 @nk_button_label(ptr noundef %118, ptr noundef @.str.152)
  %120 = icmp ne i32 %119, 0
  br i1 %120, label %121, label %124

121:                                              ; preds = %116
  %122 = load ptr, ptr @stdout, align 8, !tbaa !9
  %123 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %122, ptr noundef @.str.153) #10
  br label %124

124:                                              ; preds = %121, %116
  %125 = load ptr, ptr %11, align 8, !tbaa !9
  call void @nk_layout_row_dynamic(ptr noundef %125, float noundef 3.000000e+01, i32 noundef 2)
  %126 = load ptr, ptr %11, align 8, !tbaa !9
  %127 = load i32, ptr @_ZZ4mainE2op, align 4, !tbaa !5
  %128 = icmp eq i32 %127, 0
  %129 = zext i1 %128 to i32
  %130 = call i32 @nk_option_label(ptr noundef %126, ptr noundef @.str.154, i32 noundef %129)
  %131 = icmp ne i32 %130, 0
  br i1 %131, label %132, label %133

132:                                              ; preds = %124
  store i32 0, ptr @_ZZ4mainE2op, align 4, !tbaa !5
  br label %133

133:                                              ; preds = %132, %124
  %134 = load ptr, ptr %11, align 8, !tbaa !9
  %135 = load i32, ptr @_ZZ4mainE2op, align 4, !tbaa !5
  %136 = icmp eq i32 %135, 1
  %137 = zext i1 %136 to i32
  %138 = call i32 @nk_option_label(ptr noundef %134, ptr noundef @.str.155, i32 noundef %137)
  %139 = icmp ne i32 %138, 0
  br i1 %139, label %140, label %141

140:                                              ; preds = %133
  store i32 1, ptr @_ZZ4mainE2op, align 4, !tbaa !5
  br label %141

141:                                              ; preds = %140, %133
  %142 = load ptr, ptr %11, align 8, !tbaa !9
  call void @nk_layout_row_dynamic(ptr noundef %142, float noundef 2.500000e+01, i32 noundef 1)
  %143 = load ptr, ptr %11, align 8, !tbaa !9
  call void @nk_property_int(ptr noundef %143, ptr noundef @.str.156, i32 noundef 0, ptr noundef @_ZZ4mainE8property, i32 noundef 100, i32 noundef 10, float noundef 1.000000e+00)
  %144 = load ptr, ptr %11, align 8, !tbaa !9
  call void @nk_layout_row_dynamic(ptr noundef %144, float noundef 2.000000e+01, i32 noundef 1)
  %145 = load ptr, ptr %11, align 8, !tbaa !9
  call void @nk_label(ptr noundef %145, ptr noundef @.str.157, i32 noundef 17)
  %146 = load ptr, ptr %11, align 8, !tbaa !9
  call void @nk_layout_row_dynamic(ptr noundef %146, float noundef 2.500000e+01, i32 noundef 1)
  %147 = load ptr, ptr %11, align 8, !tbaa !9
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %25, ptr align 4 %12, i64 16, i1 false), !tbaa.struct !25
  %148 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %25, i32 0, i32 0
  %149 = load <2 x float>, ptr %148, align 4
  %150 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %25, i32 0, i32 1
  %151 = load <2 x float>, ptr %150, align 4
  %152 = call i32 @nk_rgb_cf(<2 x float> %149, <2 x float> %151)
  store i32 %152, ptr %24, align 1
  %153 = load ptr, ptr %11, align 8, !tbaa !9
  %154 = call float @nk_widget_width(ptr noundef %153)
  %155 = call <2 x float> @nk_vec2(float noundef %154, float noundef 4.000000e+02)
  store <2 x float> %155, ptr %26, align 4
  %156 = load i32, ptr %24, align 1
  %157 = load <2 x float>, ptr %26, align 4
  %158 = call i32 @nk_combo_begin_color(ptr noundef %147, i32 %156, <2 x float> %157)
  %159 = icmp ne i32 %158, 0
  br i1 %159, label %160, label %194

160:                                              ; preds = %141
  %161 = load ptr, ptr %11, align 8, !tbaa !9
  call void @nk_layout_row_dynamic(ptr noundef %161, float noundef 1.200000e+02, i32 noundef 1)
  call void @llvm.lifetime.start.p0(i64 16, ptr %27) #10
  %162 = load ptr, ptr %11, align 8, !tbaa !9
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %28, ptr align 4 %12, i64 16, i1 false), !tbaa.struct !25
  %163 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %28, i32 0, i32 0
  %164 = load <2 x float>, ptr %163, align 4
  %165 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %28, i32 0, i32 1
  %166 = load <2 x float>, ptr %165, align 4
  %167 = call { <2 x float>, <2 x float> } @nk_color_picker(ptr noundef %162, <2 x float> %164, <2 x float> %166, i32 noundef 1)
  %168 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %27, i32 0, i32 0
  %169 = extractvalue { <2 x float>, <2 x float> } %167, 0
  store <2 x float> %169, ptr %168, align 4
  %170 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %27, i32 0, i32 1
  %171 = extractvalue { <2 x float>, <2 x float> } %167, 1
  store <2 x float> %171, ptr %170, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %12, ptr align 4 %27, i64 16, i1 false), !tbaa.struct !25
  call void @llvm.lifetime.end.p0(i64 16, ptr %27) #10
  %172 = load ptr, ptr %11, align 8, !tbaa !9
  call void @nk_layout_row_dynamic(ptr noundef %172, float noundef 2.500000e+01, i32 noundef 1)
  %173 = load ptr, ptr %11, align 8, !tbaa !9
  %174 = getelementptr inbounds %struct.nk_colorf, ptr %12, i32 0, i32 0
  %175 = load float, ptr %174, align 4, !tbaa !17
  %176 = call float @nk_propertyf(ptr noundef %173, ptr noundef @.str.158, float noundef 0.000000e+00, float noundef %175, float noundef 1.000000e+00, float noundef 0x3F847AE140000000, float noundef 0x3F747AE140000000)
  %177 = getelementptr inbounds %struct.nk_colorf, ptr %12, i32 0, i32 0
  store float %176, ptr %177, align 4, !tbaa !17
  %178 = load ptr, ptr %11, align 8, !tbaa !9
  %179 = getelementptr inbounds %struct.nk_colorf, ptr %12, i32 0, i32 1
  %180 = load float, ptr %179, align 4, !tbaa !19
  %181 = call float @nk_propertyf(ptr noundef %178, ptr noundef @.str.159, float noundef 0.000000e+00, float noundef %180, float noundef 1.000000e+00, float noundef 0x3F847AE140000000, float noundef 0x3F747AE140000000)
  %182 = getelementptr inbounds %struct.nk_colorf, ptr %12, i32 0, i32 1
  store float %181, ptr %182, align 4, !tbaa !19
  %183 = load ptr, ptr %11, align 8, !tbaa !9
  %184 = getelementptr inbounds %struct.nk_colorf, ptr %12, i32 0, i32 2
  %185 = load float, ptr %184, align 4, !tbaa !20
  %186 = call float @nk_propertyf(ptr noundef %183, ptr noundef @.str.160, float noundef 0.000000e+00, float noundef %185, float noundef 1.000000e+00, float noundef 0x3F847AE140000000, float noundef 0x3F747AE140000000)
  %187 = getelementptr inbounds %struct.nk_colorf, ptr %12, i32 0, i32 2
  store float %186, ptr %187, align 4, !tbaa !20
  %188 = load ptr, ptr %11, align 8, !tbaa !9
  %189 = getelementptr inbounds %struct.nk_colorf, ptr %12, i32 0, i32 3
  %190 = load float, ptr %189, align 4, !tbaa !21
  %191 = call float @nk_propertyf(ptr noundef %188, ptr noundef @.str.161, float noundef 0.000000e+00, float noundef %190, float noundef 1.000000e+00, float noundef 0x3F847AE140000000, float noundef 0x3F747AE140000000)
  %192 = getelementptr inbounds %struct.nk_colorf, ptr %12, i32 0, i32 3
  store float %191, ptr %192, align 4, !tbaa !21
  %193 = load ptr, ptr %11, align 8, !tbaa !9
  call void @nk_combo_end(ptr noundef %193)
  br label %194

194:                                              ; preds = %160, %141
  br label %195

195:                                              ; preds = %194, %102
  %196 = load ptr, ptr %11, align 8, !tbaa !9
  call void @nk_end(ptr noundef %196)
  %197 = load ptr, ptr %7, align 8, !tbaa !9
  %198 = getelementptr inbounds %struct.nk_colorf, ptr %12, i32 0, i32 0
  %199 = load float, ptr %198, align 4, !tbaa !17
  %200 = fmul float %199, 2.550000e+02
  %201 = fptoui float %200 to i8
  %202 = getelementptr inbounds %struct.nk_colorf, ptr %12, i32 0, i32 1
  %203 = load float, ptr %202, align 4, !tbaa !19
  %204 = fmul float %203, 2.550000e+02
  %205 = fptoui float %204 to i8
  %206 = getelementptr inbounds %struct.nk_colorf, ptr %12, i32 0, i32 2
  %207 = load float, ptr %206, align 4, !tbaa !20
  %208 = fmul float %207, 2.550000e+02
  %209 = fptoui float %208 to i8
  %210 = getelementptr inbounds %struct.nk_colorf, ptr %12, i32 0, i32 3
  %211 = load float, ptr %210, align 4, !tbaa !21
  %212 = fmul float %211, 2.550000e+02
  %213 = fptoui float %212 to i8
  %214 = call i32 @SDL_SetRenderDrawColor(ptr noundef %197, i8 noundef zeroext %201, i8 noundef zeroext %205, i8 noundef zeroext %209, i8 noundef zeroext %213)
  %215 = load ptr, ptr %7, align 8, !tbaa !9
  %216 = call i32 @SDL_RenderClear(ptr noundef %215)
  call void @_Z13nk_sdl_render16nk_anti_aliasing(i32 noundef 1)
  %217 = load ptr, ptr %7, align 8, !tbaa !9
  call void @SDL_RenderPresent(ptr noundef %217)
  store i32 0, ptr %29, align 4
  br label %218

218:                                              ; preds = %195, %99
  call void @llvm.lifetime.end.p0(i64 56, ptr %22) #10
  %219 = load i32, ptr %29, align 4
  switch i32 %219, label %225 [
    i32 0, label %220
    i32 6, label %222
  ]

220:                                              ; preds = %218
  br label %88, !llvm.loop !26

221:                                              ; preds = %88
  br label %222

222:                                              ; preds = %221, %218
  call void @_Z15nk_sdl_shutdownv()
  %223 = load ptr, ptr %7, align 8, !tbaa !9
  call void @SDL_DestroyRenderer(ptr noundef %223)
  %224 = load ptr, ptr %6, align 8, !tbaa !9
  call void @SDL_DestroyWindow(ptr noundef %224)
  call void @SDL_Quit()
  store i32 0, ptr %3, align 4
  store i32 1, ptr %29, align 4
  br label %225

225:                                              ; preds = %222, %218
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #10
  %226 = load i32, ptr %3, align 4
  ret i32 %226
}

declare i32 @SDL_SetHint(ptr noundef, ptr noundef) #7

declare i32 @SDL_Init(i32 noundef) #7

declare ptr @SDL_CreateWindow(ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) #7

declare void @SDL_Log(ptr noundef, ...) #7

declare ptr @SDL_GetError() #7

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) #8

declare ptr @SDL_CreateRenderer(ptr noundef, i32 noundef, i32 noundef) #7

declare i32 @SDL_GetRendererOutputSize(ptr noundef, ptr noundef, ptr noundef) #7

declare void @SDL_GetWindowSize(ptr noundef, ptr noundef, ptr noundef) #7

declare i32 @SDL_RenderSetScale(ptr noundef, float noundef, float noundef) #7

declare i32 @SDL_PollEvent(ptr noundef) #7

; Function Attrs: nounwind
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #9

declare i32 @SDL_SetRenderDrawColor(ptr noundef, i8 noundef zeroext, i8 noundef zeroext, i8 noundef zeroext, i8 noundef zeroext) #7

declare i32 @SDL_RenderClear(ptr noundef) #7

declare void @SDL_RenderPresent(ptr noundef) #7

declare void @SDL_DestroyRenderer(ptr noundef) #7

declare void @SDL_DestroyWindow(ptr noundef) #7

declare void @SDL_Quit() #7

attributes #0 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="64" "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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { mustprogress uwtable "min-legal-vector-width"="64" "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 = { mustprogress 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 #6 = { mustprogress norecurse uwtable "min-legal-vector-width"="64" "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 #7 = { "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 #8 = { 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 #9 = { 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 #10 = { nounwind }
attributes #11 = { noreturn nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"float", !7, i64 0}
!13 = !{!14, !12, i64 16}
!14 = !{!"_ZTS7nk_font", !10, i64 0, !15, i64 8, !16, i64 48, !12, i64 80, !10, i64 88, !10, i64 96, !6, i64 104, !7, i64 112, !10, i64 120}
!15 = !{!"_ZTS12nk_user_font", !7, i64 0, !12, i64 8, !10, i64 16, !10, i64 24, !7, i64 32}
!16 = !{!"_ZTS13nk_baked_font", !12, i64 0, !12, i64 4, !12, i64 8, !6, i64 12, !6, i64 16, !10, i64 24}
!17 = !{!18, !12, i64 0}
!18 = !{!"_ZTS9nk_colorf", !12, i64 0, !12, i64 4, !12, i64 8, !12, i64 12}
!19 = !{!18, !12, i64 4}
!20 = !{!18, !12, i64 8}
!21 = !{!18, !12, i64 12}
!22 = !{!7, !7, i64 0}
!23 = distinct !{!23, !24}
!24 = !{!"llvm.loop.mustprogress"}
!25 = !{i64 0, i64 4, !11, i64 4, i64 4, !11, i64 8, i64 4, !11, i64 12, i64 4, !11}
!26 = distinct !{!26, !24}


; 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.nk_font_config = type { ptr, ptr, i64, i8, i8, i8, i8, i8, [3 x i8], float, i32, %struct.nk_vec2, ptr, ptr, i32, ptr, ptr }
%struct.nk_vec2 = type { float, float }
%union.SDL_Event = type { %struct.SDL_SensorEvent, [8 x i8] }
%struct.SDL_SensorEvent = type { i32, i32, i32, [6 x float], i64 }

@.str.36 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.148 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.149 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.150 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.151 = external hidden unnamed_addr constant [28 x i8], align 1
@_ZZ4mainE2op = external hidden local_unnamed_addr global i32, align 4
@_ZZ4mainE8property = external hidden global i32, align 4
@.str.152 = external hidden unnamed_addr constant [7 x i8], align 1
@stdout = external local_unnamed_addr global ptr, align 8
@.str.153 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.154 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.155 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.156 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.157 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.158 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.159 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.160 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.161 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local { <2 x float>, <2 x float> } @nk_rect(float noundef, float noundef, float noundef, float noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local <2 x float> @nk_vec2(float noundef, float noundef) local_unnamed_addr #1

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local i32 @nk_rgb_cf(<2 x float>, <2 x float>) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare dso_local void @nk_font_config(ptr dead_on_unwind noalias writable sret(%struct.nk_font_config) align 8, float noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local ptr @nk_font_atlas_add_default(ptr noundef, float noundef, ptr noundef) local_unnamed_addr #4

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @nk_input_end(ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare dso_local void @nk_style_set_font(ptr noundef, ptr noundef) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare dso_local i32 @nk_begin(ptr noundef, ptr noundef, <2 x float>, <2 x float>, i32 noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local void @nk_end(ptr noundef) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare dso_local void @nk_layout_row_dynamic(ptr noundef, float noundef, i32 noundef) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare dso_local void @nk_layout_row_static(ptr noundef, float noundef, i32 noundef, i32 noundef) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare dso_local float @nk_widget_width(ptr noundef) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare dso_local void @nk_label(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare dso_local i32 @nk_button_label(ptr noundef, ptr noundef) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare dso_local i32 @nk_option_label(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare dso_local void @nk_property_int(ptr noundef, ptr noundef, i32 noundef, ptr noundef, i32 noundef, i32 noundef, float noundef) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare dso_local float @nk_propertyf(ptr noundef, ptr noundef, float noundef, float noundef, float noundef, float noundef, float noundef) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare dso_local { <2 x float>, <2 x float> } @nk_color_picker(ptr noundef, <2 x float>, <2 x float>, i32 noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local i32 @nk_combo_begin_color(ptr noundef, i32, <2 x float>) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local void @nk_combo_end(ptr noundef) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z13nk_sdl_render16nk_anti_aliasing(i32 noundef) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_Z11nk_sdl_initP10SDL_WindowP12SDL_Renderer(ptr noundef, ptr noundef) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z23nk_sdl_font_stash_beginPP13nk_font_atlas(ptr noundef) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z21nk_sdl_font_stash_endv() local_unnamed_addr #4

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z15nk_sdl_shutdownv() local_unnamed_addr #4

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main(i32 noundef %0, ptr nocapture noundef readnone %1) local_unnamed_addr #5 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca %struct.nk_font_config, align 8
  %9 = alloca %union.SDL_Event, align 8
  %10 = tail call i32 @SDL_SetHint(ptr noundef nonnull @.str.148, ptr noundef nonnull @.str.36)
  %11 = tail call i32 @SDL_Init(i32 noundef 32)
  %12 = tail call ptr @SDL_CreateWindow(ptr noundef nonnull @.str.149, i32 noundef 805240832, i32 noundef 805240832, i32 noundef 1200, i32 noundef 800, i32 noundef 8196)
  %13 = icmp eq ptr %12, null
  br i1 %13, label %14, label %16

14:                                               ; preds = %2
  %15 = tail call ptr @SDL_GetError()
  tail call void (ptr, ...) @SDL_Log(ptr noundef nonnull @.str.150, ptr noundef %15)
  tail call void @exit(i32 noundef -1) #9
  unreachable

16:                                               ; preds = %2
  %17 = tail call ptr @SDL_CreateRenderer(ptr noundef nonnull %12, i32 noundef -1, i32 noundef 6)
  %18 = icmp eq ptr %17, null
  br i1 %18, label %19, label %21

19:                                               ; preds = %16
  %20 = tail call ptr @SDL_GetError()
  tail call void (ptr, ...) @SDL_Log(ptr noundef nonnull @.str.151, ptr noundef %20)
  tail call void @exit(i32 noundef -1) #9
  unreachable

21:                                               ; preds = %16
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #10
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #10
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #10
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #10
  %22 = call i32 @SDL_GetRendererOutputSize(ptr noundef nonnull %17, ptr noundef nonnull %3, ptr noundef nonnull %4)
  call void @SDL_GetWindowSize(ptr noundef nonnull %12, ptr noundef nonnull %5, ptr noundef nonnull %6)
  %23 = load i32, ptr %3, align 4, !tbaa !5
  %24 = sitofp i32 %23 to float
  %25 = load i32, ptr %5, align 4, !tbaa !5
  %26 = sitofp i32 %25 to float
  %27 = fdiv float %24, %26
  %28 = load i32, ptr %4, align 4, !tbaa !5
  %29 = sitofp i32 %28 to float
  %30 = load i32, ptr %6, align 4, !tbaa !5
  %31 = sitofp i32 %30 to float
  %32 = fdiv float %29, %31
  %33 = call i32 @SDL_RenderSetScale(ptr noundef nonnull %17, float noundef %27, float noundef %32)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #10
  %34 = call noundef ptr @_Z11nk_sdl_initP10SDL_WindowP12SDL_Renderer(ptr noundef nonnull %12, ptr noundef nonnull %17)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #10
  call void @llvm.lifetime.start.p0(i64 88, ptr nonnull %8) #10
  call void @nk_font_config(ptr dead_on_unwind nonnull writable sret(%struct.nk_font_config) align 8 %8, float noundef 0.000000e+00)
  call void @_Z23nk_sdl_font_stash_beginPP13nk_font_atlas(ptr noundef nonnull %7)
  %35 = load ptr, ptr %7, align 8, !tbaa !9
  %36 = fmul float %32, 1.300000e+01
  %37 = call ptr @nk_font_atlas_add_default(ptr noundef %35, float noundef %36, ptr noundef nonnull %8)
  call void @_Z21nk_sdl_font_stash_endv()
  %38 = getelementptr inbounds i8, ptr %37, i64 8
  %39 = getelementptr inbounds i8, ptr %37, i64 16
  %40 = load float, ptr %39, align 8, !tbaa !11
  %41 = fdiv float %40, %32
  store float %41, ptr %39, align 8, !tbaa !11
  call void @nk_style_set_font(ptr noundef %34, ptr noundef nonnull %38)
  call void @llvm.lifetime.end.p0(i64 88, ptr nonnull %8) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #10
  br label %42

42:                                               ; preds = %83, %21
  %.sroa.012.0 = phi <2 x float> [ <float 0x3FB99999A0000000, float 0x3FC70A3D80000000>, %21 ], [ %.sroa.012.1, %83 ]
  %.sroa.13.0 = phi <2 x float> [ <float 0x3FCEB851E0000000, float 1.000000e+00>, %21 ], [ %.sroa.13.1, %83 ]
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %9) #10
  call void @nk_input_begin(ptr noundef %34)
  %43 = call i32 @SDL_PollEvent(ptr noundef nonnull %9)
  %.not93 = icmp eq i32 %43, 0
  br i1 %.not93, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %42, %46
  %44 = load i32, ptr %9, align 8, !tbaa !16
  %45 = icmp eq i32 %44, 256
  br i1 %45, label %94, label %46

46:                                               ; preds = %.lr.ph
  %47 = call noundef i32 @_Z19nk_sdl_handle_eventP9SDL_Event(ptr noundef nonnull %9)
  %48 = call i32 @SDL_PollEvent(ptr noundef nonnull %9)
  %.not = icmp eq i32 %48, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph, !llvm.loop !17

._crit_edge:                                      ; preds = %46, %42
  call void @nk_input_end(ptr noundef %34)
  %49 = call { <2 x float>, <2 x float> } @nk_rect(float noundef 5.000000e+01, float noundef 5.000000e+01, float noundef 2.300000e+02, float noundef 2.500000e+02)
  %50 = extractvalue { <2 x float>, <2 x float> } %49, 0
  %51 = extractvalue { <2 x float>, <2 x float> } %49, 1
  %52 = call i32 @nk_begin(ptr noundef %34, ptr noundef nonnull @.str.149, <2 x float> %50, <2 x float> %51, i32 noundef 87)
  %.not85 = icmp eq i32 %52, 0
  br i1 %.not85, label %83, label %53

53:                                               ; preds = %._crit_edge
  call void @nk_layout_row_static(ptr noundef %34, float noundef 3.000000e+01, i32 noundef 80, i32 noundef 1)
  %54 = call i32 @nk_button_label(ptr noundef %34, ptr noundef nonnull @.str.152)
  %.not86 = icmp eq i32 %54, 0
  br i1 %.not86, label %58, label %55

55:                                               ; preds = %53
  %56 = load ptr, ptr @stdout, align 8, !tbaa !9
  %57 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %56, ptr noundef nonnull @.str.153) #10
  br label %58

58:                                               ; preds = %55, %53
  call void @nk_layout_row_dynamic(ptr noundef %34, float noundef 3.000000e+01, i32 noundef 2)
  %59 = load i32, ptr @_ZZ4mainE2op, align 4, !tbaa !5
  %60 = icmp eq i32 %59, 0
  %61 = zext i1 %60 to i32
  %62 = call i32 @nk_option_label(ptr noundef %34, ptr noundef nonnull @.str.154, i32 noundef %61)
  %.not87 = icmp eq i32 %62, 0
  br i1 %.not87, label %._crit_edge94, label %63

._crit_edge94:                                    ; preds = %58
  %.pre = load i32, ptr @_ZZ4mainE2op, align 4, !tbaa !5
  br label %64

63:                                               ; preds = %58
  store i32 0, ptr @_ZZ4mainE2op, align 4, !tbaa !5
  br label %64

64:                                               ; preds = %._crit_edge94, %63
  %65 = phi i32 [ %.pre, %._crit_edge94 ], [ 0, %63 ]
  %66 = icmp eq i32 %65, 1
  %67 = zext i1 %66 to i32
  %68 = call i32 @nk_option_label(ptr noundef %34, ptr noundef nonnull @.str.155, i32 noundef %67)
  %.not88 = icmp eq i32 %68, 0
  br i1 %.not88, label %70, label %69

69:                                               ; preds = %64
  store i32 1, ptr @_ZZ4mainE2op, align 4, !tbaa !5
  br label %70

70:                                               ; preds = %69, %64
  call void @nk_layout_row_dynamic(ptr noundef %34, float noundef 2.500000e+01, i32 noundef 1)
  call void @nk_property_int(ptr noundef %34, ptr noundef nonnull @.str.156, i32 noundef 0, ptr noundef nonnull @_ZZ4mainE8property, i32 noundef 100, i32 noundef 10, float noundef 1.000000e+00)
  call void @nk_layout_row_dynamic(ptr noundef %34, float noundef 2.000000e+01, i32 noundef 1)
  call void @nk_label(ptr noundef %34, ptr noundef nonnull @.str.157, i32 noundef 17)
  call void @nk_layout_row_dynamic(ptr noundef %34, float noundef 2.500000e+01, i32 noundef 1)
  %71 = call i32 @nk_rgb_cf(<2 x float> %.sroa.012.0, <2 x float> %.sroa.13.0)
  %72 = call float @nk_widget_width(ptr noundef %34)
  %73 = call <2 x float> @nk_vec2(float noundef %72, float noundef 4.000000e+02)
  %74 = call i32 @nk_combo_begin_color(ptr noundef %34, i32 %71, <2 x float> %73)
  %.not89 = icmp eq i32 %74, 0
  br i1 %.not89, label %83, label %75

75:                                               ; preds = %70
  call void @nk_layout_row_dynamic(ptr noundef %34, float noundef 1.200000e+02, i32 noundef 1)
  %76 = call { <2 x float>, <2 x float> } @nk_color_picker(ptr noundef %34, <2 x float> %.sroa.012.0, <2 x float> %.sroa.13.0, i32 noundef 1)
  %77 = extractvalue { <2 x float>, <2 x float> } %76, 0
  %78 = extractvalue { <2 x float>, <2 x float> } %76, 1
  call void @nk_layout_row_dynamic(ptr noundef %34, float noundef 2.500000e+01, i32 noundef 1)
  %.sroa.012.0.vec.extract = extractelement <2 x float> %77, i64 0
  %79 = call float @nk_propertyf(ptr noundef %34, ptr noundef nonnull @.str.158, float noundef 0.000000e+00, float noundef %.sroa.012.0.vec.extract, float noundef 1.000000e+00, float noundef 0x3F847AE140000000, float noundef 0x3F747AE140000000)
  %.sroa.012.0.vec.insert17 = insertelement <2 x float> poison, float %79, i64 0
  %.sroa.012.4.vec.extract = extractelement <2 x float> %77, i64 1
  %80 = call float @nk_propertyf(ptr noundef %34, ptr noundef nonnull @.str.159, float noundef 0.000000e+00, float noundef %.sroa.012.4.vec.extract, float noundef 1.000000e+00, float noundef 0x3F847AE140000000, float noundef 0x3F747AE140000000)
  %.sroa.012.4.vec.insert22 = insertelement <2 x float> %.sroa.012.0.vec.insert17, float %80, i64 1
  %.sroa.13.8.vec.extract = extractelement <2 x float> %78, i64 0
  %81 = call float @nk_propertyf(ptr noundef %34, ptr noundef nonnull @.str.160, float noundef 0.000000e+00, float noundef %.sroa.13.8.vec.extract, float noundef 1.000000e+00, float noundef 0x3F847AE140000000, float noundef 0x3F747AE140000000)
  %.sroa.13.8.vec.insert29 = insertelement <2 x float> poison, float %81, i64 0
  %.sroa.13.12.vec.extract = extractelement <2 x float> %78, i64 1
  %82 = call float @nk_propertyf(ptr noundef %34, ptr noundef nonnull @.str.161, float noundef 0.000000e+00, float noundef %.sroa.13.12.vec.extract, float noundef 1.000000e+00, float noundef 0x3F847AE140000000, float noundef 0x3F747AE140000000)
  %.sroa.13.12.vec.insert34 = insertelement <2 x float> %.sroa.13.8.vec.insert29, float %82, i64 1
  call void @nk_combo_end(ptr noundef %34)
  br label %83

83:                                               ; preds = %._crit_edge, %75, %70
  %.sroa.012.1 = phi <2 x float> [ %.sroa.012.4.vec.insert22, %75 ], [ %.sroa.012.0, %70 ], [ %.sroa.012.0, %._crit_edge ]
  %.sroa.13.1 = phi <2 x float> [ %.sroa.13.12.vec.insert34, %75 ], [ %.sroa.13.0, %70 ], [ %.sroa.13.0, %._crit_edge ]
  call void @nk_end(ptr noundef %34)
  %.sroa.012.0.vec.extract19 = extractelement <2 x float> %.sroa.012.1, i64 0
  %84 = fmul float %.sroa.012.0.vec.extract19, 2.550000e+02
  %85 = fptoui float %84 to i8
  %.sroa.012.4.vec.extract24 = extractelement <2 x float> %.sroa.012.1, i64 1
  %86 = fmul float %.sroa.012.4.vec.extract24, 2.550000e+02
  %87 = fptoui float %86 to i8
  %.sroa.13.8.vec.extract31 = extractelement <2 x float> %.sroa.13.1, i64 0
  %88 = fmul float %.sroa.13.8.vec.extract31, 2.550000e+02
  %89 = fptoui float %88 to i8
  %.sroa.13.12.vec.extract36 = extractelement <2 x float> %.sroa.13.1, i64 1
  %90 = fmul float %.sroa.13.12.vec.extract36, 2.550000e+02
  %91 = fptoui float %90 to i8
  %92 = call i32 @SDL_SetRenderDrawColor(ptr noundef nonnull %17, i8 noundef zeroext %85, i8 noundef zeroext %87, i8 noundef zeroext %89, i8 noundef zeroext %91)
  %93 = call i32 @SDL_RenderClear(ptr noundef nonnull %17)
  call void @_Z13nk_sdl_render16nk_anti_aliasing(i32 noundef 1)
  call void @SDL_RenderPresent(ptr noundef nonnull %17)
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %9) #10
  br label %42

94:                                               ; preds = %.lr.ph
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %9) #10
  call void @_Z15nk_sdl_shutdownv()
  call void @SDL_DestroyRenderer(ptr noundef nonnull %17)
  call void @SDL_DestroyWindow(ptr noundef nonnull %12)
  call void @SDL_Quit()
  ret i32 0
}

declare i32 @SDL_SetHint(ptr noundef, ptr noundef) local_unnamed_addr #6

declare i32 @SDL_Init(i32 noundef) local_unnamed_addr #6

declare ptr @SDL_CreateWindow(ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #6

declare void @SDL_Log(ptr noundef, ...) local_unnamed_addr #6

declare ptr @SDL_GetError() local_unnamed_addr #6

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) local_unnamed_addr #7

declare ptr @SDL_CreateRenderer(ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #6

declare i32 @SDL_GetRendererOutputSize(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #6

declare void @SDL_GetWindowSize(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #6

declare i32 @SDL_RenderSetScale(ptr noundef, float noundef, float noundef) local_unnamed_addr #6

declare i32 @SDL_PollEvent(ptr noundef) local_unnamed_addr #6

; Function Attrs: nofree nounwind
declare noundef i32 @fprintf(ptr nocapture noundef, ptr nocapture noundef readonly, ...) local_unnamed_addr #8

declare i32 @SDL_SetRenderDrawColor(ptr noundef, i8 noundef zeroext, i8 noundef zeroext, i8 noundef zeroext, i8 noundef zeroext) local_unnamed_addr #6

declare i32 @SDL_RenderClear(ptr noundef) local_unnamed_addr #6

declare void @SDL_RenderPresent(ptr noundef) local_unnamed_addr #6

declare void @SDL_DestroyRenderer(ptr noundef) local_unnamed_addr #6

declare void @SDL_DestroyWindow(ptr noundef) local_unnamed_addr #6

declare void @SDL_Quit() local_unnamed_addr #6

attributes #0 = { mustprogress 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 #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="64" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { mustprogress uwtable "min-legal-vector-width"="64" "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 = { mustprogress 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 #5 = { mustprogress norecurse uwtable "min-legal-vector-width"="64" "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 #6 = { "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 #7 = { 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 #8 = { nofree 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 #9 = { noreturn nounwind }
attributes #10 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !14, i64 16}
!12 = !{!"_ZTS7nk_font", !10, i64 0, !13, i64 8, !15, i64 48, !14, i64 80, !10, i64 88, !10, i64 96, !6, i64 104, !7, i64 112, !10, i64 120}
!13 = !{!"_ZTS12nk_user_font", !7, i64 0, !14, i64 8, !10, i64 16, !10, i64 24, !7, i64 32}
!14 = !{!"float", !7, i64 0}
!15 = !{!"_ZTS13nk_baked_font", !14, i64 0, !14, i64 4, !14, i64 8, !6, i64 12, !6, i64 16, !10, i64 24}
!16 = !{!7, !7, i64 0}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}


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