; 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_rect = type { float, float, float, float }
%struct.nk_color = type { i8, i8, i8, i8 }
%struct.nk_colorf = type { float, float, float, float }
%union.nk_handle = type { ptr }
%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_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 }

@.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_rect_multi_color = external hidden unnamed_addr constant [147 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 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) #4

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

; Function Attrs: mustprogress uwtable
declare hidden noundef ptr @_ZL27nk_draw_list_alloc_elementsP12nk_draw_listm(ptr noundef, i64 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>) #6

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

; Function Attrs: mustprogress uwtable
define dso_local void @nk_draw_list_fill_rect_multi_color(ptr noundef %0, <2 x float> %1, <2 x float> %2, i32 %3, i32 %4, i32 %5, i32 %6) #6 {
  %8 = alloca %struct.nk_rect, align 4
  %9 = alloca %struct.nk_color, align 1
  %10 = alloca %struct.nk_color, align 1
  %11 = alloca %struct.nk_color, align 1
  %12 = alloca %struct.nk_color, align 1
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca %struct.nk_colorf, align 4
  %16 = alloca %struct.nk_colorf, align 4
  %17 = alloca %struct.nk_colorf, align 4
  %18 = alloca %struct.nk_colorf, align 4
  %19 = alloca ptr, align 8
  %20 = alloca i16, align 2
  %21 = alloca %struct.nk_color, align 1
  %22 = alloca %struct.nk_color, align 1
  %23 = alloca %struct.nk_color, align 1
  %24 = alloca %struct.nk_color, align 1
  %25 = alloca i32, align 4
  %26 = alloca %union.nk_handle, align 8
  %27 = alloca %struct.nk_vec2, align 4
  %28 = alloca %struct.nk_vec2, align 4
  %29 = alloca %struct.nk_colorf, align 4
  %30 = alloca %struct.nk_vec2, align 4
  %31 = alloca %struct.nk_vec2, align 4
  %32 = alloca %struct.nk_colorf, align 4
  %33 = alloca %struct.nk_vec2, align 4
  %34 = alloca %struct.nk_vec2, align 4
  %35 = alloca %struct.nk_colorf, align 4
  %36 = alloca %struct.nk_vec2, align 4
  %37 = alloca %struct.nk_vec2, align 4
  %38 = alloca %struct.nk_colorf, align 4
  %39 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %8, i32 0, i32 0
  store <2 x float> %1, ptr %39, align 4
  %40 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %8, i32 0, i32 1
  store <2 x float> %2, ptr %40, align 4
  store i32 %3, ptr %9, align 1
  store i32 %4, ptr %10, align 1
  store i32 %5, ptr %11, align 1
  store i32 %6, ptr %12, align 1
  store ptr %0, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr %15) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr %16) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr %17) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr %18) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #7
  call void @llvm.lifetime.start.p0(i64 2, ptr %20) #7
  %41 = getelementptr inbounds %struct.nk_colorf, ptr %15, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %21, ptr align 1 %9, i64 4, i1 false), !tbaa.struct !9
  %42 = load i32, ptr %21, align 1
  call void @nk_color_fv(ptr noundef %41, i32 %42)
  %43 = getelementptr inbounds %struct.nk_colorf, ptr %17, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %22, ptr align 1 %11, i64 4, i1 false), !tbaa.struct !9
  %44 = load i32, ptr %22, align 1
  call void @nk_color_fv(ptr noundef %43, i32 %44)
  %45 = getelementptr inbounds %struct.nk_colorf, ptr %16, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %23, ptr align 1 %10, i64 4, i1 false), !tbaa.struct !9
  %46 = load i32, ptr %23, align 1
  call void @nk_color_fv(ptr noundef %45, i32 %46)
  %47 = getelementptr inbounds %struct.nk_colorf, ptr %18, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %24, ptr align 1 %12, i64 4, i1 false), !tbaa.struct !9
  %48 = load i32, ptr %24, align 1
  call void @nk_color_fv(ptr noundef %47, i32 %48)
  %49 = load ptr, ptr %13, align 8, !tbaa !5
  %50 = icmp ne ptr %49, null
  br i1 %50, label %51, label %52

