; LLVM IR from IBM/optimized-number-theoretic-transform-implementations :: src (ntt_radix4)

; 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.mul_op_s = type { i128, i128 }

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @collect_roots(ptr noundef, ptr noundef, ptr noundef, i64 noundef, i64 noundef) #1

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden i64 @reduce_8q_to_4q(i64 noundef, i64 noundef) #1

; Function Attrs: nounwind uwtable
define dso_local void @inv_ntt_radix4(ptr noundef %0, i64 noundef %1, i64 noundef %2, ptr noundef byval(%struct.mul_op_s) align 16 %3, ptr noundef %4, ptr noundef %5) #2 {
  %7 = alloca ptr, align 8
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  %14 = alloca [5 x %struct.mul_op_s], align 16
  %15 = alloca i64, align 8
  %16 = alloca i64, align 8
  %17 = alloca %struct.mul_op_s, align 16
  %18 = alloca i64, align 8
  %19 = alloca i32, align 4
  %20 = alloca i64, align 8
  %21 = alloca i64, align 8
  %22 = alloca i64, align 8
  store ptr %0, ptr %7, align 8, !tbaa !5
  store i64 %1, ptr %8, align 8, !tbaa !9
  store i64 %2, ptr %9, align 8, !tbaa !9
  store ptr %4, ptr %10, align 8, !tbaa !5
  store ptr %5, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #3
  store i64 1, ptr %12, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #3
  %23 = load i64, ptr %8, align 8, !tbaa !9
  store i64 %23, ptr %13, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 160, ptr %14) #3
  %24 = load i64, ptr %8, align 8, !tbaa !9
  %25 = and i64 %24, -6148914691236517206
  %26 = icmp ne i64 %25, 0
  br i1 %26, label %47, label %27

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

28:                                               ; preds = %43, %27
  %29 = load i64, ptr %15, align 8, !tbaa !9
  %30 = load i64, ptr %8, align 8, !tbaa !9
  %31 = icmp ult i64 %29, %30
  br i1 %31, label %33, label %32

32:                                               ; preds = %28
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #3
  br label %46

33:                                               ; preds = %28
  %34 = load ptr, ptr %7, align 8, !tbaa !5
  %35 = load i64, ptr %15, align 8, !tbaa !9
  %36 = getelementptr inbounds i64, ptr %34, i64 %35
  %37 = load i64, ptr %36, align 8, !tbaa !9
  %38 = load i64, ptr %9, align 8, !tbaa !9
  %39 = call i64 @reduce_8q_to_2q(i64 noundef %37, i64 noundef %38)
  %40 = load ptr, ptr %7, align 8, !tbaa !5
  %41 = load i64, ptr %15, align 8, !tbaa !9
  %42 = getelementptr inbounds i64, ptr %40, i64 %41
  store i64 %39, ptr %42, align 8, !tbaa !9
  br label %43

43:                                               ; preds = %33
  %44 = load i64, ptr %15, align 8, !tbaa !9
  %45 = add i64 %44, 1
  store i64 %45, ptr %15, align 8, !tbaa !9
  br label %28, !llvm.loop !11

46:                                               ; preds = %32
  br label %95

47:                                               ; preds = %6
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #3
  store i64 0, ptr %16, align 8, !tbaa !9
  br label %48

48:                                               ; preds = %87, %47
  %49 = load i64, ptr %16, align 8, !tbaa !9
  %50 = load i64, ptr %8, align 8, !tbaa !9
  %51 = icmp ult i64 %49, %50
  br i1 %51, label %53, label %52

52:                                               ; preds = %48
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #3
  br label %90

