; LLVM IR from tangjz/acm-icpc :: 51nod/1172.ll (Z3FFTP7complexii)

; 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 }

@_ZL2pi = external hidden global x86_fp80, align 16

; Function Attrs: mustprogress uwtable
define dso_local void @_Z3FFTP7complexii(ptr noundef %0, i32 noundef %1, i32 noundef %2) #0 {
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca %struct.complex, align 16
  %13 = alloca i32, align 4
  %14 = alloca %struct.complex, align 16
  %15 = alloca i32, align 4
  %16 = alloca %struct.complex, align 16
  %17 = alloca %struct.complex, align 16
  %18 = alloca %struct.complex, align 16
  %19 = alloca %struct.complex, align 16
  %20 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store i32 %1, ptr %5, align 4, !tbaa !9
  store i32 %2, ptr %6, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  store i32 1, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  %21 = load i32, ptr %5, align 4, !tbaa !9
  %22 = ashr i32 %21, 1
  store i32 %22, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  br label %23

23:                                               ; preds = %65, %3
  %24 = load i32, ptr %7, align 4, !tbaa !9
  %25 = load i32, ptr %5, align 4, !tbaa !9
  %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 %68

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

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

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

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

49:                                               ; preds = %45
  %50 = load i32, ptr %9, align 4, !tbaa !9
  %51 = load i32, ptr %8, align 4, !tbaa !9
  %52 = sub nsw i32 %51, %50
  store i32 %52, ptr %8, align 4, !tbaa !9
  br label %53

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

56:                                               ; preds = %45
  %57 = load i32, ptr %8, align 4, !tbaa !9
  %58 = load i32, ptr %9, align 4, !tbaa !9
  %59 = icmp slt i32 %57, %58
  br i1 %59, label %60, label %64

60:                                               ; preds = %56
  %61 = load i32, ptr %9, align 4, !tbaa !9
  %62 = load i32, ptr %8, align 4, !tbaa !9
  %63 = add nsw i32 %62, %61
  store i32 %63, ptr %8, align 4, !tbaa !9
  br label %64

64:                                               ; preds = %60, %56
  br label %65

65:                                               ; preds = %64
  %66 = load i32, ptr %7, align 4, !tbaa !9
  %67 = add nsw i32 %66, 1
  store i32 %67, ptr %7, align 4, !tbaa !9
  br label %23, !llvm.loop !13

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

69:                                               ; preds = %144, %68
  %70 = load i32, ptr %10, align 4, !tbaa !9
  %71 = load i32, ptr %5, align 4, !tbaa !9
  %72 = icmp slt i32 %70, %71
  br i1 %72, label %74, label %73

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

74:                                               ; preds = %69
  call void @llvm.lifetime.start.p0(i64 32, ptr %12) #5
  %75 = load x86_fp80, ptr @_ZL2pi, align 16, !tbaa !14
  %76 = load i32, ptr %10, align 4, !tbaa !9
  %77 = sitofp i32 %76 to x86_fp80
  %78 = fdiv x86_fp80 %75, %77
  %79 = call noundef x86_fp80 @_ZSt3cose(x86_fp80 noundef %78)
  %80 = load i32, ptr %6, align 4, !tbaa !9
  %81 = sitofp i32 %80 to x86_fp80
  %82 = load x86_fp80, ptr @_ZL2pi, align 16, !tbaa !14
  %83 = load i32, ptr %10, align 4, !tbaa !9
  %84 = sitofp i32 %83 to x86_fp80
  %85 = fdiv x86_fp80 %82, %84
  %86 = call noundef x86_fp80 @_ZSt3sine(x86_fp80 noundef %85)
  %87 = fmul x86_fp80 %81, %86
  call void @_ZN7complexC2Eee(ptr noundef nonnull align 16 dereferenceable(32) %12, x86_fp80 noundef %79, x86_fp80 noundef %87)
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  store i32 0, ptr %13, align 4, !tbaa !9
  br label %88

88:                                               ; preds = %138, %74
  %89 = load i32, ptr %13, align 4, !tbaa !9
  %90 = load i32, ptr %5, align 4, !tbaa !9
  %91 = icmp slt i32 %89, %90
  br i1 %91, label %93, label %92

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

93:                                               ; preds = %88
  call void @llvm.lifetime.start.p0(i64 32, ptr %14) #5
  call void @_ZN7complexC2Eee(ptr noundef nonnull align 16 dereferenceable(32) %14, x86_fp80 noundef 0xK3FFF8000000000000000, x86_fp80 noundef 0xK00000000000000000000)
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  store i32 0, ptr %15, align 4, !tbaa !9
  br label %94

94:                                               ; preds = %134, %93
  %95 = load i32, ptr %15, align 4, !tbaa !9
  %96 = load i32, ptr %10, align 4, !tbaa !9
  %97 = icmp slt i32 %95, %96
  br i1 %97, label %99, label %98

98:                                               ; preds = %94
  store i32 14, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  br label %137

99:                                               ; preds = %94
  call void @llvm.lifetime.start.p0(i64 32, ptr %16) #5
  %100 = load ptr, ptr %4, align 8, !tbaa !5
  %101 = load i32, ptr %13, align 4, !tbaa !9
  %102 = load i32, ptr %15, align 4, !tbaa !9
  %103 = add nsw i32 %101, %102
  %104 = load i32, ptr %10, align 4, !tbaa !9
  %105 = add nsw i32 %103, %104
  %106 = sext i32 %105 to i64
  %107 = getelementptr inbounds %struct.complex, ptr %100, i64 %106
  call void @_ZmlRK7complexS1_(ptr dead_on_unwind writable sret(%struct.complex) align 16 %16, ptr noundef nonnull align 16 dereferenceable(32) %14, ptr noundef nonnull align 16 dereferenceable(32) %107)
  call void @llvm.lifetime.start.p0(i64 32, ptr %17) #5
  %108 = load ptr, ptr %4, align 8, !tbaa !5
  %109 = load i32, ptr %13, align 4, !tbaa !9
  %110 = load i32, ptr %15, align 4, !tbaa !9
  %111 = add nsw i32 %109, %110
  %112 = sext i32 %111 to i64
  %113 = getelementptr inbounds %struct.complex, ptr %108, i64 %112
  call void @_ZmiRK7complexS1_(ptr dead_on_unwind writable sret(%struct.complex) align 16 %17, ptr noundef nonnull align 16 dereferenceable(32) %113, ptr noundef nonnull align 16 dereferenceable(32) %16)
  %114 = load ptr, ptr %4, align 8, !tbaa !5
  %115 = load i32, ptr %13, align 4, !tbaa !9
  %116 = load i32, ptr %15, align 4, !tbaa !9
  %117 = add nsw i32 %115, %116
  %118 = load i32, ptr %10, align 4, !tbaa !9
  %119 = add nsw i32 %117, %118
  %120 = sext i32 %119 to i64
  %121 = getelementptr inbounds %struct.complex, ptr %114, i64 %120
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %121, ptr align 16 %17, i64 32, i1 false), !tbaa.struct !16
  call void @llvm.lifetime.end.p0(i64 32, ptr %17) #5
  call void @llvm.lifetime.start.p0(i64 32, ptr %18) #5
  %122 = load ptr, ptr %4, align 8, !tbaa !5
  %123 = load i32, ptr %13, align 4, !tbaa !9
  %124 = load i32, ptr %15, align 4, !tbaa !9
  %125 = add nsw i32 %123, %124
  %126 = sext i32 %125 to i64
  %127 = getelementptr inbounds %struct.complex, ptr %122, i64 %126
  call void @_ZplRK7complexS1_(ptr dead_on_unwind writable sret(%struct.complex) align 16 %18, ptr noundef nonnull align 16 dereferenceable(32) %127, ptr noundef nonnull align 16 dereferenceable(32) %16)
  %128 = load ptr, ptr %4, align 8, !tbaa !5
  %129 = load i32, ptr %13, align 4, !tbaa !9
  %130 = load i32, ptr %15, align 4, !tbaa !9
  %131 = add nsw i32 %129, %130
  %132 = sext i32 %131 to i64
  %133 = getelementptr inbounds %struct.complex, ptr %128, i64 %132
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %133, ptr align 16 %18, i64 32, i1 false), !tbaa.struct !16
  call void @llvm.lifetime.end.p0(i64 32, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %16) #5
  br label %134

134:                                              ; preds = %99
  %135 = load i32, ptr %15, align 4, !tbaa !9
  %136 = add nsw i32 %135, 1
  store i32 %136, ptr %15, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 32, ptr %19) #5
  call void @_ZmlRK7complexS1_(ptr dead_on_unwind writable sret(%struct.complex) align 16 %19, ptr noundef nonnull align 16 dereferenceable(32) %14, ptr noundef nonnull align 16 dereferenceable(32) %12)
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %14, ptr align 16 %19, i64 32, i1 false), !tbaa.struct !16
  call void @llvm.lifetime.end.p0(i64 32, ptr %19) #5
  br label %94, !llvm.loop !17

137:                                              ; preds = %98
  call void @llvm.lifetime.end.p0(i64 32, ptr %14) #5
  br label %138

138:                                              ; preds = %137
  %139 = load i32, ptr %10, align 4, !tbaa !9
  %140 = shl i32 %139, 1
  %141 = load i32, ptr %13, align 4, !tbaa !9
  %142 = add nsw i32 %141, %140
  store i32 %142, ptr %13, align 4, !tbaa !9
  br label %88, !llvm.loop !18

143:                                              ; preds = %92
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #5
  br label %144

144:                                              ; preds = %143
  %145 = load i32, ptr %10, align 4, !tbaa !9
  %146 = shl i32 %145, 1
  store i32 %146, ptr %10, align 4, !tbaa !9
  br label %69, !llvm.loop !19

147:                                              ; preds = %73
  %148 = load i32, ptr %6, align 4, !tbaa !9
  %149 = icmp eq i32 %148, -1
  br i1 %149, label %150, label %170

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

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

155:                                              ; preds = %151
  store i32 17, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #5
  br label %169

156:                                              ; preds = %151
  %157 = load i32, ptr %5, align 4, !tbaa !9
  %158 = sitofp i32 %157 to x86_fp80
  %159 = load ptr, ptr %4, align 8, !tbaa !5
  %160 = load i32, ptr %20, align 4, !tbaa !9
  %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 0
  %164 = load x86_fp80, ptr %163, align 16, !tbaa !20
  %165 = fdiv x86_fp80 %164, %158
  store x86_fp80 %165, ptr %163, align 16, !tbaa !20
  br label %166

166:                                              ; preds = %156
  %167 = load i32, ptr %20, align 4, !tbaa !9
  %168 = add nsw i32 %167, 1
  store i32 %168, ptr %20, align 4, !tbaa !9
  br label %151, !llvm.loop !22

169:                                              ; preds = %155
  br label %170

170:                                              ; preds = %169, %147
  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 16 dereferenceable(32), ptr noundef nonnull align 16 dereferenceable(32)) #2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef x86_fp80 @_ZSt3cose(x86_fp80 noundef) #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef x86_fp80 @_ZSt3sine(x86_fp80 noundef) #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7complexC2Eee(ptr noundef nonnull align 16 dereferenceable(32), x86_fp80 noundef, x86_fp80 noundef) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZmlRK7complexS1_(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)) #0

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZmiRK7complexS1_(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)) #0

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZplRK7complexS1_(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)) #0

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 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = !{!15, !15, i64 0}
!15 = !{!"long double", !7, i64 0}
!16 = !{i64 0, i64 16, !14, i64 16, i64 16, !14}
!17 = distinct !{!17, !12}
!18 = distinct !{!18, !12}
!19 = distinct !{!19, !12}
!20 = !{!21, !15, i64 0}
!21 = !{!"_ZTS7complex", !15, i64 0, !15, i64 16}
!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 { x86_fp80, x86_fp80 }

@_ZL2pi = external hidden local_unnamed_addr global x86_fp80, align 16

; Function Attrs: mustprogress uwtable
define dso_local void @_Z3FFTP7complexii(ptr noundef %0, i32 noundef %1, i32 noundef %2) local_unnamed_addr #0 {
  %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 = alloca %struct.complex, align 16
  %9 = alloca %struct.complex, align 16
  %10 = ashr i32 %1, 1
  %11 = icmp sgt i32 %1, 2
  br i1 %11, label %.lr.ph72.preheader, label %.preheader64

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

.preheader64:                                     ; preds = %._crit_edge, %3
  %13 = icmp sgt i32 %1, 1
  br i1 %13, label %.lr.ph83, label %._crit_edge84

.lr.ph83:                                         ; preds = %.preheader64
  %14 = sitofp i32 %2 to x86_fp80
  %15 = zext nneg i32 %1 to i64
  br label %.lr.ph79.us

.lr.ph79.us:                                      ; preds = %._crit_edge80.us, %.lr.ph83
  %.05881.us = phi i32 [ 1, %.lr.ph83 ], [ %25, %._crit_edge80.us ]
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #5
  %16 = load x86_fp80, ptr @_ZL2pi, align 16, !tbaa !5
  %17 = sitofp i32 %.05881.us to x86_fp80
  %18 = fdiv x86_fp80 %16, %17
  %19 = call noundef x86_fp80 @_ZSt3cose(x86_fp80 noundef %18)
  %20 = load x86_fp80, ptr @_ZL2pi, align 16, !tbaa !5
  %21 = fdiv x86_fp80 %20, %17
  %22 = call noundef x86_fp80 @_ZSt3sine(x86_fp80 noundef %21)
  %23 = fmul x86_fp80 %22, %14
  call void @_ZN7complexC2Eee(ptr noundef nonnull align 16 dereferenceable(32) %4, x86_fp80 noundef %19, x86_fp80 noundef %23)
  %24 = icmp sgt i32 %.05881.us, 0
  %25 = shl i32 %.05881.us, 1
  br i1 %24, label %.lr.ph75.us.us.preheader, label %.lr.ph79.split.us87

.lr.ph75.us.us.preheader:                         ; preds = %.lr.ph79.us
  %26 = zext nneg i32 %.05881.us to i64
  %27 = sext i32 %25 to i64
  %wide.trip.count96 = zext nneg i32 %.05881.us to i64
  %invariant.gep = getelementptr %struct.complex, ptr %0, i64 %26
  br label %.lr.ph75.us.us

.lr.ph79.split.us87:                              ; preds = %.lr.ph79.us, %.lr.ph79.split.us87
  %.05777.us85 = phi i32 [ %28, %.lr.ph79.split.us87 ], [ 0, %.lr.ph79.us ]
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #5
  call void @_ZN7complexC2Eee(ptr noundef nonnull align 16 dereferenceable(32) %5, x86_fp80 noundef 0xK3FFF8000000000000000, x86_fp80 noundef 0xK00000000000000000000)
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #5
  %28 = add nsw i32 %.05777.us85, %25
  %29 = icmp slt i32 %28, %1
  br i1 %29, label %.lr.ph79.split.us87, label %._crit_edge80.us, !llvm.loop !9

._crit_edge80.us:                                 ; preds = %.lr.ph79.split.us87, %._crit_edge76.us.us
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #5
  %30 = icmp slt i32 %25, %1
  br i1 %30, label %.lr.ph79.us, label %._crit_edge84, !llvm.loop !11

.lr.ph75.us.us:                                   ; preds = %.lr.ph75.us.us.preheader, %._crit_edge76.us.us
  %indvars.iv98 = phi i64 [ 0, %.lr.ph75.us.us.preheader ], [ %indvars.iv.next99, %._crit_edge76.us.us ]
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #5
  call void @_ZN7complexC2Eee(ptr noundef nonnull align 16 dereferenceable(32) %5, x86_fp80 noundef 0xK3FFF8000000000000000, x86_fp80 noundef 0xK00000000000000000000)
  br label %31

31:                                               ; preds = %31, %.lr.ph75.us.us
  %indvars.iv93 = phi i64 [ %indvars.iv.next94, %31 ], [ 0, %.lr.ph75.us.us ]
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #5
  %32 = add nsw i64 %indvars.iv93, %indvars.iv98
  %gep = getelementptr %struct.complex, ptr %invariant.gep, i64 %32
  call void @_ZmlRK7complexS1_(ptr dead_on_unwind nonnull writable sret(%struct.complex) align 16 %6, ptr noundef nonnull align 16 dereferenceable(32) %5, ptr noundef nonnull align 16 dereferenceable(32) %gep)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #5
  %33 = getelementptr inbounds %struct.complex, ptr %0, i64 %32
  call void @_ZmiRK7complexS1_(ptr dead_on_unwind nonnull writable sret(%struct.complex) align 16 %7, ptr noundef nonnull align 16 dereferenceable(32) %33, ptr noundef nonnull align 16 dereferenceable(32) %6)
  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 !12
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #5
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %8) #5
  call void @_ZplRK7complexS1_(ptr dead_on_unwind nonnull writable sret(%struct.complex) align 16 %8, ptr noundef nonnull align 16 dereferenceable(32) %33, ptr noundef nonnull align 16 dereferenceable(32) %6)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(32) %33, ptr noundef nonnull align 16 dereferenceable(32) %8, i64 32, i1 false), !tbaa.struct !12
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #5
  %indvars.iv.next94 = add nuw nsw i64 %indvars.iv93, 1
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %9) #5
  call void @_ZmlRK7complexS1_(ptr dead_on_unwind nonnull writable sret(%struct.complex) align 16 %9, ptr noundef nonnull align 16 dereferenceable(32) %5, ptr noundef nonnull align 16 dereferenceable(32) %4)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(32) %5, ptr noundef nonnull align 16 dereferenceable(32) %9, i64 32, i1 false), !tbaa.struct !12
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #5
  %exitcond97.not = icmp eq i64 %indvars.iv.next94, %wide.trip.count96
  br i1 %exitcond97.not, label %._crit_edge76.us.us, label %31, !llvm.loop !13

._crit_edge76.us.us:                              ; preds = %31
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #5
  %indvars.iv.next99 = add nsw i64 %indvars.iv98, %27
  %34 = icmp slt i64 %indvars.iv.next99, %15
  br i1 %34, label %.lr.ph75.us.us, label %._crit_edge80.us, !llvm.loop !9

.lr.ph72:                                         ; preds = %.lr.ph72.preheader, %._crit_edge
  %indvars.iv = phi i64 [ 1, %.lr.ph72.preheader ], [ %indvars.iv.next, %._crit_edge ]
  %.06070 = phi i32 [ %10, %.lr.ph72.preheader ], [ %43, %._crit_edge ]
  %35 = sext i32 %.06070 to i64
  %36 = icmp slt i64 %indvars.iv, %35
  br i1 %36, label %37, label %40

37:                                               ; preds = %.lr.ph72
  %38 = getelementptr inbounds %struct.complex, ptr %0, i64 %indvars.iv
  %39 = getelementptr inbounds %struct.complex, ptr %0, i64 %35
  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) %38, ptr noundef nonnull align 16 dereferenceable(32) %39) #5
  br label %40

40:                                               ; preds = %37, %.lr.ph72
  %.not65 = icmp slt i32 %.06070, %10
  br i1 %.not65, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %40, %.lr.ph
  %.05967 = phi i32 [ %42, %.lr.ph ], [ %10, %40 ]
  %.166 = phi i32 [ %41, %.lr.ph ], [ %.06070, %40 ]
  %41 = sub nsw i32 %.166, %.05967
  %42 = lshr i32 %.05967, 1
  %.not = icmp slt i32 %41, %42
  br i1 %.not, label %._crit_edge, label %.lr.ph, !llvm.loop !14

._crit_edge:                                      ; preds = %.lr.ph, %40
  %.1.lcssa = phi i32 [ %.06070, %40 ], [ %41, %.lr.ph ]
  %.059.lcssa = phi i32 [ %10, %40 ], [ %42, %.lr.ph ]
  %43 = add nsw i32 %.059.lcssa, %.1.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 %.preheader64, label %.lr.ph72, !llvm.loop !15

._crit_edge84:                                    ; preds = %._crit_edge80.us, %.preheader64
  %44 = icmp eq i32 %2, -1
  %45 = icmp sgt i32 %1, 0
  %or.cond = and i1 %44, %45
  br i1 %or.cond, label %.lr.ph89, label %.loopexit

.lr.ph89:                                         ; preds = %._crit_edge84
  %46 = uitofp nneg i32 %1 to x86_fp80
  %wide.trip.count104 = zext nneg i32 %1 to i64
  %xtraiter = and i64 %wide.trip.count104, 3
  %47 = icmp ult i32 %1, 4
  br i1 %47, label %.loopexit.loopexit.unr-lcssa, label %.lr.ph89.new

.lr.ph89.new:                                     ; preds = %.lr.ph89
  %unroll_iter = and i64 %wide.trip.count104, 2147483644
  br label %48

48:                                               ; preds = %48, %.lr.ph89.new
  %indvars.iv101 = phi i64 [ 0, %.lr.ph89.new ], [ %indvars.iv.next102.3, %48 ]
  %niter = phi i64 [ 0, %.lr.ph89.new ], [ %niter.next.3, %48 ]
  %49 = getelementptr inbounds %struct.complex, ptr %0, i64 %indvars.iv101
  %50 = load x86_fp80, ptr %49, align 16, !tbaa !16
  %51 = fdiv x86_fp80 %50, %46
  store x86_fp80 %51, ptr %49, align 16, !tbaa !16
  %indvars.iv.next102 = or disjoint i64 %indvars.iv101, 1
  %52 = getelementptr inbounds %struct.complex, ptr %0, i64 %indvars.iv.next102
  %53 = load x86_fp80, ptr %52, align 16, !tbaa !16
  %54 = fdiv x86_fp80 %53, %46
  store x86_fp80 %54, ptr %52, align 16, !tbaa !16
  %indvars.iv.next102.1 = or disjoint i64 %indvars.iv101, 2
  %55 = getelementptr inbounds %struct.complex, ptr %0, i64 %indvars.iv.next102.1
  %56 = load x86_fp80, ptr %55, align 16, !tbaa !16
  %57 = fdiv x86_fp80 %56, %46
  store x86_fp80 %57, ptr %55, align 16, !tbaa !16
  %indvars.iv.next102.2 = or disjoint i64 %indvars.iv101, 3
  %58 = getelementptr inbounds %struct.complex, ptr %0, i64 %indvars.iv.next102.2
  %59 = load x86_fp80, ptr %58, align 16, !tbaa !16
  %60 = fdiv x86_fp80 %59, %46
  store x86_fp80 %60, ptr %58, align 16, !tbaa !16
  %indvars.iv.next102.3 = add nuw nsw i64 %indvars.iv101, 4
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %.loopexit.loopexit.unr-lcssa, label %48, !llvm.loop !18

.loopexit.loopexit.unr-lcssa:                     ; preds = %48, %.lr.ph89
  %indvars.iv101.unr = phi i64 [ 0, %.lr.ph89 ], [ %indvars.iv.next102.3, %48 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.loopexit, label %.epil.preheader

.epil.preheader:                                  ; preds = %.loopexit.loopexit.unr-lcssa, %.epil.preheader
  %indvars.iv101.epil = phi i64 [ %indvars.iv.next102.epil, %.epil.preheader ], [ %indvars.iv101.unr, %.loopexit.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.epil.preheader ], [ 0, %.loopexit.loopexit.unr-lcssa ]
  %61 = getelementptr inbounds %struct.complex, ptr %0, i64 %indvars.iv101.epil
  %62 = load x86_fp80, ptr %61, align 16, !tbaa !16
  %63 = fdiv x86_fp80 %62, %46
  store x86_fp80 %63, ptr %61, align 16, !tbaa !16
  %indvars.iv.next102.epil = add nuw nsw i64 %indvars.iv101.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %.loopexit, label %.epil.preheader, !llvm.loop !19

.loopexit:                                        ; preds = %.loopexit.loopexit.unr-lcssa, %.epil.preheader, %._crit_edge84
  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 16 dereferenceable(32), ptr noundef nonnull align 16 dereferenceable(32)) 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 nounwind uwtable
declare dso_local noundef x86_fp80 @_ZSt3cose(x86_fp80 noundef) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef x86_fp80 @_ZSt3sine(x86_fp80 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7complexC2Eee(ptr noundef nonnull align 16 dereferenceable(32), x86_fp80 noundef, x86_fp80 noundef) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZmlRK7complexS1_(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 #0

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZmiRK7complexS1_(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 #0

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZplRK7complexS1_(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 #0

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 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress 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 = !{!"long double", !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 = !{i64 0, i64 16, !5, i64 16, i64 16, !5}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10}
!16 = !{!17, !6, i64 0}
!17 = !{!"_ZTS7complex", !6, i64 0, !6, i64 16}
!18 = distinct !{!18, !10}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.unroll.disable"}


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