; 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_rect = type { float, float, float, float }
%struct.nk_color = type { i8, i8, i8, i8 }
%struct.nk_user_font_glyph = type { [2 x %struct.nk_vec2], %struct.nk_vec2, 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_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_user_font = type { %union.nk_handle, float, ptr, ptr, %union.nk_handle }

@.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_add_text = external hidden unnamed_addr constant [138 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: nounwind uwtable
declare dso_local <2 x float> @nk_vec2(float noundef, float noundef) #1

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @nk_utf_decode(ptr noundef, ptr noundef, i32 noundef) #3

; Function Attrs: nounwind uwtable
declare hidden void @nk_draw_list_push_image(ptr noundef, ptr) #1

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

; Function Attrs: nounwind uwtable
define dso_local void @nk_draw_list_add_text(ptr noundef %0, ptr noundef %1, <2 x float> %2, <2 x float> %3, ptr noundef %4, i32 noundef %5, float noundef %6, i32 %7) #1 {
  %9 = alloca %struct.nk_rect, align 4
  %10 = alloca %struct.nk_color, align 1
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca float, align 4
  %16 = alloca float, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca %struct.nk_user_font_glyph, align 4
  %23 = alloca i32, align 4
  %24 = alloca float, align 4
  %25 = alloca float, align 4
  %26 = alloca float, align 4
  %27 = alloca float, align 4
  %28 = alloca float, align 4
  %29 = alloca %struct.nk_vec2, align 4
  %30 = alloca %struct.nk_vec2, align 4
  %31 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %9, i32 0, i32 0
  store <2 x float> %2, ptr %31, align 4
  %32 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %9, i32 0, i32 1
  store <2 x float> %3, ptr %32, align 4
  store i32 %7, ptr %10, align 1
  store ptr %0, ptr %11, align 8, !tbaa !5
  store ptr %1, ptr %12, align 8, !tbaa !5
  store ptr %4, ptr %13, align 8, !tbaa !5
  store i32 %5, ptr %14, align 4, !tbaa !9
  store float %6, ptr %15, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #4
  store float 0.000000e+00, ptr %16, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #4
  store i32 0, ptr %17, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #4
  store i32 0, ptr %18, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #4
  store i32 0, ptr %19, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #4
  store i32 0, ptr %20, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #4
  store i32 0, ptr %21, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 36, ptr %22) #4
  %33 = load ptr, ptr %11, align 8, !tbaa !5
  %34 = icmp ne ptr %33, null
  br i1 %34, label %35, label %36

35:                                               ; preds = %8
  br label %37

36:                                               ; preds = %8
  call void @__assert_fail(ptr noundef @.str.26, ptr noundef @.str.2, i32 noundef 10351, ptr noundef @__PRETTY_FUNCTION__.nk_draw_list_add_text) #5
  unreachable

37:                                               ; preds = %35
  %38 = load ptr, ptr %11, align 8, !tbaa !5
  %39 = icmp ne ptr %38, null
  br i1 %39, label %40, label %46

40:                                               ; preds = %37
  %41 = load i32, ptr %14, align 4, !tbaa !9
  %42 = icmp ne i32 %41, 0
  br i1 %42, label %43, label %46

43:                                               ; preds = %40
  %44 = load ptr, ptr %13, align 8, !tbaa !5
  %45 = icmp ne ptr %44, null
  br i1 %45, label %47, label %46

46:                                               ; preds = %43, %40, %37
  store i32 1, ptr %23, align 4
  br label %211

47:                                               ; preds = %43
  %48 = load ptr, ptr %11, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.nk_draw_list, ptr %48, i32 0, i32 0
  %50 = getelementptr inbounds %struct.nk_rect, ptr %49, i32 0, i32 0
  %51 = load float, ptr %50, align 8, !tbaa !13
  %52 = getelementptr inbounds %struct.nk_rect, ptr %9, i32 0, i32 0
  %53 = load float, ptr %52, align 4, !tbaa !20
  %54 = getelementptr inbounds %struct.nk_rect, ptr %9, i32 0, i32 2
  %55 = load float, ptr %54, align 4, !tbaa !21
  %56 = fadd float %53, %55
  %57 = fcmp ogt float %51, %56
  br i1 %57, label %95, label %58

58:                                               ; preds = %47
  %59 = load ptr, ptr %11, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.nk_draw_list, ptr %59, i32 0, i32 0
  %61 = getelementptr inbounds %struct.nk_rect, ptr %60, i32 0, i32 0
  %62 = load float, ptr %61, align 8, !tbaa !13
  %63 = load ptr, ptr %11, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct.nk_draw_list, ptr %63, i32 0, i32 0
  %65 = getelementptr inbounds %struct.nk_rect, ptr %64, i32 0, i32 2
  %66 = load float, ptr %65, align 8, !tbaa !22
  %67 = fadd float %62, %66
  %68 = getelementptr inbounds %struct.nk_rect, ptr %9, i32 0, i32 0
  %69 = load float, ptr %68, align 4, !tbaa !20
  %70 = fcmp olt float %67, %69
  br i1 %70, label %95, label %71

71:                                               ; preds = %58
  %72 = load ptr, ptr %11, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct.nk_draw_list, ptr %72, i32 0, i32 0
  %74 = getelementptr inbounds %struct.nk_rect, ptr %73, i32 0, i32 1
  %75 = load float, ptr %74, align 4, !tbaa !23
  %76 = getelementptr inbounds %struct.nk_rect, ptr %9, i32 0, i32 1
  %77 = load float, ptr %76, align 4, !tbaa !24
  %78 = getelementptr inbounds %struct.nk_rect, ptr %9, i32 0, i32 3
  %79 = load float, ptr %78, align 4, !tbaa !25
  %80 = fadd float %77, %79
  %81 = fcmp ogt float %75, %80
  br i1 %81, label %95, label %82

82:                                               ; preds = %71
  %83 = load ptr, ptr %11, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct.nk_draw_list, ptr %83, i32 0, i32 0
  %85 = getelementptr inbounds %struct.nk_rect, ptr %84, i32 0, i32 1
  %86 = load float, ptr %85, align 4, !tbaa !23
  %87 = load ptr, ptr %11, align 8, !tbaa !5
  %88 = getelementptr inbounds %struct.nk_draw_list, ptr %87, i32 0, i32 0
  %89 = getelementptr inbounds %struct.nk_rect, ptr %88, i32 0, i32 3
  %90 = load float, ptr %89, align 4, !tbaa !26
  %91 = fadd float %86, %90
  %92 = getelementptr inbounds %struct.nk_rect, ptr %9, i32 0, i32 1
  %93 = load float, ptr %92, align 4, !tbaa !24
  %94 = fcmp olt float %91, %93
  br i1 %94, label %95, label %96

95:                                               ; preds = %82, %71, %58, %47
  store i32 1, ptr %23, align 4
  br label %211

96:                                               ; preds = %82
  %97 = load ptr, ptr %11, align 8, !tbaa !5
  %98 = load ptr, ptr %12, align 8, !tbaa !5
  %99 = getelementptr inbounds %struct.nk_user_font, ptr %98, i32 0, i32 4
  %100 = getelementptr inbounds %union.nk_handle, ptr %99, i32 0, i32 0
  %101 = load ptr, ptr %100, align 8
  call void @nk_draw_list_push_image(ptr noundef %97, ptr %101)
  %102 = getelementptr inbounds %struct.nk_rect, ptr %9, i32 0, i32 0
  %103 = load float, ptr %102, align 4, !tbaa !20
  store float %103, ptr %16, align 4, !tbaa !11
  %104 = load ptr, ptr %13, align 8, !tbaa !5
  %105 = load i32, ptr %14, align 4, !tbaa !9
  %106 = call i32 @nk_utf_decode(ptr noundef %104, ptr noundef %18, i32 noundef %105)
  store i32 %106, ptr %20, align 4, !tbaa !9
  %107 = load i32, ptr %20, align 4, !tbaa !9
  %108 = icmp ne i32 %107, 0
  br i1 %108, label %110, label %109

109:                                              ; preds = %96
  store i32 1, ptr %23, align 4
  br label %211

110:                                              ; preds = %96
  %111 = getelementptr inbounds %struct.nk_color, ptr %10, i32 0, i32 3
  %112 = load i8, ptr %111, align 1, !tbaa !27
  %113 = uitofp i8 %112 to float
  %114 = load ptr, ptr %11, align 8, !tbaa !5
  %115 = getelementptr inbounds %struct.nk_draw_list, ptr %114, i32 0, i32 2
  %116 = getelementptr inbounds %struct.nk_convert_config, ptr %115, i32 0, i32 0
  %117 = load float, ptr %116, align 8, !tbaa !29
  %118 = fmul float %113, %117
  %119 = fptoui float %118 to i8
  %120 = getelementptr inbounds %struct.nk_color, ptr %10, i32 0, i32 3
  store i8 %119, ptr %120, align 1, !tbaa !27
  br label %121

121:                                              ; preds = %209, %110
  %122 = load i32, ptr %17, align 4, !tbaa !9
  %123 = load i32, ptr %14, align 4, !tbaa !9
  %124 = icmp slt i32 %122, %123
  br i1 %124, label %125, label %128

125:                                              ; preds = %121
  %126 = load i32, ptr %20, align 4, !tbaa !9
  %127 = icmp ne i32 %126, 0
  br label %128

128:                                              ; preds = %125, %121
  %129 = phi i1 [ false, %121 ], [ %127, %125 ]
  br i1 %129, label %130, label %210

130:                                              ; preds = %128
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #4
  store float 0.000000e+00, ptr %28, align 4, !tbaa !11
  %131 = load i32, ptr %18, align 4, !tbaa !9
  %132 = icmp eq i32 %131, 65533
  br i1 %132, label %133, label %134

133:                                              ; preds = %130
  store i32 3, ptr %23, align 4
  br label %207

134:                                              ; preds = %130
  %135 = load ptr, ptr %13, align 8, !tbaa !5
  %136 = load i32, ptr %17, align 4, !tbaa !9
  %137 = sext i32 %136 to i64
  %138 = getelementptr inbounds i8, ptr %135, i64 %137
  %139 = load i32, ptr %20, align 4, !tbaa !9
  %140 = sext i32 %139 to i64
  %141 = getelementptr inbounds i8, ptr %138, i64 %140
  %142 = load i32, ptr %14, align 4, !tbaa !9
  %143 = load i32, ptr %17, align 4, !tbaa !9
  %144 = sub nsw i32 %142, %143
  %145 = call i32 @nk_utf_decode(ptr noundef %141, ptr noundef %19, i32 noundef %144)
  store i32 %145, ptr %21, align 4, !tbaa !9
  %146 = load ptr, ptr %12, align 8, !tbaa !5
  %147 = getelementptr inbounds %struct.nk_user_font, ptr %146, i32 0, i32 3
  %148 = load ptr, ptr %147, align 8, !tbaa !30
  %149 = load ptr, ptr %12, align 8, !tbaa !5
  %150 = getelementptr inbounds %struct.nk_user_font, ptr %149, i32 0, i32 0
  %151 = load float, ptr %15, align 4, !tbaa !11
  %152 = load i32, ptr %18, align 4, !tbaa !9
  %153 = load i32, ptr %19, align 4, !tbaa !9
  %154 = icmp eq i32 %153, 65533
  br i1 %154, label %155, label %156

155:                                              ; preds = %134
  br label %158

156:                                              ; preds = %134
  %157 = load i32, ptr %19, align 4, !tbaa !9
  br label %158

158:                                              ; preds = %156, %155
  %159 = phi i32 [ 0, %155 ], [ %157, %156 ]
  %160 = getelementptr inbounds %union.nk_handle, ptr %150, i32 0, i32 0
  %161 = load ptr, ptr %160, align 8
  call void %148(ptr %161, float noundef %151, ptr noundef %22, i32 noundef %152, i32 noundef %159)
  %162 = load float, ptr %16, align 4, !tbaa !11
  %163 = getelementptr inbounds %struct.nk_user_font_glyph, ptr %22, i32 0, i32 1
  %164 = getelementptr inbounds %struct.nk_vec2, ptr %163, i32 0, i32 0
  %165 = load float, ptr %164, align 4, !tbaa !32
  %166 = fadd float %162, %165
  store float %166, ptr %24, align 4, !tbaa !11
  %167 = getelementptr inbounds %struct.nk_rect, ptr %9, i32 0, i32 1
  %168 = load float, ptr %167, align 4, !tbaa !24
  %169 = getelementptr inbounds %struct.nk_user_font_glyph, ptr %22, i32 0, i32 1
  %170 = getelementptr inbounds %struct.nk_vec2, ptr %169, i32 0, i32 1
  %171 = load float, ptr %170, align 4, !tbaa !34
  %172 = fadd float %168, %171
  store float %172, ptr %25, align 4, !tbaa !11
  %173 = getelementptr inbounds %struct.nk_user_font_glyph, ptr %22, i32 0, i32 2
  %174 = load float, ptr %173, align 4, !tbaa !35
  store float %174, ptr %27, align 4, !tbaa !11
  %175 = getelementptr inbounds %struct.nk_user_font_glyph, ptr %22, i32 0, i32 3
  %176 = load float, ptr %175, align 4, !tbaa !36
  store float %176, ptr %26, align 4, !tbaa !11
  %177 = getelementptr inbounds %struct.nk_user_font_glyph, ptr %22, i32 0, i32 4
  %178 = load float, ptr %177, align 4, !tbaa !37
  store float %178, ptr %28, align 4, !tbaa !11
  %179 = load ptr, ptr %11, align 8, !tbaa !5
  %180 = load float, ptr %24, align 4, !tbaa !11
  %181 = load float, ptr %25, align 4, !tbaa !11
  %182 = call <2 x float> @nk_vec2(float noundef %180, float noundef %181)
  store <2 x float> %182, ptr %29, align 4
  %183 = load float, ptr %24, align 4, !tbaa !11
  %184 = load float, ptr %27, align 4, !tbaa !11
  %185 = fadd float %183, %184
  %186 = load float, ptr %25, align 4, !tbaa !11
  %187 = load float, ptr %26, align 4, !tbaa !11
  %188 = fadd float %186, %187
  %189 = call <2 x float> @nk_vec2(float noundef %185, float noundef %188)
  store <2 x float> %189, ptr %30, align 4
  %190 = getelementptr inbounds %struct.nk_user_font_glyph, ptr %22, i32 0, i32 0
  %191 = getelementptr inbounds [2 x %struct.nk_vec2], ptr %190, i64 0, i64 0
  %192 = getelementptr inbounds %struct.nk_user_font_glyph, ptr %22, i32 0, i32 0
  %193 = getelementptr inbounds [2 x %struct.nk_vec2], ptr %192, i64 0, i64 1
  %194 = load <2 x float>, ptr %29, align 4
  %195 = load <2 x float>, ptr %30, align 4
  %196 = load <2 x float>, ptr %191, align 4
  %197 = load <2 x float>, ptr %193, align 4
  %198 = load i32, ptr %10, align 1
  call void @nk_draw_list_push_rect_uv(ptr noundef %179, <2 x float> %194, <2 x float> %195, <2 x float> %196, <2 x float> %197, i32 %198)
  %199 = load i32, ptr %20, align 4, !tbaa !9
  %200 = load i32, ptr %17, align 4, !tbaa !9
  %201 = add nsw i32 %200, %199
  store i32 %201, ptr %17, align 4, !tbaa !9
  %202 = load float, ptr %28, align 4, !tbaa !11
  %203 = load float, ptr %16, align 4, !tbaa !11
  %204 = fadd float %203, %202
  store float %204, ptr %16, align 4, !tbaa !11
  %205 = load i32, ptr %21, align 4, !tbaa !9
  store i32 %205, ptr %20, align 4, !tbaa !9
  %206 = load i32, ptr %19, align 4, !tbaa !9
  store i32 %206, ptr %18, align 4, !tbaa !9
  store i32 0, ptr %23, align 4
  br label %207

207:                                              ; preds = %158, %133
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #4
  %208 = load i32, ptr %23, align 4
  switch i32 %208, label %214 [
    i32 0, label %209
    i32 3, label %210
  ]

209:                                              ; preds = %207
  br label %121, !llvm.loop !38

210:                                              ; preds = %207, %128
  store i32 0, ptr %23, align 4
  br label %211

211:                                              ; preds = %210, %109, %95, %46
  call void @llvm.lifetime.end.p0(i64 36, ptr %22) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #4
  %212 = load i32, ptr %23, align 4
  switch i32 %212, label %214 [
    i32 0, label %213
    i32 1, label %213
  ]

213:                                              ; preds = %211, %211
  ret void

214:                                              ; preds = %211, %207
  unreachable
}

attributes #0 = { 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 = { 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 = { nounwind }
attributes #5 = { 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, !12, i64 0}
!12 = !{!"float", !7, i64 0}
!13 = !{!14, !12, i64 0}
!14 = !{!"nk_draw_list", !15, i64 0, !7, i64 16, !16, i64 112, !6, i64 176, !6, i64 184, !6, i64 192, !10, i64 200, !10, i64 204, !10, i64 208, !19, i64 216, !10, i64 224, !10, i64 228, !10, i64 232, !10, i64 236}
!15 = !{!"nk_rect", !12, i64 0, !12, i64 4, !12, i64 8, !12, i64 12}
!16 = !{!"nk_convert_config", !12, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !17, i64 24, !6, i64 40, !19, i64 48, !19, i64 56}
!17 = !{!"nk_draw_null_texture", !7, i64 0, !18, i64 8}
!18 = !{!"nk_vec2", !12, i64 0, !12, i64 4}
!19 = !{!"long", !7, i64 0}
!20 = !{!15, !12, i64 0}
!21 = !{!15, !12, i64 8}
!22 = !{!14, !12, i64 8}
!23 = !{!14, !12, i64 4}
!24 = !{!15, !12, i64 4}
!25 = !{!15, !12, i64 12}
!26 = !{!14, !12, i64 12}
!27 = !{!28, !7, i64 3}
!28 = !{!"nk_color", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 3}
!29 = !{!14, !12, i64 112}
!30 = !{!31, !6, i64 24}
!31 = !{!"nk_user_font", !7, i64 0, !12, i64 8, !6, i64 16, !6, i64 24, !7, i64 32}
!32 = !{!33, !12, i64 16}
!33 = !{!"nk_user_font_glyph", !7, i64 0, !18, i64 16, !12, i64 24, !12, i64 28, !12, i64 32}
!34 = !{!33, !12, i64 20}
!35 = !{!33, !12, i64 24}
!36 = !{!33, !12, i64 28}
!37 = !{!33, !12, i64 32}
!38 = distinct !{!38, !39}
!39 = !{!"llvm.loop.mustprogress"}


; 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_user_font_glyph = type { [2 x %struct.nk_vec2], %struct.nk_vec2, 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_add_text = external hidden unnamed_addr constant [138 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: nounwind uwtable
declare dso_local i32 @nk_utf_decode(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
declare hidden void @nk_draw_list_push_image(ptr noundef, ptr) local_unnamed_addr #1

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

; Function Attrs: nounwind uwtable
define dso_local void @nk_draw_list_add_text(ptr noundef %0, ptr nocapture noundef readonly %1, <2 x float> %2, <2 x float> %3, ptr noundef %4, i32 noundef %5, float noundef %6, i32 %7) local_unnamed_addr #1 {
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca %struct.nk_user_font_glyph, align 8
  %.sroa.2.0.extract.shift = lshr i32 %7, 24
  %.sroa.2.0.extract.trunc = trunc nuw i32 %.sroa.2.0.extract.shift to i8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #4
  store i32 0, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #4
  store i32 0, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 36, ptr nonnull %11) #4
  %.not = icmp eq ptr %0, null
  br i1 %.not, label %12, label %13

12:                                               ; preds = %8
  tail call void @__assert_fail(ptr noundef nonnull @.str.26, ptr noundef nonnull @.str.2, i32 noundef 10351, ptr noundef nonnull @__PRETTY_FUNCTION__.nk_draw_list_add_text) #5
  unreachable

13:                                               ; preds = %8
  %14 = icmp ne i32 %5, 0
  %15 = icmp ne ptr %4, null
  %or.cond3 = and i1 %15, %14
  br i1 %or.cond3, label %16, label %.thread

16:                                               ; preds = %13
  %17 = load float, ptr %0, align 8, !tbaa !9
  %.sroa.045.0.vec.extract = extractelement <2 x float> %2, i64 0
  %18 = fadd <2 x float> %2, %3
  %19 = extractelement <2 x float> %18, i64 0
  %20 = fcmp ogt float %17, %19
  br i1 %20, label %.thread, label %21

21:                                               ; preds = %16
  %22 = getelementptr inbounds i8, ptr %0, i64 8
  %23 = load float, ptr %22, align 8, !tbaa !18
  %24 = fadd float %17, %23
  %25 = fcmp olt float %24, %.sroa.045.0.vec.extract
  br i1 %25, label %.thread, label %26

26:                                               ; preds = %21
  %27 = getelementptr inbounds i8, ptr %0, i64 4
  %28 = load float, ptr %27, align 4, !tbaa !19
  %.sroa.045.4.vec.extract = extractelement <2 x float> %2, i64 1
  %29 = fadd <2 x float> %2, %3
  %30 = extractelement <2 x float> %29, i64 1
  %31 = fcmp ogt float %28, %30
  br i1 %31, label %.thread, label %32

32:                                               ; preds = %26
  %33 = getelementptr inbounds i8, ptr %0, i64 12
  %34 = load float, ptr %33, align 4, !tbaa !20
  %35 = fadd float %28, %34
  %36 = fcmp olt float %35, %.sroa.045.4.vec.extract
  br i1 %36, label %.thread, label %37

37:                                               ; preds = %32
  %38 = getelementptr inbounds i8, ptr %1, i64 32
  %39 = load ptr, ptr %38, align 8
  tail call void @nk_draw_list_push_image(ptr noundef nonnull %0, ptr %39)
  %40 = call i32 @nk_utf_decode(ptr noundef nonnull %4, ptr noundef nonnull %9, i32 noundef %5)
  %.not65 = icmp eq i32 %40, 0
  br i1 %.not65, label %.thread, label %41

41:                                               ; preds = %37
  %42 = icmp slt i32 %5, 1
  %43 = load i32, ptr %9, align 4
  %44 = icmp eq i32 %43, 65533
  %or.cond76 = select i1 %42, i1 true, i1 %44
  br i1 %or.cond76, label %.thread, label %.lr.ph

.lr.ph:                                           ; preds = %41
  %45 = getelementptr inbounds i8, ptr %0, i64 112
  %46 = load float, ptr %45, align 8, !tbaa !21
  %47 = uitofp i8 %.sroa.2.0.extract.trunc to float
  %48 = fmul float %46, %47
  %49 = fptoui float %48 to i8
  %50 = getelementptr inbounds i8, ptr %1, i64 24
  %51 = getelementptr inbounds i8, ptr %11, i64 16
  %52 = getelementptr inbounds i8, ptr %11, i64 20
  %53 = getelementptr inbounds i8, ptr %11, i64 24
  %54 = getelementptr inbounds i8, ptr %11, i64 28
  %55 = getelementptr inbounds i8, ptr %11, i64 32
  %56 = getelementptr inbounds i8, ptr %11, i64 8
  %.sroa.2.0.insert.ext = zext i8 %49 to i32
  %.sroa.2.0.insert.shift = shl nuw i32 %.sroa.2.0.insert.ext, 24
  %.sroa.044.0.insert.ext = and i32 %7, 16777215
  %.sroa.044.0.insert.insert = or disjoint i32 %.sroa.2.0.insert.shift, %.sroa.044.0.insert.ext
  br label %57

57:                                               ; preds = %.lr.ph, %57
  %.079 = phi float [ %.sroa.045.0.vec.extract, %.lr.ph ], [ %84, %57 ]
  %.05478 = phi i32 [ 0, %.lr.ph ], [ %83, %57 ]
  %.05677 = phi i32 [ %40, %.lr.ph ], [ %63, %57 ]
  %58 = sext i32 %.05478 to i64
  %59 = getelementptr inbounds i8, ptr %4, i64 %58
  %60 = sext i32 %.05677 to i64
  %61 = getelementptr inbounds i8, ptr %59, i64 %60
  %62 = sub nsw i32 %5, %.05478
  %63 = call i32 @nk_utf_decode(ptr noundef nonnull %61, ptr noundef nonnull %10, i32 noundef %62)
  %64 = load ptr, ptr %50, align 8, !tbaa !22
  %65 = load i32, ptr %9, align 4, !tbaa !5
  %66 = load i32, ptr %10, align 4
  %67 = icmp eq i32 %66, 65533
  %68 = select i1 %67, i32 0, i32 %66
  %69 = load ptr, ptr %1, align 8
  call void %64(ptr %69, float noundef %6, ptr noundef nonnull %11, i32 noundef %65, i32 noundef %68) #4
  %70 = load float, ptr %51, align 8, !tbaa !24
  %71 = fadd float %.079, %70
  %72 = load float, ptr %52, align 4, !tbaa !26
  %73 = fadd float %.sroa.045.4.vec.extract, %72
  %74 = load float, ptr %53, align 8, !tbaa !27
  %75 = load float, ptr %54, align 4, !tbaa !28
  %76 = load float, ptr %55, align 8, !tbaa !29
  %77 = call <2 x float> @nk_vec2(float noundef %71, float noundef %73)
  %78 = fadd float %71, %74
  %79 = fadd float %73, %75
  %80 = call <2 x float> @nk_vec2(float noundef %78, float noundef %79)
  %81 = load <2 x float>, ptr %11, align 8
  %82 = load <2 x float>, ptr %56, align 8
  call void @nk_draw_list_push_rect_uv(ptr noundef nonnull %0, <2 x float> %77, <2 x float> %80, <2 x float> %81, <2 x float> %82, i32 %.sroa.044.0.insert.insert)
  %83 = add nsw i32 %.05478, %.05677
  %84 = fadd float %.079, %76
  %85 = load i32, ptr %10, align 4, !tbaa !5
  store i32 %85, ptr %9, align 4, !tbaa !5
  %86 = icmp sge i32 %83, %5
  %87 = icmp eq i32 %63, 0
  %.not75 = select i1 %86, i1 true, i1 %87
  %88 = icmp eq i32 %85, 65533
  %or.cond = select i1 %.not75, i1 true, i1 %88
  br i1 %or.cond, label %.thread, label %57

.thread:                                          ; preds = %57, %41, %37, %16, %21, %26, %32, %13
  call void @llvm.lifetime.end.p0(i64 36, ptr nonnull %11) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #4
  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 = { 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 = { nounwind }
attributes #5 = { noreturn nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !12, i64 0}
!10 = !{!"nk_draw_list", !11, i64 0, !7, i64 16, !13, i64 112, !16, i64 176, !16, i64 184, !16, i64 192, !6, i64 200, !6, i64 204, !6, i64 208, !17, i64 216, !6, i64 224, !6, i64 228, !6, i64 232, !6, i64 236}
!11 = !{!"nk_rect", !12, i64 0, !12, i64 4, !12, i64 8, !12, i64 12}
!12 = !{!"float", !7, i64 0}
!13 = !{!"nk_convert_config", !12, i64 0, !6, i64 4, !6, i64 8, !6, i64 12, !6, i64 16, !6, i64 20, !14, i64 24, !16, i64 40, !17, i64 48, !17, i64 56}
!14 = !{!"nk_draw_null_texture", !7, i64 0, !15, i64 8}
!15 = !{!"nk_vec2", !12, i64 0, !12, i64 4}
!16 = !{!"any pointer", !7, i64 0}
!17 = !{!"long", !7, i64 0}
!18 = !{!10, !12, i64 8}
!19 = !{!10, !12, i64 4}
!20 = !{!10, !12, i64 12}
!21 = !{!10, !12, i64 112}
!22 = !{!23, !16, i64 24}
!23 = !{!"nk_user_font", !7, i64 0, !12, i64 8, !16, i64 16, !16, i64 24, !7, i64 32}
!24 = !{!25, !12, i64 16}
!25 = !{!"nk_user_font_glyph", !7, i64 0, !15, i64 16, !12, i64 24, !12, i64 28, !12, i64 32}
!26 = !{!25, !12, i64 20}
!27 = !{!25, !12, i64 24}
!28 = !{!25, !12, i64 28}
!29 = !{!25, !12, i64 32}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass,VectorCombinePass