; LLVM IR from Dragons-Lake/REI :: sources/REI_Integration/3rdParty/nanovg (nanovg)

; 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.NVGtextRow = type { ptr, ptr, ptr, float, float, float }
%struct.NVGstate = type { %struct.NVGcompositeOperationState, %struct.NVGpaint, %struct.NVGpaint, float, float, i32, i32, float, [6 x float], %struct.NVGscissor, float, float, float, float, i32, i32 }
%struct.NVGcompositeOperationState = type { i32, i32, i32, i32 }
%struct.NVGpaint = type { [6 x float], [2 x float], float, float, %struct.NVGcolor, %struct.NVGcolor, i32 }
%struct.NVGcolor = type { %union.anon }
%union.anon = type { [4 x float] }
%struct.NVGscissor = type { [6 x float], [2 x float] }

; 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 hidden ptr @nvg__getState(ptr noundef) #1

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #2

; Function Attrs: nounwind uwtable
declare dso_local float @nvgText(ptr noundef, float noundef, float noundef, ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
define dso_local void @nvgTextBox(ptr noundef %0, float noundef %1, float noundef %2, float noundef %3, ptr noundef %4, ptr noundef %5) #1 {
  %7 = alloca ptr, align 8
  %8 = alloca float, align 4
  %9 = alloca float, align 4
  %10 = alloca float, align 4
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca [2 x %struct.NVGtextRow], align 16
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca float, align 4
  %21 = alloca i32, align 4
  %22 = alloca ptr, align 8
  store ptr %0, ptr %7, align 8, !tbaa !5
  store float %1, ptr %8, align 4, !tbaa !9
  store float %2, ptr %9, align 4, !tbaa !9
  store float %3, ptr %10, align 4, !tbaa !9
  store ptr %4, ptr %11, align 8, !tbaa !5
  store ptr %5, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #3
  %23 = load ptr, ptr %7, align 8, !tbaa !5
  %24 = call ptr @nvg__getState(ptr noundef %23)
  store ptr %24, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 80, ptr %14) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #3
  store i32 0, ptr %15, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #3
  %25 = load ptr, ptr %13, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct.NVGstate, ptr %25, i32 0, i32 14
  %27 = load i32, ptr %26, align 4, !tbaa !13
  store i32 %27, ptr %17, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #3
  %28 = load ptr, ptr %13, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct.NVGstate, ptr %28, i32 0, i32 14
  %30 = load i32, ptr %29, align 4, !tbaa !13
  %31 = and i32 %30, 7
  store i32 %31, ptr %18, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #3
  %32 = load ptr, ptr %13, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.NVGstate, ptr %32, i32 0, i32 14
  %34 = load i32, ptr %33, align 4, !tbaa !13
  %35 = and i32 %34, 120
  store i32 %35, ptr %19, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #3
  store float 0.000000e+00, ptr %20, align 4, !tbaa !9
  %36 = load ptr, ptr %13, align 8, !tbaa !5
  %37 = getelementptr inbounds %struct.NVGstate, ptr %36, i32 0, i32 15
  %38 = load i32, ptr %37, align 4, !tbaa !19
  %39 = icmp eq i32 %38, -1
  br i1 %39, label %40, label %41

40:                                               ; preds = %6
  store i32 1, ptr %21, align 4
  br label %144

41:                                               ; preds = %6
  %42 = load ptr, ptr %7, align 8, !tbaa !5
  call void @nvgTextMetrics(ptr noundef %42, ptr noundef null, ptr noundef null, ptr noundef %20)
  %43 = load i32, ptr %19, align 4, !tbaa !11
  %44 = or i32 1, %43
  %45 = load ptr, ptr %13, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct.NVGstate, ptr %45, i32 0, i32 14
  store i32 %44, ptr %46, align 4, !tbaa !13
  br label %47

47:                                               ; preds = %133, %41
  %48 = load ptr, ptr %7, align 8, !tbaa !5
  %49 = load ptr, ptr %11, align 8, !tbaa !5
  %50 = load ptr, ptr %12, align 8, !tbaa !5
  %51 = load float, ptr %10, align 4, !tbaa !9
  %52 = getelementptr inbounds [2 x %struct.NVGtextRow], ptr %14, i64 0, i64 0
  %53 = call i32 @nvgTextBreakLines(ptr noundef %48, ptr noundef %49, ptr noundef %50, float noundef %51, ptr noundef %52, i32 noundef 2)
  store i32 %53, ptr %15, align 4, !tbaa !11
  %54 = icmp ne i32 %53, 0
  br i1 %54, label %55, label %140

55:                                               ; preds = %47
  store i32 0, ptr %16, align 4, !tbaa !11
  br label %56

56:                                               ; preds = %130, %55
  %57 = load i32, ptr %16, align 4, !tbaa !11
  %58 = load i32, ptr %15, align 4, !tbaa !11
  %59 = icmp slt i32 %57, %58
  br i1 %59, label %60, label %133

60:                                               ; preds = %56
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #3
  %61 = load i32, ptr %16, align 4, !tbaa !11
  %62 = sext i32 %61 to i64
  %63 = getelementptr inbounds [2 x %struct.NVGtextRow], ptr %14, i64 0, i64 %62
  store ptr %63, ptr %22, align 8, !tbaa !5
  %64 = load i32, ptr %18, align 4, !tbaa !11
  %65 = and i32 %64, 1
  %66 = icmp ne i32 %65, 0
  br i1 %66, label %67, label %78

67:                                               ; preds = %60
  %68 = load ptr, ptr %7, align 8, !tbaa !5
  %69 = load float, ptr %8, align 4, !tbaa !9
  %70 = load float, ptr %9, align 4, !tbaa !9
  %71 = load ptr, ptr %22, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct.NVGtextRow, ptr %71, i32 0, i32 0
  %73 = load ptr, ptr %72, align 8, !tbaa !20
  %74 = load ptr, ptr %22, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.NVGtextRow, ptr %74, i32 0, i32 1
  %76 = load ptr, ptr %75, align 8, !tbaa !22
  %77 = call float @nvgText(ptr noundef %68, float noundef %69, float noundef %70, ptr noundef %73, ptr noundef %76)
  br label %123

78:                                               ; preds = %60
  %79 = load i32, ptr %18, align 4, !tbaa !11
  %80 = and i32 %79, 2
  %81 = icmp ne i32 %80, 0
  br i1 %81, label %82, label %100

82:                                               ; preds = %78
  %83 = load ptr, ptr %7, align 8, !tbaa !5
  %84 = load float, ptr %8, align 4, !tbaa !9
  %85 = load float, ptr %10, align 4, !tbaa !9
  %86 = call float @llvm.fmuladd.f32(float %85, float 5.000000e-01, float %84)
  %87 = load ptr, ptr %22, align 8, !tbaa !5
  %88 = getelementptr inbounds %struct.NVGtextRow, ptr %87, i32 0, i32 3
  %89 = load float, ptr %88, align 8, !tbaa !23
  %90 = fneg float %89
  %91 = call float @llvm.fmuladd.f32(float %90, float 5.000000e-01, float %86)
  %92 = load float, ptr %9, align 4, !tbaa !9
  %93 = load ptr, ptr %22, align 8, !tbaa !5
  %94 = getelementptr inbounds %struct.NVGtextRow, ptr %93, i32 0, i32 0
  %95 = load ptr, ptr %94, align 8, !tbaa !20
  %96 = load ptr, ptr %22, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct.NVGtextRow, ptr %96, i32 0, i32 1
  %98 = load ptr, ptr %97, align 8, !tbaa !22
  %99 = call float @nvgText(ptr noundef %83, float noundef %91, float noundef %92, ptr noundef %95, ptr noundef %98)
  br label %122

100:                                              ; preds = %78
  %101 = load i32, ptr %18, align 4, !tbaa !11
  %102 = and i32 %101, 4
  %103 = icmp ne i32 %102, 0
  br i1 %103, label %104, label %121

104:                                              ; preds = %100
  %105 = load ptr, ptr %7, align 8, !tbaa !5
  %106 = load float, ptr %8, align 4, !tbaa !9
  %107 = load float, ptr %10, align 4, !tbaa !9
  %108 = fadd float %106, %107
  %109 = load ptr, ptr %22, align 8, !tbaa !5
  %110 = getelementptr inbounds %struct.NVGtextRow, ptr %109, i32 0, i32 3
  %111 = load float, ptr %110, align 8, !tbaa !23
  %112 = fsub float %108, %111
  %113 = load float, ptr %9, align 4, !tbaa !9
  %114 = load ptr, ptr %22, align 8, !tbaa !5
  %115 = getelementptr inbounds %struct.NVGtextRow, ptr %114, i32 0, i32 0
  %116 = load ptr, ptr %115, align 8, !tbaa !20
  %117 = load ptr, ptr %22, align 8, !tbaa !5
  %118 = getelementptr inbounds %struct.NVGtextRow, ptr %117, i32 0, i32 1
  %119 = load ptr, ptr %118, align 8, !tbaa !22
  %120 = call float @nvgText(ptr noundef %105, float noundef %112, float noundef %113, ptr noundef %116, ptr noundef %119)
  br label %121

121:                                              ; preds = %104, %100
  br label %122

122:                                              ; preds = %121, %82
  br label %123

123:                                              ; preds = %122, %67
  %124 = load float, ptr %20, align 4, !tbaa !9
  %125 = load ptr, ptr %13, align 8, !tbaa !5
  %126 = getelementptr inbounds %struct.NVGstate, ptr %125, i32 0, i32 12
  %127 = load float, ptr %126, align 4, !tbaa !24
  %128 = load float, ptr %9, align 4, !tbaa !9
  %129 = call float @llvm.fmuladd.f32(float %124, float %127, float %128)
  store float %129, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #3
  br label %130

130:                                              ; preds = %123
  %131 = load i32, ptr %16, align 4, !tbaa !11
  %132 = add nsw i32 %131, 1
  store i32 %132, ptr %16, align 4, !tbaa !11
  br label %56, !llvm.loop !25

133:                                              ; preds = %56
  %134 = load i32, ptr %15, align 4, !tbaa !11
  %135 = sub nsw i32 %134, 1
  %136 = sext i32 %135 to i64
  %137 = getelementptr inbounds [2 x %struct.NVGtextRow], ptr %14, i64 0, i64 %136
  %138 = getelementptr inbounds %struct.NVGtextRow, ptr %137, i32 0, i32 2
  %139 = load ptr, ptr %138, align 8, !tbaa !27
  store ptr %139, ptr %11, align 8, !tbaa !5
  br label %47, !llvm.loop !28

140:                                              ; preds = %47
  %141 = load i32, ptr %17, align 4, !tbaa !11
  %142 = load ptr, ptr %13, align 8, !tbaa !5
  %143 = getelementptr inbounds %struct.NVGstate, ptr %142, i32 0, i32 14
  store i32 %141, ptr %143, align 4, !tbaa !13
  store i32 0, ptr %21, align 4
  br label %144

