; LLVM IR from xirc/cp-algorithm :: atcoder/abc022/D/main.ll (Z6metricSt6vectorISt7complexIiESaIS1_EE)

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

%"class.std::complex.0" = type { { x86_fp80, x86_fp80 } }
%"class.std::vector.1" = type { %"struct.std::_Vector_base.2" }
%"struct.std::_Vector_base.2" = type { %"struct.std::_Vector_base<long double, std::allocator<long double>>::_Vector_impl" }
%"struct.std::_Vector_base<long double, std::allocator<long double>>::_Vector_impl" = type { %"struct.std::_Vector_base<long double, std::allocator<long double>>::_Vector_impl_data" }
%"struct.std::_Vector_base<long double, std::allocator<long double>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator.3" = type { i8 }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@N = external dso_local global i32, align 4

; Function Attrs: mustprogress uwtable
define dso_local noundef x86_fp80 @_Z6metricSt6vectorISt7complexIiESaIS1_EE(ptr noundef %0) #0 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca i64, align 8
  %4 = alloca i64, align 8
  %5 = alloca i32, align 4
  %6 = alloca %"class.std::complex.0", align 16
  %7 = alloca %"class.std::vector.1", align 8
  %8 = alloca x86_fp80, align 16
  %9 = alloca %"class.std::allocator.3", align 1
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca %"class.std::complex.0", align 16
  %14 = alloca %"class.std::complex.0", align 16
  %15 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %16 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %17 = alloca x86_fp80, align 16
  %18 = alloca ptr, align 8
  %19 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %20 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %21 = alloca x86_fp80, align 16
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #5
  store i64 0, ptr %3, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #5
  store i64 0, ptr %4, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  store i32 0, ptr %5, align 4, !tbaa !11
  br label %22

22:                                               ; preds = %42, %1
  %23 = load i32, ptr %5, align 4, !tbaa !11
  %24 = load i32, ptr @N, align 4, !tbaa !11
  %25 = icmp slt i32 %23, %24
  br i1 %25, label %27, label %26

26:                                               ; preds = %22
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  br label %45

27:                                               ; preds = %22
  %28 = load i32, ptr %5, align 4, !tbaa !11
  %29 = sext i32 %28 to i64
  %30 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt7complexIiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %29) #5
  %31 = call noundef i32 @_ZNKSt7complexIiE4realB5cxx11Ev(ptr noundef nonnull align 4 dereferenceable(8) %30)
  %32 = sext i32 %31 to i64
  %33 = load i64, ptr %3, align 8, !tbaa !9
  %34 = add nsw i64 %33, %32
  store i64 %34, ptr %3, align 8, !tbaa !9
  %35 = load i32, ptr %5, align 4, !tbaa !11
  %36 = sext i32 %35 to i64
  %37 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt7complexIiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %36) #5
  %38 = call noundef i32 @_ZNKSt7complexIiE4imagB5cxx11Ev(ptr noundef nonnull align 4 dereferenceable(8) %37)
  %39 = sext i32 %38 to i64
  %40 = load i64, ptr %4, align 8, !tbaa !9
  %41 = add nsw i64 %40, %39
  store i64 %41, ptr %4, align 8, !tbaa !9
  br label %42

42:                                               ; preds = %27
  %43 = load i32, ptr %5, align 4, !tbaa !11
  %44 = add nsw i32 %43, 1
  store i32 %44, ptr %5, align 4, !tbaa !11
  br label %22, !llvm.loop !13

45:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 32, ptr %6) #5
  %46 = load i64, ptr %3, align 8, !tbaa !9
  %47 = sitofp i64 %46 to x86_fp80
  %48 = load i32, ptr @N, align 4, !tbaa !11
  %49 = sitofp i32 %48 to x86_fp80
  %50 = fdiv x86_fp80 %47, %49
  %51 = load i64, ptr %4, align 8, !tbaa !9
  %52 = sitofp i64 %51 to x86_fp80
  %53 = load i32, ptr @N, align 4, !tbaa !11
  %54 = sitofp i32 %53 to x86_fp80
  %55 = fdiv x86_fp80 %52, %54
  call void @_ZNSt7complexIeEC2Eee(ptr noundef nonnull align 16 dereferenceable(32) %6, x86_fp80 noundef %50, x86_fp80 noundef %55)
  call void @llvm.lifetime.start.p0(i64 24, ptr %7) #5
  %56 = load i32, ptr @N, align 4, !tbaa !11
  %57 = sext i32 %56 to i64
  call void @llvm.lifetime.start.p0(i64 16, ptr %8) #5
  store x86_fp80 0xK00000000000000000000, ptr %8, align 16, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 1, ptr %9) #5
  call void @_ZNSaIeEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #5
  invoke void @_ZNSt6vectorIeSaIeEEC2EmRKeRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %57, ptr noundef nonnull align 16 dereferenceable(16) %8, ptr noundef nonnull align 1 dereferenceable(1) %9)
          to label %58 unwind label %64

58:                                               ; preds = %45
  call void @_ZNSt15__new_allocatorIeED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  store i32 0, ptr %12, align 4, !tbaa !11
  br label %59

59:                                               ; preds = %88, %58
  %60 = load i32, ptr %12, align 4, !tbaa !11
  %61 = load i32, ptr @N, align 4, !tbaa !11
  %62 = icmp slt i32 %60, %61
  br i1 %62, label %68, label %63

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

64:                                               ; preds = %45
  %65 = landingpad { ptr, i32 }
          cleanup
  %66 = extractvalue { ptr, i32 } %65, 0
  store ptr %66, ptr %10, align 8
  %67 = extractvalue { ptr, i32 } %65, 1
  store i32 %67, ptr %11, align 4
  call void @_ZNSt15__new_allocatorIeED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #5
  br label %134

68:                                               ; preds = %59
  call void @llvm.lifetime.start.p0(i64 32, ptr %13) #5
  %69 = load i32, ptr %12, align 4, !tbaa !11
  %70 = sext i32 %69 to i64
  %71 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt7complexIiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %70) #5
  %72 = invoke noundef i32 @_ZNKSt7complexIiE4realB5cxx11Ev(ptr noundef nonnull align 4 dereferenceable(8) %71)
          to label %73 unwind label %91

73:                                               ; preds = %68
  %74 = sitofp i32 %72 to x86_fp80
  %75 = load i32, ptr %12, align 4, !tbaa !11
  %76 = sext i32 %75 to i64
  %77 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt7complexIiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %76) #5
  %78 = invoke noundef i32 @_ZNKSt7complexIiE4imagB5cxx11Ev(ptr noundef nonnull align 4 dereferenceable(8) %77)
          to label %79 unwind label %91

79:                                               ; preds = %73
  %80 = sitofp i32 %78 to x86_fp80
  invoke void @_ZNSt7complexIeEC2Eee(ptr noundef nonnull align 16 dereferenceable(32) %13, x86_fp80 noundef %74, x86_fp80 noundef %80)
          to label %81 unwind label %91

81:                                               ; preds = %79
  call void @llvm.lifetime.start.p0(i64 32, ptr %14) #5
  invoke void @_ZStmiIeESt7complexIT_ERKS2_S4_(ptr dead_on_unwind writable sret(%"class.std::complex.0") align 16 %14, ptr noundef nonnull align 16 dereferenceable(32) %13, ptr noundef nonnull align 16 dereferenceable(32) %6)
          to label %82 unwind label %95

82:                                               ; preds = %81
  %83 = invoke noundef x86_fp80 @_ZSt3absIeET_RKSt7complexIS0_E(ptr noundef nonnull align 16 dereferenceable(32) %14)
          to label %84 unwind label %95

84:                                               ; preds = %82
  %85 = load i32, ptr %12, align 4, !tbaa !11
  %86 = sext i32 %85 to i64
  %87 = call noundef nonnull align 16 dereferenceable(16) ptr @_ZNSt6vectorIeSaIeEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %86) #5
  store x86_fp80 %83, ptr %87, align 16, !tbaa !15
  call void @llvm.lifetime.end.p0(i64 32, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %13) #5
  br label %88

88:                                               ; preds = %84
  %89 = load i32, ptr %12, align 4, !tbaa !11
  %90 = add nsw i32 %89, 1
  store i32 %90, ptr %12, align 4, !tbaa !11
  br label %59, !llvm.loop !17

91:                                               ; preds = %79, %73, %68
  %92 = landingpad { ptr, i32 }
          cleanup
  %93 = extractvalue { ptr, i32 } %92, 0
  store ptr %93, ptr %10, align 8
  %94 = extractvalue { ptr, i32 } %92, 1
  store i32 %94, ptr %11, align 4
  br label %99

95:                                               ; preds = %82, %81
  %96 = landingpad { ptr, i32 }
          cleanup
  %97 = extractvalue { ptr, i32 } %96, 0
  store ptr %97, ptr %10, align 8
  %98 = extractvalue { ptr, i32 } %96, 1
  store i32 %98, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 32, ptr %14) #5
  br label %99

99:                                               ; preds = %95, %91
  call void @llvm.lifetime.end.p0(i64 32, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  br label %133

100:                                              ; preds = %63
  %101 = call ptr @_ZNSt6vectorIeSaIeEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #5
  %102 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %15, i32 0, i32 0
  store ptr %101, ptr %102, align 8
  %103 = call ptr @_ZNSt6vectorIeSaIeEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #5
  %104 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %16, i32 0, i32 0
  store ptr %103, ptr %104, align 8
  %105 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %15, i32 0, i32 0
  %106 = load ptr, ptr %105, align 8
  %107 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %16, i32 0, i32 0
  %108 = load ptr, ptr %107, align 8
  invoke void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPeSt6vectorIeSaIeEEEEEvT_S7_(ptr %106, ptr %108)
          to label %109 unwind label %119

109:                                              ; preds = %100
  call void @llvm.lifetime.start.p0(i64 16, ptr %17) #5
  store x86_fp80 0xK00000000000000000000, ptr %17, align 16, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #5
  store ptr %7, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #5
  %110 = load ptr, ptr %18, align 8, !tbaa !5
  %111 = call ptr @_ZNSt6vectorIeSaIeEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %110) #5
  %112 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %19, i32 0, i32 0
  store ptr %111, ptr %112, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #5
  %113 = load ptr, ptr %18, align 8, !tbaa !5
  %114 = call ptr @_ZNSt6vectorIeSaIeEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %113) #5
  %115 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %20, i32 0, i32 0
  store ptr %114, ptr %115, align 8
  br label %116

116:                                              ; preds = %129, %109
  %117 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPeSt6vectorIeSaIeEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %19, ptr noundef nonnull align 8 dereferenceable(8) %20) #5
  br i1 %117, label %123, label %118

118:                                              ; preds = %116
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  br label %131

119:                                              ; preds = %100
  %120 = landingpad { ptr, i32 }
          cleanup
  %121 = extractvalue { ptr, i32 } %120, 0
  store ptr %121, ptr %10, align 8
  %122 = extractvalue { ptr, i32 } %120, 1
  store i32 %122, ptr %11, align 4
  br label %133

123:                                              ; preds = %116
  call void @llvm.lifetime.start.p0(i64 16, ptr %21) #5
  %124 = call noundef nonnull align 16 dereferenceable(16) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPeSt6vectorIeSaIeEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %19) #5
  %125 = load x86_fp80, ptr %124, align 16, !tbaa !15
  store x86_fp80 %125, ptr %21, align 16, !tbaa !15
  %126 = load x86_fp80, ptr %21, align 16, !tbaa !15
  %127 = load x86_fp80, ptr %17, align 16, !tbaa !15
  %128 = fadd x86_fp80 %127, %126
  store x86_fp80 %128, ptr %17, align 16, !tbaa !15
  call void @llvm.lifetime.end.p0(i64 16, ptr %21) #5
  br label %129

129:                                              ; preds = %123
  %130 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPeSt6vectorIeSaIeEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %19) #5
  br label %116

131:                                              ; preds = %118
  %132 = load x86_fp80, ptr %17, align 16, !tbaa !15
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #5
  call void @_ZNSt6vectorIeSaIeEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #5
  ret x86_fp80 %132

133:                                              ; preds = %119, %99
  call void @_ZNSt6vectorIeSaIeEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #5
  br label %134

