; 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.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.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.NVGscissor = type { [6 x float], [2 x float] }
%struct.NVGcontext = type { %struct.NVGparams, ptr, i32, i32, float, float, [32 x %struct.NVGstate], i32, ptr, float, float, float, float, ptr, [4 x i32], i32, i32, i32, i32, i32 }
%struct.NVGparams = type { ptr, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.anon = type { float, float, float, float }
%struct.NVGpathCache = type { ptr, i32, i32, ptr, i32, i32, ptr, i32, i32, [4 x float] }
%struct.NVGpath = type { i32, i32, i8, i32, ptr, i32, ptr, i32, i32, i32 }

; 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 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: 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) #2

; Function Attrs: nounwind uwtable
declare hidden float @nvg__clampf(float noundef, float noundef, float noundef) #2

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

; Function Attrs: nounwind uwtable
declare hidden void @nvg__flattenPaths(ptr noundef) #2

; Function Attrs: nounwind uwtable
define dso_local void @nvgStroke(ptr noundef %0) #2 {
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca float, align 4
  %5 = alloca float, align 4
  %6 = alloca %struct.NVGpaint, align 4
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca float, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #4
  %10 = load ptr, ptr %2, align 8, !tbaa !5
  %11 = call ptr @nvg__getState(ptr noundef %10)
  store ptr %11, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #4
  %12 = load ptr, ptr %3, align 8, !tbaa !5
  %13 = getelementptr inbounds %struct.NVGstate, ptr %12, i32 0, i32 8
  %14 = getelementptr inbounds [6 x float], ptr %13, i64 0, i64 0
  %15 = call float @nvg__getAverageScale(ptr noundef %14)
  store float %15, ptr %4, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #4
  %16 = load ptr, ptr %3, align 8, !tbaa !5
  %17 = getelementptr inbounds %struct.NVGstate, ptr %16, i32 0, i32 3
  %18 = load float, ptr %17, align 4, !tbaa !11
  %19 = load float, ptr %4, align 4, !tbaa !9
  %20 = fmul float %18, %19
  %21 = call float @nvg__clampf(float noundef %20, float noundef 0.000000e+00, float noundef 2.000000e+02)
  store float %21, ptr %5, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 76, ptr %6) #4
  %22 = load ptr, ptr %3, align 8, !tbaa !5
  %23 = getelementptr inbounds %struct.NVGstate, ptr %22, i32 0, i32 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %6, ptr align 4 %23, i64 76, i1 false), !tbaa.struct !18
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  %24 = load float, ptr %5, align 4, !tbaa !9
  %25 = load ptr, ptr %2, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct.NVGcontext, ptr %25, i32 0, i32 11
  %27 = load float, ptr %26, align 8, !tbaa !21
  %28 = fcmp olt float %24, %27
  br i1 %28, label %29, label %55

29:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  %30 = load float, ptr %5, align 4, !tbaa !9
  %31 = load ptr, ptr %2, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct.NVGcontext, ptr %31, i32 0, i32 11
  %33 = load float, ptr %32, align 8, !tbaa !21
  %34 = fdiv float %30, %33
  %35 = call float @nvg__clampf(float noundef %34, float noundef 0.000000e+00, float noundef 1.000000e+00)
  store float %35, ptr %9, align 4, !tbaa !9
  %36 = load float, ptr %9, align 4, !tbaa !9
  %37 = load float, ptr %9, align 4, !tbaa !9
  %38 = fmul float %36, %37
  %39 = getelementptr inbounds %struct.NVGpaint, ptr %6, i32 0, i32 4
  %40 = getelementptr inbounds %struct.NVGcolor, ptr %39, i32 0, i32 0
  %41 = getelementptr inbounds %struct.anon, ptr %40, i32 0, i32 3
  %42 = load float, ptr %41, align 4, !tbaa !19
  %43 = fmul float %42, %38
  store float %43, ptr %41, align 4, !tbaa !19
  %44 = load float, ptr %9, align 4, !tbaa !9
  %45 = load float, ptr %9, align 4, !tbaa !9
  %46 = fmul float %44, %45
  %47 = getelementptr inbounds %struct.NVGpaint, ptr %6, i32 0, i32 5
  %48 = getelementptr inbounds %struct.NVGcolor, ptr %47, i32 0, i32 0
  %49 = getelementptr inbounds %struct.anon, ptr %48, i32 0, i32 3
  %50 = load float, ptr %49, align 4, !tbaa !19
  %51 = fmul float %50, %46
  store float %51, ptr %49, align 4, !tbaa !19
  %52 = load ptr, ptr %2, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.NVGcontext, ptr %52, i32 0, i32 11
  %54 = load float, ptr %53, align 8, !tbaa !21
  store float %54, ptr %5, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  br label %55

