; LLVM IR from tsotchke/quantum_geometric_tensor :: src/quantum_geometric/core (quantum_geometric_validation)

; 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.ComplexFloat = type { float, float }
%struct.validation_result_t = type { i8, i32, [1024 x i8] }
%struct.quantum_geometric_metric_t = type { i32, i64, ptr, i8, ptr, i32 }

@.str = external hidden unnamed_addr constant [42 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [42 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @geometric_validate_metric(ptr noundef %0, i32 noundef %1, ptr noundef %2) #0 {
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca i64, align 8
  %9 = alloca i32, align 4
  %10 = alloca i64, align 8
  %11 = alloca %struct.ComplexFloat, align 4
  %12 = alloca i64, align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store i32 %1, ptr %6, align 4, !tbaa !9
  store ptr %2, ptr %7, align 8, !tbaa !5
  %13 = load ptr, ptr %5, align 8, !tbaa !5
  %14 = icmp eq ptr %13, null
  br i1 %14, label %15, label %16

15:                                               ; preds = %3
  store i32 -1, ptr %4, align 4
  br label %147

16:                                               ; preds = %3
  %17 = load ptr, ptr %7, align 8, !tbaa !5
  %18 = icmp eq ptr %17, null
  br i1 %18, label %19, label %20

19:                                               ; preds = %16
  store i32 -1, ptr %4, align 4
  br label %147

20:                                               ; preds = %16
  %21 = load ptr, ptr %7, align 8, !tbaa !5
  %22 = getelementptr inbounds %struct.validation_result_t, ptr %21, i32 0, i32 0
  store i8 1, ptr %22, align 4, !tbaa !11
  %23 = load ptr, ptr %7, align 8, !tbaa !5
  %24 = getelementptr inbounds %struct.validation_result_t, ptr %23, i32 0, i32 1
  store i32 0, ptr %24, align 4, !tbaa !14
  %25 = load ptr, ptr %7, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct.validation_result_t, ptr %25, i32 0, i32 2
  %27 = getelementptr inbounds [1024 x i8], ptr %26, i64 0, i64 0
  call void @llvm.memset.p0.i64(ptr align 4 %27, i8 0, i64 1024, i1 false)
  %28 = load i32, ptr %6, align 4, !tbaa !9
  %29 = and i32 %28, 1
  %30 = icmp ne i32 %29, 0
  br i1 %30, label %31, label %102

31:                                               ; preds = %20
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  store i64 0, ptr %8, align 8, !tbaa !15
  br label %32

32:                                               ; preds = %96, %31
  %33 = load i64, ptr %8, align 8, !tbaa !15
  %34 = load ptr, ptr %5, align 8, !tbaa !5
  %35 = getelementptr inbounds %struct.quantum_geometric_metric_t, ptr %34, i32 0, i32 1
  %36 = load i64, ptr %35, align 8, !tbaa !17
  %37 = icmp ult i64 %33, %36
  br i1 %37, label %39, label %38

38:                                               ; preds = %32
  store i32 2, ptr %9, align 4
  br label %99

39:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  store i64 0, ptr %10, align 8, !tbaa !15
  br label %40

40:                                               ; preds = %90, %39
  %41 = load i64, ptr %10, align 8, !tbaa !15
  %42 = load i64, ptr %8, align 8, !tbaa !15
  %43 = icmp ult i64 %41, %42
  br i1 %43, label %45, label %44

44:                                               ; preds = %40
  store i32 5, ptr %9, align 4
  br label %93

45:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  %46 = load ptr, ptr %5, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct.quantum_geometric_metric_t, ptr %46, i32 0, i32 2
  %48 = load ptr, ptr %47, align 8, !tbaa !19
  %49 = load i64, ptr %8, align 8, !tbaa !15
  %50 = load ptr, ptr %5, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.quantum_geometric_metric_t, ptr %50, i32 0, i32 1
  %52 = load i64, ptr %51, align 8, !tbaa !17
  %53 = mul i64 %49, %52
  %54 = load i64, ptr %10, align 8, !tbaa !15
  %55 = add i64 %53, %54
  %56 = getelementptr inbounds %struct.ComplexFloat, ptr %48, i64 %55
  %57 = load ptr, ptr %5, align 8, !tbaa !5
  %58 = getelementptr inbounds %struct.quantum_geometric_metric_t, ptr %57, i32 0, i32 2
  %59 = load ptr, ptr %58, align 8, !tbaa !19
  %60 = load i64, ptr %10, align 8, !tbaa !15
  %61 = load ptr, ptr %5, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.quantum_geometric_metric_t, ptr %61, i32 0, i32 1
  %63 = load i64, ptr %62, align 8, !tbaa !17
  %64 = mul i64 %60, %63
  %65 = load i64, ptr %8, align 8, !tbaa !15
  %66 = add i64 %64, %65
  %67 = getelementptr inbounds %struct.ComplexFloat, ptr %59, i64 %66
  %68 = load <2 x float>, ptr %56, align 4
  %69 = load <2 x float>, ptr %67, align 4
  %70 = call <2 x float> @complex_float_subtract(<2 x float> %68, <2 x float> %69)
  store <2 x float> %70, ptr %11, align 4
  %71 = load <2 x float>, ptr %11, align 4
  %72 = call float @complex_float_abs(<2 x float> %71)
  %73 = fpext float %72 to double
  %74 = fcmp ogt double %73, 0x3EB0C6F7A0B5ED8D
  br i1 %74, label %75, label %86

75:                                               ; preds = %45
  %76 = load ptr, ptr %7, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.validation_result_t, ptr %76, i32 0, i32 0
  store i8 0, ptr %77, align 4, !tbaa !11
  %78 = load ptr, ptr %7, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct.validation_result_t, ptr %78, i32 0, i32 1
  store i32 -5, ptr %79, align 4, !tbaa !14
  %80 = load ptr, ptr %7, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct.validation_result_t, ptr %80, i32 0, i32 2
  %82 = getelementptr inbounds [1024 x i8], ptr %81, i64 0, i64 0
  %83 = load i64, ptr %8, align 8, !tbaa !15
  %84 = load i64, ptr %10, align 8, !tbaa !15
  %85 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef %82, i64 noundef 1024, ptr noundef @.str, i64 noundef %83, i64 noundef %84) #5
  store i32 0, ptr %4, align 4
  store i32 1, ptr %9, align 4
  br label %87

86:                                               ; preds = %45
  store i32 0, ptr %9, align 4
  br label %87

87:                                               ; preds = %86, %75
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  %88 = load i32, ptr %9, align 4
  switch i32 %88, label %93 [
    i32 0, label %89
  ]

89:                                               ; preds = %87
  br label %90

90:                                               ; preds = %89
  %91 = load i64, ptr %10, align 8, !tbaa !15
  %92 = add i64 %91, 1
  store i64 %92, ptr %10, align 8, !tbaa !15
  br label %40, !llvm.loop !20

93:                                               ; preds = %87, %44
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  %94 = load i32, ptr %9, align 4
  switch i32 %94, label %99 [
    i32 5, label %95
  ]

95:                                               ; preds = %93
  br label %96

96:                                               ; preds = %95
  %97 = load i64, ptr %8, align 8, !tbaa !15
  %98 = add i64 %97, 1
  store i64 %98, ptr %8, align 8, !tbaa !15
  br label %32, !llvm.loop !22

99:                                               ; preds = %93, %38
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  %100 = load i32, ptr %9, align 4
  switch i32 %100, label %149 [
    i32 2, label %101
    i32 1, label %147
  ]

101:                                              ; preds = %99
  br label %102

102:                                              ; preds = %101, %20
  %103 = load i32, ptr %6, align 4, !tbaa !9
  %104 = and i32 %103, 2
  %105 = icmp ne i32 %104, 0
  br i1 %105, label %106, label %146

106:                                              ; preds = %102
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  store i64 0, ptr %12, align 8, !tbaa !15
  br label %107

107:                                              ; preds = %140, %106
  %108 = load i64, ptr %12, align 8, !tbaa !15
  %109 = load ptr, ptr %5, align 8, !tbaa !5
  %110 = getelementptr inbounds %struct.quantum_geometric_metric_t, ptr %109, i32 0, i32 1
  %111 = load i64, ptr %110, align 8, !tbaa !17
  %112 = icmp ult i64 %108, %111
  br i1 %112, label %114, label %113

113:                                              ; preds = %107
  store i32 8, ptr %9, align 4
  br label %143

114:                                              ; preds = %107
  %115 = load ptr, ptr %5, align 8, !tbaa !5
  %116 = getelementptr inbounds %struct.quantum_geometric_metric_t, ptr %115, i32 0, i32 2
  %117 = load ptr, ptr %116, align 8, !tbaa !19
  %118 = load i64, ptr %12, align 8, !tbaa !15
  %119 = load ptr, ptr %5, align 8, !tbaa !5
  %120 = getelementptr inbounds %struct.quantum_geometric_metric_t, ptr %119, i32 0, i32 1
  %121 = load i64, ptr %120, align 8, !tbaa !17
  %122 = mul i64 %118, %121
  %123 = load i64, ptr %12, align 8, !tbaa !15
  %124 = add i64 %122, %123
  %125 = getelementptr inbounds %struct.ComplexFloat, ptr %117, i64 %124
  %126 = getelementptr inbounds %struct.ComplexFloat, ptr %125, i32 0, i32 0
  %127 = load float, ptr %126, align 4, !tbaa !23
  %128 = fcmp ole float %127, 0.000000e+00
  br i1 %128, label %129, label %139

129:                                              ; preds = %114
  %130 = load ptr, ptr %7, align 8, !tbaa !5
  %131 = getelementptr inbounds %struct.validation_result_t, ptr %130, i32 0, i32 0
  store i8 0, ptr %131, align 4, !tbaa !11
  %132 = load ptr, ptr %7, align 8, !tbaa !5
  %133 = getelementptr inbounds %struct.validation_result_t, ptr %132, i32 0, i32 1
  store i32 -5, ptr %133, align 4, !tbaa !14
  %134 = load ptr, ptr %7, align 8, !tbaa !5
  %135 = getelementptr inbounds %struct.validation_result_t, ptr %134, i32 0, i32 2
  %136 = getelementptr inbounds [1024 x i8], ptr %135, i64 0, i64 0
  %137 = load i64, ptr %12, align 8, !tbaa !15
  %138 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef %136, i64 noundef 1024, ptr noundef @.str.1, i64 noundef %137) #5
  store i32 0, ptr %4, align 4
  store i32 1, ptr %9, align 4
  br label %143

139:                                              ; preds = %114
  br label %140

140:                                              ; preds = %139
  %141 = load i64, ptr %12, align 8, !tbaa !15
  %142 = add i64 %141, 1
  store i64 %142, ptr %12, align 8, !tbaa !15
  br label %107, !llvm.loop !26

143:                                              ; preds = %129, %113
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  %144 = load i32, ptr %9, align 4
  switch i32 %144, label %149 [
    i32 8, label %145
    i32 1, label %147
  ]

145:                                              ; preds = %143
  br label %146

146:                                              ; preds = %145, %102
  store i32 0, ptr %4, align 4
  br label %147

147:                                              ; preds = %146, %143, %99, %19, %15
  %148 = load i32, ptr %4, align 4
  ret i32 %148

149:                                              ; preds = %143, %99
  unreachable
}

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #1

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden <2 x float> @complex_float_subtract(<2 x float>, <2 x float>) #3

; Function Attrs: inlinehint nounwind uwtable
declare hidden float @complex_float_abs(<2 x float>) #3

; Function Attrs: nounwind
declare i32 @snprintf(ptr noundef, i64 noundef, ptr noundef, ...) #4

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

attributes #0 = { nounwind uwtable "min-legal-vector-width"="64" "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 #1 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { inlinehint nounwind uwtable "min-legal-vector-width"="64" "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 #4 = { nounwind "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 #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, !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 = !{!"int", !7, i64 0}
!11 = !{!12, !13, i64 0}
!12 = !{!"", !13, i64 0, !10, i64 4, !7, i64 8}
!13 = !{!"_Bool", !7, i64 0}
!14 = !{!12, !10, i64 4}
!15 = !{!16, !16, i64 0}
!16 = !{!"long", !7, i64 0}
!17 = !{!18, !16, i64 8}
!18 = !{!"quantum_geometric_metric_t", !10, i64 0, !16, i64 8, !6, i64 16, !13, i64 24, !6, i64 32, !10, i64 40}
!19 = !{!18, !6, i64 16}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.mustprogress"}
!22 = distinct !{!22, !21}
!23 = !{!24, !25, i64 0}
!24 = !{!"", !25, i64 0, !25, i64 4}
!25 = !{!"float", !7, i64 0}
!26 = distinct !{!26, !21}


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

@.str = external hidden unnamed_addr constant [42 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [42 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @geometric_validate_metric(ptr noundef readonly %0, i32 noundef %1, ptr noundef writeonly %2) local_unnamed_addr #0 {
  %4 = icmp eq ptr %0, null
  %5 = icmp eq ptr %2, null
  %or.cond = or i1 %4, %5
  br i1 %or.cond, label %.loopexit, label %6

6:                                                ; preds = %3
  store i8 1, ptr %2, align 4, !tbaa !5
  %7 = getelementptr inbounds i8, ptr %2, i64 4
  %8 = getelementptr inbounds i8, ptr %2, i64 8
  %9 = and i32 %1, 1
  %.not = icmp eq i32 %9, 0
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(1028) %7, i8 0, i64 1028, i1 false)
  br i1 %.not, label %35, label %.preheader66

.preheader66:                                     ; preds = %6
  %10 = getelementptr inbounds i8, ptr %0, i64 8
  %11 = load i64, ptr %10, align 8, !tbaa !11
  %.not76 = icmp eq i64 %11, 0
  br i1 %.not76, label %._crit_edge73, label %.preheader65.lr.ph

.preheader65.lr.ph:                               ; preds = %.preheader66
  %12 = getelementptr inbounds i8, ptr %0, i64 16
  br label %.preheader65

.preheader65:                                     ; preds = %.preheader65.lr.ph, %._crit_edge
  %13 = phi i64 [ %11, %.preheader65.lr.ph ], [ %30, %._crit_edge ]
  %.04872 = phi i64 [ 0, %.preheader65.lr.ph ], [ %31, %._crit_edge ]
  %.not5270.not = icmp eq i64 %.04872, 0
  br i1 %.not5270.not, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader65, %.critedge
  %.04371 = phi i64 [ %29, %.critedge ], [ 0, %.preheader65 ]
  %14 = load ptr, ptr %12, align 8, !tbaa !15
  %15 = load i64, ptr %10, align 8, !tbaa !11
  %16 = mul i64 %15, %.04872
  %17 = getelementptr %struct.ComplexFloat, ptr %14, i64 %16
  %18 = getelementptr %struct.ComplexFloat, ptr %17, i64 %.04371
  %19 = mul i64 %15, %.04371
  %20 = getelementptr %struct.ComplexFloat, ptr %14, i64 %19
  %21 = getelementptr %struct.ComplexFloat, ptr %20, i64 %.04872
  %22 = load <2 x float>, ptr %18, align 4
  %23 = load <2 x float>, ptr %21, align 4
  %24 = tail call <2 x float> @complex_float_subtract(<2 x float> %22, <2 x float> %23)
  %25 = tail call float @complex_float_abs(<2 x float> %24)
  %26 = fpext float %25 to double
  %27 = fcmp ule double %26, 0x3EB0C6F7A0B5ED8D
  br i1 %27, label %.critedge, label %.thread59

.thread59:                                        ; preds = %.lr.ph
  store i8 0, ptr %2, align 4, !tbaa !5
  store i32 -5, ptr %7, align 4, !tbaa !16
  %28 = tail call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef nonnull dereferenceable(1) %8, i64 noundef 1024, ptr noundef nonnull @.str, i64 noundef %.04872, i64 noundef %.04371) #4
  br label %.loopexit

.critedge:                                        ; preds = %.lr.ph
  %29 = add nuw i64 %.04371, 1
  %exitcond.not = icmp eq i64 %29, %.04872
  br i1 %exitcond.not, label %._crit_edge.loopexit, label %.lr.ph, !llvm.loop !17

._crit_edge.loopexit:                             ; preds = %.critedge
  %.pre = load i64, ptr %10, align 8, !tbaa !11
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.preheader65
  %30 = phi i64 [ %.pre, %._crit_edge.loopexit ], [ %13, %.preheader65 ]
  %31 = add nuw i64 %.04872, 1
  %32 = icmp ult i64 %31, %30
  br i1 %32, label %.preheader65, label %._crit_edge73, !llvm.loop !19

._crit_edge73:                                    ; preds = %._crit_edge, %.preheader66
  %33 = phi i64 [ 0, %.preheader66 ], [ %30, %._crit_edge ]
  %34 = and i32 %1, 2
  %.not53 = icmp eq i32 %34, 0
  br i1 %.not53, label %.loopexit, label %.preheader

35:                                               ; preds = %6
  %.old = and i32 %1, 2
  %.not53.old = icmp eq i32 %.old, 0
  br i1 %.not53.old, label %.loopexit, label %..preheader_crit_edge

..preheader_crit_edge:                            ; preds = %35
  %.phi.trans.insert = getelementptr inbounds i8, ptr %0, i64 8
  %.pre82 = load i64, ptr %.phi.trans.insert, align 8, !tbaa !11
  br label %.preheader

.preheader:                                       ; preds = %..preheader_crit_edge, %._crit_edge73
  %36 = phi i64 [ %.pre82, %..preheader_crit_edge ], [ %33, %._crit_edge73 ]
  %.not77 = icmp eq i64 %36, 0
  br i1 %.not77, label %.loopexit, label %.lr.ph75

.lr.ph75:                                         ; preds = %.preheader
  %37 = getelementptr inbounds i8, ptr %0, i64 16
  %38 = load ptr, ptr %37, align 8, !tbaa !15
  %.054 = add i64 %36, 1
  br label %39

39:                                               ; preds = %.lr.ph75, %46
  %.074 = phi i64 [ 0, %.lr.ph75 ], [ %47, %46 ]
  %40 = mul i64 %.054, %.074
  %41 = getelementptr inbounds %struct.ComplexFloat, ptr %38, i64 %40
  %42 = load float, ptr %41, align 4, !tbaa !20
  %43 = fcmp ugt float %42, 0.000000e+00
  br i1 %43, label %46, label %44

44:                                               ; preds = %39
  store i8 0, ptr %2, align 4, !tbaa !5
  store i32 -5, ptr %7, align 4, !tbaa !16
  %45 = tail call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef nonnull dereferenceable(1) %8, i64 noundef 1024, ptr noundef nonnull @.str.1, i64 noundef %.074) #4
  br label %.loopexit

46:                                               ; preds = %39
  %47 = add nuw i64 %.074, 1
  %exitcond81.not = icmp eq i64 %47, %36
  br i1 %exitcond81.not, label %.loopexit, label %39, !llvm.loop !23

.loopexit:                                        ; preds = %46, %.preheader, %.thread59, %44, %35, %._crit_edge73, %3
  %.7 = phi i32 [ 0, %._crit_edge73 ], [ -1, %3 ], [ 0, %35 ], [ 0, %44 ], [ 0, %.thread59 ], [ 0, %.preheader ], [ 0, %46 ]
  ret i32 %.7
}

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #1

; Function Attrs: inlinehint nounwind uwtable
declare hidden <2 x float> @complex_float_subtract(<2 x float>, <2 x float>) local_unnamed_addr #2

; Function Attrs: inlinehint nounwind uwtable
declare hidden float @complex_float_abs(<2 x float>) local_unnamed_addr #2

; Function Attrs: nofree nounwind
declare noundef i32 @snprintf(ptr noalias nocapture noundef writeonly, i64 noundef, ptr nocapture noundef readonly, ...) local_unnamed_addr #3

attributes #0 = { nounwind uwtable "min-legal-vector-width"="64" "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 #1 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #2 = { inlinehint nounwind uwtable "min-legal-vector-width"="64" "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 = { nofree nounwind "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 #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, !7, i64 0}
!6 = !{!"", !7, i64 0, !10, i64 4, !8, i64 8}
!7 = !{!"_Bool", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!12, !13, i64 8}
!12 = !{!"quantum_geometric_metric_t", !10, i64 0, !13, i64 8, !14, i64 16, !7, i64 24, !14, i64 32, !10, i64 40}
!13 = !{!"long", !8, i64 0}
!14 = !{!"any pointer", !8, i64 0}
!15 = !{!12, !14, i64 16}
!16 = !{!6, !10, i64 4}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = distinct !{!19, !18}
!20 = !{!21, !22, i64 0}
!21 = !{!"", !22, i64 0, !22, i64 4}
!22 = !{!"float", !8, i64 0}
!23 = distinct !{!23, !18}


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