144:                                              ; preds = %140, %40
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #3
  call void @llvm.lifetime.end.p0(i64 80, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #3
  %145 = load i32, ptr %21, align 4
  switch i32 %145, label %147 [
    i32 0, label %146
    i32 1, label %146
  ]

146:                                              ; preds = %144, %144
  ret void

147:                                              ; preds = %144
  unreachable
}

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @nvgTextBreakLines(ptr noundef, ptr noundef, ptr noundef, float noundef, ptr noundef, i32 noundef) #1

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #3 = { 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 = !{!"float", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !12, i64 260}
!14 = !{!"NVGstate", !15, i64 0, !16, i64 16, !16, i64 92, !10, i64 168, !10, i64 172, !12, i64 176, !12, i64 180, !10, i64 184, !7, i64 188, !18, i64 212, !10, i64 244, !10, i64 248, !10, i64 252, !10, i64 256, !12, i64 260, !12, i64 264}
!15 = !{!"NVGcompositeOperationState", !12, i64 0, !12, i64 4, !12, i64 8, !12, i64 12}
!16 = !{!"NVGpaint", !7, i64 0, !7, i64 24, !10, i64 32, !10, i64 36, !17, i64 40, !17, i64 56, !12, i64 72}
!17 = !{!"NVGcolor", !7, i64 0}
!18 = !{!"NVGscissor", !7, i64 0, !7, i64 24}
!19 = !{!14, !12, i64 264}
!20 = !{!21, !6, i64 0}
!21 = !{!"NVGtextRow", !6, i64 0, !6, i64 8, !6, i64 16, !10, i64 24, !10, i64 28, !10, i64 32}
!22 = !{!21, !6, i64 8}
!23 = !{!21, !10, i64 24}
!24 = !{!14, !10, i64 252}
!25 = distinct !{!25, !26}
!26 = !{!"llvm.loop.mustprogress"}
!27 = !{!21, !6, i64 16}
!28 = distinct !{!28, !26}


; 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.NVGtextRow = type { ptr, ptr, ptr, float, float, float }

; 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 hidden ptr @nvg__getState(ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #2

; Function Attrs: nounwind uwtable
declare dso_local float @nvgText(ptr noundef, float noundef, float noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local void @nvgTextBox(ptr noundef %0, float noundef %1, float noundef %2, float noundef %3, ptr noundef %4, ptr noundef %5) local_unnamed_addr #1 {
  %7 = alloca [2 x %struct.NVGtextRow], align 16
  %8 = alloca float, align 4
  %9 = tail call ptr @nvg__getState(ptr noundef %0)
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %7) #3
  %10 = getelementptr inbounds i8, ptr %9, i64 260
  %11 = load i32, ptr %10, align 4, !tbaa !5
  %.fr65 = freeze i32 %11
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #3
  store float 0.000000e+00, ptr %8, align 4, !tbaa !15
  %12 = getelementptr inbounds i8, ptr %9, i64 264
  %13 = load i32, ptr %12, align 4, !tbaa !16
  %14 = icmp eq i32 %13, -1
  br i1 %14, label %83, label %15

15:                                               ; preds = %6
  %16 = and i32 %.fr65, 120
  call void @nvgTextMetrics(ptr noundef %0, ptr noundef null, ptr noundef null, ptr noundef nonnull %8)
  %17 = or disjoint i32 %16, 1
  store i32 %17, ptr %10, align 4, !tbaa !5
  %18 = call i32 @nvgTextBreakLines(ptr noundef %0, ptr noundef %4, ptr noundef %5, float noundef %3, ptr noundef nonnull %7, i32 noundef 2)
  %.not52 = icmp eq i32 %18, 0
  br i1 %.not52, label %._crit_edge54, label %.preheader.lr.ph

.preheader.lr.ph:                                 ; preds = %15
  %19 = and i32 %.fr65, 1
  %.not45 = icmp eq i32 %19, 0
  %20 = call float @llvm.fmuladd.f32(float %3, float 5.000000e-01, float %1)
  %21 = and i32 %.fr65, 4
  %.not47 = icmp eq i32 %21, 0
  %22 = fadd float %1, %3
  %23 = getelementptr inbounds i8, ptr %9, i64 252
  br i1 %.not45, label %.preheader.lr.ph.split.us, label %.preheader

.preheader.lr.ph.split.us:                        ; preds = %.preheader.lr.ph
  %24 = and i32 %.fr65, 2
  %.not46 = icmp eq i32 %24, 0
  br i1 %.not46, label %.preheader.lr.ph.split.us.split.us, label %.preheader.us

.preheader.lr.ph.split.us.split.us:               ; preds = %.preheader.lr.ph.split.us
  br i1 %.not47, label %.preheader.us.us.us, label %.preheader.us.us

.preheader.us.us.us:                              ; preds = %.preheader.lr.ph.split.us.split.us, %.preheader.us.us.us
  %25 = phi i32 [ %30, %.preheader.us.us.us ], [ %18, %.preheader.lr.ph.split.us.split.us ]
  %26 = add nsw i32 %25, -1
  %27 = sext i32 %26 to i64
  %28 = getelementptr inbounds [2 x %struct.NVGtextRow], ptr %7, i64 0, i64 %27, i32 2
  %29 = load ptr, ptr %28, align 8, !tbaa !17
  %30 = call i32 @nvgTextBreakLines(ptr noundef %0, ptr noundef %29, ptr noundef %5, float noundef %3, ptr noundef nonnull %7, i32 noundef 2)
  %.not.us.us.us = icmp eq i32 %30, 0
  br i1 %.not.us.us.us, label %._crit_edge54, label %.preheader.us.us.us, !llvm.loop !20

.preheader.us.us:                                 ; preds = %.preheader.lr.ph.split.us.split.us, %._crit_edge.split.us.split.us.split.us62.us
  %31 = phi i32 [ %37, %._crit_edge.split.us.split.us.split.us62.us ], [ %18, %.preheader.lr.ph.split.us.split.us ]
  %.053.us.us = phi float [ %.1.lcssa.us.us, %._crit_edge.split.us.split.us.split.us62.us ], [ %2, %.preheader.lr.ph.split.us.split.us ]
  %32 = icmp sgt i32 %31, 0
  br i1 %32, label %.lr.ph.us.us.preheader, label %._crit_edge.split.us.split.us.split.us62.us

.lr.ph.us.us.preheader:                           ; preds = %.preheader.us.us
  %wide.trip.count81 = zext nneg i32 %31 to i64
  br label %.lr.ph.us.us

._crit_edge.split.us.split.us.split.us62.us:      ; preds = %.lr.ph.us.us, %.preheader.us.us
  %.1.lcssa.us.us = phi float [ %.053.us.us, %.preheader.us.us ], [ %48, %.lr.ph.us.us ]
  %33 = add nsw i32 %31, -1
  %34 = sext i32 %33 to i64
  %35 = getelementptr inbounds [2 x %struct.NVGtextRow], ptr %7, i64 0, i64 %34, i32 2
  %36 = load ptr, ptr %35, align 8, !tbaa !17
  %37 = call i32 @nvgTextBreakLines(ptr noundef %0, ptr noundef %36, ptr noundef %5, float noundef %3, ptr noundef nonnull %7, i32 noundef 2)
  %.not.us.us = icmp eq i32 %37, 0
  br i1 %.not.us.us, label %._crit_edge54, label %.preheader.us.us, !llvm.loop !20

.lr.ph.us.us:                                     ; preds = %.lr.ph.us.us.preheader, %.lr.ph.us.us
  %indvars.iv78 = phi i64 [ 0, %.lr.ph.us.us.preheader ], [ %indvars.iv.next79, %.lr.ph.us.us ]
  %.149.us.us.us60.us = phi float [ %.053.us.us, %.lr.ph.us.us.preheader ], [ %48, %.lr.ph.us.us ]
  %38 = getelementptr inbounds [2 x %struct.NVGtextRow], ptr %7, i64 0, i64 %indvars.iv78
  %39 = getelementptr inbounds i8, ptr %38, i64 24
  %40 = load float, ptr %39, align 8, !tbaa !22
  %41 = fsub float %22, %40
  %42 = load ptr, ptr %38, align 8, !tbaa !23
  %43 = getelementptr inbounds i8, ptr %38, i64 8
  %44 = load ptr, ptr %43, align 8, !tbaa !24
  %45 = call float @nvgText(ptr noundef %0, float noundef %41, float noundef %.149.us.us.us60.us, ptr noundef %42, ptr noundef %44)
  %46 = load float, ptr %8, align 4, !tbaa !15
  %47 = load float, ptr %23, align 4, !tbaa !25
  %48 = call float @llvm.fmuladd.f32(float %46, float %47, float %.149.us.us.us60.us)
  %indvars.iv.next79 = add nuw nsw i64 %indvars.iv78, 1
  %exitcond82.not = icmp eq i64 %indvars.iv.next79, %wide.trip.count81
  br i1 %exitcond82.not, label %._crit_edge.split.us.split.us.split.us62.us, label %.lr.ph.us.us, !llvm.loop !26

.preheader.us:                                    ; preds = %.preheader.lr.ph.split.us, %._crit_edge.split.us.split.us57
  %49 = phi i32 [ %55, %._crit_edge.split.us.split.us57 ], [ %18, %.preheader.lr.ph.split.us ]
  %.053.us = phi float [ %.1.lcssa.us, %._crit_edge.split.us.split.us57 ], [ %2, %.preheader.lr.ph.split.us ]
  %50 = icmp sgt i32 %49, 0
  br i1 %50, label %.lr.ph.us.preheader, label %._crit_edge.split.us.split.us57

.lr.ph.us.preheader:                              ; preds = %.preheader.us
  %wide.trip.count76 = zext nneg i32 %49 to i64
  br label %.lr.ph.us

._crit_edge.split.us.split.us57:                  ; preds = %.lr.ph.us, %.preheader.us
  %.1.lcssa.us = phi float [ %.053.us, %.preheader.us ], [ %67, %.lr.ph.us ]
  %51 = add nsw i32 %49, -1
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds [2 x %struct.NVGtextRow], ptr %7, i64 0, i64 %52, i32 2
  %54 = load ptr, ptr %53, align 8, !tbaa !17
  %55 = call i32 @nvgTextBreakLines(ptr noundef %0, ptr noundef %54, ptr noundef %5, float noundef %3, ptr noundef nonnull %7, i32 noundef 2)
  %.not.us = icmp eq i32 %55, 0
  br i1 %.not.us, label %._crit_edge54, label %.preheader.us, !llvm.loop !20

.lr.ph.us:                                        ; preds = %.lr.ph.us.preheader, %.lr.ph.us
  %indvars.iv73 = phi i64 [ 0, %.lr.ph.us.preheader ], [ %indvars.iv.next74, %.lr.ph.us ]
  %.149.us.us55 = phi float [ %.053.us, %.lr.ph.us.preheader ], [ %67, %.lr.ph.us ]
  %56 = getelementptr inbounds [2 x %struct.NVGtextRow], ptr %7, i64 0, i64 %indvars.iv73
  %57 = getelementptr inbounds i8, ptr %56, i64 24
  %58 = load float, ptr %57, align 8, !tbaa !22
  %59 = fneg float %58
  %60 = call float @llvm.fmuladd.f32(float %59, float 5.000000e-01, float %20)
  %61 = load ptr, ptr %56, align 8, !tbaa !23
  %62 = getelementptr inbounds i8, ptr %56, i64 8
  %63 = load ptr, ptr %62, align 8, !tbaa !24
  %64 = call float @nvgText(ptr noundef %0, float noundef %60, float noundef %.149.us.us55, ptr noundef %61, ptr noundef %63)
  %65 = load float, ptr %8, align 4, !tbaa !15
  %66 = load float, ptr %23, align 4, !tbaa !25
  %67 = call float @llvm.fmuladd.f32(float %65, float %66, float %.149.us.us55)
  %indvars.iv.next74 = add nuw nsw i64 %indvars.iv73, 1
  %exitcond77.not = icmp eq i64 %indvars.iv.next74, %wide.trip.count76
  br i1 %exitcond77.not, label %._crit_edge.split.us.split.us57, label %.lr.ph.us, !llvm.loop !26

.preheader:                                       ; preds = %.preheader.lr.ph, %._crit_edge.split
  %68 = phi i32 [ %82, %._crit_edge.split ], [ %18, %.preheader.lr.ph ]
  %.053 = phi float [ %.1.lcssa, %._crit_edge.split ], [ %2, %.preheader.lr.ph ]
  %69 = icmp sgt i32 %68, 0
  br i1 %69, label %.lr.ph.preheader, label %._crit_edge.split

.lr.ph.preheader:                                 ; preds = %.preheader
  %wide.trip.count = zext nneg i32 %68 to i64
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next, %.lr.ph ]
  %.149 = phi float [ %.053, %.lr.ph.preheader ], [ %77, %.lr.ph ]
  %70 = getelementptr inbounds [2 x %struct.NVGtextRow], ptr %7, i64 0, i64 %indvars.iv
  %71 = load ptr, ptr %70, align 8, !tbaa !23
  %72 = getelementptr inbounds i8, ptr %70, i64 8
  %73 = load ptr, ptr %72, align 8, !tbaa !24
  %74 = call float @nvgText(ptr noundef %0, float noundef %1, float noundef %.149, ptr noundef %71, ptr noundef %73)
  %75 = load float, ptr %8, align 4, !tbaa !15
  %76 = load float, ptr %23, align 4, !tbaa !25
  %77 = call float @llvm.fmuladd.f32(float %75, float %76, float %.149)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge.split, label %.lr.ph, !llvm.loop !26

._crit_edge.split:                                ; preds = %.lr.ph, %.preheader
  %.1.lcssa = phi float [ %.053, %.preheader ], [ %77, %.lr.ph ]
  %78 = add nsw i32 %68, -1
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds [2 x %struct.NVGtextRow], ptr %7, i64 0, i64 %79, i32 2
  %81 = load ptr, ptr %80, align 8, !tbaa !17
  %82 = call i32 @nvgTextBreakLines(ptr noundef %0, ptr noundef %81, ptr noundef %5, float noundef %3, ptr noundef nonnull %7, i32 noundef 2)
  %.not = icmp eq i32 %82, 0
  br i1 %.not, label %._crit_edge54, label %.preheader, !llvm.loop !20

._crit_edge54:                                    ; preds = %._crit_edge.split, %._crit_edge.split.us.split.us57, %._crit_edge.split.us.split.us.split.us62.us, %.preheader.us.us.us, %15
  store i32 %.fr65, ptr %10, align 4, !tbaa !5
  br label %83

83:                                               ; preds = %6, %._crit_edge54
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #3
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %7) #3
  ret void
}

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @nvgTextBreakLines(ptr noundef, ptr noundef, ptr noundef, float noundef, ptr noundef, i32 noundef) local_unnamed_addr #1

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #3 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !8, i64 260}
!6 = !{!"NVGstate", !7, i64 0, !11, i64 16, !11, i64 92, !12, i64 168, !12, i64 172, !8, i64 176, !8, i64 180, !12, i64 184, !9, i64 188, !14, i64 212, !12, i64 244, !12, i64 248, !12, i64 252, !12, i64 256, !8, i64 260, !8, i64 264}
!7 = !{!"NVGcompositeOperationState", !8, i64 0, !8, i64 4, !8, i64 8, !8, i64 12}
!8 = !{!"int", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C/C++ TBAA"}
!11 = !{!"NVGpaint", !9, i64 0, !9, i64 24, !12, i64 32, !12, i64 36, !13, i64 40, !13, i64 56, !8, i64 72}
!12 = !{!"float", !9, i64 0}
!13 = !{!"NVGcolor", !9, i64 0}
!14 = !{!"NVGscissor", !9, i64 0, !9, i64 24}
!15 = !{!12, !12, i64 0}
!16 = !{!6, !8, i64 264}
!17 = !{!18, !19, i64 16}
!18 = !{!"NVGtextRow", !19, i64 0, !19, i64 8, !19, i64 16, !12, i64 24, !12, i64 28, !12, i64 32}
!19 = !{!"any pointer", !9, i64 0}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.mustprogress"}
!22 = !{!18, !12, i64 24}
!23 = !{!18, !19, i64 0}
!24 = !{!18, !19, i64 8}
!25 = !{!6, !12, i64 252}
!26 = distinct !{!26, !21}


; Effective O3 passes: BDCEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass