; 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_color = type { i8, i8, i8, i8 }
%struct.nk_colorf = type { float, float, float, float }
%struct.nk_vec2 = type { float, float }
%struct.nk_draw_list = type { %struct.nk_rect, [12 x %struct.nk_vec2], %struct.nk_convert_config, ptr, ptr, ptr, i32, i32, i32, i64, i32, i32, i32, i32 }
%struct.nk_rect = type { float, float, float, float }
%struct.nk_convert_config = type { float, i32, i32, i32, i32, i32, %struct.nk_draw_null_texture, ptr, i64, i64 }
%struct.nk_draw_null_texture = type { %union.nk_handle, %struct.nk_vec2 }
%union.nk_handle = type { ptr }
%struct.nk_buffer = type { [2 x %struct.nk_buffer_marker], %struct.nk_allocator, i32, %struct.nk_memory, float, i64, i64, i64, i64 }
%struct.nk_buffer_marker = type { i32, i64 }
%struct.nk_allocator = type { %union.nk_handle, ptr, ptr }
%struct.nk_memory = type { ptr, i64 }

@.str.1 = external hidden unnamed_addr constant [86 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [5 x i8], align 1
@__PRETTY_FUNCTION__.nk_draw_list_fill_poly_convex = external hidden unnamed_addr constant [142 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> @nk_vec2(float noundef, float noundef) #1

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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #4

; Function Attrs: 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 void @nk_color_fv(ptr noundef, i32) #5

; Function Attrs: mustprogress uwtable
declare hidden noundef ptr @_ZL15nk_buffer_allocP9nk_buffer25nk_buffer_allocation_typemm(ptr noundef, i32 noundef, i64 noundef, i64 noundef) #6

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

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

; Function Attrs: mustprogress uwtable
declare hidden noundef ptr @_ZL27nk_draw_list_alloc_verticesP12nk_draw_listm(ptr noundef, i64 noundef) #6

; Function Attrs: mustprogress uwtable
declare hidden noundef ptr @_ZL27nk_draw_list_alloc_elementsP12nk_draw_listm(ptr noundef, i64 noundef) #6

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef float @_ZL11nk_inv_sqrtf(float noundef) #5

; Function Attrs: mustprogress uwtable
declare hidden noundef ptr @_ZL14nk_draw_vertexPvPK17nk_convert_config7nk_vec2S3_9nk_colorf(ptr noundef, ptr noundef, <2 x float>, <2 x float>, <2 x float>, <2 x float>) #7

; Function Attrs: mustprogress uwtable
define dso_local void @nk_draw_list_fill_poly_convex(ptr noundef %0, ptr noundef %1, i32 noundef %2, i32 %3, i32 noundef %4) #7 {
  %6 = alloca %struct.nk_color, align 1
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca %struct.nk_colorf, align 4
  %12 = alloca %struct.nk_colorf, align 4
  %13 = alloca i32, align 4
  %14 = alloca %struct.nk_color, align 1
  %15 = alloca i64, align 8
  %16 = alloca i64, align 8
  %17 = alloca i64, align 8
  %18 = alloca float, align 4
  %19 = alloca i64, align 8
  %20 = alloca i64, align 8
  %21 = alloca i64, align 8
  %22 = alloca i64, align 8
  %23 = alloca ptr, align 8
  %24 = alloca ptr, align 8
  %25 = alloca i64, align 8
  %26 = alloca ptr, align 8
  %27 = alloca i32, align 4
  %28 = alloca i32, align 4
  %29 = alloca %struct.nk_vec2, align 4
  %30 = alloca %struct.nk_vec2, align 4
  %31 = alloca %struct.nk_vec2, align 4
  %32 = alloca float, align 4
  %33 = alloca %struct.nk_vec2, align 4
  %34 = alloca %struct.nk_vec2, align 4
  %35 = alloca %struct.nk_vec2, align 4
  %36 = alloca %struct.nk_vec2, align 4
  %37 = alloca %struct.nk_vec2, align 4
  %38 = alloca %struct.nk_vec2, align 4
  %39 = alloca %struct.nk_vec2, align 4
  %40 = alloca float, align 4
  %41 = alloca float, align 4
  %42 = alloca %struct.nk_vec2, align 4
  %43 = alloca %struct.nk_vec2, align 4
  %44 = alloca %struct.nk_vec2, align 4
  %45 = alloca %struct.nk_vec2, align 4
  %46 = alloca %struct.nk_colorf, align 4
  %47 = alloca %struct.nk_vec2, align 4
  %48 = alloca %struct.nk_vec2, align 4
  %49 = alloca %struct.nk_colorf, align 4
  %50 = alloca i64, align 8
  %51 = alloca i64, align 8
  %52 = alloca i64, align 8
  %53 = alloca i64, align 8
  %54 = alloca ptr, align 8
  %55 = alloca ptr, align 8
  %56 = alloca %struct.nk_vec2, align 4
  %57 = alloca %struct.nk_vec2, align 4
  %58 = alloca %struct.nk_colorf, align 4
  store i32 %3, ptr %6, align 1
  store ptr %0, ptr %7, align 8, !tbaa !5
  store ptr %1, ptr %8, align 8, !tbaa !5
  store i32 %2, ptr %9, align 4, !tbaa !9
  store i32 %4, ptr %10, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 16, ptr %11) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr %12) #8
  %59 = load ptr, ptr %7, align 8, !tbaa !5
  %60 = icmp ne ptr %59, null
  br i1 %60, label %61, label %62

61:                                               ; preds = %5
  br label %64

62:                                               ; preds = %5
  call void @__assert_fail(ptr noundef @.str.25, ptr noundef @.str.1, i32 noundef 10062, ptr noundef @__PRETTY_FUNCTION__.nk_draw_list_fill_poly_convex) #9
  unreachable

63:                                               ; No predecessors!
  br label %64

64:                                               ; preds = %63, %61
  %65 = load ptr, ptr %7, align 8, !tbaa !5
  %66 = icmp ne ptr %65, null
  br i1 %66, label %67, label %70

67:                                               ; preds = %64
  %68 = load i32, ptr %9, align 4, !tbaa !9
  %69 = icmp ult i32 %68, 3
  br i1 %69, label %70, label %71

70:                                               ; preds = %67, %64
  store i32 1, ptr %13, align 4
  br label %540

71:                                               ; preds = %67
  %72 = getelementptr inbounds %struct.nk_color, ptr %6, i32 0, i32 3
  %73 = load i8, ptr %72, align 1, !tbaa !13
  %74 = uitofp i8 %73 to float
  %75 = load ptr, ptr %7, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.nk_draw_list, ptr %75, i32 0, i32 2
  %77 = getelementptr inbounds %struct.nk_convert_config, ptr %76, i32 0, i32 0
  %78 = load float, ptr %77, align 8, !tbaa !15
  %79 = fmul float %74, %78
  %80 = fptoui float %79 to i8
  %81 = getelementptr inbounds %struct.nk_color, ptr %6, i32 0, i32 3
  store i8 %80, ptr %81, align 1, !tbaa !13
  %82 = getelementptr inbounds %struct.nk_colorf, ptr %11, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %14, ptr align 1 %6, i64 4, i1 false), !tbaa.struct !23
  %83 = load i32, ptr %14, align 1
  call void @nk_color_fv(ptr noundef %82, i32 %83)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %12, ptr align 4 %11, i64 16, i1 false), !tbaa.struct !25
  %84 = getelementptr inbounds %struct.nk_colorf, ptr %12, i32 0, i32 3
  store float 0.000000e+00, ptr %84, align 4, !tbaa !27
  %85 = load i32, ptr %10, align 4, !tbaa !11
  %86 = icmp eq i32 %85, 1
  br i1 %86, label %87, label %457

87:                                               ; preds = %71
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #8
  store i64 0, ptr %15, align 8, !tbaa !29
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #8
  store i64 0, ptr %16, align 8, !tbaa !29
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #8
  store i64 0, ptr %17, align 8, !tbaa !29
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #8
  store float 1.000000e+00, ptr %18, align 4, !tbaa !26
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #8
  store i64 0, ptr %19, align 8, !tbaa !29
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #8
  %88 = load ptr, ptr %7, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct.nk_draw_list, ptr %88, i32 0, i32 7
  %90 = load i32, ptr %89, align 4, !tbaa !30
  %91 = zext i32 %90 to i64
  store i64 %91, ptr %20, align 8, !tbaa !29
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #8
  %92 = load i32, ptr %9, align 4, !tbaa !9
  %93 = sub i32 %92, 2
  %94 = mul i32 %93, 3
  %95 = load i32, ptr %9, align 4, !tbaa !9
  %96 = mul i32 %95, 6
  %97 = add i32 %94, %96
  %98 = zext i32 %97 to i64
  store i64 %98, ptr %21, align 8, !tbaa !29
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #8
  %99 = load i32, ptr %9, align 4, !tbaa !9
  %100 = mul i32 %99, 2
  %101 = zext i32 %100 to i64
  store i64 %101, ptr %22, align 8, !tbaa !29
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #8
  %102 = load ptr, ptr %7, align 8, !tbaa !5
  %103 = load i64, ptr %22, align 8, !tbaa !29
  %104 = call noundef ptr @_ZL27nk_draw_list_alloc_verticesP12nk_draw_listm(ptr noundef %102, i64 noundef %103)
  store ptr %104, ptr %23, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #8
  %105 = load ptr, ptr %7, align 8, !tbaa !5
  %106 = load i64, ptr %21, align 8, !tbaa !29
  %107 = call noundef ptr @_ZL27nk_draw_list_alloc_elementsP12nk_draw_listm(ptr noundef %105, i64 noundef %106)
  store ptr %107, ptr %24, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #8
  store i64 0, ptr %25, align 8, !tbaa !29
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #8
  store ptr null, ptr %26, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #8
  %108 = load i64, ptr %20, align 8, !tbaa !29
  %109 = add i64 %108, 0
  %110 = trunc i64 %109 to i32
  store i32 %110, ptr %27, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #8
  %111 = load i64, ptr %20, align 8, !tbaa !29
  %112 = add i64 %111, 1
  %113 = trunc i64 %112 to i32
  store i32 %113, ptr %28, align 4, !tbaa !9
  %114 = load ptr, ptr %23, align 8, !tbaa !5
  %115 = icmp ne ptr %114, null
  br i1 %115, label %116, label %119

116:                                              ; preds = %87
  %117 = load ptr, ptr %24, align 8, !tbaa !5
  %118 = icmp ne ptr %117, null
  br i1 %118, label %120, label %119

119:                                              ; preds = %116, %87
  store i32 1, ptr %13, align 4
  br label %454

120:                                              ; preds = %116
  %121 = load ptr, ptr %23, align 8, !tbaa !5
  %122 = load ptr, ptr %7, align 8, !tbaa !5
  %123 = getelementptr inbounds %struct.nk_draw_list, ptr %122, i32 0, i32 4
  %124 = load ptr, ptr %123, align 8, !tbaa !31
  %125 = getelementptr inbounds %struct.nk_buffer, ptr %124, i32 0, i32 3
  %126 = getelementptr inbounds %struct.nk_memory, ptr %125, i32 0, i32 0
  %127 = load ptr, ptr %126, align 8, !tbaa !32
  %128 = ptrtoint ptr %121 to i64
  %129 = ptrtoint ptr %127 to i64
  %130 = sub i64 %128, %129
  store i64 %130, ptr %19, align 8, !tbaa !29
  %131 = load ptr, ptr %7, align 8, !tbaa !5
  %132 = getelementptr inbounds %struct.nk_draw_list, ptr %131, i32 0, i32 4
  %133 = load ptr, ptr %132, align 8, !tbaa !31
  call void @nk_buffer_mark(ptr noundef %133, i32 noundef 0)
  %134 = load i32, ptr %9, align 4, !tbaa !9
  %135 = zext i32 %134 to i64
  %136 = mul i64 8, %135
  store i64 %136, ptr %25, align 8, !tbaa !29
  %137 = load ptr, ptr %7, align 8, !tbaa !5
  %138 = getelementptr inbounds %struct.nk_draw_list, ptr %137, i32 0, i32 4
  %139 = load ptr, ptr %138, align 8, !tbaa !31
  %140 = load i64, ptr %25, align 8, !tbaa !29
  %141 = call noundef ptr @_ZL15nk_buffer_allocP9nk_buffer25nk_buffer_allocation_typemm(ptr noundef %139, i32 noundef 0, i64 noundef %140, i64 noundef 4)
  store ptr %141, ptr %26, align 8, !tbaa !5
  %142 = load ptr, ptr %26, align 8, !tbaa !5
  %143 = icmp ne ptr %142, null
  br i1 %143, label %145, label %144

144:                                              ; preds = %120
  store i32 1, ptr %13, align 4
  br label %454

145:                                              ; preds = %120
  %146 = load ptr, ptr %7, align 8, !tbaa !5
  %147 = getelementptr inbounds %struct.nk_draw_list, ptr %146, i32 0, i32 4
  %148 = load ptr, ptr %147, align 8, !tbaa !31
  %149 = getelementptr inbounds %struct.nk_buffer, ptr %148, i32 0, i32 3
  %150 = getelementptr inbounds %struct.nk_memory, ptr %149, i32 0, i32 0
  %151 = load ptr, ptr %150, align 8, !tbaa !32
  %152 = load i64, ptr %19, align 8, !tbaa !29
  %153 = getelementptr inbounds i8, ptr %151, i64 %152
  store ptr %153, ptr %23, align 8, !tbaa !5
  store i64 2, ptr %15, align 8, !tbaa !29
  br label %154

154:                                              ; preds = %183, %145
  %155 = load i64, ptr %15, align 8, !tbaa !29
  %156 = load i32, ptr %9, align 4, !tbaa !9
  %157 = zext i32 %156 to i64
  %158 = icmp ult i64 %155, %157
  br i1 %158, label %159, label %186

159:                                              ; preds = %154
  %160 = load i32, ptr %27, align 4, !tbaa !9
  %161 = trunc i32 %160 to i16
  %162 = load ptr, ptr %24, align 8, !tbaa !5
  %163 = getelementptr inbounds i16, ptr %162, i64 0
  store i16 %161, ptr %163, align 2, !tbaa !37
  %164 = load i32, ptr %27, align 4, !tbaa !9
  %165 = zext i32 %164 to i64
  %166 = load i64, ptr %15, align 8, !tbaa !29
  %167 = sub i64 %166, 1
  %168 = shl i64 %167, 1
  %169 = add i64 %165, %168
  %170 = trunc i64 %169 to i16
  %171 = load ptr, ptr %24, align 8, !tbaa !5
  %172 = getelementptr inbounds i16, ptr %171, i64 1
  store i16 %170, ptr %172, align 2, !tbaa !37
  %173 = load i32, ptr %27, align 4, !tbaa !9
  %174 = zext i32 %173 to i64
  %175 = load i64, ptr %15, align 8, !tbaa !29
  %176 = shl i64 %175, 1
  %177 = add i64 %174, %176
  %178 = trunc i64 %177 to i16
  %179 = load ptr, ptr %24, align 8, !tbaa !5
  %180 = getelementptr inbounds i16, ptr %179, i64 2
  store i16 %178, ptr %180, align 2, !tbaa !37
  %181 = load ptr, ptr %24, align 8, !tbaa !5
  %182 = getelementptr inbounds i16, ptr %181, i64 3
  store ptr %182, ptr %24, align 8, !tbaa !5
  br label %183

183:                                              ; preds = %159
  %184 = load i64, ptr %15, align 8, !tbaa !29
  %185 = add i64 %184, 1
  store i64 %185, ptr %15, align 8, !tbaa !29
  br label %154, !llvm.loop !39

186:                                              ; preds = %154
  %187 = load i32, ptr %9, align 4, !tbaa !9
  %188 = sub i32 %187, 1
  %189 = zext i32 %188 to i64
  store i64 %189, ptr %16, align 8, !tbaa !29
  store i64 0, ptr %17, align 8, !tbaa !29
  br label %190

190:                                              ; preds = %252, %186
  %191 = load i64, ptr %17, align 8, !tbaa !29
  %192 = load i32, ptr %9, align 4, !tbaa !9
  %193 = zext i32 %192 to i64
  %194 = icmp ult i64 %191, %193
  br i1 %194, label %195, label %255

195:                                              ; preds = %190
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #8
  %196 = load ptr, ptr %8, align 8, !tbaa !5
  %197 = load i64, ptr %16, align 8, !tbaa !29
  %198 = getelementptr inbounds %struct.nk_vec2, ptr %196, i64 %197
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %29, ptr align 4 %198, i64 8, i1 false), !tbaa.struct !41
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #8
  %199 = load ptr, ptr %8, align 8, !tbaa !5
  %200 = load i64, ptr %17, align 8, !tbaa !29
  %201 = getelementptr inbounds %struct.nk_vec2, ptr %199, i64 %200
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %30, ptr align 4 %201, i64 8, i1 false), !tbaa.struct !41
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #8
  %202 = getelementptr inbounds %struct.nk_vec2, ptr %30, i32 0, i32 0
  %203 = load float, ptr %202, align 4, !tbaa !42
  %204 = getelementptr inbounds %struct.nk_vec2, ptr %29, i32 0, i32 0
  %205 = load float, ptr %204, align 4, !tbaa !42
  %206 = fsub float %203, %205
  %207 = getelementptr inbounds %struct.nk_vec2, ptr %30, i32 0, i32 1
  %208 = load float, ptr %207, align 4, !tbaa !43
  %209 = getelementptr inbounds %struct.nk_vec2, ptr %29, i32 0, i32 1
  %210 = load float, ptr %209, align 4, !tbaa !43
  %211 = fsub float %208, %210
  %212 = call <2 x float> @nk_vec2(float noundef %206, float noundef %211)
  store <2 x float> %212, ptr %31, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #8
  %213 = getelementptr inbounds %struct.nk_vec2, ptr %31, i32 0, i32 0
  %214 = load float, ptr %213, align 4, !tbaa !42
  %215 = getelementptr inbounds %struct.nk_vec2, ptr %31, i32 0, i32 0
  %216 = load float, ptr %215, align 4, !tbaa !42
  %217 = getelementptr inbounds %struct.nk_vec2, ptr %31, i32 0, i32 1
  %218 = load float, ptr %217, align 4, !tbaa !43
  %219 = getelementptr inbounds %struct.nk_vec2, ptr %31, i32 0, i32 1
  %220 = load float, ptr %219, align 4, !tbaa !43
  %221 = fmul float %218, %220
  %222 = call float @llvm.fmuladd.f32(float %214, float %216, float %221)
  store float %222, ptr %32, align 4, !tbaa !26
  %223 = load float, ptr %32, align 4, !tbaa !26
  %224 = fcmp une float %223, 0.000000e+00
  br i1 %224, label %225, label %228

225:                                              ; preds = %195
  %226 = load float, ptr %32, align 4, !tbaa !26
  %227 = call noundef float @_ZL11nk_inv_sqrtf(float noundef %226)
  store float %227, ptr %32, align 4, !tbaa !26
  br label %229

228:                                              ; preds = %195
  store float 1.000000e+00, ptr %32, align 4, !tbaa !26
  br label %229

229:                                              ; preds = %228, %225
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #8
  %230 = getelementptr inbounds %struct.nk_vec2, ptr %31, i32 0, i32 0
  %231 = load float, ptr %230, align 4, !tbaa !42
  %232 = load float, ptr %32, align 4, !tbaa !26
  %233 = fmul float %231, %232
  %234 = getelementptr inbounds %struct.nk_vec2, ptr %31, i32 0, i32 1
  %235 = load float, ptr %234, align 4, !tbaa !43
  %236 = load float, ptr %32, align 4, !tbaa !26
  %237 = fmul float %235, %236
  %238 = call <2 x float> @nk_vec2(float noundef %233, float noundef %237)
  store <2 x float> %238, ptr %33, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %31, ptr align 4 %33, i64 8, i1 false), !tbaa.struct !41
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #8
  %239 = getelementptr inbounds %struct.nk_vec2, ptr %31, i32 0, i32 1
  %240 = load float, ptr %239, align 4, !tbaa !43
  %241 = load ptr, ptr %26, align 8, !tbaa !5
  %242 = load i64, ptr %16, align 8, !tbaa !29
  %243 = getelementptr inbounds %struct.nk_vec2, ptr %241, i64 %242
  %244 = getelementptr inbounds %struct.nk_vec2, ptr %243, i32 0, i32 0
  store float %240, ptr %244, align 4, !tbaa !42
  %245 = getelementptr inbounds %struct.nk_vec2, ptr %31, i32 0, i32 0
  %246 = load float, ptr %245, align 4, !tbaa !42
  %247 = fneg float %246
  %248 = load ptr, ptr %26, align 8, !tbaa !5
  %249 = load i64, ptr %16, align 8, !tbaa !29
  %250 = getelementptr inbounds %struct.nk_vec2, ptr %248, i64 %249
  %251 = getelementptr inbounds %struct.nk_vec2, ptr %250, i32 0, i32 1
  store float %247, ptr %251, align 4, !tbaa !43
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #8
  br label %252

252:                                              ; preds = %229
  %253 = load i64, ptr %17, align 8, !tbaa !29
  %254 = add i64 %253, 1
  store i64 %254, ptr %17, align 8, !tbaa !29
  store i64 %253, ptr %16, align 8, !tbaa !29
  br label %190, !llvm.loop !44

255:                                              ; preds = %190
  %256 = load i32, ptr %9, align 4, !tbaa !9
  %257 = sub i32 %256, 1
  %258 = zext i32 %257 to i64
  store i64 %258, ptr %16, align 8, !tbaa !29
  store i64 0, ptr %17, align 8, !tbaa !29
  br label %259

259:                                              ; preds = %447, %255
  %260 = load i64, ptr %17, align 8, !tbaa !29
  %261 = load i32, ptr %9, align 4, !tbaa !9
  %262 = zext i32 %261 to i64
  %263 = icmp ult i64 %260, %262
  br i1 %263, label %264, label %450

264:                                              ; preds = %259
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #8
  %265 = load ptr, ptr %7, align 8, !tbaa !5
  %266 = getelementptr inbounds %struct.nk_draw_list, ptr %265, i32 0, i32 2
  %267 = getelementptr inbounds %struct.nk_convert_config, ptr %266, i32 0, i32 6
  %268 = getelementptr inbounds %struct.nk_draw_null_texture, ptr %267, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %34, ptr align 8 %268, i64 8, i1 false), !tbaa.struct !41
  call void @llvm.lifetime.start.p0(i64 8, ptr %35) #8
  %269 = load ptr, ptr %26, align 8, !tbaa !5
  %270 = load i64, ptr %16, align 8, !tbaa !29
  %271 = getelementptr inbounds %struct.nk_vec2, ptr %269, i64 %270
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %35, ptr align 4 %271, i64 8, i1 false), !tbaa.struct !41
  call void @llvm.lifetime.start.p0(i64 8, ptr %36) #8
  %272 = load ptr, ptr %26, align 8, !tbaa !5
  %273 = load i64, ptr %17, align 8, !tbaa !29
  %274 = getelementptr inbounds %struct.nk_vec2, ptr %272, i64 %273
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %36, ptr align 4 %274, i64 8, i1 false), !tbaa.struct !41
  call void @llvm.lifetime.start.p0(i64 8, ptr %37) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %38) #8
  %275 = getelementptr inbounds %struct.nk_vec2, ptr %35, i32 0, i32 0
  %276 = load float, ptr %275, align 4, !tbaa !42
  %277 = getelementptr inbounds %struct.nk_vec2, ptr %36, i32 0, i32 0
  %278 = load float, ptr %277, align 4, !tbaa !42
  %279 = fadd float %276, %278
  %280 = getelementptr inbounds %struct.nk_vec2, ptr %35, i32 0, i32 1
  %281 = load float, ptr %280, align 4, !tbaa !43
  %282 = getelementptr inbounds %struct.nk_vec2, ptr %36, i32 0, i32 1
  %283 = load float, ptr %282, align 4, !tbaa !43
  %284 = fadd float %281, %283
  %285 = call <2 x float> @nk_vec2(float noundef %279, float noundef %284)
  store <2 x float> %285, ptr %38, align 4
  %286 = getelementptr inbounds %struct.nk_vec2, ptr %38, i32 0, i32 0
  %287 = load float, ptr %286, align 4, !tbaa !42
  %288 = fmul float %287, 5.000000e-01
  call void @llvm.lifetime.start.p0(i64 8, ptr %39) #8
  %289 = getelementptr inbounds %struct.nk_vec2, ptr %35, i32 0, i32 0
  %290 = load float, ptr %289, align 4, !tbaa !42
  %291 = getelementptr inbounds %struct.nk_vec2, ptr %36, i32 0, i32 0
  %292 = load float, ptr %291, align 4, !tbaa !42
  %293 = fadd float %290, %292
  %294 = getelementptr inbounds %struct.nk_vec2, ptr %35, i32 0, i32 1
  %295 = load float, ptr %294, align 4, !tbaa !43
  %296 = getelementptr inbounds %struct.nk_vec2, ptr %36, i32 0, i32 1
  %297 = load float, ptr %296, align 4, !tbaa !43
  %298 = fadd float %295, %297
  %299 = call <2 x float> @nk_vec2(float noundef %293, float noundef %298)
  store <2 x float> %299, ptr %39, align 4
  %300 = getelementptr inbounds %struct.nk_vec2, ptr %39, i32 0, i32 1
  %301 = load float, ptr %300, align 4, !tbaa !43
  %302 = fmul float %301, 5.000000e-01
  %303 = call <2 x float> @nk_vec2(float noundef %288, float noundef %302)
  store <2 x float> %303, ptr %37, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %39) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %40) #8
  %304 = getelementptr inbounds %struct.nk_vec2, ptr %37, i32 0, i32 0
  %305 = load float, ptr %304, align 4, !tbaa !42
  %306 = getelementptr inbounds %struct.nk_vec2, ptr %37, i32 0, i32 0
  %307 = load float, ptr %306, align 4, !tbaa !42
  %308 = getelementptr inbounds %struct.nk_vec2, ptr %37, i32 0, i32 1
  %309 = load float, ptr %308, align 4, !tbaa !43
  %310 = getelementptr inbounds %struct.nk_vec2, ptr %37, i32 0, i32 1
  %311 = load float, ptr %310, align 4, !tbaa !43
  %312 = fmul float %309, %311
  %313 = call float @llvm.fmuladd.f32(float %305, float %307, float %312)
  store float %313, ptr %40, align 4, !tbaa !26
  %314 = load float, ptr %40, align 4, !tbaa !26
  %315 = fcmp ogt float %314, 0x3EB0C6F7A0000000
  br i1 %315, label %316, label %335

316:                                              ; preds = %264
  call void @llvm.lifetime.start.p0(i64 4, ptr %41) #8
  %317 = load float, ptr %40, align 4, !tbaa !26
  %318 = fdiv float 1.000000e+00, %317
  store float %318, ptr %41, align 4, !tbaa !26
  %319 = load float, ptr %41, align 4, !tbaa !26
  %320 = fcmp olt float %319, 1.000000e+02
  br i1 %320, label %321, label %323

321:                                              ; preds = %316
  %322 = load float, ptr %41, align 4, !tbaa !26
  br label %324

323:                                              ; preds = %316
  br label %324

324:                                              ; preds = %323, %321
  %325 = phi float [ %322, %321 ], [ 1.000000e+02, %323 ]
  store float %325, ptr %41, align 4, !tbaa !26
  call void @llvm.lifetime.start.p0(i64 8, ptr %42) #8
  %326 = getelementptr inbounds %struct.nk_vec2, ptr %37, i32 0, i32 0
  %327 = load float, ptr %326, align 4, !tbaa !42
  %328 = load float, ptr %41, align 4, !tbaa !26
  %329 = fmul float %327, %328
  %330 = getelementptr inbounds %struct.nk_vec2, ptr %37, i32 0, i32 1
  %331 = load float, ptr %330, align 4, !tbaa !43
  %332 = load float, ptr %41, align 4, !tbaa !26
  %333 = fmul float %331, %332
  %334 = call <2 x float> @nk_vec2(float noundef %329, float noundef %333)
  store <2 x float> %334, ptr %42, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %37, ptr align 4 %42, i64 8, i1 false), !tbaa.struct !41
  call void @llvm.lifetime.end.p0(i64 8, ptr %42) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %41) #8
  br label %335

335:                                              ; preds = %324, %264
  call void @llvm.lifetime.start.p0(i64 8, ptr %43) #8
  %336 = getelementptr inbounds %struct.nk_vec2, ptr %37, i32 0, i32 0
  %337 = load float, ptr %336, align 4, !tbaa !42
  %338 = fmul float %337, 5.000000e-01
  %339 = getelementptr inbounds %struct.nk_vec2, ptr %37, i32 0, i32 1
  %340 = load float, ptr %339, align 4, !tbaa !43
  %341 = fmul float %340, 5.000000e-01
  %342 = call <2 x float> @nk_vec2(float noundef %338, float noundef %341)
  store <2 x float> %342, ptr %43, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %37, ptr align 4 %43, i64 8, i1 false), !tbaa.struct !41
  call void @llvm.lifetime.end.p0(i64 8, ptr %43) #8
  %343 = load ptr, ptr %23, align 8, !tbaa !5
  %344 = load ptr, ptr %7, align 8, !tbaa !5
  %345 = getelementptr inbounds %struct.nk_draw_list, ptr %344, i32 0, i32 2
  %346 = load ptr, ptr %8, align 8, !tbaa !5
  %347 = load i64, ptr %17, align 8, !tbaa !29
  %348 = getelementptr inbounds %struct.nk_vec2, ptr %346, i64 %347
  %349 = getelementptr inbounds %struct.nk_vec2, ptr %348, i32 0, i32 0
  %350 = load float, ptr %349, align 4, !tbaa !42
  %351 = getelementptr inbounds %struct.nk_vec2, ptr %37, i32 0, i32 0
  %352 = load float, ptr %351, align 4, !tbaa !42
  %353 = fsub float %350, %352
  %354 = load ptr, ptr %8, align 8, !tbaa !5
  %355 = load i64, ptr %17, align 8, !tbaa !29
  %356 = getelementptr inbounds %struct.nk_vec2, ptr %354, i64 %355
  %357 = getelementptr inbounds %struct.nk_vec2, ptr %356, i32 0, i32 1
  %358 = load float, ptr %357, align 4, !tbaa !43
  %359 = getelementptr inbounds %struct.nk_vec2, ptr %37, i32 0, i32 1
  %360 = load float, ptr %359, align 4, !tbaa !43
  %361 = fsub float %358, %360
  %362 = call <2 x float> @nk_vec2(float noundef %353, float noundef %361)
  store <2 x float> %362, ptr %44, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %45, ptr align 4 %34, i64 8, i1 false), !tbaa.struct !41
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %46, ptr align 4 %11, i64 16, i1 false), !tbaa.struct !25
  %363 = load <2 x float>, ptr %44, align 4
  %364 = load <2 x float>, ptr %45, align 4
  %365 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %46, i32 0, i32 0
  %366 = load <2 x float>, ptr %365, align 4
  %367 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %46, i32 0, i32 1
  %368 = load <2 x float>, ptr %367, align 4
  %369 = call noundef ptr @_ZL14nk_draw_vertexPvPK17nk_convert_config7nk_vec2S3_9nk_colorf(ptr noundef %343, ptr noundef %345, <2 x float> %363, <2 x float> %364, <2 x float> %366, <2 x float> %368)
  store ptr %369, ptr %23, align 8, !tbaa !5
  %370 = load ptr, ptr %23, align 8, !tbaa !5
  %371 = load ptr, ptr %7, align 8, !tbaa !5
  %372 = getelementptr inbounds %struct.nk_draw_list, ptr %371, i32 0, i32 2
  %373 = load ptr, ptr %8, align 8, !tbaa !5
  %374 = load i64, ptr %17, align 8, !tbaa !29
  %375 = getelementptr inbounds %struct.nk_vec2, ptr %373, i64 %374
  %376 = getelementptr inbounds %struct.nk_vec2, ptr %375, i32 0, i32 0
  %377 = load float, ptr %376, align 4, !tbaa !42
  %378 = getelementptr inbounds %struct.nk_vec2, ptr %37, i32 0, i32 0
  %379 = load float, ptr %378, align 4, !tbaa !42
  %380 = fadd float %377, %379
  %381 = load ptr, ptr %8, align 8, !tbaa !5
  %382 = load i64, ptr %17, align 8, !tbaa !29
  %383 = getelementptr inbounds %struct.nk_vec2, ptr %381, i64 %382
  %384 = getelementptr inbounds %struct.nk_vec2, ptr %383, i32 0, i32 1
  %385 = load float, ptr %384, align 4, !tbaa !43
  %386 = getelementptr inbounds %struct.nk_vec2, ptr %37, i32 0, i32 1
  %387 = load float, ptr %386, align 4, !tbaa !43
  %388 = fadd float %385, %387
  %389 = call <2 x float> @nk_vec2(float noundef %380, float noundef %388)
  store <2 x float> %389, ptr %47, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %48, ptr align 4 %34, i64 8, i1 false), !tbaa.struct !41
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %49, ptr align 4 %12, i64 16, i1 false), !tbaa.struct !25
  %390 = load <2 x float>, ptr %47, align 4
  %391 = load <2 x float>, ptr %48, align 4
  %392 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %49, i32 0, i32 0
  %393 = load <2 x float>, ptr %392, align 4
  %394 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %49, i32 0, i32 1
  %395 = load <2 x float>, ptr %394, align 4
  %396 = call noundef ptr @_ZL14nk_draw_vertexPvPK17nk_convert_config7nk_vec2S3_9nk_colorf(ptr noundef %370, ptr noundef %372, <2 x float> %390, <2 x float> %391, <2 x float> %393, <2 x float> %395)
  store ptr %396, ptr %23, align 8, !tbaa !5
  %397 = load i32, ptr %27, align 4, !tbaa !9
  %398 = zext i32 %397 to i64
  %399 = load i64, ptr %17, align 8, !tbaa !29
  %400 = shl i64 %399, 1
  %401 = add i64 %398, %400
  %402 = trunc i64 %401 to i16
  %403 = load ptr, ptr %24, align 8, !tbaa !5
  %404 = getelementptr inbounds i16, ptr %403, i64 0
  store i16 %402, ptr %404, align 2, !tbaa !37
  %405 = load i32, ptr %27, align 4, !tbaa !9
  %406 = zext i32 %405 to i64
  %407 = load i64, ptr %16, align 8, !tbaa !29
  %408 = shl i64 %407, 1
  %409 = add i64 %406, %408
  %410 = trunc i64 %409 to i16
  %411 = load ptr, ptr %24, align 8, !tbaa !5
  %412 = getelementptr inbounds i16, ptr %411, i64 1
  store i16 %410, ptr %412, align 2, !tbaa !37
  %413 = load i32, ptr %28, align 4, !tbaa !9
  %414 = zext i32 %413 to i64
  %415 = load i64, ptr %16, align 8, !tbaa !29
  %416 = shl i64 %415, 1
  %417 = add i64 %414, %416
  %418 = trunc i64 %417 to i16
  %419 = load ptr, ptr %24, align 8, !tbaa !5
  %420 = getelementptr inbounds i16, ptr %419, i64 2
  store i16 %418, ptr %420, align 2, !tbaa !37
  %421 = load i32, ptr %28, align 4, !tbaa !9
  %422 = zext i32 %421 to i64
  %423 = load i64, ptr %16, align 8, !tbaa !29
  %424 = shl i64 %423, 1
  %425 = add i64 %422, %424
  %426 = trunc i64 %425 to i16
  %427 = load ptr, ptr %24, align 8, !tbaa !5
  %428 = getelementptr inbounds i16, ptr %427, i64 3
  store i16 %426, ptr %428, align 2, !tbaa !37
  %429 = load i32, ptr %28, align 4, !tbaa !9
  %430 = zext i32 %429 to i64
  %431 = load i64, ptr %17, align 8, !tbaa !29
  %432 = shl i64 %431, 1
  %433 = add i64 %430, %432
  %434 = trunc i64 %433 to i16
  %435 = load ptr, ptr %24, align 8, !tbaa !5
  %436 = getelementptr inbounds i16, ptr %435, i64 4
  store i16 %434, ptr %436, align 2, !tbaa !37
  %437 = load i32, ptr %27, align 4, !tbaa !9
  %438 = zext i32 %437 to i64
  %439 = load i64, ptr %17, align 8, !tbaa !29
  %440 = shl i64 %439, 1
  %441 = add i64 %438, %440
  %442 = trunc i64 %441 to i16
  %443 = load ptr, ptr %24, align 8, !tbaa !5
  %444 = getelementptr inbounds i16, ptr %443, i64 5
  store i16 %442, ptr %444, align 2, !tbaa !37
  %445 = load ptr, ptr %24, align 8, !tbaa !5
  %446 = getelementptr inbounds i16, ptr %445, i64 6
  store ptr %446, ptr %24, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %40) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #8
  br label %447

447:                                              ; preds = %335
  %448 = load i64, ptr %17, align 8, !tbaa !29
  %449 = add i64 %448, 1
  store i64 %449, ptr %17, align 8, !tbaa !29
  store i64 %448, ptr %16, align 8, !tbaa !29
  br label %259, !llvm.loop !45

450:                                              ; preds = %259
  %451 = load ptr, ptr %7, align 8, !tbaa !5
  %452 = getelementptr inbounds %struct.nk_draw_list, ptr %451, i32 0, i32 4
  %453 = load ptr, ptr %452, align 8, !tbaa !31
  call void @nk_buffer_reset(ptr noundef %453, i32 noundef 0)
  store i32 0, ptr %13, align 4
  br label %454

454:                                              ; preds = %450, %144, %119
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #8
  %455 = load i32, ptr %13, align 4
  switch i32 %455, label %540 [
    i32 0, label %456
  ]

456:                                              ; preds = %454
  br label %539

457:                                              ; preds = %71
  call void @llvm.lifetime.start.p0(i64 8, ptr %50) #8
  store i64 0, ptr %50, align 8, !tbaa !29
  call void @llvm.lifetime.start.p0(i64 8, ptr %51) #8
  %458 = load ptr, ptr %7, align 8, !tbaa !5
  %459 = getelementptr inbounds %struct.nk_draw_list, ptr %458, i32 0, i32 7
  %460 = load i32, ptr %459, align 4, !tbaa !30
  %461 = zext i32 %460 to i64
  store i64 %461, ptr %51, align 8, !tbaa !29
  call void @llvm.lifetime.start.p0(i64 8, ptr %52) #8
  %462 = load i32, ptr %9, align 4, !tbaa !9
  %463 = sub i32 %462, 2
  %464 = mul i32 %463, 3
  %465 = zext i32 %464 to i64
  store i64 %465, ptr %52, align 8, !tbaa !29
  call void @llvm.lifetime.start.p0(i64 8, ptr %53) #8
  %466 = load i32, ptr %9, align 4, !tbaa !9
  %467 = zext i32 %466 to i64
  store i64 %467, ptr %53, align 8, !tbaa !29
  call void @llvm.lifetime.start.p0(i64 8, ptr %54) #8
  %468 = load ptr, ptr %7, align 8, !tbaa !5
  %469 = load i64, ptr %53, align 8, !tbaa !29
  %470 = call noundef ptr @_ZL27nk_draw_list_alloc_verticesP12nk_draw_listm(ptr noundef %468, i64 noundef %469)
  store ptr %470, ptr %54, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %55) #8
  %471 = load ptr, ptr %7, align 8, !tbaa !5
  %472 = load i64, ptr %52, align 8, !tbaa !29
  %473 = call noundef ptr @_ZL27nk_draw_list_alloc_elementsP12nk_draw_listm(ptr noundef %471, i64 noundef %472)
  store ptr %473, ptr %55, align 8, !tbaa !5
  %474 = load ptr, ptr %54, align 8, !tbaa !5
  %475 = icmp ne ptr %474, null
  br i1 %475, label %476, label %479

476:                                              ; preds = %457
  %477 = load ptr, ptr %55, align 8, !tbaa !5
  %478 = icmp ne ptr %477, null
  br i1 %478, label %480, label %479

479:                                              ; preds = %476, %457
  store i32 1, ptr %13, align 4
  br label %536

480:                                              ; preds = %476
  store i64 0, ptr %50, align 8, !tbaa !29
  br label %481

481:                                              ; preds = %503, %480
  %482 = load i64, ptr %50, align 8, !tbaa !29
  %483 = load i64, ptr %53, align 8, !tbaa !29
  %484 = icmp ult i64 %482, %483
  br i1 %484, label %485, label %506

485:                                              ; preds = %481
  %486 = load ptr, ptr %54, align 8, !tbaa !5
  %487 = load ptr, ptr %7, align 8, !tbaa !5
  %488 = getelementptr inbounds %struct.nk_draw_list, ptr %487, i32 0, i32 2
  %489 = load ptr, ptr %8, align 8, !tbaa !5
  %490 = load i64, ptr %50, align 8, !tbaa !29
  %491 = getelementptr inbounds %struct.nk_vec2, ptr %489, i64 %490
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %56, ptr align 4 %491, i64 8, i1 false), !tbaa.struct !41
  %492 = load ptr, ptr %7, align 8, !tbaa !5
  %493 = getelementptr inbounds %struct.nk_draw_list, ptr %492, i32 0, i32 2
  %494 = getelementptr inbounds %struct.nk_convert_config, ptr %493, i32 0, i32 6
  %495 = getelementptr inbounds %struct.nk_draw_null_texture, ptr %494, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %57, ptr align 8 %495, i64 8, i1 false), !tbaa.struct !41
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %58, ptr align 4 %11, i64 16, i1 false), !tbaa.struct !25
  %496 = load <2 x float>, ptr %56, align 4
  %497 = load <2 x float>, ptr %57, align 4
  %498 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %58, i32 0, i32 0
  %499 = load <2 x float>, ptr %498, align 4
  %500 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %58, i32 0, i32 1
  %501 = load <2 x float>, ptr %500, align 4
  %502 = call noundef ptr @_ZL14nk_draw_vertexPvPK17nk_convert_config7nk_vec2S3_9nk_colorf(ptr noundef %486, ptr noundef %488, <2 x float> %496, <2 x float> %497, <2 x float> %499, <2 x float> %501)
  store ptr %502, ptr %54, align 8, !tbaa !5
  br label %503

503:                                              ; preds = %485
  %504 = load i64, ptr %50, align 8, !tbaa !29
  %505 = add i64 %504, 1
  store i64 %505, ptr %50, align 8, !tbaa !29
  br label %481, !llvm.loop !46

506:                                              ; preds = %481
  store i64 2, ptr %50, align 8, !tbaa !29
  br label %507

507:                                              ; preds = %532, %506
  %508 = load i64, ptr %50, align 8, !tbaa !29
  %509 = load i32, ptr %9, align 4, !tbaa !9
  %510 = zext i32 %509 to i64
  %511 = icmp ult i64 %508, %510
  br i1 %511, label %512, label %535

512:                                              ; preds = %507
  %513 = load i64, ptr %51, align 8, !tbaa !29
  %514 = trunc i64 %513 to i16
  %515 = load ptr, ptr %55, align 8, !tbaa !5
  %516 = getelementptr inbounds i16, ptr %515, i64 0
  store i16 %514, ptr %516, align 2, !tbaa !37
  %517 = load i64, ptr %51, align 8, !tbaa !29
  %518 = load i64, ptr %50, align 8, !tbaa !29
  %519 = add i64 %517, %518
  %520 = sub i64 %519, 1
  %521 = trunc i64 %520 to i16
  %522 = load ptr, ptr %55, align 8, !tbaa !5
  %523 = getelementptr inbounds i16, ptr %522, i64 1
  store i16 %521, ptr %523, align 2, !tbaa !37
  %524 = load i64, ptr %51, align 8, !tbaa !29
  %525 = load i64, ptr %50, align 8, !tbaa !29
  %526 = add i64 %524, %525
  %527 = trunc i64 %526 to i16
  %528 = load ptr, ptr %55, align 8, !tbaa !5
  %529 = getelementptr inbounds i16, ptr %528, i64 2
  store i16 %527, ptr %529, align 2, !tbaa !37
  %530 = load ptr, ptr %55, align 8, !tbaa !5
  %531 = getelementptr inbounds i16, ptr %530, i64 3
  store ptr %531, ptr %55, align 8, !tbaa !5
  br label %532

532:                                              ; preds = %512
  %533 = load i64, ptr %50, align 8, !tbaa !29
  %534 = add i64 %533, 1
  store i64 %534, ptr %50, align 8, !tbaa !29
  br label %507, !llvm.loop !47

535:                                              ; preds = %507
  store i32 0, ptr %13, align 4
  br label %536

536:                                              ; preds = %535, %479
  call void @llvm.lifetime.end.p0(i64 8, ptr %55) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %54) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %53) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %52) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %51) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %50) #8
  %537 = load i32, ptr %13, align 4
  switch i32 %537, label %540 [
    i32 0, label %538
  ]

538:                                              ; preds = %536
  br label %539

539:                                              ; preds = %538, %456
  store i32 0, ptr %13, align 4
  br label %540

540:                                              ; preds = %539, %536, %454, %70
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #8
  %541 = load i32, ptr %13, align 4
  switch i32 %541, label %543 [
    i32 0, label %542
    i32 1, label %542
  ]

542:                                              ; preds = %540, %540
  ret void

543:                                              ; preds = %540
  unreachable
}

attributes #0 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { 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 #6 = { 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 #7 = { 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 #8 = { nounwind }
attributes #9 = { 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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"_ZTS16nk_anti_aliasing", !7, i64 0}
!13 = !{!14, !7, i64 3}
!14 = !{!"_ZTS8nk_color", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 3}
!15 = !{!16, !18, i64 112}
!16 = !{!"_ZTS12nk_draw_list", !17, i64 0, !7, i64 16, !19, i64 112, !6, i64 176, !6, i64 184, !6, i64 192, !10, i64 200, !10, i64 204, !10, i64 208, !22, i64 216, !10, i64 224, !10, i64 228, !12, i64 232, !12, i64 236}
!17 = !{!"_ZTS7nk_rect", !18, i64 0, !18, i64 4, !18, i64 8, !18, i64 12}
!18 = !{!"float", !7, i64 0}
!19 = !{!"_ZTS17nk_convert_config", !18, i64 0, !12, i64 4, !12, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !20, i64 24, !6, i64 40, !22, i64 48, !22, i64 56}
!20 = !{!"_ZTS20nk_draw_null_texture", !7, i64 0, !21, i64 8}
!21 = !{!"_ZTS7nk_vec2", !18, i64 0, !18, i64 4}
!22 = !{!"long", !7, i64 0}
!23 = !{i64 0, i64 1, !24, i64 1, i64 1, !24, i64 2, i64 1, !24, i64 3, i64 1, !24}
!24 = !{!7, !7, i64 0}
!25 = !{i64 0, i64 4, !26, i64 4, i64 4, !26, i64 8, i64 4, !26, i64 12, i64 4, !26}
!26 = !{!18, !18, i64 0}
!27 = !{!28, !18, i64 12}
!28 = !{!"_ZTS9nk_colorf", !18, i64 0, !18, i64 4, !18, i64 8, !18, i64 12}
!29 = !{!22, !22, i64 0}
!30 = !{!16, !10, i64 204}
!31 = !{!16, !6, i64 184}
!32 = !{!33, !6, i64 64}
!33 = !{!"_ZTS9nk_buffer", !7, i64 0, !34, i64 32, !35, i64 56, !36, i64 64, !18, i64 80, !22, i64 88, !22, i64 96, !22, i64 104, !22, i64 112}
!34 = !{!"_ZTS12nk_allocator", !7, i64 0, !6, i64 8, !6, i64 16}
!35 = !{!"_ZTS18nk_allocation_type", !7, i64 0}
!36 = !{!"_ZTS9nk_memory", !6, i64 0, !22, i64 8}
!37 = !{!38, !38, i64 0}
!38 = !{!"short", !7, i64 0}
!39 = distinct !{!39, !40}
!40 = !{!"llvm.loop.mustprogress"}
!41 = !{i64 0, i64 4, !26, i64 4, i64 4, !26}
!42 = !{!21, !18, i64 0}
!43 = !{!21, !18, i64 4}
!44 = distinct !{!44, !40}
!45 = distinct !{!45, !40}
!46 = distinct !{!46, !40}
!47 = distinct !{!47, !40}


; 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_colorf = type { float, float, float, float }
%struct.nk_vec2 = type { float, float }

@.str.1 = external hidden unnamed_addr constant [86 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [5 x i8], align 1
@__PRETTY_FUNCTION__.nk_draw_list_fill_poly_convex = external hidden unnamed_addr constant [142 x i8], align 1

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

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

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #3

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

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

; Function Attrs: mustprogress uwtable
declare hidden noundef ptr @_ZL15nk_buffer_allocP9nk_buffer25nk_buffer_allocation_typemm(ptr noundef, i32 noundef, i64 noundef, i64 noundef) local_unnamed_addr #5

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

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

; Function Attrs: mustprogress uwtable
declare hidden noundef ptr @_ZL27nk_draw_list_alloc_verticesP12nk_draw_listm(ptr noundef, i64 noundef) local_unnamed_addr #5

; Function Attrs: mustprogress uwtable
declare hidden noundef ptr @_ZL27nk_draw_list_alloc_elementsP12nk_draw_listm(ptr noundef, i64 noundef) local_unnamed_addr #5

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef float @_ZL11nk_inv_sqrtf(float noundef) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare hidden noundef ptr @_ZL14nk_draw_vertexPvPK17nk_convert_config7nk_vec2S3_9nk_colorf(ptr noundef, ptr noundef, <2 x float>, <2 x float>, <2 x float>, <2 x float>) local_unnamed_addr #6

; Function Attrs: mustprogress uwtable
define dso_local void @nk_draw_list_fill_poly_convex(ptr noundef %0, ptr nocapture noundef readonly %1, i32 noundef %2, i32 %3, i32 noundef %4) local_unnamed_addr #6 {
  %6 = alloca %struct.nk_colorf, align 8
  %.sroa.2202.0.extract.shift = lshr i32 %3, 24
  %.sroa.2202.0.extract.trunc = trunc nuw i32 %.sroa.2202.0.extract.shift to i8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #7
  %.not = icmp eq ptr %0, null
  br i1 %.not, label %7, label %8

7:                                                ; preds = %5
  tail call void @__assert_fail(ptr noundef nonnull @.str.25, ptr noundef nonnull @.str.1, i32 noundef 10062, ptr noundef nonnull @__PRETTY_FUNCTION__.nk_draw_list_fill_poly_convex) #8
  unreachable

8:                                                ; preds = %5
  %9 = icmp ult i32 %2, 3
  br i1 %9, label %.critedge229, label %10

10:                                               ; preds = %8
  %11 = uitofp i8 %.sroa.2202.0.extract.trunc to float
  %12 = getelementptr inbounds i8, ptr %0, i64 112
  %13 = load float, ptr %12, align 8, !tbaa !5
  %14 = fmul float %13, %11
  %15 = fptoui float %14 to i8
  %.sroa.2202.0.insert.ext = zext i8 %15 to i32
  %.sroa.2202.0.insert.shift = shl nuw i32 %.sroa.2202.0.insert.ext, 24
  %.sroa.0201.0.insert.ext = and i32 %3, 16777215
  %.sroa.0201.0.insert.insert = or disjoint i32 %.sroa.2202.0.insert.shift, %.sroa.0201.0.insert.ext
  call void @nk_color_fv(ptr noundef nonnull %6, i32 %.sroa.0201.0.insert.insert)
  %.sroa.0159.0.copyload = load <2 x float>, ptr %6, align 8
  %.sroa.4160.0..sroa_idx = getelementptr inbounds i8, ptr %6, i64 8
  %.sroa.4160.0.copyload = load <2 x float>, ptr %.sroa.4160.0..sroa_idx, align 8
  %.sroa.4160.12.vec.insert = insertelement <2 x float> %.sroa.4160.0.copyload, float 0.000000e+00, i64 1
  %16 = icmp eq i32 %4, 1
  %17 = getelementptr inbounds i8, ptr %0, i64 204
  %18 = load i32, ptr %17, align 4, !tbaa !18
  %19 = zext i32 %18 to i64
  br i1 %16, label %20, label %157

20:                                               ; preds = %10
  %reass.mul = mul i32 %2, 9
  %21 = add i32 %reass.mul, -6
  %22 = zext i32 %21 to i64
  %23 = shl i32 %2, 1
  %24 = zext i32 %23 to i64
  %25 = call noundef ptr @_ZL27nk_draw_list_alloc_verticesP12nk_draw_listm(ptr noundef nonnull %0, i64 noundef %24)
  %26 = call noundef ptr @_ZL27nk_draw_list_alloc_elementsP12nk_draw_listm(ptr noundef nonnull %0, i64 noundef %22)
  %27 = add i32 %18, 1
  %28 = icmp ne ptr %25, null
  %29 = icmp ne ptr %26, null
  %or.cond4 = and i1 %28, %29
  br i1 %or.cond4, label %30, label %.critedge229

30:                                               ; preds = %20
  %31 = getelementptr inbounds i8, ptr %0, i64 184
  %32 = load ptr, ptr %31, align 8, !tbaa !19
  %33 = getelementptr inbounds i8, ptr %32, i64 64
  %34 = load ptr, ptr %33, align 8, !tbaa !20
  call void @nk_buffer_mark(ptr noundef %32, i32 noundef 0)
  %35 = zext i32 %2 to i64
  %36 = shl nuw nsw i64 %35, 3
  %37 = load ptr, ptr %31, align 8, !tbaa !19
  %38 = call noundef ptr @_ZL15nk_buffer_allocP9nk_buffer25nk_buffer_allocation_typemm(ptr noundef %37, i32 noundef 0, i64 noundef %36, i64 noundef 4)
  %.not227 = icmp eq ptr %38, null
  br i1 %.not227, label %.critedge229, label %.lr.ph238

.lr.ph238:                                        ; preds = %30
  %39 = ptrtoint ptr %25 to i64
  %40 = ptrtoint ptr %34 to i64
  %41 = sub i64 %39, %40
  %42 = load ptr, ptr %31, align 8, !tbaa !19
  %43 = getelementptr inbounds i8, ptr %42, i64 64
  %44 = load ptr, ptr %43, align 8, !tbaa !20
  %45 = getelementptr inbounds i8, ptr %44, i64 %41
  %46 = trunc i32 %18 to i16
  %47 = add nuw nsw i64 %19, 65534
  %xtraiter251 = and i64 %35, 1
  %48 = icmp eq i32 %2, 3
  br i1 %48, label %._crit_edge.unr-lcssa, label %.lr.ph238.new

.lr.ph238.new:                                    ; preds = %.lr.ph238
  %49 = and i64 %35, 4294967294
  %50 = add nsw i64 %49, -4
  br label %51

51:                                               ; preds = %51, %.lr.ph238.new
  %.0203237 = phi i64 [ 2, %.lr.ph238.new ], [ %69, %51 ]
  %.0213236 = phi ptr [ %26, %.lr.ph238.new ], [ %68, %51 ]
  %niter256 = phi i64 [ 0, %.lr.ph238.new ], [ %niter256.next.1, %51 ]
  store i16 %46, ptr %.0213236, align 2, !tbaa !25
  %52 = shl nuw i64 %.0203237, 1
  %53 = add nuw nsw i64 %47, %52
  %54 = trunc i64 %53 to i16
  %55 = getelementptr inbounds i8, ptr %.0213236, i64 2
  store i16 %54, ptr %55, align 2, !tbaa !25
  %56 = add nuw nsw i64 %52, %19
  %57 = trunc i64 %56 to i16
  %58 = getelementptr inbounds i8, ptr %.0213236, i64 4
  store i16 %57, ptr %58, align 2, !tbaa !25
  %59 = getelementptr inbounds i8, ptr %.0213236, i64 6
  store i16 %46, ptr %59, align 2, !tbaa !25
  %60 = shl nuw i64 %.0203237, 1
  %61 = or disjoint i64 %60, 2
  %62 = add nuw nsw i64 %47, %61
  %63 = trunc i64 %62 to i16
  %64 = getelementptr inbounds i8, ptr %.0213236, i64 8
  store i16 %63, ptr %64, align 2, !tbaa !25
  %65 = add nuw nsw i64 %61, %19
  %66 = trunc i64 %65 to i16
  %67 = getelementptr inbounds i8, ptr %.0213236, i64 10
  store i16 %66, ptr %67, align 2, !tbaa !25
  %68 = getelementptr inbounds i8, ptr %.0213236, i64 12
  %69 = add nuw nsw i64 %.0203237, 2
  %niter256.next.1 = add i64 %niter256, 2
  %niter256.ncmp.1 = icmp eq i64 %niter256, %50
  br i1 %niter256.ncmp.1, label %._crit_edge.unr-lcssa.loopexit, label %51, !llvm.loop !27

._crit_edge.unr-lcssa.loopexit:                   ; preds = %51
  %70 = shl nuw i64 %69, 1
  br label %._crit_edge.unr-lcssa

._crit_edge.unr-lcssa:                            ; preds = %._crit_edge.unr-lcssa.loopexit, %.lr.ph238
  %.lcssa.ph = phi ptr [ poison, %.lr.ph238 ], [ %68, %._crit_edge.unr-lcssa.loopexit ]
  %.0203237.unr = phi i64 [ 4, %.lr.ph238 ], [ %70, %._crit_edge.unr-lcssa.loopexit ]
  %.0213236.unr = phi ptr [ %26, %.lr.ph238 ], [ %68, %._crit_edge.unr-lcssa.loopexit ]
  %lcmp.mod253.not = icmp eq i64 %xtraiter251, 0
  br i1 %lcmp.mod253.not, label %._crit_edge, label %._crit_edge.epilog-lcssa

._crit_edge.epilog-lcssa:                         ; preds = %._crit_edge.unr-lcssa
  store i16 %46, ptr %.0213236.unr, align 2, !tbaa !25
  %71 = add nuw nsw i64 %47, %.0203237.unr
  %72 = trunc i64 %71 to i16
  %73 = getelementptr inbounds i8, ptr %.0213236.unr, i64 2
  store i16 %72, ptr %73, align 2, !tbaa !25
  %74 = add nuw nsw i64 %.0203237.unr, %19
  %75 = trunc i64 %74 to i16
  %76 = getelementptr inbounds i8, ptr %.0213236.unr, i64 4
  store i16 %75, ptr %76, align 2, !tbaa !25
  %77 = getelementptr inbounds i8, ptr %.0213236.unr, i64 6
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.unr-lcssa, %._crit_edge.epilog-lcssa
  %.lcssa = phi ptr [ %.lcssa.ph, %._crit_edge.unr-lcssa ], [ %77, %._crit_edge.epilog-lcssa ]
  %78 = add i32 %2, -1
  %79 = zext i32 %78 to i64
  br label %82

.preheader:                                       ; preds = %93
  %80 = getelementptr inbounds i8, ptr %0, i64 144
  %81 = zext i32 %27 to i64
  br label %101

82:                                               ; preds = %._crit_edge, %93
  %.0206240 = phi i64 [ %79, %._crit_edge ], [ %.0208239, %93 ]
  %.0208239 = phi i64 [ 0, %._crit_edge ], [ %100, %93 ]
  %83 = getelementptr inbounds %struct.nk_vec2, ptr %1, i64 %.0206240
  %.sroa.094.0.copyload = load float, ptr %83, align 4, !tbaa !29
  %.sroa.495.0..sroa_idx = getelementptr inbounds i8, ptr %83, i64 4
  %.sroa.495.0.copyload = load float, ptr %.sroa.495.0..sroa_idx, align 4, !tbaa !29
  %84 = getelementptr inbounds %struct.nk_vec2, ptr %1, i64 %.0208239
  %.sroa.093.0.copyload = load float, ptr %84, align 4, !tbaa !29
  %.sroa.4.0..sroa_idx = getelementptr inbounds i8, ptr %84, i64 4
  %.sroa.4.0.copyload = load float, ptr %.sroa.4.0..sroa_idx, align 4, !tbaa !29
  %85 = fsub float %.sroa.093.0.copyload, %.sroa.094.0.copyload
  %86 = fsub float %.sroa.4.0.copyload, %.sroa.495.0.copyload
  %87 = call <2 x float> @nk_vec2(float noundef %85, float noundef %86)
  %.sroa.080.0.vec.extract = extractelement <2 x float> %87, i64 0
  %.sroa.080.4.vec.extract = extractelement <2 x float> %87, i64 1
  %88 = fmul float %.sroa.080.4.vec.extract, %.sroa.080.4.vec.extract
  %89 = call float @llvm.fmuladd.f32(float %.sroa.080.0.vec.extract, float %.sroa.080.0.vec.extract, float %88)
  %90 = fcmp une float %89, 0.000000e+00
  br i1 %90, label %91, label %93

91:                                               ; preds = %82
  %92 = call noundef float @_ZL11nk_inv_sqrtf(float noundef %89)
  br label %93

93:                                               ; preds = %82, %91
  %.0215 = phi float [ %92, %91 ], [ 1.000000e+00, %82 ]
  %94 = fmul float %.sroa.080.0.vec.extract, %.0215
  %95 = fmul float %.sroa.080.4.vec.extract, %.0215
  %96 = call <2 x float> @nk_vec2(float noundef %94, float noundef %95)
  %.sroa.080.4.vec.extract92 = extractelement <2 x float> %96, i64 1
  %97 = getelementptr inbounds %struct.nk_vec2, ptr %38, i64 %.0206240
  store float %.sroa.080.4.vec.extract92, ptr %97, align 4, !tbaa !30
  %.sroa.080.0.vec.extract86 = extractelement <2 x float> %96, i64 0
  %98 = fneg float %.sroa.080.0.vec.extract86
  %99 = getelementptr inbounds i8, ptr %97, i64 4
  store float %98, ptr %99, align 4, !tbaa !31
  %100 = add nuw nsw i64 %.0208239, 1
  %exitcond247.not = icmp eq i64 %100, %35
  br i1 %exitcond247.not, label %.preheader, label %82, !llvm.loop !32

101:                                              ; preds = %.preheader, %121
  %.1207244 = phi i64 [ %79, %.preheader ], [ %.1209243, %121 ]
  %.1209243 = phi i64 [ 0, %.preheader ], [ %155, %121 ]
  %.0212242 = phi ptr [ %45, %.preheader ], [ %138, %121 ]
  %.1214241 = phi ptr [ %.lcssa, %.preheader ], [ %154, %121 ]
  %.sroa.073.0.copyload = load <2 x float>, ptr %80, align 8
  %102 = getelementptr inbounds %struct.nk_vec2, ptr %38, i64 %.1207244
  %.sroa.069.0.copyload = load float, ptr %102, align 4, !tbaa !29
  %.sroa.571.0..sroa_idx = getelementptr inbounds i8, ptr %102, i64 4
  %.sroa.571.0.copyload = load float, ptr %.sroa.571.0..sroa_idx, align 4, !tbaa !29
  %103 = getelementptr inbounds %struct.nk_vec2, ptr %38, i64 %.1209243
  %.sroa.066.0.copyload = load float, ptr %103, align 4, !tbaa !29
  %.sroa.5.0..sroa_idx = getelementptr inbounds i8, ptr %103, i64 4
  %.sroa.5.0.copyload = load float, ptr %.sroa.5.0..sroa_idx, align 4, !tbaa !29
  %104 = fadd float %.sroa.069.0.copyload, %.sroa.066.0.copyload
  %105 = fadd float %.sroa.571.0.copyload, %.sroa.5.0.copyload
  %106 = call <2 x float> @nk_vec2(float noundef %104, float noundef %105)
  %.sroa.044.0.vec.extract = extractelement <2 x float> %106, i64 0
  %107 = fmul float %.sroa.044.0.vec.extract, 5.000000e-01
  %108 = call <2 x float> @nk_vec2(float noundef %104, float noundef %105)
  %.sroa.043.4.vec.extract = extractelement <2 x float> %108, i64 1
  %109 = fmul float %.sroa.043.4.vec.extract, 5.000000e-01
  %110 = call <2 x float> @nk_vec2(float noundef %107, float noundef %109)
  %.sroa.045.0.vec.extract = extractelement <2 x float> %110, i64 0
  %.sroa.045.4.vec.extract = extractelement <2 x float> %110, i64 1
  %111 = fmul float %.sroa.045.4.vec.extract, %.sroa.045.4.vec.extract
  %112 = call float @llvm.fmuladd.f32(float %.sroa.045.0.vec.extract, float %.sroa.045.0.vec.extract, float %111)
  %113 = fcmp ogt float %112, 0x3EB0C6F7A0000000
  br i1 %113, label %114, label %121

114:                                              ; preds = %101
  %115 = fdiv float 1.000000e+00, %112
  %116 = fcmp olt float %115, 1.000000e+02
  %117 = select i1 %116, float %115, float 1.000000e+02
  %118 = fmul float %.sroa.045.0.vec.extract, %117
  %119 = fmul float %.sroa.045.4.vec.extract, %117
  %120 = call <2 x float> @nk_vec2(float noundef %118, float noundef %119)
  %.pre = extractelement <2 x float> %120, i64 0
  %.pre249 = extractelement <2 x float> %120, i64 1
  br label %121

121:                                              ; preds = %114, %101
  %.sroa.045.4.vec.extract61.pre-phi = phi float [ %.pre249, %114 ], [ %.sroa.045.4.vec.extract, %101 ]
  %.sroa.045.0.vec.extract51.pre-phi = phi float [ %.pre, %114 ], [ %.sroa.045.0.vec.extract, %101 ]
  %122 = fmul float %.sroa.045.0.vec.extract51.pre-phi, 5.000000e-01
  %123 = fmul float %.sroa.045.4.vec.extract61.pre-phi, 5.000000e-01
  %124 = call <2 x float> @nk_vec2(float noundef %122, float noundef %123)
  %125 = getelementptr inbounds %struct.nk_vec2, ptr %1, i64 %.1209243
  %126 = load float, ptr %125, align 4, !tbaa !30
  %.sroa.045.0.vec.extract53 = extractelement <2 x float> %124, i64 0
  %127 = fsub float %126, %.sroa.045.0.vec.extract53
  %128 = getelementptr inbounds i8, ptr %125, i64 4
  %129 = load float, ptr %128, align 4, !tbaa !31
  %.sroa.045.4.vec.extract63 = extractelement <2 x float> %124, i64 1
  %130 = fsub float %129, %.sroa.045.4.vec.extract63
  %131 = call <2 x float> @nk_vec2(float noundef %127, float noundef %130)
  %.sroa.031.0.copyload = load <2 x float>, ptr %6, align 8
  %.sroa.232.0.copyload = load <2 x float>, ptr %.sroa.4160.0..sroa_idx, align 8
  %132 = call noundef ptr @_ZL14nk_draw_vertexPvPK17nk_convert_config7nk_vec2S3_9nk_colorf(ptr noundef %.0212242, ptr noundef nonnull %12, <2 x float> %131, <2 x float> %.sroa.073.0.copyload, <2 x float> %.sroa.031.0.copyload, <2 x float> %.sroa.232.0.copyload)
  %133 = load float, ptr %125, align 4, !tbaa !30
  %134 = fadd float %.sroa.045.0.vec.extract53, %133
  %135 = load float, ptr %128, align 4, !tbaa !31
  %136 = fadd float %.sroa.045.4.vec.extract63, %135
  %137 = call <2 x float> @nk_vec2(float noundef %134, float noundef %136)
  %138 = call noundef ptr @_ZL14nk_draw_vertexPvPK17nk_convert_config7nk_vec2S3_9nk_colorf(ptr noundef %132, ptr noundef nonnull %12, <2 x float> %137, <2 x float> %.sroa.073.0.copyload, <2 x float> %.sroa.0159.0.copyload, <2 x float> %.sroa.4160.12.vec.insert)
  %139 = shl nuw nsw i64 %.1209243, 1
  %140 = add nuw nsw i64 %139, %19
  %141 = trunc i64 %140 to i16
  store i16 %141, ptr %.1214241, align 2, !tbaa !25
  %142 = shl nuw nsw i64 %.1207244, 1
  %143 = add nuw nsw i64 %142, %19
  %144 = trunc i64 %143 to i16
  %145 = getelementptr inbounds i8, ptr %.1214241, i64 2
  store i16 %144, ptr %145, align 2, !tbaa !25
  %146 = add nuw nsw i64 %142, %81
  %147 = trunc i64 %146 to i16
  %148 = getelementptr inbounds i8, ptr %.1214241, i64 4
  store i16 %147, ptr %148, align 2, !tbaa !25
  %149 = getelementptr inbounds i8, ptr %.1214241, i64 6
  store i16 %147, ptr %149, align 2, !tbaa !25
  %150 = add nuw nsw i64 %139, %81
  %151 = trunc i64 %150 to i16
  %152 = getelementptr inbounds i8, ptr %.1214241, i64 8
  store i16 %151, ptr %152, align 2, !tbaa !25
  %153 = getelementptr inbounds i8, ptr %.1214241, i64 10
  store i16 %141, ptr %153, align 2, !tbaa !25
  %154 = getelementptr inbounds i8, ptr %.1214241, i64 12
  %155 = add nuw nsw i64 %.1209243, 1
  %exitcond248.not = icmp eq i64 %155, %35
  br i1 %exitcond248.not, label %.critedge, label %101, !llvm.loop !33

.critedge:                                        ; preds = %121
  %156 = load ptr, ptr %31, align 8, !tbaa !19
  call void @nk_buffer_reset(ptr noundef %156, i32 noundef 0)
  br label %.critedge229

157:                                              ; preds = %10
  %158 = mul i32 %2, 3
  %159 = add i32 %158, -6
  %160 = zext i32 %159 to i64
  %161 = zext i32 %2 to i64
  %162 = call noundef ptr @_ZL27nk_draw_list_alloc_verticesP12nk_draw_listm(ptr noundef nonnull %0, i64 noundef %161)
  %163 = call noundef ptr @_ZL27nk_draw_list_alloc_elementsP12nk_draw_listm(ptr noundef nonnull %0, i64 noundef %160)
  %164 = icmp ne ptr %162, null
  %165 = icmp ne ptr %163, null
  %or.cond6 = and i1 %164, %165
  br i1 %or.cond6, label %.preheader231, label %.critedge229

.preheader231:                                    ; preds = %157
  %166 = getelementptr inbounds i8, ptr %0, i64 144
  br label %171

.lr.ph:                                           ; preds = %171
  %167 = trunc i32 %18 to i16
  %168 = add nsw i64 %161, -2
  %169 = add nsw i64 %161, -3
  %xtraiter = and i64 %168, 3
  %170 = icmp ult i64 %169, 3
  br i1 %170, label %.critedge229.loopexit.unr-lcssa, label %.lr.ph.new

.lr.ph.new:                                       ; preds = %.lr.ph
  %unroll_iter = and i64 %168, -4
  br label %175

171:                                              ; preds = %.preheader231, %171
  %.0205233 = phi ptr [ %162, %.preheader231 ], [ %173, %171 ]
  %.0210232 = phi i64 [ 0, %.preheader231 ], [ %174, %171 ]
  %172 = getelementptr inbounds %struct.nk_vec2, ptr %1, i64 %.0210232
  %.sroa.08.0.copyload = load <2 x float>, ptr %172, align 4
  %.sroa.07.0.copyload = load <2 x float>, ptr %166, align 8
  %.sroa.0.0.copyload = load <2 x float>, ptr %6, align 8
  %.sroa.2.0.copyload = load <2 x float>, ptr %.sroa.4160.0..sroa_idx, align 8
  %173 = call noundef ptr @_ZL14nk_draw_vertexPvPK17nk_convert_config7nk_vec2S3_9nk_colorf(ptr noundef %.0205233, ptr noundef nonnull %12, <2 x float> %.sroa.08.0.copyload, <2 x float> %.sroa.07.0.copyload, <2 x float> %.sroa.0.0.copyload, <2 x float> %.sroa.2.0.copyload)
  %174 = add nuw nsw i64 %.0210232, 1
  %exitcond.not = icmp eq i64 %174, %161
  br i1 %exitcond.not, label %.lr.ph, label %171, !llvm.loop !34

175:                                              ; preds = %175, %.lr.ph.new
  %.0204235 = phi ptr [ %163, %.lr.ph.new ], [ %202, %175 ]
  %.1211234 = phi i64 [ 2, %.lr.ph.new ], [ %203, %175 ]
  %niter = phi i64 [ 0, %.lr.ph.new ], [ %niter.next.3, %175 ]
  store i16 %167, ptr %.0204235, align 2, !tbaa !25
  %176 = add nuw nsw i64 %.1211234, %19
  %177 = trunc i64 %176 to i16
  %178 = add i16 %177, -1
  %179 = getelementptr inbounds i8, ptr %.0204235, i64 2
  store i16 %178, ptr %179, align 2, !tbaa !25
  %180 = getelementptr inbounds i8, ptr %.0204235, i64 4
  store i16 %177, ptr %180, align 2, !tbaa !25
  %181 = getelementptr inbounds i8, ptr %.0204235, i64 6
  %182 = or disjoint i64 %.1211234, 1
  store i16 %167, ptr %181, align 2, !tbaa !25
  %183 = add nuw nsw i64 %182, %19
  %184 = trunc i64 %183 to i16
  %185 = add i16 %184, -1
  %186 = getelementptr inbounds i8, ptr %.0204235, i64 8
  store i16 %185, ptr %186, align 2, !tbaa !25
  %187 = getelementptr inbounds i8, ptr %.0204235, i64 10
  store i16 %184, ptr %187, align 2, !tbaa !25
  %188 = getelementptr inbounds i8, ptr %.0204235, i64 12
  %189 = add nuw nsw i64 %.1211234, 2
  store i16 %167, ptr %188, align 2, !tbaa !25
  %190 = add nuw nsw i64 %189, %19
  %191 = trunc i64 %190 to i16
  %192 = add i16 %191, -1
  %193 = getelementptr inbounds i8, ptr %.0204235, i64 14
  store i16 %192, ptr %193, align 2, !tbaa !25
  %194 = getelementptr inbounds i8, ptr %.0204235, i64 16
  store i16 %191, ptr %194, align 2, !tbaa !25
  %195 = getelementptr inbounds i8, ptr %.0204235, i64 18
  %196 = add nuw nsw i64 %.1211234, 3
  store i16 %167, ptr %195, align 2, !tbaa !25
  %197 = add nuw nsw i64 %196, %19
  %198 = trunc i64 %197 to i16
  %199 = add i16 %198, -1
  %200 = getelementptr inbounds i8, ptr %.0204235, i64 20
  store i16 %199, ptr %200, align 2, !tbaa !25
  %201 = getelementptr inbounds i8, ptr %.0204235, i64 22
  store i16 %198, ptr %201, align 2, !tbaa !25
  %202 = getelementptr inbounds i8, ptr %.0204235, i64 24
  %203 = add nuw nsw i64 %.1211234, 4
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %.critedge229.loopexit.unr-lcssa, label %175, !llvm.loop !35

.critedge229.loopexit.unr-lcssa:                  ; preds = %175, %.lr.ph
  %.0204235.unr = phi ptr [ %163, %.lr.ph ], [ %202, %175 ]
  %.1211234.unr = phi i64 [ 2, %.lr.ph ], [ %203, %175 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.critedge229, label %.epil.preheader

.epil.preheader:                                  ; preds = %.critedge229.loopexit.unr-lcssa, %.epil.preheader
  %.0204235.epil = phi ptr [ %209, %.epil.preheader ], [ %.0204235.unr, %.critedge229.loopexit.unr-lcssa ]
  %.1211234.epil = phi i64 [ %210, %.epil.preheader ], [ %.1211234.unr, %.critedge229.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.epil.preheader ], [ 0, %.critedge229.loopexit.unr-lcssa ]
  store i16 %167, ptr %.0204235.epil, align 2, !tbaa !25
  %204 = add nuw nsw i64 %.1211234.epil, %19
  %205 = trunc i64 %204 to i16
  %206 = add i16 %205, -1
  %207 = getelementptr inbounds i8, ptr %.0204235.epil, i64 2
  store i16 %206, ptr %207, align 2, !tbaa !25
  %208 = getelementptr inbounds i8, ptr %.0204235.epil, i64 4
  store i16 %205, ptr %208, align 2, !tbaa !25
  %209 = getelementptr inbounds i8, ptr %.0204235.epil, i64 6
  %210 = add nuw nsw i64 %.1211234.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %.critedge229, label %.epil.preheader, !llvm.loop !36

.critedge229:                                     ; preds = %.critedge229.loopexit.unr-lcssa, %.epil.preheader, %157, %.critedge, %20, %30, %8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #7
  ret void
}

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { 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 #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 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 = { nounwind }
attributes #8 = { 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, !8, i64 112}
!6 = !{!"_ZTS12nk_draw_list", !7, i64 0, !9, i64 16, !11, i64 112, !16, i64 176, !16, i64 184, !16, i64 192, !13, i64 200, !13, i64 204, !13, i64 208, !17, i64 216, !13, i64 224, !13, i64 228, !12, i64 232, !12, i64 236}
!7 = !{!"_ZTS7nk_rect", !8, i64 0, !8, i64 4, !8, i64 8, !8, i64 12}
!8 = !{!"float", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!"_ZTS17nk_convert_config", !8, i64 0, !12, i64 4, !12, i64 8, !13, i64 12, !13, i64 16, !13, i64 20, !14, i64 24, !16, i64 40, !17, i64 48, !17, i64 56}
!12 = !{!"_ZTS16nk_anti_aliasing", !9, i64 0}
!13 = !{!"int", !9, i64 0}
!14 = !{!"_ZTS20nk_draw_null_texture", !9, i64 0, !15, i64 8}
!15 = !{!"_ZTS7nk_vec2", !8, i64 0, !8, i64 4}
!16 = !{!"any pointer", !9, i64 0}
!17 = !{!"long", !9, i64 0}
!18 = !{!6, !13, i64 204}
!19 = !{!6, !16, i64 184}
!20 = !{!21, !16, i64 64}
!21 = !{!"_ZTS9nk_buffer", !9, i64 0, !22, i64 32, !23, i64 56, !24, i64 64, !8, i64 80, !17, i64 88, !17, i64 96, !17, i64 104, !17, i64 112}
!22 = !{!"_ZTS12nk_allocator", !9, i64 0, !16, i64 8, !16, i64 16}
!23 = !{!"_ZTS18nk_allocation_type", !9, i64 0}
!24 = !{!"_ZTS9nk_memory", !16, i64 0, !17, i64 8}
!25 = !{!26, !26, i64 0}
!26 = !{!"short", !9, i64 0}
!27 = distinct !{!27, !28}
!28 = !{!"llvm.loop.mustprogress"}
!29 = !{!8, !8, i64 0}
!30 = !{!15, !8, i64 0}
!31 = !{!15, !8, i64 4}
!32 = distinct !{!32, !28}
!33 = distinct !{!33, !28}
!34 = distinct !{!34, !28}
!35 = distinct !{!35, !28}
!36 = distinct !{!36, !37}
!37 = !{!"llvm.loop.unroll.disable"}


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