; LLVM IR from tangjz/acm-icpc :: codeforces/gym/101234D.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 { x86_fp80, x86_fp80 }

@w = external dso_local global [524291 x %struct.Complex], align 16

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7ComplexC2Ev(ptr noundef nonnull align 16 dereferenceable(32)) unnamed_addr #0 align 2

; 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 nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z3FFTiP7Complexi(i32 noundef %0, ptr noundef %1, i32 noundef %2) #3 {
  %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 ptr, align 8
  %11 = alloca %struct.Complex, align 16
  %12 = alloca %struct.Complex, align 16
  %13 = alloca %struct.Complex, align 16
  %14 = alloca %struct.Complex, align 16
  %15 = 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) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  store i32 1, ptr %7, align 4, !tbaa !5
  store i32 0, ptr %8, align 4, !tbaa !5
  br label %16

16:                                               ; preds = %58, %3
  %17 = load i32, ptr %7, align 4, !tbaa !5
  %18 = load i32, ptr %4, align 4, !tbaa !5
  %19 = icmp slt i32 %17, %18
  br i1 %19, label %20, label %61

20:                                               ; preds = %16
  %21 = load i32, ptr %4, align 4, !tbaa !5
  %22 = ashr i32 %21, 1
  store i32 %22, ptr %9, align 4, !tbaa !5
  br label %23

23:                                               ; preds = %28, %20
  %24 = load i32, ptr %8, align 4, !tbaa !5
  %25 = load i32, ptr %9, align 4, !tbaa !5
  %26 = icmp sge i32 %24, %25
  br i1 %26, label %27, label %34

27:                                               ; preds = %23
  br label %28

28:                                               ; preds = %27
  %29 = load i32, ptr %9, align 4, !tbaa !5
  %30 = load i32, ptr %8, align 4, !tbaa !5
  %31 = xor i32 %30, %29
  store i32 %31, ptr %8, align 4, !tbaa !5
  %32 = load i32, ptr %9, align 4, !tbaa !5
  %33 = ashr i32 %32, 1
  store i32 %33, ptr %9, align 4, !tbaa !5
  br label %23, !llvm.loop !11

34:                                               ; preds = %23
  %35 = load i32, ptr %8, align 4, !tbaa !5
  %36 = load i32, ptr %9, align 4, !tbaa !5
  %37 = icmp slt i32 %35, %36
  br i1 %37, label %38, label %43

38:                                               ; preds = %34
  %39 = load i32, ptr %9, align 4, !tbaa !5
  %40 = load i32, ptr %8, align 4, !tbaa !5
  %41 = xor i32 %40, %39
  store i32 %41, ptr %8, align 4, !tbaa !5
  %42 = icmp ne i32 %41, 0
  br label %43

43:                                               ; preds = %38, %34
  %44 = phi i1 [ false, %34 ], [ %42, %38 ]
  %45 = load i32, ptr %7, align 4, !tbaa !5
  %46 = load i32, ptr %8, align 4, !tbaa !5
  %47 = icmp slt i32 %45, %46
  br i1 %47, label %48, label %57

48:                                               ; preds = %43
  %49 = load ptr, ptr %5, align 8, !tbaa !9
  %50 = load i32, ptr %7, align 4, !tbaa !5
  %51 = sext i32 %50 to i64
  %52 = getelementptr inbounds %struct.Complex, ptr %49, i64 %51
  %53 = load ptr, ptr %5, align 8, !tbaa !9
  %54 = load i32, ptr %8, align 4, !tbaa !5
  %55 = sext i32 %54 to i64
  %56 = getelementptr inbounds %struct.Complex, ptr %53, i64 %55
  call void @_ZSt4swapI7ComplexENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS4_ESt18is_move_assignableIS4_EEE5valueEvE4typeERS4_SD_(ptr noundef nonnull align 16 dereferenceable(32) %52, ptr noundef nonnull align 16 dereferenceable(32) %56) #6
  br label %57

57:                                               ; preds = %48, %43
  br label %58

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

61:                                               ; preds = %16
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  store ptr getelementptr inbounds (%struct.Complex, ptr @w, i64 1), ptr %10, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 32, ptr %11) #6
  call void @_ZN7ComplexC2Ev(ptr noundef nonnull align 16 dereferenceable(32) %11)
  store i32 1, ptr %7, align 4, !tbaa !5
  br label %62

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

66:                                               ; preds = %62
  store i32 0, ptr %8, align 4, !tbaa !5
  %67 = load i32, ptr %7, align 4, !tbaa !5
  %68 = load ptr, ptr %10, align 8, !tbaa !9
  %69 = sext i32 %67 to i64
  %70 = getelementptr inbounds %struct.Complex, ptr %68, i64 %69
  store ptr %70, ptr %10, align 8, !tbaa !9
  br label %71

71:                                               ; preds = %123, %66
  %72 = load i32, ptr %8, align 4, !tbaa !5
  %73 = load i32, ptr %4, align 4, !tbaa !5
  %74 = icmp slt i32 %72, %73
  br i1 %74, label %75, label %128

75:                                               ; preds = %71
  store i32 0, ptr %9, align 4, !tbaa !5
  br label %76

76:                                               ; preds = %119, %75
  %77 = load i32, ptr %9, align 4, !tbaa !5
  %78 = load i32, ptr %7, align 4, !tbaa !5
  %79 = icmp slt i32 %77, %78
  br i1 %79, label %80, label %122

80:                                               ; preds = %76
  call void @llvm.lifetime.start.p0(i64 32, ptr %12) #6
  %81 = load ptr, ptr %10, align 8, !tbaa !9
  %82 = load i32, ptr %9, align 4, !tbaa !5
  %83 = sext i32 %82 to i64
  %84 = getelementptr inbounds %struct.Complex, ptr %81, i64 %83
  %85 = load ptr, ptr %5, align 8, !tbaa !9
  %86 = load i32, ptr %7, align 4, !tbaa !5
  %87 = load i32, ptr %8, align 4, !tbaa !5
  %88 = add nsw i32 %86, %87
  %89 = load i32, ptr %9, align 4, !tbaa !5
  %90 = add nsw i32 %88, %89
  %91 = sext i32 %90 to i64
  %92 = getelementptr inbounds %struct.Complex, ptr %85, i64 %91
  call void @_ZNK7ComplexmlERKS_(ptr dead_on_unwind writable sret(%struct.Complex) align 16 %12, ptr noundef nonnull align 16 dereferenceable(32) %84, ptr noundef nonnull align 16 dereferenceable(32) %92)
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %11, ptr align 16 %12, i64 32, i1 false), !tbaa.struct !14
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr %13) #6
  %93 = load ptr, ptr %5, align 8, !tbaa !9
  %94 = load i32, ptr %8, align 4, !tbaa !5
  %95 = load i32, ptr %9, align 4, !tbaa !5
  %96 = add nsw i32 %94, %95
  %97 = sext i32 %96 to i64
  %98 = getelementptr inbounds %struct.Complex, ptr %93, i64 %97
  call void @_ZNK7ComplexmiERKS_(ptr dead_on_unwind writable sret(%struct.Complex) align 16 %13, ptr noundef nonnull align 16 dereferenceable(32) %98, ptr noundef nonnull align 16 dereferenceable(32) %11)
  %99 = load ptr, ptr %5, align 8, !tbaa !9
  %100 = load i32, ptr %7, align 4, !tbaa !5
  %101 = load i32, ptr %8, align 4, !tbaa !5
  %102 = add nsw i32 %100, %101
  %103 = load i32, ptr %9, align 4, !tbaa !5
  %104 = add nsw i32 %102, %103
  %105 = sext i32 %104 to i64
  %106 = getelementptr inbounds %struct.Complex, ptr %99, i64 %105
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %106, ptr align 16 %13, i64 32, i1 false), !tbaa.struct !14
  call void @llvm.lifetime.end.p0(i64 32, ptr %13) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr %14) #6
  %107 = load ptr, ptr %5, align 8, !tbaa !9
  %108 = load i32, ptr %8, align 4, !tbaa !5
  %109 = load i32, ptr %9, align 4, !tbaa !5
  %110 = add nsw i32 %108, %109
  %111 = sext i32 %110 to i64
  %112 = getelementptr inbounds %struct.Complex, ptr %107, i64 %111
  call void @_ZNK7ComplexplERKS_(ptr dead_on_unwind writable sret(%struct.Complex) align 16 %14, ptr noundef nonnull align 16 dereferenceable(32) %112, ptr noundef nonnull align 16 dereferenceable(32) %11)
  %113 = load ptr, ptr %5, align 8, !tbaa !9
  %114 = load i32, ptr %8, align 4, !tbaa !5
  %115 = load i32, ptr %9, align 4, !tbaa !5
  %116 = add nsw i32 %114, %115
  %117 = sext i32 %116 to i64
  %118 = getelementptr inbounds %struct.Complex, ptr %113, i64 %117
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %118, ptr align 16 %14, i64 32, i1 false), !tbaa.struct !14
  call void @llvm.lifetime.end.p0(i64 32, ptr %14) #6
  br label %119