53:                                               ; preds = %48
  call void @llvm.lifetime.start.p0(i64 32, ptr %17) #3
  %54 = getelementptr inbounds %struct.mul_op_s, ptr %17, i32 0, i32 0
  %55 = load ptr, ptr %10, align 8, !tbaa !5
  %56 = load i64, ptr %8, align 8, !tbaa !9
  %57 = load i64, ptr %16, align 8, !tbaa !9
  %58 = add i64 %56, %57
  %59 = getelementptr inbounds i64, ptr %55, i64 %58
  %60 = load i64, ptr %59, align 8, !tbaa !9
  %61 = zext i64 %60 to i128
  store i128 %61, ptr %54, align 16, !tbaa !13
  %62 = getelementptr inbounds %struct.mul_op_s, ptr %17, i32 0, i32 1
  %63 = load ptr, ptr %11, align 8, !tbaa !5
  %64 = load i64, ptr %8, align 8, !tbaa !9
  %65 = load i64, ptr %16, align 8, !tbaa !9
  %66 = add i64 %64, %65
  %67 = getelementptr inbounds i64, ptr %63, i64 %66
  %68 = load i64, ptr %67, align 8, !tbaa !9
  %69 = zext i64 %68 to i128
  store i128 %69, ptr %62, align 16, !tbaa !16
  %70 = load ptr, ptr %7, align 8, !tbaa !5
  %71 = load i64, ptr %16, align 8, !tbaa !9
  %72 = getelementptr inbounds i64, ptr %70, i64 %71
  %73 = load i64, ptr %72, align 8, !tbaa !9
  %74 = load i64, ptr %9, align 8, !tbaa !9
  %75 = call i64 @reduce_8q_to_4q(i64 noundef %73, i64 noundef %74)
  %76 = load ptr, ptr %7, align 8, !tbaa !5
  %77 = load i64, ptr %16, align 8, !tbaa !9
  %78 = getelementptr inbounds i64, ptr %76, i64 %77
  store i64 %75, ptr %78, align 8, !tbaa !9
  %79 = load ptr, ptr %7, align 8, !tbaa !5
  %80 = load i64, ptr %16, align 8, !tbaa !9
  %81 = getelementptr inbounds i64, ptr %79, i64 %80
  %82 = load ptr, ptr %7, align 8, !tbaa !5
  %83 = load i64, ptr %16, align 8, !tbaa !9
  %84 = add i64 %83, 1
  %85 = getelementptr inbounds i64, ptr %82, i64 %84
  %86 = load i64, ptr %9, align 8, !tbaa !9
  call void @harvey_bkw_butterfly(ptr noundef %81, ptr noundef %85, ptr noundef byval(%struct.mul_op_s) align 16 %17, i64 noundef %86)
  call void @llvm.lifetime.end.p0(i64 32, ptr %17) #3
  br label %87

87:                                               ; preds = %53
  %88 = load i64, ptr %16, align 8, !tbaa !9
  %89 = add i64 %88, 2
  store i64 %89, ptr %16, align 8, !tbaa !9
  br label %48, !llvm.loop !17

90:                                               ; preds = %52
  %91 = load i64, ptr %13, align 8, !tbaa !9
  %92 = lshr i64 %91, 1
  store i64 %92, ptr %13, align 8, !tbaa !9
  %93 = load i64, ptr %12, align 8, !tbaa !9
  %94 = shl i64 %93, 1
  store i64 %94, ptr %12, align 8, !tbaa !9
  br label %95

95:                                               ; preds = %90, %46
  %96 = load i64, ptr %13, align 8, !tbaa !9
  %97 = lshr i64 %96, 2
  store i64 %97, ptr %13, align 8, !tbaa !9
  br label %98

98:                                               ; preds = %158, %95
  %99 = load i64, ptr %13, align 8, !tbaa !9
  %100 = icmp ugt i64 %99, 0
  br i1 %100, label %101, label %161

101:                                              ; preds = %98
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #3
  store i64 0, ptr %18, align 8, !tbaa !9
  br label %102

102:                                              ; preds = %152, %101
  %103 = load i64, ptr %18, align 8, !tbaa !9
  %104 = load i64, ptr %13, align 8, !tbaa !9
  %105 = icmp ult i64 %103, %104
  br i1 %105, label %107, label %106

106:                                              ; preds = %102
  store i32 11, ptr %19, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #3
  br label %155

