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

; 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.quantum_geometric_tensor_network = type { ptr, ptr, i64, i64, i8, i8 }
%struct.quantum_circuit_t = type { ptr, i64, i64, i8 }
%struct.circuit_layer_t = type { ptr, i64, i8 }
%struct.quantum_gate_t = type { i64, ptr, ptr, ptr, i64, i8, i32, ptr, i64, i8 }

@.str.6 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [39 x i8], align 1

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

; Function Attrs: nounwind uwtable
declare hidden void @set_error(ptr noundef) #1

declare zeroext i1 @add_tensor_node(ptr noundef, ptr noundef, ptr noundef, i64 noundef, ptr noundef) #2

; 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
define dso_local zeroext i1 @apply_quantum_gate(ptr noundef %0, ptr noundef %1, ptr noundef %2, i64 noundef %3) #1 {
  %5 = alloca i1, align 1
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca i64, align 8
  %15 = alloca i64, align 8
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store ptr %2, ptr %8, align 8, !tbaa !5
  store i64 %3, ptr %9, align 8, !tbaa !9
  %16 = load ptr, ptr %6, align 8, !tbaa !5
  %17 = icmp ne ptr %16, null
  br i1 %17, label %18, label %27

18:                                               ; preds = %4
  %19 = load ptr, ptr %7, align 8, !tbaa !5
  %20 = icmp ne ptr %19, null
  br i1 %20, label %21, label %27

21:                                               ; preds = %18
  %22 = load ptr, ptr %8, align 8, !tbaa !5
  %23 = icmp ne ptr %22, null
  br i1 %23, label %24, label %27

24:                                               ; preds = %21
  %25 = load i64, ptr %9, align 8, !tbaa !9
  %26 = icmp eq i64 %25, 0
  br i1 %26, label %27, label %28

27:                                               ; preds = %24, %21, %18, %4
  call void @set_error(ptr noundef @.str.6)
  store i1 false, ptr %5, align 1
  br label %136

28:                                               ; preds = %24
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #3
  %29 = load ptr, ptr %6, align 8, !tbaa !5
  %30 = getelementptr inbounds %struct.quantum_geometric_tensor_network, ptr %29, i32 0, i32 3
  %31 = load i64, ptr %30, align 8, !tbaa !11
  %32 = sub i64 %31, 1
  store i64 %32, ptr %10, align 8, !tbaa !9
  %33 = load ptr, ptr %6, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct.quantum_geometric_tensor_network, ptr %33, i32 0, i32 1
  %35 = load ptr, ptr %34, align 8, !tbaa !14
  %36 = getelementptr inbounds %struct.quantum_circuit_t, ptr %35, i32 0, i32 0
  %37 = load ptr, ptr %36, align 8, !tbaa !15
  %38 = load i64, ptr %10, align 8, !tbaa !9
  %39 = getelementptr inbounds ptr, ptr %37, i64 %38
  %40 = load ptr, ptr %39, align 8, !tbaa !5
  %41 = icmp ne ptr %40, null
  br i1 %41, label %62, label %42

42:                                               ; preds = %28
  %43 = call ptr @create_circuit_layer()
  %44 = load ptr, ptr %6, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.quantum_geometric_tensor_network, ptr %44, i32 0, i32 1
  %46 = load ptr, ptr %45, align 8, !tbaa !14
  %47 = getelementptr inbounds %struct.quantum_circuit_t, ptr %46, i32 0, i32 0
  %48 = load ptr, ptr %47, align 8, !tbaa !15
  %49 = load i64, ptr %10, align 8, !tbaa !9
  %50 = getelementptr inbounds ptr, ptr %48, i64 %49
  store ptr %43, ptr %50, align 8, !tbaa !5
  %51 = load ptr, ptr %6, align 8, !tbaa !5
  %52 = getelementptr inbounds %struct.quantum_geometric_tensor_network, ptr %51, i32 0, i32 1
  %53 = load ptr, ptr %52, align 8, !tbaa !14
  %54 = getelementptr inbounds %struct.quantum_circuit_t, ptr %53, i32 0, i32 0
  %55 = load ptr, ptr %54, align 8, !tbaa !15
  %56 = load i64, ptr %10, align 8, !tbaa !9
  %57 = getelementptr inbounds ptr, ptr %55, i64 %56
  %58 = load ptr, ptr %57, align 8, !tbaa !5
  %59 = icmp ne ptr %58, null
  br i1 %59, label %61, label %60