119:                                              ; preds = %80
  %120 = load i32, ptr %9, align 4, !tbaa !5
  %121 = add nsw i32 %120, 1
  store i32 %121, ptr %9, align 4, !tbaa !5
  br label %76, !llvm.loop !17

122:                                              ; preds = %76
  br label %123

123:                                              ; preds = %122
  %124 = load i32, ptr %7, align 4, !tbaa !5
  %125 = shl i32 %124, 1
  %126 = load i32, ptr %8, align 4, !tbaa !5
  %127 = add nsw i32 %126, %125
  store i32 %127, ptr %8, align 4, !tbaa !5
  br label %71, !llvm.loop !18

128:                                              ; preds = %71
  br label %129

129:                                              ; preds = %128
  %130 = load i32, ptr %7, align 4, !tbaa !5
  %131 = shl i32 %130, 1
  store i32 %131, ptr %7, align 4, !tbaa !5
  br label %62, !llvm.loop !19

132:                                              ; preds = %62
  %133 = load i32, ptr %6, align 4, !tbaa !5
  %134 = icmp ne i32 %133, -1
  br i1 %134, label %135, label %136

135:                                              ; preds = %132
  store i32 1, ptr %15, align 4
  br label %170

136:                                              ; preds = %132
  %137 = load ptr, ptr %5, align 8, !tbaa !9
  %138 = getelementptr inbounds %struct.Complex, ptr %137, i64 1
  %139 = load ptr, ptr %5, align 8, !tbaa !9
  %140 = load i32, ptr %4, align 4, !tbaa !5
  %141 = sext i32 %140 to i64
  %142 = getelementptr inbounds %struct.Complex, ptr %139, i64 %141
  call void @_ZSt7reverseIP7ComplexEvT_S2_(ptr noundef %138, ptr noundef %142)
  store i32 0, ptr %7, align 4, !tbaa !5
  br label %143

143:                                              ; preds = %166, %136
  %144 = load i32, ptr %7, align 4, !tbaa !5
  %145 = load i32, ptr %4, align 4, !tbaa !5
  %146 = icmp slt i32 %144, %145
  br i1 %146, label %147, label %169

147:                                              ; preds = %143
  %148 = load i32, ptr %4, align 4, !tbaa !5
  %149 = sitofp i32 %148 to x86_fp80
  %150 = load ptr, ptr %5, align 8, !tbaa !9
  %151 = load i32, ptr %7, align 4, !tbaa !5
  %152 = sext i32 %151 to i64
  %153 = getelementptr inbounds %struct.Complex, ptr %150, i64 %152
  %154 = getelementptr inbounds %struct.Complex, ptr %153, i32 0, i32 0
  %155 = load x86_fp80, ptr %154, align 16, !tbaa !20
  %156 = fdiv x86_fp80 %155, %149
  store x86_fp80 %156, ptr %154, align 16, !tbaa !20
  %157 = load i32, ptr %4, align 4, !tbaa !5
  %158 = sitofp i32 %157 to x86_fp80
  %159 = load ptr, ptr %5, align 8, !tbaa !9
  %160 = load i32, ptr %7, align 4, !tbaa !5
  %161 = sext i32 %160 to i64
  %162 = getelementptr inbounds %struct.Complex, ptr %159, i64 %161
  %163 = getelementptr inbounds %struct.Complex, ptr %162, i32 0, i32 1
  %164 = load x86_fp80, ptr %163, align 16, !tbaa !22
  %165 = fdiv x86_fp80 %164, %158
  store x86_fp80 %165, ptr %163, align 16, !tbaa !22
  br label %166

166:                                              ; preds = %147
  %167 = load i32, ptr %7, align 4, !tbaa !5
  %168 = add nsw i32 %167, 1
  store i32 %168, ptr %7, align 4, !tbaa !5
  br label %143, !llvm.loop !23

169:                                              ; preds = %143
  store i32 0, ptr %15, align 4
  br label %170

170:                                              ; preds = %169, %135
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  %171 = load i32, ptr %15, align 4
  switch i32 %171, label %173 [
    i32 0, label %172
    i32 1, label %172
  ]

172:                                              ; preds = %170, %170
  ret void

173:                                              ; preds = %170
  unreachable
}

; 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 16 dereferenceable(32), ptr noundef nonnull align 16 dereferenceable(32)) #4

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

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

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

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

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 = { 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 #5 = { 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 #6 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"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 16, !15, i64 16, i64 16, !15}
!15 = !{!16, !16, i64 0}
!16 = !{!"long 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 16}
!22 = !{!21, !16, i64 16}
!23 = distinct !{!23, !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 { x86_fp80, x86_fp80 }

@w = external dso_local global [524291 x %struct.Complex], align 16

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7ComplexC2Ev(ptr noundef nonnull align 16 dereferenceable(32)) unnamed_addr #0 align 2

; 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 nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #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: mustprogress uwtable
define dso_local void @_Z3FFTiP7Complexi(i32 noundef %0, ptr noundef %1, i32 noundef %2) local_unnamed_addr #3 {
  %4 = alloca %struct.Complex, align 16
  %5 = alloca %struct.Complex, align 16
  %6 = alloca %struct.Complex, align 16
  %7 = alloca %struct.Complex, align 16
  %8 = icmp sgt i32 %0, 1
  br i1 %8, label %.preheader71.preheader, label %._crit_edge.thread

._crit_edge.thread:                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #6
  call void @_ZN7ComplexC2Ev(ptr noundef nonnull align 16 dereferenceable(32) %4)
  br label %._crit_edge82

.preheader71.preheader:                           ; preds = %3
  %wide.trip.count = zext nneg i32 %0 to i64
  br label %.preheader71

.preheader71:                                     ; preds = %.preheader71.preheader, %17
  %indvars.iv = phi i64 [ 1, %.preheader71.preheader ], [ %indvars.iv.next, %17 ]
  %.06373 = phi i32 [ 0, %.preheader71.preheader ], [ %10, %17 ]
  br label %9

9:                                                ; preds = %9, %.preheader71
  %.164 = phi i32 [ %10, %9 ], [ %.06373, %.preheader71 ]
  %.062.in = phi i32 [ %.062, %9 ], [ %0, %.preheader71 ]
  %.062 = lshr i32 %.062.in, 1
  %.not70 = icmp slt i32 %.164, %.062
  %10 = xor i32 %.062, %.164
  br i1 %.not70, label %11, label %9, !llvm.loop !5

11:                                               ; preds = %9
  %12 = zext nneg i32 %10 to i64
  %13 = icmp ult i64 %indvars.iv, %12
  br i1 %13, label %14, label %17

14:                                               ; preds = %11
  %15 = getelementptr inbounds %struct.Complex, ptr %1, i64 %indvars.iv
  %16 = getelementptr inbounds %struct.Complex, ptr %1, i64 %12
  tail call void @_ZSt4swapI7ComplexENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS4_ESt18is_move_assignableIS4_EEE5valueEvE4typeERS4_SD_(ptr noundef nonnull align 16 dereferenceable(32) %15, ptr noundef nonnull align 16 dereferenceable(32) %16) #6
  br label %17

17:                                               ; preds = %11, %14
  %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 %._crit_edge, label %.preheader71, !llvm.loop !7

._crit_edge:                                      ; preds = %17
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #6
  call void @_ZN7ComplexC2Ev(ptr noundef nonnull align 16 dereferenceable(32) %4)
  br i1 %8, label %.preheader.lr.ph.us.preheader, label %._crit_edge82

.preheader.lr.ph.us.preheader:                    ; preds = %._crit_edge
  %18 = zext nneg i32 %0 to i64
  br label %.preheader.lr.ph.us

.preheader.lr.ph.us:                              ; preds = %.preheader.lr.ph.us.preheader, %._crit_edge77.us
  %.080.us = phi ptr [ %20, %._crit_edge77.us ], [ getelementptr inbounds (i8, ptr @w, i64 32), %.preheader.lr.ph.us.preheader ]
  %.16678.us = phi i32 [ %22, %._crit_edge77.us ], [ 1, %.preheader.lr.ph.us.preheader ]
  %19 = sext i32 %.16678.us to i64
  %20 = getelementptr inbounds %struct.Complex, ptr %.080.us, i64 %19
  %21 = icmp sgt i32 %.16678.us, 0
  %22 = shl i32 %.16678.us, 1
  br i1 %21, label %.preheader.us.us.preheader, label %._crit_edge77.us

.preheader.us.us.preheader:                       ; preds = %.preheader.lr.ph.us
  %23 = sext i32 %22 to i64
  %wide.trip.count95 = zext nneg i32 %.16678.us to i64
  %invariant.gep105 = getelementptr %struct.Complex, ptr %1, i64 %19
  br label %.preheader.us.us

._crit_edge77.us:                                 ; preds = %._crit_edge75.us.us, %.preheader.lr.ph.us
  %24 = icmp slt i32 %22, %0
  br i1 %24, label %.preheader.lr.ph.us, label %._crit_edge82, !llvm.loop !8

.preheader.us.us:                                 ; preds = %.preheader.us.us.preheader, %._crit_edge75.us.us
  %indvars.iv97 = phi i64 [ 0, %.preheader.us.us.preheader ], [ %indvars.iv.next98, %._crit_edge75.us.us ]
  %gep106 = getelementptr %struct.Complex, ptr %invariant.gep105, i64 %indvars.iv97
  %invariant.gep = getelementptr %struct.Complex, ptr %1, i64 %indvars.iv97
  br label %25

25:                                               ; preds = %25, %.preheader.us.us
  %indvars.iv92 = phi i64 [ %indvars.iv.next93, %25 ], [ 0, %.preheader.us.us ]
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #6
  %26 = getelementptr inbounds %struct.Complex, ptr %20, i64 %indvars.iv92
  %27 = getelementptr %struct.Complex, ptr %gep106, i64 %indvars.iv92
  call void @_ZNK7ComplexmlERKS_(ptr dead_on_unwind nonnull writable sret(%struct.Complex) align 16 %5, ptr noundef nonnull align 16 dereferenceable(32) %26, ptr noundef nonnull align 16 dereferenceable(32) %27)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(32) %4, ptr noundef nonnull align 16 dereferenceable(32) %5, i64 32, i1 false), !tbaa.struct !9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #6
  %gep = getelementptr %struct.Complex, ptr %invariant.gep, i64 %indvars.iv92
  call void @_ZNK7ComplexmiERKS_(ptr dead_on_unwind nonnull writable sret(%struct.Complex) align 16 %6, ptr noundef nonnull align 16 dereferenceable(32) %gep, ptr noundef nonnull align 16 dereferenceable(32) %4)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(32) %27, ptr noundef nonnull align 16 dereferenceable(32) %6, i64 32, i1 false), !tbaa.struct !9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #6
  call void @_ZNK7ComplexplERKS_(ptr dead_on_unwind nonnull writable sret(%struct.Complex) align 16 %7, ptr noundef nonnull align 16 dereferenceable(32) %gep, 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) %7, i64 32, i1 false), !tbaa.struct !9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #6
  %indvars.iv.next93 = add nuw nsw i64 %indvars.iv92, 1
  %exitcond96.not = icmp eq i64 %indvars.iv.next93, %wide.trip.count95
  br i1 %exitcond96.not, label %._crit_edge75.us.us, label %25, !llvm.loop !14

._crit_edge75.us.us:                              ; preds = %25
  %indvars.iv.next98 = add nsw i64 %indvars.iv97, %23
  %28 = icmp slt i64 %indvars.iv.next98, %18
  br i1 %28, label %.preheader.us.us, label %._crit_edge77.us, !llvm.loop !15

._crit_edge82:                                    ; preds = %._crit_edge77.us, %._crit_edge.thread, %._crit_edge
  %.not = icmp eq i32 %2, -1
  br i1 %.not, label %29, label %.loopexit

29:                                               ; preds = %._crit_edge82
  %30 = getelementptr inbounds i8, ptr %1, i64 32
  %31 = sext i32 %0 to i64
  %32 = getelementptr inbounds %struct.Complex, ptr %1, i64 %31
  call void @_ZSt7reverseIP7ComplexEvT_S2_(ptr noundef nonnull %30, ptr noundef %32)
  %33 = icmp sgt i32 %0, 0
  br i1 %33, label %.lr.ph89, label %.loopexit

.lr.ph89:                                         ; preds = %29
  %34 = uitofp nneg i32 %0 to x86_fp80
  %wide.trip.count103 = zext nneg i32 %0 to i64
  %xtraiter = and i64 %wide.trip.count103, 1
  %35 = icmp eq i32 %0, 1
  br i1 %35, label %.loopexit.loopexit.unr-lcssa, label %.lr.ph89.new

