; LLVM IR from ShahjalalShohag/code-library :: Graph Theory/Number of Paths of Each Length in a Tree.ll (Z3fftRSt6vectorI4baseSaIS0_EEb)

; 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.base = type { double, double }

@_ZL2PI = external hidden global double, align 8

; Function Attrs: mustprogress uwtable
define dso_local void @_Z3fftRSt6vectorI4baseSaIS0_EEb(ptr noundef nonnull align 8 dereferenceable(24) %0, i1 noundef zeroext %1) #0 {
  %3 = alloca ptr, align 8
  %4 = alloca i8, align 1
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca double, align 8
  %13 = alloca %struct.base, align 8
  %14 = alloca %struct.base, align 8
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca %struct.base, align 8
  %19 = alloca %struct.base, align 8
  %20 = alloca %struct.base, align 8
  %21 = alloca %struct.base, align 8
  %22 = alloca %struct.base, align 8
  %23 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  %24 = zext i1 %1 to i8
  store i8 %24, ptr %4, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  %25 = load ptr, ptr %3, align 8, !tbaa !5
  %26 = call noundef i64 @_ZNKSt6vectorI4baseSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %25) #6
  %27 = trunc i64 %26 to i32
  store i32 %27, ptr %5, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  store i32 0, ptr %6, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  store i32 1, ptr %7, align 4, !tbaa !11
  br label %28

28:                                               ; preds = %62, %2
  %29 = load i32, ptr %7, align 4, !tbaa !11
  %30 = load i32, ptr %5, align 4, !tbaa !11
  %31 = sub nsw i32 %30, 1
  %32 = icmp slt i32 %29, %31
  br i1 %32, label %34, label %33

33:                                               ; preds = %28
  store i32 2, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  br label %65

34:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  %35 = load i32, ptr %5, align 4, !tbaa !11
  %36 = ashr i32 %35, 1
  store i32 %36, ptr %9, align 4, !tbaa !11
  br label %37

37:                                               ; preds = %45, %34
  %38 = load i32, ptr %9, align 4, !tbaa !11
  %39 = load i32, ptr %9, align 4, !tbaa !11
  %40 = load i32, ptr %6, align 4, !tbaa !11
  %41 = xor i32 %40, %39
  store i32 %41, ptr %6, align 4, !tbaa !11
  %42 = icmp sgt i32 %38, %41
  br i1 %42, label %44, label %43

43:                                               ; preds = %37
  store i32 5, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  br label %48

44:                                               ; preds = %37
  br label %45

45:                                               ; preds = %44
  %46 = load i32, ptr %9, align 4, !tbaa !11
  %47 = ashr i32 %46, 1
  store i32 %47, ptr %9, align 4, !tbaa !11
  br label %37, !llvm.loop !13

48:                                               ; preds = %43
  %49 = load i32, ptr %7, align 4, !tbaa !11
  %50 = load i32, ptr %6, align 4, !tbaa !11
  %51 = icmp slt i32 %49, %50
  br i1 %51, label %52, label %61

52:                                               ; preds = %48
  %53 = load ptr, ptr %3, align 8, !tbaa !5
  %54 = load i32, ptr %6, align 4, !tbaa !11
  %55 = sext i32 %54 to i64
  %56 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI4baseSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %53, i64 noundef %55) #6
  %57 = load ptr, ptr %3, align 8, !tbaa !5
  %58 = load i32, ptr %7, align 4, !tbaa !11
  %59 = sext i32 %58 to i64
  %60 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI4baseSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %57, i64 noundef %59) #6
  call void @_ZSt4swapI4baseENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS4_ESt18is_move_assignableIS4_EEE5valueEvE4typeERS4_SD_(ptr noundef nonnull align 8 dereferenceable(16) %56, ptr noundef nonnull align 8 dereferenceable(16) %60) #6
  br label %61

61:                                               ; preds = %52, %48
  br label %62

62:                                               ; preds = %61
  %63 = load i32, ptr %7, align 4, !tbaa !11
  %64 = add nsw i32 %63, 1
  store i32 %64, ptr %7, align 4, !tbaa !11
  br label %28, !llvm.loop !15

65:                                               ; preds = %33
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  store i32 1, ptr %10, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  br label %66

66:                                               ; preds = %155, %65
  %67 = load i32, ptr %10, align 4, !tbaa !11
  %68 = shl i32 %67, 1
  store i32 %68, ptr %11, align 4, !tbaa !11
  %69 = load i32, ptr %5, align 4, !tbaa !11
  %70 = icmp sle i32 %68, %69
  br i1 %70, label %72, label %71

71:                                               ; preds = %66
  store i32 8, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  br label %158

72:                                               ; preds = %66
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  %73 = load double, ptr @_ZL2PI, align 8, !tbaa !16
  %74 = fmul double 2.000000e+00, %73
  %75 = load i32, ptr %11, align 4, !tbaa !11
  %76 = sitofp i32 %75 to double
  %77 = fdiv double %74, %76
  store double %77, ptr %12, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 16, ptr %13) #6
  %78 = load double, ptr %12, align 8, !tbaa !16
  %79 = call double @cos(double noundef %78) #6
  %80 = load i8, ptr %4, align 1, !tbaa !9, !range !18, !noundef !19
  %81 = trunc i8 %80 to i1
  %82 = zext i1 %81 to i64
  %83 = select i1 %81, double 1.000000e+00, double -1.000000e+00
  %84 = load double, ptr %12, align 8, !tbaa !16
  %85 = call double @sin(double noundef %84) #6
  %86 = fmul double %83, %85
  call void @_ZN4baseC2Edd(ptr noundef nonnull align 8 dereferenceable(16) %13, double noundef %79, double noundef %86)
  call void @llvm.lifetime.start.p0(i64 16, ptr %14) #6
  call void @_ZN4baseC2Edd(ptr noundef nonnull align 8 dereferenceable(16) %14, double noundef 0.000000e+00, double noundef 0.000000e+00)
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  store i32 0, ptr %15, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #6
  br label %87

87:                                               ; preds = %150, %72
  %88 = load i32, ptr %15, align 4, !tbaa !11
  %89 = load i32, ptr %5, align 4, !tbaa !11
  %90 = icmp slt i32 %88, %89
  br i1 %90, label %92, label %91

91:                                               ; preds = %87
  store i32 11, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  br label %154

92:                                               ; preds = %87
  call void @llvm.lifetime.start.p0(i64 16, ptr %18) #6
  call void @_ZN4baseC2Edd(ptr noundef nonnull align 8 dereferenceable(16) %18, double noundef 1.000000e+00, double noundef 0.000000e+00)
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %14, ptr align 8 %18, i64 16, i1 false), !tbaa.struct !20
  %93 = load i32, ptr %15, align 4, !tbaa !11
  store i32 %93, ptr %16, align 4, !tbaa !11
  %94 = load i32, ptr %15, align 4, !tbaa !11
  %95 = load i32, ptr %10, align 4, !tbaa !11
  %96 = add nsw i32 %94, %95
  store i32 %96, ptr %17, align 4, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #6
  br label %97

97:                                               ; preds = %141, %92
  %98 = load i32, ptr %16, align 4, !tbaa !11
  %99 = load i32, ptr %17, align 4, !tbaa !11
  %100 = icmp slt i32 %98, %99
  br i1 %100, label %101, label %149

101:                                              ; preds = %97
  call void @llvm.lifetime.start.p0(i64 16, ptr %19) #6
  %102 = load ptr, ptr %3, align 8, !tbaa !5
  %103 = load i32, ptr %16, align 4, !tbaa !11
  %104 = load i32, ptr %10, align 4, !tbaa !11
  %105 = add nsw i32 %103, %104
  %106 = sext i32 %105 to i64
  %107 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI4baseSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %102, i64 noundef %106) #6
  %108 = call { double, double } @_ZNK4basemlERKS_(ptr noundef nonnull align 8 dereferenceable(16) %14, ptr noundef nonnull align 8 dereferenceable(16) %107)
  %109 = getelementptr inbounds { double, double }, ptr %19, i32 0, i32 0
  %110 = extractvalue { double, double } %108, 0
  store double %110, ptr %109, align 8
  %111 = getelementptr inbounds { double, double }, ptr %19, i32 0, i32 1
  %112 = extractvalue { double, double } %108, 1
  store double %112, ptr %111, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %20) #6
  %113 = load ptr, ptr %3, align 8, !tbaa !5
  %114 = load i32, ptr %16, align 4, !tbaa !11
  %115 = sext i32 %114 to i64
  %116 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI4baseSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %113, i64 noundef %115) #6
  %117 = call { double, double } @_ZNK4basemiERKS_(ptr noundef nonnull align 8 dereferenceable(16) %116, ptr noundef nonnull align 8 dereferenceable(16) %19)
  %118 = getelementptr inbounds { double, double }, ptr %20, i32 0, i32 0
  %119 = extractvalue { double, double } %117, 0
  store double %119, ptr %118, align 8
  %120 = getelementptr inbounds { double, double }, ptr %20, i32 0, i32 1
  %121 = extractvalue { double, double } %117, 1
  store double %121, ptr %120, align 8
  %122 = load ptr, ptr %3, align 8, !tbaa !5
  %123 = load i32, ptr %16, align 4, !tbaa !11
  %124 = load i32, ptr %10, align 4, !tbaa !11
  %125 = add nsw i32 %123, %124
  %126 = sext i32 %125 to i64
  %127 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI4baseSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %122, i64 noundef %126) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %127, ptr align 8 %20, i64 16, i1 false), !tbaa.struct !20
  call void @llvm.lifetime.end.p0(i64 16, ptr %20) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %21) #6
  %128 = load ptr, ptr %3, align 8, !tbaa !5
  %129 = load i32, ptr %16, align 4, !tbaa !11
  %130 = sext i32 %129 to i64
  %131 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI4baseSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %128, i64 noundef %130) #6
  %132 = call { double, double } @_ZNK4baseplERKS_(ptr noundef nonnull align 8 dereferenceable(16) %131, ptr noundef nonnull align 8 dereferenceable(16) %19)
  %133 = getelementptr inbounds { double, double }, ptr %21, i32 0, i32 0
  %134 = extractvalue { double, double } %132, 0
  store double %134, ptr %133, align 8
  %135 = getelementptr inbounds { double, double }, ptr %21, i32 0, i32 1
  %136 = extractvalue { double, double } %132, 1
  store double %136, ptr %135, align 8
  %137 = load ptr, ptr %3, align 8, !tbaa !5
  %138 = load i32, ptr %16, align 4, !tbaa !11
  %139 = sext i32 %138 to i64
  %140 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI4baseSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %137, i64 noundef %139) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %140, ptr align 8 %21, i64 16, i1 false), !tbaa.struct !20
  call void @llvm.lifetime.end.p0(i64 16, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #6
  br label %141

141:                                              ; preds = %101
  %142 = load i32, ptr %16, align 4, !tbaa !11
  %143 = add nsw i32 %142, 1
  store i32 %143, ptr %16, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 16, ptr %22) #6
  %144 = call { double, double } @_ZNK4basemlERKS_(ptr noundef nonnull align 8 dereferenceable(16) %14, ptr noundef nonnull align 8 dereferenceable(16) %13)
  %145 = getelementptr inbounds { double, double }, ptr %22, i32 0, i32 0
  %146 = extractvalue { double, double } %144, 0
  store double %146, ptr %145, align 8
  %147 = getelementptr inbounds { double, double }, ptr %22, i32 0, i32 1
  %148 = extractvalue { double, double } %144, 1
  store double %148, ptr %147, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %14, ptr align 8 %22, i64 16, i1 false), !tbaa.struct !20
  call void @llvm.lifetime.end.p0(i64 16, ptr %22) #6
  br label %97, !llvm.loop !21

149:                                              ; preds = %97
  br label %150

150:                                              ; preds = %149
  %151 = load i32, ptr %11, align 4, !tbaa !11
  %152 = load i32, ptr %15, align 4, !tbaa !11
  %153 = add nsw i32 %152, %151
  store i32 %153, ptr %15, align 4, !tbaa !11
  br label %87, !llvm.loop !22

154:                                              ; preds = %91
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  br label %155

155:                                              ; preds = %154
  %156 = load i32, ptr %10, align 4, !tbaa !11
  %157 = shl i32 %156, 1
  store i32 %157, ptr %10, align 4, !tbaa !11
  br label %66, !llvm.loop !23

158:                                              ; preds = %71
  %159 = load i8, ptr %4, align 1, !tbaa !9, !range !18, !noundef !19
  %160 = trunc i8 %159 to i1
  br i1 %160, label %161, label %190

161:                                              ; preds = %158
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #6
  store i32 0, ptr %23, align 4, !tbaa !11
  br label %162

162:                                              ; preds = %186, %161
  %163 = load i32, ptr %23, align 4, !tbaa !11
  %164 = load i32, ptr %5, align 4, !tbaa !11
  %165 = icmp slt i32 %163, %164
  br i1 %165, label %167, label %166

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

167:                                              ; preds = %162
  %168 = load i32, ptr %5, align 4, !tbaa !11
  %169 = sitofp i32 %168 to double
  %170 = load ptr, ptr %3, align 8, !tbaa !5
  %171 = load i32, ptr %23, align 4, !tbaa !11
  %172 = sext i32 %171 to i64
  %173 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI4baseSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %170, i64 noundef %172) #6
  %174 = getelementptr inbounds %struct.base, ptr %173, i32 0, i32 0
  %175 = load double, ptr %174, align 8, !tbaa !24
  %176 = fdiv double %175, %169
  store double %176, ptr %174, align 8, !tbaa !24
  %177 = load i32, ptr %5, align 4, !tbaa !11
  %178 = sitofp i32 %177 to double
  %179 = load ptr, ptr %3, align 8, !tbaa !5
  %180 = load i32, ptr %23, align 4, !tbaa !11
  %181 = sext i32 %180 to i64
  %182 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI4baseSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %179, i64 noundef %181) #6
  %183 = getelementptr inbounds %struct.base, ptr %182, i32 0, i32 1
  %184 = load double, ptr %183, align 8, !tbaa !26
  %185 = fdiv double %184, %178
  store double %185, ptr %183, align 8, !tbaa !26
  br label %186

186:                                              ; preds = %167
  %187 = load i32, ptr %23, align 4, !tbaa !11
  %188 = add nsw i32 %187, 1
  store i32 %188, ptr %23, align 4, !tbaa !11
  br label %162, !llvm.loop !27

189:                                              ; preds = %166
  br label %190

190:                                              ; preds = %189, %158
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  ret void
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorI4baseSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) #2 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZSt4swapI4baseENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS4_ESt18is_move_assignableIS4_EEE5valueEvE4typeERS4_SD_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI4baseSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #2 align 2

; Function Attrs: nounwind
declare double @cos(double noundef) #4

; Function Attrs: nounwind
declare double @sin(double noundef) #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN4baseC2Edd(ptr noundef nonnull align 8 dereferenceable(16), double noundef, double noundef) unnamed_addr #2 align 2

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #5

; Function Attrs: mustprogress uwtable
declare dso_local { double, double } @_ZNK4basemlERKS_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local { double, double } @_ZNK4basemiERKS_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local { double, double } @_ZNK4baseplERKS_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) #0 align 2

attributes #0 = { mustprogress 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress 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 = { inlinehint mustprogress 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 #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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #6 = { 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++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"bool", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}
!16 = !{!17, !17, i64 0}
!17 = !{!"double", !7, i64 0}
!18 = !{i8 0, i8 2}
!19 = !{}
!20 = !{i64 0, i64 8, !16, i64 8, i64 8, !16}
!21 = distinct !{!21, !14}
!22 = distinct !{!22, !14}
!23 = distinct !{!23, !14}
!24 = !{!25, !17, i64 0}
!25 = !{!"_ZTS4base", !17, i64 0, !17, i64 8}
!26 = !{!25, !17, i64 8}
!27 = distinct !{!27, !14}


; 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.base = type { double, double }

@_ZL2PI = external hidden local_unnamed_addr global double, align 8

; Function Attrs: mustprogress uwtable
define dso_local void @_Z3fftRSt6vectorI4baseSaIS0_EEb(ptr noundef nonnull align 8 dereferenceable(24) %0, i1 noundef zeroext %1) local_unnamed_addr #0 {
  %3 = alloca %struct.base, align 8
  %4 = alloca %struct.base, align 8
  %5 = alloca %struct.base, align 8
  %6 = alloca %struct.base, align 8
  %7 = tail call noundef i64 @_ZNKSt6vectorI4baseSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #6
  %8 = trunc i64 %7 to i32
  %9 = icmp sgt i32 %8, 2
  br i1 %9, label %.preheader69.preheader, label %.preheader68

.preheader69.preheader:                           ; preds = %2
  %10 = add i64 %7, 4294967295
  %wide.trip.count = and i64 %10, 4294967295
  br label %.preheader69

.preheader69:                                     ; preds = %.preheader69.preheader, %57
  %indvars.iv = phi i64 [ 1, %.preheader69.preheader ], [ %indvars.iv.next, %57 ]
  %.05771 = phi i32 [ 0, %.preheader69.preheader ], [ %49, %57 ]
  br label %48

.preheader68:                                     ; preds = %57, %2
  %.not77 = icmp slt i32 %8, 2
  br i1 %.not77, label %._crit_edge80, label %.lr.ph79

.lr.ph79:                                         ; preds = %.preheader68
  %11 = getelementptr inbounds i8, ptr %6, i64 8
  %.sroa.4.0..sroa_idx = getelementptr inbounds i8, ptr %4, i64 8
  %12 = and i64 %7, 2147483647
  br label %.lr.ph75.us

.lr.ph75.us:                                      ; preds = %._crit_edge76.us, %.lr.ph79
  %13 = phi i32 [ 2, %.lr.ph79 ], [ %47, %._crit_edge76.us ]
  %.06078.us = phi i32 [ 1, %.lr.ph79 ], [ %13, %._crit_edge76.us ]
  %14 = load double, ptr @_ZL2PI, align 8, !tbaa !5
  %15 = fmul double %14, 2.000000e+00
  %16 = sitofp i32 %13 to double
  %17 = fdiv double %15, %16
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #6
  %18 = call double @cos(double noundef %17) #6
  %19 = call double @sin(double noundef %17) #6
  %20 = fneg double %19
  %21 = select i1 %1, double %19, double %20
  call void @_ZN4baseC2Edd(ptr noundef nonnull align 8 dereferenceable(16) %3, double noundef %18, double noundef %21)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #6
  call void @_ZN4baseC2Edd(ptr noundef nonnull align 8 dereferenceable(16) %4, double noundef 0.000000e+00, double noundef 0.000000e+00)
  %22 = sext i32 %13 to i64
  %23 = sext i32 %.06078.us to i64
  %24 = icmp sgt i32 %.06078.us, 0
  br label %25

25:                                               ; preds = %.lr.ph75.us, %._crit_edge.us
  %indvars.iv84 = phi i64 [ 0, %.lr.ph75.us ], [ %indvars.iv.next85, %._crit_edge.us ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #6
  call void @_ZN4baseC2Edd(ptr noundef nonnull align 8 dereferenceable(16) %5, double noundef 1.000000e+00, double noundef 0.000000e+00)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %4, ptr noundef nonnull align 8 dereferenceable(16) %5, i64 16, i1 false), !tbaa.struct !9
  %26 = add nsw i64 %indvars.iv84, %23
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #6
  br i1 %24, label %.lr.ph.us, label %._crit_edge.us

._crit_edge.us:                                   ; preds = %.lr.ph.us, %25
  %indvars.iv.next85 = add nsw i64 %indvars.iv84, %22
  %27 = icmp slt i64 %indvars.iv.next85, %12
  br i1 %27, label %25, label %._crit_edge76.us, !llvm.loop !10

.lr.ph.us:                                        ; preds = %25, %.lr.ph.us
  %indvars.iv86 = phi i64 [ %indvars.iv.next87, %.lr.ph.us ], [ %indvars.iv84, %25 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #6
  %28 = add nsw i64 %indvars.iv86, %23
  %29 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI4baseSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %28) #6
  %30 = call { double, double } @_ZNK4basemlERKS_(ptr noundef nonnull align 8 dereferenceable(16) %4, ptr noundef nonnull align 8 dereferenceable(16) %29)
  %31 = extractvalue { double, double } %30, 0
  store double %31, ptr %6, align 8
  %32 = extractvalue { double, double } %30, 1
  store double %32, ptr %11, align 8
  %33 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI4baseSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %indvars.iv86) #6
  %34 = call { double, double } @_ZNK4basemiERKS_(ptr noundef nonnull align 8 dereferenceable(16) %33, ptr noundef nonnull align 8 dereferenceable(16) %6)
  %35 = extractvalue { double, double } %34, 0
  %36 = extractvalue { double, double } %34, 1
  %37 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI4baseSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %28) #6
  store double %35, ptr %37, align 8, !tbaa !5
  %.sroa.47.0..sroa_idx.us = getelementptr inbounds i8, ptr %37, i64 8
  store double %36, ptr %.sroa.47.0..sroa_idx.us, align 8, !tbaa !5
  %38 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI4baseSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %indvars.iv86) #6
  %39 = call { double, double } @_ZNK4baseplERKS_(ptr noundef nonnull align 8 dereferenceable(16) %38, ptr noundef nonnull align 8 dereferenceable(16) %6)
  %40 = extractvalue { double, double } %39, 0
  %41 = extractvalue { double, double } %39, 1
  %42 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI4baseSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %indvars.iv86) #6
  store double %40, ptr %42, align 8, !tbaa !5
  %.sroa.45.0..sroa_idx.us = getelementptr inbounds i8, ptr %42, i64 8
  store double %41, ptr %.sroa.45.0..sroa_idx.us, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #6
  %indvars.iv.next87 = add nsw i64 %indvars.iv86, 1
  %43 = call { double, double } @_ZNK4basemlERKS_(ptr noundef nonnull align 8 dereferenceable(16) %4, ptr noundef nonnull align 8 dereferenceable(16) %3)
  %44 = extractvalue { double, double } %43, 0
  %45 = extractvalue { double, double } %43, 1
  store double %44, ptr %4, align 8, !tbaa !5
  store double %45, ptr %.sroa.4.0..sroa_idx, align 8, !tbaa !5
  %46 = icmp slt i64 %indvars.iv.next87, %26
  br i1 %46, label %.lr.ph.us, label %._crit_edge.us, !llvm.loop !12

._crit_edge76.us:                                 ; preds = %._crit_edge.us
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #6
  %47 = shl i32 %13, 1
  %.not.us = icmp sgt i32 %47, %8
  br i1 %.not.us, label %._crit_edge80, label %.lr.ph75.us, !llvm.loop !13

48:                                               ; preds = %.preheader69, %48
  %.059.in = phi i32 [ %.059, %48 ], [ %8, %.preheader69 ]
  %.1 = phi i32 [ %49, %48 ], [ %.05771, %.preheader69 ]
  %.059 = lshr i32 %.059.in, 1
  %49 = xor i32 %.1, %.059
  %50 = icmp sgt i32 %.059, %49
  br i1 %50, label %48, label %51, !llvm.loop !14

51:                                               ; preds = %48
  %52 = zext nneg i32 %49 to i64
  %53 = icmp ult i64 %indvars.iv, %52
  br i1 %53, label %54, label %57

54:                                               ; preds = %51
  %55 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI4baseSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %52) #6
  %56 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI4baseSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %indvars.iv) #6
  tail call void @_ZSt4swapI4baseENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS4_ESt18is_move_assignableIS4_EEE5valueEvE4typeERS4_SD_(ptr noundef nonnull align 8 dereferenceable(16) %55, ptr noundef nonnull align 8 dereferenceable(16) %56) #6
  br label %57

57:                                               ; preds = %51, %54
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %.preheader68, label %.preheader69, !llvm.loop !15

._crit_edge80:                                    ; preds = %._crit_edge76.us, %.preheader68
  %58 = icmp sgt i32 %8, 0
  %or.cond = and i1 %58, %1
  br i1 %or.cond, label %.lr.ph, label %.loopexit

.lr.ph:                                           ; preds = %._crit_edge80
  %59 = uitofp nneg i32 %8 to double
  %wide.trip.count93 = and i64 %7, 2147483647
  br label %60

60:                                               ; preds = %.lr.ph, %60
  %indvars.iv90 = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next91, %60 ]
  %61 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI4baseSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %indvars.iv90) #6
  %62 = load double, ptr %61, align 8, !tbaa !16
  %63 = fdiv double %62, %59
  store double %63, ptr %61, align 8, !tbaa !16
  %64 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI4baseSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %indvars.iv90) #6
  %65 = getelementptr inbounds i8, ptr %64, i64 8
  %66 = load double, ptr %65, align 8, !tbaa !18
  %67 = fdiv double %66, %59
  store double %67, ptr %65, align 8, !tbaa !18
  %indvars.iv.next91 = add nuw nsw i64 %indvars.iv90, 1
  %exitcond94.not = icmp eq i64 %indvars.iv.next91, %wide.trip.count93
  br i1 %exitcond94.not, label %.loopexit, label %60, !llvm.loop !19

.loopexit:                                        ; preds = %60, %._crit_edge80
  ret void
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorI4baseSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #2 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZSt4swapI4baseENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS4_ESt18is_move_assignableIS4_EEE5valueEvE4typeERS4_SD_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI4baseSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @cos(double noundef) local_unnamed_addr #4

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @sin(double noundef) local_unnamed_addr #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN4baseC2Edd(ptr noundef nonnull align 8 dereferenceable(16), double noundef, double noundef) unnamed_addr #2 align 2

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #5

; Function Attrs: mustprogress uwtable
declare dso_local { double, double } @_ZNK4basemlERKS_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local { double, double } @_ZNK4basemiERKS_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local { double, double } @_ZNK4baseplERKS_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #0 align 2

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


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass