; 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
define dso_local void @nvgFill(ptr noundef %0) #2 {
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca %struct.NVGpaint, align 4
  %6 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #3
  %7 = load ptr, ptr %2, align 8, !tbaa !5
  %8 = call ptr @nvg__getState(ptr noundef %7)
  store ptr %8, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #3
  call void @llvm.lifetime.start.p0(i64 76, ptr %5) #3
  %9 = load ptr, ptr %3, align 8, !tbaa !5
  %10 = getelementptr inbounds %struct.NVGstate, ptr %9, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %5, ptr align 4 %10, i64 76, i1 false), !tbaa.struct !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #3
  %11 = load ptr, ptr %2, align 8, !tbaa !5
  call void @nvg__flattenPaths(ptr noundef %11)
  %12 = load ptr, ptr %2, align 8, !tbaa !5
  %13 = getelementptr inbounds %struct.NVGcontext, ptr %12, i32 0, i32 0
  %14 = getelementptr inbounds %struct.NVGparams, ptr %13, i32 0, i32 1
  %15 = load i32, ptr %14, align 8, !tbaa !15
  %16 = icmp ne i32 %15, 0
  br i1 %16, label %17, label %23

17:                                               ; preds = %1
  %18 = load ptr, ptr %2, align 8, !tbaa !5
  %19 = load ptr, ptr %2, align 8, !tbaa !5
  %20 = getelementptr inbounds %struct.NVGcontext, ptr %19, i32 0, i32 11
  %21 = load float, ptr %20, align 8, !tbaa !18
  %22 = call i32 @nvg__expandFill(ptr noundef %18, float noundef %21, i32 noundef 4, float noundef 0x4003333340000000)
  br label %26

23:                                               ; preds = %1
  %24 = load ptr, ptr %2, align 8, !tbaa !5
  %25 = call i32 @nvg__expandFill(ptr noundef %24, float noundef 0.000000e+00, i32 noundef 4, float noundef 0x4003333340000000)
  br label %26

26:                                               ; preds = %23, %17
  %27 = load ptr, ptr %3, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.NVGstate, ptr %27, i32 0, i32 7
  %29 = load float, ptr %28, align 4, !tbaa !19
  %30 = getelementptr inbounds %struct.NVGpaint, ptr %5, i32 0, i32 4
  %31 = getelementptr inbounds %struct.NVGcolor, ptr %30, i32 0, i32 0
  %32 = getelementptr inbounds %struct.anon, ptr %31, i32 0, i32 3
  %33 = load float, ptr %32, align 4, !tbaa !10
  %34 = fmul float %33, %29
  store float %34, ptr %32, align 4, !tbaa !10
  %35 = load ptr, ptr %3, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.NVGstate, ptr %35, i32 0, i32 7
  %37 = load float, ptr %36, align 4, !tbaa !19
  %38 = getelementptr inbounds %struct.NVGpaint, ptr %5, i32 0, i32 5
  %39 = getelementptr inbounds %struct.NVGcolor, ptr %38, i32 0, i32 0
  %40 = getelementptr inbounds %struct.anon, ptr %39, i32 0, i32 3
  %41 = load float, ptr %40, align 4, !tbaa !10
  %42 = fmul float %41, %37
  store float %42, ptr %40, align 4, !tbaa !10
  %43 = load ptr, ptr %2, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.NVGcontext, ptr %43, i32 0, i32 0
  %45 = getelementptr inbounds %struct.NVGparams, ptr %44, i32 0, i32 10
  %46 = load ptr, ptr %45, align 8, !tbaa !25
  %47 = load ptr, ptr %2, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.NVGcontext, ptr %47, i32 0, i32 0
  %49 = getelementptr inbounds %struct.NVGparams, ptr %48, i32 0, i32 0
  %50 = load ptr, ptr %49, align 8, !tbaa !26
  %51 = load ptr, ptr %3, align 8, !tbaa !5
  %52 = getelementptr inbounds %struct.NVGstate, ptr %51, i32 0, i32 9
  %53 = load ptr, ptr %2, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.NVGcontext, ptr %53, i32 0, i32 11
  %55 = load float, ptr %54, align 8, !tbaa !18
  %56 = load ptr, ptr %2, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.NVGcontext, ptr %56, i32 0, i32 8
  %58 = load ptr, ptr %57, align 8, !tbaa !27
  %59 = getelementptr inbounds %struct.NVGpathCache, ptr %58, i32 0, i32 9
  %60 = getelementptr inbounds [4 x float], ptr %59, i64 0, i64 0
  %61 = load ptr, ptr %2, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.NVGcontext, ptr %61, i32 0, i32 8
  %63 = load ptr, ptr %62, align 8, !tbaa !27
  %64 = getelementptr inbounds %struct.NVGpathCache, ptr %63, i32 0, i32 3
  %65 = load ptr, ptr %64, align 8, !tbaa !28
  %66 = load ptr, ptr %2, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.NVGcontext, ptr %66, i32 0, i32 8
  %68 = load ptr, ptr %67, align 8, !tbaa !27
  %69 = getelementptr inbounds %struct.NVGpathCache, ptr %68, i32 0, i32 4
  %70 = load i32, ptr %69, align 8, !tbaa !30
  call void %46(ptr noundef %50, ptr noundef %5, ptr noundef %52, float noundef %55, ptr noundef %60, ptr noundef %65, i32 noundef %70)
  store i32 0, ptr %6, align 4, !tbaa !13
  br label %71

71:                                               ; preds = %108, %26
  %72 = load i32, ptr %6, align 4, !tbaa !13
  %73 = load ptr, ptr %2, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.NVGcontext, ptr %73, i32 0, i32 8
  %75 = load ptr, ptr %74, align 8, !tbaa !27
  %76 = getelementptr inbounds %struct.NVGpathCache, ptr %75, i32 0, i32 4
  %77 = load i32, ptr %76, align 8, !tbaa !30
  %78 = icmp slt i32 %72, %77
  br i1 %78, label %79, label %111

79:                                               ; preds = %71
  %80 = load ptr, ptr %2, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct.NVGcontext, ptr %80, i32 0, i32 8
  %82 = load ptr, ptr %81, align 8, !tbaa !27
  %83 = getelementptr inbounds %struct.NVGpathCache, ptr %82, i32 0, i32 3
  %84 = load ptr, ptr %83, align 8, !tbaa !28
  %85 = load i32, ptr %6, align 4, !tbaa !13
  %86 = sext i32 %85 to i64
  %87 = getelementptr inbounds %struct.NVGpath, ptr %84, i64 %86
  store ptr %87, ptr %4, align 8, !tbaa !5
  %88 = load ptr, ptr %4, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct.NVGpath, ptr %88, i32 0, i32 5
  %90 = load i32, ptr %89, align 8, !tbaa !31
  %91 = sub nsw i32 %90, 2
  %92 = load ptr, ptr %2, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct.NVGcontext, ptr %92, i32 0, i32 17
  %94 = load i32, ptr %93, align 8, !tbaa !33
  %95 = add nsw i32 %94, %91
  store i32 %95, ptr %93, align 8, !tbaa !33
  %96 = load ptr, ptr %4, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct.NVGpath, ptr %96, i32 0, i32 7
  %98 = load i32, ptr %97, align 8, !tbaa !34
  %99 = sub nsw i32 %98, 2
  %100 = load ptr, ptr %2, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct.NVGcontext, ptr %100, i32 0, i32 17
  %102 = load i32, ptr %101, align 8, !tbaa !33
  %103 = add nsw i32 %102, %99
  store i32 %103, ptr %101, align 8, !tbaa !33
  %104 = load ptr, ptr %2, align 8, !tbaa !5
  %105 = getelementptr inbounds %struct.NVGcontext, ptr %104, i32 0, i32 16
  %106 = load i32, ptr %105, align 4, !tbaa !35
  %107 = add nsw i32 %106, 2
  store i32 %107, ptr %105, align 4, !tbaa !35
  br label %108

108:                                              ; preds = %79
  %109 = load i32, ptr %6, align 4, !tbaa !13
  %110 = add nsw i32 %109, 1
  store i32 %110, ptr %6, align 4, !tbaa !13
  br label %71, !llvm.loop !36

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

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

; Function Attrs: nounwind uwtable
declare hidden i32 @nvg__expandFill(ptr noundef, float 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 = { 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 = !{i64 0, i64 24, !10, i64 24, i64 8, !10, i64 32, i64 4, !11, i64 36, i64 4, !11, i64 40, i64 16, !10, i64 56, i64 16, !10, i64 72, i64 4, !13}
!10 = !{!7, !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"float", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"int", !7, i64 0}
!15 = !{!16, !14, i64 8}
!16 = !{!"NVGcontext", !17, i64 0, !6, i64 112, !14, i64 120, !14, i64 124, !12, i64 128, !12, i64 132, !7, i64 136, !14, i64 8712, !6, i64 8720, !12, i64 8728, !12, i64 8732, !12, i64 8736, !12, i64 8740, !6, i64 8744, !7, i64 8752, !14, i64 8768, !14, i64 8772, !14, i64 8776, !14, i64 8780, !14, i64 8784}
!17 = !{!"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}
!18 = !{!16, !12, i64 8736}
!19 = !{!20, !12, i64 184}
!20 = !{!"NVGstate", !21, i64 0, !22, i64 16, !22, i64 92, !12, i64 168, !12, i64 172, !14, i64 176, !14, i64 180, !12, i64 184, !7, i64 188, !24, i64 212, !12, i64 244, !12, i64 248, !12, i64 252, !12, i64 256, !14, i64 260, !14, i64 264}
!21 = !{!"NVGcompositeOperationState", !14, i64 0, !14, i64 4, !14, i64 8, !14, i64 12}
!22 = !{!"NVGpaint", !7, i64 0, !7, i64 24, !12, i64 32, !12, i64 36, !23, i64 40, !23, i64 56, !14, i64 72}
!23 = !{!"NVGcolor", !7, i64 0}
!24 = !{!"NVGscissor", !7, i64 0, !7, i64 24}
!25 = !{!16, !6, i64 80}
!26 = !{!16, !6, i64 0}
!27 = !{!16, !6, i64 8720}
!28 = !{!29, !6, i64 16}
!29 = !{!"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}
!30 = !{!29, !14, i64 24}
!31 = !{!32, !14, i64 24}
!32 = !{!"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}
!33 = !{!16, !14, i64 8776}
!34 = !{!32, !14, i64 40}
!35 = !{!16, !14, i64 8772}
!36 = distinct !{!36, !37}
!37 = !{!"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
define dso_local void @nvgFill(ptr noundef %0) local_unnamed_addr #2 {
  %2 = alloca %struct.NVGpaint, align 4
  %3 = tail call ptr @nvg__getState(ptr noundef %0)
  call void @llvm.lifetime.start.p0(i64 76, ptr nonnull %2) #4
  %4 = getelementptr inbounds i8, ptr %3, i64 16
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(76) %2, ptr noundef nonnull align 4 dereferenceable(76) %4, i64 76, i1 false), !tbaa.struct !5
  tail call void @nvg__flattenPaths(ptr noundef %0)
  %5 = getelementptr inbounds i8, ptr %0, i64 8
  %6 = load i32, ptr %5, align 8, !tbaa !13
  %.not = icmp eq i32 %6, 0
  br i1 %.not, label %10, label %7

7:                                                ; preds = %1
  %8 = getelementptr inbounds i8, ptr %0, i64 8736
  %9 = load float, ptr %8, align 8, !tbaa !17
  br label %10

10:                                               ; preds = %1, %7
  %.sink = phi float [ %9, %7 ], [ 0.000000e+00, %1 ]
  %11 = tail call i32 @nvg__expandFill(ptr noundef nonnull %0, float noundef %.sink, i32 noundef 4, float noundef 0x4003333340000000)
  %12 = getelementptr inbounds i8, ptr %3, i64 184
  %13 = load float, ptr %12, align 4, !tbaa !18
  %14 = getelementptr inbounds i8, ptr %2, i64 52
  %15 = load float, ptr %14, align 4, !tbaa !6
  %16 = fmul float %13, %15
  store float %16, ptr %14, align 4, !tbaa !6
  %17 = getelementptr inbounds i8, ptr %2, i64 68
  %18 = load float, ptr %17, align 4, !tbaa !6
  %19 = fmul float %13, %18
  store float %19, ptr %17, align 4, !tbaa !6
  %20 = getelementptr inbounds i8, ptr %0, i64 80
  %21 = load ptr, ptr %20, align 8, !tbaa !24
  %22 = load ptr, ptr %0, align 8, !tbaa !25
  %23 = getelementptr inbounds i8, ptr %3, i64 212
  %24 = getelementptr inbounds i8, ptr %0, i64 8736
  %25 = load float, ptr %24, align 8, !tbaa !17
  %26 = getelementptr inbounds i8, ptr %0, i64 8720
  %27 = load ptr, ptr %26, align 8, !tbaa !26
  %28 = getelementptr inbounds i8, ptr %27, i64 48
  %29 = getelementptr inbounds i8, ptr %27, i64 16
  %30 = load ptr, ptr %29, align 8, !tbaa !27
  %31 = getelementptr inbounds i8, ptr %27, i64 24
  %32 = load i32, ptr %31, align 8, !tbaa !29
  call void %21(ptr noundef %22, ptr noundef nonnull %2, ptr noundef nonnull %23, float noundef %25, ptr noundef nonnull %28, ptr noundef %30, i32 noundef %32) #4
  %33 = load ptr, ptr %26, align 8, !tbaa !26
  %34 = getelementptr inbounds i8, ptr %33, i64 24
  %35 = load i32, ptr %34, align 8, !tbaa !29
  %36 = icmp sgt i32 %35, 0
  br i1 %36, label %.lr.ph, label %123

.lr.ph:                                           ; preds = %10
  %37 = getelementptr inbounds i8, ptr %33, i64 16
  %38 = load ptr, ptr %37, align 8, !tbaa !27
  %39 = getelementptr inbounds i8, ptr %0, i64 8776
  %40 = getelementptr inbounds i8, ptr %0, i64 8772
  %.promoted = load i32, ptr %39, align 8, !tbaa !30
  %.promoted26 = load i32, ptr %40, align 4, !tbaa !31
  %41 = shl nuw i32 %35, 1
  %wide.trip.count = zext nneg i32 %35 to i64
  %min.iters.check = icmp ult i32 %35, 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
  %42 = 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> [ %42, %vector.ph ], [ %112, %vector.body ]
  %vec.phi30 = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %113, %vector.body ]
  %43 = or disjoint i64 %index, 1
  %44 = or disjoint i64 %index, 2
  %45 = or disjoint i64 %index, 3
  %46 = or disjoint i64 %index, 4
  %47 = or disjoint i64 %index, 5
  %48 = or disjoint i64 %index, 6
  %49 = or disjoint i64 %index, 7
  %50 = getelementptr inbounds %struct.NVGpath, ptr %38, i64 %index
  %51 = getelementptr inbounds %struct.NVGpath, ptr %38, i64 %43
  %52 = getelementptr inbounds %struct.NVGpath, ptr %38, i64 %44
  %53 = getelementptr inbounds %struct.NVGpath, ptr %38, i64 %45
  %54 = getelementptr inbounds %struct.NVGpath, ptr %38, i64 %46
  %55 = getelementptr inbounds %struct.NVGpath, ptr %38, i64 %47
  %56 = getelementptr inbounds %struct.NVGpath, ptr %38, i64 %48
  %57 = getelementptr inbounds %struct.NVGpath, ptr %38, i64 %49
  %58 = getelementptr inbounds i8, ptr %50, i64 24
  %59 = getelementptr inbounds i8, ptr %51, i64 24
  %60 = getelementptr inbounds i8, ptr %52, i64 24
  %61 = getelementptr inbounds i8, ptr %53, i64 24
  %62 = getelementptr inbounds i8, ptr %54, i64 24
  %63 = getelementptr inbounds i8, ptr %55, i64 24
  %64 = getelementptr inbounds i8, ptr %56, i64 24
  %65 = getelementptr inbounds i8, ptr %57, i64 24
  %66 = load i32, ptr %58, align 8, !tbaa !32
  %67 = load i32, ptr %59, align 8, !tbaa !32
  %68 = load i32, ptr %60, align 8, !tbaa !32
  %69 = load i32, ptr %61, align 8, !tbaa !32
  %70 = insertelement <4 x i32> poison, i32 %66, i64 0
  %71 = insertelement <4 x i32> %70, i32 %67, i64 1
  %72 = insertelement <4 x i32> %71, i32 %68, i64 2
  %73 = insertelement <4 x i32> %72, i32 %69, i64 3
  %74 = load i32, ptr %62, align 8, !tbaa !32
  %75 = load i32, ptr %63, align 8, !tbaa !32
  %76 = load i32, ptr %64, align 8, !tbaa !32
  %77 = load i32, ptr %65, align 8, !tbaa !32
  %78 = insertelement <4 x i32> poison, i32 %74, i64 0
  %79 = insertelement <4 x i32> %78, i32 %75, i64 1
  %80 = insertelement <4 x i32> %79, i32 %76, i64 2
  %81 = insertelement <4 x i32> %80, i32 %77, i64 3
  %82 = add nsw <4 x i32> %73, <i32 -2, i32 -2, i32 -2, i32 -2>
  %83 = add nsw <4 x i32> %81, <i32 -2, i32 -2, i32 -2, i32 -2>
  %84 = add <4 x i32> %82, %vec.phi
  %85 = add <4 x i32> %83, %vec.phi30
  %86 = getelementptr inbounds i8, ptr %50, i64 40
  %87 = getelementptr inbounds i8, ptr %51, i64 40
  %88 = getelementptr inbounds i8, ptr %52, i64 40
  %89 = getelementptr inbounds i8, ptr %53, i64 40
  %90 = getelementptr inbounds i8, ptr %54, i64 40
  %91 = getelementptr inbounds i8, ptr %55, i64 40
  %92 = getelementptr inbounds i8, ptr %56, i64 40
  %93 = getelementptr inbounds i8, ptr %57, i64 40
  %94 = load i32, ptr %86, align 8, !tbaa !34
  %95 = load i32, ptr %87, align 8, !tbaa !34
  %96 = load i32, ptr %88, align 8, !tbaa !34
  %97 = load i32, ptr %89, align 8, !tbaa !34
  %98 = insertelement <4 x i32> poison, i32 %94, i64 0
  %99 = insertelement <4 x i32> %98, i32 %95, i64 1
  %100 = insertelement <4 x i32> %99, i32 %96, i64 2
  %101 = insertelement <4 x i32> %100, i32 %97, i64 3
  %102 = load i32, ptr %90, align 8, !tbaa !34
  %103 = load i32, ptr %91, align 8, !tbaa !34
  %104 = load i32, ptr %92, align 8, !tbaa !34
  %105 = load i32, ptr %93, align 8, !tbaa !34
  %106 = insertelement <4 x i32> poison, i32 %102, i64 0
  %107 = insertelement <4 x i32> %106, i32 %103, i64 1
  %108 = insertelement <4 x i32> %107, i32 %104, i64 2
  %109 = insertelement <4 x i32> %108, i32 %105, i64 3
  %110 = add <4 x i32> %84, <i32 -2, i32 -2, i32 -2, i32 -2>
  %111 = add <4 x i32> %85, <i32 -2, i32 -2, i32 -2, i32 -2>
  %112 = add <4 x i32> %110, %101
  %113 = add <4 x i32> %111, %109
  %index.next = add nuw i64 %index, 8
  %114 = icmp eq i64 %index.next, %n.vec
  br i1 %114, label %middle.block, label %vector.body, !llvm.loop !35

middle.block:                                     ; preds = %vector.body
  %bin.rdx = add <4 x i32> %113, %112
  %115 = 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 ], [ %115, %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 ]
  %116 = phi i32 [ %op.rdx32, %scalar.ph ], [ %.ph, %scalar.ph.preheader ]
  %117 = getelementptr inbounds %struct.NVGpath, ptr %38, i64 %indvars.iv
  %118 = getelementptr inbounds i8, ptr %117, i64 24
  %119 = load i32, ptr %118, align 8, !tbaa !32
  %120 = getelementptr inbounds i8, ptr %117, i64 40
  %121 = load i32, ptr %120, align 8, !tbaa !34
  %op.rdx = add i32 %119, -4
  %op.rdx31 = add i32 %121, %116
  %op.rdx32 = add i32 %op.rdx, %op.rdx31
  %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 !39

._crit_edge:                                      ; preds = %scalar.ph, %middle.block
  %.lcssa = phi i32 [ %115, %middle.block ], [ %op.rdx32, %scalar.ph ]
  %122 = add i32 %.promoted26, %41
  store i32 %.lcssa, ptr %39, align 8, !tbaa !30
  store i32 %122, ptr %40, align 4, !tbaa !31
  br label %123

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

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

; Function Attrs: nounwind uwtable
declare hidden i32 @nvg__expandFill(ptr noundef, float 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>) #3

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 = { 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 = !{i64 0, i64 24, !6, i64 24, i64 8, !6, i64 32, i64 4, !9, i64 36, i64 4, !9, i64 40, i64 16, !6, i64 56, i64 16, !6, i64 72, i64 4, !11}
!6 = !{!7, !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 8}
!14 = !{!"NVGcontext", !15, i64 0, !16, i64 112, !12, i64 120, !12, i64 124, !10, i64 128, !10, i64 132, !7, i64 136, !12, i64 8712, !16, i64 8720, !10, i64 8728, !10, i64 8732, !10, i64 8736, !10, i64 8740, !16, i64 8744, !7, i64 8752, !12, i64 8768, !12, i64 8772, !12, i64 8776, !12, i64 8780, !12, i64 8784}
!15 = !{!"NVGparams", !16, i64 0, !12, i64 8, !16, i64 16, !16, i64 24, !16, i64 32, !16, i64 40, !16, i64 48, !16, i64 56, !16, i64 64, !16, i64 72, !16, i64 80, !16, i64 88, !16, i64 96, !16, i64 104}
!16 = !{!"any pointer", !7, i64 0}
!17 = !{!14, !10, i64 8736}
!18 = !{!19, !10, i64 184}
!19 = !{!"NVGstate", !20, i64 0, !21, i64 16, !21, i64 92, !10, i64 168, !10, i64 172, !12, i64 176, !12, i64 180, !10, i64 184, !7, i64 188, !23, i64 212, !10, i64 244, !10, i64 248, !10, i64 252, !10, i64 256, !12, i64 260, !12, i64 264}
!20 = !{!"NVGcompositeOperationState", !12, i64 0, !12, i64 4, !12, i64 8, !12, i64 12}
!21 = !{!"NVGpaint", !7, i64 0, !7, i64 24, !10, i64 32, !10, i64 36, !22, i64 40, !22, i64 56, !12, i64 72}
!22 = !{!"NVGcolor", !7, i64 0}
!23 = !{!"NVGscissor", !7, i64 0, !7, i64 24}
!24 = !{!14, !16, i64 80}
!25 = !{!14, !16, i64 0}
!26 = !{!14, !16, i64 8720}
!27 = !{!28, !16, i64 16}
!28 = !{!"NVGpathCache", !16, i64 0, !12, i64 8, !12, i64 12, !16, i64 16, !12, i64 24, !12, i64 28, !16, i64 32, !12, i64 40, !12, i64 44, !7, i64 48}
!29 = !{!28, !12, i64 24}
!30 = !{!14, !12, i64 8776}
!31 = !{!14, !12, i64 8772}
!32 = !{!33, !12, i64 24}
!33 = !{!"NVGpath", !12, i64 0, !12, i64 4, !7, i64 8, !12, i64 12, !16, i64 16, !12, i64 24, !16, i64 32, !12, i64 40, !12, i64 44, !12, i64 48}
!34 = !{!33, !12, i64 40}
!35 = distinct !{!35, !36, !37, !38}
!36 = !{!"llvm.loop.mustprogress"}
!37 = !{!"llvm.loop.isvectorized", i32 1}
!38 = !{!"llvm.loop.unroll.runtime.disable"}
!39 = distinct !{!39, !36, !38, !37}


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