.lr.ph89.new:                                     ; preds = %.lr.ph89
  %unroll_iter = and i64 %wide.trip.count103, 2147483646
  br label %36

36:                                               ; preds = %36, %.lr.ph89.new
  %indvars.iv100 = phi i64 [ 0, %.lr.ph89.new ], [ %indvars.iv.next101.1, %36 ]
  %niter = phi i64 [ 0, %.lr.ph89.new ], [ %niter.next.1, %36 ]
  %37 = getelementptr inbounds %struct.Complex, ptr %1, i64 %indvars.iv100
  %38 = load x86_fp80, ptr %37, align 16, !tbaa !16
  %39 = fdiv x86_fp80 %38, %34
  store x86_fp80 %39, ptr %37, align 16, !tbaa !16
  %40 = getelementptr inbounds i8, ptr %37, i64 16
  %41 = load x86_fp80, ptr %40, align 16, !tbaa !18
  %42 = fdiv x86_fp80 %41, %34
  store x86_fp80 %42, ptr %40, align 16, !tbaa !18
  %indvars.iv.next101 = or disjoint i64 %indvars.iv100, 1
  %43 = getelementptr inbounds %struct.Complex, ptr %1, i64 %indvars.iv.next101
  %44 = load x86_fp80, ptr %43, align 16, !tbaa !16
  %45 = fdiv x86_fp80 %44, %34
  store x86_fp80 %45, ptr %43, align 16, !tbaa !16
  %46 = getelementptr inbounds i8, ptr %43, i64 16
  %47 = load x86_fp80, ptr %46, align 16, !tbaa !18
  %48 = fdiv x86_fp80 %47, %34
  store x86_fp80 %48, ptr %46, align 16, !tbaa !18
  %indvars.iv.next101.1 = add nuw nsw i64 %indvars.iv100, 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 %.loopexit.loopexit.unr-lcssa, label %36, !llvm.loop !19

.loopexit.loopexit.unr-lcssa:                     ; preds = %36, %.lr.ph89
  %indvars.iv100.unr = phi i64 [ 0, %.lr.ph89 ], [ %indvars.iv.next101.1, %36 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.loopexit, label %.loopexit.loopexit.epilog-lcssa

.loopexit.loopexit.epilog-lcssa:                  ; preds = %.loopexit.loopexit.unr-lcssa
  %49 = getelementptr inbounds %struct.Complex, ptr %1, i64 %indvars.iv100.unr
  %50 = load x86_fp80, ptr %49, align 16, !tbaa !16
  %51 = fdiv x86_fp80 %50, %34
  store x86_fp80 %51, ptr %49, align 16, !tbaa !16
  %52 = getelementptr inbounds i8, ptr %49, i64 16
  %53 = load x86_fp80, ptr %52, align 16, !tbaa !18
  %54 = fdiv x86_fp80 %53, %34
  store x86_fp80 %54, ptr %52, align 16, !tbaa !18
  br label %.loopexit

.loopexit:                                        ; preds = %.loopexit.loopexit.epilog-lcssa, %.loopexit.loopexit.unr-lcssa, %29, %._crit_edge82
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #6
  ret void
}

; 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 16 dereferenceable(32), ptr noundef nonnull align 16 dereferenceable(32)) local_unnamed_addr #4

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

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

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

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

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 = { 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 #5 = { 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 #6 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}
!7 = distinct !{!7, !6}
!8 = distinct !{!8, !6}
!9 = !{i64 0, i64 16, !10, i64 16, i64 16, !10}
!10 = !{!11, !11, i64 0}
!11 = !{!"long double", !12, i64 0}
!12 = !{!"omnipotent char", !13, i64 0}
!13 = !{!"Simple C++ TBAA"}
!14 = distinct !{!14, !6}
!15 = distinct !{!15, !6}
!16 = !{!17, !11, i64 0}
!17 = !{!"_ZTS7Complex", !11, i64 0, !11, i64 16}
!18 = !{!17, !11, i64 16}
!19 = distinct !{!19, !6}


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