; LLVM IR from lzyrapx/Competitive-Programming :: HDUOJ/5751 (2).ll (Z3gaoii)

; 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::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.Complex = type { double, double }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@ans = external dso_local global [600010 x i64], align 16
@n = external dso_local global i32, align 4
@p = external dso_local global [600010 x %"class.std::vector"], align 16
@x = external dso_local global [262144 x %struct.Complex], align 16
@y = external dso_local global [262144 x %struct.Complex], align 16

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7ComplexC2Edd(ptr noundef nonnull align 8 dereferenceable(16), double noundef, double noundef) 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 nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.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: mustprogress uwtable
declare dso_local void @_Z4ConvP7ComplexS0_i(ptr noundef, ptr noundef, i32 noundef) #3

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_Z6getmaxiiiii(i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) #3

; Function Attrs: mustprogress uwtable
define dso_local void @_Z3gaoii(i32 noundef %0, i32 noundef %1) #3 personality ptr @__gxx_personality_v0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %8 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %9 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %10 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %11 = alloca i32, align 4
  %12 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %13 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %14 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %15 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %16 = alloca %"class.std::vector", align 8
  %17 = alloca i32, align 4
  %18 = alloca ptr, align 8
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca %struct.Complex, align 8
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  %27 = alloca i32, align 4
  %28 = alloca %struct.Complex, align 8
  %29 = alloca i32, align 4
  %30 = alloca i32, align 4
  store i32 %0, ptr %3, align 4, !tbaa !5
  store i32 %1, ptr %4, align 4, !tbaa !5
  %31 = load i32, ptr %3, align 4, !tbaa !5
  %32 = load i32, ptr %4, align 4, !tbaa !5
  %33 = icmp sgt i32 %31, %32
  br i1 %33, label %34, label %35

34:                                               ; preds = %2
  br label %273

35:                                               ; preds = %2
  %36 = load i32, ptr %3, align 4, !tbaa !5
  %37 = load i32, ptr %4, align 4, !tbaa !5
  %38 = icmp eq i32 %36, %37
  br i1 %38, label %39, label %42

39:                                               ; preds = %35
  %40 = load i64, ptr getelementptr inbounds ([600010 x i64], ptr @ans, i64 0, i64 1), align 8, !tbaa !9
  %41 = add nsw i64 %40, 1
  store i64 %41, ptr getelementptr inbounds ([600010 x i64], ptr @ans, i64 0, i64 1), align 8, !tbaa !9
  br label %273

42:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  %43 = load i32, ptr @n, align 4, !tbaa !5
  %44 = load i32, ptr %3, align 4, !tbaa !5
  %45 = load i32, ptr %4, align 4, !tbaa !5
  %46 = call noundef i32 @_Z6getmaxiiiii(i32 noundef 1, i32 noundef %43, i32 noundef 1, i32 noundef %44, i32 noundef %45)
  store i32 %46, ptr %5, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  %47 = load i32, ptr %5, align 4, !tbaa !5
  %48 = sext i32 %47 to i64
  %49 = getelementptr inbounds [600010 x %"class.std::vector"], ptr @p, i64 0, i64 %48
  %50 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %49) #6
  %51 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %8, i32 0, i32 0
  store ptr %50, ptr %51, align 8
  %52 = load i32, ptr %5, align 4, !tbaa !5
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds [600010 x %"class.std::vector"], ptr @p, i64 0, i64 %53
  %55 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %54) #6
  %56 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %9, i32 0, i32 0
  store ptr %55, ptr %56, align 8
  %57 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %8, i32 0, i32 0
  %58 = load ptr, ptr %57, align 8
  %59 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %9, i32 0, i32 0
  %60 = load ptr, ptr %59, align 8
  %61 = call ptr @_ZSt11lower_boundIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEiET_S7_S7_RKT0_(ptr %58, ptr %60, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %62 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %7, i32 0, i32 0
  store ptr %61, ptr %62, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  %63 = load i32, ptr %5, align 4, !tbaa !5
  %64 = sext i32 %63 to i64
  %65 = getelementptr inbounds [600010 x %"class.std::vector"], ptr @p, i64 0, i64 %64
  %66 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %65) #6
  %67 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %10, i32 0, i32 0
  store ptr %66, ptr %67, align 8
  %68 = call noundef i64 @_ZN9__gnu_cxxmiIPiSt6vectorIiSaIiEEEENS_17__normal_iteratorIT_T0_E15difference_typeERKS8_SB_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %10) #6
  %69 = trunc i64 %68 to i32
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  store i32 %69, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  %70 = load i32, ptr %5, align 4, !tbaa !5
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds [600010 x %"class.std::vector"], ptr @p, i64 0, i64 %71
  %73 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %72) #6
  %74 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %13, i32 0, i32 0
  store ptr %73, ptr %74, align 8
  %75 = load i32, ptr %5, align 4, !tbaa !5
  %76 = sext i32 %75 to i64
  %77 = getelementptr inbounds [600010 x %"class.std::vector"], ptr @p, i64 0, i64 %76
  %78 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %77) #6
  %79 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %14, i32 0, i32 0
  store ptr %78, ptr %79, align 8
  %80 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %13, i32 0, i32 0
  %81 = load ptr, ptr %80, align 8
  %82 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %14, i32 0, i32 0
  %83 = load ptr, ptr %82, align 8
  %84 = call ptr @_ZSt11upper_boundIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEiET_S7_S7_RKT0_(ptr %81, ptr %83, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %85 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %12, i32 0, i32 0
  store ptr %84, ptr %85, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  %86 = load i32, ptr %5, align 4, !tbaa !5
  %87 = sext i32 %86 to i64
  %88 = getelementptr inbounds [600010 x %"class.std::vector"], ptr @p, i64 0, i64 %87
  %89 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %88) #6
  %90 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %15, i32 0, i32 0
  store ptr %89, ptr %90, align 8
  %91 = call noundef i64 @_ZN9__gnu_cxxmiIPiSt6vectorIiSaIiEEEENS_17__normal_iteratorIT_T0_E15difference_typeERKS8_SB_(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(8) %15) #6
  %92 = sub nsw i64 %91, 1
  %93 = trunc i64 %92 to i32
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  store i32 %93, ptr %11, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %16) #6
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %16) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #6
  %94 = load i32, ptr %3, align 4, !tbaa !5
  %95 = sub nsw i32 %94, 1
  store i32 %95, ptr %17, align 4, !tbaa !5
  invoke void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) %16, ptr noundef nonnull align 4 dereferenceable(4) %17)
          to label %96 unwind label %103

96:                                               ; preds = %42
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #6
  %97 = load i32, ptr %6, align 4, !tbaa !5
  store i32 %97, ptr %20, align 4, !tbaa !5
  br label %98

98:                                               ; preds = %115, %96
  %99 = load i32, ptr %20, align 4, !tbaa !5
  %100 = load i32, ptr %11, align 4, !tbaa !5
  %101 = icmp sle i32 %99, %100
  br i1 %101, label %107, label %102

102:                                              ; preds = %98
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #6
  br label %122

103:                                              ; preds = %42
  %104 = landingpad { ptr, i32 }
          cleanup
  %105 = extractvalue { ptr, i32 } %104, 0
  store ptr %105, ptr %18, align 8
  %106 = extractvalue { ptr, i32 } %104, 1
  store i32 %106, ptr %19, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  br label %276

107:                                              ; preds = %98
  %108 = load i32, ptr %5, align 4, !tbaa !5
  %109 = sext i32 %108 to i64
  %110 = getelementptr inbounds [600010 x %"class.std::vector"], ptr @p, i64 0, i64 %109
  %111 = load i32, ptr %20, align 4, !tbaa !5
  %112 = sext i32 %111 to i64
  %113 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %110, i64 noundef %112) #6
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %16, ptr noundef nonnull align 4 dereferenceable(4) %113)
          to label %114 unwind label %118

114:                                              ; preds = %107
  br label %115

115:                                              ; preds = %114
  %116 = load i32, ptr %20, align 4, !tbaa !5
  %117 = add nsw i32 %116, 1
  store i32 %117, ptr %20, align 4, !tbaa !5
  br label %98, !llvm.loop !11

118:                                              ; preds = %107
  %119 = landingpad { ptr, i32 }
          cleanup
  %120 = extractvalue { ptr, i32 } %119, 0
  store ptr %120, ptr %18, align 8
  %121 = extractvalue { ptr, i32 } %119, 1
  store i32 %121, ptr %19, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #6
  br label %276

122:                                              ; preds = %102
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #6
  %123 = load i32, ptr %4, align 4, !tbaa !5
  %124 = add nsw i32 %123, 1
  store i32 %124, ptr %21, align 4, !tbaa !5
  invoke void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) %16, ptr noundef nonnull align 4 dereferenceable(4) %21)
          to label %125 unwind label %135

125:                                              ; preds = %122
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #6
  %126 = load i32, ptr %11, align 4, !tbaa !5
  %127 = load i32, ptr %6, align 4, !tbaa !5
  %128 = sub nsw i32 %126, %127
  %129 = add nsw i32 %128, 2
  store i32 %129, ptr %22, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #6
  store i32 0, ptr %23, align 4, !tbaa !5
  br label %130

130:                                              ; preds = %155, %125
  %131 = load i32, ptr %23, align 4, !tbaa !5
  %132 = load i32, ptr %22, align 4, !tbaa !5
  %133 = icmp slt i32 %131, %132
  br i1 %133, label %139, label %134

134:                                              ; preds = %130
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #6
  br label %162

135:                                              ; preds = %122
  %136 = landingpad { ptr, i32 }
          cleanup
  %137 = extractvalue { ptr, i32 } %136, 0
  store ptr %137, ptr %18, align 8
  %138 = extractvalue { ptr, i32 } %136, 1
  store i32 %138, ptr %19, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #6
  br label %276

139:                                              ; preds = %130
  call void @llvm.lifetime.start.p0(i64 16, ptr %24) #6
  %140 = load i32, ptr %23, align 4, !tbaa !5
  %141 = add nsw i32 %140, 1
  %142 = sext i32 %141 to i64
  %143 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %16, i64 noundef %142) #6
  %144 = load i32, ptr %143, align 4, !tbaa !5
  %145 = load i32, ptr %23, align 4, !tbaa !5
  %146 = sext i32 %145 to i64
  %147 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %16, i64 noundef %146) #6
  %148 = load i32, ptr %147, align 4, !tbaa !5
  %149 = sub nsw i32 %144, %148
  %150 = sitofp i32 %149 to double
  invoke void @_ZN7ComplexC2Edd(ptr noundef nonnull align 8 dereferenceable(16) %24, double noundef %150, double noundef 0.000000e+00)
          to label %151 unwind label %158

151:                                              ; preds = %139
  %152 = load i32, ptr %23, align 4, !tbaa !5
  %153 = sext i32 %152 to i64
  %154 = getelementptr inbounds [262144 x %struct.Complex], ptr @x, i64 0, i64 %153
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %154, ptr align 8 %24, i64 16, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.end.p0(i64 16, ptr %24) #6
  br label %155

155:                                              ; preds = %151
  %156 = load i32, ptr %23, align 4, !tbaa !5
  %157 = add nsw i32 %156, 1
  store i32 %157, ptr %23, align 4, !tbaa !5
  br label %130, !llvm.loop !16

158:                                              ; preds = %139
  %159 = landingpad { ptr, i32 }
          cleanup
  %160 = extractvalue { ptr, i32 } %159, 0
  store ptr %160, ptr %18, align 8
  %161 = extractvalue { ptr, i32 } %159, 1
  store i32 %161, ptr %19, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %24) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #6
  br label %275

162:                                              ; preds = %134
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #6
  store i32 0, ptr %25, align 4, !tbaa !5
  br label %163

163:                                              ; preds = %178, %162
  %164 = load i32, ptr %25, align 4, !tbaa !5
  %165 = load i32, ptr %22, align 4, !tbaa !5
  %166 = icmp slt i32 %164, %165
  br i1 %166, label %168, label %167

167:                                              ; preds = %163
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #6
  br label %181

168:                                              ; preds = %163
  %169 = load i32, ptr %22, align 4, !tbaa !5
  %170 = sub nsw i32 %169, 1
  %171 = load i32, ptr %25, align 4, !tbaa !5
  %172 = sub nsw i32 %170, %171
  %173 = sext i32 %172 to i64
  %174 = getelementptr inbounds [262144 x %struct.Complex], ptr @x, i64 0, i64 %173
  %175 = load i32, ptr %25, align 4, !tbaa !5
  %176 = sext i32 %175 to i64
  %177 = getelementptr inbounds [262144 x %struct.Complex], ptr @y, i64 0, i64 %176
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %177, ptr align 16 %174, i64 16, i1 false), !tbaa.struct !13
  br label %178

178:                                              ; preds = %168
  %179 = load i32, ptr %25, align 4, !tbaa !5
  %180 = add nsw i32 %179, 1
  store i32 %180, ptr %25, align 4, !tbaa !5
  br label %163, !llvm.loop !17

181:                                              ; preds = %167
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #6
  store i32 1, ptr %26, align 4, !tbaa !5
  br label %182

182:                                              ; preds = %188, %181
  %183 = load i32, ptr %26, align 4, !tbaa !5
  %184 = load i32, ptr %22, align 4, !tbaa !5
  %185 = load i32, ptr %22, align 4, !tbaa !5
  %186 = add nsw i32 %184, %185
  %187 = icmp slt i32 %183, %186
  br i1 %187, label %188, label %191

188:                                              ; preds = %182
  %189 = load i32, ptr %26, align 4, !tbaa !5
  %190 = shl i32 %189, 1
  store i32 %190, ptr %26, align 4, !tbaa !5
  br label %182, !llvm.loop !18

191:                                              ; preds = %182
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #6
  %192 = load i32, ptr %22, align 4, !tbaa !5
  store i32 %192, ptr %27, align 4, !tbaa !5
  br label %193

193:                                              ; preds = %206, %191
  %194 = load i32, ptr %27, align 4, !tbaa !5
  %195 = load i32, ptr %26, align 4, !tbaa !5
  %196 = icmp slt i32 %194, %195
  br i1 %196, label %198, label %197

197:                                              ; preds = %193
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #6
  br label %213

198:                                              ; preds = %193
  call void @llvm.lifetime.start.p0(i64 16, ptr %28) #6
  invoke void @_ZN7ComplexC2Edd(ptr noundef nonnull align 8 dereferenceable(16) %28, double noundef 0.000000e+00, double noundef 0.000000e+00)
          to label %199 unwind label %209

199:                                              ; preds = %198
  %200 = load i32, ptr %27, align 4, !tbaa !5
  %201 = sext i32 %200 to i64
  %202 = getelementptr inbounds [262144 x %struct.Complex], ptr @y, i64 0, i64 %201
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %202, ptr align 8 %28, i64 16, i1 false), !tbaa.struct !13
  %203 = load i32, ptr %27, align 4, !tbaa !5
  %204 = sext i32 %203 to i64
  %205 = getelementptr inbounds [262144 x %struct.Complex], ptr @x, i64 0, i64 %204
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %205, ptr align 8 %202, i64 16, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.end.p0(i64 16, ptr %28) #6
  br label %206

206:                                              ; preds = %199
  %207 = load i32, ptr %27, align 4, !tbaa !5
  %208 = add nsw i32 %207, 1
  store i32 %208, ptr %27, align 4, !tbaa !5
  br label %193, !llvm.loop !19

209:                                              ; preds = %198
  %210 = landingpad { ptr, i32 }
          cleanup
  %211 = extractvalue { ptr, i32 } %210, 0
  store ptr %211, ptr %18, align 8
  %212 = extractvalue { ptr, i32 } %210, 1
  store i32 %212, ptr %19, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %28) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #6
  br label %274

213:                                              ; preds = %197
  %214 = load i32, ptr %26, align 4, !tbaa !5
  invoke void @_Z4ConvP7ComplexS0_i(ptr noundef @x, ptr noundef @y, i32 noundef %214)
          to label %215 unwind label %222

215:                                              ; preds = %213
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #6
  store i32 0, ptr %29, align 4, !tbaa !5
  br label %216

216:                                              ; preds = %243, %215
  %217 = load i32, ptr %29, align 4, !tbaa !5
  %218 = load i32, ptr %22, align 4, !tbaa !5
  %219 = sub nsw i32 %218, 1
  %220 = icmp slt i32 %217, %219
  br i1 %220, label %226, label %221

221:                                              ; preds = %216
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #6
  br label %246

222:                                              ; preds = %213
  %223 = landingpad { ptr, i32 }
          cleanup
  %224 = extractvalue { ptr, i32 } %223, 0
  store ptr %224, ptr %18, align 8
  %225 = extractvalue { ptr, i32 } %223, 1
  store i32 %225, ptr %19, align 4
  br label %274

226:                                              ; preds = %216
  %227 = load i32, ptr %29, align 4, !tbaa !5
  %228 = sext i32 %227 to i64
  %229 = getelementptr inbounds [262144 x %struct.Complex], ptr @y, i64 0, i64 %228
  %230 = getelementptr inbounds %struct.Complex, ptr %229, i32 0, i32 0
  %231 = load double, ptr %230, align 16, !tbaa !20
  %232 = fadd double %231, 5.000000e-01
  %233 = load i32, ptr %22, align 4, !tbaa !5
  %234 = sub nsw i32 %233, 1
  %235 = load i32, ptr %29, align 4, !tbaa !5
  %236 = sub nsw i32 %234, %235
  %237 = sext i32 %236 to i64
  %238 = getelementptr inbounds [600010 x i64], ptr @ans, i64 0, i64 %237
  %239 = load i64, ptr %238, align 8, !tbaa !9
  %240 = sitofp i64 %239 to double
  %241 = fadd double %240, %232
  %242 = fptosi double %241 to i64
  store i64 %242, ptr %238, align 8, !tbaa !9
  br label %243

243:                                              ; preds = %226
  %244 = load i32, ptr %29, align 4, !tbaa !5
  %245 = add nsw i32 %244, 1
  store i32 %245, ptr %29, align 4, !tbaa !5
  br label %216, !llvm.loop !22

246:                                              ; preds = %221
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #6
  store i32 0, ptr %30, align 4, !tbaa !5
  br label %247

247:                                              ; preds = %265, %246
  %248 = load i32, ptr %30, align 4, !tbaa !5
  %249 = load i32, ptr %22, align 4, !tbaa !5
  %250 = icmp slt i32 %248, %249
  br i1 %250, label %252, label %251

251:                                              ; preds = %247
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #6
  br label %272

252:                                              ; preds = %247
  %253 = load i32, ptr %30, align 4, !tbaa !5
  %254 = sext i32 %253 to i64
  %255 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %16, i64 noundef %254) #6
  %256 = load i32, ptr %255, align 4, !tbaa !5
  %257 = add nsw i32 %256, 1
  %258 = load i32, ptr %30, align 4, !tbaa !5
  %259 = add nsw i32 %258, 1
  %260 = sext i32 %259 to i64
  %261 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %16, i64 noundef %260) #6
  %262 = load i32, ptr %261, align 4, !tbaa !5
  %263 = sub nsw i32 %262, 1
  invoke void @_Z3gaoii(i32 noundef %257, i32 noundef %263)
          to label %264 unwind label %268

264:                                              ; preds = %252
  br label %265

265:                                              ; preds = %264
  %266 = load i32, ptr %30, align 4, !tbaa !5
  %267 = add nsw i32 %266, 1
  store i32 %267, ptr %30, align 4, !tbaa !5
  br label %247, !llvm.loop !23

268:                                              ; preds = %252
  %269 = landingpad { ptr, i32 }
          cleanup
  %270 = extractvalue { ptr, i32 } %269, 0
  store ptr %270, ptr %18, align 8
  %271 = extractvalue { ptr, i32 } %269, 1
  store i32 %271, ptr %19, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #6
  br label %274

272:                                              ; preds = %251
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #6
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %16) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  br label %273

273:                                              ; preds = %272, %39, %34
  ret void

274:                                              ; preds = %268, %222, %209
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #6
  br label %275

275:                                              ; preds = %274, %158
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #6
  br label %276

276:                                              ; preds = %275, %135, %118, %103
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %16) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  br label %277

277:                                              ; preds = %276
  %278 = load ptr, ptr %18, align 8
  %279 = load i32, ptr %19, align 4
  %280 = insertvalue { ptr, i32 } poison, ptr %278, 0
  %281 = insertvalue { ptr, i32 } %280, i32 %279, 1
  resume { ptr, i32 } %281
}

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local ptr @_ZSt11lower_boundIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEiET_S7_S7_RKT0_(ptr, ptr, ptr noundef nonnull align 4 dereferenceable(4)) #5

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local ptr @_ZSt11upper_boundIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEiET_S7_S7_RKT0_(ptr, ptr, ptr noundef nonnull align 4 dereferenceable(4)) #5

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(4)) #3 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(4)) #3 align 2

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

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 = !{!"long long", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{i64 0, i64 8, !14, i64 8, i64 8, !14}
!14 = !{!15, !15, i64 0}
!15 = !{!"double", !7, i64 0}
!16 = distinct !{!16, !12}
!17 = distinct !{!17, !12}
!18 = distinct !{!18, !12}
!19 = distinct !{!19, !12}
!20 = !{!21, !15, i64 0}
!21 = !{!"_ZTS7Complex", !15, i64 0, !15, i64 8}
!22 = distinct !{!22, !12}
!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"

%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.Complex = type { double, double }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@ans = external dso_local local_unnamed_addr global [600010 x i64], align 16
@n = external dso_local local_unnamed_addr global i32, align 4
@p = external dso_local global [600010 x %"class.std::vector"], align 16
@x = external dso_local global [262144 x %struct.Complex], align 16
@y = external dso_local global [262144 x %struct.Complex], align 16

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7ComplexC2Edd(ptr noundef nonnull align 8 dereferenceable(16), double noundef, double noundef) 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 nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.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 uwtable
declare dso_local void @_Z4ConvP7ComplexS0_i(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #3

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_Z6getmaxiiiii(i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
define dso_local void @_Z3gaoii(i32 noundef %0, i32 noundef %1) local_unnamed_addr #3 personality ptr @__gxx_personality_v0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %6 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %7 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %8 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %9 = alloca %"class.std::vector", align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca %struct.Complex, align 8
  %13 = alloca %struct.Complex, align 8
  store i32 %0, ptr %3, align 4, !tbaa !5
  store i32 %1, ptr %4, align 4, !tbaa !5
  %14 = icmp sgt i32 %0, %1
  br i1 %14, label %133, label %15

15:                                               ; preds = %2
  %16 = icmp eq i32 %0, %1
  br i1 %16, label %17, label %20

17:                                               ; preds = %15
  %18 = load i64, ptr getelementptr inbounds (i8, ptr @ans, i64 8), align 8, !tbaa !9
  %19 = add nsw i64 %18, 1
  store i64 %19, ptr getelementptr inbounds (i8, ptr @ans, i64 8), align 8, !tbaa !9
  br label %133

20:                                               ; preds = %15
  %21 = load i32, ptr @n, align 4, !tbaa !5
  %22 = tail call noundef i32 @_Z6getmaxiiiii(i32 noundef 1, i32 noundef %21, i32 noundef 1, i32 noundef %0, i32 noundef %1)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #7
  %23 = sext i32 %22 to i64
  %24 = getelementptr inbounds [600010 x %"class.std::vector"], ptr @p, i64 0, i64 %23
  %25 = tail call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %24) #7
  %26 = tail call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %24) #7
  %27 = call ptr @_ZSt11lower_boundIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEiET_S7_S7_RKT0_(ptr %25, ptr %26, ptr noundef nonnull align 4 dereferenceable(4) %3)
  store ptr %27, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #7
  %28 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %24) #7
  store ptr %28, ptr %6, align 8
  %29 = call noundef i64 @_ZN9__gnu_cxxmiIPiSt6vectorIiSaIiEEEENS_17__normal_iteratorIT_T0_E15difference_typeERKS8_SB_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6) #7
  %30 = trunc i64 %29 to i32
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #7
  %31 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %24) #7
  %32 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %24) #7
  %33 = call ptr @_ZSt11upper_boundIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEiET_S7_S7_RKT0_(ptr %31, ptr %32, ptr noundef nonnull align 4 dereferenceable(4) %4)
  store ptr %33, ptr %7, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #7
  %34 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %24) #7
  store ptr %34, ptr %8, align 8
  %35 = call noundef i64 @_ZN9__gnu_cxxmiIPiSt6vectorIiSaIiEEEENS_17__normal_iteratorIT_T0_E15difference_typeERKS8_SB_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8) #7
  %36 = trunc i64 %35 to i32
  %37 = add i32 %36, -1
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %9) #7
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #7
  %38 = load i32, ptr %3, align 4, !tbaa !5
  %39 = add nsw i32 %38, -1
  store i32 %39, ptr %10, align 4, !tbaa !5
  invoke void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) %9, ptr noundef nonnull align 4 dereferenceable(4) %10)
          to label %40 unwind label %44

40:                                               ; preds = %20
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #7
  %.not74 = icmp slt i32 %37, %30
  br i1 %.not74, label %._crit_edge, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %40
  %sext = shl i64 %29, 32
  %41 = ashr exact i64 %sext, 32
  br label %.lr.ph

._crit_edge:                                      ; preds = %47, %40
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #7
  %42 = load i32, ptr %4, align 4, !tbaa !5
  %43 = add nsw i32 %42, 1
  store i32 %43, ptr %11, align 4, !tbaa !5
  invoke void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) %9, ptr noundef nonnull align 4 dereferenceable(4) %11)
          to label %50 unwind label %56

44:                                               ; preds = %20
  %45 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #7
  br label %134

.lr.ph:                                           ; preds = %.lr.ph.preheader, %47
  %indvars.iv = phi i64 [ %41, %.lr.ph.preheader ], [ %indvars.iv.next, %47 ]
  %46 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %24, i64 noundef %indvars.iv) #7
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %9, ptr noundef nonnull align 4 dereferenceable(4) %46)
          to label %47 unwind label %48

47:                                               ; preds = %.lr.ph
  %indvars.iv.next = add nsw i64 %indvars.iv, 1
  %lftr.wideiv = trunc i64 %indvars.iv.next to i32
  %exitcond.not = icmp eq i32 %lftr.wideiv, %36
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !11

48:                                               ; preds = %.lr.ph
  %49 = landingpad { ptr, i32 }
          cleanup
  br label %134

50:                                               ; preds = %._crit_edge
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #7
  %51 = sub nsw i32 %37, %30
  %52 = add i32 %51, 2
  %53 = icmp sgt i32 %51, -2
  br i1 %53, label %.lr.ph78.preheader, label %.preheader72

.lr.ph78.preheader:                               ; preds = %50
  %smax = call i32 @llvm.smax.i32(i32 %52, i32 1)
  %wide.trip.count = zext nneg i32 %smax to i64
  br label %.lr.ph78

.preheader73:                                     ; preds = %.lr.ph78
  br i1 %53, label %.lr.ph80, label %.preheader72

.lr.ph80:                                         ; preds = %.preheader73
  %54 = add nsw i32 %51, 1
  %xtraiter = and i64 %wide.trip.count, 1
  %55 = icmp ugt i32 %51, 2147483645
  br i1 %55, label %.preheader72.loopexit.unr-lcssa, label %.lr.ph80.new

.lr.ph80.new:                                     ; preds = %.lr.ph80
  %unroll_iter = and i64 %wide.trip.count, 2147483646
  br label %71

56:                                               ; preds = %._crit_edge
  %57 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #7
  br label %134

.lr.ph78:                                         ; preds = %.lr.ph78.preheader, %.lr.ph78
  %indvars.iv88 = phi i64 [ 0, %.lr.ph78.preheader ], [ %indvars.iv.next89, %.lr.ph78 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %12) #7
  %indvars.iv.next89 = add nuw nsw i64 %indvars.iv88, 1
  %58 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %indvars.iv.next89) #7
  %59 = load i32, ptr %58, align 4, !tbaa !5
  %60 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %indvars.iv88) #7
  %61 = load i32, ptr %60, align 4, !tbaa !5
  %62 = sub nsw i32 %59, %61
  %63 = sitofp i32 %62 to double
  call void @_ZN7ComplexC2Edd(ptr noundef nonnull align 8 dereferenceable(16) %12, double noundef %63, double noundef 0.000000e+00)
  %64 = getelementptr inbounds [262144 x %struct.Complex], ptr @x, i64 0, i64 %indvars.iv88
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %64, ptr noundef nonnull align 8 dereferenceable(16) %12, i64 16, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %12) #7
  %exitcond91.not = icmp eq i64 %indvars.iv.next89, %wide.trip.count
  br i1 %exitcond91.not, label %.preheader73, label %.lr.ph78, !llvm.loop !16

.preheader72.loopexit.unr-lcssa:                  ; preds = %71, %.lr.ph80
  %indvars.iv92.unr = phi i64 [ 0, %.lr.ph80 ], [ %indvars.iv.next93.1, %71 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.preheader72, label %.preheader72.loopexit.epilog-lcssa

.preheader72.loopexit.epilog-lcssa:               ; preds = %.preheader72.loopexit.unr-lcssa
  %65 = trunc nuw nsw i64 %indvars.iv92.unr to i32
  %66 = sub i32 %54, %65
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds [262144 x %struct.Complex], ptr @x, i64 0, i64 %67
  %69 = getelementptr inbounds [262144 x %struct.Complex], ptr @y, i64 0, i64 %indvars.iv92.unr
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %69, ptr noundef nonnull align 16 dereferenceable(16) %68, i64 16, i1 false), !tbaa.struct !13
  br label %.preheader72

.preheader72:                                     ; preds = %.preheader72.loopexit.epilog-lcssa, %.preheader72.loopexit.unr-lcssa, %50, %.preheader73
  %70 = shl nsw i32 %52, 1
  br label %82

71:                                               ; preds = %71, %.lr.ph80.new
  %indvars.iv92 = phi i64 [ 0, %.lr.ph80.new ], [ %indvars.iv.next93.1, %71 ]
  %niter = phi i64 [ 0, %.lr.ph80.new ], [ %niter.next.1, %71 ]
  %72 = trunc nuw nsw i64 %indvars.iv92 to i32
  %73 = sub i32 %54, %72
  %74 = sext i32 %73 to i64
  %75 = getelementptr inbounds [262144 x %struct.Complex], ptr @x, i64 0, i64 %74
  %76 = getelementptr inbounds [262144 x %struct.Complex], ptr @y, i64 0, i64 %indvars.iv92
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %76, ptr noundef nonnull align 16 dereferenceable(16) %75, i64 16, i1 false), !tbaa.struct !13
  %indvars.iv.next93 = or disjoint i64 %indvars.iv92, 1
  %77 = trunc nuw nsw i64 %indvars.iv.next93 to i32
  %78 = sub i32 %54, %77
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds [262144 x %struct.Complex], ptr @x, i64 0, i64 %79
  %81 = getelementptr inbounds [262144 x %struct.Complex], ptr @y, i64 0, i64 %indvars.iv.next93
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %81, ptr noundef nonnull align 16 dereferenceable(16) %80, i64 16, i1 false), !tbaa.struct !13
  %indvars.iv.next93.1 = add nuw nsw i64 %indvars.iv92, 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 %.preheader72.loopexit.unr-lcssa, label %71, !llvm.loop !17

82:                                               ; preds = %82, %.preheader72
  %.054 = phi i32 [ %84, %82 ], [ 1, %.preheader72 ]
  %83 = icmp slt i32 %.054, %70
  %84 = shl i32 %.054, 1
  br i1 %83, label %82, label %.preheader71, !llvm.loop !18

.preheader71:                                     ; preds = %82
  %85 = icmp slt i32 %52, %.054
  br i1 %85, label %.lr.ph82.preheader, label %._crit_edge83

.lr.ph82.preheader:                               ; preds = %.preheader71
  %86 = sext i32 %52 to i64
  br label %.lr.ph82

._crit_edge83:                                    ; preds = %.lr.ph82, %.preheader71
  invoke void @_Z4ConvP7ComplexS0_i(ptr noundef nonnull @x, ptr noundef nonnull @y, i32 noundef %.054)
          to label %.preheader70 unwind label %101

.preheader70:                                     ; preds = %._crit_edge83
  %.not6684 = icmp slt i32 %51, 0
  br i1 %.not6684, label %.preheader, label %.lr.ph86

.lr.ph86:                                         ; preds = %.preheader70
  %87 = add nuw nsw i32 %51, 1
  %88 = zext nneg i32 %87 to i64
  %wide.trip.count106 = zext nneg i32 %87 to i64
  %xtraiter115 = and i64 %wide.trip.count106, 1
  %89 = icmp eq i32 %37, %30
  br i1 %89, label %.preheader.loopexit.unr-lcssa, label %.lr.ph86.new

.lr.ph86.new:                                     ; preds = %.lr.ph86
  %unroll_iter117 = and i64 %wide.trip.count106, 2147483646
  br label %103

.lr.ph82:                                         ; preds = %.lr.ph82.preheader, %.lr.ph82
  %indvars.iv98 = phi i64 [ %86, %.lr.ph82.preheader ], [ %indvars.iv.next99, %.lr.ph82 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %13) #7
  call void @_ZN7ComplexC2Edd(ptr noundef nonnull align 8 dereferenceable(16) %13, double noundef 0.000000e+00, double noundef 0.000000e+00)
  %90 = getelementptr inbounds [262144 x %struct.Complex], ptr @y, i64 0, i64 %indvars.iv98
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %90, ptr noundef nonnull align 8 dereferenceable(16) %13, i64 16, i1 false), !tbaa.struct !13
  %91 = getelementptr inbounds [262144 x %struct.Complex], ptr @x, i64 0, i64 %indvars.iv98
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %91, ptr noundef nonnull align 8 dereferenceable(16) %13, i64 16, i1 false)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #7
  %indvars.iv.next99 = add nsw i64 %indvars.iv98, 1
  %lftr.wideiv101 = trunc i64 %indvars.iv.next99 to i32
  %exitcond102.not = icmp eq i32 %.054, %lftr.wideiv101
  br i1 %exitcond102.not, label %._crit_edge83, label %.lr.ph82, !llvm.loop !19

.preheader.loopexit.unr-lcssa:                    ; preds = %103, %.lr.ph86
  %indvars.iv103.unr = phi i64 [ 0, %.lr.ph86 ], [ %indvars.iv.next104.1, %103 ]
  %lcmp.mod116.not = icmp eq i64 %xtraiter115, 0
  br i1 %lcmp.mod116.not, label %.preheader, label %.preheader.loopexit.epilog-lcssa

.preheader.loopexit.epilog-lcssa:                 ; preds = %.preheader.loopexit.unr-lcssa
  %92 = getelementptr inbounds [262144 x %struct.Complex], ptr @y, i64 0, i64 %indvars.iv103.unr
  %93 = load double, ptr %92, align 16, !tbaa !20
  %94 = fadd double %93, 5.000000e-01
  %95 = sub nsw i64 %88, %indvars.iv103.unr
  %96 = getelementptr inbounds [600010 x i64], ptr @ans, i64 0, i64 %95
  %97 = load i64, ptr %96, align 8, !tbaa !9
  %98 = sitofp i64 %97 to double
  %99 = fadd double %94, %98
  %100 = fptosi double %99 to i64
  store i64 %100, ptr %96, align 8, !tbaa !9
  br label %.preheader

