; LLVM IR from CLASS-SZ/class_sz :: class-sz/tools (r8lib)

; 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 double @llvm.fmuladd.f64(double, double, double) #1

; Function Attrs: nounwind uwtable
define dso_local double @r8mat_det_4d(ptr noundef %0) #2 {
  %2 = alloca ptr, align 8
  %3 = alloca double, align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #3
  %4 = load ptr, ptr %2, align 8, !tbaa !5
  %5 = getelementptr inbounds double, ptr %4, i64 0
  %6 = load double, ptr %5, align 8, !tbaa !9
  %7 = load ptr, ptr %2, align 8, !tbaa !5
  %8 = getelementptr inbounds double, ptr %7, i64 5
  %9 = load double, ptr %8, align 8, !tbaa !9
  %10 = load ptr, ptr %2, align 8, !tbaa !5
  %11 = getelementptr inbounds double, ptr %10, i64 10
  %12 = load double, ptr %11, align 8, !tbaa !9
  %13 = load ptr, ptr %2, align 8, !tbaa !5
  %14 = getelementptr inbounds double, ptr %13, i64 15
  %15 = load double, ptr %14, align 8, !tbaa !9
  %16 = load ptr, ptr %2, align 8, !tbaa !5
  %17 = getelementptr inbounds double, ptr %16, i64 14
  %18 = load double, ptr %17, align 8, !tbaa !9
  %19 = load ptr, ptr %2, align 8, !tbaa !5
  %20 = getelementptr inbounds double, ptr %19, i64 11
  %21 = load double, ptr %20, align 8, !tbaa !9
  %22 = fmul double %18, %21
  %23 = fneg double %22
  %24 = call double @llvm.fmuladd.f64(double %12, double %15, double %23)
  %25 = load ptr, ptr %2, align 8, !tbaa !5
  %26 = getelementptr inbounds double, ptr %25, i64 9
  %27 = load double, ptr %26, align 8, !tbaa !9
  %28 = load ptr, ptr %2, align 8, !tbaa !5
  %29 = getelementptr inbounds double, ptr %28, i64 6
  %30 = load double, ptr %29, align 8, !tbaa !9
  %31 = load ptr, ptr %2, align 8, !tbaa !5
  %32 = getelementptr inbounds double, ptr %31, i64 15
  %33 = load double, ptr %32, align 8, !tbaa !9
  %34 = load ptr, ptr %2, align 8, !tbaa !5
  %35 = getelementptr inbounds double, ptr %34, i64 14
  %36 = load double, ptr %35, align 8, !tbaa !9
  %37 = load ptr, ptr %2, align 8, !tbaa !5
  %38 = getelementptr inbounds double, ptr %37, i64 7
  %39 = load double, ptr %38, align 8, !tbaa !9
  %40 = fmul double %36, %39
  %41 = fneg double %40
  %42 = call double @llvm.fmuladd.f64(double %30, double %33, double %41)
  %43 = fmul double %27, %42
  %44 = fneg double %43
  %45 = call double @llvm.fmuladd.f64(double %9, double %24, double %44)
  %46 = load ptr, ptr %2, align 8, !tbaa !5
  %47 = getelementptr inbounds double, ptr %46, i64 13
  %48 = load double, ptr %47, align 8, !tbaa !9
  %49 = load ptr, ptr %2, align 8, !tbaa !5
  %50 = getelementptr inbounds double, ptr %49, i64 6
  %51 = load double, ptr %50, align 8, !tbaa !9
  %52 = load ptr, ptr %2, align 8, !tbaa !5
  %53 = getelementptr inbounds double, ptr %52, i64 11
  %54 = load double, ptr %53, align 8, !tbaa !9
  %55 = load ptr, ptr %2, align 8, !tbaa !5
  %56 = getelementptr inbounds double, ptr %55, i64 10
  %57 = load double, ptr %56, align 8, !tbaa !9
  %58 = load ptr, ptr %2, align 8, !tbaa !5
  %59 = getelementptr inbounds double, ptr %58, i64 7
  %60 = load double, ptr %59, align 8, !tbaa !9
  %61 = fmul double %57, %60
  %62 = fneg double %61
  %63 = call double @llvm.fmuladd.f64(double %51, double %54, double %62)
  %64 = call double @llvm.fmuladd.f64(double %48, double %63, double %45)
  %65 = load ptr, ptr %2, align 8, !tbaa !5
  %66 = getelementptr inbounds double, ptr %65, i64 4
  %67 = load double, ptr %66, align 8, !tbaa !9
  %68 = load ptr, ptr %2, align 8, !tbaa !5
  %69 = getelementptr inbounds double, ptr %68, i64 1
  %70 = load double, ptr %69, align 8, !tbaa !9
  %71 = load ptr, ptr %2, align 8, !tbaa !5
  %72 = getelementptr inbounds double, ptr %71, i64 10
  %73 = load double, ptr %72, align 8, !tbaa !9
  %74 = load ptr, ptr %2, align 8, !tbaa !5
  %75 = getelementptr inbounds double, ptr %74, i64 15
  %76 = load double, ptr %75, align 8, !tbaa !9
  %77 = load ptr, ptr %2, align 8, !tbaa !5
  %78 = getelementptr inbounds double, ptr %77, i64 14
  %79 = load double, ptr %78, align 8, !tbaa !9
  %80 = load ptr, ptr %2, align 8, !tbaa !5
  %81 = getelementptr inbounds double, ptr %80, i64 11
  %82 = load double, ptr %81, align 8, !tbaa !9
  %83 = fmul double %79, %82
  %84 = fneg double %83
  %85 = call double @llvm.fmuladd.f64(double %73, double %76, double %84)
  %86 = load ptr, ptr %2, align 8, !tbaa !5
  %87 = getelementptr inbounds double, ptr %86, i64 9
  %88 = load double, ptr %87, align 8, !tbaa !9
  %89 = load ptr, ptr %2, align 8, !tbaa !5
  %90 = getelementptr inbounds double, ptr %89, i64 2
  %91 = load double, ptr %90, align 8, !tbaa !9
  %92 = load ptr, ptr %2, align 8, !tbaa !5
  %93 = getelementptr inbounds double, ptr %92, i64 15
  %94 = load double, ptr %93, align 8, !tbaa !9
  %95 = load ptr, ptr %2, align 8, !tbaa !5
  %96 = getelementptr inbounds double, ptr %95, i64 14
  %97 = load double, ptr %96, align 8, !tbaa !9
  %98 = load ptr, ptr %2, align 8, !tbaa !5
  %99 = getelementptr inbounds double, ptr %98, i64 3
  %100 = load double, ptr %99, align 8, !tbaa !9
  %101 = fmul double %97, %100
  %102 = fneg double %101
  %103 = call double @llvm.fmuladd.f64(double %91, double %94, double %102)
  %104 = fmul double %88, %103
  %105 = fneg double %104
  %106 = call double @llvm.fmuladd.f64(double %70, double %85, double %105)
  %107 = load ptr, ptr %2, align 8, !tbaa !5
  %108 = getelementptr inbounds double, ptr %107, i64 13
  %109 = load double, ptr %108, align 8, !tbaa !9
  %110 = load ptr, ptr %2, align 8, !tbaa !5
  %111 = getelementptr inbounds double, ptr %110, i64 2
  %112 = load double, ptr %111, align 8, !tbaa !9
  %113 = load ptr, ptr %2, align 8, !tbaa !5
  %114 = getelementptr inbounds double, ptr %113, i64 11
  %115 = load double, ptr %114, align 8, !tbaa !9
  %116 = load ptr, ptr %2, align 8, !tbaa !5
  %117 = getelementptr inbounds double, ptr %116, i64 10
  %118 = load double, ptr %117, align 8, !tbaa !9
  %119 = load ptr, ptr %2, align 8, !tbaa !5
  %120 = getelementptr inbounds double, ptr %119, i64 3
  %121 = load double, ptr %120, align 8, !tbaa !9
  %122 = fmul double %118, %121
  %123 = fneg double %122
  %124 = call double @llvm.fmuladd.f64(double %112, double %115, double %123)
  %125 = call double @llvm.fmuladd.f64(double %109, double %124, double %106)
  %126 = fmul double %67, %125
  %127 = fneg double %126
  %128 = call double @llvm.fmuladd.f64(double %6, double %64, double %127)
  %129 = load ptr, ptr %2, align 8, !tbaa !5
  %130 = getelementptr inbounds double, ptr %129, i64 8
  %131 = load double, ptr %130, align 8, !tbaa !9
  %132 = load ptr, ptr %2, align 8, !tbaa !5
  %133 = getelementptr inbounds double, ptr %132, i64 1
  %134 = load double, ptr %133, align 8, !tbaa !9
  %135 = load ptr, ptr %2, align 8, !tbaa !5
  %136 = getelementptr inbounds double, ptr %135, i64 6
  %137 = load double, ptr %136, align 8, !tbaa !9
  %138 = load ptr, ptr %2, align 8, !tbaa !5
  %139 = getelementptr inbounds double, ptr %138, i64 15
  %140 = load double, ptr %139, align 8, !tbaa !9
  %141 = load ptr, ptr %2, align 8, !tbaa !5
  %142 = getelementptr inbounds double, ptr %141, i64 14
  %143 = load double, ptr %142, align 8, !tbaa !9
  %144 = load ptr, ptr %2, align 8, !tbaa !5
  %145 = getelementptr inbounds double, ptr %144, i64 7
  %146 = load double, ptr %145, align 8, !tbaa !9
  %147 = fmul double %143, %146
  %148 = fneg double %147
  %149 = call double @llvm.fmuladd.f64(double %137, double %140, double %148)
  %150 = load ptr, ptr %2, align 8, !tbaa !5
  %151 = getelementptr inbounds double, ptr %150, i64 5
  %152 = load double, ptr %151, align 8, !tbaa !9
  %153 = load ptr, ptr %2, align 8, !tbaa !5
  %154 = getelementptr inbounds double, ptr %153, i64 2
  %155 = load double, ptr %154, align 8, !tbaa !9
  %156 = load ptr, ptr %2, align 8, !tbaa !5
  %157 = getelementptr inbounds double, ptr %156, i64 15
  %158 = load double, ptr %157, align 8, !tbaa !9
  %159 = load ptr, ptr %2, align 8, !tbaa !5
  %160 = getelementptr inbounds double, ptr %159, i64 14
  %161 = load double, ptr %160, align 8, !tbaa !9
  %162 = load ptr, ptr %2, align 8, !tbaa !5
  %163 = getelementptr inbounds double, ptr %162, i64 3
  %164 = load double, ptr %163, align 8, !tbaa !9
  %165 = fmul double %161, %164
  %166 = fneg double %165
  %167 = call double @llvm.fmuladd.f64(double %155, double %158, double %166)
  %168 = fmul double %152, %167
  %169 = fneg double %168
  %170 = call double @llvm.fmuladd.f64(double %134, double %149, double %169)
  %171 = load ptr, ptr %2, align 8, !tbaa !5
  %172 = getelementptr inbounds double, ptr %171, i64 13
  %173 = load double, ptr %172, align 8, !tbaa !9
  %174 = load ptr, ptr %2, align 8, !tbaa !5
  %175 = getelementptr inbounds double, ptr %174, i64 2
  %176 = load double, ptr %175, align 8, !tbaa !9
  %177 = load ptr, ptr %2, align 8, !tbaa !5
  %178 = getelementptr inbounds double, ptr %177, i64 7
  %179 = load double, ptr %178, align 8, !tbaa !9
  %180 = load ptr, ptr %2, align 8, !tbaa !5
  %181 = getelementptr inbounds double, ptr %180, i64 6
  %182 = load double, ptr %181, align 8, !tbaa !9
  %183 = load ptr, ptr %2, align 8, !tbaa !5
  %184 = getelementptr inbounds double, ptr %183, i64 3
  %185 = load double, ptr %184, align 8, !tbaa !9
  %186 = fmul double %182, %185
  %187 = fneg double %186
  %188 = call double @llvm.fmuladd.f64(double %176, double %179, double %187)
  %189 = call double @llvm.fmuladd.f64(double %173, double %188, double %170)
  %190 = call double @llvm.fmuladd.f64(double %131, double %189, double %128)
  %191 = load ptr, ptr %2, align 8, !tbaa !5
  %192 = getelementptr inbounds double, ptr %191, i64 12
  %193 = load double, ptr %192, align 8, !tbaa !9
  %194 = load ptr, ptr %2, align 8, !tbaa !5
  %195 = getelementptr inbounds double, ptr %194, i64 1
  %196 = load double, ptr %195, align 8, !tbaa !9
  %197 = load ptr, ptr %2, align 8, !tbaa !5
  %198 = getelementptr inbounds double, ptr %197, i64 6
  %199 = load double, ptr %198, align 8, !tbaa !9
  %200 = load ptr, ptr %2, align 8, !tbaa !5
  %201 = getelementptr inbounds double, ptr %200, i64 11
  %202 = load double, ptr %201, align 8, !tbaa !9
  %203 = load ptr, ptr %2, align 8, !tbaa !5
  %204 = getelementptr inbounds double, ptr %203, i64 10
  %205 = load double, ptr %204, align 8, !tbaa !9
  %206 = load ptr, ptr %2, align 8, !tbaa !5
  %207 = getelementptr inbounds double, ptr %206, i64 7
  %208 = load double, ptr %207, align 8, !tbaa !9
  %209 = fmul double %205, %208
  %210 = fneg double %209
  %211 = call double @llvm.fmuladd.f64(double %199, double %202, double %210)
  %212 = load ptr, ptr %2, align 8, !tbaa !5
  %213 = getelementptr inbounds double, ptr %212, i64 5
  %214 = load double, ptr %213, align 8, !tbaa !9
  %215 = load ptr, ptr %2, align 8, !tbaa !5
  %216 = getelementptr inbounds double, ptr %215, i64 2
  %217 = load double, ptr %216, align 8, !tbaa !9
  %218 = load ptr, ptr %2, align 8, !tbaa !5
  %219 = getelementptr inbounds double, ptr %218, i64 11
  %220 = load double, ptr %219, align 8, !tbaa !9
  %221 = load ptr, ptr %2, align 8, !tbaa !5
  %222 = getelementptr inbounds double, ptr %221, i64 10
  %223 = load double, ptr %222, align 8, !tbaa !9
  %224 = load ptr, ptr %2, align 8, !tbaa !5
  %225 = getelementptr inbounds double, ptr %224, i64 3
  %226 = load double, ptr %225, align 8, !tbaa !9
  %227 = fmul double %223, %226
  %228 = fneg double %227
  %229 = call double @llvm.fmuladd.f64(double %217, double %220, double %228)
  %230 = fmul double %214, %229
  %231 = fneg double %230
  %232 = call double @llvm.fmuladd.f64(double %196, double %211, double %231)
  %233 = load ptr, ptr %2, align 8, !tbaa !5
  %234 = getelementptr inbounds double, ptr %233, i64 9
  %235 = load double, ptr %234, align 8, !tbaa !9
  %236 = load ptr, ptr %2, align 8, !tbaa !5
  %237 = getelementptr inbounds double, ptr %236, i64 2
  %238 = load double, ptr %237, align 8, !tbaa !9
  %239 = load ptr, ptr %2, align 8, !tbaa !5
  %240 = getelementptr inbounds double, ptr %239, i64 7
  %241 = load double, ptr %240, align 8, !tbaa !9
  %242 = load ptr, ptr %2, align 8, !tbaa !5
  %243 = getelementptr inbounds double, ptr %242, i64 6
  %244 = load double, ptr %243, align 8, !tbaa !9
  %245 = load ptr, ptr %2, align 8, !tbaa !5
  %246 = getelementptr inbounds double, ptr %245, i64 3
  %247 = load double, ptr %246, align 8, !tbaa !9
  %248 = fmul double %244, %247
  %249 = fneg double %248
  %250 = call double @llvm.fmuladd.f64(double %238, double %241, double %249)
  %251 = call double @llvm.fmuladd.f64(double %235, double %250, double %232)
  %252 = fneg double %193
  %253 = call double @llvm.fmuladd.f64(double %252, double %251, double %190)
  store double %253, ptr %3, align 8, !tbaa !9
  %254 = load double, ptr %3, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #3
  ret double %254
}

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 = !{!"double", !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 speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #0

; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable
define dso_local double @r8mat_det_4d(ptr nocapture noundef readonly %0) local_unnamed_addr #1 {
  %2 = load double, ptr %0, align 8, !tbaa !5
  %3 = getelementptr inbounds i8, ptr %0, i64 40
  %4 = load double, ptr %3, align 8, !tbaa !5
  %5 = getelementptr inbounds i8, ptr %0, i64 80
  %6 = load double, ptr %5, align 8, !tbaa !5
  %7 = getelementptr inbounds i8, ptr %0, i64 120
  %8 = load double, ptr %7, align 8, !tbaa !5
  %9 = getelementptr inbounds i8, ptr %0, i64 112
  %10 = load double, ptr %9, align 8, !tbaa !5
  %11 = getelementptr inbounds i8, ptr %0, i64 88
  %12 = load double, ptr %11, align 8, !tbaa !5
  %13 = fneg double %10
  %14 = fmul double %12, %13
  %15 = tail call double @llvm.fmuladd.f64(double %6, double %8, double %14)
  %16 = getelementptr inbounds i8, ptr %0, i64 72
  %17 = load double, ptr %16, align 8, !tbaa !5
  %18 = getelementptr inbounds i8, ptr %0, i64 48
  %19 = load double, ptr %18, align 8, !tbaa !5
  %20 = getelementptr inbounds i8, ptr %0, i64 56
  %21 = load double, ptr %20, align 8, !tbaa !5
  %22 = fmul double %21, %13
  %23 = tail call double @llvm.fmuladd.f64(double %19, double %8, double %22)
  %24 = fneg double %17
  %25 = fmul double %23, %24
  %26 = tail call double @llvm.fmuladd.f64(double %4, double %15, double %25)
  %27 = getelementptr inbounds i8, ptr %0, i64 104
  %28 = load double, ptr %27, align 8, !tbaa !5
  %29 = fneg double %6
  %30 = fmul double %21, %29
  %31 = tail call double @llvm.fmuladd.f64(double %19, double %12, double %30)
  %32 = tail call double @llvm.fmuladd.f64(double %28, double %31, double %26)
  %33 = getelementptr inbounds i8, ptr %0, i64 32
  %34 = load double, ptr %33, align 8, !tbaa !5
  %35 = getelementptr inbounds i8, ptr %0, i64 8
  %36 = load double, ptr %35, align 8, !tbaa !5
  %37 = getelementptr inbounds i8, ptr %0, i64 16
  %38 = load double, ptr %37, align 8, !tbaa !5
  %39 = getelementptr inbounds i8, ptr %0, i64 24
  %40 = load double, ptr %39, align 8, !tbaa !5
  %41 = fmul double %40, %13
  %42 = tail call double @llvm.fmuladd.f64(double %38, double %8, double %41)
  %43 = fmul double %42, %24
  %44 = tail call double @llvm.fmuladd.f64(double %36, double %15, double %43)
  %45 = fmul double %40, %29
  %46 = tail call double @llvm.fmuladd.f64(double %38, double %12, double %45)
  %47 = tail call double @llvm.fmuladd.f64(double %28, double %46, double %44)
  %48 = fneg double %34
  %49 = fmul double %47, %48
  %50 = tail call double @llvm.fmuladd.f64(double %2, double %32, double %49)
  %51 = getelementptr inbounds i8, ptr %0, i64 64
  %52 = load double, ptr %51, align 8, !tbaa !5
  %53 = fneg double %4
  %54 = fmul double %42, %53
  %55 = tail call double @llvm.fmuladd.f64(double %36, double %23, double %54)
  %56 = fneg double %19
  %57 = fmul double %40, %56
  %58 = tail call double @llvm.fmuladd.f64(double %38, double %21, double %57)
  %59 = tail call double @llvm.fmuladd.f64(double %28, double %58, double %55)
  %60 = tail call double @llvm.fmuladd.f64(double %52, double %59, double %50)
  %61 = getelementptr inbounds i8, ptr %0, i64 96
  %62 = load double, ptr %61, align 8, !tbaa !5
  %63 = fmul double %46, %53
  %64 = tail call double @llvm.fmuladd.f64(double %36, double %31, double %63)
  %65 = tail call double @llvm.fmuladd.f64(double %17, double %58, double %64)
  %66 = fneg double %62
  %67 = tail call double @llvm.fmuladd.f64(double %66, double %65, double %60)
  ret double %67
}

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

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


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,TailCallElimPass