51:                                               ; preds = %7
  br label %54

52:                                               ; preds = %7
  call void @__assert_fail(ptr noundef @.str.25, ptr noundef @.str.1, i32 noundef 10396, ptr noundef @__PRETTY_FUNCTION__.nk_draw_list_fill_rect_multi_color) #8
  unreachable

53:                                               ; No predecessors!
  br label %54

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

57:                                               ; preds = %54
  store i32 1, ptr %25, align 4
  br label %205

58:                                               ; preds = %54
  %59 = load ptr, ptr %13, align 8, !tbaa !5
  %60 = load ptr, ptr %13, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct.nk_draw_list, ptr %60, i32 0, i32 2
  %62 = getelementptr inbounds %struct.nk_convert_config, ptr %61, i32 0, i32 6
  %63 = getelementptr inbounds %struct.nk_draw_null_texture, ptr %62, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %26, ptr align 8 %63, i64 8, i1 false), !tbaa.struct !11
  %64 = getelementptr inbounds %union.nk_handle, ptr %26, i32 0, i32 0
  %65 = load ptr, ptr %64, align 8
  call void @_ZL23nk_draw_list_push_imageP12nk_draw_list9nk_handle(ptr noundef %59, ptr %65)
  %66 = load ptr, ptr %13, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.nk_draw_list, ptr %66, i32 0, i32 7
  %68 = load i32, ptr %67, align 4, !tbaa !12
  %69 = trunc i32 %68 to i16
  store i16 %69, ptr %20, align 2, !tbaa !22
  %70 = load ptr, ptr %13, align 8, !tbaa !5
  %71 = call noundef ptr @_ZL27nk_draw_list_alloc_verticesP12nk_draw_listm(ptr noundef %70, i64 noundef 4)
  store ptr %71, ptr %14, align 8, !tbaa !5
  %72 = load ptr, ptr %13, align 8, !tbaa !5
  %73 = call noundef ptr @_ZL27nk_draw_list_alloc_elementsP12nk_draw_listm(ptr noundef %72, i64 noundef 6)
  store ptr %73, ptr %19, align 8, !tbaa !5
  %74 = load ptr, ptr %14, align 8, !tbaa !5
  %75 = icmp ne ptr %74, null
  br i1 %75, label %76, label %79

76:                                               ; preds = %58
  %77 = load ptr, ptr %19, align 8, !tbaa !5
  %78 = icmp ne ptr %77, null
  br i1 %78, label %80, label %79

79:                                               ; preds = %76, %58
  store i32 1, ptr %25, align 4
  br label %205

80:                                               ; preds = %76
  %81 = load i16, ptr %20, align 2, !tbaa !22
  %82 = zext i16 %81 to i32
  %83 = add nsw i32 %82, 0
  %84 = trunc i32 %83 to i16
  %85 = load ptr, ptr %19, align 8, !tbaa !5
  %86 = getelementptr inbounds i16, ptr %85, i64 0
  store i16 %84, ptr %86, align 2, !tbaa !22
  %87 = load i16, ptr %20, align 2, !tbaa !22
  %88 = zext i16 %87 to i32
  %89 = add nsw i32 %88, 1
  %90 = trunc i32 %89 to i16
  %91 = load ptr, ptr %19, align 8, !tbaa !5
  %92 = getelementptr inbounds i16, ptr %91, i64 1
  store i16 %90, ptr %92, align 2, !tbaa !22
  %93 = load i16, ptr %20, align 2, !tbaa !22
  %94 = zext i16 %93 to i32
  %95 = add nsw i32 %94, 2
  %96 = trunc i32 %95 to i16
  %97 = load ptr, ptr %19, align 8, !tbaa !5
  %98 = getelementptr inbounds i16, ptr %97, i64 2
  store i16 %96, ptr %98, align 2, !tbaa !22
  %99 = load i16, ptr %20, align 2, !tbaa !22
  %100 = zext i16 %99 to i32
  %101 = add nsw i32 %100, 0
  %102 = trunc i32 %101 to i16
  %103 = load ptr, ptr %19, align 8, !tbaa !5
  %104 = getelementptr inbounds i16, ptr %103, i64 3
  store i16 %102, ptr %104, align 2, !tbaa !22
  %105 = load i16, ptr %20, align 2, !tbaa !22
  %106 = zext i16 %105 to i32
  %107 = add nsw i32 %106, 2
  %108 = trunc i32 %107 to i16
  %109 = load ptr, ptr %19, align 8, !tbaa !5
  %110 = getelementptr inbounds i16, ptr %109, i64 4
  store i16 %108, ptr %110, align 2, !tbaa !22
  %111 = load i16, ptr %20, align 2, !tbaa !22
  %112 = zext i16 %111 to i32
  %113 = add nsw i32 %112, 3
  %114 = trunc i32 %113 to i16
  %115 = load ptr, ptr %19, align 8, !tbaa !5
  %116 = getelementptr inbounds i16, ptr %115, i64 5
  store i16 %114, ptr %116, align 2, !tbaa !22
  %117 = load ptr, ptr %14, align 8, !tbaa !5
  %118 = load ptr, ptr %13, align 8, !tbaa !5
  %119 = getelementptr inbounds %struct.nk_draw_list, ptr %118, i32 0, i32 2
  %120 = getelementptr inbounds %struct.nk_rect, ptr %8, i32 0, i32 0
  %121 = load float, ptr %120, align 4, !tbaa !24
  %122 = getelementptr inbounds %struct.nk_rect, ptr %8, i32 0, i32 1
  %123 = load float, ptr %122, align 4, !tbaa !25
  %124 = call <2 x float> @nk_vec2(float noundef %121, float noundef %123)
  store <2 x float> %124, ptr %27, align 4
  %125 = load ptr, ptr %13, align 8, !tbaa !5
  %126 = getelementptr inbounds %struct.nk_draw_list, ptr %125, i32 0, i32 2
  %127 = getelementptr inbounds %struct.nk_convert_config, ptr %126, i32 0, i32 6
  %128 = getelementptr inbounds %struct.nk_draw_null_texture, ptr %127, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %28, ptr align 8 %128, i64 8, i1 false), !tbaa.struct !26
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %29, ptr align 4 %15, i64 16, i1 false), !tbaa.struct !28
  %129 = load <2 x float>, ptr %27, align 4
  %130 = load <2 x float>, ptr %28, align 4
  %131 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %29, i32 0, i32 0
  %132 = load <2 x float>, ptr %131, align 4
  %133 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %29, i32 0, i32 1
  %134 = load <2 x float>, ptr %133, align 4
  %135 = call noundef ptr @_ZL14nk_draw_vertexPvPK17nk_convert_config7nk_vec2S3_9nk_colorf(ptr noundef %117, ptr noundef %119, <2 x float> %129, <2 x float> %130, <2 x float> %132, <2 x float> %134)
  store ptr %135, ptr %14, align 8, !tbaa !5
  %136 = load ptr, ptr %14, align 8, !tbaa !5
  %137 = load ptr, ptr %13, align 8, !tbaa !5
  %138 = getelementptr inbounds %struct.nk_draw_list, ptr %137, i32 0, i32 2
  %139 = getelementptr inbounds %struct.nk_rect, ptr %8, i32 0, i32 0
  %140 = load float, ptr %139, align 4, !tbaa !24
  %141 = getelementptr inbounds %struct.nk_rect, ptr %8, i32 0, i32 2
  %142 = load float, ptr %141, align 4, !tbaa !29
  %143 = fadd float %140, %142
  %144 = getelementptr inbounds %struct.nk_rect, ptr %8, i32 0, i32 1
  %145 = load float, ptr %144, align 4, !tbaa !25
  %146 = call <2 x float> @nk_vec2(float noundef %143, float noundef %145)
  store <2 x float> %146, ptr %30, align 4
  %147 = load ptr, ptr %13, align 8, !tbaa !5
  %148 = getelementptr inbounds %struct.nk_draw_list, ptr %147, i32 0, i32 2
  %149 = getelementptr inbounds %struct.nk_convert_config, ptr %148, i32 0, i32 6
  %150 = getelementptr inbounds %struct.nk_draw_null_texture, ptr %149, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %31, ptr align 8 %150, i64 8, i1 false), !tbaa.struct !26
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %32, ptr align 4 %16, i64 16, i1 false), !tbaa.struct !28
  %151 = load <2 x float>, ptr %30, align 4
  %152 = load <2 x float>, ptr %31, align 4
  %153 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %32, i32 0, i32 0
  %154 = load <2 x float>, ptr %153, align 4
  %155 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %32, i32 0, i32 1
  %156 = load <2 x float>, ptr %155, align 4
  %157 = call noundef ptr @_ZL14nk_draw_vertexPvPK17nk_convert_config7nk_vec2S3_9nk_colorf(ptr noundef %136, ptr noundef %138, <2 x float> %151, <2 x float> %152, <2 x float> %154, <2 x float> %156)
  store ptr %157, ptr %14, align 8, !tbaa !5
  %158 = load ptr, ptr %14, align 8, !tbaa !5
  %159 = load ptr, ptr %13, align 8, !tbaa !5
  %160 = getelementptr inbounds %struct.nk_draw_list, ptr %159, i32 0, i32 2
  %161 = getelementptr inbounds %struct.nk_rect, ptr %8, i32 0, i32 0
  %162 = load float, ptr %161, align 4, !tbaa !24
  %163 = getelementptr inbounds %struct.nk_rect, ptr %8, i32 0, i32 2
  %164 = load float, ptr %163, align 4, !tbaa !29
  %165 = fadd float %162, %164
  %166 = getelementptr inbounds %struct.nk_rect, ptr %8, i32 0, i32 1
  %167 = load float, ptr %166, align 4, !tbaa !25
  %168 = getelementptr inbounds %struct.nk_rect, ptr %8, i32 0, i32 3
  %169 = load float, ptr %168, align 4, !tbaa !30
  %170 = fadd float %167, %169
  %171 = call <2 x float> @nk_vec2(float noundef %165, float noundef %170)
  store <2 x float> %171, ptr %33, align 4
  %172 = load ptr, ptr %13, align 8, !tbaa !5
  %173 = getelementptr inbounds %struct.nk_draw_list, ptr %172, i32 0, i32 2
  %174 = getelementptr inbounds %struct.nk_convert_config, ptr %173, i32 0, i32 6
  %175 = getelementptr inbounds %struct.nk_draw_null_texture, ptr %174, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %34, ptr align 8 %175, i64 8, i1 false), !tbaa.struct !26
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %35, ptr align 4 %17, i64 16, i1 false), !tbaa.struct !28
  %176 = load <2 x float>, ptr %33, align 4
  %177 = load <2 x float>, ptr %34, align 4
  %178 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %35, i32 0, i32 0
  %179 = load <2 x float>, ptr %178, align 4
  %180 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %35, i32 0, i32 1
  %181 = load <2 x float>, ptr %180, align 4
  %182 = call noundef ptr @_ZL14nk_draw_vertexPvPK17nk_convert_config7nk_vec2S3_9nk_colorf(ptr noundef %158, ptr noundef %160, <2 x float> %176, <2 x float> %177, <2 x float> %179, <2 x float> %181)
  store ptr %182, ptr %14, align 8, !tbaa !5
  %183 = load ptr, ptr %14, align 8, !tbaa !5
  %184 = load ptr, ptr %13, align 8, !tbaa !5
  %185 = getelementptr inbounds %struct.nk_draw_list, ptr %184, i32 0, i32 2
  %186 = getelementptr inbounds %struct.nk_rect, ptr %8, i32 0, i32 0
  %187 = load float, ptr %186, align 4, !tbaa !24
  %188 = getelementptr inbounds %struct.nk_rect, ptr %8, i32 0, i32 1
  %189 = load float, ptr %188, align 4, !tbaa !25
  %190 = getelementptr inbounds %struct.nk_rect, ptr %8, i32 0, i32 3
  %191 = load float, ptr %190, align 4, !tbaa !30
  %192 = fadd float %189, %191
  %193 = call <2 x float> @nk_vec2(float noundef %187, float noundef %192)
  store <2 x float> %193, ptr %36, align 4
  %194 = load ptr, ptr %13, align 8, !tbaa !5
  %195 = getelementptr inbounds %struct.nk_draw_list, ptr %194, i32 0, i32 2
  %196 = getelementptr inbounds %struct.nk_convert_config, ptr %195, i32 0, i32 6
  %197 = getelementptr inbounds %struct.nk_draw_null_texture, ptr %196, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %37, ptr align 8 %197, i64 8, i1 false), !tbaa.struct !26
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %38, ptr align 4 %18, i64 16, i1 false), !tbaa.struct !28
  %198 = load <2 x float>, ptr %36, align 4
  %199 = load <2 x float>, ptr %37, align 4
  %200 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %38, i32 0, i32 0
  %201 = load <2 x float>, ptr %200, align 4
  %202 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %38, i32 0, i32 1
  %203 = load <2 x float>, ptr %202, align 4
  %204 = call noundef ptr @_ZL14nk_draw_vertexPvPK17nk_convert_config7nk_vec2S3_9nk_colorf(ptr noundef %183, ptr noundef %185, <2 x float> %198, <2 x float> %199, <2 x float> %201, <2 x float> %203)
  store ptr %204, ptr %14, align 8, !tbaa !5
  store i32 0, ptr %25, align 4
  br label %205

205:                                              ; preds = %80, %79, %57
  call void @llvm.lifetime.end.p0(i64 2, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  %206 = load i32, ptr %25, align 4
  switch i32 %206, label %208 [
    i32 0, label %207
    i32 1, label %207
  ]

207:                                              ; preds = %205, %205
  ret void

208:                                              ; preds = %205
  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 = { 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, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{i64 0, i64 1, !10, i64 1, i64 1, !10, i64 2, i64 1, !10, i64 3, i64 1, !10}
!10 = !{!7, !7, i64 0}
!11 = !{i64 0, i64 8, !10}
!12 = !{!13, !18, i64 204}
!13 = !{!"_ZTS12nk_draw_list", !14, i64 0, !7, i64 16, !16, i64 112, !6, i64 176, !6, i64 184, !6, i64 192, !18, i64 200, !18, i64 204, !18, i64 208, !21, i64 216, !18, i64 224, !18, i64 228, !17, i64 232, !17, i64 236}
!14 = !{!"_ZTS7nk_rect", !15, i64 0, !15, i64 4, !15, i64 8, !15, i64 12}
!15 = !{!"float", !7, i64 0}
!16 = !{!"_ZTS17nk_convert_config", !15, i64 0, !17, i64 4, !17, i64 8, !18, i64 12, !18, i64 16, !18, i64 20, !19, i64 24, !6, i64 40, !21, i64 48, !21, i64 56}
!17 = !{!"_ZTS16nk_anti_aliasing", !7, i64 0}
!18 = !{!"int", !7, i64 0}
!19 = !{!"_ZTS20nk_draw_null_texture", !7, i64 0, !20, i64 8}
!20 = !{!"_ZTS7nk_vec2", !15, i64 0, !15, i64 4}
!21 = !{!"long", !7, i64 0}
!22 = !{!23, !23, i64 0}
!23 = !{!"short", !7, i64 0}
!24 = !{!14, !15, i64 0}
!25 = !{!14, !15, i64 4}
!26 = !{i64 0, i64 4, !27, i64 4, i64 4, !27}
!27 = !{!15, !15, i64 0}
!28 = !{i64 0, i64 4, !27, i64 4, i64 4, !27, i64 8, i64 4, !27, i64 12, i64 4, !27}
!29 = !{!14, !15, i64 8}
!30 = !{!14, !15, i64 12}


; 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 }

@.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_rect_multi_color = external hidden unnamed_addr constant [147 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 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 #3

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

; Function Attrs: mustprogress uwtable
declare hidden noundef ptr @_ZL27nk_draw_list_alloc_elementsP12nk_draw_listm(ptr noundef, i64 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 #5

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

; Function Attrs: mustprogress uwtable
define dso_local void @nk_draw_list_fill_rect_multi_color(ptr noundef %0, <2 x float> %1, <2 x float> %2, i32 %3, i32 %4, i32 %5, i32 %6) local_unnamed_addr #5 {
  %8 = alloca %struct.nk_colorf, align 8
  %9 = alloca %struct.nk_colorf, align 8
  %10 = alloca %struct.nk_colorf, align 8
  %11 = alloca %struct.nk_colorf, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %10) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %11) #6
  call void @nk_color_fv(ptr noundef nonnull %8, i32 %3)
  call void @nk_color_fv(ptr noundef nonnull %10, i32 %5)
  call void @nk_color_fv(ptr noundef nonnull %9, i32 %4)
  call void @nk_color_fv(ptr noundef nonnull %11, i32 %6)
  %.not = icmp eq ptr %0, null
  br i1 %.not, label %12, label %13

12:                                               ; preds = %7
  call void @__assert_fail(ptr noundef nonnull @.str.25, ptr noundef nonnull @.str.1, i32 noundef 10396, ptr noundef nonnull @__PRETTY_FUNCTION__.nk_draw_list_fill_rect_multi_color) #7
  unreachable

13:                                               ; preds = %7
  %14 = getelementptr inbounds i8, ptr %0, i64 136
  %.sroa.016.0.copyload = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZL23nk_draw_list_push_imageP12nk_draw_list9nk_handle(ptr noundef nonnull %0, ptr %.sroa.016.0.copyload)
  %15 = getelementptr inbounds i8, ptr %0, i64 204
  %16 = load i32, ptr %15, align 4, !tbaa !8
  %17 = call noundef ptr @_ZL27nk_draw_list_alloc_verticesP12nk_draw_listm(ptr noundef nonnull %0, i64 noundef 4)
  %18 = call noundef ptr @_ZL27nk_draw_list_alloc_elementsP12nk_draw_listm(ptr noundef nonnull %0, i64 noundef 6)
  %19 = icmp ne ptr %17, null
  %20 = icmp ne ptr %18, null
  %or.cond = and i1 %19, %20
  br i1 %or.cond, label %21, label %45

21:                                               ; preds = %13
  %22 = trunc i32 %16 to i16
  %23 = getelementptr inbounds i8, ptr %0, i64 112
  store i16 %22, ptr %18, align 2, !tbaa !19
  %24 = add i16 %22, 1
  %25 = getelementptr inbounds i8, ptr %18, i64 2
  store i16 %24, ptr %25, align 2, !tbaa !19
  %26 = add i16 %22, 2
  %27 = getelementptr inbounds i8, ptr %18, i64 4
  store i16 %26, ptr %27, align 2, !tbaa !19
  %28 = getelementptr inbounds i8, ptr %18, i64 6
  store i16 %22, ptr %28, align 2, !tbaa !19
  %29 = getelementptr inbounds i8, ptr %18, i64 8
  store i16 %26, ptr %29, align 2, !tbaa !19
  %30 = add i16 %22, 3
  %31 = getelementptr inbounds i8, ptr %18, i64 10
  store i16 %30, ptr %31, align 2, !tbaa !19
  %.sroa.056.0.vec.extract = extractelement <2 x float> %1, i64 0
  %.sroa.056.4.vec.extract = extractelement <2 x float> %1, i64 1
  %32 = call <2 x float> @nk_vec2(float noundef %.sroa.056.0.vec.extract, float noundef %.sroa.056.4.vec.extract)
  %33 = getelementptr inbounds i8, ptr %0, i64 144
  %.sroa.014.0.copyload = load <2 x float>, ptr %33, align 8
  %.sroa.012.0.copyload = load <2 x float>, ptr %8, align 8
  %.sroa.213.0..sroa_idx = getelementptr inbounds i8, ptr %8, i64 8
  %.sroa.213.0.copyload = load <2 x float>, ptr %.sroa.213.0..sroa_idx, align 8
  %34 = call noundef ptr @_ZL14nk_draw_vertexPvPK17nk_convert_config7nk_vec2S3_9nk_colorf(ptr noundef nonnull %17, ptr noundef nonnull %23, <2 x float> %32, <2 x float> %.sroa.014.0.copyload, <2 x float> %.sroa.012.0.copyload, <2 x float> %.sroa.213.0.copyload)
  %35 = fadd <2 x float> %1, %2
  %36 = extractelement <2 x float> %35, i64 0
  %37 = call <2 x float> @nk_vec2(float noundef %36, float noundef %.sroa.056.4.vec.extract)
  %.sroa.010.0.copyload = load <2 x float>, ptr %33, align 8
  %.sroa.08.0.copyload = load <2 x float>, ptr %9, align 8
  %.sroa.29.0..sroa_idx = getelementptr inbounds i8, ptr %9, i64 8
  %.sroa.29.0.copyload = load <2 x float>, ptr %.sroa.29.0..sroa_idx, align 8
  %38 = call noundef ptr @_ZL14nk_draw_vertexPvPK17nk_convert_config7nk_vec2S3_9nk_colorf(ptr noundef %34, ptr noundef nonnull %23, <2 x float> %37, <2 x float> %.sroa.010.0.copyload, <2 x float> %.sroa.08.0.copyload, <2 x float> %.sroa.29.0.copyload)
  %39 = fadd <2 x float> %1, %2
  %40 = extractelement <2 x float> %39, i64 1
  %41 = call <2 x float> @nk_vec2(float noundef %36, float noundef %40)
  %.sroa.06.0.copyload = load <2 x float>, ptr %33, align 8
  %.sroa.04.0.copyload = load <2 x float>, ptr %10, align 8
  %.sroa.25.0..sroa_idx = getelementptr inbounds i8, ptr %10, i64 8
  %.sroa.25.0.copyload = load <2 x float>, ptr %.sroa.25.0..sroa_idx, align 8
  %42 = call noundef ptr @_ZL14nk_draw_vertexPvPK17nk_convert_config7nk_vec2S3_9nk_colorf(ptr noundef %38, ptr noundef nonnull %23, <2 x float> %41, <2 x float> %.sroa.06.0.copyload, <2 x float> %.sroa.04.0.copyload, <2 x float> %.sroa.25.0.copyload)
  %43 = call <2 x float> @nk_vec2(float noundef %.sroa.056.0.vec.extract, float noundef %40)
  %.sroa.02.0.copyload = load <2 x float>, ptr %33, align 8
  %.sroa.0.0.copyload = load <2 x float>, ptr %11, align 8
  %.sroa.2.0..sroa_idx = getelementptr inbounds i8, ptr %11, i64 8
  %.sroa.2.0.copyload = load <2 x float>, ptr %.sroa.2.0..sroa_idx, align 8
  %44 = call noundef ptr @_ZL14nk_draw_vertexPvPK17nk_convert_config7nk_vec2S3_9nk_colorf(ptr noundef %42, ptr noundef nonnull %23, <2 x float> %43, <2 x float> %.sroa.02.0.copyload, <2 x float> %.sroa.0.0.copyload, <2 x float> %.sroa.2.0.copyload)
  br label %45

45:                                               ; preds = %13, %21
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #6
  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 nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { mustprogress uwtable "min-legal-vector-width"="64" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { 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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !14, i64 204}
!9 = !{!"_ZTS12nk_draw_list", !10, i64 0, !6, i64 16, !12, i64 112, !17, i64 176, !17, i64 184, !17, i64 192, !14, i64 200, !14, i64 204, !14, i64 208, !18, i64 216, !14, i64 224, !14, i64 228, !13, i64 232, !13, i64 236}
!10 = !{!"_ZTS7nk_rect", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12}
!11 = !{!"float", !6, i64 0}
!12 = !{!"_ZTS17nk_convert_config", !11, i64 0, !13, i64 4, !13, i64 8, !14, i64 12, !14, i64 16, !14, i64 20, !15, i64 24, !17, i64 40, !18, i64 48, !18, i64 56}
!13 = !{!"_ZTS16nk_anti_aliasing", !6, i64 0}
!14 = !{!"int", !6, i64 0}
!15 = !{!"_ZTS20nk_draw_null_texture", !6, i64 0, !16, i64 8}
!16 = !{!"_ZTS7nk_vec2", !11, i64 0, !11, i64 4}
!17 = !{!"any pointer", !6, i64 0}
!18 = !{!"long", !6, i64 0}
!19 = !{!20, !20, i64 0}
!20 = !{!"short", !6, i64 0}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,SROAPass,SimplifyCFGPass,VectorCombinePass