; 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"

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local void @nvgEllipse(ptr noundef %0, float noundef %1, float noundef %2, float noundef %3, float noundef %4) #2 {
  %6 = alloca ptr, align 8
  %7 = alloca float, align 4
  %8 = alloca float, align 4
  %9 = alloca float, align 4
  %10 = alloca float, align 4
  %11 = alloca [32 x float], align 16
  store ptr %0, ptr %6, align 8, !tbaa !5
  store float %1, ptr %7, align 4, !tbaa !9
  store float %2, ptr %8, align 4, !tbaa !9
  store float %3, ptr %9, align 4, !tbaa !9
  store float %4, ptr %10, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 128, ptr %11) #3
  store float 0.000000e+00, ptr %11, align 4, !tbaa !9
  %12 = getelementptr inbounds float, ptr %11, i64 1
  %13 = load float, ptr %7, align 4, !tbaa !9
  %14 = load float, ptr %9, align 4, !tbaa !9
  %15 = fsub float %13, %14
  store float %15, ptr %12, align 4, !tbaa !9
  %16 = getelementptr inbounds float, ptr %11, i64 2
  %17 = load float, ptr %8, align 4, !tbaa !9
  store float %17, ptr %16, align 4, !tbaa !9
  %18 = getelementptr inbounds float, ptr %11, i64 3
  store float 2.000000e+00, ptr %18, align 4, !tbaa !9
  %19 = getelementptr inbounds float, ptr %11, i64 4
  %20 = load float, ptr %7, align 4, !tbaa !9
  %21 = load float, ptr %9, align 4, !tbaa !9
  %22 = fsub float %20, %21
  store float %22, ptr %19, align 4, !tbaa !9
  %23 = getelementptr inbounds float, ptr %11, i64 5
  %24 = load float, ptr %8, align 4, !tbaa !9
  %25 = load float, ptr %10, align 4, !tbaa !9
  %26 = call float @llvm.fmuladd.f32(float %25, float 0x3FE1AC5120000000, float %24)
  store float %26, ptr %23, align 4, !tbaa !9
  %27 = getelementptr inbounds float, ptr %11, i64 6
  %28 = load float, ptr %7, align 4, !tbaa !9
  %29 = load float, ptr %9, align 4, !tbaa !9
  %30 = fneg float %29
  %31 = call float @llvm.fmuladd.f32(float %30, float 0x3FE1AC5120000000, float %28)
  store float %31, ptr %27, align 4, !tbaa !9
  %32 = getelementptr inbounds float, ptr %11, i64 7
  %33 = load float, ptr %8, align 4, !tbaa !9
  %34 = load float, ptr %10, align 4, !tbaa !9
  %35 = fadd float %33, %34
  store float %35, ptr %32, align 4, !tbaa !9
  %36 = getelementptr inbounds float, ptr %11, i64 8
  %37 = load float, ptr %7, align 4, !tbaa !9
  store float %37, ptr %36, align 4, !tbaa !9
  %38 = getelementptr inbounds float, ptr %11, i64 9
  %39 = load float, ptr %8, align 4, !tbaa !9
  %40 = load float, ptr %10, align 4, !tbaa !9
  %41 = fadd float %39, %40
  store float %41, ptr %38, align 4, !tbaa !9
  %42 = getelementptr inbounds float, ptr %11, i64 10
  store float 2.000000e+00, ptr %42, align 4, !tbaa !9
  %43 = getelementptr inbounds float, ptr %11, i64 11
  %44 = load float, ptr %7, align 4, !tbaa !9
  %45 = load float, ptr %9, align 4, !tbaa !9
  %46 = call float @llvm.fmuladd.f32(float %45, float 0x3FE1AC5120000000, float %44)
  store float %46, ptr %43, align 4, !tbaa !9
  %47 = getelementptr inbounds float, ptr %11, i64 12
  %48 = load float, ptr %8, align 4, !tbaa !9
  %49 = load float, ptr %10, align 4, !tbaa !9
  %50 = fadd float %48, %49
  store float %50, ptr %47, align 4, !tbaa !9
  %51 = getelementptr inbounds float, ptr %11, i64 13
  %52 = load float, ptr %7, align 4, !tbaa !9
  %53 = load float, ptr %9, align 4, !tbaa !9
  %54 = fadd float %52, %53
  store float %54, ptr %51, align 4, !tbaa !9
  %55 = getelementptr inbounds float, ptr %11, i64 14
  %56 = load float, ptr %8, align 4, !tbaa !9
  %57 = load float, ptr %10, align 4, !tbaa !9
  %58 = call float @llvm.fmuladd.f32(float %57, float 0x3FE1AC5120000000, float %56)
  store float %58, ptr %55, align 4, !tbaa !9
  %59 = getelementptr inbounds float, ptr %11, i64 15
  %60 = load float, ptr %7, align 4, !tbaa !9
  %61 = load float, ptr %9, align 4, !tbaa !9
  %62 = fadd float %60, %61
  store float %62, ptr %59, align 4, !tbaa !9
  %63 = getelementptr inbounds float, ptr %11, i64 16
  %64 = load float, ptr %8, align 4, !tbaa !9
  store float %64, ptr %63, align 4, !tbaa !9
  %65 = getelementptr inbounds float, ptr %11, i64 17
  store float 2.000000e+00, ptr %65, align 4, !tbaa !9
  %66 = getelementptr inbounds float, ptr %11, i64 18
  %67 = load float, ptr %7, align 4, !tbaa !9
  %68 = load float, ptr %9, align 4, !tbaa !9
  %69 = fadd float %67, %68
  store float %69, ptr %66, align 4, !tbaa !9
  %70 = getelementptr inbounds float, ptr %11, i64 19
  %71 = load float, ptr %8, align 4, !tbaa !9
  %72 = load float, ptr %10, align 4, !tbaa !9
  %73 = fneg float %72
  %74 = call float @llvm.fmuladd.f32(float %73, float 0x3FE1AC5120000000, float %71)
  store float %74, ptr %70, align 4, !tbaa !9
  %75 = getelementptr inbounds float, ptr %11, i64 20
  %76 = load float, ptr %7, align 4, !tbaa !9
  %77 = load float, ptr %9, align 4, !tbaa !9
  %78 = call float @llvm.fmuladd.f32(float %77, float 0x3FE1AC5120000000, float %76)
  store float %78, ptr %75, align 4, !tbaa !9
  %79 = getelementptr inbounds float, ptr %11, i64 21
  %80 = load float, ptr %8, align 4, !tbaa !9
  %81 = load float, ptr %10, align 4, !tbaa !9
  %82 = fsub float %80, %81
  store float %82, ptr %79, align 4, !tbaa !9
  %83 = getelementptr inbounds float, ptr %11, i64 22
  %84 = load float, ptr %7, align 4, !tbaa !9
  store float %84, ptr %83, align 4, !tbaa !9
  %85 = getelementptr inbounds float, ptr %11, i64 23
  %86 = load float, ptr %8, align 4, !tbaa !9
  %87 = load float, ptr %10, align 4, !tbaa !9
  %88 = fsub float %86, %87
  store float %88, ptr %85, align 4, !tbaa !9
  %89 = getelementptr inbounds float, ptr %11, i64 24
  store float 2.000000e+00, ptr %89, align 4, !tbaa !9
  %90 = getelementptr inbounds float, ptr %11, i64 25
  %91 = load float, ptr %7, align 4, !tbaa !9
  %92 = load float, ptr %9, align 4, !tbaa !9
  %93 = fneg float %92
  %94 = call float @llvm.fmuladd.f32(float %93, float 0x3FE1AC5120000000, float %91)
  store float %94, ptr %90, align 4, !tbaa !9
  %95 = getelementptr inbounds float, ptr %11, i64 26
  %96 = load float, ptr %8, align 4, !tbaa !9
  %97 = load float, ptr %10, align 4, !tbaa !9
  %98 = fsub float %96, %97
  store float %98, ptr %95, align 4, !tbaa !9
  %99 = getelementptr inbounds float, ptr %11, i64 27
  %100 = load float, ptr %7, align 4, !tbaa !9
  %101 = load float, ptr %9, align 4, !tbaa !9
  %102 = fsub float %100, %101
  store float %102, ptr %99, align 4, !tbaa !9
  %103 = getelementptr inbounds float, ptr %11, i64 28
  %104 = load float, ptr %8, align 4, !tbaa !9
  %105 = load float, ptr %10, align 4, !tbaa !9
  %106 = fneg float %105
  %107 = call float @llvm.fmuladd.f32(float %106, float 0x3FE1AC5120000000, float %104)
  store float %107, ptr %103, align 4, !tbaa !9
  %108 = getelementptr inbounds float, ptr %11, i64 29
  %109 = load float, ptr %7, align 4, !tbaa !9
  %110 = load float, ptr %9, align 4, !tbaa !9
  %111 = fsub float %109, %110
  store float %111, ptr %108, align 4, !tbaa !9
  %112 = getelementptr inbounds float, ptr %11, i64 30
  %113 = load float, ptr %8, align 4, !tbaa !9
  store float %113, ptr %112, align 4, !tbaa !9
  %114 = getelementptr inbounds float, ptr %11, i64 31
  store float 3.000000e+00, ptr %114, align 4, !tbaa !9
  %115 = load ptr, ptr %6, align 8, !tbaa !5
  %116 = getelementptr inbounds [32 x float], ptr %11, i64 0, i64 0
  call void @nvg__appendCommands(ptr noundef %115, ptr noundef %116, i32 noundef 32)
  call void @llvm.lifetime.end.p0(i64 128, ptr %11) #3
  ret void
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = !{!10, !10, i64 0}
!10 = !{!"float", !7, i64 0}


