; LLVM IR from tangjz/acm-icpc :: hdu/6246.ll (Z3FFTiP7Complexi)

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

@w = external dso_local global [262145 x %struct.Complex], align 16
@_ZZ3FFTiP7ComplexiE6bitLen = external hidden global i32, align 4
@_ZZ3FFTiP7ComplexiE6bitRev = external hidden global [262145 x i32], align 16

; Function Attrs: mustprogress uwtable
define dso_local void @_Z3FFTiP7Complexi(i32 noundef %0, ptr noundef %1, i32 noundef %2) #0 {
  %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.Complex, align 8
  %17 = alloca %struct.Complex, align 8
  %18 = alloca %struct.Complex, align 8
  %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 @_ZZ3FFTiP7ComplexiE6bitLen, 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 @_ZZ3FFTiP7ComplexiE6bitLen, align 4, !tbaa !5
  br label %25

25:                                               ; preds = %31, %24
  %26 = load i32, ptr @_ZZ3FFTiP7ComplexiE6bitLen, 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 @_ZZ3FFTiP7ComplexiE6bitLen, align 4, !tbaa !5
  %33 = add nsw i32 %32, 1
  store i32 %33, ptr @_ZZ3FFTiP7ComplexiE6bitLen, 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 @_ZZ3FFTiP7ComplexiE6bitRev, 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 @_ZZ3FFTiP7ComplexiE6bitLen, 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 @_ZZ3FFTiP7ComplexiE6bitRev, 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 1, 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 @_ZZ3FFTiP7ComplexiE6bitRev, 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.Complex, 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 @_ZZ3FFTiP7ComplexiE6bitRev, i64 0, i64 %80
  %82 = load i32, ptr %81, align 4, !tbaa !5
  %83 = sext i32 %82 to i64
  %84 = getelementptr inbounds %struct.Complex, ptr %78, i64 %83
  call void @_ZSt4swapI7ComplexENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS4_ESt18is_move_assignableIS4_EEE5valueEvE4typeERS4_SD_(ptr noundef nonnull align 8 dereferenceable(16) %77, ptr noundef nonnull align 8 dereferenceable(16) %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 = %158, %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 %163

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 = %152, %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 %157

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 = %148, %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 %151

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.Complex, 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.Complex, ptr %114, i64 %120
  store ptr %121, ptr %15, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 16, 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.Complex], ptr @w, i64 0, i64 %126
  %128 = load ptr, ptr %15, align 8, !tbaa !9
  %129 = call { double, double } @_ZNK7ComplexmlERKS_(ptr noundef nonnull align 8 dereferenceable(16) %127, ptr noundef nonnull align 8 dereferenceable(16) %128)
  %130 = getelementptr inbounds { double, double }, ptr %16, i32 0, i32 0
  %131 = extractvalue { double, double } %129, 0
  store double %131, ptr %130, align 8
  %132 = getelementptr inbounds { double, double }, ptr %16, i32 0, i32 1
  %133 = extractvalue { double, double } %129, 1
  store double %133, ptr %132, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %17) #5
  %134 = load ptr, ptr %14, align 8, !tbaa !9
  %135 = call { double, double } @_ZNK7ComplexmiERKS_(ptr noundef nonnull align 8 dereferenceable(16) %134, ptr noundef nonnull align 8 dereferenceable(16) %16)
  %136 = getelementptr inbounds { double, double }, ptr %17, i32 0, i32 0
  %137 = extractvalue { double, double } %135, 0
  store double %137, ptr %136, align 8
  %138 = getelementptr inbounds { double, double }, ptr %17, i32 0, i32 1
  %139 = extractvalue { double, double } %135, 1
  store double %139, ptr %138, align 8
  %140 = load ptr, ptr %15, align 8, !tbaa !9
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %140, ptr align 8 %17, i64 16, i1 false), !tbaa.struct !15
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %18) #5
  %141 = load ptr, ptr %14, align 8, !tbaa !9
  %142 = call { double, double } @_ZNK7ComplexplERKS_(ptr noundef nonnull align 8 dereferenceable(16) %141, ptr noundef nonnull align 8 dereferenceable(16) %16)
  %143 = getelementptr inbounds { double, double }, ptr %18, i32 0, i32 0
  %144 = extractvalue { double, double } %142, 0
  store double %144, ptr %143, align 8
  %145 = getelementptr inbounds { double, double }, ptr %18, i32 0, i32 1
  %146 = extractvalue { double, double } %142, 1
  store double %146, ptr %145, align 8
  %147 = load ptr, ptr %14, align 8, !tbaa !9
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %147, ptr align 8 %18, i64 16, i1 false), !tbaa.struct !15
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 16, 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 %148

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

151:                                              ; preds = %106
  br label %152

152:                                              ; preds = %151
  %153 = load i32, ptr %10, align 4, !tbaa !5
  %154 = shl i32 %153, 1
  %155 = load i32, ptr %12, align 4, !tbaa !5
  %156 = add nsw i32 %155, %154
  store i32 %156, ptr %12, align 4, !tbaa !5
  br label %96, !llvm.loop !19

157:                                              ; preds = %100
  br label %158

158:                                              ; preds = %157
  %159 = load i32, ptr %9, align 4, !tbaa !5
  %160 = add nsw i32 %159, 1
  store i32 %160, ptr %9, align 4, !tbaa !5
  %161 = load i32, ptr %10, align 4, !tbaa !5
  %162 = shl i32 %161, 1
  store i32 %162, ptr %10, align 4, !tbaa !5
  br label %90, !llvm.loop !20

163:                                              ; preds = %94
  %164 = load i32, ptr %6, align 4, !tbaa !5
  %165 = icmp eq i32 %164, -1
  br i1 %165, label %166, label %201

166:                                              ; preds = %163
  %167 = load ptr, ptr %5, align 8, !tbaa !9
  %168 = getelementptr inbounds %struct.Complex, ptr %167, i64 1
  %169 = load ptr, ptr %5, align 8, !tbaa !9
  %170 = load i32, ptr %4, align 4, !tbaa !5
  %171 = sext i32 %170 to i64
  %172 = getelementptr inbounds %struct.Complex, ptr %169, i64 %171
  call void @_ZSt7reverseIP7ComplexEvT_S2_(ptr noundef %168, ptr noundef %172)
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #5
  store i32 0, ptr %19, align 4, !tbaa !5
  br label %173

173:                                              ; preds = %197, %166
  %174 = load i32, ptr %19, align 4, !tbaa !5
  %175 = load i32, ptr %4, align 4, !tbaa !5
  %176 = icmp slt i32 %174, %175
  br i1 %176, label %178, label %177

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

178:                                              ; preds = %173
  %179 = load i32, ptr %4, align 4, !tbaa !5
  %180 = sitofp i32 %179 to double
  %181 = load ptr, ptr %5, align 8, !tbaa !9
  %182 = load i32, ptr %19, align 4, !tbaa !5
  %183 = sext i32 %182 to i64
  %184 = getelementptr inbounds %struct.Complex, ptr %181, i64 %183
  %185 = getelementptr inbounds %struct.Complex, ptr %184, i32 0, i32 0
  %186 = load double, ptr %185, align 8, !tbaa !21
  %187 = fdiv double %186, %180
  store double %187, ptr %185, align 8, !tbaa !21
  %188 = load i32, ptr %4, align 4, !tbaa !5
  %189 = sitofp i32 %188 to double
  %190 = load ptr, ptr %5, align 8, !tbaa !9
  %191 = load i32, ptr %19, align 4, !tbaa !5
  %192 = sext i32 %191 to i64
  %193 = getelementptr inbounds %struct.Complex, ptr %190, i64 %192
  %194 = getelementptr inbounds %struct.Complex, ptr %193, i32 0, i32 1
  %195 = load double, ptr %194, align 8, !tbaa !23
  %196 = fdiv double %195, %189
  store double %196, ptr %194, align 8, !tbaa !23
  br label %197

197:                                              ; preds = %178
  %198 = load i32, ptr %19, align 4, !tbaa !5
  %199 = add nsw i32 %198, 1
  store i32 %199, ptr %19, align 4, !tbaa !5
  br label %173, !llvm.loop !24

200:                                              ; preds = %177
  br label %201

201:                                              ; preds = %200, %163
  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: 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 @_ZSt4swapI7ComplexENSt9enable_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)) #2

; Function Attrs: mustprogress uwtable
declare dso_local { double, double } @_ZNK7ComplexmlERKS_(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 } @_ZNK7ComplexmiERKS_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) #0 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) #3

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

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

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 = { 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 #3 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 8, !16, i64 8, i64 8, !16}
!16 = !{!17, !17, i64 0}
!17 = !{!"double", !7, i64 0}
!18 = distinct !{!18, !12}
!19 = distinct !{!19, !12}
!20 = distinct !{!20, !12}
!21 = !{!22, !17, i64 0}
!22 = !{!"_ZTS7Complex", !17, i64 0, !17, i64 8}
!23 = !{!22, !17, i64 8}
!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.Complex = type { double, double }

@w = external dso_local global [262145 x %struct.Complex], align 16
@_ZZ3FFTiP7ComplexiE6bitLen = external hidden local_unnamed_addr global i32, align 4
@_ZZ3FFTiP7ComplexiE6bitRev = external hidden local_unnamed_addr global [262145 x i32], align 16

; Function Attrs: mustprogress uwtable
define dso_local void @_Z3FFTiP7Complexi(i32 noundef %0, ptr noundef %1, i32 noundef %2) local_unnamed_addr #0 {
  %4 = alloca %struct.Complex, align 8
  %5 = load i32, ptr @_ZZ3FFTiP7ComplexiE6bitLen, align 4, !tbaa !5
  %6 = shl nuw i32 1, %5
  %.not = icmp eq i32 %6, %0
  br i1 %.not, label %.loopexit67, label %.preheader68

.preheader68:                                     ; preds = %3, %.preheader68
  %storemerge = phi i32 [ %9, %.preheader68 ], [ 0, %3 ]
  %7 = shl nuw i32 1, %storemerge
  %8 = icmp slt i32 %7, %0
  %9 = add nuw nsw i32 %storemerge, 1
  br i1 %8, label %.preheader68, label %.preheader66, !llvm.loop !9

.preheader66:                                     ; preds = %.preheader68
  store i32 %storemerge, ptr @_ZZ3FFTiP7ComplexiE6bitLen, align 4, !tbaa !5
  %10 = icmp sgt i32 %0, 1
  br i1 %10, label %.lr.ph, label %._crit_edge

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

.lr.ph.new:                                       ; preds = %.lr.ph
  %unroll_iter = and i64 %12, -2
  %14 = shl nuw i32 1, %11
  br label %15

15:                                               ; preds = %15, %.lr.ph.new
  %indvars.iv = phi i64 [ 1, %.lr.ph.new ], [ %indvars.iv.next.1, %15 ]
  %niter = phi i64 [ 0, %.lr.ph.new ], [ %niter.next.1, %15 ]
  %16 = lshr i64 %indvars.iv, 1
  %17 = and i64 %16, 2147483647
  %18 = getelementptr inbounds [262145 x i32], ptr @_ZZ3FFTiP7ComplexiE6bitRev, i64 0, i64 %17
  %19 = load i32, ptr %18, align 4, !tbaa !5
  %20 = ashr i32 %19, 1
  %21 = or i32 %20, %14
  %22 = getelementptr inbounds [262145 x i32], ptr @_ZZ3FFTiP7ComplexiE6bitRev, i64 0, i64 %indvars.iv
  store i32 %21, ptr %22, align 4, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %23 = lshr i64 %indvars.iv.next, 1
  %24 = and i64 %23, 2147483647
  %25 = getelementptr inbounds [262145 x i32], ptr @_ZZ3FFTiP7ComplexiE6bitRev, i64 0, i64 %24
  %26 = load i32, ptr %25, align 4, !tbaa !5
  %27 = ashr i32 %26, 1
  %28 = getelementptr inbounds [262145 x i32], ptr @_ZZ3FFTiP7ComplexiE6bitRev, i64 0, i64 %indvars.iv.next
  store i32 %27, ptr %28, 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 %.loopexit67.loopexit.unr-lcssa, label %15, !llvm.loop !11

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

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

.loopexit67:                                      ; preds = %.loopexit67.loopexit.epilog-lcssa, %.loopexit67.loopexit.unr-lcssa, %3
  %39 = icmp sgt i32 %0, 1
  br i1 %39, label %.lr.ph72.preheader, label %._crit_edge

.lr.ph72.preheader:                               ; preds = %.loopexit67
  %wide.trip.count92 = zext nneg i32 %0 to i64
  br label %.lr.ph72

.preheader65:                                     ; preds = %73
  br i1 %39, label %.preheader64.lr.ph, label %._crit_edge

.preheader64.lr.ph:                               ; preds = %.preheader65
  %40 = getelementptr inbounds i8, ptr %4, i64 8
  %41 = zext nneg i32 %0 to i64
  br label %.preheader64.us

.preheader64.us:                                  ; preds = %._crit_edge76.us, %.preheader64.lr.ph
  %.05879.us = phi i32 [ 1, %.preheader64.lr.ph ], [ %47, %._crit_edge76.us ]
  %.05977.us = phi i32 [ 1, %.preheader64.lr.ph ], [ %44, %._crit_edge76.us ]
  %42 = icmp sgt i32 %.05977.us, 0
  %43 = sub nsw i32 18, %.05879.us
  %44 = shl i32 %.05977.us, 1
  br i1 %42, label %.preheader.us.us.preheader, label %._crit_edge76.us

.preheader.us.us.preheader:                       ; preds = %.preheader64.us
  %45 = zext nneg i32 %.05977.us to i64
  %46 = sext i32 %44 to i64
  %wide.trip.count97 = zext nneg i32 %.05977.us to i64
  %invariant.gep = getelementptr %struct.Complex, ptr %1, i64 %45
  br label %.preheader.us.us

._crit_edge76.us:                                 ; preds = %._crit_edge.us.us, %.preheader64.us
  %47 = add nuw nsw i32 %.05879.us, 1
  %48 = icmp slt i32 %44, %0
  br i1 %48, label %.preheader64.us, label %._crit_edge, !llvm.loop !12

.preheader.us.us:                                 ; preds = %.preheader.us.us.preheader, %._crit_edge.us.us
  %indvars.iv99 = phi i64 [ 0, %.preheader.us.us.preheader ], [ %indvars.iv.next100, %._crit_edge.us.us ]
  br label %49

49:                                               ; preds = %49, %.preheader.us.us
  %indvars.iv94 = phi i64 [ %indvars.iv.next95, %49 ], [ 0, %.preheader.us.us ]
  %50 = add nsw i64 %indvars.iv94, %indvars.iv99
  %51 = getelementptr inbounds %struct.Complex, ptr %1, i64 %50
  %gep = getelementptr %struct.Complex, ptr %invariant.gep, i64 %50
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #4
  %52 = trunc nuw nsw i64 %indvars.iv94 to i32
  %53 = shl i32 %52, %43
  %54 = sext i32 %53 to i64
  %55 = getelementptr inbounds [262145 x %struct.Complex], ptr @w, i64 0, i64 %54
  %56 = call { double, double } @_ZNK7ComplexmlERKS_(ptr noundef nonnull align 8 dereferenceable(16) %55, ptr noundef nonnull align 8 dereferenceable(16) %gep)
  %57 = extractvalue { double, double } %56, 0
  store double %57, ptr %4, align 8
  %58 = extractvalue { double, double } %56, 1
  store double %58, ptr %40, align 8
  %59 = call { double, double } @_ZNK7ComplexmiERKS_(ptr noundef nonnull align 8 dereferenceable(16) %51, ptr noundef nonnull align 8 dereferenceable(16) %4)
  %60 = extractvalue { double, double } %59, 0
  %61 = extractvalue { double, double } %59, 1
  store double %60, ptr %gep, align 8, !tbaa !13
  %.sroa.45.0..sroa_idx.us.us = getelementptr inbounds i8, ptr %gep, i64 8
  store double %61, ptr %.sroa.45.0..sroa_idx.us.us, align 8, !tbaa !13
  %62 = call { double, double } @_ZNK7ComplexplERKS_(ptr noundef nonnull align 8 dereferenceable(16) %51, ptr noundef nonnull align 8 dereferenceable(16) %4)
  %63 = extractvalue { double, double } %62, 0
  %64 = extractvalue { double, double } %62, 1
  store double %63, ptr %51, align 8, !tbaa !13
  %.sroa.4.0..sroa_idx.us.us = getelementptr inbounds i8, ptr %51, i64 8
  store double %64, ptr %.sroa.4.0..sroa_idx.us.us, align 8, !tbaa !13
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #4
  %indvars.iv.next95 = add nuw nsw i64 %indvars.iv94, 1
  %exitcond98.not = icmp eq i64 %indvars.iv.next95, %wide.trip.count97
  br i1 %exitcond98.not, label %._crit_edge.us.us, label %49, !llvm.loop !15

._crit_edge.us.us:                                ; preds = %49
  %indvars.iv.next100 = add nsw i64 %indvars.iv99, %46
  %65 = icmp slt i64 %indvars.iv.next100, %41
  br i1 %65, label %.preheader.us.us, label %._crit_edge76.us, !llvm.loop !16

.lr.ph72:                                         ; preds = %.lr.ph72.preheader, %73
  %indvars.iv89 = phi i64 [ 1, %.lr.ph72.preheader ], [ %indvars.iv.next90, %73 ]
  %66 = getelementptr inbounds [262145 x i32], ptr @_ZZ3FFTiP7ComplexiE6bitRev, i64 0, i64 %indvars.iv89
  %67 = load i32, ptr %66, align 4, !tbaa !5
  %68 = sext i32 %67 to i64
  %69 = icmp slt i64 %indvars.iv89, %68
  br i1 %69, label %70, label %73

70:                                               ; preds = %.lr.ph72
  %71 = getelementptr inbounds %struct.Complex, ptr %1, i64 %indvars.iv89
  %72 = getelementptr inbounds %struct.Complex, ptr %1, i64 %68
  tail call void @_ZSt4swapI7ComplexENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS4_ESt18is_move_assignableIS4_EEE5valueEvE4typeERS4_SD_(ptr noundef nonnull align 8 dereferenceable(16) %71, ptr noundef nonnull align 8 dereferenceable(16) %72) #4
  br label %73

73:                                               ; preds = %.lr.ph72, %70
  %indvars.iv.next90 = add nuw nsw i64 %indvars.iv89, 1
  %exitcond93.not = icmp eq i64 %indvars.iv.next90, %wide.trip.count92
  br i1 %exitcond93.not, label %.preheader65, label %.lr.ph72, !llvm.loop !17

._crit_edge:                                      ; preds = %._crit_edge76.us, %.preheader66, %.loopexit67, %.preheader65
  %74 = icmp eq i32 %2, -1
  br i1 %74, label %75, label %.loopexit

75:                                               ; preds = %._crit_edge
  %76 = getelementptr inbounds i8, ptr %1, i64 16
  %77 = sext i32 %0 to i64
  %78 = getelementptr inbounds %struct.Complex, ptr %1, i64 %77
  call void @_ZSt7reverseIP7ComplexEvT_S2_(ptr noundef nonnull %76, ptr noundef %78)
  %79 = icmp sgt i32 %0, 0
  br i1 %79, label %.lr.ph86, label %.loopexit

.lr.ph86:                                         ; preds = %75
  %80 = uitofp nneg i32 %0 to double
  %wide.trip.count105 = zext nneg i32 %0 to i64
  %min.iters.check = icmp eq i32 %0, 1
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.ph

vector.ph:                                        ; preds = %.lr.ph86
  %n.vec = and i64 %wide.trip.count105, 2147483646
  %broadcast.splatinsert = insertelement <2 x double> poison, double %80, i64 0
  %81 = shufflevector <2 x double> %broadcast.splatinsert, <2 x double> poison, <4 x i32> zeroinitializer
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %82 = getelementptr inbounds %struct.Complex, ptr %1, i64 %index
  %wide.vec = load <4 x double>, ptr %82, align 8, !tbaa !13
  %interleaved.vec = fdiv <4 x double> %wide.vec, %81
  store <4 x double> %interleaved.vec, ptr %82, align 8, !tbaa !13
  %index.next = add nuw i64 %index, 2
  %83 = icmp eq i64 %index.next, %n.vec
  br i1 %83, label %middle.block, label %vector.body, !llvm.loop !18

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count105
  br i1 %cmp.n, label %.loopexit, label %scalar.ph.preheader

scalar.ph.preheader:                              ; preds = %middle.block, %.lr.ph86
  %indvars.iv102.ph = phi i64 [ 0, %.lr.ph86 ], [ %n.vec, %middle.block ]
  %84 = insertelement <2 x double> poison, double %80, i64 0
  %85 = shufflevector <2 x double> %84, <2 x double> poison, <2 x i32> zeroinitializer
  br label %scalar.ph

scalar.ph:                                        ; preds = %scalar.ph.preheader, %scalar.ph
  %indvars.iv102 = phi i64 [ %indvars.iv.next103, %scalar.ph ], [ %indvars.iv102.ph, %scalar.ph.preheader ]
  %86 = getelementptr inbounds %struct.Complex, ptr %1, i64 %indvars.iv102
  %87 = load <2 x double>, ptr %86, align 8, !tbaa !13
  %88 = fdiv <2 x double> %87, %85
  store <2 x double> %88, ptr %86, align 8, !tbaa !13
  %indvars.iv.next103 = add nuw nsw i64 %indvars.iv102, 1
  %exitcond106.not = icmp eq i64 %indvars.iv.next103, %wide.trip.count105
  br i1 %exitcond106.not, label %.loopexit, label %scalar.ph, !llvm.loop !21

.loopexit:                                        ; preds = %scalar.ph, %middle.block, %75, %._crit_edge
  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 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 @_ZSt4swapI7ComplexENSt9enable_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 #2

; Function Attrs: mustprogress uwtable
declare dso_local { double, double } @_ZNK7ComplexmlERKS_(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 } @_ZNK7ComplexmiERKS_(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 } @_ZNK7ComplexplERKS_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #0 align 2

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

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 = { 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 #3 = { 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 #4 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !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 = !{!14, !14, i64 0}
!14 = !{!"double", !7, i64 0}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10}
!17 = distinct !{!17, !10}
!18 = distinct !{!18, !10, !19, !20}
!19 = !{!"llvm.loop.isvectorized", i32 1}
!20 = !{!"llvm.loop.unroll.runtime.disable"}
!21 = distinct !{!21, !10, !20, !19}


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