107:                                              ; preds = %102
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #3
  %108 = load i64, ptr %12, align 8, !tbaa !9
  %109 = mul i64 4, %108
  %110 = load i64, ptr %18, align 8, !tbaa !9
  %111 = mul i64 %109, %110
  store i64 %111, ptr %20, align 8, !tbaa !9
  %112 = getelementptr inbounds [5 x %struct.mul_op_s], ptr %14, i64 0, i64 0
  %113 = load ptr, ptr %10, align 8, !tbaa !5
  %114 = load ptr, ptr %11, align 8, !tbaa !5
  %115 = load i64, ptr %13, align 8, !tbaa !9
  %116 = load i64, ptr %18, align 8, !tbaa !9
  call void @collect_roots(ptr noundef %112, ptr noundef %113, ptr noundef %114, i64 noundef %115, i64 noundef %116)
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #3
  %117 = load i64, ptr %20, align 8, !tbaa !9
  store i64 %117, ptr %21, align 8, !tbaa !9
  br label %118

118:                                              ; preds = %148, %107
  %119 = load i64, ptr %21, align 8, !tbaa !9
  %120 = load i64, ptr %20, align 8, !tbaa !9
  %121 = load i64, ptr %12, align 8, !tbaa !9
  %122 = add i64 %120, %121
  %123 = icmp ult i64 %119, %122
  br i1 %123, label %125, label %124

124:                                              ; preds = %118
  store i32 14, ptr %19, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #3
  br label %151

125:                                              ; preds = %118
  %126 = load ptr, ptr %7, align 8, !tbaa !5
  %127 = load i64, ptr %21, align 8, !tbaa !9
  %128 = getelementptr inbounds i64, ptr %126, i64 %127
  %129 = load ptr, ptr %7, align 8, !tbaa !5
  %130 = load i64, ptr %21, align 8, !tbaa !9
  %131 = load i64, ptr %12, align 8, !tbaa !9
  %132 = add i64 %130, %131
  %133 = getelementptr inbounds i64, ptr %129, i64 %132
  %134 = load ptr, ptr %7, align 8, !tbaa !5
  %135 = load i64, ptr %21, align 8, !tbaa !9
  %136 = load i64, ptr %12, align 8, !tbaa !9
  %137 = mul i64 2, %136
  %138 = add i64 %135, %137
  %139 = getelementptr inbounds i64, ptr %134, i64 %138
  %140 = load ptr, ptr %7, align 8, !tbaa !5
  %141 = load i64, ptr %21, align 8, !tbaa !9
  %142 = load i64, ptr %12, align 8, !tbaa !9
  %143 = mul i64 3, %142
  %144 = add i64 %141, %143
  %145 = getelementptr inbounds i64, ptr %140, i64 %144
  %146 = getelementptr inbounds [5 x %struct.mul_op_s], ptr %14, i64 0, i64 0
  %147 = load i64, ptr %9, align 8, !tbaa !9
  call void @radix4_inv_butterfly(ptr noundef %128, ptr noundef %133, ptr noundef %139, ptr noundef %145, ptr noundef %146, i64 noundef %147)
  br label %148

148:                                              ; preds = %125
  %149 = load i64, ptr %21, align 8, !tbaa !9
  %150 = add i64 %149, 1
  store i64 %150, ptr %21, align 8, !tbaa !9
  br label %118, !llvm.loop !18

151:                                              ; preds = %124
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #3
  br label %152

152:                                              ; preds = %151
  %153 = load i64, ptr %18, align 8, !tbaa !9
  %154 = add i64 %153, 1
  store i64 %154, ptr %18, align 8, !tbaa !9
  br label %102, !llvm.loop !19

155:                                              ; preds = %106
  %156 = load i64, ptr %12, align 8, !tbaa !9
  %157 = shl i64 %156, 2
  store i64 %157, ptr %12, align 8, !tbaa !9
  br label %158

158:                                              ; preds = %155
  %159 = load i64, ptr %13, align 8, !tbaa !9
  %160 = lshr i64 %159, 2
  store i64 %160, ptr %13, align 8, !tbaa !9
  br label %98, !llvm.loop !20

161:                                              ; preds = %98
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #3
  store i64 0, ptr %22, align 8, !tbaa !9
  br label %162

162:                                              ; preds = %177, %161
  %163 = load i64, ptr %22, align 8, !tbaa !9
  %164 = load i64, ptr %8, align 8, !tbaa !9
  %165 = icmp ult i64 %163, %164
  br i1 %165, label %167, label %166

166:                                              ; preds = %162
  store i32 17, ptr %19, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #3
  br label %180

167:                                              ; preds = %162
  %168 = load ptr, ptr %7, align 8, !tbaa !5
  %169 = load i64, ptr %22, align 8, !tbaa !9
  %170 = getelementptr inbounds i64, ptr %168, i64 %169
  %171 = load i64, ptr %170, align 8, !tbaa !9
  %172 = load i64, ptr %9, align 8, !tbaa !9
  %173 = call i64 @fast_mul_mod_q(ptr noundef byval(%struct.mul_op_s) align 16 %3, i64 noundef %171, i64 noundef %172)
  %174 = load ptr, ptr %7, align 8, !tbaa !5
  %175 = load i64, ptr %22, align 8, !tbaa !9
  %176 = getelementptr inbounds i64, ptr %174, i64 %175
  store i64 %173, ptr %176, align 8, !tbaa !9
  br label %177

177:                                              ; preds = %167
  %178 = load i64, ptr %22, align 8, !tbaa !9
  %179 = add i64 %178, 1
  store i64 %179, ptr %22, align 8, !tbaa !9
  br label %162, !llvm.loop !21

180:                                              ; preds = %166
  call void @llvm.lifetime.end.p0(i64 160, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #3
  ret void
}

; Function Attrs: inlinehint nounwind uwtable
declare hidden i64 @reduce_8q_to_2q(i64 noundef, i64 noundef) #1

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @harvey_bkw_butterfly(ptr noundef, ptr noundef, ptr noundef byval(%struct.mul_op_s) align 16, i64 noundef) #1

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @radix4_inv_butterfly(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, i64 noundef) #1

; Function Attrs: inlinehint nounwind uwtable
declare hidden i64 @fast_mul_mod_q(ptr noundef byval(%struct.mul_op_s) align 16, i64 noundef, i64 noundef) #1

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { inlinehint 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 = { 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 = !{!"long", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!14, !15, i64 0}
!14 = !{!"mul_op_s", !15, i64 0, !15, i64 16}
!15 = !{!"__int128", !7, i64 0}
!16 = !{!14, !15, i64 16}
!17 = distinct !{!17, !12}
!18 = distinct !{!18, !12}
!19 = distinct !{!19, !12}
!20 = distinct !{!20, !12}
!21 = distinct !{!21, !12}


; 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.mul_op_s = type { i128, i128 }

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @collect_roots(ptr noundef, ptr noundef, ptr noundef, i64 noundef, i64 noundef) local_unnamed_addr #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: inlinehint nounwind uwtable
declare hidden i64 @reduce_8q_to_4q(i64 noundef, i64 noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local void @inv_ntt_radix4(ptr noundef %0, i64 noundef %1, i64 noundef %2, ptr noundef byval(%struct.mul_op_s) align 16 %3, ptr noundef %4, ptr noundef %5) local_unnamed_addr #2 {
  %7 = alloca [5 x %struct.mul_op_s], align 16
  %8 = alloca %struct.mul_op_s, align 16
  call void @llvm.lifetime.start.p0(i64 160, ptr nonnull %7) #3
  %9 = and i64 %1, -6148914691236517206
  %.not = icmp eq i64 %9, 0
  br i1 %.not, label %.preheader80, label %.lr.ph

.lr.ph:                                           ; preds = %6
  %10 = getelementptr inbounds i8, ptr %8, i64 16
  br label %16

.preheader80:                                     ; preds = %6
  %.not100 = icmp eq i64 %1, 0
  br i1 %.not100, label %._crit_edge98, label %.lr.ph84

.lr.ph84:                                         ; preds = %.preheader80, %.lr.ph84
  %.07283 = phi i64 [ %14, %.lr.ph84 ], [ 0, %.preheader80 ]
  %11 = getelementptr inbounds i64, ptr %0, i64 %.07283
  %12 = load i64, ptr %11, align 8, !tbaa !5
  %13 = tail call i64 @reduce_8q_to_2q(i64 noundef %12, i64 noundef %2)
  store i64 %13, ptr %11, align 8, !tbaa !5
  %14 = add nuw i64 %.07283, 1
  %exitcond.not = icmp eq i64 %14, %1
  br i1 %exitcond.not, label %.loopexit, label %.lr.ph84, !llvm.loop !9

._crit_edge:                                      ; preds = %16
  %15 = lshr i64 %1, 1
  br label %.loopexit

16:                                               ; preds = %.lr.ph, %16
  %.07182 = phi i64 [ 0, %.lr.ph ], [ %29, %16 ]
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %8) #3
  %17 = add i64 %.07182, %1
  %18 = getelementptr inbounds i64, ptr %4, i64 %17
  %19 = load i64, ptr %18, align 8, !tbaa !5
  %20 = zext i64 %19 to i128
  store i128 %20, ptr %8, align 16, !tbaa !11
  %21 = getelementptr inbounds i64, ptr %5, i64 %17
  %22 = load i64, ptr %21, align 8, !tbaa !5
  %23 = zext i64 %22 to i128
  store i128 %23, ptr %10, align 16, !tbaa !14
  %24 = getelementptr inbounds i64, ptr %0, i64 %.07182
  %25 = load i64, ptr %24, align 8, !tbaa !5
  %26 = tail call i64 @reduce_8q_to_4q(i64 noundef %25, i64 noundef %2)
  store i64 %26, ptr %24, align 8, !tbaa !5
  %27 = or disjoint i64 %.07182, 1
  %28 = getelementptr inbounds i64, ptr %0, i64 %27
  tail call void @harvey_bkw_butterfly(ptr noundef nonnull %24, ptr noundef nonnull %28, ptr noundef nonnull byval(%struct.mul_op_s) align 16 %8, i64 noundef %2)
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #3
  %29 = add i64 %.07182, 2
  %30 = icmp ult i64 %29, %1
  br i1 %30, label %16, label %._crit_edge, !llvm.loop !15

.loopexit:                                        ; preds = %.lr.ph84, %._crit_edge
  %.073 = phi i64 [ %15, %._crit_edge ], [ %1, %.lr.ph84 ]
  %.069 = phi i64 [ 2, %._crit_edge ], [ 1, %.lr.ph84 ]
  %.not7793 = icmp ult i64 %.073, 4
  br i1 %.not7793, label %.lr.ph97.preheader, label %.preheader79

.preheader79:                                     ; preds = %.loopexit, %._crit_edge91
  %.17495.in = phi i64 [ %.17495, %._crit_edge91 ], [ %.073, %.loopexit ]
  %.194 = phi i64 [ %31, %._crit_edge91 ], [ %.069, %.loopexit ]
  %.17495 = lshr i64 %.17495.in, 2
  %.not101 = icmp ult i64 %.17495.in, 4
  br i1 %.not101, label %.preheader, label %.lr.ph90

.lr.ph90:                                         ; preds = %.preheader79
  %31 = shl i64 %.194, 2
  %.idx = shl i64 %.194, 4
  %.idx78 = mul i64 %.194, 24
  br label %32

.preheader:                                       ; preds = %.preheader79, %._crit_edge91
  %.not102 = icmp eq i64 %1, 0
  br i1 %.not102, label %._crit_edge98, label %.lr.ph97.preheader

.lr.ph97.preheader:                               ; preds = %.loopexit, %.preheader
  br label %.lr.ph97

._crit_edge91:                                    ; preds = %._crit_edge88
  %.not77 = icmp ult i64 %.17495.in, 16
  br i1 %.not77, label %.preheader, label %.preheader79, !llvm.loop !16

32:                                               ; preds = %.lr.ph90, %._crit_edge88
  %indvars.iv = phi i64 [ %.194, %.lr.ph90 ], [ %indvars.iv.next, %._crit_edge88 ]
  %.07089 = phi i64 [ 0, %.lr.ph90 ], [ %36, %._crit_edge88 ]
  %33 = mul i64 %.07089, %31
  call void @collect_roots(ptr noundef nonnull %7, ptr noundef %4, ptr noundef %5, i64 noundef %.17495, i64 noundef %.07089)
  %34 = add i64 %33, %.194
  %35 = icmp ult i64 %33, %34
  br i1 %35, label %.lr.ph87, label %._crit_edge88

._crit_edge88:                                    ; preds = %.lr.ph87, %32
  %36 = add nuw nsw i64 %.07089, 1
  %indvars.iv.next = add i64 %indvars.iv, %31
  %exitcond104.not = icmp eq i64 %36, %.17495
  br i1 %exitcond104.not, label %._crit_edge91, label %32, !llvm.loop !17

.lr.ph87:                                         ; preds = %32, %.lr.ph87
  %.06885 = phi i64 [ %41, %.lr.ph87 ], [ %33, %32 ]
  %37 = getelementptr inbounds i64, ptr %0, i64 %.06885
  %38 = getelementptr i64, ptr %37, i64 %.194
  %39 = getelementptr i8, ptr %37, i64 %.idx
  %40 = getelementptr i8, ptr %37, i64 %.idx78
  call void @radix4_inv_butterfly(ptr noundef %37, ptr noundef %38, ptr noundef %39, ptr noundef %40, ptr noundef nonnull %7, i64 noundef %2)
  %41 = add i64 %.06885, 1
  %exitcond103.not = icmp eq i64 %41, %indvars.iv
  br i1 %exitcond103.not, label %._crit_edge88, label %.lr.ph87, !llvm.loop !18

._crit_edge98:                                    ; preds = %.lr.ph97, %.preheader80, %.preheader
  call void @llvm.lifetime.end.p0(i64 160, ptr nonnull %7) #3
  ret void

.lr.ph97:                                         ; preds = %.lr.ph97.preheader, %.lr.ph97
  %.096 = phi i64 [ %45, %.lr.ph97 ], [ 0, %.lr.ph97.preheader ]
  %42 = getelementptr inbounds i64, ptr %0, i64 %.096
  %43 = load i64, ptr %42, align 8, !tbaa !5
  %44 = call i64 @fast_mul_mod_q(ptr noundef nonnull byval(%struct.mul_op_s) align 16 %3, i64 noundef %43, i64 noundef %2)
  store i64 %44, ptr %42, align 8, !tbaa !5
  %45 = add nuw i64 %.096, 1
  %exitcond105.not = icmp eq i64 %45, %1
  br i1 %exitcond105.not, label %._crit_edge98, label %.lr.ph97, !llvm.loop !19
}

; Function Attrs: inlinehint nounwind uwtable
declare hidden i64 @reduce_8q_to_2q(i64 noundef, i64 noundef) local_unnamed_addr #1

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @harvey_bkw_butterfly(ptr noundef, ptr noundef, ptr noundef byval(%struct.mul_op_s) align 16, i64 noundef) local_unnamed_addr #1

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @radix4_inv_butterfly(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #1

; Function Attrs: inlinehint nounwind uwtable
declare hidden i64 @fast_mul_mod_q(ptr noundef byval(%struct.mul_op_s) align 16, i64 noundef, i64 noundef) local_unnamed_addr #1

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { inlinehint 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 = { 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 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!12, !13, i64 0}
!12 = !{!"mul_op_s", !13, i64 0, !13, i64 16}
!13 = !{!"__int128", !7, i64 0}
!14 = !{!12, !13, i64 16}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10}
!17 = distinct !{!17, !10}
!18 = distinct !{!18, !10}
!19 = distinct !{!19, !10}


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