60:                                               ; preds = %42
  call void @set_error(ptr noundef @.str.7)
  store i1 false, ptr %5, align 1
  store i32 1, ptr %11, align 4
  br label %135

61:                                               ; preds = %42
  br label %62

62:                                               ; preds = %61, %28
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #3
  %63 = load ptr, ptr %7, align 8, !tbaa !5
  %64 = call ptr @copy_quantum_gate(ptr noundef %63)
  store ptr %64, ptr %12, align 8, !tbaa !5
  %65 = load ptr, ptr %12, align 8, !tbaa !5
  %66 = icmp ne ptr %65, null
  br i1 %66, label %68, label %67

67:                                               ; preds = %62
  call void @set_error(ptr noundef @.str.8)
  store i1 false, ptr %5, align 1
  store i32 1, ptr %11, align 4
  br label %134

68:                                               ; preds = %62
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #3
  %69 = load ptr, ptr %6, align 8, !tbaa !5
  %70 = getelementptr inbounds %struct.quantum_geometric_tensor_network, ptr %69, i32 0, i32 1
  %71 = load ptr, ptr %70, align 8, !tbaa !14
  %72 = getelementptr inbounds %struct.quantum_circuit_t, ptr %71, i32 0, i32 0
  %73 = load ptr, ptr %72, align 8, !tbaa !15
  %74 = load i64, ptr %10, align 8, !tbaa !9
  %75 = getelementptr inbounds ptr, ptr %73, i64 %74
  %76 = load ptr, ptr %75, align 8, !tbaa !5
  store ptr %76, ptr %13, align 8, !tbaa !5
  %77 = load ptr, ptr %12, align 8, !tbaa !5
  %78 = load ptr, ptr %13, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct.circuit_layer_t, ptr %78, i32 0, i32 0
  %80 = load ptr, ptr %79, align 8, !tbaa !17
  %81 = load ptr, ptr %13, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct.circuit_layer_t, ptr %81, i32 0, i32 1
  %83 = load i64, ptr %82, align 8, !tbaa !19
  %84 = add i64 %83, 1
  store i64 %84, ptr %82, align 8, !tbaa !19
  %85 = getelementptr inbounds ptr, ptr %80, i64 %83
  store ptr %77, ptr %85, align 8, !tbaa !5
  %86 = load ptr, ptr %12, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct.quantum_gate_t, ptr %86, i32 0, i32 9
  %88 = load i8, ptr %87, align 8, !tbaa !20, !range !23, !noundef !24
  %89 = trunc i8 %88 to i1
  br i1 %89, label %90, label %97

90:                                               ; preds = %68
  %91 = load ptr, ptr %13, align 8, !tbaa !5
  %92 = getelementptr inbounds %struct.circuit_layer_t, ptr %91, i32 0, i32 2
  store i8 1, ptr %92, align 8, !tbaa !25
  %93 = load ptr, ptr %6, align 8, !tbaa !5
  %94 = getelementptr inbounds %struct.quantum_geometric_tensor_network, ptr %93, i32 0, i32 1
  %95 = load ptr, ptr %94, align 8, !tbaa !14
  %96 = getelementptr inbounds %struct.quantum_circuit_t, ptr %95, i32 0, i32 3
  store i8 1, ptr %96, align 8, !tbaa !26
  br label %97

97:                                               ; preds = %90, %68
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #3
  %98 = load ptr, ptr %6, align 8, !tbaa !5
  %99 = getelementptr inbounds %struct.quantum_geometric_tensor_network, ptr %98, i32 0, i32 0
  %100 = load ptr, ptr %99, align 8, !tbaa !27
  %101 = load ptr, ptr %7, align 8, !tbaa !5
  %102 = getelementptr inbounds %struct.quantum_gate_t, ptr %101, i32 0, i32 1
  %103 = load ptr, ptr %102, align 8, !tbaa !28
  %104 = load ptr, ptr %7, align 8, !tbaa !5
  %105 = getelementptr inbounds %struct.quantum_gate_t, ptr %104, i32 0, i32 0
  %106 = call zeroext i1 @add_tensor_node(ptr noundef %100, ptr noundef %103, ptr noundef %105, i64 noundef 1, ptr noundef %14)
  br i1 %106, label %108, label %107

107:                                              ; preds = %97
  call void @set_error(ptr noundef @.str.9)
  store i1 false, ptr %5, align 1
  store i32 1, ptr %11, align 4
  br label %133

108:                                              ; preds = %97
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #3
  store i64 0, ptr %15, align 8, !tbaa !9
  br label %109

109:                                              ; preds = %127, %108
  %110 = load i64, ptr %15, align 8, !tbaa !9
  %111 = load i64, ptr %9, align 8, !tbaa !9
  %112 = icmp ult i64 %110, %111
  br i1 %112, label %114, label %113

113:                                              ; preds = %109
  store i32 2, ptr %11, align 4
  br label %130

114:                                              ; preds = %109
  %115 = load ptr, ptr %6, align 8, !tbaa !5
  %116 = getelementptr inbounds %struct.quantum_geometric_tensor_network, ptr %115, i32 0, i32 0
  %117 = load ptr, ptr %116, align 8, !tbaa !27
  %118 = load i64, ptr %14, align 8, !tbaa !9
  %119 = load i64, ptr %15, align 8, !tbaa !9
  %120 = load ptr, ptr %8, align 8, !tbaa !5
  %121 = load i64, ptr %15, align 8, !tbaa !9
  %122 = getelementptr inbounds i64, ptr %120, i64 %121
  %123 = load i64, ptr %122, align 8, !tbaa !9
  %124 = call zeroext i1 @connect_tensor_nodes(ptr noundef %117, i64 noundef %118, i64 noundef %119, i64 noundef %123, i64 noundef 0)
  br i1 %124, label %126, label %125

125:                                              ; preds = %114
  call void @set_error(ptr noundef @.str.10)
  store i1 false, ptr %5, align 1
  store i32 1, ptr %11, align 4
  br label %130

126:                                              ; preds = %114
  br label %127

127:                                              ; preds = %126
  %128 = load i64, ptr %15, align 8, !tbaa !9
  %129 = add i64 %128, 1
  store i64 %129, ptr %15, align 8, !tbaa !9
  br label %109, !llvm.loop !29

130:                                              ; preds = %125, %113
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #3
  %131 = load i32, ptr %11, align 4
  switch i32 %131, label %133 [
    i32 2, label %132
  ]

132:                                              ; preds = %130
  store i1 true, ptr %5, align 1
  store i32 1, ptr %11, align 4
  br label %133

133:                                              ; preds = %132, %130, %107
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #3
  br label %134

134:                                              ; preds = %133, %67
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #3
  br label %135

135:                                              ; preds = %134, %60
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  br label %136

136:                                              ; preds = %135, %27
  %137 = load i1, ptr %5, align 1
  ret i1 %137
}

; Function Attrs: nounwind uwtable
declare hidden ptr @create_circuit_layer() #1

; Function Attrs: nounwind uwtable
declare hidden ptr @copy_quantum_gate(ptr noundef) #1

declare zeroext i1 @connect_tensor_nodes(ptr noundef, i64 noundef, i64 noundef, i64 noundef, i64 noundef) #2

attributes #0 = { 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 = { "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 = !{!"long", !7, i64 0}
!11 = !{!12, !10, i64 24}
!12 = !{!"quantum_geometric_tensor_network", !6, i64 0, !6, i64 8, !10, i64 16, !10, i64 24, !13, i64 32, !13, i64 33}
!13 = !{!"_Bool", !7, i64 0}
!14 = !{!12, !6, i64 8}
!15 = !{!16, !6, i64 0}
!16 = !{!"quantum_circuit_t", !6, i64 0, !10, i64 8, !10, i64 16, !13, i64 24}
!17 = !{!18, !6, i64 0}
!18 = !{!"circuit_layer_t", !6, i64 0, !10, i64 8, !13, i64 16}
!19 = !{!18, !10, i64 8}
!20 = !{!21, !13, i64 64}
!21 = !{!"quantum_gate_t", !10, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !10, i64 32, !13, i64 40, !22, i64 44, !6, i64 48, !10, i64 56, !13, i64 64}
!22 = !{!"int", !7, i64 0}
!23 = !{i8 0, i8 2}
!24 = !{}
!25 = !{!18, !13, i64 16}
!26 = !{!16, !13, i64 24}
!27 = !{!12, !6, i64 0}
!28 = !{!21, !6, i64 8}
!29 = distinct !{!29, !30}
!30 = !{!"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"

@.str.6 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [39 x i8], align 1

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

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

declare zeroext i1 @add_tensor_node(ptr noundef, ptr noundef, ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #2

; 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
define dso_local noundef zeroext i1 @apply_quantum_gate(ptr noundef readonly %0, ptr noundef %1, ptr noundef readonly %2, i64 noundef %3) local_unnamed_addr #1 {
  %5 = alloca i64, align 8
  %6 = icmp eq ptr %0, null
  %7 = icmp eq ptr %1, null
  %or.cond.not44 = or i1 %6, %7
  %8 = icmp eq ptr %2, null
  %or.cond3.not41 = or i1 %or.cond.not44, %8
  %9 = icmp eq i64 %3, 0
  %or.cond5 = or i1 %or.cond3.not41, %9
  br i1 %or.cond5, label %10, label %11

10:                                               ; preds = %4
  tail call void @set_error(ptr noundef nonnull @.str.6)
  br label %62

11:                                               ; preds = %4
  %12 = getelementptr inbounds i8, ptr %0, i64 24
  %13 = load i64, ptr %12, align 8, !tbaa !5
  %14 = add i64 %13, -1
  %15 = getelementptr inbounds i8, ptr %0, i64 8
  %16 = load ptr, ptr %15, align 8, !tbaa !12
  %17 = load ptr, ptr %16, align 8, !tbaa !13
  %18 = getelementptr inbounds ptr, ptr %17, i64 %14
  %19 = load ptr, ptr %18, align 8, !tbaa !15
  %.not = icmp eq ptr %19, null
  br i1 %.not, label %20, label %30

20:                                               ; preds = %11
  %21 = tail call ptr @create_circuit_layer()
  %22 = load ptr, ptr %15, align 8, !tbaa !12
  %23 = load ptr, ptr %22, align 8, !tbaa !13
  %24 = getelementptr inbounds ptr, ptr %23, i64 %14
  store ptr %21, ptr %24, align 8, !tbaa !15
  %25 = load ptr, ptr %15, align 8, !tbaa !12
  %26 = load ptr, ptr %25, align 8, !tbaa !13
  %27 = getelementptr inbounds ptr, ptr %26, i64 %14
  %28 = load ptr, ptr %27, align 8, !tbaa !15
  %.not45 = icmp eq ptr %28, null
  br i1 %.not45, label %29, label %30

29:                                               ; preds = %20
  tail call void @set_error(ptr noundef nonnull @.str.7)
  br label %62

30:                                               ; preds = %20, %11
  %31 = tail call ptr @copy_quantum_gate(ptr noundef nonnull %1)
  %.not46 = icmp eq ptr %31, null
  br i1 %.not46, label %32, label %33

32:                                               ; preds = %30
  tail call void @set_error(ptr noundef nonnull @.str.8)
  br label %62

33:                                               ; preds = %30
  %34 = load ptr, ptr %15, align 8, !tbaa !12
  %35 = load ptr, ptr %34, align 8, !tbaa !13
  %36 = getelementptr inbounds ptr, ptr %35, i64 %14
  %37 = load ptr, ptr %36, align 8, !tbaa !15
  %38 = load ptr, ptr %37, align 8, !tbaa !16
  %39 = getelementptr inbounds i8, ptr %37, i64 8
  %40 = load i64, ptr %39, align 8, !tbaa !18
  %41 = add i64 %40, 1
  store i64 %41, ptr %39, align 8, !tbaa !18
  %42 = getelementptr inbounds ptr, ptr %38, i64 %40
  store ptr %31, ptr %42, align 8, !tbaa !15
  %43 = getelementptr inbounds i8, ptr %31, i64 64
  %44 = load i8, ptr %43, align 8, !tbaa !19, !range !22, !noundef !23
  %45 = trunc nuw i8 %44 to i1
  br i1 %45, label %46, label %50

46:                                               ; preds = %33
  %47 = getelementptr inbounds i8, ptr %37, i64 16
  store i8 1, ptr %47, align 8, !tbaa !24
  %48 = load ptr, ptr %15, align 8, !tbaa !12
  %49 = getelementptr inbounds i8, ptr %48, i64 24
  store i8 1, ptr %49, align 8, !tbaa !25
  br label %50

50:                                               ; preds = %46, %33
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #3
  %51 = load ptr, ptr %0, align 8, !tbaa !26
  %52 = getelementptr inbounds i8, ptr %1, i64 8
  %53 = load ptr, ptr %52, align 8, !tbaa !27
  %54 = call zeroext i1 @add_tensor_node(ptr noundef %51, ptr noundef %53, ptr noundef nonnull %1, i64 noundef 1, ptr noundef nonnull %5) #3
  br i1 %54, label %.lr.ph, label %.loopexit.sink.split

55:                                               ; preds = %.lr.ph
  %56 = add nuw i64 %.050, 1
  %exitcond = icmp eq i64 %56, %3
  br i1 %exitcond, label %.loopexit, label %.lr.ph, !llvm.loop !28

.lr.ph:                                           ; preds = %50, %55
  %.050 = phi i64 [ %56, %55 ], [ 0, %50 ]
  %57 = load ptr, ptr %0, align 8, !tbaa !26
  %58 = load i64, ptr %5, align 8, !tbaa !30
  %59 = getelementptr inbounds i64, ptr %2, i64 %.050
  %60 = load i64, ptr %59, align 8, !tbaa !30
  %61 = call zeroext i1 @connect_tensor_nodes(ptr noundef %57, i64 noundef %58, i64 noundef %.050, i64 noundef %60, i64 noundef 0) #3
  br i1 %61, label %55, label %.loopexit.sink.split

.loopexit.sink.split:                             ; preds = %.lr.ph, %50
  %.str.10.sink = phi ptr [ @.str.9, %50 ], [ @.str.10, %.lr.ph ]
  call void @set_error(ptr noundef nonnull %.str.10.sink)
  br label %.loopexit

.loopexit:                                        ; preds = %55, %.loopexit.sink.split
  %.1 = phi i1 [ false, %.loopexit.sink.split ], [ true, %55 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #3
  br label %62

62:                                               ; preds = %29, %.loopexit, %32, %10
  %.4 = phi i1 [ false, %10 ], [ false, %29 ], [ %.1, %.loopexit ], [ false, %32 ]
  ret i1 %.4
}

; Function Attrs: nounwind uwtable
declare hidden ptr @create_circuit_layer() local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare hidden ptr @copy_quantum_gate(ptr noundef) local_unnamed_addr #1

declare zeroext i1 @connect_tensor_nodes(ptr noundef, i64 noundef, i64 noundef, i64 noundef, i64 noundef) local_unnamed_addr #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 = { "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, !10, i64 24}
!6 = !{!"quantum_geometric_tensor_network", !7, i64 0, !7, i64 8, !10, i64 16, !10, i64 24, !11, i64 32, !11, i64 33}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"long", !8, i64 0}
!11 = !{!"_Bool", !8, i64 0}
!12 = !{!6, !7, i64 8}
!13 = !{!14, !7, i64 0}
!14 = !{!"quantum_circuit_t", !7, i64 0, !10, i64 8, !10, i64 16, !11, i64 24}
!15 = !{!7, !7, i64 0}
!16 = !{!17, !7, i64 0}
!17 = !{!"circuit_layer_t", !7, i64 0, !10, i64 8, !11, i64 16}
!18 = !{!17, !10, i64 8}
!19 = !{!20, !11, i64 64}
!20 = !{!"quantum_gate_t", !10, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !10, i64 32, !11, i64 40, !21, i64 44, !7, i64 48, !10, i64 56, !11, i64 64}
!21 = !{!"int", !8, i64 0}
!22 = !{i8 0, i8 2}
!23 = !{}
!24 = !{!17, !11, i64 16}
!25 = !{!14, !11, i64 24}
!26 = !{!6, !7, i64 0}
!27 = !{!20, !7, i64 8}
!28 = distinct !{!28, !29}
!29 = !{!"llvm.loop.mustprogress"}
!30 = !{!10, !10, i64 0}


; Effective O3 passes: ConstraintEliminationPass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LCSSAPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass