; 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 }
%union.nk_handle = type { ptr }
%struct.nk_command_buffer = type { ptr, %struct.nk_rect, i32, %union.nk_handle, i64, i64, i64 }
%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.1 = external hidden unnamed_addr constant [86 x i8], align 1
@.str.10 = 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.24 = external hidden unnamed_addr constant [5 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: 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) #2

; Function Attrs: 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 hidden noundef ptr @_ZL10nk_memcopyPvPKvm(ptr noundef, ptr noundef, i64 noundef) #3

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

; Function Attrs: mustprogress 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) #5 {
  %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 %union.nk_handle, align 8
  %21 = alloca i32, align 4
  %22 = alloca float, align 4
  %23 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %9, i32 0, i32 0
  store <2 x float> %1, ptr %23, align 4
  %24 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %9, i32 0, i32 1
  store <2 x float> %2, ptr %24, 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) #6
  store float 0.000000e+00, ptr %16, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #6
  %25 = load ptr, ptr %12, align 8, !tbaa !5
  %26 = icmp ne ptr %25, null
  br i1 %26, label %27, label %28

27:                                               ; preds = %8
  br label %30

28:                                               ; preds = %8
  call void @__assert_fail(ptr noundef @.str.10, ptr noundef @.str.1, i32 noundef 9365, ptr noundef @__PRETTY_FUNCTION__.nk_draw_text) #7
  unreachable

29:                                               ; No predecessors!
  br label %30

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

33:                                               ; preds = %30
  br label %36

34:                                               ; preds = %30
  call void @__assert_fail(ptr noundef @.str.24, ptr noundef @.str.1, i32 noundef 9366, ptr noundef @__PRETTY_FUNCTION__.nk_draw_text) #7
  unreachable

35:                                               ; No predecessors!
  br label %36

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

39:                                               ; preds = %36
  %40 = load ptr, ptr %13, align 8, !tbaa !5
  %41 = icmp ne ptr %40, null
  br i1 %41, label %42, label %55

42:                                               ; preds = %39
  %43 = load i32, ptr %14, align 4, !tbaa !9
  %44 = icmp ne i32 %43, 0
  br i1 %44, label %45, label %55

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

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

55:                                               ; preds = %50, %42, %39, %36
  store i32 1, ptr %18, align 4
  br label %208

56:                                               ; preds = %50, %45
  %57 = load ptr, ptr %12, align 8, !tbaa !5
  %58 = getelementptr inbounds %struct.nk_command_buffer, ptr %57, i32 0, i32 2
  %59 = load i32, ptr %58, align 8, !tbaa !15
  %60 = icmp ne i32 %59, 0
  br i1 %60, label %61, label %120

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

68:                                               ; preds = %61
  %69 = load ptr, ptr %19, align 8, !tbaa !5
  %70 = getelementptr inbounds %struct.nk_rect, ptr %69, i32 0, i32 3
  %71 = load float, ptr %70, align 4, !tbaa !20
  %72 = fcmp oeq float %71, 0.000000e+00
  br i1 %72, label %115, label %73

73:                                               ; preds = %68
  %74 = load ptr, ptr %19, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.nk_rect, ptr %74, i32 0, i32 0
  %76 = load float, ptr %75, align 4, !tbaa !21
  %77 = getelementptr inbounds %struct.nk_rect, ptr %9, i32 0, i32 0
  %78 = load float, ptr %77, align 4, !tbaa !21
  %79 = getelementptr inbounds %struct.nk_rect, ptr %9, i32 0, i32 2
  %80 = load float, ptr %79, align 4, !tbaa !19
  %81 = fadd float %78, %80
  %82 = fcmp olt float %76, %81
  br i1 %82, label %83, label %115

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

94:                                               ; preds = %83
  %95 = load ptr, ptr %19, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct.nk_rect, ptr %95, i32 0, i32 1
  %97 = load float, ptr %96, align 4, !tbaa !22
  %98 = getelementptr inbounds %struct.nk_rect, ptr %9, i32 0, i32 1
  %99 = load float, ptr %98, align 4, !tbaa !22
  %100 = getelementptr inbounds %struct.nk_rect, ptr %9, i32 0, i32 3
  %101 = load float, ptr %100, align 4, !tbaa !20
  %102 = fadd float %99, %101
  %103 = fcmp olt float %97, %102
  br i1 %103, label %104, label %115

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

115:                                              ; preds = %104, %94, %83, %73, %68, %61
  store i32 1, ptr %18, align 4
  br label %117

116:                                              ; preds = %104
  store i32 0, ptr %18, align 4
  br label %117

117:                                              ; preds = %116, %115
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #6
  %118 = load i32, ptr %18, align 4
  switch i32 %118, label %208 [
    i32 0, label %119
  ]

119:                                              ; preds = %117
  br label %120

120:                                              ; preds = %119, %56
  %121 = load ptr, ptr %15, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct.nk_user_font, ptr %121, i32 0, i32 2
  %123 = load ptr, ptr %122, align 8, !tbaa !23
  %124 = load ptr, ptr %15, align 8, !tbaa !5
  %125 = getelementptr inbounds %struct.nk_user_font, ptr %124, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %20, ptr align 8 %125, i64 8, i1 false), !tbaa.struct !25
  %126 = load ptr, ptr %15, align 8, !tbaa !5
  %127 = getelementptr inbounds %struct.nk_user_font, ptr %126, i32 0, i32 1
  %128 = load float, ptr %127, align 8, !tbaa !27
  %129 = load ptr, ptr %13, align 8, !tbaa !5
  %130 = load i32, ptr %14, align 4, !tbaa !9
  %131 = getelementptr inbounds %union.nk_handle, ptr %20, i32 0, i32 0
  %132 = load ptr, ptr %131, align 8
  %133 = call noundef float %123(ptr %132, float noundef %128, ptr noundef %129, i32 noundef %130)
  store float %133, ptr %16, align 4, !tbaa !11
  %134 = load float, ptr %16, align 4, !tbaa !11
  %135 = getelementptr inbounds %struct.nk_rect, ptr %9, i32 0, i32 2
  %136 = load float, ptr %135, align 4, !tbaa !19
  %137 = fcmp ogt float %134, %136
  br i1 %137, label %138, label %146

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

146:                                              ; preds = %138, %120
  %147 = load i32, ptr %14, align 4, !tbaa !9
  %148 = icmp ne i32 %147, 0
  br i1 %148, label %150, label %149

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

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

159:                                              ; preds = %150
  store i32 1, ptr %18, align 4
  br label %208

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

208:                                              ; preds = %160, %159, %149, %117, %55
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  %209 = load i32, ptr %18, align 4
  switch i32 %209, label %211 [
    i32 0, label %210
    i32 1, label %210
  ]

210:                                              ; preds = %208, %208
  ret void

211:                                              ; preds = %208
  unreachable
}

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL13nk_text_clampPK12nk_user_fontPKcifPiPfPji(ptr noundef, ptr noundef, i32 noundef, float noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef) #4

attributes #0 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"float", !7, i64 0}
!13 = !{!14, !7, i64 3}
!14 = !{!"_ZTS8nk_color", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 3}
!15 = !{!16, !10, i64 24}
!16 = !{!"_ZTS17nk_command_buffer", !6, i64 0, !17, i64 8, !10, i64 24, !7, i64 32, !18, i64 40, !18, i64 48, !18, i64 56}
!17 = !{!"_ZTS7nk_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 = !{!"_ZTS12nk_user_font", !7, i64 0, !12, i64 8, !6, i64 16, !6, i64 24, !7, i64 32}
!25 = !{i64 0, i64 8, !26}
!26 = !{!7, !7, i64 0}
!27 = !{!24, !12, i64 8}
!28 = !{!29, !32, i64 32}
!29 = !{!"_ZTS15nk_command_text", !30, i64 0, !6, i64 16, !14, i64 24, !14, i64 28, !32, i64 32, !32, i64 34, !32, i64 36, !32, i64 38, !12, i64 40, !10, i64 44, !7, i64 48}
!30 = !{!"_ZTS10nk_command", !31, i64 0, !18, i64 8}
!31 = !{!"_ZTS15nk_command_type", !7, i64 0}
!32 = !{!"short", !7, i64 0}
!33 = !{!29, !32, i64 34}
!34 = !{!29, !32, i64 36}
!35 = !{!29, !32, i64 38}
!36 = !{i64 0, i64 1, !26, i64 1, i64 1, !26, i64 2, i64 1, !26, i64 3, i64 1, !26}
!37 = !{!29, !6, i64 16}
!38 = !{!29, !10, i64 44}
!39 = !{!29, !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.1 = external hidden unnamed_addr constant [86 x i8], align 1
@.str.10 = 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.24 = 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: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #1

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

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

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

; Function Attrs: mustprogress 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 #4 {
  %9 = alloca i32, align 4
  %10 = alloca float, align 4
  %.sroa.054.0.extract.trunc = trunc i32 %6 to i24
  %.sroa.255.0.extract.shift = lshr i32 %6, 24
  %.sroa.255.0.extract.trunc = trunc nuw i32 %.sroa.255.0.extract.shift to i8
  %.sroa.053.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.10, ptr noundef nonnull @.str.1, i32 noundef 9365, ptr noundef nonnull @__PRETTY_FUNCTION__.nk_draw_text) #5
  unreachable

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

13:                                               ; preds = %12
  tail call void @__assert_fail(ptr noundef nonnull @.str.24, ptr noundef nonnull @.str.1, i32 noundef 9366, ptr noundef nonnull @__PRETTY_FUNCTION__.nk_draw_text) #5
  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 %74

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 %74, label %20

20:                                               ; preds = %17
  %21 = getelementptr inbounds i8, ptr %0, i64 24
  %22 = load i32, ptr %21, align 8, !tbaa !5
  %.not85 = icmp eq i32 %22, 0
  br i1 %.not85, 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 %74, 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 %74, label %32

32:                                               ; preds = %28
  %33 = load float, ptr %24, align 4, !tbaa !16
  %.sroa.056.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 olt float %33, %35
  %37 = fadd float %26, %33
  %38 = fcmp olt float %.sroa.056.0.vec.extract, %37
  %or.cond = and i1 %36, %38
  br i1 %or.cond, label %39, label %74

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.056.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 olt float %41, %43
  %45 = fadd float %30, %41
  %46 = fcmp olt float %.sroa.056.4.vec.extract, %45
  %or.cond90 = and i1 %44, %46
  br i1 %or.cond90, label %.critedge, label %74

.critedge:                                        ; preds = %..critedge_crit_edge, %39
  %.sroa.7.8.vec.extract66.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
  %.sroa.0.0.copyload = load ptr, ptr %5, align 8, !tbaa !20
  %49 = getelementptr inbounds i8, ptr %5, i64 8
  %50 = load float, ptr %49, align 8, !tbaa !21
  %51 = tail call noundef float %48(ptr %.sroa.0.0.copyload, float noundef %50, ptr noundef nonnull %3, i32 noundef %4)
  %52 = fcmp ogt float %51, %.sroa.7.8.vec.extract66.pre-phi
  br i1 %52, label %53, label %.thread

53:                                               ; preds = %.critedge
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #6
  store i32 0, ptr %9, align 4, !tbaa !22
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #6
  store float %51, ptr %10, align 4, !tbaa !23
  %54 = call noundef i32 @_ZL13nk_text_clampPK12nk_user_fontPKcifPiPfPji(ptr noundef nonnull %5, ptr noundef nonnull %3, i32 noundef %4, float noundef %.sroa.7.8.vec.extract66.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) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #6
  %.not86 = icmp eq i32 %54, 0
  br i1 %.not86, label %74, label %.thread

.thread:                                          ; preds = %.critedge, %53
  %.093 = phi i32 [ %54, %53 ], [ %4, %.critedge ]
  %55 = sext i32 %.093 to i64
  %56 = add nsw i64 %55, 57
  %57 = call noundef ptr @_ZL22nk_command_buffer_pushP17nk_command_buffer15nk_command_typem(ptr noundef nonnull %0, i32 noundef 16, i64 noundef %56)
  %.not87 = icmp eq ptr %57, null
  br i1 %.not87, label %74, label %58

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

74:                                               ; preds = %.thread, %53, %39, %32, %28, %23, %14, %17, %58
  ret void
}

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL13nk_text_clampPK12nk_user_fontPKcifPiPfPji(ptr noundef, ptr noundef, i32 noundef, float noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #3

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 = { 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 #3 = { 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 #4 = { 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 #5 = { noreturn nounwind }
attributes #6 = { 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 = !{!"_ZTS17nk_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++ TBAA"}
!10 = !{!"_ZTS7nk_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 = !{!"_ZTS12nk_user_font", !8, i64 0, !11, i64 8, !7, i64 16, !7, i64 24, !8, i64 32}
!20 = !{!8, !8, i64 0}
!21 = !{!19, !11, i64 8}
!22 = !{!12, !12, i64 0}
!23 = !{!11, !11, i64 0}
!24 = !{!25, !25, i64 0}
!25 = !{!"short", !8, i64 0}
!26 = !{!27, !7, i64 16}
!27 = !{!"_ZTS15nk_command_text", !28, i64 0, !7, i64 16, !30, i64 24, !30, i64 28, !25, i64 32, !25, i64 34, !25, i64 36, !25, i64 38, !11, i64 40, !12, i64 44, !8, i64 48}
!28 = !{!"_ZTS10nk_command", !29, i64 0, !13, i64 8}
!29 = !{!"_ZTS15nk_command_type", !8, i64 0}
!30 = !{!"_ZTS8nk_color", !8, i64 0, !8, i64 1, !8, i64 2, !8, i64 3}
!31 = !{!27, !12, i64 44}
!32 = !{!27, !11, i64 40}


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