55:                                               ; preds = %29, %1
  %56 = load ptr, ptr %3, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.NVGstate, ptr %56, i32 0, i32 7
  %58 = load float, ptr %57, align 4, !tbaa !24
  %59 = getelementptr inbounds %struct.NVGpaint, ptr %6, i32 0, i32 4
  %60 = getelementptr inbounds %struct.NVGcolor, ptr %59, i32 0, i32 0
  %61 = getelementptr inbounds %struct.anon, ptr %60, i32 0, i32 3
  %62 = load float, ptr %61, align 4, !tbaa !19
  %63 = fmul float %62, %58
  store float %63, ptr %61, align 4, !tbaa !19
  %64 = load ptr, ptr %3, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct.NVGstate, ptr %64, i32 0, i32 7
  %66 = load float, ptr %65, align 4, !tbaa !24
  %67 = getelementptr inbounds %struct.NVGpaint, ptr %6, i32 0, i32 5
  %68 = getelementptr inbounds %struct.NVGcolor, ptr %67, i32 0, i32 0
  %69 = getelementptr inbounds %struct.anon, ptr %68, i32 0, i32 3
  %70 = load float, ptr %69, align 4, !tbaa !19
  %71 = fmul float %70, %66
  store float %71, ptr %69, align 4, !tbaa !19
  %72 = load ptr, ptr %2, align 8, !tbaa !5
  call void @nvg__flattenPaths(ptr noundef %72)
  %73 = load ptr, ptr %2, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.NVGcontext, ptr %73, i32 0, i32 0
  %75 = getelementptr inbounds %struct.NVGparams, ptr %74, i32 0, i32 1
  %76 = load i32, ptr %75, align 8, !tbaa !25
  %77 = icmp ne i32 %76, 0
  br i1 %77, label %78, label %96

78:                                               ; preds = %55
  %79 = load ptr, ptr %2, align 8, !tbaa !5
  %80 = load float, ptr %5, align 4, !tbaa !9
  %81 = load ptr, ptr %2, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct.NVGcontext, ptr %81, i32 0, i32 11
  %83 = load float, ptr %82, align 8, !tbaa !21
  %84 = fmul float %83, 5.000000e-01
  %85 = call float @llvm.fmuladd.f32(float %80, float 5.000000e-01, float %84)
  %86 = load ptr, ptr %3, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct.NVGstate, ptr %86, i32 0, i32 6
  %88 = load i32, ptr %87, align 4, !tbaa !26
  %89 = load ptr, ptr %3, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct.NVGstate, ptr %89, i32 0, i32 5
  %91 = load i32, ptr %90, align 4, !tbaa !27
  %92 = load ptr, ptr %3, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct.NVGstate, ptr %92, i32 0, i32 4
  %94 = load float, ptr %93, align 4, !tbaa !28
  %95 = call i32 @nvg__expandStroke(ptr noundef %79, float noundef %85, i32 noundef %88, i32 noundef %91, float noundef %94)
  br label %110

96:                                               ; preds = %55
  %97 = load ptr, ptr %2, align 8, !tbaa !5
  %98 = load float, ptr %5, align 4, !tbaa !9
  %99 = fmul float %98, 5.000000e-01
  %100 = load ptr, ptr %3, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct.NVGstate, ptr %100, i32 0, i32 6
  %102 = load i32, ptr %101, align 4, !tbaa !26
  %103 = load ptr, ptr %3, align 8, !tbaa !5
  %104 = getelementptr inbounds %struct.NVGstate, ptr %103, i32 0, i32 5
  %105 = load i32, ptr %104, align 4, !tbaa !27
  %106 = load ptr, ptr %3, align 8, !tbaa !5
  %107 = getelementptr inbounds %struct.NVGstate, ptr %106, i32 0, i32 4
  %108 = load float, ptr %107, align 4, !tbaa !28
  %109 = call i32 @nvg__expandStroke(ptr noundef %97, float noundef %99, i32 noundef %102, i32 noundef %105, float noundef %108)
  br label %110

110:                                              ; preds = %96, %78
  %111 = load ptr, ptr %2, align 8, !tbaa !5
  %112 = getelementptr inbounds %struct.NVGcontext, ptr %111, i32 0, i32 0
  %113 = getelementptr inbounds %struct.NVGparams, ptr %112, i32 0, i32 11
  %114 = load ptr, ptr %113, align 8, !tbaa !29
  %115 = load ptr, ptr %2, align 8, !tbaa !5
  %116 = getelementptr inbounds %struct.NVGcontext, ptr %115, i32 0, i32 0
  %117 = getelementptr inbounds %struct.NVGparams, ptr %116, i32 0, i32 0
  %118 = load ptr, ptr %117, align 8, !tbaa !30
  %119 = load ptr, ptr %3, align 8, !tbaa !5
  %120 = getelementptr inbounds %struct.NVGstate, ptr %119, i32 0, i32 9
  %121 = load ptr, ptr %2, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct.NVGcontext, ptr %121, i32 0, i32 11
  %123 = load float, ptr %122, align 8, !tbaa !21
  %124 = load float, ptr %5, align 4, !tbaa !9
  %125 = load ptr, ptr %2, align 8, !tbaa !5
  %126 = getelementptr inbounds %struct.NVGcontext, ptr %125, i32 0, i32 8
  %127 = load ptr, ptr %126, align 8, !tbaa !31
  %128 = getelementptr inbounds %struct.NVGpathCache, ptr %127, i32 0, i32 3
  %129 = load ptr, ptr %128, align 8, !tbaa !32
  %130 = load ptr, ptr %2, align 8, !tbaa !5
  %131 = getelementptr inbounds %struct.NVGcontext, ptr %130, i32 0, i32 8
  %132 = load ptr, ptr %131, align 8, !tbaa !31
  %133 = getelementptr inbounds %struct.NVGpathCache, ptr %132, i32 0, i32 4
  %134 = load i32, ptr %133, align 8, !tbaa !34
  call void %114(ptr noundef %118, ptr noundef %6, ptr noundef %120, float noundef %123, float noundef %124, ptr noundef %129, i32 noundef %134)
  store i32 0, ptr %8, align 4, !tbaa !20
  br label %135

135:                                              ; preds = %164, %110
  %136 = load i32, ptr %8, align 4, !tbaa !20
  %137 = load ptr, ptr %2, align 8, !tbaa !5
  %138 = getelementptr inbounds %struct.NVGcontext, ptr %137, i32 0, i32 8
  %139 = load ptr, ptr %138, align 8, !tbaa !31
  %140 = getelementptr inbounds %struct.NVGpathCache, ptr %139, i32 0, i32 4
  %141 = load i32, ptr %140, align 8, !tbaa !34
  %142 = icmp slt i32 %136, %141
  br i1 %142, label %143, label %167

143:                                              ; preds = %135
  %144 = load ptr, ptr %2, align 8, !tbaa !5
  %145 = getelementptr inbounds %struct.NVGcontext, ptr %144, i32 0, i32 8
  %146 = load ptr, ptr %145, align 8, !tbaa !31
  %147 = getelementptr inbounds %struct.NVGpathCache, ptr %146, i32 0, i32 3
  %148 = load ptr, ptr %147, align 8, !tbaa !32
  %149 = load i32, ptr %8, align 4, !tbaa !20
  %150 = sext i32 %149 to i64
  %151 = getelementptr inbounds %struct.NVGpath, ptr %148, i64 %150
  store ptr %151, ptr %7, align 8, !tbaa !5
  %152 = load ptr, ptr %7, align 8, !tbaa !5
  %153 = getelementptr inbounds %struct.NVGpath, ptr %152, i32 0, i32 7
  %154 = load i32, ptr %153, align 8, !tbaa !35
  %155 = sub nsw i32 %154, 2
  %156 = load ptr, ptr %2, align 8, !tbaa !5
  %157 = getelementptr inbounds %struct.NVGcontext, ptr %156, i32 0, i32 18
  %158 = load i32, ptr %157, align 4, !tbaa !37
  %159 = add nsw i32 %158, %155
  store i32 %159, ptr %157, align 4, !tbaa !37
  %160 = load ptr, ptr %2, align 8, !tbaa !5
  %161 = getelementptr inbounds %struct.NVGcontext, ptr %160, i32 0, i32 16
  %162 = load i32, ptr %161, align 4, !tbaa !38
  %163 = add nsw i32 %162, 1
  store i32 %163, ptr %161, align 4, !tbaa !38
  br label %164

164:                                              ; preds = %143
  %165 = load i32, ptr %8, align 4, !tbaa !20
  %166 = add nsw i32 %165, 1
  store i32 %166, ptr %8, align 4, !tbaa !20
  br label %135, !llvm.loop !39

167:                                              ; preds = %135
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 76, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #4
  ret void
}

; Function Attrs: nounwind uwtable
declare hidden float @nvg__getAverageScale(ptr noundef) #2

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { 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, !10, i64 168}
!12 = !{!"NVGstate", !13, i64 0, !15, i64 16, !15, i64 92, !10, i64 168, !10, i64 172, !14, i64 176, !14, i64 180, !10, i64 184, !7, i64 188, !17, i64 212, !10, i64 244, !10, i64 248, !10, i64 252, !10, i64 256, !14, i64 260, !14, i64 264}
!13 = !{!"NVGcompositeOperationState", !14, i64 0, !14, i64 4, !14, i64 8, !14, i64 12}
!14 = !{!"int", !7, i64 0}
!15 = !{!"NVGpaint", !7, i64 0, !7, i64 24, !10, i64 32, !10, i64 36, !16, i64 40, !16, i64 56, !14, i64 72}
!16 = !{!"NVGcolor", !7, i64 0}
!17 = !{!"NVGscissor", !7, i64 0, !7, i64 24}
!18 = !{i64 0, i64 24, !19, i64 24, i64 8, !19, i64 32, i64 4, !9, i64 36, i64 4, !9, i64 40, i64 16, !19, i64 56, i64 16, !19, i64 72, i64 4, !20}
!19 = !{!7, !7, i64 0}
!20 = !{!14, !14, i64 0}
!21 = !{!22, !10, i64 8736}
!22 = !{!"NVGcontext", !23, i64 0, !6, i64 112, !14, i64 120, !14, i64 124, !10, i64 128, !10, i64 132, !7, i64 136, !14, i64 8712, !6, i64 8720, !10, i64 8728, !10, i64 8732, !10, i64 8736, !10, i64 8740, !6, i64 8744, !7, i64 8752, !14, i64 8768, !14, i64 8772, !14, i64 8776, !14, i64 8780, !14, i64 8784}
!23 = !{!"NVGparams", !6, i64 0, !14, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104}
!24 = !{!12, !10, i64 184}
!25 = !{!22, !14, i64 8}
!26 = !{!12, !14, i64 180}
!27 = !{!12, !14, i64 176}
!28 = !{!12, !10, i64 172}
!29 = !{!22, !6, i64 88}
!30 = !{!22, !6, i64 0}
!31 = !{!22, !6, i64 8720}
!32 = !{!33, !6, i64 16}
!33 = !{!"NVGpathCache", !6, i64 0, !14, i64 8, !14, i64 12, !6, i64 16, !14, i64 24, !14, i64 28, !6, i64 32, !14, i64 40, !14, i64 44, !7, i64 48}
!34 = !{!33, !14, i64 24}
!35 = !{!36, !14, i64 40}
!36 = !{!"NVGpath", !14, i64 0, !14, i64 4, !7, i64 8, !14, i64 12, !6, i64 16, !14, i64 24, !6, i64 32, !14, i64 40, !14, i64 44, !14, i64 48}
!37 = !{!22, !14, i64 8780}
!38 = !{!22, !14, i64 8772}
!39 = distinct !{!39, !40}
!40 = !{!"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.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.NVGpath = type { i32, i32, i8, i32, ptr, i32, ptr, i32, i32, i32 }

; 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 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: 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 #2

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

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

; Function Attrs: nounwind uwtable
declare hidden void @nvg__flattenPaths(ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
define dso_local void @nvgStroke(ptr noundef %0) local_unnamed_addr #2 {
  %2 = alloca %struct.NVGpaint, align 4
  %3 = tail call ptr @nvg__getState(ptr noundef %0)
  %4 = getelementptr inbounds i8, ptr %3, i64 188
  %5 = tail call float @nvg__getAverageScale(ptr noundef nonnull %4)
  %6 = getelementptr inbounds i8, ptr %3, i64 168
  %7 = load float, ptr %6, align 4, !tbaa !5
  %8 = fmul float %5, %7
  %9 = tail call float @nvg__clampf(float noundef %8, float noundef 0.000000e+00, float noundef 2.000000e+02)
  call void @llvm.lifetime.start.p0(i64 76, ptr nonnull %2) #5
  %10 = getelementptr inbounds i8, ptr %3, i64 92
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(76) %2, ptr noundef nonnull align 4 dereferenceable(76) %10, i64 76, i1 false), !tbaa.struct !15
  %11 = getelementptr inbounds i8, ptr %0, i64 8736
  %12 = load float, ptr %11, align 8, !tbaa !19
  %13 = fcmp olt float %9, %12
  br i1 %13, label %14, label %._crit_edge51

._crit_edge51:                                    ; preds = %1
  %.phi.trans.insert = getelementptr inbounds i8, ptr %2, i64 52
  %.pre = load float, ptr %.phi.trans.insert, align 4, !tbaa !16
  %.phi.trans.insert52 = getelementptr inbounds i8, ptr %2, i64 68
  %.pre53 = load float, ptr %.phi.trans.insert52, align 4, !tbaa !16
  br label %25

14:                                               ; preds = %1
  %15 = fdiv float %9, %12
  %16 = tail call float @nvg__clampf(float noundef %15, float noundef 0.000000e+00, float noundef 1.000000e+00)
  %17 = fmul float %16, %16
  %18 = getelementptr inbounds i8, ptr %2, i64 52
  %19 = load float, ptr %18, align 4, !tbaa !16
  %20 = fmul float %19, %17
  %21 = getelementptr inbounds i8, ptr %2, i64 68
  %22 = load float, ptr %21, align 4, !tbaa !16
  %23 = fmul float %17, %22
  %24 = load float, ptr %11, align 8, !tbaa !19
  br label %25

25:                                               ; preds = %._crit_edge51, %14
  %26 = phi float [ %23, %14 ], [ %.pre53, %._crit_edge51 ]
  %27 = phi float [ %20, %14 ], [ %.pre, %._crit_edge51 ]
  %.0 = phi float [ %24, %14 ], [ %9, %._crit_edge51 ]
  %28 = getelementptr inbounds i8, ptr %3, i64 184
  %29 = load float, ptr %28, align 4, !tbaa !23
  %30 = getelementptr inbounds i8, ptr %2, i64 52
  %31 = fmul float %29, %27
  store float %31, ptr %30, align 4, !tbaa !16
  %32 = getelementptr inbounds i8, ptr %2, i64 68
  %33 = fmul float %29, %26
  store float %33, ptr %32, align 4, !tbaa !16
  tail call void @nvg__flattenPaths(ptr noundef nonnull %0)
  %34 = getelementptr inbounds i8, ptr %0, i64 8
  %35 = load i32, ptr %34, align 8, !tbaa !24
  %.not = icmp eq i32 %35, 0
  br i1 %.not, label %40, label %36

36:                                               ; preds = %25
  %37 = load float, ptr %11, align 8, !tbaa !19
  %38 = fmul float %37, 5.000000e-01
  %39 = tail call float @llvm.fmuladd.f32(float %.0, float 5.000000e-01, float %38)
  br label %42

40:                                               ; preds = %25
  %41 = fmul float %.0, 5.000000e-01
  br label %42

42:                                               ; preds = %40, %36
  %.sink = phi float [ %41, %40 ], [ %39, %36 ]
  %43 = getelementptr inbounds i8, ptr %3, i64 180
  %44 = load i32, ptr %43, align 4, !tbaa !25
  %45 = getelementptr inbounds i8, ptr %3, i64 176
  %46 = load i32, ptr %45, align 4, !tbaa !26
  %47 = getelementptr inbounds i8, ptr %3, i64 172
  %48 = load float, ptr %47, align 4, !tbaa !27
  %49 = tail call i32 @nvg__expandStroke(ptr noundef nonnull %0, float noundef %.sink, i32 noundef %44, i32 noundef %46, float noundef %48)
  %50 = getelementptr inbounds i8, ptr %0, i64 88
  %51 = load ptr, ptr %50, align 8, !tbaa !28
  %52 = load ptr, ptr %0, align 8, !tbaa !29
  %53 = getelementptr inbounds i8, ptr %3, i64 212
  %54 = load float, ptr %11, align 8, !tbaa !19
  %55 = getelementptr inbounds i8, ptr %0, i64 8720
  %56 = load ptr, ptr %55, align 8, !tbaa !30
  %57 = getelementptr inbounds i8, ptr %56, i64 16
  %58 = load ptr, ptr %57, align 8, !tbaa !31
  %59 = getelementptr inbounds i8, ptr %56, i64 24
  %60 = load i32, ptr %59, align 8, !tbaa !33
  call void %51(ptr noundef %52, ptr noundef nonnull %2, ptr noundef nonnull %53, float noundef %54, float noundef %.0, ptr noundef %58, i32 noundef %60) #5
  %61 = load ptr, ptr %55, align 8, !tbaa !30
  %62 = getelementptr inbounds i8, ptr %61, i64 24
  %63 = load i32, ptr %62, align 8, !tbaa !33
  %64 = icmp sgt i32 %63, 0
  br i1 %64, label %.lr.ph, label %113

.lr.ph:                                           ; preds = %42
  %65 = getelementptr inbounds i8, ptr %61, i64 16
  %66 = load ptr, ptr %65, align 8, !tbaa !31
  %67 = getelementptr inbounds i8, ptr %0, i64 8780
  %68 = getelementptr inbounds i8, ptr %0, i64 8772
  %.promoted = load i32, ptr %67, align 4, !tbaa !34
  %.promoted47 = load i32, ptr %68, align 4, !tbaa !35
  %wide.trip.count = zext nneg i32 %63 to i64
  %min.iters.check = icmp ult i32 %63, 8
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.ph

vector.ph:                                        ; preds = %.lr.ph
  %n.vec = and i64 %wide.trip.count, 2147483640
  %69 = insertelement <4 x i32> <i32 poison, i32 0, i32 0, i32 0>, i32 %.promoted, i64 0
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %vec.phi = phi <4 x i32> [ %69, %vector.ph ], [ %103, %vector.body ]
  %vec.phi60 = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %104, %vector.body ]
  %70 = or disjoint i64 %index, 1
  %71 = or disjoint i64 %index, 2
  %72 = or disjoint i64 %index, 3
  %73 = or disjoint i64 %index, 4
  %74 = or disjoint i64 %index, 5
  %75 = or disjoint i64 %index, 6
  %76 = or disjoint i64 %index, 7
  %77 = getelementptr inbounds %struct.NVGpath, ptr %66, i64 %index, i32 7
  %78 = getelementptr inbounds %struct.NVGpath, ptr %66, i64 %70, i32 7
  %79 = getelementptr inbounds %struct.NVGpath, ptr %66, i64 %71, i32 7
  %80 = getelementptr inbounds %struct.NVGpath, ptr %66, i64 %72, i32 7
  %81 = getelementptr inbounds %struct.NVGpath, ptr %66, i64 %73, i32 7
  %82 = getelementptr inbounds %struct.NVGpath, ptr %66, i64 %74, i32 7
  %83 = getelementptr inbounds %struct.NVGpath, ptr %66, i64 %75, i32 7
  %84 = getelementptr inbounds %struct.NVGpath, ptr %66, i64 %76, i32 7
  %85 = load i32, ptr %77, align 8, !tbaa !36
  %86 = load i32, ptr %78, align 8, !tbaa !36
  %87 = load i32, ptr %79, align 8, !tbaa !36
  %88 = load i32, ptr %80, align 8, !tbaa !36
  %89 = insertelement <4 x i32> poison, i32 %85, i64 0
  %90 = insertelement <4 x i32> %89, i32 %86, i64 1
  %91 = insertelement <4 x i32> %90, i32 %87, i64 2
  %92 = insertelement <4 x i32> %91, i32 %88, i64 3
  %93 = load i32, ptr %81, align 8, !tbaa !36
  %94 = load i32, ptr %82, align 8, !tbaa !36
  %95 = load i32, ptr %83, align 8, !tbaa !36
  %96 = load i32, ptr %84, align 8, !tbaa !36
  %97 = insertelement <4 x i32> poison, i32 %93, i64 0
  %98 = insertelement <4 x i32> %97, i32 %94, i64 1
  %99 = insertelement <4 x i32> %98, i32 %95, i64 2
  %100 = insertelement <4 x i32> %99, i32 %96, i64 3
  %101 = add nsw <4 x i32> %92, <i32 -2, i32 -2, i32 -2, i32 -2>
  %102 = add nsw <4 x i32> %100, <i32 -2, i32 -2, i32 -2, i32 -2>
  %103 = add <4 x i32> %101, %vec.phi
  %104 = add <4 x i32> %102, %vec.phi60
  %index.next = add nuw i64 %index, 8
  %105 = icmp eq i64 %index.next, %n.vec
  br i1 %105, label %middle.block, label %vector.body, !llvm.loop !38

middle.block:                                     ; preds = %vector.body
  %bin.rdx = add <4 x i32> %104, %103
  %106 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx)
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count
  br i1 %cmp.n, label %._crit_edge, label %scalar.ph.preheader

scalar.ph.preheader:                              ; preds = %middle.block, %.lr.ph
  %indvars.iv.ph = phi i64 [ 0, %.lr.ph ], [ %n.vec, %middle.block ]
  %.ph = phi i32 [ %.promoted, %.lr.ph ], [ %106, %middle.block ]
  br label %scalar.ph

scalar.ph:                                        ; preds = %scalar.ph.preheader, %scalar.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %scalar.ph ], [ %indvars.iv.ph, %scalar.ph.preheader ]
  %107 = phi i32 [ %111, %scalar.ph ], [ %.ph, %scalar.ph.preheader ]
  %108 = getelementptr inbounds %struct.NVGpath, ptr %66, i64 %indvars.iv, i32 7
  %109 = load i32, ptr %108, align 8, !tbaa !36
  %110 = add nsw i32 %109, -2
  %111 = add nsw i32 %110, %107
  %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, label %scalar.ph, !llvm.loop !42

._crit_edge:                                      ; preds = %scalar.ph, %middle.block
  %.lcssa = phi i32 [ %106, %middle.block ], [ %111, %scalar.ph ]
  %112 = add i32 %63, %.promoted47
  store i32 %.lcssa, ptr %67, align 4, !tbaa !34
  store i32 %112, ptr %68, align 4, !tbaa !35
  br label %113

113:                                              ; preds = %._crit_edge, %42
  call void @llvm.lifetime.end.p0(i64 76, ptr nonnull %2) #5
  ret void
}

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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.vector.reduce.add.v4i32(<4 x i32>) #4

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 168}
!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 = !{i64 0, i64 24, !16, i64 24, i64 8, !16, i64 32, i64 4, !17, i64 36, i64 4, !17, i64 40, i64 16, !16, i64 56, i64 16, !16, i64 72, i64 4, !18}
!16 = !{!9, !9, i64 0}
!17 = !{!12, !12, i64 0}
!18 = !{!8, !8, i64 0}
!19 = !{!20, !12, i64 8736}
!20 = !{!"NVGcontext", !21, i64 0, !22, i64 112, !8, i64 120, !8, i64 124, !12, i64 128, !12, i64 132, !9, i64 136, !8, i64 8712, !22, i64 8720, !12, i64 8728, !12, i64 8732, !12, i64 8736, !12, i64 8740, !22, i64 8744, !9, i64 8752, !8, i64 8768, !8, i64 8772, !8, i64 8776, !8, i64 8780, !8, i64 8784}
!21 = !{!"NVGparams", !22, i64 0, !8, i64 8, !22, i64 16, !22, i64 24, !22, i64 32, !22, i64 40, !22, i64 48, !22, i64 56, !22, i64 64, !22, i64 72, !22, i64 80, !22, i64 88, !22, i64 96, !22, i64 104}
!22 = !{!"any pointer", !9, i64 0}
!23 = !{!6, !12, i64 184}
!24 = !{!20, !8, i64 8}
!25 = !{!6, !8, i64 180}
!26 = !{!6, !8, i64 176}
!27 = !{!6, !12, i64 172}
!28 = !{!20, !22, i64 88}
!29 = !{!20, !22, i64 0}
!30 = !{!20, !22, i64 8720}
!31 = !{!32, !22, i64 16}
!32 = !{!"NVGpathCache", !22, i64 0, !8, i64 8, !8, i64 12, !22, i64 16, !8, i64 24, !8, i64 28, !22, i64 32, !8, i64 40, !8, i64 44, !9, i64 48}
!33 = !{!32, !8, i64 24}
!34 = !{!20, !8, i64 8780}
!35 = !{!20, !8, i64 8772}
!36 = !{!37, !8, i64 40}
!37 = !{!"NVGpath", !8, i64 0, !8, i64 4, !9, i64 8, !8, i64 12, !22, i64 16, !8, i64 24, !22, i64 32, !8, i64 40, !8, i64 44, !8, i64 48}
!38 = distinct !{!38, !39, !40, !41}
!39 = !{!"llvm.loop.mustprogress"}
!40 = !{!"llvm.loop.isvectorized", i32 1}
!41 = !{!"llvm.loop.unroll.runtime.disable"}
!42 = distinct !{!42, !39, !41, !40}


; Effective O3 passes: CorrelatedValuePropagationPass,DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,LCSSAPass,LICMPass,LoopLoadEliminationPass,LoopRotatePass,LoopUnrollPass,LoopVectorizePass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass