; LLVM IR from tangjz/acm-icpc :: lydsy/4752.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 }

; 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 i32, align 4
  %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 %struct.complex, align 8
  %20 = 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
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  store i32 1, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  %21 = load i32, ptr %4, align 4, !tbaa !5
  %22 = ashr i32 %21, 1
  store i32 %22, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  br label %23

23:                                               ; preds = %60, %3
  %24 = load i32, ptr %7, align 4, !tbaa !5
  %25 = load i32, ptr %4, align 4, !tbaa !5
  %26 = sub nsw i32 %25, 1
  %27 = icmp slt i32 %24, %26
  br i1 %27, label %29, label %28

28:                                               ; preds = %23
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  br label %63

29:                                               ; preds = %23
  %30 = load i32, ptr %7, align 4, !tbaa !5
  %31 = load i32, ptr %8, align 4, !tbaa !5
  %32 = icmp slt i32 %30, %31
  br i1 %32, label %33, label %42

33:                                               ; preds = %29
  %34 = load ptr, ptr %5, align 8, !tbaa !9
  %35 = load i32, ptr %7, align 4, !tbaa !5
  %36 = sext i32 %35 to i64
  %37 = getelementptr inbounds %struct.complex, ptr %34, i64 %36
  %38 = load ptr, ptr %5, align 8, !tbaa !9
  %39 = load i32, ptr %8, align 4, !tbaa !5
  %40 = sext i32 %39 to i64
  %41 = getelementptr inbounds %struct.complex, ptr %38, i64 %40
  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) %37, ptr noundef nonnull align 8 dereferenceable(16) %41) #5
  br label %42

42:                                               ; preds = %33, %29
  %43 = load i32, ptr %4, align 4, !tbaa !5
  %44 = ashr i32 %43, 1
  store i32 %44, ptr %9, align 4, !tbaa !5
  br label %45

45:                                               ; preds = %50, %42
  %46 = load i32, ptr %8, align 4, !tbaa !5
  %47 = load i32, ptr %9, align 4, !tbaa !5
  %48 = icmp sge i32 %46, %47
  br i1 %48, label %49, label %56

49:                                               ; preds = %45
  br label %50

50:                                               ; preds = %49
  %51 = load i32, ptr %9, align 4, !tbaa !5
  %52 = load i32, ptr %8, align 4, !tbaa !5
  %53 = sub nsw i32 %52, %51
  store i32 %53, ptr %8, align 4, !tbaa !5
  %54 = load i32, ptr %9, align 4, !tbaa !5
  %55 = ashr i32 %54, 1
  store i32 %55, ptr %9, align 4, !tbaa !5
  br label %45, !llvm.loop !11

56:                                               ; preds = %45
  %57 = load i32, ptr %9, align 4, !tbaa !5
  %58 = load i32, ptr %8, align 4, !tbaa !5
  %59 = add nsw i32 %58, %57
  store i32 %59, ptr %8, align 4, !tbaa !5
  br label %60

60:                                               ; preds = %56
  %61 = load i32, ptr %7, align 4, !tbaa !5
  %62 = add nsw i32 %61, 1
  store i32 %62, ptr %7, align 4, !tbaa !5
  br label %23, !llvm.loop !13

63:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  store i32 1, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  store i32 1, ptr %11, align 4, !tbaa !5
  br label %64

64:                                               ; preds = %143, %63
  %65 = load i32, ptr %11, align 4, !tbaa !5
  %66 = load i32, ptr %4, align 4, !tbaa !5
  %67 = icmp slt i32 %65, %66
  br i1 %67, label %69, label %68

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

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

70:                                               ; preds = %137, %69
  %71 = load i32, ptr %13, align 4, !tbaa !5
  %72 = load i32, ptr %4, align 4, !tbaa !5
  %73 = icmp slt i32 %71, %72
  br i1 %73, label %75, label %74

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

75:                                               ; preds = %70
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  store i32 0, ptr %14, align 4, !tbaa !5
  br label %76

76:                                               ; preds = %133, %75
  %77 = load i32, ptr %14, align 4, !tbaa !5
  %78 = load i32, ptr %11, align 4, !tbaa !5
  %79 = icmp slt i32 %77, %78
  br i1 %79, label %81, label %80

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

81:                                               ; preds = %76
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  %82 = load ptr, ptr %5, align 8, !tbaa !9
  %83 = load i32, ptr %13, align 4, !tbaa !5
  %84 = sext i32 %83 to i64
  %85 = getelementptr inbounds %struct.complex, ptr %82, i64 %84
  store ptr %85, ptr %15, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 16, ptr %16) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %17) #5
  %86 = load i32, ptr %14, align 4, !tbaa !5
  %87 = load i32, ptr %10, align 4, !tbaa !5
  %88 = load i32, ptr %6, align 4, !tbaa !5
  %89 = call { double, double } @_Z7getRootiii(i32 noundef %86, i32 noundef %87, i32 noundef %88)
  %90 = getelementptr inbounds { double, double }, ptr %17, i32 0, i32 0
  %91 = extractvalue { double, double } %89, 0
  store double %91, ptr %90, align 8
  %92 = getelementptr inbounds { double, double }, ptr %17, i32 0, i32 1
  %93 = extractvalue { double, double } %89, 1
  store double %93, ptr %92, align 8
  %94 = load ptr, ptr %15, align 8, !tbaa !9
  %95 = load i32, ptr %11, align 4, !tbaa !5
  %96 = load i32, ptr %14, align 4, !tbaa !5
  %97 = add nsw i32 %95, %96
  %98 = sext i32 %97 to i64
  %99 = getelementptr inbounds %struct.complex, ptr %94, i64 %98
  %100 = call { double, double } @_ZNK7complexmlERKS_(ptr noundef nonnull align 8 dereferenceable(16) %17, ptr noundef nonnull align 8 dereferenceable(16) %99)
  %101 = getelementptr inbounds { double, double }, ptr %16, i32 0, i32 0
  %102 = extractvalue { double, double } %100, 0
  store double %102, ptr %101, align 8
  %103 = getelementptr inbounds { double, double }, ptr %16, i32 0, i32 1
  %104 = extractvalue { double, double } %100, 1
  store double %104, ptr %103, align 8
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %18) #5
  %105 = load ptr, ptr %15, align 8, !tbaa !9
  %106 = load i32, ptr %14, align 4, !tbaa !5
  %107 = sext i32 %106 to i64
  %108 = getelementptr inbounds %struct.complex, ptr %105, i64 %107
  %109 = call { double, double } @_ZNK7complexmiERKS_(ptr noundef nonnull align 8 dereferenceable(16) %108, ptr noundef nonnull align 8 dereferenceable(16) %16)
  %110 = getelementptr inbounds { double, double }, ptr %18, i32 0, i32 0
  %111 = extractvalue { double, double } %109, 0
  store double %111, ptr %110, align 8
  %112 = getelementptr inbounds { double, double }, ptr %18, i32 0, i32 1
  %113 = extractvalue { double, double } %109, 1
  store double %113, ptr %112, align 8
  %114 = load ptr, ptr %15, align 8, !tbaa !9
  %115 = load i32, ptr %11, align 4, !tbaa !5
  %116 = load i32, ptr %14, align 4, !tbaa !5
  %117 = add nsw i32 %115, %116
  %118 = sext i32 %117 to i64
  %119 = getelementptr inbounds %struct.complex, ptr %114, i64 %118
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %119, ptr align 8 %18, i64 16, i1 false), !tbaa.struct !14
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %19) #5
  %120 = load ptr, ptr %15, align 8, !tbaa !9
  %121 = load i32, ptr %14, align 4, !tbaa !5
  %122 = sext i32 %121 to i64
  %123 = getelementptr inbounds %struct.complex, ptr %120, i64 %122
  %124 = call { double, double } @_ZNK7complexplERKS_(ptr noundef nonnull align 8 dereferenceable(16) %123, ptr noundef nonnull align 8 dereferenceable(16) %16)
  %125 = getelementptr inbounds { double, double }, ptr %19, i32 0, i32 0
  %126 = extractvalue { double, double } %124, 0
  store double %126, ptr %125, align 8
  %127 = getelementptr inbounds { double, double }, ptr %19, i32 0, i32 1
  %128 = extractvalue { double, double } %124, 1
  store double %128, ptr %127, align 8
  %129 = load ptr, ptr %15, align 8, !tbaa !9
  %130 = load i32, ptr %14, align 4, !tbaa !5
  %131 = sext i32 %130 to i64
  %132 = getelementptr inbounds %struct.complex, ptr %129, i64 %131
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %132, ptr align 8 %19, i64 16, i1 false), !tbaa.struct !14
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  br label %133

133:                                              ; preds = %81
  %134 = load i32, ptr %14, align 4, !tbaa !5
  %135 = add nsw i32 %134, 1
  store i32 %135, ptr %14, align 4, !tbaa !5
  br label %76, !llvm.loop !17

136:                                              ; preds = %80
  br label %137

137:                                              ; preds = %136
  %138 = load i32, ptr %11, align 4, !tbaa !5
  %139 = shl i32 %138, 1
  %140 = load i32, ptr %13, align 4, !tbaa !5
  %141 = add nsw i32 %140, %139
  store i32 %141, ptr %13, align 4, !tbaa !5
  br label %70, !llvm.loop !18

142:                                              ; preds = %74
  br label %143

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

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

151:                                              ; preds = %148
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #5
  store i32 0, ptr %20, align 4, !tbaa !5
  br label %152

152:                                              ; preds = %167, %151
  %153 = load i32, ptr %20, align 4, !tbaa !5
  %154 = load i32, ptr %4, align 4, !tbaa !5
  %155 = icmp slt i32 %153, %154
  br i1 %155, label %157, label %156

156:                                              ; preds = %152
  store i32 17, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #5
  br label %170

157:                                              ; preds = %152
  %158 = load i32, ptr %4, align 4, !tbaa !5
  %159 = sitofp i32 %158 to double
  %160 = load ptr, ptr %5, align 8, !tbaa !9
  %161 = load i32, ptr %20, align 4, !tbaa !5
  %162 = sext i32 %161 to i64
  %163 = getelementptr inbounds %struct.complex, ptr %160, i64 %162
  %164 = getelementptr inbounds %struct.complex, ptr %163, i32 0, i32 0
  %165 = load double, ptr %164, align 8, !tbaa !20
  %166 = fdiv double %165, %159
  store double %166, ptr %164, align 8, !tbaa !20
  br label %167

167:                                              ; preds = %157
  %168 = load i32, ptr %20, align 4, !tbaa !5
  %169 = add nsw i32 %168, 1
  store i32 %169, ptr %20, align 4, !tbaa !5
  br label %152, !llvm.loop !22

170:                                              ; preds = %156
  br label %171

171:                                              ; preds = %170, %148
  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: 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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local { double, double } @_Z7getRootiii(i32 noundef, i32 noundef, i32 noundef) #3

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

; 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

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

; 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 = alloca %struct.complex, align 8
  %6 = ashr i32 %0, 1
  %7 = icmp sgt i32 %0, 2
  br i1 %7, label %.lr.ph73.preheader, label %.preheader65

.lr.ph73.preheader:                               ; preds = %3
  %8 = add nsw i32 %0, -1
  %wide.trip.count = zext nneg i32 %8 to i64
  br label %.lr.ph73

.preheader65:                                     ; preds = %._crit_edge, %3
  %9 = icmp sgt i32 %0, 1
  br i1 %9, label %.preheader64.lr.ph, label %._crit_edge83

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

.preheader64.us:                                  ; preds = %._crit_edge78.us, %.preheader64.lr.ph
  %.05781.us = phi i32 [ 1, %.preheader64.lr.ph ], [ %17, %._crit_edge78.us ]
  %.05879.us = phi i32 [ 1, %.preheader64.lr.ph ], [ %14, %._crit_edge78.us ]
  %13 = icmp sgt i32 %.05879.us, 0
  %14 = shl i32 %.05879.us, 1
  br i1 %13, label %.preheader63.us.us.preheader, label %._crit_edge78.us

.preheader63.us.us.preheader:                     ; preds = %.preheader64.us
  %15 = zext nneg i32 %.05879.us to i64
  %16 = sext i32 %14 to i64
  br label %.preheader63.us.us

._crit_edge78.us:                                 ; preds = %._crit_edge76.us.us, %.preheader64.us
  %17 = add nuw nsw i32 %.05781.us, 1
  %18 = icmp slt i32 %14, %0
  br i1 %18, label %.preheader64.us, label %._crit_edge83, !llvm.loop !5

.preheader63.us.us:                               ; preds = %.preheader63.us.us.preheader, %._crit_edge76.us.us
  %indvars.iv98 = phi i64 [ 0, %.preheader63.us.us.preheader ], [ %indvars.iv.next99, %._crit_edge76.us.us ]
  %19 = getelementptr inbounds %struct.complex, ptr %1, i64 %indvars.iv98
  %invariant.gep = getelementptr inbounds %struct.complex, ptr %19, i64 %15
  br label %20

20:                                               ; preds = %20, %.preheader63.us.us
  %indvars.iv93 = phi i64 [ %indvars.iv.next94, %20 ], [ 0, %.preheader63.us.us ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #4
  %21 = trunc nuw nsw i64 %indvars.iv93 to i32
  %22 = call { double, double } @_Z7getRootiii(i32 noundef %21, i32 noundef %.05781.us, i32 noundef %2)
  %23 = extractvalue { double, double } %22, 0
  store double %23, ptr %5, align 8
  %24 = extractvalue { double, double } %22, 1
  store double %24, ptr %10, align 8
  %gep = getelementptr inbounds %struct.complex, ptr %invariant.gep, i64 %indvars.iv93
  %25 = call { double, double } @_ZNK7complexmlERKS_(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef nonnull align 8 dereferenceable(16) %gep)
  %26 = extractvalue { double, double } %25, 0
  store double %26, ptr %4, align 8
  %27 = extractvalue { double, double } %25, 1
  store double %27, ptr %11, align 8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #4
  %28 = getelementptr inbounds %struct.complex, ptr %19, i64 %indvars.iv93
  %29 = call { double, double } @_ZNK7complexmiERKS_(ptr noundef nonnull align 8 dereferenceable(16) %28, ptr noundef nonnull align 8 dereferenceable(16) %4)
  %30 = extractvalue { double, double } %29, 0
  %31 = extractvalue { double, double } %29, 1
  store double %30, ptr %gep, align 8, !tbaa !7
  %.sroa.44.0..sroa_idx.us.us = getelementptr inbounds i8, ptr %gep, i64 8
  store double %31, ptr %.sroa.44.0..sroa_idx.us.us, align 8, !tbaa !7
  %32 = call { double, double } @_ZNK7complexplERKS_(ptr noundef nonnull align 8 dereferenceable(16) %28, ptr noundef nonnull align 8 dereferenceable(16) %4)
  %33 = extractvalue { double, double } %32, 0
  %34 = extractvalue { double, double } %32, 1
  store double %33, ptr %28, align 8, !tbaa !7
  %.sroa.4.0..sroa_idx.us.us = getelementptr inbounds i8, ptr %28, i64 8
  store double %34, ptr %.sroa.4.0..sroa_idx.us.us, align 8, !tbaa !7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #4
  %indvars.iv.next94 = add nuw nsw i64 %indvars.iv93, 1
  %exitcond97.not = icmp eq i64 %indvars.iv.next94, %15
  br i1 %exitcond97.not, label %._crit_edge76.us.us, label %20, !llvm.loop !11

._crit_edge76.us.us:                              ; preds = %20
  %indvars.iv.next99 = add nsw i64 %indvars.iv98, %16
  %35 = icmp slt i64 %indvars.iv.next99, %12
  br i1 %35, label %.preheader63.us.us, label %._crit_edge78.us, !llvm.loop !12

.lr.ph73:                                         ; preds = %.lr.ph73.preheader, %._crit_edge
  %indvars.iv = phi i64 [ 1, %.lr.ph73.preheader ], [ %indvars.iv.next, %._crit_edge ]
  %.05570 = phi i32 [ %6, %.lr.ph73.preheader ], [ %44, %._crit_edge ]
  %36 = sext i32 %.05570 to i64
  %37 = icmp slt i64 %indvars.iv, %36
  br i1 %37, label %38, label %41

38:                                               ; preds = %.lr.ph73
  %39 = getelementptr inbounds %struct.complex, ptr %1, i64 %indvars.iv
  %40 = getelementptr inbounds %struct.complex, ptr %1, i64 %36
  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) %39, ptr noundef nonnull align 8 dereferenceable(16) %40) #4
  br label %41

41:                                               ; preds = %38, %.lr.ph73
  %.not66 = icmp slt i32 %.05570, %6
  br i1 %.not66, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %41, %.lr.ph
  %.168 = phi i32 [ %42, %.lr.ph ], [ %.05570, %41 ]
  %.05667 = phi i32 [ %43, %.lr.ph ], [ %6, %41 ]
  %42 = sub nsw i32 %.168, %.05667
  %43 = lshr i32 %.05667, 1
  %.not = icmp slt i32 %42, %43
  br i1 %.not, label %._crit_edge, label %.lr.ph, !llvm.loop !13

._crit_edge:                                      ; preds = %.lr.ph, %41
  %.056.lcssa = phi i32 [ %6, %41 ], [ %43, %.lr.ph ]
  %.1.lcssa = phi i32 [ %.05570, %41 ], [ %42, %.lr.ph ]
  %44 = add nsw i32 %.1.lcssa, %.056.lcssa
  %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 %.preheader65, label %.lr.ph73, !llvm.loop !14

._crit_edge83:                                    ; preds = %._crit_edge78.us, %.preheader65
  %45 = icmp eq i32 %2, -1
  %46 = icmp sgt i32 %0, 0
  %or.cond = and i1 %45, %46
  br i1 %or.cond, label %.lr.ph89, label %.loopexit

.lr.ph89:                                         ; preds = %._crit_edge83
  %47 = uitofp nneg i32 %0 to double
  %wide.trip.count104 = zext nneg i32 %0 to i64
  %min.iters.check = icmp ult i32 %0, 3
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.ph

vector.ph:                                        ; preds = %.lr.ph89
  %.neg = or i64 %wide.trip.count104, -2
  %n.vec = add nsw i64 %.neg, %wide.trip.count104
  %broadcast.splatinsert = insertelement <2 x double> poison, double %47, i64 0
  %broadcast.splat = shufflevector <2 x double> %broadcast.splatinsert, <2 x double> poison, <2 x i32> zeroinitializer
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %48 = or disjoint i64 %index, 1
  %49 = getelementptr inbounds %struct.complex, ptr %1, i64 %index
  %50 = getelementptr inbounds %struct.complex, ptr %1, i64 %48
  %51 = load double, ptr %49, align 8, !tbaa !15
  %52 = load double, ptr %50, align 8, !tbaa !15
  %53 = insertelement <2 x double> poison, double %51, i64 0
  %54 = insertelement <2 x double> %53, double %52, i64 1
  %55 = fdiv <2 x double> %54, %broadcast.splat
  %56 = extractelement <2 x double> %55, i64 0
  store double %56, ptr %49, align 8, !tbaa !15
  %57 = extractelement <2 x double> %55, i64 1
  store double %57, ptr %50, align 8, !tbaa !15
  %index.next = add nuw i64 %index, 2
  %58 = icmp eq i64 %index.next, %n.vec
  br i1 %58, label %scalar.ph.preheader, label %vector.body, !llvm.loop !17

scalar.ph.preheader:                              ; preds = %vector.body, %.lr.ph89
  %indvars.iv101.ph = phi i64 [ 0, %.lr.ph89 ], [ %n.vec, %vector.body ]
  br label %scalar.ph

scalar.ph:                                        ; preds = %scalar.ph.preheader, %scalar.ph
  %indvars.iv101 = phi i64 [ %indvars.iv.next102, %scalar.ph ], [ %indvars.iv101.ph, %scalar.ph.preheader ]
  %59 = getelementptr inbounds %struct.complex, ptr %1, i64 %indvars.iv101
  %60 = load double, ptr %59, align 8, !tbaa !15
  %61 = fdiv double %60, %47
  store double %61, ptr %59, align 8, !tbaa !15
  %indvars.iv.next102 = add nuw nsw i64 %indvars.iv101, 1
  %exitcond105.not = icmp eq i64 %indvars.iv.next102, %wide.trip.count104
  br i1 %exitcond105.not, label %.loopexit, label %scalar.ph, !llvm.loop !20

.loopexit:                                        ; preds = %scalar.ph, %._crit_edge83
  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: 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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local { double, double } @_Z7getRootiii(i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #3

; 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

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 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}
!7 = !{!8, !8, i64 0}
!8 = !{!"double", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = distinct !{!11, !6}
!12 = distinct !{!12, !6}
!13 = distinct !{!13, !6}
!14 = distinct !{!14, !6}
!15 = !{!16, !8, i64 0}
!16 = !{!"_ZTS7complex", !8, i64 0, !8, i64 8}
!17 = distinct !{!17, !6, !18, !19}
!18 = !{!"llvm.loop.isvectorized", i32 1}
!19 = !{!"llvm.loop.unroll.runtime.disable"}
!20 = distinct !{!20, !6, !19, !18}


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