.preheader:                                       ; preds = %.preheader.loopexit.epilog-lcssa, %.preheader.loopexit.unr-lcssa, %.preheader70
  %smax111 = call i32 @llvm.smax.i32(i32 %52, i32 0)
  %wide.trip.count112 = zext nneg i32 %smax111 to i64
  br label %122

101:                                              ; preds = %._crit_edge83
  %102 = landingpad { ptr, i32 }
          cleanup
  br label %134

103:                                              ; preds = %103, %.lr.ph86.new
  %indvars.iv103 = phi i64 [ 0, %.lr.ph86.new ], [ %indvars.iv.next104.1, %103 ]
  %niter118 = phi i64 [ 0, %.lr.ph86.new ], [ %niter118.next.1, %103 ]
  %104 = getelementptr inbounds [262144 x %struct.Complex], ptr @y, i64 0, i64 %indvars.iv103
  %105 = load double, ptr %104, align 16, !tbaa !20
  %106 = fadd double %105, 5.000000e-01
  %107 = sub nsw i64 %88, %indvars.iv103
  %108 = getelementptr inbounds [600010 x i64], ptr @ans, i64 0, i64 %107
  %109 = load i64, ptr %108, align 8, !tbaa !9
  %110 = sitofp i64 %109 to double
  %111 = fadd double %106, %110
  %112 = fptosi double %111 to i64
  store i64 %112, ptr %108, align 8, !tbaa !9
  %indvars.iv.next104 = or disjoint i64 %indvars.iv103, 1
  %113 = getelementptr inbounds [262144 x %struct.Complex], ptr @y, i64 0, i64 %indvars.iv.next104
  %114 = load double, ptr %113, align 16, !tbaa !20
  %115 = fadd double %114, 5.000000e-01
  %116 = sub nsw i64 %88, %indvars.iv.next104
  %117 = getelementptr inbounds [600010 x i64], ptr @ans, i64 0, i64 %116
  %118 = load i64, ptr %117, align 8, !tbaa !9
  %119 = sitofp i64 %118 to double
  %120 = fadd double %115, %119
  %121 = fptosi double %120 to i64
  store i64 %121, ptr %117, align 8, !tbaa !9
  %indvars.iv.next104.1 = add nuw nsw i64 %indvars.iv103, 2
  %niter118.next.1 = add i64 %niter118, 2
  %niter118.ncmp.1 = icmp eq i64 %niter118.next.1, %unroll_iter117
  br i1 %niter118.ncmp.1, label %.preheader.loopexit.unr-lcssa, label %103, !llvm.loop !22

122:                                              ; preds = %.preheader, %124
  %indvars.iv108 = phi i64 [ 0, %.preheader ], [ %indvars.iv.next109, %124 ]
  %exitcond113.not = icmp eq i64 %indvars.iv108, %wide.trip.count112
  br i1 %exitcond113.not, label %123, label %124

123:                                              ; preds = %122
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #7
  br label %133

124:                                              ; preds = %122
  %125 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %indvars.iv108) #7
  %126 = load i32, ptr %125, align 4, !tbaa !5
  %127 = add nsw i32 %126, 1
  %indvars.iv.next109 = add nuw nsw i64 %indvars.iv108, 1
  %128 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %indvars.iv.next109) #7
  %129 = load i32, ptr %128, align 4, !tbaa !5
  %130 = add nsw i32 %129, -1
  invoke void @_Z3gaoii(i32 noundef %127, i32 noundef %130)
          to label %122 unwind label %131, !llvm.loop !23

131:                                              ; preds = %124
  %132 = landingpad { ptr, i32 }
          cleanup
  br label %134

133:                                              ; preds = %2, %123, %17
  ret void

134:                                              ; preds = %101, %131, %56, %48, %44
  %.pn68 = phi { ptr, i32 } [ %49, %48 ], [ %57, %56 ], [ %45, %44 ], [ %132, %131 ], [ %102, %101 ]
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #7
  resume { ptr, i32 } %.pn68
}

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local ptr @_ZSt11lower_boundIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEiET_S7_S7_RKT0_(ptr, ptr, ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #5

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local ptr @_ZSt11upper_boundIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEiET_S7_S7_RKT0_(ptr, ptr, ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #5

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #3 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #3 align 2

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smax.i32(i32, i32) #6

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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #7 = { 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 long", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{i64 0, i64 8, !14, i64 8, i64 8, !14}
!14 = !{!15, !15, i64 0}
!15 = !{!"double", !7, i64 0}
!16 = distinct !{!16, !12}
!17 = distinct !{!17, !12}
!18 = distinct !{!18, !12}
!19 = distinct !{!19, !12}
!20 = !{!21, !15, i64 0}
!21 = !{!"_ZTS7Complex", !15, i64 0, !15, i64 8}
!22 = distinct !{!22, !12}
!23 = distinct !{!23, !12}


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