134:                                              ; preds = %133, %64
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #5
  br label %135

135:                                              ; preds = %134
  %136 = load ptr, ptr %10, align 8
  %137 = load i32, ptr %11, align 4
  %138 = insertvalue { ptr, i32 } poison, ptr %136, 0
  %139 = insertvalue { ptr, i32 } %138, i32 %137, 1
  resume { ptr, i32 } %139
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt7complexIiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNKSt7complexIiE4realB5cxx11Ev(ptr noundef nonnull align 4 dereferenceable(8)) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNKSt7complexIiE4imagB5cxx11Ev(ptr noundef nonnull align 4 dereferenceable(8)) #2 align 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 nounwind uwtable
declare dso_local void @_ZNSt7complexIeEC2Eee(ptr noundef nonnull align 16 dereferenceable(32), x86_fp80 noundef, x86_fp80 noundef) unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSaIeEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIeSaIeEEC2EmRKeRKS0_(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, ptr noundef nonnull align 16 dereferenceable(16), ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef x86_fp80 @_ZSt3absIeET_RKSt7complexIS0_E(ptr noundef nonnull align 16 dereferenceable(32)) #3

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZStmiIeESt7complexIT_ERKS2_S4_(ptr dead_on_unwind noalias writable sret(%"class.std::complex.0") align 16, ptr noundef nonnull align 16 dereferenceable(32), ptr noundef nonnull align 16 dereferenceable(32)) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 16 dereferenceable(16) ptr @_ZNSt6vectorIeSaIeEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #2 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt6vectorIeSaIeEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24)) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt6vectorIeSaIeEE3endEv(ptr noundef nonnull align 8 dereferenceable(24)) #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPeSt6vectorIeSaIeEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 16 dereferenceable(16) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPeSt6vectorIeSaIeEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8)) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPeSt6vectorIeSaIeEEEppEv(ptr noundef nonnull align 8 dereferenceable(8)) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIeSaIeEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIeED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 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 = { 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 = { 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 = { 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 = !{!"long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = !{!16, !16, i64 0}
!16 = !{!"long double", !7, i64 0}
!17 = distinct !{!17, !14}


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

%"class.std::complex.0" = type { { x86_fp80, x86_fp80 } }
%"class.std::vector.1" = type { %"struct.std::_Vector_base.2" }
%"struct.std::_Vector_base.2" = type { %"struct.std::_Vector_base<long double, std::allocator<long double>>::_Vector_impl" }
%"struct.std::_Vector_base<long double, std::allocator<long double>>::_Vector_impl" = type { %"struct.std::_Vector_base<long double, std::allocator<long double>>::_Vector_impl_data" }
%"struct.std::_Vector_base<long double, std::allocator<long double>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator.3" = type { i8 }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@N = external dso_local local_unnamed_addr global i32, align 4

; Function Attrs: mustprogress uwtable
define dso_local noundef x86_fp80 @_Z6metricSt6vectorISt7complexIiESaIS1_EE(ptr noundef %0) local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.std::complex.0", align 16
  %3 = alloca %"class.std::vector.1", align 8
  %4 = alloca x86_fp80, align 16
  %5 = alloca %"class.std::allocator.3", align 1
  %6 = alloca %"class.std::complex.0", align 16
  %7 = alloca %"class.std::complex.0", align 16
  %8 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %9 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %10 = load i32, ptr @N, align 4, !tbaa !5
  %11 = icmp sgt i32 %10, 0
  br i1 %11, label %.lr.ph, label %._crit_edge

._crit_edge.loopexit:                             ; preds = %.lr.ph
  %12 = sitofp i64 %22 to x86_fp80
  %13 = sitofp i64 %26 to x86_fp80
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %1
  %.020.lcssa = phi x86_fp80 [ 0xK00000000000000000000, %1 ], [ %13, %._crit_edge.loopexit ]
  %.0.lcssa = phi x86_fp80 [ 0xK00000000000000000000, %1 ], [ %12, %._crit_edge.loopexit ]
  %.lcssa = phi i32 [ %10, %1 ], [ %27, %._crit_edge.loopexit ]
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %2) #5
  %14 = sitofp i32 %.lcssa to x86_fp80
  %15 = fdiv x86_fp80 %.0.lcssa, %14
  %16 = fdiv x86_fp80 %.020.lcssa, %14
  call void @_ZNSt7complexIeEC2Eee(ptr noundef nonnull align 16 dereferenceable(32) %2, x86_fp80 noundef %15, x86_fp80 noundef %16)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #5
  %17 = load i32, ptr @N, align 4, !tbaa !5
  %18 = sext i32 %17 to i64
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #5
  store x86_fp80 0xK00000000000000000000, ptr %4, align 16, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %5) #5
  call void @_ZNSaIeEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #5
  invoke void @_ZNSt6vectorIeSaIeEEC2EmRKeRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %18, ptr noundef nonnull align 16 dereferenceable(16) %4, ptr noundef nonnull align 1 dereferenceable(1) %5)
          to label %30 unwind label %35

.lr.ph:                                           ; preds = %1, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %1 ]
  %.031 = phi i64 [ %22, %.lr.ph ], [ 0, %1 ]
  %.02030 = phi i64 [ %26, %.lr.ph ], [ 0, %1 ]
  %19 = tail call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt7complexIiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %indvars.iv) #5
  %20 = tail call noundef i32 @_ZNKSt7complexIiE4realB5cxx11Ev(ptr noundef nonnull align 4 dereferenceable(8) %19)
  %21 = sext i32 %20 to i64
  %22 = add nsw i64 %.031, %21
  %23 = tail call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt7complexIiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %indvars.iv) #5
  %24 = tail call noundef i32 @_ZNKSt7complexIiE4imagB5cxx11Ev(ptr noundef nonnull align 4 dereferenceable(8) %23)
  %25 = sext i32 %24 to i64
  %26 = add nsw i64 %.02030, %25
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %27 = load i32, ptr @N, align 4, !tbaa !5
  %28 = sext i32 %27 to i64
  %29 = icmp slt i64 %indvars.iv.next, %28
  br i1 %29, label %.lr.ph, label %._crit_edge.loopexit, !llvm.loop !11

30:                                               ; preds = %._crit_edge
  call void @_ZNSt15__new_allocatorIeED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #5
  %31 = load i32, ptr @N, align 4, !tbaa !5
  %32 = icmp sgt i32 %31, 0
  br i1 %32, label %.lr.ph36, label %._crit_edge37

._crit_edge37:                                    ; preds = %45, %30
  %33 = call ptr @_ZNSt6vectorIeSaIeEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #5
  %34 = call ptr @_ZNSt6vectorIeSaIeEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #5
  invoke void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPeSt6vectorIeSaIeEEEEEvT_S7_(ptr %33, ptr %34)
          to label %52 unwind label %56

35:                                               ; preds = %._crit_edge
  %36 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIeED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #5
  br label %64

.lr.ph36:                                         ; preds = %30, %45
  %indvars.iv48 = phi i64 [ %indvars.iv.next49, %45 ], [ 0, %30 ]
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #5
  %37 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt7complexIiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %indvars.iv48) #5
  %38 = call noundef i32 @_ZNKSt7complexIiE4realB5cxx11Ev(ptr noundef nonnull align 4 dereferenceable(8) %37)
  %39 = sitofp i32 %38 to x86_fp80
  %40 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt7complexIiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %indvars.iv48) #5
  %41 = call noundef i32 @_ZNKSt7complexIiE4imagB5cxx11Ev(ptr noundef nonnull align 4 dereferenceable(8) %40)
  %42 = sitofp i32 %41 to x86_fp80
  call void @_ZNSt7complexIeEC2Eee(ptr noundef nonnull align 16 dereferenceable(32) %6, x86_fp80 noundef %39, x86_fp80 noundef %42)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #5
  invoke void @_ZStmiIeESt7complexIT_ERKS2_S4_(ptr dead_on_unwind nonnull writable sret(%"class.std::complex.0") align 16 %7, ptr noundef nonnull align 16 dereferenceable(32) %6, ptr noundef nonnull align 16 dereferenceable(32) %2)
          to label %43 unwind label %50

43:                                               ; preds = %.lr.ph36
  %44 = invoke noundef x86_fp80 @_ZSt3absIeET_RKSt7complexIS0_E(ptr noundef nonnull align 16 dereferenceable(32) %7)
          to label %45 unwind label %50

45:                                               ; preds = %43
  %46 = call noundef nonnull align 16 dereferenceable(16) ptr @_ZNSt6vectorIeSaIeEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %indvars.iv48) #5
  store x86_fp80 %44, ptr %46, align 16, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #5
  %indvars.iv.next49 = add nuw nsw i64 %indvars.iv48, 1
  %47 = load i32, ptr @N, align 4, !tbaa !5
  %48 = sext i32 %47 to i64
  %49 = icmp slt i64 %indvars.iv.next49, %48
  br i1 %49, label %.lr.ph36, label %._crit_edge37, !llvm.loop !13

50:                                               ; preds = %43, %.lr.ph36
  %51 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #5
  br label %63

52:                                               ; preds = %._crit_edge37
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #5
  %53 = call ptr @_ZNSt6vectorIeSaIeEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #5
  store ptr %53, ptr %8, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #5
  %54 = call ptr @_ZNSt6vectorIeSaIeEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #5
  store ptr %54, ptr %9, align 8
  %55 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPeSt6vectorIeSaIeEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %9) #5
  br i1 %55, label %.lr.ph40, label %._crit_edge41

._crit_edge41:                                    ; preds = %.lr.ph40, %52
  %.022.lcssa = phi x86_fp80 [ 0xK00000000000000000000, %52 ], [ %60, %.lr.ph40 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #5
  call void @_ZNSt6vectorIeSaIeEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %2) #5
  ret x86_fp80 %.022.lcssa

56:                                               ; preds = %._crit_edge37
  %57 = landingpad { ptr, i32 }
          cleanup
  br label %63

.lr.ph40:                                         ; preds = %52, %.lr.ph40
  %.02238 = phi x86_fp80 [ %60, %.lr.ph40 ], [ 0xK00000000000000000000, %52 ]
  %58 = call noundef nonnull align 16 dereferenceable(16) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPeSt6vectorIeSaIeEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #5
  %59 = load x86_fp80, ptr %58, align 16, !tbaa !9
  %60 = fadd x86_fp80 %.02238, %59
  %61 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPeSt6vectorIeSaIeEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #5
  %62 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPeSt6vectorIeSaIeEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %9) #5
  br i1 %62, label %.lr.ph40, label %._crit_edge41

63:                                               ; preds = %56, %50
  %.pn = phi { ptr, i32 } [ %51, %50 ], [ %57, %56 ]
  call void @_ZNSt6vectorIeSaIeEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #5
  br label %64

64:                                               ; preds = %63, %35
  %.pn.pn = phi { ptr, i32 } [ %.pn, %63 ], [ %36, %35 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %2) #5
  resume { ptr, i32 } %.pn.pn
}

; 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 nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt7complexIiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNKSt7complexIiE4realB5cxx11Ev(ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNKSt7complexIiE4imagB5cxx11Ev(ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #2 align 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 nounwind uwtable
declare dso_local void @_ZNSt7complexIeEC2Eee(ptr noundef nonnull align 16 dereferenceable(32), x86_fp80 noundef, x86_fp80 noundef) unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSaIeEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIeSaIeEEC2EmRKeRKS0_(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, ptr noundef nonnull align 16 dereferenceable(16), ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef x86_fp80 @_ZSt3absIeET_RKSt7complexIS0_E(ptr noundef nonnull align 16 dereferenceable(32)) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZStmiIeESt7complexIT_ERKS2_S4_(ptr dead_on_unwind noalias writable sret(%"class.std::complex.0") align 16, ptr noundef nonnull align 16 dereferenceable(32), ptr noundef nonnull align 16 dereferenceable(32)) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 16 dereferenceable(16) ptr @_ZNSt6vectorIeSaIeEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #2 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt6vectorIeSaIeEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt6vectorIeSaIeEE3endEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPeSt6vectorIeSaIeEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 16 dereferenceable(16) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPeSt6vectorIeSaIeEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPeSt6vectorIeSaIeEEEppEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIeSaIeEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIeED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 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 = { 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 = { 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 = { 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 = !{!"long double", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}


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