; LLVM IR from lzyrapx/Competitive-Programming :: BZOJ/BZOJ 4555（多项式求逆）.ll (Z3FFTiP2cpi)

; 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.cp = type { x86_fp80, x86_fp80 }

@w = external dso_local global [262145 x %struct.cp], align 16
@_ZZ3FFTiP2cpiE6bitLen = external hidden global i32, align 4
@_ZZ3FFTiP2cpiE6bitRev = external hidden global [262145 x i32], align 16

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z3FFTiP2cpi(i32 noundef %0, ptr noundef %1, i32 noundef %2) #2 {
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %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 i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca %struct.cp, align 16
  %17 = alloca %struct.cp, align 16
  %18 = alloca %struct.cp, align 16
  %19 = alloca i32, align 4
  store i32 %0, ptr %4, align 4, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !9
  store i32 %2, ptr %6, align 4, !tbaa !5
  %20 = load i32, ptr %4, align 4, !tbaa !5
  %21 = load i32, ptr @_ZZ3FFTiP2cpiE6bitLen, align 4, !tbaa !5
  %22 = shl i32 1, %21
  %23 = icmp ne i32 %20, %22
  br i1 %23, label %24, label %60

24:                                               ; preds = %3
  store i32 0, ptr @_ZZ3FFTiP2cpiE6bitLen, align 4, !tbaa !5
  br label %25

25:                                               ; preds = %31, %24
  %26 = load i32, ptr @_ZZ3FFTiP2cpiE6bitLen, align 4, !tbaa !5
  %27 = shl i32 1, %26
  %28 = load i32, ptr %4, align 4, !tbaa !5
  %29 = icmp slt i32 %27, %28
  br i1 %29, label %30, label %34

30:                                               ; preds = %25
  br label %31

31:                                               ; preds = %30
  %32 = load i32, ptr @_ZZ3FFTiP2cpiE6bitLen, align 4, !tbaa !5
  %33 = add nsw i32 %32, 1
  store i32 %33, ptr @_ZZ3FFTiP2cpiE6bitLen, align 4, !tbaa !5
  br label %25, !llvm.loop !11

34:                                               ; preds = %25
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  store i32 1, ptr %7, align 4, !tbaa !5
  br label %35

35:                                               ; preds = %56, %34
  %36 = load i32, ptr %7, align 4, !tbaa !5
  %37 = load i32, ptr %4, align 4, !tbaa !5
  %38 = icmp slt i32 %36, %37
  br i1 %38, label %40, label %39

39:                                               ; preds = %35
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  br label %59

40:                                               ; preds = %35
  %41 = load i32, ptr %7, align 4, !tbaa !5
  %42 = ashr i32 %41, 1
  %43 = sext i32 %42 to i64
  %44 = getelementptr inbounds [262145 x i32], ptr @_ZZ3FFTiP2cpiE6bitRev, i64 0, i64 %43
  %45 = load i32, ptr %44, align 4, !tbaa !5
  %46 = ashr i32 %45, 1
  %47 = load i32, ptr %7, align 4, !tbaa !5
  %48 = and i32 %47, 1
  %49 = load i32, ptr @_ZZ3FFTiP2cpiE6bitLen, align 4, !tbaa !5
  %50 = sub nsw i32 %49, 1
  %51 = shl i32 %48, %50
  %52 = or i32 %46, %51
  %53 = load i32, ptr %7, align 4, !tbaa !5
  %54 = sext i32 %53 to i64
  %55 = getelementptr inbounds [262145 x i32], ptr @_ZZ3FFTiP2cpiE6bitRev, i64 0, i64 %54
  store i32 %52, ptr %55, align 4, !tbaa !5
  br label %56

56:                                               ; preds = %40
  %57 = load i32, ptr %7, align 4, !tbaa !5
  %58 = add nsw i32 %57, 1
  store i32 %58, ptr %7, align 4, !tbaa !5
  br label %35, !llvm.loop !13

59:                                               ; preds = %39
  br label %60

60:                                               ; preds = %59, %3
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  store i32 0, ptr %8, align 4, !tbaa !5
  br label %61

61:                                               ; preds = %86, %60
  %62 = load i32, ptr %8, align 4, !tbaa !5
  %63 = load i32, ptr %4, align 4, !tbaa !5
  %64 = icmp slt i32 %62, %63
  br i1 %64, label %66, label %65

65:                                               ; preds = %61
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  br label %89

66:                                               ; preds = %61
  %67 = load i32, ptr %8, align 4, !tbaa !5
  %68 = load i32, ptr %8, align 4, !tbaa !5
  %69 = sext i32 %68 to i64
  %70 = getelementptr inbounds [262145 x i32], ptr @_ZZ3FFTiP2cpiE6bitRev, i64 0, i64 %69
  %71 = load i32, ptr %70, align 4, !tbaa !5
  %72 = icmp slt i32 %67, %71
  br i1 %72, label %73, label %85

73:                                               ; preds = %66
  %74 = load ptr, ptr %5, align 8, !tbaa !9
  %75 = load i32, ptr %8, align 4, !tbaa !5
  %76 = sext i32 %75 to i64
  %77 = getelementptr inbounds %struct.cp, ptr %74, i64 %76
  %78 = load ptr, ptr %5, align 8, !tbaa !9
  %79 = load i32, ptr %8, align 4, !tbaa !5
  %80 = sext i32 %79 to i64
  %81 = getelementptr inbounds [262145 x i32], ptr @_ZZ3FFTiP2cpiE6bitRev, i64 0, i64 %80
  %82 = load i32, ptr %81, align 4, !tbaa !5
  %83 = sext i32 %82 to i64
  %84 = getelementptr inbounds %struct.cp, ptr %78, i64 %83
  call void @_ZSt4swapI2cpENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS4_ESt18is_move_assignableIS4_EEE5valueEvE4typeERS4_SD_(ptr noundef nonnull align 16 dereferenceable(32) %77, ptr noundef nonnull align 16 dereferenceable(32) %84) #5
  br label %85

85:                                               ; preds = %73, %66
  br label %86

86:                                               ; preds = %85
  %87 = load i32, ptr %8, align 4, !tbaa !5
  %88 = add nsw i32 %87, 1
  store i32 %88, ptr %8, align 4, !tbaa !5
  br label %61, !llvm.loop !14

89:                                               ; preds = %65
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  store i32 1, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  store i32 1, ptr %10, align 4, !tbaa !5
  br label %90

90:                                               ; preds = %143, %89
  %91 = load i32, ptr %10, align 4, !tbaa !5
  %92 = load i32, ptr %4, align 4, !tbaa !5
  %93 = icmp slt i32 %91, %92
  br i1 %93, label %95, label %94

94:                                               ; preds = %90
  store i32 11, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  br label %148

95:                                               ; preds = %90
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  store i32 0, ptr %12, align 4, !tbaa !5
  br label %96

96:                                               ; preds = %137, %95
  %97 = load i32, ptr %12, align 4, !tbaa !5
  %98 = load i32, ptr %4, align 4, !tbaa !5
  %99 = icmp slt i32 %97, %98
  br i1 %99, label %101, label %100

100:                                              ; preds = %96
  store i32 14, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  br label %142

101:                                              ; preds = %96
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  store i32 0, ptr %13, align 4, !tbaa !5
  br label %102

102:                                              ; preds = %133, %101
  %103 = load i32, ptr %13, align 4, !tbaa !5
  %104 = load i32, ptr %10, align 4, !tbaa !5
  %105 = icmp slt i32 %103, %104
  br i1 %105, label %107, label %106

106:                                              ; preds = %102
  store i32 17, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  br label %136

107:                                              ; preds = %102
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  %108 = load ptr, ptr %5, align 8, !tbaa !9
  %109 = load i32, ptr %12, align 4, !tbaa !5
  %110 = load i32, ptr %13, align 4, !tbaa !5
  %111 = add nsw i32 %109, %110
  %112 = sext i32 %111 to i64
  %113 = getelementptr inbounds %struct.cp, ptr %108, i64 %112
  store ptr %113, ptr %14, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  %114 = load ptr, ptr %5, align 8, !tbaa !9
  %115 = load i32, ptr %12, align 4, !tbaa !5
  %116 = load i32, ptr %13, align 4, !tbaa !5
  %117 = add nsw i32 %115, %116
  %118 = load i32, ptr %10, align 4, !tbaa !5
  %119 = add nsw i32 %117, %118
  %120 = sext i32 %119 to i64
  %121 = getelementptr inbounds %struct.cp, ptr %114, i64 %120
  store ptr %121, ptr %15, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 32, ptr %16) #5
  %122 = load i32, ptr %13, align 4, !tbaa !5
  %123 = load i32, ptr %9, align 4, !tbaa !5
  %124 = sub nsw i32 18, %123
  %125 = shl i32 %122, %124
  %126 = sext i32 %125 to i64
  %127 = getelementptr inbounds [262145 x %struct.cp], ptr @w, i64 0, i64 %126
  %128 = load ptr, ptr %15, align 8, !tbaa !9
  call void @_ZNK2cpmlERKS_(ptr dead_on_unwind writable sret(%struct.cp) align 16 %16, ptr noundef nonnull align 16 dereferenceable(32) %127, ptr noundef nonnull align 16 dereferenceable(32) %128)
  call void @llvm.lifetime.start.p0(i64 32, ptr %17) #5
  %129 = load ptr, ptr %14, align 8, !tbaa !9
  call void @_ZNK2cpmiERKS_(ptr dead_on_unwind writable sret(%struct.cp) align 16 %17, ptr noundef nonnull align 16 dereferenceable(32) %129, ptr noundef nonnull align 16 dereferenceable(32) %16)
  %130 = load ptr, ptr %15, align 8, !tbaa !9
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %130, ptr align 16 %17, i64 32, i1 false), !tbaa.struct !15
  call void @llvm.lifetime.start.p0(i64 32, ptr %18) #5
  %131 = load ptr, ptr %14, align 8, !tbaa !9
  call void @_ZNK2cpplERKS_(ptr dead_on_unwind writable sret(%struct.cp) align 16 %18, ptr noundef nonnull align 16 dereferenceable(32) %131, ptr noundef nonnull align 16 dereferenceable(32) %16)
  %132 = load ptr, ptr %14, align 8, !tbaa !9
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %132, ptr align 16 %18, i64 32, i1 false), !tbaa.struct !15
  call void @llvm.lifetime.end.p0(i64 32, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  br label %133

133:                                              ; preds = %107
  %134 = load i32, ptr %13, align 4, !tbaa !5
  %135 = add nsw i32 %134, 1
  store i32 %135, ptr %13, align 4, !tbaa !5
  br label %102, !llvm.loop !18

136:                                              ; preds = %106
  br label %137

137:                                              ; preds = %136
  %138 = load i32, ptr %10, align 4, !tbaa !5
  %139 = shl i32 %138, 1
  %140 = load i32, ptr %12, align 4, !tbaa !5
  %141 = add nsw i32 %140, %139
  store i32 %141, ptr %12, align 4, !tbaa !5
  br label %96, !llvm.loop !19

142:                                              ; preds = %100
  br label %143

143:                                              ; preds = %142
  %144 = load i32, ptr %9, align 4, !tbaa !5
  %145 = add nsw i32 %144, 1
  store i32 %145, ptr %9, align 4, !tbaa !5
  %146 = load i32, ptr %10, align 4, !tbaa !5
  %147 = shl i32 %146, 1
  store i32 %147, ptr %10, align 4, !tbaa !5
  br label %90, !llvm.loop !20

148:                                              ; preds = %94
  %149 = load i32, ptr %6, align 4, !tbaa !5
  %150 = icmp ne i32 %149, -1
  br i1 %150, label %151, label %152

151:                                              ; preds = %148
  br label %186

152:                                              ; preds = %148
  %153 = load ptr, ptr %5, align 8, !tbaa !9
  %154 = getelementptr inbounds %struct.cp, ptr %153, i64 1
  %155 = load ptr, ptr %5, align 8, !tbaa !9
  %156 = load i32, ptr %4, align 4, !tbaa !5
  %157 = sext i32 %156 to i64
  %158 = getelementptr inbounds %struct.cp, ptr %155, i64 %157
  call void @_ZSt7reverseIP2cpEvT_S2_(ptr noundef %154, ptr noundef %158)
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #5
  store i32 0, ptr %19, align 4, !tbaa !5
  br label %159

159:                                              ; preds = %183, %152
  %160 = load i32, ptr %19, align 4, !tbaa !5
  %161 = load i32, ptr %4, align 4, !tbaa !5
  %162 = icmp slt i32 %160, %161
  br i1 %162, label %164, label %163

163:                                              ; preds = %159
  store i32 20, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #5
  br label %186

164:                                              ; preds = %159
  %165 = load i32, ptr %4, align 4, !tbaa !5
  %166 = sitofp i32 %165 to x86_fp80
  %167 = load ptr, ptr %5, align 8, !tbaa !9
  %168 = load i32, ptr %19, align 4, !tbaa !5
  %169 = sext i32 %168 to i64
  %170 = getelementptr inbounds %struct.cp, ptr %167, i64 %169
  %171 = getelementptr inbounds %struct.cp, ptr %170, i32 0, i32 0
  %172 = load x86_fp80, ptr %171, align 16, !tbaa !21
  %173 = fdiv x86_fp80 %172, %166
  store x86_fp80 %173, ptr %171, align 16, !tbaa !21
  %174 = load i32, ptr %4, align 4, !tbaa !5
  %175 = sitofp i32 %174 to x86_fp80
  %176 = load ptr, ptr %5, align 8, !tbaa !9
  %177 = load i32, ptr %19, align 4, !tbaa !5
  %178 = sext i32 %177 to i64
  %179 = getelementptr inbounds %struct.cp, ptr %176, i64 %178
  %180 = getelementptr inbounds %struct.cp, ptr %179, i32 0, i32 1
  %181 = load x86_fp80, ptr %180, align 16, !tbaa !23
  %182 = fdiv x86_fp80 %181, %175
  store x86_fp80 %182, ptr %180, align 16, !tbaa !23
  br label %183

183:                                              ; preds = %164
  %184 = load i32, ptr %19, align 4, !tbaa !5
  %185 = add nsw i32 %184, 1
  store i32 %185, ptr %19, align 4, !tbaa !5
  br label %159, !llvm.loop !24

186:                                              ; preds = %163, %151
  ret void
}

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK2cpmlERKS_(ptr dead_on_unwind noalias writable sret(%struct.cp) align 16, ptr noundef nonnull align 16 dereferenceable(32), ptr noundef nonnull align 16 dereferenceable(32)) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK2cpmiERKS_(ptr dead_on_unwind noalias writable sret(%struct.cp) align 16, ptr noundef nonnull align 16 dereferenceable(32), ptr noundef nonnull align 16 dereferenceable(32)) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK2cpplERKS_(ptr dead_on_unwind noalias writable sret(%struct.cp) align 16, ptr noundef nonnull align 16 dereferenceable(32), ptr noundef nonnull align 16 dereferenceable(32)) #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt7reverseIP2cpEvT_S2_(ptr noundef, ptr noundef) #4

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #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 = { inlinehint 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 #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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = !{i64 0, i64 16, !16, i64 16, i64 16, !16}
!16 = !{!17, !17, i64 0}
!17 = !{!"long double", !7, i64 0}
!18 = distinct !{!18, !12}
!19 = distinct !{!19, !12}
!20 = distinct !{!20, !12}
!21 = !{!22, !17, i64 0}
!22 = !{!"_ZTS2cp", !17, i64 0, !17, i64 16}
!23 = !{!22, !17, i64 16}
!24 = distinct !{!24, !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.cp = type { x86_fp80, x86_fp80 }

@w = external dso_local global [262145 x %struct.cp], align 16
@_ZZ3FFTiP2cpiE6bitLen = external hidden local_unnamed_addr global i32, align 4
@_ZZ3FFTiP2cpiE6bitRev = external hidden local_unnamed_addr global [262145 x i32], align 16

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

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

; 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) #1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z3FFTiP2cpi(i32 noundef %0, ptr noundef %1, i32 noundef %2) local_unnamed_addr #2 {
  %4 = alloca %struct.cp, align 16
  %5 = alloca %struct.cp, align 16
  %6 = alloca %struct.cp, align 16
  %7 = load i32, ptr @_ZZ3FFTiP2cpiE6bitLen, align 4, !tbaa !5
  %8 = shl nuw i32 1, %7
  %.not = icmp eq i32 %8, %0
  br i1 %.not, label %.loopexit66, label %.preheader67

.preheader67:                                     ; preds = %3, %.preheader67
  %storemerge = phi i32 [ %11, %.preheader67 ], [ 0, %3 ]
  %9 = shl nuw i32 1, %storemerge
  %10 = icmp slt i32 %9, %0
  %11 = add nuw nsw i32 %storemerge, 1
  br i1 %10, label %.preheader67, label %.preheader65, !llvm.loop !9

.preheader65:                                     ; preds = %.preheader67
  store i32 %storemerge, ptr @_ZZ3FFTiP2cpiE6bitLen, align 4, !tbaa !5
  %12 = icmp sgt i32 %0, 1
  br i1 %12, label %.lr.ph, label %.loopexit66

.lr.ph:                                           ; preds = %.preheader65
  %13 = add nsw i32 %storemerge, -1
  %wide.trip.count = zext nneg i32 %0 to i64
  %14 = add nsw i64 %wide.trip.count, -1
  %xtraiter = and i64 %14, 1
  %15 = icmp eq i32 %0, 2
  br i1 %15, label %.loopexit66.loopexit.unr-lcssa, label %.lr.ph.new

.lr.ph.new:                                       ; preds = %.lr.ph
  %unroll_iter = and i64 %14, -2
  %16 = shl nuw i32 1, %13
  br label %17

17:                                               ; preds = %17, %.lr.ph.new
  %indvars.iv = phi i64 [ 1, %.lr.ph.new ], [ %indvars.iv.next.1, %17 ]
  %niter = phi i64 [ 0, %.lr.ph.new ], [ %niter.next.1, %17 ]
  %18 = lshr i64 %indvars.iv, 1
  %19 = and i64 %18, 2147483647
  %20 = getelementptr inbounds [262145 x i32], ptr @_ZZ3FFTiP2cpiE6bitRev, i64 0, i64 %19
  %21 = load i32, ptr %20, align 4, !tbaa !5
  %22 = ashr i32 %21, 1
  %23 = or i32 %22, %16
  %24 = getelementptr inbounds [262145 x i32], ptr @_ZZ3FFTiP2cpiE6bitRev, i64 0, i64 %indvars.iv
  store i32 %23, ptr %24, align 4, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %25 = lshr i64 %indvars.iv.next, 1
  %26 = and i64 %25, 2147483647
  %27 = getelementptr inbounds [262145 x i32], ptr @_ZZ3FFTiP2cpiE6bitRev, i64 0, i64 %26
  %28 = load i32, ptr %27, align 4, !tbaa !5
  %29 = ashr i32 %28, 1
  %30 = getelementptr inbounds [262145 x i32], ptr @_ZZ3FFTiP2cpiE6bitRev, i64 0, i64 %indvars.iv.next
  store i32 %29, ptr %30, align 4, !tbaa !5
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %.loopexit66.loopexit.unr-lcssa, label %17, !llvm.loop !11

.loopexit66.loopexit.unr-lcssa:                   ; preds = %17, %.lr.ph
  %indvars.iv.unr = phi i64 [ 1, %.lr.ph ], [ %indvars.iv.next.1, %17 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.loopexit66, label %.loopexit66.loopexit.epilog-lcssa

.loopexit66.loopexit.epilog-lcssa:                ; preds = %.loopexit66.loopexit.unr-lcssa
  %31 = trunc nuw nsw i64 %indvars.iv.unr to i32
  %32 = lshr i64 %indvars.iv.unr, 1
  %33 = and i64 %32, 2147483647
  %34 = getelementptr inbounds [262145 x i32], ptr @_ZZ3FFTiP2cpiE6bitRev, i64 0, i64 %33
  %35 = load i32, ptr %34, align 4, !tbaa !5
  %36 = ashr i32 %35, 1
  %37 = and i32 %31, 1
  %38 = shl nuw i32 %37, %13
  %39 = or i32 %36, %38
  %40 = getelementptr inbounds [262145 x i32], ptr @_ZZ3FFTiP2cpiE6bitRev, i64 0, i64 %indvars.iv.unr
  store i32 %39, ptr %40, align 4, !tbaa !5
  br label %.loopexit66

.loopexit66:                                      ; preds = %.loopexit66.loopexit.epilog-lcssa, %.loopexit66.loopexit.unr-lcssa, %.preheader65, %3
  %41 = icmp sgt i32 %0, 0
  br i1 %41, label %.lr.ph71.preheader, label %._crit_edge

.lr.ph71.preheader:                               ; preds = %.loopexit66
  %wide.trip.count91 = zext nneg i32 %0 to i64
  br label %.lr.ph71

.preheader64:                                     ; preds = %65
  %.not106 = icmp eq i32 %0, 1
  br i1 %.not106, label %._crit_edge, label %.preheader63.us.preheader

.preheader63.us.preheader:                        ; preds = %.preheader64
  %42 = zext nneg i32 %0 to i64
  br label %.preheader63.us

.preheader63.us:                                  ; preds = %.preheader63.us.preheader, %._crit_edge75.us
  %.05877.us = phi i32 [ %45, %._crit_edge75.us ], [ 1, %.preheader63.us.preheader ]
  %.05976.us = phi i32 [ %48, %._crit_edge75.us ], [ 1, %.preheader63.us.preheader ]
  %43 = icmp sgt i32 %.05877.us, 0
  %44 = sub nsw i32 18, %.05976.us
  %45 = shl i32 %.05877.us, 1
  br i1 %43, label %.preheader.us.us.preheader, label %._crit_edge75.us

.preheader.us.us.preheader:                       ; preds = %.preheader63.us
  %46 = zext nneg i32 %.05877.us to i64
  %47 = sext i32 %45 to i64
  %wide.trip.count96 = zext nneg i32 %.05877.us to i64
  %invariant.gep = getelementptr %struct.cp, ptr %1, i64 %46
  br label %.preheader.us.us

._crit_edge75.us:                                 ; preds = %._crit_edge.us.us, %.preheader63.us
  %48 = add nuw nsw i32 %.05976.us, 1
  %49 = icmp slt i32 %45, %0
  br i1 %49, label %.preheader63.us, label %._crit_edge, !llvm.loop !12

.preheader.us.us:                                 ; preds = %.preheader.us.us.preheader, %._crit_edge.us.us
  %indvars.iv98 = phi i64 [ 0, %.preheader.us.us.preheader ], [ %indvars.iv.next99, %._crit_edge.us.us ]
  br label %50

50:                                               ; preds = %50, %.preheader.us.us
  %indvars.iv93 = phi i64 [ %indvars.iv.next94, %50 ], [ 0, %.preheader.us.us ]
  %51 = add nsw i64 %indvars.iv93, %indvars.iv98
  %52 = getelementptr inbounds %struct.cp, ptr %1, i64 %51
  %gep = getelementptr %struct.cp, ptr %invariant.gep, i64 %51
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #5
  %53 = trunc nuw nsw i64 %indvars.iv93 to i32
  %54 = shl i32 %53, %44
  %55 = sext i32 %54 to i64
  %56 = getelementptr inbounds [262145 x %struct.cp], ptr @w, i64 0, i64 %55
  call void @_ZNK2cpmlERKS_(ptr dead_on_unwind nonnull writable sret(%struct.cp) align 16 %4, ptr noundef nonnull align 16 dereferenceable(32) %56, ptr noundef nonnull align 16 dereferenceable(32) %gep)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #5
  call void @_ZNK2cpmiERKS_(ptr dead_on_unwind nonnull writable sret(%struct.cp) align 16 %5, ptr noundef nonnull align 16 dereferenceable(32) %52, ptr noundef nonnull align 16 dereferenceable(32) %4)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(32) %gep, ptr noundef nonnull align 16 dereferenceable(32) %5, i64 32, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #5
  call void @_ZNK2cpplERKS_(ptr dead_on_unwind nonnull writable sret(%struct.cp) align 16 %6, ptr noundef nonnull align 16 dereferenceable(32) %52, ptr noundef nonnull align 16 dereferenceable(32) %4)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(32) %52, ptr noundef nonnull align 16 dereferenceable(32) %6, i64 32, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #5
  %indvars.iv.next94 = add nuw nsw i64 %indvars.iv93, 1
  %exitcond97.not = icmp eq i64 %indvars.iv.next94, %wide.trip.count96
  br i1 %exitcond97.not, label %._crit_edge.us.us, label %50, !llvm.loop !16

._crit_edge.us.us:                                ; preds = %50
  %indvars.iv.next99 = add nsw i64 %indvars.iv98, %47
  %57 = icmp slt i64 %indvars.iv.next99, %42
  br i1 %57, label %.preheader.us.us, label %._crit_edge75.us, !llvm.loop !17

.lr.ph71:                                         ; preds = %.lr.ph71.preheader, %65
  %indvars.iv88 = phi i64 [ 0, %.lr.ph71.preheader ], [ %indvars.iv.next89, %65 ]
  %58 = getelementptr inbounds [262145 x i32], ptr @_ZZ3FFTiP2cpiE6bitRev, i64 0, i64 %indvars.iv88
  %59 = load i32, ptr %58, align 4, !tbaa !5
  %60 = sext i32 %59 to i64
  %61 = icmp slt i64 %indvars.iv88, %60
  br i1 %61, label %62, label %65

62:                                               ; preds = %.lr.ph71
  %63 = getelementptr inbounds %struct.cp, ptr %1, i64 %indvars.iv88
  %64 = getelementptr inbounds %struct.cp, ptr %1, i64 %60
  tail call void @_ZSt4swapI2cpENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS4_ESt18is_move_assignableIS4_EEE5valueEvE4typeERS4_SD_(ptr noundef nonnull align 16 dereferenceable(32) %63, ptr noundef nonnull align 16 dereferenceable(32) %64) #5
  br label %65

65:                                               ; preds = %.lr.ph71, %62
  %indvars.iv.next89 = add nuw nsw i64 %indvars.iv88, 1
  %exitcond92.not = icmp eq i64 %indvars.iv.next89, %wide.trip.count91
  br i1 %exitcond92.not, label %.preheader64, label %.lr.ph71, !llvm.loop !18

._crit_edge:                                      ; preds = %._crit_edge75.us, %.loopexit66, %.preheader64
  %.not62 = icmp eq i32 %2, -1
  br i1 %.not62, label %66, label %.loopexit

66:                                               ; preds = %._crit_edge
  %67 = getelementptr inbounds i8, ptr %1, i64 32
  %68 = sext i32 %0 to i64
  %69 = getelementptr inbounds %struct.cp, ptr %1, i64 %68
  call void @_ZSt7reverseIP2cpEvT_S2_(ptr noundef nonnull %67, ptr noundef %69)
  br i1 %41, label %.lr.ph85, label %.loopexit

.lr.ph85:                                         ; preds = %66
  %70 = uitofp nneg i32 %0 to x86_fp80
  %wide.trip.count104 = zext nneg i32 %0 to i64
  %xtraiter108 = and i64 %wide.trip.count104, 1
  %71 = icmp eq i32 %0, 1
  br i1 %71, label %.loopexit.loopexit.unr-lcssa, label %.lr.ph85.new

.lr.ph85.new:                                     ; preds = %.lr.ph85
  %unroll_iter110 = and i64 %wide.trip.count104, 2147483646
  br label %72

72:                                               ; preds = %72, %.lr.ph85.new
  %indvars.iv101 = phi i64 [ 0, %.lr.ph85.new ], [ %indvars.iv.next102.1, %72 ]
  %niter111 = phi i64 [ 0, %.lr.ph85.new ], [ %niter111.next.1, %72 ]
  %73 = getelementptr inbounds %struct.cp, ptr %1, i64 %indvars.iv101
  %74 = load x86_fp80, ptr %73, align 16, !tbaa !19
  %75 = fdiv x86_fp80 %74, %70
  store x86_fp80 %75, ptr %73, align 16, !tbaa !19
  %76 = getelementptr inbounds i8, ptr %73, i64 16
  %77 = load x86_fp80, ptr %76, align 16, !tbaa !21
  %78 = fdiv x86_fp80 %77, %70
  store x86_fp80 %78, ptr %76, align 16, !tbaa !21
  %indvars.iv.next102 = or disjoint i64 %indvars.iv101, 1
  %79 = getelementptr inbounds %struct.cp, ptr %1, i64 %indvars.iv.next102
  %80 = load x86_fp80, ptr %79, align 16, !tbaa !19
  %81 = fdiv x86_fp80 %80, %70
  store x86_fp80 %81, ptr %79, align 16, !tbaa !19
  %82 = getelementptr inbounds i8, ptr %79, i64 16
  %83 = load x86_fp80, ptr %82, align 16, !tbaa !21
  %84 = fdiv x86_fp80 %83, %70
  store x86_fp80 %84, ptr %82, align 16, !tbaa !21
  %indvars.iv.next102.1 = add nuw nsw i64 %indvars.iv101, 2
  %niter111.next.1 = add i64 %niter111, 2
  %niter111.ncmp.1 = icmp eq i64 %niter111.next.1, %unroll_iter110
  br i1 %niter111.ncmp.1, label %.loopexit.loopexit.unr-lcssa, label %72, !llvm.loop !22

.loopexit.loopexit.unr-lcssa:                     ; preds = %72, %.lr.ph85
  %indvars.iv101.unr = phi i64 [ 0, %.lr.ph85 ], [ %indvars.iv.next102.1, %72 ]
  %lcmp.mod109.not = icmp eq i64 %xtraiter108, 0
  br i1 %lcmp.mod109.not, label %.loopexit, label %.loopexit.loopexit.epilog-lcssa

.loopexit.loopexit.epilog-lcssa:                  ; preds = %.loopexit.loopexit.unr-lcssa
  %85 = getelementptr inbounds %struct.cp, ptr %1, i64 %indvars.iv101.unr
  %86 = load x86_fp80, ptr %85, align 16, !tbaa !19
  %87 = fdiv x86_fp80 %86, %70
  store x86_fp80 %87, ptr %85, align 16, !tbaa !19
  %88 = getelementptr inbounds i8, ptr %85, i64 16
  %89 = load x86_fp80, ptr %88, align 16, !tbaa !21
  %90 = fdiv x86_fp80 %89, %70
  store x86_fp80 %90, ptr %88, align 16, !tbaa !21
  br label %.loopexit

.loopexit:                                        ; preds = %.loopexit.loopexit.epilog-lcssa, %.loopexit.loopexit.unr-lcssa, %66, %._crit_edge
  ret void
}

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK2cpmlERKS_(ptr dead_on_unwind noalias writable sret(%struct.cp) align 16, ptr noundef nonnull align 16 dereferenceable(32), ptr noundef nonnull align 16 dereferenceable(32)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK2cpmiERKS_(ptr dead_on_unwind noalias writable sret(%struct.cp) align 16, ptr noundef nonnull align 16 dereferenceable(32), ptr noundef nonnull align 16 dereferenceable(32)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK2cpplERKS_(ptr dead_on_unwind noalias writable sret(%struct.cp) align 16, ptr noundef nonnull align 16 dereferenceable(32), ptr noundef nonnull align 16 dereferenceable(32)) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt7reverseIP2cpEvT_S2_(ptr noundef, ptr noundef) local_unnamed_addr #4

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


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