; 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_command_buffer = type { ptr, %struct.nk_rect, i32, %union.nk_handle, i64, i64, i64 }
%union.nk_handle = type { ptr }
%struct.nk_user_font = type { %union.nk_handle, float, ptr, ptr, %union.nk_handle }
%struct.nk_command_text = type { %struct.nk_command, ptr, %struct.nk_color, %struct.nk_color, i16, i16, i16, i16, float, i32, [1 x i8] }
%struct.nk_command = type { i32, i64 }

@.str.2 = external hidden unnamed_addr constant [103 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [2 x i8], align 1
@__PRETTY_FUNCTION__.nk_draw_text = external hidden unnamed_addr constant [144 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [5 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: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #2

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

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

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

26:                                               ; preds = %8
  br label %28

27:                                               ; preds = %8
  call void @__assert_fail(ptr noundef @.str.11, ptr noundef @.str.2, i32 noundef 9176, ptr noundef @__PRETTY_FUNCTION__.nk_draw_text) #6
  unreachable

28:                                               ; preds = %26
  %29 = load ptr, ptr %15, align 8, !tbaa !5
  %30 = icmp ne ptr %29, null
  br i1 %30, label %31, label %32

31:                                               ; preds = %28
  br label %33

32:                                               ; preds = %28
  call void @__assert_fail(ptr noundef @.str.25, ptr noundef @.str.2, i32 noundef 9177, ptr noundef @__PRETTY_FUNCTION__.nk_draw_text) #6
  unreachable

33:                                               ; preds = %31
  %34 = load ptr, ptr %12, align 8, !tbaa !5
  %35 = icmp ne ptr %34, null
  br i1 %35, label %36, label %52

36:                                               ; preds = %33
  %37 = load ptr, ptr %13, align 8, !tbaa !5
  %38 = icmp ne ptr %37, null
  br i1 %38, label %39, label %52

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

42:                                               ; preds = %39
  %43 = getelementptr inbounds %struct.nk_color, ptr %10, i32 0, i32 3
  %44 = load i8, ptr %43, align 1, !tbaa !13
  %45 = zext i8 %44 to i32
  %46 = icmp eq i32 %45, 0
  br i1 %46, label %47, label %53

47:                                               ; preds = %42
  %48 = getelementptr inbounds %struct.nk_color, ptr %11, i32 0, i32 3
  %49 = load i8, ptr %48, align 1, !tbaa !13
  %50 = zext i8 %49 to i32
  %51 = icmp eq i32 %50, 0
  br i1 %51, label %52, label %53

52:                                               ; preds = %47, %39, %36, %33
  store i32 1, ptr %18, align 4
  br label %205

53:                                               ; preds = %47, %42
  %54 = load ptr, ptr %12, align 8, !tbaa !5
  %55 = getelementptr inbounds %struct.nk_command_buffer, ptr %54, i32 0, i32 2
  %56 = load i32, ptr %55, align 8, !tbaa !15
  %57 = icmp ne i32 %56, 0
  br i1 %57, label %58, label %117

58:                                               ; preds = %53
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #5
  %59 = load ptr, ptr %12, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.nk_command_buffer, ptr %59, i32 0, i32 1
  store ptr %60, ptr %19, align 8, !tbaa !5
  %61 = load ptr, ptr %19, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.nk_rect, ptr %61, i32 0, i32 2
  %63 = load float, ptr %62, align 4, !tbaa !19
  %64 = fcmp oeq float %63, 0.000000e+00
  br i1 %64, label %112, label %65

65:                                               ; preds = %58
  %66 = load ptr, ptr %19, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.nk_rect, ptr %66, i32 0, i32 3
  %68 = load float, ptr %67, align 4, !tbaa !20
  %69 = fcmp oeq float %68, 0.000000e+00
  br i1 %69, label %112, label %70

70:                                               ; preds = %65
  %71 = load ptr, ptr %19, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct.nk_rect, ptr %71, i32 0, i32 0
  %73 = load float, ptr %72, align 4, !tbaa !21
  %74 = getelementptr inbounds %struct.nk_rect, ptr %9, i32 0, i32 0
  %75 = load float, ptr %74, align 4, !tbaa !21
  %76 = getelementptr inbounds %struct.nk_rect, ptr %9, i32 0, i32 2
  %77 = load float, ptr %76, align 4, !tbaa !19
  %78 = fadd float %75, %77
  %79 = fcmp ogt float %73, %78
  br i1 %79, label %112, label %80

80:                                               ; preds = %70
  %81 = load ptr, ptr %19, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct.nk_rect, ptr %81, i32 0, i32 0
  %83 = load float, ptr %82, align 4, !tbaa !21
  %84 = load ptr, ptr %19, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct.nk_rect, ptr %84, i32 0, i32 2
  %86 = load float, ptr %85, align 4, !tbaa !19
  %87 = fadd float %83, %86
  %88 = getelementptr inbounds %struct.nk_rect, ptr %9, i32 0, i32 0
  %89 = load float, ptr %88, align 4, !tbaa !21
  %90 = fcmp olt float %87, %89
  br i1 %90, label %112, label %91

91:                                               ; preds = %80
  %92 = load ptr, ptr %19, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct.nk_rect, ptr %92, i32 0, i32 1
  %94 = load float, ptr %93, align 4, !tbaa !22
  %95 = getelementptr inbounds %struct.nk_rect, ptr %9, i32 0, i32 1
  %96 = load float, ptr %95, align 4, !tbaa !22
  %97 = getelementptr inbounds %struct.nk_rect, ptr %9, i32 0, i32 3
  %98 = load float, ptr %97, align 4, !tbaa !20
  %99 = fadd float %96, %98
  %100 = fcmp ogt float %94, %99
  br i1 %100, label %112, label %101

101:                                              ; preds = %91
  %102 = load ptr, ptr %19, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct.nk_rect, ptr %102, i32 0, i32 1
  %104 = load float, ptr %103, align 4, !tbaa !22
  %105 = load ptr, ptr %19, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct.nk_rect, ptr %105, i32 0, i32 3
  %107 = load float, ptr %106, align 4, !tbaa !20
  %108 = fadd float %104, %107
  %109 = getelementptr inbounds %struct.nk_rect, ptr %9, i32 0, i32 1
  %110 = load float, ptr %109, align 4, !tbaa !22
  %111 = fcmp olt float %108, %110
  br i1 %111, label %112, label %113

112:                                              ; preds = %101, %91, %80, %70, %65, %58
  store i32 1, ptr %18, align 4
  br label %114

113:                                              ; preds = %101
  store i32 0, ptr %18, align 4
  br label %114

114:                                              ; preds = %113, %112
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  %115 = load i32, ptr %18, align 4
  switch i32 %115, label %205 [
    i32 0, label %116
  ]

116:                                              ; preds = %114
  br label %117

117:                                              ; preds = %116, %53
  %118 = load ptr, ptr %15, align 8, !tbaa !5
  %119 = getelementptr inbounds %struct.nk_user_font, ptr %118, i32 0, i32 2
  %120 = load ptr, ptr %119, align 8, !tbaa !23
  %121 = load ptr, ptr %15, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct.nk_user_font, ptr %121, i32 0, i32 0
  %123 = load ptr, ptr %15, align 8, !tbaa !5
  %124 = getelementptr inbounds %struct.nk_user_font, ptr %123, i32 0, i32 1
  %125 = load float, ptr %124, align 8, !tbaa !25
  %126 = load ptr, ptr %13, align 8, !tbaa !5
  %127 = load i32, ptr %14, align 4, !tbaa !9
  %128 = getelementptr inbounds %union.nk_handle, ptr %122, i32 0, i32 0
  %129 = load ptr, ptr %128, align 8
  %130 = call float %120(ptr %129, float noundef %125, ptr noundef %126, i32 noundef %127)
  store float %130, ptr %16, align 4, !tbaa !11
  %131 = load float, ptr %16, align 4, !tbaa !11
  %132 = getelementptr inbounds %struct.nk_rect, ptr %9, i32 0, i32 2
  %133 = load float, ptr %132, align 4, !tbaa !19
  %134 = fcmp ogt float %131, %133
  br i1 %134, label %135, label %143

135:                                              ; preds = %117
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #5
  store i32 0, ptr %20, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #5
  %136 = load float, ptr %16, align 4, !tbaa !11
  store float %136, ptr %21, align 4, !tbaa !11
  %137 = load ptr, ptr %15, align 8, !tbaa !5
  %138 = load ptr, ptr %13, align 8, !tbaa !5
  %139 = load i32, ptr %14, align 4, !tbaa !9
  %140 = getelementptr inbounds %struct.nk_rect, ptr %9, i32 0, i32 2
  %141 = load float, ptr %140, align 4, !tbaa !19
  %142 = call i32 @nk_text_clamp(ptr noundef %137, ptr noundef %138, i32 noundef %139, float noundef %141, ptr noundef %20, ptr noundef %21, ptr noundef null, i32 noundef 0)
  store i32 %142, ptr %14, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #5
  br label %143

143:                                              ; preds = %135, %117
  %144 = load i32, ptr %14, align 4, !tbaa !9
  %145 = icmp ne i32 %144, 0
  br i1 %145, label %147, label %146

146:                                              ; preds = %143
  store i32 1, ptr %18, align 4
  br label %205

147:                                              ; preds = %143
  %148 = load ptr, ptr %12, align 8, !tbaa !5
  %149 = load i32, ptr %14, align 4, !tbaa !9
  %150 = add nsw i32 %149, 1
  %151 = sext i32 %150 to i64
  %152 = add i64 56, %151
  %153 = call ptr @nk_command_buffer_push(ptr noundef %148, i32 noundef 16, i64 noundef %152)
  store ptr %153, ptr %17, align 8, !tbaa !5
  %154 = load ptr, ptr %17, align 8, !tbaa !5
  %155 = icmp ne ptr %154, null
  br i1 %155, label %157, label %156

156:                                              ; preds = %147
  store i32 1, ptr %18, align 4
  br label %205

157:                                              ; preds = %147
  %158 = getelementptr inbounds %struct.nk_rect, ptr %9, i32 0, i32 0
  %159 = load float, ptr %158, align 4, !tbaa !21
  %160 = fptosi float %159 to i16
  %161 = load ptr, ptr %17, align 8, !tbaa !5
  %162 = getelementptr inbounds %struct.nk_command_text, ptr %161, i32 0, i32 4
  store i16 %160, ptr %162, align 8, !tbaa !26
  %163 = getelementptr inbounds %struct.nk_rect, ptr %9, i32 0, i32 1
  %164 = load float, ptr %163, align 4, !tbaa !22
  %165 = fptosi float %164 to i16
  %166 = load ptr, ptr %17, align 8, !tbaa !5
  %167 = getelementptr inbounds %struct.nk_command_text, ptr %166, i32 0, i32 5
  store i16 %165, ptr %167, align 2, !tbaa !30
  %168 = getelementptr inbounds %struct.nk_rect, ptr %9, i32 0, i32 2
  %169 = load float, ptr %168, align 4, !tbaa !19
  %170 = fptoui float %169 to i16
  %171 = load ptr, ptr %17, align 8, !tbaa !5
  %172 = getelementptr inbounds %struct.nk_command_text, ptr %171, i32 0, i32 6
  store i16 %170, ptr %172, align 4, !tbaa !31
  %173 = getelementptr inbounds %struct.nk_rect, ptr %9, i32 0, i32 3
  %174 = load float, ptr %173, align 4, !tbaa !20
  %175 = fptoui float %174 to i16
  %176 = load ptr, ptr %17, align 8, !tbaa !5
  %177 = getelementptr inbounds %struct.nk_command_text, ptr %176, i32 0, i32 7
  store i16 %175, ptr %177, align 2, !tbaa !32
  %178 = load ptr, ptr %17, align 8, !tbaa !5
  %179 = getelementptr inbounds %struct.nk_command_text, ptr %178, i32 0, i32 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %179, ptr align 1 %10, i64 4, i1 false), !tbaa.struct !33
  %180 = load ptr, ptr %17, align 8, !tbaa !5
  %181 = getelementptr inbounds %struct.nk_command_text, ptr %180, i32 0, i32 3
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %181, ptr align 1 %11, i64 4, i1 false), !tbaa.struct !33
  %182 = load ptr, ptr %15, align 8, !tbaa !5
  %183 = load ptr, ptr %17, align 8, !tbaa !5
  %184 = getelementptr inbounds %struct.nk_command_text, ptr %183, i32 0, i32 1
  store ptr %182, ptr %184, align 8, !tbaa !35
  %185 = load i32, ptr %14, align 4, !tbaa !9
  %186 = load ptr, ptr %17, align 8, !tbaa !5
  %187 = getelementptr inbounds %struct.nk_command_text, ptr %186, i32 0, i32 9
  store i32 %185, ptr %187, align 4, !tbaa !36
  %188 = load ptr, ptr %15, align 8, !tbaa !5
  %189 = getelementptr inbounds %struct.nk_user_font, ptr %188, i32 0, i32 1
  %190 = load float, ptr %189, align 8, !tbaa !25
  %191 = load ptr, ptr %17, align 8, !tbaa !5
  %192 = getelementptr inbounds %struct.nk_command_text, ptr %191, i32 0, i32 8
  store float %190, ptr %192, align 8, !tbaa !37
  %193 = load ptr, ptr %17, align 8, !tbaa !5
  %194 = getelementptr inbounds %struct.nk_command_text, ptr %193, i32 0, i32 10
  %195 = getelementptr inbounds [1 x i8], ptr %194, i64 0, i64 0
  %196 = load ptr, ptr %13, align 8, !tbaa !5
  %197 = load i32, ptr %14, align 4, !tbaa !9
  %198 = sext i32 %197 to i64
  %199 = call ptr @nk_memcopy(ptr noundef %195, ptr noundef %196, i64 noundef %198)
  %200 = load ptr, ptr %17, align 8, !tbaa !5
  %201 = getelementptr inbounds %struct.nk_command_text, ptr %200, i32 0, i32 10
  %202 = load i32, ptr %14, align 4, !tbaa !9
  %203 = sext i32 %202 to i64
  %204 = getelementptr inbounds [1 x i8], ptr %201, i64 0, i64 %203
  store i8 0, ptr %204, align 1, !tbaa !34
  store i32 0, ptr %18, align 4
  br label %205

205:                                              ; preds = %157, %156, %146, %114, %52
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  %206 = load i32, ptr %18, 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
}

; Function Attrs: nounwind uwtable
declare hidden i32 @nk_text_clamp(ptr noundef, ptr noundef, i32 noundef, float noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef) #3

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree 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 = { 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 uwtable "min-legal-vector-width"="64" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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, !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, !7, i64 3}
!14 = !{!"nk_color", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 3}
!15 = !{!16, !10, i64 24}
!16 = !{!"nk_command_buffer", !6, i64 0, !17, i64 8, !10, i64 24, !7, i64 32, !18, i64 40, !18, i64 48, !18, i64 56}
!17 = !{!"nk_rect", !12, i64 0, !12, i64 4, !12, i64 8, !12, i64 12}
!18 = !{!"long", !7, i64 0}
!19 = !{!17, !12, i64 8}
!20 = !{!17, !12, i64 12}
!21 = !{!17, !12, i64 0}
!22 = !{!17, !12, i64 4}
!23 = !{!24, !6, i64 16}
!24 = !{!"nk_user_font", !7, i64 0, !12, i64 8, !6, i64 16, !6, i64 24, !7, i64 32}
!25 = !{!24, !12, i64 8}
!26 = !{!27, !29, i64 32}
!27 = !{!"nk_command_text", !28, i64 0, !6, i64 16, !14, i64 24, !14, i64 28, !29, i64 32, !29, i64 34, !29, i64 36, !29, i64 38, !12, i64 40, !10, i64 44, !7, i64 48}
!28 = !{!"nk_command", !10, i64 0, !18, i64 8}
!29 = !{!"short", !7, i64 0}
!30 = !{!27, !29, i64 34}
!31 = !{!27, !29, i64 36}
!32 = !{!27, !29, i64 38}
!33 = !{i64 0, i64 1, !34, i64 1, i64 1, !34, i64 2, i64 1, !34, i64 3, i64 1, !34}
!34 = !{!7, !7, i64 0}
!35 = !{!27, !6, i64 16}
!36 = !{!27, !10, i64 44}
!37 = !{!27, !12, i64 40}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

@.str.2 = external hidden unnamed_addr constant [103 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [2 x i8], align 1
@__PRETTY_FUNCTION__.nk_draw_text = external hidden unnamed_addr constant [144 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [5 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: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #1

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

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

; Function Attrs: nounwind uwtable
define dso_local void @nk_draw_text(ptr noundef %0, <2 x float> %1, <2 x float> %2, ptr noundef %3, i32 noundef %4, ptr noundef %5, i32 %6, i32 %7) local_unnamed_addr #3 {
  %9 = alloca i32, align 4
  %10 = alloca float, align 4
  %.sroa.0.0.extract.trunc53 = trunc i32 %6 to i24
  %.sroa.254.0.extract.shift = lshr i32 %6, 24
  %.sroa.254.0.extract.trunc = trunc nuw i32 %.sroa.254.0.extract.shift to i8
  %.sroa.0.0.extract.trunc = trunc i32 %7 to i24
  %.sroa.2.0.extract.shift = lshr i32 %7, 24
  %.sroa.2.0.extract.trunc = trunc nuw i32 %.sroa.2.0.extract.shift to i8
  %.not = icmp eq ptr %0, null
  br i1 %.not, label %11, label %12

11:                                               ; preds = %8
  tail call void @__assert_fail(ptr noundef nonnull @.str.11, ptr noundef nonnull @.str.2, i32 noundef 9176, ptr noundef nonnull @__PRETTY_FUNCTION__.nk_draw_text) #4
  unreachable

12:                                               ; preds = %8
  %.not83 = icmp eq ptr %5, null
  br i1 %.not83, label %13, label %14

13:                                               ; preds = %12
  tail call void @__assert_fail(ptr noundef nonnull @.str.25, ptr noundef nonnull @.str.2, i32 noundef 9177, ptr noundef nonnull @__PRETTY_FUNCTION__.nk_draw_text) #4
  unreachable

14:                                               ; preds = %12
  %15 = icmp ne ptr %3, null
  %16 = icmp ne i32 %4, 0
  %or.cond3 = and i1 %15, %16
  br i1 %or.cond3, label %17, label %75

17:                                               ; preds = %14
  %18 = icmp ult i32 %6, 16777216
  %19 = icmp ult i32 %7, 16777216
  %or.cond7 = select i1 %18, i1 %19, i1 false
  br i1 %or.cond7, label %75, label %20

20:                                               ; preds = %17
  %21 = getelementptr inbounds i8, ptr %0, i64 24
  %22 = load i32, ptr %21, align 8, !tbaa !5
  %.not84 = icmp eq i32 %22, 0
  br i1 %.not84, label %..critedge_crit_edge, label %23

..critedge_crit_edge:                             ; preds = %20
  %.pre = extractelement <2 x float> %2, i64 0
  br label %.critedge

23:                                               ; preds = %20
  %24 = getelementptr inbounds i8, ptr %0, i64 8
  %25 = getelementptr inbounds i8, ptr %0, i64 16
  %26 = load float, ptr %25, align 4, !tbaa !14
  %27 = fcmp oeq float %26, 0.000000e+00
  br i1 %27, label %75, label %28

28:                                               ; preds = %23
  %29 = getelementptr inbounds i8, ptr %0, i64 20
  %30 = load float, ptr %29, align 4, !tbaa !15
  %31 = fcmp oeq float %30, 0.000000e+00
  br i1 %31, label %75, label %32

32:                                               ; preds = %28
  %33 = load float, ptr %24, align 4, !tbaa !16
  %.sroa.0.0.vec.extract = extractelement <2 x float> %1, i64 0
  %34 = fadd <2 x float> %1, %2
  %35 = extractelement <2 x float> %34, i64 0
  %36 = fcmp ogt float %33, %35
  %37 = fadd float %26, %33
  %38 = fcmp olt float %37, %.sroa.0.0.vec.extract
  %or.cond = or i1 %36, %38
  br i1 %or.cond, label %75, label %39

39:                                               ; preds = %32
  %.sroa.7.8.vec.extract = extractelement <2 x float> %2, i64 0
  %40 = getelementptr inbounds i8, ptr %0, i64 12
  %41 = load float, ptr %40, align 4, !tbaa !17
  %.sroa.0.4.vec.extract = extractelement <2 x float> %1, i64 1
  %42 = fadd <2 x float> %1, %2
  %43 = extractelement <2 x float> %42, i64 1
  %44 = fcmp ogt float %41, %43
  %45 = fadd float %30, %41
  %46 = fcmp olt float %45, %.sroa.0.4.vec.extract
  %or.cond89 = or i1 %44, %46
  br i1 %or.cond89, label %75, label %.critedge

.critedge:                                        ; preds = %..critedge_crit_edge, %39
  %.sroa.7.8.vec.extract65.pre-phi = phi float [ %.pre, %..critedge_crit_edge ], [ %.sroa.7.8.vec.extract, %39 ]
  %47 = getelementptr inbounds i8, ptr %5, i64 16
  %48 = load ptr, ptr %47, align 8, !tbaa !18
  %49 = getelementptr inbounds i8, ptr %5, i64 8
  %50 = load float, ptr %49, align 8, !tbaa !20
  %51 = load ptr, ptr %5, align 8
  %52 = tail call float %48(ptr %51, float noundef %50, ptr noundef nonnull %3, i32 noundef %4) #5
  %53 = fcmp ogt float %52, %.sroa.7.8.vec.extract65.pre-phi
  br i1 %53, label %54, label %.thread

54:                                               ; preds = %.critedge
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #5
  store i32 0, ptr %9, align 4, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #5
  store float %52, ptr %10, align 4, !tbaa !22
  %55 = call i32 @nk_text_clamp(ptr noundef nonnull %5, ptr noundef nonnull %3, i32 noundef %4, float noundef %.sroa.7.8.vec.extract65.pre-phi, ptr noundef nonnull %9, ptr noundef nonnull %10, ptr noundef null, i32 noundef 0)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #5
  %.not85 = icmp eq i32 %55, 0
  br i1 %.not85, label %75, label %.thread

.thread:                                          ; preds = %.critedge, %54
  %.092 = phi i32 [ %55, %54 ], [ %4, %.critedge ]
  %56 = sext i32 %.092 to i64
  %57 = add nsw i64 %56, 57
  %58 = call ptr @nk_command_buffer_push(ptr noundef nonnull %0, i32 noundef 16, i64 noundef %57)
  %.not86 = icmp eq ptr %58, null
  br i1 %.not86, label %75, label %59

59:                                               ; preds = %.thread
  %60 = getelementptr inbounds i8, ptr %58, i64 32
  %61 = shufflevector <2 x float> %1, <2 x float> %2, <4 x i32> <i32 0, i32 1, i32 poison, i32 3>
  %62 = insertelement <4 x float> %61, float %.sroa.7.8.vec.extract65.pre-phi, i64 2
  %63 = fptosi <4 x float> %62 to <4 x i16>
  %64 = fptoui <4 x float> %62 to <4 x i16>
  %65 = shufflevector <4 x i16> %63, <4 x i16> %64, <4 x i32> <i32 0, i32 1, i32 6, i32 7>
  store <4 x i16> %65, ptr %60, align 8, !tbaa !23
  %66 = getelementptr inbounds i8, ptr %58, i64 24
  store i24 %.sroa.0.0.extract.trunc53, ptr %66, align 8
  %.sroa.254.0..sroa_idx = getelementptr inbounds i8, ptr %58, i64 27
  store i8 %.sroa.254.0.extract.trunc, ptr %.sroa.254.0..sroa_idx, align 1, !tbaa !25
  %67 = getelementptr inbounds i8, ptr %58, i64 28
  store i24 %.sroa.0.0.extract.trunc, ptr %67, align 4
  %.sroa.2.0..sroa_idx = getelementptr inbounds i8, ptr %58, i64 31
  store i8 %.sroa.2.0.extract.trunc, ptr %.sroa.2.0..sroa_idx, align 1, !tbaa !25
  %68 = getelementptr inbounds i8, ptr %58, i64 16
  store ptr %5, ptr %68, align 8, !tbaa !26
  %69 = getelementptr inbounds i8, ptr %58, i64 44
  store i32 %.092, ptr %69, align 4, !tbaa !30
  %70 = load float, ptr %49, align 8, !tbaa !20
  %71 = getelementptr inbounds i8, ptr %58, i64 40
  store float %70, ptr %71, align 8, !tbaa !31
  %72 = getelementptr inbounds i8, ptr %58, i64 48
  %73 = call ptr @nk_memcopy(ptr noundef nonnull %72, ptr noundef nonnull %3, i64 noundef %56)
  %74 = getelementptr inbounds [1 x i8], ptr %72, i64 0, i64 %56
  store i8 0, ptr %74, align 1, !tbaa !25
  br label %75

75:                                               ; preds = %.thread, %54, %39, %32, %28, %23, %14, %17, %59
  ret void
}

; Function Attrs: nounwind uwtable
declare hidden i32 @nk_text_clamp(ptr noundef, ptr noundef, i32 noundef, float noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #3 = { 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 #4 = { noreturn nounwind }
attributes #5 = { 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, !12, i64 24}
!6 = !{!"nk_command_buffer", !7, i64 0, !10, i64 8, !12, i64 24, !8, i64 32, !13, i64 40, !13, i64 48, !13, i64 56}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"nk_rect", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12}
!11 = !{!"float", !8, i64 0}
!12 = !{!"int", !8, i64 0}
!13 = !{!"long", !8, i64 0}
!14 = !{!10, !11, i64 8}
!15 = !{!10, !11, i64 12}
!16 = !{!10, !11, i64 0}
!17 = !{!10, !11, i64 4}
!18 = !{!19, !7, i64 16}
!19 = !{!"nk_user_font", !8, i64 0, !11, i64 8, !7, i64 16, !7, i64 24, !8, i64 32}
!20 = !{!19, !11, i64 8}
!21 = !{!12, !12, i64 0}
!22 = !{!11, !11, i64 0}
!23 = !{!24, !24, i64 0}
!24 = !{!"short", !8, i64 0}
!25 = !{!8, !8, i64 0}
!26 = !{!27, !7, i64 16}
!27 = !{!"nk_command_text", !28, i64 0, !7, i64 16, !29, i64 24, !29, i64 28, !24, i64 32, !24, i64 34, !24, i64 36, !24, i64 38, !11, i64 40, !12, i64 44, !8, i64 48}
!28 = !{!"nk_command", !12, i64 0, !13, i64 8}
!29 = !{!"nk_color", !8, i64 0, !8, i64 1, !8, i64 2, !8, i64 3}
!30 = !{!27, !12, i64 44}
!31 = !{!27, !11, i64 40}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,ReassociatePass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass,VectorCombinePass