; 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"

; 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 void @nvg__appendCommands(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local void @nvgEllipse(ptr noundef %0, float noundef %1, float noundef %2, float noundef %3, float noundef %4) local_unnamed_addr #1 {
  %6 = alloca [32 x float], align 16
  call void @llvm.lifetime.start.p0(i64 128, ptr nonnull %6) #3
  store float 0.000000e+00, ptr %6, align 16, !tbaa !5
  %7 = getelementptr inbounds i8, ptr %6, i64 4
  %8 = fsub float %1, %3
  store float %8, ptr %7, align 4, !tbaa !5
  %9 = getelementptr inbounds i8, ptr %6, i64 8
  store float %2, ptr %9, align 8, !tbaa !5
  %10 = getelementptr inbounds i8, ptr %6, i64 12
  store float 2.000000e+00, ptr %10, align 4, !tbaa !5
  %11 = getelementptr inbounds i8, ptr %6, i64 16
  store float %8, ptr %11, align 16, !tbaa !5
  %12 = getelementptr inbounds i8, ptr %6, i64 20
  %13 = fneg float %3
  %14 = insertelement <2 x float> poison, float %4, i64 0
  %15 = insertelement <2 x float> %14, float %13, i64 1
  %16 = insertelement <2 x float> poison, float %2, i64 0
  %17 = insertelement <2 x float> %16, float %1, i64 1
  %18 = tail call <2 x float> @llvm.fmuladd.v2f32(<2 x float> %15, <2 x float> <float 0x3FE1AC5120000000, float 0x3FE1AC5120000000>, <2 x float> %17)
  store <2 x float> %18, ptr %12, align 4, !tbaa !5
  %19 = getelementptr inbounds i8, ptr %6, i64 28
  %20 = fadd float %2, %4
  store float %20, ptr %19, align 4, !tbaa !5
  %21 = getelementptr inbounds i8, ptr %6, i64 32
  store float %1, ptr %21, align 16, !tbaa !5
  %22 = getelementptr inbounds i8, ptr %6, i64 36
  store float %20, ptr %22, align 4, !tbaa !5
  %23 = getelementptr inbounds i8, ptr %6, i64 40
  store float 2.000000e+00, ptr %23, align 8, !tbaa !5
  %24 = getelementptr inbounds i8, ptr %6, i64 44
  %25 = getelementptr inbounds i8, ptr %6, i64 48
  store float %20, ptr %25, align 16, !tbaa !5
  %26 = getelementptr inbounds i8, ptr %6, i64 52
  %27 = fadd float %1, %3
  store float %27, ptr %26, align 4, !tbaa !5
  %28 = getelementptr inbounds i8, ptr %6, i64 56
  %29 = extractelement <2 x float> %18, i64 0
  store float %29, ptr %28, align 8, !tbaa !5
  %30 = getelementptr inbounds i8, ptr %6, i64 60
  store float %27, ptr %30, align 4, !tbaa !5
  %31 = getelementptr inbounds i8, ptr %6, i64 64
  store float %2, ptr %31, align 16, !tbaa !5
  %32 = getelementptr inbounds i8, ptr %6, i64 68
  store float 2.000000e+00, ptr %32, align 4, !tbaa !5
  %33 = getelementptr inbounds i8, ptr %6, i64 72
  store float %27, ptr %33, align 8, !tbaa !5
  %34 = getelementptr inbounds i8, ptr %6, i64 76
  %35 = fneg float %4
  %36 = insertelement <2 x float> poison, float %35, i64 0
  %37 = insertelement <2 x float> %36, float %3, i64 1
  %38 = tail call <2 x float> @llvm.fmuladd.v2f32(<2 x float> %37, <2 x float> <float 0x3FE1AC5120000000, float 0x3FE1AC5120000000>, <2 x float> %17)
  %39 = extractelement <2 x float> %38, i64 1
  store float %39, ptr %24, align 4, !tbaa !5
  store <2 x float> %38, ptr %34, align 4, !tbaa !5
  %40 = getelementptr inbounds i8, ptr %6, i64 84
  %41 = fsub float %2, %4
  store float %41, ptr %40, align 4, !tbaa !5
  %42 = getelementptr inbounds i8, ptr %6, i64 88
  store float %1, ptr %42, align 8, !tbaa !5
  %43 = getelementptr inbounds i8, ptr %6, i64 92
  store float %41, ptr %43, align 4, !tbaa !5
  %44 = getelementptr inbounds i8, ptr %6, i64 96
  store float 2.000000e+00, ptr %44, align 16, !tbaa !5
  %45 = getelementptr inbounds i8, ptr %6, i64 100
  %46 = extractelement <2 x float> %18, i64 1
  store float %46, ptr %45, align 4, !tbaa !5
  %47 = getelementptr inbounds i8, ptr %6, i64 104
  store float %41, ptr %47, align 8, !tbaa !5
  %48 = getelementptr inbounds i8, ptr %6, i64 108
  store float %8, ptr %48, align 4, !tbaa !5
  %49 = getelementptr inbounds i8, ptr %6, i64 112
  %50 = extractelement <2 x float> %38, i64 0
  store float %50, ptr %49, align 16, !tbaa !5
  %51 = getelementptr inbounds i8, ptr %6, i64 116
  store float %8, ptr %51, align 4, !tbaa !5
  %52 = getelementptr inbounds i8, ptr %6, i64 120
  store float %2, ptr %52, align 8, !tbaa !5
  %53 = getelementptr inbounds i8, ptr %6, i64 124
  store float 3.000000e+00, ptr %53, align 4, !tbaa !5
  call void @nvg__appendCommands(ptr noundef %0, ptr noundef nonnull %6, i32 noundef 32)
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %6) #3
  ret void
}

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

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 = { 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 = !{!"float", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}


; Effective O3 passes: EarlyCSEPass,GlobalDCEPass,GlobalOptPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,SLPVectorizerPass,SROAPass,TailCallElimPass