; LLVM IR from unitreerobotics/kinect_teleoperate :: src/extern/glfw/src/tests (gamma)

; 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.2 = external hidden unnamed_addr constant [103 x i8], align 1
@.str.26 = 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 nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #0

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #1

; Function Attrs: nounwind uwtable
declare dso_local <2 x float> @nk_vec2(float noundef, float noundef) #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: nounwind uwtable
declare dso_local void @nk_color_fv(ptr noundef, i32) #5

; Function Attrs: nounwind uwtable
declare hidden ptr @nk_buffer_alloc(ptr noundef, i32 noundef, i64 noundef, i64 noundef) #5

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

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

; Function Attrs: nounwind uwtable
declare hidden ptr @nk_draw_list_alloc_vertices(ptr noundef, i64 noundef) #5

; Function Attrs: nounwind uwtable
declare hidden ptr @nk_draw_list_alloc_elements(ptr noundef, i64 noundef) #5

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

; Function Attrs: nounwind uwtable
declare hidden ptr @nk_draw_vertex(ptr noundef, ptr noundef, <2 x float>, <2 x float>, <2 x float>, <2 x float>) #2

; Function Attrs: nounwind 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) #2 {
  %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 i64, align 8
  %15 = alloca i64, align 8
  %16 = alloca i64, align 8
  %17 = alloca float, align 4
  %18 = alloca i64, align 8
  %19 = alloca i64, align 8
  %20 = alloca i64, align 8
  %21 = alloca i64, align 8
  %22 = alloca ptr, align 8
  %23 = alloca ptr, align 8
  %24 = alloca i64, align 8
  %25 = alloca ptr, align 8
  %26 = alloca i32, align 4
  %27 = alloca i32, align 4
  %28 = alloca %struct.nk_vec2, align 4
  %29 = alloca %struct.nk_vec2, align 4
  %30 = alloca %struct.nk_vec2, align 4
  %31 = alloca float, align 4
  %32 = alloca %struct.nk_vec2, 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 float, align 4
  %40 = alloca float, align 4
  %41 = alloca %struct.nk_vec2, 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 i64, align 8
  %46 = alloca i64, align 8
  %47 = alloca i64, align 8
  %48 = alloca i64, align 8
  %49 = alloca ptr, align 8
  %50 = alloca ptr, align 8
  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 !9
  call void @llvm.lifetime.start.p0(i64 16, ptr %11) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %12) #6
  %51 = load ptr, ptr %7, align 8, !tbaa !5
  %52 = icmp ne ptr %51, null
  br i1 %52, label %53, label %54

53:                                               ; preds = %5
  br label %55

54:                                               ; preds = %5
  call void @__assert_fail(ptr noundef @.str.26, ptr noundef @.str.2, i32 noundef 9873, ptr noundef @__PRETTY_FUNCTION__.nk_draw_list_fill_poly_convex) #7
  unreachable

55:                                               ; preds = %53
  %56 = load ptr, ptr %7, align 8, !tbaa !5
  %57 = icmp ne ptr %56, null
  br i1 %57, label %58, label %61

58:                                               ; preds = %55
  %59 = load i32, ptr %9, align 4, !tbaa !9
  %60 = icmp ult i32 %59, 3
  br i1 %60, label %61, label %62

61:                                               ; preds = %58, %55
  store i32 1, ptr %13, align 4
  br label %531

62:                                               ; preds = %58
  %63 = getelementptr inbounds %struct.nk_color, ptr %6, i32 0, i32 3
  %64 = load i8, ptr %63, align 1, !tbaa !11
  %65 = uitofp i8 %64 to float
  %66 = load ptr, ptr %7, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.nk_draw_list, ptr %66, i32 0, i32 2
  %68 = getelementptr inbounds %struct.nk_convert_config, ptr %67, i32 0, i32 0
  %69 = load float, ptr %68, align 8, !tbaa !13
  %70 = fmul float %65, %69
  %71 = fptoui float %70 to i8
  %72 = getelementptr inbounds %struct.nk_color, ptr %6, i32 0, i32 3
  store i8 %71, ptr %72, align 1, !tbaa !11
  %73 = getelementptr inbounds %struct.nk_colorf, ptr %11, i32 0, i32 0
  %74 = load i32, ptr %6, align 1
  call void @nk_color_fv(ptr noundef %73, i32 %74)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %12, ptr align 4 %11, i64 16, i1 false), !tbaa.struct !21
  %75 = getelementptr inbounds %struct.nk_colorf, ptr %12, i32 0, i32 3
  store float 0.000000e+00, ptr %75, align 4, !tbaa !23
  %76 = load i32, ptr %10, align 4, !tbaa !9
  %77 = icmp eq i32 %76, 1
  br i1 %77, label %78, label %448

78:                                               ; preds = %62
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  store i64 0, ptr %14, align 8, !tbaa !25
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  store i64 0, ptr %15, align 8, !tbaa !25
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  store i64 0, ptr %16, align 8, !tbaa !25
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #6
  store float 1.000000e+00, ptr %17, align 4, !tbaa !22
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #6
  store i64 0, ptr %18, align 8, !tbaa !25
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #6
  %79 = load ptr, ptr %7, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct.nk_draw_list, ptr %79, i32 0, i32 7
  %81 = load i32, ptr %80, align 4, !tbaa !26
  %82 = zext i32 %81 to i64
  store i64 %82, ptr %19, align 8, !tbaa !25
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #6
  %83 = load i32, ptr %9, align 4, !tbaa !9
  %84 = sub i32 %83, 2
  %85 = mul i32 %84, 3
  %86 = load i32, ptr %9, align 4, !tbaa !9
  %87 = mul i32 %86, 6
  %88 = add i32 %85, %87
  %89 = zext i32 %88 to i64
  store i64 %89, ptr %20, align 8, !tbaa !25
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #6
  %90 = load i32, ptr %9, align 4, !tbaa !9
  %91 = mul i32 %90, 2
  %92 = zext i32 %91 to i64
  store i64 %92, ptr %21, align 8, !tbaa !25
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #6
  %93 = load ptr, ptr %7, align 8, !tbaa !5
  %94 = load i64, ptr %21, align 8, !tbaa !25
  %95 = call ptr @nk_draw_list_alloc_vertices(ptr noundef %93, i64 noundef %94)
  store ptr %95, ptr %22, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #6
  %96 = load ptr, ptr %7, align 8, !tbaa !5
  %97 = load i64, ptr %20, align 8, !tbaa !25
  %98 = call ptr @nk_draw_list_alloc_elements(ptr noundef %96, i64 noundef %97)
  store ptr %98, ptr %23, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #6
  store i64 0, ptr %24, align 8, !tbaa !25
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #6
  store ptr null, ptr %25, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #6
  %99 = load i64, ptr %19, align 8, !tbaa !25
  %100 = add i64 %99, 0
  %101 = trunc i64 %100 to i32
  store i32 %101, ptr %26, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #6
  %102 = load i64, ptr %19, align 8, !tbaa !25
  %103 = add i64 %102, 1
  %104 = trunc i64 %103 to i32
  store i32 %104, ptr %27, align 4, !tbaa !9
  %105 = load ptr, ptr %22, align 8, !tbaa !5
  %106 = icmp ne ptr %105, null
  br i1 %106, label %107, label %110

107:                                              ; preds = %78
  %108 = load ptr, ptr %23, align 8, !tbaa !5
  %109 = icmp ne ptr %108, null
  br i1 %109, label %111, label %110

110:                                              ; preds = %107, %78
  store i32 1, ptr %13, align 4
  br label %445

111:                                              ; preds = %107
  %112 = load ptr, ptr %22, align 8, !tbaa !5
  %113 = load ptr, ptr %7, align 8, !tbaa !5
  %114 = getelementptr inbounds %struct.nk_draw_list, ptr %113, i32 0, i32 4
  %115 = load ptr, ptr %114, align 8, !tbaa !27
  %116 = getelementptr inbounds %struct.nk_buffer, ptr %115, i32 0, i32 3
  %117 = getelementptr inbounds %struct.nk_memory, ptr %116, i32 0, i32 0
  %118 = load ptr, ptr %117, align 8, !tbaa !28
  %119 = ptrtoint ptr %112 to i64
  %120 = ptrtoint ptr %118 to i64
  %121 = sub i64 %119, %120
  store i64 %121, ptr %18, align 8, !tbaa !25
  %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 !27
  call void @nk_buffer_mark(ptr noundef %124, i32 noundef 0)
  %125 = load i32, ptr %9, align 4, !tbaa !9
  %126 = zext i32 %125 to i64
  %127 = mul i64 8, %126
  store i64 %127, ptr %24, align 8, !tbaa !25
  %128 = load ptr, ptr %7, align 8, !tbaa !5
  %129 = getelementptr inbounds %struct.nk_draw_list, ptr %128, i32 0, i32 4
  %130 = load ptr, ptr %129, align 8, !tbaa !27
  %131 = load i64, ptr %24, align 8, !tbaa !25
  %132 = call ptr @nk_buffer_alloc(ptr noundef %130, i32 noundef 0, i64 noundef %131, i64 noundef 4)
  store ptr %132, ptr %25, align 8, !tbaa !5
  %133 = load ptr, ptr %25, align 8, !tbaa !5
  %134 = icmp ne ptr %133, null
  br i1 %134, label %136, label %135

135:                                              ; preds = %111
  store i32 1, ptr %13, align 4
  br label %445

136:                                              ; preds = %111
  %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 !27
  %140 = getelementptr inbounds %struct.nk_buffer, ptr %139, i32 0, i32 3
  %141 = getelementptr inbounds %struct.nk_memory, ptr %140, i32 0, i32 0
  %142 = load ptr, ptr %141, align 8, !tbaa !28
  %143 = load i64, ptr %18, align 8, !tbaa !25
  %144 = getelementptr inbounds i8, ptr %142, i64 %143
  store ptr %144, ptr %22, align 8, !tbaa !5
  store i64 2, ptr %14, align 8, !tbaa !25
  br label %145

145:                                              ; preds = %174, %136
  %146 = load i64, ptr %14, align 8, !tbaa !25
  %147 = load i32, ptr %9, align 4, !tbaa !9
  %148 = zext i32 %147 to i64
  %149 = icmp ult i64 %146, %148
  br i1 %149, label %150, label %177

150:                                              ; preds = %145
  %151 = load i32, ptr %26, align 4, !tbaa !9
  %152 = trunc i32 %151 to i16
  %153 = load ptr, ptr %23, align 8, !tbaa !5
  %154 = getelementptr inbounds i16, ptr %153, i64 0
  store i16 %152, ptr %154, align 2, !tbaa !32
  %155 = load i32, ptr %26, align 4, !tbaa !9
  %156 = zext i32 %155 to i64
  %157 = load i64, ptr %14, align 8, !tbaa !25
  %158 = sub i64 %157, 1
  %159 = shl i64 %158, 1
  %160 = add i64 %156, %159
  %161 = trunc i64 %160 to i16
  %162 = load ptr, ptr %23, align 8, !tbaa !5
  %163 = getelementptr inbounds i16, ptr %162, i64 1
  store i16 %161, ptr %163, align 2, !tbaa !32
  %164 = load i32, ptr %26, align 4, !tbaa !9
  %165 = zext i32 %164 to i64
  %166 = load i64, ptr %14, align 8, !tbaa !25
  %167 = shl i64 %166, 1
  %168 = add i64 %165, %167
  %169 = trunc i64 %168 to i16
  %170 = load ptr, ptr %23, align 8, !tbaa !5
  %171 = getelementptr inbounds i16, ptr %170, i64 2
  store i16 %169, ptr %171, align 2, !tbaa !32
  %172 = load ptr, ptr %23, align 8, !tbaa !5
  %173 = getelementptr inbounds i16, ptr %172, i64 3
  store ptr %173, ptr %23, align 8, !tbaa !5
  br label %174

174:                                              ; preds = %150
  %175 = load i64, ptr %14, align 8, !tbaa !25
  %176 = add i64 %175, 1
  store i64 %176, ptr %14, align 8, !tbaa !25
  br label %145, !llvm.loop !34

177:                                              ; preds = %145
  %178 = load i32, ptr %9, align 4, !tbaa !9
  %179 = sub i32 %178, 1
  %180 = zext i32 %179 to i64
  store i64 %180, ptr %15, align 8, !tbaa !25
  store i64 0, ptr %16, align 8, !tbaa !25
  br label %181

181:                                              ; preds = %243, %177
  %182 = load i64, ptr %16, align 8, !tbaa !25
  %183 = load i32, ptr %9, align 4, !tbaa !9
  %184 = zext i32 %183 to i64
  %185 = icmp ult i64 %182, %184
  br i1 %185, label %186, label %246

186:                                              ; preds = %181
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #6
  %187 = load ptr, ptr %8, align 8, !tbaa !5
  %188 = load i64, ptr %15, align 8, !tbaa !25
  %189 = getelementptr inbounds %struct.nk_vec2, ptr %187, i64 %188
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %28, ptr align 4 %189, i64 8, i1 false), !tbaa.struct !36
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #6
  %190 = load ptr, ptr %8, align 8, !tbaa !5
  %191 = load i64, ptr %16, align 8, !tbaa !25
  %192 = getelementptr inbounds %struct.nk_vec2, ptr %190, i64 %191
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %29, ptr align 4 %192, i64 8, i1 false), !tbaa.struct !36
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #6
  %193 = getelementptr inbounds %struct.nk_vec2, ptr %29, i32 0, i32 0
  %194 = load float, ptr %193, align 4, !tbaa !37
  %195 = getelementptr inbounds %struct.nk_vec2, ptr %28, i32 0, i32 0
  %196 = load float, ptr %195, align 4, !tbaa !37
  %197 = fsub float %194, %196
  %198 = getelementptr inbounds %struct.nk_vec2, ptr %29, i32 0, i32 1
  %199 = load float, ptr %198, align 4, !tbaa !38
  %200 = getelementptr inbounds %struct.nk_vec2, ptr %28, i32 0, i32 1
  %201 = load float, ptr %200, align 4, !tbaa !38
  %202 = fsub float %199, %201
  %203 = call <2 x float> @nk_vec2(float noundef %197, float noundef %202)
  store <2 x float> %203, ptr %30, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #6
  %204 = getelementptr inbounds %struct.nk_vec2, ptr %30, i32 0, i32 0
  %205 = load float, ptr %204, align 4, !tbaa !37
  %206 = getelementptr inbounds %struct.nk_vec2, ptr %30, i32 0, i32 0
  %207 = load float, ptr %206, align 4, !tbaa !37
  %208 = getelementptr inbounds %struct.nk_vec2, ptr %30, i32 0, i32 1
  %209 = load float, ptr %208, align 4, !tbaa !38
  %210 = getelementptr inbounds %struct.nk_vec2, ptr %30, i32 0, i32 1
  %211 = load float, ptr %210, align 4, !tbaa !38
  %212 = fmul float %209, %211
  %213 = call float @llvm.fmuladd.f32(float %205, float %207, float %212)
  store float %213, ptr %31, align 4, !tbaa !22
  %214 = load float, ptr %31, align 4, !tbaa !22
  %215 = fcmp une float %214, 0.000000e+00
  br i1 %215, label %216, label %219

216:                                              ; preds = %186
  %217 = load float, ptr %31, align 4, !tbaa !22
  %218 = call float @nk_inv_sqrt(float noundef %217)
  store float %218, ptr %31, align 4, !tbaa !22
  br label %220

219:                                              ; preds = %186
  store float 1.000000e+00, ptr %31, align 4, !tbaa !22
  br label %220

220:                                              ; preds = %219, %216
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #6
  %221 = getelementptr inbounds %struct.nk_vec2, ptr %30, i32 0, i32 0
  %222 = load float, ptr %221, align 4, !tbaa !37
  %223 = load float, ptr %31, align 4, !tbaa !22
  %224 = fmul float %222, %223
  %225 = getelementptr inbounds %struct.nk_vec2, ptr %30, i32 0, i32 1
  %226 = load float, ptr %225, align 4, !tbaa !38
  %227 = load float, ptr %31, align 4, !tbaa !22
  %228 = fmul float %226, %227
  %229 = call <2 x float> @nk_vec2(float noundef %224, float noundef %228)
  store <2 x float> %229, ptr %32, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %30, ptr align 4 %32, i64 8, i1 false), !tbaa.struct !36
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #6
  %230 = getelementptr inbounds %struct.nk_vec2, ptr %30, i32 0, i32 1
  %231 = load float, ptr %230, align 4, !tbaa !38
  %232 = load ptr, ptr %25, align 8, !tbaa !5
  %233 = load i64, ptr %15, align 8, !tbaa !25
  %234 = getelementptr inbounds %struct.nk_vec2, ptr %232, i64 %233
  %235 = getelementptr inbounds %struct.nk_vec2, ptr %234, i32 0, i32 0
  store float %231, ptr %235, align 4, !tbaa !37
  %236 = getelementptr inbounds %struct.nk_vec2, ptr %30, i32 0, i32 0
  %237 = load float, ptr %236, align 4, !tbaa !37
  %238 = fneg float %237
  %239 = load ptr, ptr %25, align 8, !tbaa !5
  %240 = load i64, ptr %15, align 8, !tbaa !25
  %241 = getelementptr inbounds %struct.nk_vec2, ptr %239, i64 %240
  %242 = getelementptr inbounds %struct.nk_vec2, ptr %241, i32 0, i32 1
  store float %238, ptr %242, align 4, !tbaa !38
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #6
  br label %243

243:                                              ; preds = %220
  %244 = load i64, ptr %16, align 8, !tbaa !25
  %245 = add i64 %244, 1
  store i64 %245, ptr %16, align 8, !tbaa !25
  store i64 %244, ptr %15, align 8, !tbaa !25
  br label %181, !llvm.loop !39

246:                                              ; preds = %181
  %247 = load i32, ptr %9, align 4, !tbaa !9
  %248 = sub i32 %247, 1
  %249 = zext i32 %248 to i64
  store i64 %249, ptr %15, align 8, !tbaa !25
  store i64 0, ptr %16, align 8, !tbaa !25
  br label %250

250:                                              ; preds = %438, %246
  %251 = load i64, ptr %16, align 8, !tbaa !25
  %252 = load i32, ptr %9, align 4, !tbaa !9
  %253 = zext i32 %252 to i64
  %254 = icmp ult i64 %251, %253
  br i1 %254, label %255, label %441

255:                                              ; preds = %250
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #6
  %256 = load ptr, ptr %7, align 8, !tbaa !5
  %257 = getelementptr inbounds %struct.nk_draw_list, ptr %256, i32 0, i32 2
  %258 = getelementptr inbounds %struct.nk_convert_config, ptr %257, i32 0, i32 6
  %259 = getelementptr inbounds %struct.nk_draw_null_texture, ptr %258, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %33, ptr align 8 %259, i64 8, i1 false), !tbaa.struct !36
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #6
  %260 = load ptr, ptr %25, align 8, !tbaa !5
  %261 = load i64, ptr %15, align 8, !tbaa !25
  %262 = getelementptr inbounds %struct.nk_vec2, ptr %260, i64 %261
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %34, ptr align 4 %262, i64 8, i1 false), !tbaa.struct !36
  call void @llvm.lifetime.start.p0(i64 8, ptr %35) #6
  %263 = load ptr, ptr %25, align 8, !tbaa !5
  %264 = load i64, ptr %16, align 8, !tbaa !25
  %265 = getelementptr inbounds %struct.nk_vec2, ptr %263, i64 %264
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %35, ptr align 4 %265, i64 8, i1 false), !tbaa.struct !36
  call void @llvm.lifetime.start.p0(i64 8, ptr %36) #6
  %266 = getelementptr inbounds %struct.nk_vec2, ptr %34, i32 0, i32 0
  %267 = load float, ptr %266, align 4, !tbaa !37
  %268 = getelementptr inbounds %struct.nk_vec2, ptr %35, i32 0, i32 0
  %269 = load float, ptr %268, align 4, !tbaa !37
  %270 = fadd float %267, %269
  %271 = getelementptr inbounds %struct.nk_vec2, ptr %34, i32 0, i32 1
  %272 = load float, ptr %271, align 4, !tbaa !38
  %273 = getelementptr inbounds %struct.nk_vec2, ptr %35, i32 0, i32 1
  %274 = load float, ptr %273, align 4, !tbaa !38
  %275 = fadd float %272, %274
  %276 = call <2 x float> @nk_vec2(float noundef %270, float noundef %275)
  store <2 x float> %276, ptr %37, align 4
  %277 = getelementptr inbounds %struct.nk_vec2, ptr %37, i32 0, i32 0
  %278 = load float, ptr %277, align 4, !tbaa !37
  %279 = fmul float %278, 5.000000e-01
  %280 = getelementptr inbounds %struct.nk_vec2, ptr %34, i32 0, i32 0
  %281 = load float, ptr %280, align 4, !tbaa !37
  %282 = getelementptr inbounds %struct.nk_vec2, ptr %35, i32 0, i32 0
  %283 = load float, ptr %282, align 4, !tbaa !37
  %284 = fadd float %281, %283
  %285 = getelementptr inbounds %struct.nk_vec2, ptr %34, i32 0, i32 1
  %286 = load float, ptr %285, align 4, !tbaa !38
  %287 = getelementptr inbounds %struct.nk_vec2, ptr %35, i32 0, i32 1
  %288 = load float, ptr %287, align 4, !tbaa !38
  %289 = fadd float %286, %288
  %290 = call <2 x float> @nk_vec2(float noundef %284, float noundef %289)
  store <2 x float> %290, ptr %38, align 4
  %291 = getelementptr inbounds %struct.nk_vec2, ptr %38, i32 0, i32 1
  %292 = load float, ptr %291, align 4, !tbaa !38
  %293 = fmul float %292, 5.000000e-01
  %294 = call <2 x float> @nk_vec2(float noundef %279, float noundef %293)
  store <2 x float> %294, ptr %36, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %39) #6
  %295 = getelementptr inbounds %struct.nk_vec2, ptr %36, i32 0, i32 0
  %296 = load float, ptr %295, align 4, !tbaa !37
  %297 = getelementptr inbounds %struct.nk_vec2, ptr %36, i32 0, i32 0
  %298 = load float, ptr %297, align 4, !tbaa !37
  %299 = getelementptr inbounds %struct.nk_vec2, ptr %36, i32 0, i32 1
  %300 = load float, ptr %299, align 4, !tbaa !38
  %301 = getelementptr inbounds %struct.nk_vec2, ptr %36, i32 0, i32 1
  %302 = load float, ptr %301, align 4, !tbaa !38
  %303 = fmul float %300, %302
  %304 = call float @llvm.fmuladd.f32(float %296, float %298, float %303)
  store float %304, ptr %39, align 4, !tbaa !22
  %305 = load float, ptr %39, align 4, !tbaa !22
  %306 = fcmp ogt float %305, 0x3EB0C6F7A0000000
  br i1 %306, label %307, label %326

307:                                              ; preds = %255
  call void @llvm.lifetime.start.p0(i64 4, ptr %40) #6
  %308 = load float, ptr %39, align 4, !tbaa !22
  %309 = fdiv float 1.000000e+00, %308
  store float %309, ptr %40, align 4, !tbaa !22
  %310 = load float, ptr %40, align 4, !tbaa !22
  %311 = fcmp olt float %310, 1.000000e+02
  br i1 %311, label %312, label %314

312:                                              ; preds = %307
  %313 = load float, ptr %40, align 4, !tbaa !22
  br label %315

314:                                              ; preds = %307
  br label %315

315:                                              ; preds = %314, %312
  %316 = phi float [ %313, %312 ], [ 1.000000e+02, %314 ]
  store float %316, ptr %40, align 4, !tbaa !22
  call void @llvm.lifetime.start.p0(i64 8, ptr %41) #6
  %317 = getelementptr inbounds %struct.nk_vec2, ptr %36, i32 0, i32 0
  %318 = load float, ptr %317, align 4, !tbaa !37
  %319 = load float, ptr %40, align 4, !tbaa !22
  %320 = fmul float %318, %319
  %321 = getelementptr inbounds %struct.nk_vec2, ptr %36, i32 0, i32 1
  %322 = load float, ptr %321, align 4, !tbaa !38
  %323 = load float, ptr %40, align 4, !tbaa !22
  %324 = fmul float %322, %323
  %325 = call <2 x float> @nk_vec2(float noundef %320, float noundef %324)
  store <2 x float> %325, ptr %41, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %36, ptr align 4 %41, i64 8, i1 false), !tbaa.struct !36
  call void @llvm.lifetime.end.p0(i64 8, ptr %41) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %40) #6
  br label %326

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

438:                                              ; preds = %326
  %439 = load i64, ptr %16, align 8, !tbaa !25
  %440 = add i64 %439, 1
  store i64 %440, ptr %16, align 8, !tbaa !25
  store i64 %439, ptr %15, align 8, !tbaa !25
  br label %250, !llvm.loop !40

441:                                              ; preds = %250
  %442 = load ptr, ptr %7, align 8, !tbaa !5
  %443 = getelementptr inbounds %struct.nk_draw_list, ptr %442, i32 0, i32 4
  %444 = load ptr, ptr %443, align 8, !tbaa !27
  call void @nk_buffer_reset(ptr noundef %444, i32 noundef 0)
  store i32 0, ptr %13, align 4
  br label %445

445:                                              ; preds = %441, %135, %110
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  %446 = load i32, ptr %13, align 4
  switch i32 %446, label %531 [
    i32 0, label %447
  ]

447:                                              ; preds = %445
  br label %530

448:                                              ; preds = %62
  call void @llvm.lifetime.start.p0(i64 8, ptr %45) #6
  store i64 0, ptr %45, align 8, !tbaa !25
  call void @llvm.lifetime.start.p0(i64 8, ptr %46) #6
  %449 = load ptr, ptr %7, align 8, !tbaa !5
  %450 = getelementptr inbounds %struct.nk_draw_list, ptr %449, i32 0, i32 7
  %451 = load i32, ptr %450, align 4, !tbaa !26
  %452 = zext i32 %451 to i64
  store i64 %452, ptr %46, align 8, !tbaa !25
  call void @llvm.lifetime.start.p0(i64 8, ptr %47) #6
  %453 = load i32, ptr %9, align 4, !tbaa !9
  %454 = sub i32 %453, 2
  %455 = mul i32 %454, 3
  %456 = zext i32 %455 to i64
  store i64 %456, ptr %47, align 8, !tbaa !25
  call void @llvm.lifetime.start.p0(i64 8, ptr %48) #6
  %457 = load i32, ptr %9, align 4, !tbaa !9
  %458 = zext i32 %457 to i64
  store i64 %458, ptr %48, align 8, !tbaa !25
  call void @llvm.lifetime.start.p0(i64 8, ptr %49) #6
  %459 = load ptr, ptr %7, align 8, !tbaa !5
  %460 = load i64, ptr %48, align 8, !tbaa !25
  %461 = call ptr @nk_draw_list_alloc_vertices(ptr noundef %459, i64 noundef %460)
  store ptr %461, ptr %49, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %50) #6
  %462 = load ptr, ptr %7, align 8, !tbaa !5
  %463 = load i64, ptr %47, align 8, !tbaa !25
  %464 = call ptr @nk_draw_list_alloc_elements(ptr noundef %462, i64 noundef %463)
  store ptr %464, ptr %50, align 8, !tbaa !5
  %465 = load ptr, ptr %49, align 8, !tbaa !5
  %466 = icmp ne ptr %465, null
  br i1 %466, label %467, label %470

467:                                              ; preds = %448
  %468 = load ptr, ptr %50, align 8, !tbaa !5
  %469 = icmp ne ptr %468, null
  br i1 %469, label %471, label %470

470:                                              ; preds = %467, %448
  store i32 1, ptr %13, align 4
  br label %527

471:                                              ; preds = %467
  store i64 0, ptr %45, align 8, !tbaa !25
  br label %472

472:                                              ; preds = %494, %471
  %473 = load i64, ptr %45, align 8, !tbaa !25
  %474 = load i64, ptr %48, align 8, !tbaa !25
  %475 = icmp ult i64 %473, %474
  br i1 %475, label %476, label %497

476:                                              ; preds = %472
  %477 = load ptr, ptr %49, align 8, !tbaa !5
  %478 = load ptr, ptr %7, align 8, !tbaa !5
  %479 = getelementptr inbounds %struct.nk_draw_list, ptr %478, i32 0, i32 2
  %480 = load ptr, ptr %8, align 8, !tbaa !5
  %481 = load i64, ptr %45, align 8, !tbaa !25
  %482 = getelementptr inbounds %struct.nk_vec2, ptr %480, i64 %481
  %483 = load ptr, ptr %7, align 8, !tbaa !5
  %484 = getelementptr inbounds %struct.nk_draw_list, ptr %483, i32 0, i32 2
  %485 = getelementptr inbounds %struct.nk_convert_config, ptr %484, i32 0, i32 6
  %486 = getelementptr inbounds %struct.nk_draw_null_texture, ptr %485, i32 0, i32 1
  %487 = load <2 x float>, ptr %482, align 4
  %488 = load <2 x float>, ptr %486, align 8
  %489 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %11, i32 0, i32 0
  %490 = load <2 x float>, ptr %489, align 4
  %491 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %11, i32 0, i32 1
  %492 = load <2 x float>, ptr %491, align 4
  %493 = call ptr @nk_draw_vertex(ptr noundef %477, ptr noundef %479, <2 x float> %487, <2 x float> %488, <2 x float> %490, <2 x float> %492)
  store ptr %493, ptr %49, align 8, !tbaa !5
  br label %494

494:                                              ; preds = %476
  %495 = load i64, ptr %45, align 8, !tbaa !25
  %496 = add i64 %495, 1
  store i64 %496, ptr %45, align 8, !tbaa !25
  br label %472, !llvm.loop !41

497:                                              ; preds = %472
  store i64 2, ptr %45, align 8, !tbaa !25
  br label %498

498:                                              ; preds = %523, %497
  %499 = load i64, ptr %45, align 8, !tbaa !25
  %500 = load i32, ptr %9, align 4, !tbaa !9
  %501 = zext i32 %500 to i64
  %502 = icmp ult i64 %499, %501
  br i1 %502, label %503, label %526

503:                                              ; preds = %498
  %504 = load i64, ptr %46, align 8, !tbaa !25
  %505 = trunc i64 %504 to i16
  %506 = load ptr, ptr %50, align 8, !tbaa !5
  %507 = getelementptr inbounds i16, ptr %506, i64 0
  store i16 %505, ptr %507, align 2, !tbaa !32
  %508 = load i64, ptr %46, align 8, !tbaa !25
  %509 = load i64, ptr %45, align 8, !tbaa !25
  %510 = add i64 %508, %509
  %511 = sub i64 %510, 1
  %512 = trunc i64 %511 to i16
  %513 = load ptr, ptr %50, align 8, !tbaa !5
  %514 = getelementptr inbounds i16, ptr %513, i64 1
  store i16 %512, ptr %514, align 2, !tbaa !32
  %515 = load i64, ptr %46, align 8, !tbaa !25
  %516 = load i64, ptr %45, align 8, !tbaa !25
  %517 = add i64 %515, %516
  %518 = trunc i64 %517 to i16
  %519 = load ptr, ptr %50, align 8, !tbaa !5
  %520 = getelementptr inbounds i16, ptr %519, i64 2
  store i16 %518, ptr %520, align 2, !tbaa !32
  %521 = load ptr, ptr %50, align 8, !tbaa !5
  %522 = getelementptr inbounds i16, ptr %521, i64 3
  store ptr %522, ptr %50, align 8, !tbaa !5
  br label %523

523:                                              ; preds = %503
  %524 = load i64, ptr %45, align 8, !tbaa !25
  %525 = add i64 %524, 1
  store i64 %525, ptr %45, align 8, !tbaa !25
  br label %498, !llvm.loop !42

526:                                              ; preds = %498
  store i32 0, ptr %13, align 4
  br label %527

527:                                              ; preds = %526, %470
  call void @llvm.lifetime.end.p0(i64 8, ptr %50) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %49) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %48) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %47) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %46) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %45) #6
  %528 = load i32, ptr %13, align 4
  switch i32 %528, label %531 [
    i32 0, label %529
  ]

529:                                              ; preds = %527
  br label %530

530:                                              ; preds = %529, %447
  store i32 0, ptr %13, align 4
  br label %531

531:                                              ; preds = %530, %527, %445, %61
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #6
  %532 = load i32, ptr %13, align 4
  switch i32 %532, label %534 [
    i32 0, label %533
    i32 1, label %533
  ]

533:                                              ; preds = %531, %531
  ret void

534:                                              ; preds = %531
  unreachable
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nounwind uwtable "min-legal-vector-width"="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 = { 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 = { 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 = { nounwind }
attributes #7 = { 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/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !7, i64 3}
!12 = !{!"nk_color", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 3}
!13 = !{!14, !16, i64 112}
!14 = !{!"nk_draw_list", !15, i64 0, !7, i64 16, !17, i64 112, !6, i64 176, !6, i64 184, !6, i64 192, !10, i64 200, !10, i64 204, !10, i64 208, !20, i64 216, !10, i64 224, !10, i64 228, !10, i64 232, !10, i64 236}
!15 = !{!"nk_rect", !16, i64 0, !16, i64 4, !16, i64 8, !16, i64 12}
!16 = !{!"float", !7, i64 0}
!17 = !{!"nk_convert_config", !16, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !18, i64 24, !6, i64 40, !20, i64 48, !20, i64 56}
!18 = !{!"nk_draw_null_texture", !7, i64 0, !19, i64 8}
!19 = !{!"nk_vec2", !16, i64 0, !16, i64 4}
!20 = !{!"long", !7, i64 0}
!21 = !{i64 0, i64 4, !22, i64 4, i64 4, !22, i64 8, i64 4, !22, i64 12, i64 4, !22}
!22 = !{!16, !16, i64 0}
!23 = !{!24, !16, i64 12}
!24 = !{!"nk_colorf", !16, i64 0, !16, i64 4, !16, i64 8, !16, i64 12}
!25 = !{!20, !20, i64 0}
!26 = !{!14, !10, i64 204}
!27 = !{!14, !6, i64 184}
!28 = !{!29, !6, i64 64}
!29 = !{!"nk_buffer", !7, i64 0, !30, i64 32, !10, i64 56, !31, i64 64, !16, i64 80, !20, i64 88, !20, i64 96, !20, i64 104, !20, i64 112}
!30 = !{!"nk_allocator", !7, i64 0, !6, i64 8, !6, i64 16}
!31 = !{!"nk_memory", !6, i64 0, !20, i64 8}
!32 = !{!33, !33, i64 0}
!33 = !{!"short", !7, i64 0}
!34 = distinct !{!34, !35}
!35 = !{!"llvm.loop.mustprogress"}
!36 = !{i64 0, i64 4, !22, i64 4, i64 4, !22}
!37 = !{!19, !16, i64 0}
!38 = !{!19, !16, i64 4}
!39 = distinct !{!39, !35}
!40 = distinct !{!40, !35}
!41 = distinct !{!41, !35}
!42 = distinct !{!42, !35}


; 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.2 = external hidden unnamed_addr constant [103 x i8], align 1
@.str.26 = 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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #0

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

; Function Attrs: nounwind uwtable
declare dso_local <2 x float> @nk_vec2(float noundef, float noundef) local_unnamed_addr #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: nounwind uwtable
declare dso_local void @nk_color_fv(ptr noundef, i32) local_unnamed_addr #4

; Function Attrs: nounwind uwtable
declare hidden ptr @nk_buffer_alloc(ptr noundef, i32 noundef, i64 noundef, i64 noundef) local_unnamed_addr #4

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

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

; Function Attrs: nounwind uwtable
declare hidden ptr @nk_draw_list_alloc_vertices(ptr noundef, i64 noundef) local_unnamed_addr #4

; Function Attrs: nounwind uwtable
declare hidden ptr @nk_draw_list_alloc_elements(ptr noundef, i64 noundef) local_unnamed_addr #4

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

; Function Attrs: nounwind uwtable
declare hidden ptr @nk_draw_vertex(ptr noundef, ptr noundef, <2 x float>, <2 x float>, <2 x float>, <2 x float>) local_unnamed_addr #1

; Function Attrs: nounwind 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 #1 {
  %6 = alloca %struct.nk_colorf, align 8
  %.sroa.2.0.extract.shift = lshr i32 %3, 24
  %.sroa.2.0.extract.trunc = trunc nuw i32 %.sroa.2.0.extract.shift to i8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #5
  %.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.26, ptr noundef nonnull @.str.2, i32 noundef 9873, ptr noundef nonnull @__PRETTY_FUNCTION__.nk_draw_list_fill_poly_convex) #6
  unreachable

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

10:                                               ; preds = %8
  %11 = uitofp i8 %.sroa.2.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.2.0.insert.ext = zext i8 %15 to i32
  %.sroa.2.0.insert.shift = shl nuw i32 %.sroa.2.0.insert.ext, 24
  %.sroa.0191.0.insert.ext = and i32 %3, 16777215
  %.sroa.0191.0.insert.insert = or disjoint i32 %.sroa.2.0.insert.shift, %.sroa.0191.0.insert.ext
  call void @nk_color_fv(ptr noundef nonnull %6, i32 %.sroa.0191.0.insert.insert)
  %.sroa.0149.0.copyload = load <2 x float>, ptr %6, align 8
  %.sroa.4150.0..sroa_idx = getelementptr inbounds i8, ptr %6, i64 8
  %.sroa.4150.0.copyload = load <2 x float>, ptr %.sroa.4150.0..sroa_idx, align 8
  %.sroa.4150.12.vec.insert = insertelement <2 x float> %.sroa.4150.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 !17
  %19 = zext i32 %18 to i64
  br i1 %16, label %20, label %159

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 ptr @nk_draw_list_alloc_vertices(ptr noundef nonnull %0, i64 noundef %24)
  %26 = call ptr @nk_draw_list_alloc_elements(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 = select i1 %28, i1 %29, i1 false
  br i1 %or.cond4, label %30, label %.critedge218

30:                                               ; preds = %20
  %31 = getelementptr inbounds i8, ptr %0, i64 184
  %32 = load ptr, ptr %31, align 8, !tbaa !18
  %33 = getelementptr inbounds i8, ptr %32, i64 64
  %34 = load ptr, ptr %33, align 8, !tbaa !19
  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 !18
  %38 = call ptr @nk_buffer_alloc(ptr noundef %37, i32 noundef 0, i64 noundef %36, i64 noundef 4)
  %.not216 = icmp eq ptr %38, null
  br i1 %.not216, label %.critedge218, label %.lr.ph227

.lr.ph227:                                        ; 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 !18
  %43 = getelementptr inbounds i8, ptr %42, i64 64
  %44 = load ptr, ptr %43, align 8, !tbaa !19
  %45 = getelementptr inbounds i8, ptr %44, i64 %41
  %46 = trunc i32 %18 to i16
  %47 = add nuw nsw i64 %19, 65534
  %xtraiter240 = and i64 %35, 1
  %48 = icmp eq i32 %2, 3
  br i1 %48, label %._crit_edge.unr-lcssa, label %.lr.ph227.new

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

51:                                               ; preds = %51, %.lr.ph227.new
  %.0196226 = phi i64 [ 2, %.lr.ph227.new ], [ %69, %51 ]
  %.0202225 = phi ptr [ %26, %.lr.ph227.new ], [ %68, %51 ]
  %niter245 = phi i64 [ 0, %.lr.ph227.new ], [ %niter245.next.1, %51 ]
  store i16 %46, ptr %.0202225, align 2, !tbaa !23
  %52 = shl nuw i64 %.0196226, 1
  %53 = add nuw nsw i64 %47, %52
  %54 = trunc i64 %53 to i16
  %55 = getelementptr inbounds i8, ptr %.0202225, i64 2
  store i16 %54, ptr %55, align 2, !tbaa !23
  %56 = add nuw nsw i64 %52, %19
  %57 = trunc i64 %56 to i16
  %58 = getelementptr inbounds i8, ptr %.0202225, i64 4
  store i16 %57, ptr %58, align 2, !tbaa !23
  %59 = getelementptr inbounds i8, ptr %.0202225, i64 6
  store i16 %46, ptr %59, align 2, !tbaa !23
  %60 = shl nuw i64 %.0196226, 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 %.0202225, i64 8
  store i16 %63, ptr %64, align 2, !tbaa !23
  %65 = add nuw nsw i64 %61, %19
  %66 = trunc i64 %65 to i16
  %67 = getelementptr inbounds i8, ptr %.0202225, i64 10
  store i16 %66, ptr %67, align 2, !tbaa !23
  %68 = getelementptr inbounds i8, ptr %.0202225, i64 12
  %69 = add nuw nsw i64 %.0196226, 2
  %niter245.next.1 = add i64 %niter245, 2
  %niter245.ncmp.1 = icmp eq i64 %niter245, %50
  br i1 %niter245.ncmp.1, label %._crit_edge.unr-lcssa.loopexit, label %51, !llvm.loop !25

._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.ph227
  %.lcssa.ph = phi ptr [ poison, %.lr.ph227 ], [ %68, %._crit_edge.unr-lcssa.loopexit ]
  %.0196226.unr = phi i64 [ 4, %.lr.ph227 ], [ %70, %._crit_edge.unr-lcssa.loopexit ]
  %.0202225.unr = phi ptr [ %26, %.lr.ph227 ], [ %68, %._crit_edge.unr-lcssa.loopexit ]
  %lcmp.mod242.not = icmp eq i64 %xtraiter240, 0
  br i1 %lcmp.mod242.not, label %._crit_edge, label %._crit_edge.epilog-lcssa

._crit_edge.epilog-lcssa:                         ; preds = %._crit_edge.unr-lcssa
  store i16 %46, ptr %.0202225.unr, align 2, !tbaa !23
  %71 = add nuw nsw i64 %47, %.0196226.unr
  %72 = trunc i64 %71 to i16
  %73 = getelementptr inbounds i8, ptr %.0202225.unr, i64 2
  store i16 %72, ptr %73, align 2, !tbaa !23
  %74 = add nuw nsw i64 %.0196226.unr, %19
  %75 = trunc i64 %74 to i16
  %76 = getelementptr inbounds i8, ptr %.0202225.unr, i64 4
  store i16 %75, ptr %76, align 2, !tbaa !23
  %77 = getelementptr inbounds i8, ptr %.0202225.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
  %.0197229 = phi i64 [ %79, %._crit_edge ], [ %.0199228, %93 ]
  %.0199228 = phi i64 [ 0, %._crit_edge ], [ %100, %93 ]
  %83 = getelementptr inbounds %struct.nk_vec2, ptr %1, i64 %.0197229
  %.sroa.085.0.copyload = load float, ptr %83, align 4, !tbaa !27
  %.sroa.486.0..sroa_idx = getelementptr inbounds i8, ptr %83, i64 4
  %.sroa.486.0.copyload = load float, ptr %.sroa.486.0..sroa_idx, align 4, !tbaa !27
  %84 = getelementptr inbounds %struct.nk_vec2, ptr %1, i64 %.0199228
  %.sroa.084.0.copyload = load float, ptr %84, align 4, !tbaa !27
  %.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 !27
  %85 = fsub float %.sroa.084.0.copyload, %.sroa.085.0.copyload
  %86 = fsub float %.sroa.4.0.copyload, %.sroa.486.0.copyload
  %87 = call <2 x float> @nk_vec2(float noundef %85, float noundef %86)
  %.sroa.071.0.vec.extract = extractelement <2 x float> %87, i64 0
  %.sroa.071.4.vec.extract = extractelement <2 x float> %87, i64 1
  %88 = fmul float %.sroa.071.4.vec.extract, %.sroa.071.4.vec.extract
  %89 = call float @llvm.fmuladd.f32(float %.sroa.071.0.vec.extract, float %.sroa.071.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 float @nk_inv_sqrt(float noundef %89)
  br label %93

93:                                               ; preds = %82, %91
  %.0204 = phi float [ %92, %91 ], [ 1.000000e+00, %82 ]
  %94 = fmul float %.sroa.071.0.vec.extract, %.0204
  %95 = fmul float %.sroa.071.4.vec.extract, %.0204
  %96 = call <2 x float> @nk_vec2(float noundef %94, float noundef %95)
  %.sroa.071.4.vec.extract83 = extractelement <2 x float> %96, i64 1
  %97 = getelementptr inbounds %struct.nk_vec2, ptr %38, i64 %.0197229
  store float %.sroa.071.4.vec.extract83, ptr %97, align 4, !tbaa !28
  %.sroa.071.0.vec.extract77 = extractelement <2 x float> %96, i64 0
  %98 = fneg float %.sroa.071.0.vec.extract77
  %99 = getelementptr inbounds i8, ptr %97, i64 4
  store float %98, ptr %99, align 4, !tbaa !29
  %100 = add nuw nsw i64 %.0199228, 1
  %exitcond236.not = icmp eq i64 %100, %35
  br i1 %exitcond236.not, label %.preheader, label %82, !llvm.loop !30

101:                                              ; preds = %.preheader, %121
  %.1198233 = phi i64 [ %79, %.preheader ], [ %.1200232, %121 ]
  %.1200232 = phi i64 [ 0, %.preheader ], [ %157, %121 ]
  %.0201231 = phi ptr [ %45, %.preheader ], [ %140, %121 ]
  %.1203230 = phi ptr [ %.lcssa, %.preheader ], [ %156, %121 ]
  %.sroa.064.0.copyload = load <2 x float>, ptr %80, align 8
  %102 = getelementptr inbounds %struct.nk_vec2, ptr %38, i64 %.1198233
  %.sroa.060.0.copyload = load float, ptr %102, align 4, !tbaa !27
  %.sroa.562.0..sroa_idx = getelementptr inbounds i8, ptr %102, i64 4
  %.sroa.562.0.copyload = load float, ptr %.sroa.562.0..sroa_idx, align 4, !tbaa !27
  %103 = getelementptr inbounds %struct.nk_vec2, ptr %38, i64 %.1200232
  %.sroa.057.0.copyload = load float, ptr %103, align 4, !tbaa !27
  %.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 !27
  %104 = fadd float %.sroa.060.0.copyload, %.sroa.057.0.copyload
  %105 = fadd float %.sroa.562.0.copyload, %.sroa.5.0.copyload
  %106 = call <2 x float> @nk_vec2(float noundef %104, float noundef %105)
  %.sroa.035.0.vec.extract = extractelement <2 x float> %106, i64 0
  %107 = fmul float %.sroa.035.0.vec.extract, 5.000000e-01
  %108 = call <2 x float> @nk_vec2(float noundef %104, float noundef %105)
  %.sroa.034.4.vec.extract = extractelement <2 x float> %108, i64 1
  %109 = fmul float %.sroa.034.4.vec.extract, 5.000000e-01
  %110 = call <2 x float> @nk_vec2(float noundef %107, float noundef %109)
  %.sroa.036.0.vec.extract = extractelement <2 x float> %110, i64 0
  %.sroa.036.4.vec.extract = extractelement <2 x float> %110, i64 1
  %111 = fmul float %.sroa.036.4.vec.extract, %.sroa.036.4.vec.extract
  %112 = call float @llvm.fmuladd.f32(float %.sroa.036.0.vec.extract, float %.sroa.036.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.036.0.vec.extract, %117
  %119 = fmul float %.sroa.036.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
  %.pre238 = extractelement <2 x float> %120, i64 1
  br label %121

121:                                              ; preds = %114, %101
  %.sroa.036.4.vec.extract52.pre-phi = phi float [ %.pre238, %114 ], [ %.sroa.036.4.vec.extract, %101 ]
  %.sroa.036.0.vec.extract42.pre-phi = phi float [ %.pre, %114 ], [ %.sroa.036.0.vec.extract, %101 ]
  %122 = fmul float %.sroa.036.0.vec.extract42.pre-phi, 5.000000e-01
  %123 = fmul float %.sroa.036.4.vec.extract52.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 %.1200232
  %126 = load float, ptr %125, align 4, !tbaa !28
  %.sroa.036.0.vec.extract44 = extractelement <2 x float> %124, i64 0
  %127 = fsub float %126, %.sroa.036.0.vec.extract44
  %128 = getelementptr inbounds i8, ptr %125, i64 4
  %129 = load float, ptr %128, align 4, !tbaa !29
  %.sroa.036.4.vec.extract54 = extractelement <2 x float> %124, i64 1
  %130 = fsub float %129, %.sroa.036.4.vec.extract54
  %131 = call <2 x float> @nk_vec2(float noundef %127, float noundef %130)
  %132 = load <2 x float>, ptr %6, align 8
  %133 = load <2 x float>, ptr %.sroa.4150.0..sroa_idx, align 8
  %134 = call ptr @nk_draw_vertex(ptr noundef %.0201231, ptr noundef nonnull %12, <2 x float> %131, <2 x float> %.sroa.064.0.copyload, <2 x float> %132, <2 x float> %133)
  %135 = load float, ptr %125, align 4, !tbaa !28
  %136 = fadd float %.sroa.036.0.vec.extract44, %135
  %137 = load float, ptr %128, align 4, !tbaa !29
  %138 = fadd float %.sroa.036.4.vec.extract54, %137
  %139 = call <2 x float> @nk_vec2(float noundef %136, float noundef %138)
  %140 = call ptr @nk_draw_vertex(ptr noundef %134, ptr noundef nonnull %12, <2 x float> %139, <2 x float> %.sroa.064.0.copyload, <2 x float> %.sroa.0149.0.copyload, <2 x float> %.sroa.4150.12.vec.insert)
  %141 = shl nuw nsw i64 %.1200232, 1
  %142 = add nuw nsw i64 %141, %19
  %143 = trunc i64 %142 to i16
  store i16 %143, ptr %.1203230, align 2, !tbaa !23
  %144 = shl nuw nsw i64 %.1198233, 1
  %145 = add nuw nsw i64 %144, %19
  %146 = trunc i64 %145 to i16
  %147 = getelementptr inbounds i8, ptr %.1203230, i64 2
  store i16 %146, ptr %147, align 2, !tbaa !23
  %148 = add nuw nsw i64 %144, %81
  %149 = trunc i64 %148 to i16
  %150 = getelementptr inbounds i8, ptr %.1203230, i64 4
  store i16 %149, ptr %150, align 2, !tbaa !23
  %151 = getelementptr inbounds i8, ptr %.1203230, i64 6
  store i16 %149, ptr %151, align 2, !tbaa !23
  %152 = add nuw nsw i64 %141, %81
  %153 = trunc i64 %152 to i16
  %154 = getelementptr inbounds i8, ptr %.1203230, i64 8
  store i16 %153, ptr %154, align 2, !tbaa !23
  %155 = getelementptr inbounds i8, ptr %.1203230, i64 10
  store i16 %143, ptr %155, align 2, !tbaa !23
  %156 = getelementptr inbounds i8, ptr %.1203230, i64 12
  %157 = add nuw nsw i64 %.1200232, 1
  %exitcond237.not = icmp eq i64 %157, %35
  br i1 %exitcond237.not, label %.critedge, label %101, !llvm.loop !31

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

159:                                              ; preds = %10
  %160 = mul i32 %2, 3
  %161 = add i32 %160, -6
  %162 = zext i32 %161 to i64
  %163 = zext i32 %2 to i64
  %164 = call ptr @nk_draw_list_alloc_vertices(ptr noundef nonnull %0, i64 noundef %163)
  %165 = call ptr @nk_draw_list_alloc_elements(ptr noundef nonnull %0, i64 noundef %162)
  %166 = icmp ne ptr %164, null
  %167 = icmp ne ptr %165, null
  %or.cond6 = select i1 %166, i1 %167, i1 false
  br i1 %or.cond6, label %.preheader220, label %.critedge218

.preheader220:                                    ; preds = %159
  %168 = getelementptr inbounds i8, ptr %0, i64 144
  br label %173

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

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

173:                                              ; preds = %.preheader220, %173
  %.0192222 = phi ptr [ %164, %.preheader220 ], [ %179, %173 ]
  %.0194221 = phi i64 [ 0, %.preheader220 ], [ %180, %173 ]
  %174 = getelementptr inbounds %struct.nk_vec2, ptr %1, i64 %.0194221
  %175 = load <2 x float>, ptr %174, align 4
  %176 = load <2 x float>, ptr %168, align 8
  %177 = load <2 x float>, ptr %6, align 8
  %178 = load <2 x float>, ptr %.sroa.4150.0..sroa_idx, align 8
  %179 = call ptr @nk_draw_vertex(ptr noundef %.0192222, ptr noundef nonnull %12, <2 x float> %175, <2 x float> %176, <2 x float> %177, <2 x float> %178)
  %180 = add nuw nsw i64 %.0194221, 1
  %exitcond.not = icmp eq i64 %180, %163
  br i1 %exitcond.not, label %.lr.ph, label %173, !llvm.loop !32

181:                                              ; preds = %181, %.lr.ph.new
  %.0224 = phi ptr [ %165, %.lr.ph.new ], [ %208, %181 ]
  %.1195223 = phi i64 [ 2, %.lr.ph.new ], [ %209, %181 ]
  %niter = phi i64 [ 0, %.lr.ph.new ], [ %niter.next.3, %181 ]
  store i16 %169, ptr %.0224, align 2, !tbaa !23
  %182 = add nuw nsw i64 %.1195223, %19
  %183 = trunc i64 %182 to i16
  %184 = add i16 %183, -1
  %185 = getelementptr inbounds i8, ptr %.0224, i64 2
  store i16 %184, ptr %185, align 2, !tbaa !23
  %186 = getelementptr inbounds i8, ptr %.0224, i64 4
  store i16 %183, ptr %186, align 2, !tbaa !23
  %187 = getelementptr inbounds i8, ptr %.0224, i64 6
  %188 = or disjoint i64 %.1195223, 1
  store i16 %169, ptr %187, align 2, !tbaa !23
  %189 = add nuw nsw i64 %188, %19
  %190 = trunc i64 %189 to i16
  %191 = add i16 %190, -1
  %192 = getelementptr inbounds i8, ptr %.0224, i64 8
  store i16 %191, ptr %192, align 2, !tbaa !23
  %193 = getelementptr inbounds i8, ptr %.0224, i64 10
  store i16 %190, ptr %193, align 2, !tbaa !23
  %194 = getelementptr inbounds i8, ptr %.0224, i64 12
  %195 = add nuw nsw i64 %.1195223, 2
  store i16 %169, ptr %194, align 2, !tbaa !23
  %196 = add nuw nsw i64 %195, %19
  %197 = trunc i64 %196 to i16
  %198 = add i16 %197, -1
  %199 = getelementptr inbounds i8, ptr %.0224, i64 14
  store i16 %198, ptr %199, align 2, !tbaa !23
  %200 = getelementptr inbounds i8, ptr %.0224, i64 16
  store i16 %197, ptr %200, align 2, !tbaa !23
  %201 = getelementptr inbounds i8, ptr %.0224, i64 18
  %202 = add nuw nsw i64 %.1195223, 3
  store i16 %169, ptr %201, align 2, !tbaa !23
  %203 = add nuw nsw i64 %202, %19
  %204 = trunc i64 %203 to i16
  %205 = add i16 %204, -1
  %206 = getelementptr inbounds i8, ptr %.0224, i64 20
  store i16 %205, ptr %206, align 2, !tbaa !23
  %207 = getelementptr inbounds i8, ptr %.0224, i64 22
  store i16 %204, ptr %207, align 2, !tbaa !23
  %208 = getelementptr inbounds i8, ptr %.0224, i64 24
  %209 = add nuw nsw i64 %.1195223, 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 %.critedge218.loopexit.unr-lcssa, label %181, !llvm.loop !33

.critedge218.loopexit.unr-lcssa:                  ; preds = %181, %.lr.ph
  %.0224.unr = phi ptr [ %165, %.lr.ph ], [ %208, %181 ]
  %.1195223.unr = phi i64 [ 2, %.lr.ph ], [ %209, %181 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.critedge218, label %.epil.preheader

.epil.preheader:                                  ; preds = %.critedge218.loopexit.unr-lcssa, %.epil.preheader
  %.0224.epil = phi ptr [ %215, %.epil.preheader ], [ %.0224.unr, %.critedge218.loopexit.unr-lcssa ]
  %.1195223.epil = phi i64 [ %216, %.epil.preheader ], [ %.1195223.unr, %.critedge218.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.epil.preheader ], [ 0, %.critedge218.loopexit.unr-lcssa ]
  store i16 %169, ptr %.0224.epil, align 2, !tbaa !23
  %210 = add nuw nsw i64 %.1195223.epil, %19
  %211 = trunc i64 %210 to i16
  %212 = add i16 %211, -1
  %213 = getelementptr inbounds i8, ptr %.0224.epil, i64 2
  store i16 %212, ptr %213, align 2, !tbaa !23
  %214 = getelementptr inbounds i8, ptr %.0224.epil, i64 4
  store i16 %211, ptr %214, align 2, !tbaa !23
  %215 = getelementptr inbounds i8, ptr %.0224.epil, i64 6
  %216 = add nuw nsw i64 %.1195223.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 %.critedge218, label %.epil.preheader, !llvm.loop !34

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 = { 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 = { 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 = { nounwind }
attributes #6 = { 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 = !{!"nk_draw_list", !7, i64 0, !9, i64 16, !11, i64 112, !15, i64 176, !15, i64 184, !15, i64 192, !12, i64 200, !12, i64 204, !12, i64 208, !16, i64 216, !12, i64 224, !12, i64 228, !12, i64 232, !12, i64 236}
!7 = !{!"nk_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/C++ TBAA"}
!11 = !{!"nk_convert_config", !8, i64 0, !12, i64 4, !12, i64 8, !12, i64 12, !12, i64 16, !12, i64 20, !13, i64 24, !15, i64 40, !16, i64 48, !16, i64 56}
!12 = !{!"int", !9, i64 0}
!13 = !{!"nk_draw_null_texture", !9, i64 0, !14, i64 8}
!14 = !{!"nk_vec2", !8, i64 0, !8, i64 4}
!15 = !{!"any pointer", !9, i64 0}
!16 = !{!"long", !9, i64 0}
!17 = !{!6, !12, i64 204}
!18 = !{!6, !15, i64 184}
!19 = !{!20, !15, i64 64}
!20 = !{!"nk_buffer", !9, i64 0, !21, i64 32, !12, i64 56, !22, i64 64, !8, i64 80, !16, i64 88, !16, i64 96, !16, i64 104, !16, i64 112}
!21 = !{!"nk_allocator", !9, i64 0, !15, i64 8, !15, i64 16}
!22 = !{!"nk_memory", !15, i64 0, !16, i64 8}
!23 = !{!24, !24, i64 0}
!24 = !{!"short", !9, i64 0}
!25 = distinct !{!25, !26}
!26 = !{!"llvm.loop.mustprogress"}
!27 = !{!8, !8, i64 0}
!28 = !{!14, !8, i64 0}
!29 = !{!14, !8, i64 4}
!30 = distinct !{!30, !26}
!31 = distinct !{!31, !26}
!32 = distinct !{!32, !26}
!33 = distinct !{!33, !26}
!34 = distinct !{!34, !35}
!35 = !{!"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