; LLVM IR from tangjz/acm-icpc :: codeforces/gym/101955L.ll (Z5solvev)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"struct.std::pair" = type { double, double }

@_ZL2pi = external hidden global double, align 8
@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@R = external dso_local global i32, align 4
@ctr = external dso_local global [405 x i32], align 16
@que = external dso_local global [405 x double], align 16
@seg = external dso_local global [101 x %"struct.std::pair"], align 16
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [7 x i8], align 1

; Function Attrs: nounwind
declare double @acos(double noundef) #0

; Function Attrs: mustprogress uwtable
define dso_local noundef double @_Z5solvev() #1 {
  %1 = alloca double, align 8
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca double, align 8
  %9 = alloca double, align 8
  %10 = alloca %"struct.std::pair", align 8
  %11 = alloca double, align 8
  %12 = alloca double, align 8
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca double, align 8
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca double, align 8
  %23 = alloca double, align 8
  %24 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @n, ptr noundef @R)
  store i32 0, ptr @m, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #9
  store i32 0, ptr %2, align 4, !tbaa !5
  br label %25

25:                                               ; preds = %105, %0
  %26 = load i32, ptr %2, align 4, !tbaa !5
  %27 = load i32, ptr @n, align 4, !tbaa !5
  %28 = icmp slt i32 %26, %27
  br i1 %28, label %30, label %29

29:                                               ; preds = %25
  store i32 2, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #9
  br label %108

30:                                               ; preds = %25
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #9
  %31 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.2, ptr noundef %4, ptr noundef %5, ptr noundef %6)
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #9
  %32 = load i32, ptr %4, align 4, !tbaa !5
  %33 = load i32, ptr %4, align 4, !tbaa !5
  %34 = mul nsw i32 %32, %33
  %35 = load i32, ptr %5, align 4, !tbaa !5
  %36 = load i32, ptr %5, align 4, !tbaa !5
  %37 = mul nsw i32 %35, %36
  %38 = add nsw i32 %34, %37
  store i32 %38, ptr %7, align 4, !tbaa !5
  %39 = load i32, ptr %7, align 4, !tbaa !5
  %40 = load i32, ptr @R, align 4, !tbaa !5
  %41 = load i32, ptr %6, align 4, !tbaa !5
  %42 = sub nsw i32 %40, %41
  %43 = load i32, ptr @R, align 4, !tbaa !5
  %44 = load i32, ptr %6, align 4, !tbaa !5
  %45 = sub nsw i32 %43, %44
  %46 = mul nsw i32 %42, %45
  %47 = icmp sle i32 %39, %46
  br i1 %47, label %58, label %48

48:                                               ; preds = %30
  %49 = load i32, ptr %7, align 4, !tbaa !5
  %50 = load i32, ptr @R, align 4, !tbaa !5
  %51 = load i32, ptr %6, align 4, !tbaa !5
  %52 = add nsw i32 %50, %51
  %53 = load i32, ptr @R, align 4, !tbaa !5
  %54 = load i32, ptr %6, align 4, !tbaa !5
  %55 = add nsw i32 %53, %54
  %56 = mul nsw i32 %52, %55
  %57 = icmp sge i32 %49, %56
  br i1 %57, label %58, label %59

58:                                               ; preds = %48, %30
  store i32 4, ptr %3, align 4
  br label %102

59:                                               ; preds = %48
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #9
  %60 = load i32, ptr %5, align 4, !tbaa !5
  %61 = load i32, ptr %4, align 4, !tbaa !5
  %62 = call noundef double @_ZSt5atan2IiiEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(i32 noundef %60, i32 noundef %61)
  store double %62, ptr %8, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #9
  %63 = load i32, ptr @R, align 4, !tbaa !5
  %64 = load i32, ptr @R, align 4, !tbaa !5
  %65 = mul nsw i32 %63, %64
  %66 = load i32, ptr %7, align 4, !tbaa !5
  %67 = add nsw i32 %65, %66
  %68 = load i32, ptr %6, align 4, !tbaa !5
  %69 = load i32, ptr %6, align 4, !tbaa !5
  %70 = mul nsw i32 %68, %69
  %71 = sub nsw i32 %67, %70
  %72 = sitofp i32 %71 to x86_fp80
  %73 = load i32, ptr @R, align 4, !tbaa !5
  %74 = mul nsw i32 2, %73
  %75 = sitofp i32 %74 to x86_fp80
  %76 = load i32, ptr %7, align 4, !tbaa !5
  %77 = sitofp i32 %76 to x86_fp80
  %78 = call x86_fp80 @sqrtl(x86_fp80 noundef %77) #9
  %79 = fmul x86_fp80 %75, %78
  %80 = fdiv x86_fp80 %72, %79
  %81 = fptrunc x86_fp80 %80 to double
  %82 = call noundef double @_Z7cos_fixd(double noundef %81)
  %83 = call double @acos(double noundef %82) #9
  store double %83, ptr %9, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 16, ptr %10) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #9
  %84 = load double, ptr %8, align 8, !tbaa !9
  %85 = load double, ptr %9, align 8, !tbaa !9
  %86 = fsub double %84, %85
  %87 = call noundef double @_Z7ang_fixd(double noundef %86)
  store double %87, ptr %11, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #9
  %88 = load double, ptr %8, align 8, !tbaa !9
  %89 = load double, ptr %9, align 8, !tbaa !9
  %90 = fadd double %88, %89
  %91 = call noundef double @_Z7ang_fixd(double noundef %90)
  store double %91, ptr %12, align 8, !tbaa !9
  %92 = call { double, double } @_ZSt9make_pairIddESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %12)
  %93 = getelementptr inbounds { double, double }, ptr %10, i32 0, i32 0
  %94 = extractvalue { double, double } %92, 0
  store double %94, ptr %93, align 8
  %95 = getelementptr inbounds { double, double }, ptr %10, i32 0, i32 1
  %96 = extractvalue { double, double } %92, 1
  store double %96, ptr %95, align 8
  %97 = load i32, ptr @m, align 4, !tbaa !5
  %98 = add nsw i32 %97, 1
  store i32 %98, ptr @m, align 4, !tbaa !5
  %99 = sext i32 %97 to i64
  %100 = getelementptr inbounds [101 x %"struct.std::pair"], ptr @seg, i64 0, i64 %99
  %101 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt4pairIddEaSEOS0_(ptr noundef nonnull align 8 dereferenceable(16) %100, ptr noundef nonnull align 8 dereferenceable(16) %10) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #9
  store i32 0, ptr %3, align 4
  br label %102

102:                                              ; preds = %59, %58
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #9
  %103 = load i32, ptr %3, align 4
  switch i32 %103, label %366 [
    i32 0, label %104
    i32 4, label %105
  ]

104:                                              ; preds = %102
  br label %105

105:                                              ; preds = %104, %102
  %106 = load i32, ptr %2, align 4, !tbaa !5
  %107 = add nsw i32 %106, 1
  store i32 %107, ptr %2, align 4, !tbaa !5
  br label %25, !llvm.loop !11

108:                                              ; preds = %29
  %109 = load i32, ptr @m, align 4, !tbaa !5
  %110 = icmp ne i32 %109, 0
  br i1 %110, label %116, label %111

111:                                              ; preds = %108
  %112 = load i32, ptr @R, align 4, !tbaa !5
  %113 = load i32, ptr @R, align 4, !tbaa !5
  %114 = add nsw i32 %112, %113
  %115 = sitofp i32 %114 to double
  store double %115, ptr %1, align 8
  br label %364

116:                                              ; preds = %108
  %117 = load i32, ptr @m, align 4, !tbaa !5
  store i32 %117, ptr @n, align 4, !tbaa !5
  store i32 0, ptr @m, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #9
  store i32 0, ptr %13, align 4, !tbaa !5
  br label %118

118:                                              ; preds = %142, %116
  %119 = load i32, ptr %13, align 4, !tbaa !5
  %120 = load i32, ptr @n, align 4, !tbaa !5
  %121 = icmp slt i32 %119, %120
  br i1 %121, label %123, label %122

122:                                              ; preds = %118
  store i32 5, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #9
  br label %145

123:                                              ; preds = %118
  %124 = load i32, ptr %13, align 4, !tbaa !5
  %125 = sext i32 %124 to i64
  %126 = getelementptr inbounds [101 x %"struct.std::pair"], ptr @seg, i64 0, i64 %125
  %127 = getelementptr inbounds %"struct.std::pair", ptr %126, i32 0, i32 0
  %128 = load double, ptr %127, align 16, !tbaa !13
  %129 = load i32, ptr @m, align 4, !tbaa !5
  %130 = add nsw i32 %129, 1
  store i32 %130, ptr @m, align 4, !tbaa !5
  %131 = sext i32 %129 to i64
  %132 = getelementptr inbounds [405 x double], ptr @que, i64 0, i64 %131
  store double %128, ptr %132, align 8, !tbaa !9
  %133 = load i32, ptr %13, align 4, !tbaa !5
  %134 = sext i32 %133 to i64
  %135 = getelementptr inbounds [101 x %"struct.std::pair"], ptr @seg, i64 0, i64 %134
  %136 = getelementptr inbounds %"struct.std::pair", ptr %135, i32 0, i32 1
  %137 = load double, ptr %136, align 8, !tbaa !15
  %138 = load i32, ptr @m, align 4, !tbaa !5
  %139 = add nsw i32 %138, 1
  store i32 %139, ptr @m, align 4, !tbaa !5
  %140 = sext i32 %138 to i64
  %141 = getelementptr inbounds [405 x double], ptr @que, i64 0, i64 %140
  store double %137, ptr %141, align 8, !tbaa !9
  br label %142

142:                                              ; preds = %123
  %143 = load i32, ptr %13, align 4, !tbaa !5
  %144 = add nsw i32 %143, 1
  store i32 %144, ptr %13, align 4, !tbaa !5
  br label %118, !llvm.loop !16

145:                                              ; preds = %122
  %146 = load i32, ptr @m, align 4, !tbaa !5
  %147 = sext i32 %146 to i64
  %148 = getelementptr inbounds double, ptr @que, i64 %147
  call void @_ZSt4sortIPdEvT_S1_(ptr noundef @que, ptr noundef %148)
  %149 = load i32, ptr @m, align 4, !tbaa !5
  %150 = sext i32 %149 to i64
  %151 = getelementptr inbounds double, ptr @que, i64 %150
  %152 = call noundef ptr @_ZSt6uniqueIPdPFbddEET_S3_S3_T0_(ptr noundef @que, ptr noundef %151, ptr noundef @_Z2eqdd)
  %153 = ptrtoint ptr %152 to i64
  %154 = sub i64 %153, ptrtoint (ptr @que to i64)
  %155 = sdiv exact i64 %154, 8
  %156 = trunc i64 %155 to i32
  store i32 %156, ptr @m, align 4, !tbaa !5
  %157 = load i32, ptr @m, align 4, !tbaa !5
  %158 = sext i32 %157 to i64
  %159 = mul i64 %158, 4
  call void @llvm.memset.p0.i64(ptr align 16 @ctr, i8 0, i64 %159, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #9
  store i32 0, ptr %14, align 4, !tbaa !5
  br label %160

160:                                              ; preds = %223, %145
  %161 = load i32, ptr %14, align 4, !tbaa !5
  %162 = load i32, ptr @n, align 4, !tbaa !5
  %163 = icmp slt i32 %161, %162
  br i1 %163, label %165, label %164

164:                                              ; preds = %160
  store i32 8, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #9
  br label %226

165:                                              ; preds = %160
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #9
  %166 = load i32, ptr @m, align 4, !tbaa !5
  %167 = sext i32 %166 to i64
  %168 = getelementptr inbounds double, ptr @que, i64 %167
  %169 = load i32, ptr %14, align 4, !tbaa !5
  %170 = sext i32 %169 to i64
  %171 = getelementptr inbounds [101 x %"struct.std::pair"], ptr @seg, i64 0, i64 %170
  %172 = getelementptr inbounds %"struct.std::pair", ptr %171, i32 0, i32 0
  %173 = call noundef ptr @_ZSt11lower_boundIPddPFbddEET_S3_S3_RKT0_T1_(ptr noundef @que, ptr noundef %168, ptr noundef nonnull align 8 dereferenceable(8) %172, ptr noundef @_Z3lesdd)
  %174 = ptrtoint ptr %173 to i64
  %175 = sub i64 %174, ptrtoint (ptr @que to i64)
  %176 = sdiv exact i64 %175, 8
  %177 = trunc i64 %176 to i32
  store i32 %177, ptr %15, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #9
  %178 = load i32, ptr @m, align 4, !tbaa !5
  %179 = sext i32 %178 to i64
  %180 = getelementptr inbounds double, ptr @que, i64 %179
  %181 = load i32, ptr %14, align 4, !tbaa !5
  %182 = sext i32 %181 to i64
  %183 = getelementptr inbounds [101 x %"struct.std::pair"], ptr @seg, i64 0, i64 %182
  %184 = getelementptr inbounds %"struct.std::pair", ptr %183, i32 0, i32 1
  %185 = call noundef ptr @_ZSt11lower_boundIPddPFbddEET_S3_S3_RKT0_T1_(ptr noundef @que, ptr noundef %180, ptr noundef nonnull align 8 dereferenceable(8) %184, ptr noundef @_Z3lesdd)
  %186 = ptrtoint ptr %185 to i64
  %187 = sub i64 %186, ptrtoint (ptr @que to i64)
  %188 = sdiv exact i64 %187, 8
  %189 = trunc i64 %188 to i32
  store i32 %189, ptr %16, align 4, !tbaa !5
  %190 = load i32, ptr %15, align 4, !tbaa !5
  %191 = load i32, ptr %16, align 4, !tbaa !5
  %192 = icmp slt i32 %190, %191
  br i1 %192, label %193, label %204

193:                                              ; preds = %165
  %194 = load i32, ptr %15, align 4, !tbaa !5
  %195 = sext i32 %194 to i64
  %196 = getelementptr inbounds [405 x i32], ptr @ctr, i64 0, i64 %195
  %197 = load i32, ptr %196, align 4, !tbaa !5
  %198 = add nsw i32 %197, 1
  store i32 %198, ptr %196, align 4, !tbaa !5
  %199 = load i32, ptr %16, align 4, !tbaa !5
  %200 = sext i32 %199 to i64
  %201 = getelementptr inbounds [405 x i32], ptr @ctr, i64 0, i64 %200
  %202 = load i32, ptr %201, align 4, !tbaa !5
  %203 = add nsw i32 %202, -1
  store i32 %203, ptr %201, align 4, !tbaa !5
  br label %222

204:                                              ; preds = %165
  %205 = load i32, ptr @ctr, align 16, !tbaa !5
  %206 = add nsw i32 %205, 1
  store i32 %206, ptr @ctr, align 16, !tbaa !5
  %207 = load i32, ptr %16, align 4, !tbaa !5
  %208 = sext i32 %207 to i64
  %209 = getelementptr inbounds [405 x i32], ptr @ctr, i64 0, i64 %208
  %210 = load i32, ptr %209, align 4, !tbaa !5
  %211 = add nsw i32 %210, -1
  store i32 %211, ptr %209, align 4, !tbaa !5
  %212 = load i32, ptr %15, align 4, !tbaa !5
  %213 = sext i32 %212 to i64
  %214 = getelementptr inbounds [405 x i32], ptr @ctr, i64 0, i64 %213
  %215 = load i32, ptr %214, align 4, !tbaa !5
  %216 = add nsw i32 %215, 1
  store i32 %216, ptr %214, align 4, !tbaa !5
  %217 = load i32, ptr @m, align 4, !tbaa !5
  %218 = sext i32 %217 to i64
  %219 = getelementptr inbounds [405 x i32], ptr @ctr, i64 0, i64 %218
  %220 = load i32, ptr %219, align 4, !tbaa !5
  %221 = add nsw i32 %220, -1
  store i32 %221, ptr %219, align 4, !tbaa !5
  br label %222

222:                                              ; preds = %204, %193
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #9
  br label %223

223:                                              ; preds = %222
  %224 = load i32, ptr %14, align 4, !tbaa !5
  %225 = add nsw i32 %224, 1
  store i32 %225, ptr %14, align 4, !tbaa !5
  br label %160, !llvm.loop !17

226:                                              ; preds = %164
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #9
  store i32 1, ptr %17, align 4, !tbaa !5
  br label %227

227:                                              ; preds = %243, %226
  %228 = load i32, ptr %17, align 4, !tbaa !5
  %229 = load i32, ptr @m, align 4, !tbaa !5
  %230 = icmp slt i32 %228, %229
  br i1 %230, label %232, label %231

231:                                              ; preds = %227
  store i32 11, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #9
  br label %246

232:                                              ; preds = %227
  %233 = load i32, ptr %17, align 4, !tbaa !5
  %234 = sub nsw i32 %233, 1
  %235 = sext i32 %234 to i64
  %236 = getelementptr inbounds [405 x i32], ptr @ctr, i64 0, i64 %235
  %237 = load i32, ptr %236, align 4, !tbaa !5
  %238 = load i32, ptr %17, align 4, !tbaa !5
  %239 = sext i32 %238 to i64
  %240 = getelementptr inbounds [405 x i32], ptr @ctr, i64 0, i64 %239
  %241 = load i32, ptr %240, align 4, !tbaa !5
  %242 = add nsw i32 %241, %237
  store i32 %242, ptr %240, align 4, !tbaa !5
  br label %243

243:                                              ; preds = %232
  %244 = load i32, ptr %17, align 4, !tbaa !5
  %245 = add nsw i32 %244, 1
  store i32 %245, ptr %17, align 4, !tbaa !5
  br label %227, !llvm.loop !18

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

247:                                              ; preds = %273, %246
  %248 = load i32, ptr %18, align 4, !tbaa !5
  %249 = load i32, ptr @m, align 4, !tbaa !5
  %250 = icmp slt i32 %248, %249
  br i1 %250, label %252, label %251

251:                                              ; preds = %247
  store i32 14, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #9
  br label %276

252:                                              ; preds = %247
  %253 = load i32, ptr %18, align 4, !tbaa !5
  %254 = sext i32 %253 to i64
  %255 = getelementptr inbounds [405 x i32], ptr @ctr, i64 0, i64 %254
  %256 = load i32, ptr %255, align 4, !tbaa !5
  %257 = load i32, ptr @m, align 4, !tbaa !5
  %258 = load i32, ptr %18, align 4, !tbaa !5
  %259 = add nsw i32 %257, %258
  %260 = sext i32 %259 to i64
  %261 = getelementptr inbounds [405 x i32], ptr @ctr, i64 0, i64 %260
  store i32 %256, ptr %261, align 4, !tbaa !5
  %262 = load i32, ptr %18, align 4, !tbaa !5
  %263 = sext i32 %262 to i64
  %264 = getelementptr inbounds [405 x double], ptr @que, i64 0, i64 %263
  %265 = load double, ptr %264, align 8, !tbaa !9
  %266 = load double, ptr @_ZL2pi, align 8, !tbaa !9
  %267 = call double @llvm.fmuladd.f64(double %266, double 2.000000e+00, double %265)
  %268 = load i32, ptr @m, align 4, !tbaa !5
  %269 = load i32, ptr %18, align 4, !tbaa !5
  %270 = add nsw i32 %268, %269
  %271 = sext i32 %270 to i64
  %272 = getelementptr inbounds [405 x double], ptr @que, i64 0, i64 %271
  store double %267, ptr %272, align 8, !tbaa !9
  br label %273

273:                                              ; preds = %252
  %274 = load i32, ptr %18, align 4, !tbaa !5
  %275 = add nsw i32 %274, 1
  store i32 %275, ptr %18, align 4, !tbaa !5
  br label %247, !llvm.loop !19

276:                                              ; preds = %251
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #9
  store double 0.000000e+00, ptr %19, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #9
  store i32 0, ptr %20, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #9
  store i32 0, ptr %21, align 4, !tbaa !5
  br label %277

277:                                              ; preds = %349, %276
  %278 = load i32, ptr %20, align 4, !tbaa !5
  %279 = load i32, ptr @m, align 4, !tbaa !5
  %280 = icmp slt i32 %278, %279
  br i1 %280, label %282, label %281

281:                                              ; preds = %277
  store i32 17, ptr %3, align 4
  br label %352

282:                                              ; preds = %277
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #9
  %283 = load i32, ptr %20, align 4, !tbaa !5
  %284 = sext i32 %283 to i64
  %285 = getelementptr inbounds [405 x double], ptr @que, i64 0, i64 %284
  %286 = load double, ptr %285, align 8, !tbaa !9
  %287 = load double, ptr @_ZL2pi, align 8, !tbaa !9
  %288 = fadd double %286, %287
  store double %288, ptr %22, align 8, !tbaa !9
  br label %289

289:                                              ; preds = %305, %282
  %290 = load i32, ptr %21, align 4, !tbaa !5
  %291 = load i32, ptr %20, align 4, !tbaa !5
  %292 = load i32, ptr @m, align 4, !tbaa !5
  %293 = add nsw i32 %291, %292
  %294 = icmp slt i32 %290, %293
  br i1 %294, label %295, label %302

295:                                              ; preds = %289
  %296 = load i32, ptr %21, align 4, !tbaa !5
  %297 = sext i32 %296 to i64
  %298 = getelementptr inbounds [405 x double], ptr @que, i64 0, i64 %297
  %299 = load double, ptr %298, align 8, !tbaa !9
  %300 = load double, ptr %22, align 8, !tbaa !9
  %301 = call noundef zeroext i1 @_Z3lesdd(double noundef %299, double noundef %300)
  br label %302

302:                                              ; preds = %295, %289
  %303 = phi i1 [ false, %289 ], [ %301, %295 ]
  br i1 %303, label %304, label %308

304:                                              ; preds = %302
  br label %305

305:                                              ; preds = %304
  %306 = load i32, ptr %21, align 4, !tbaa !5
  %307 = add nsw i32 %306, 1
  store i32 %307, ptr %21, align 4, !tbaa !5
  br label %289, !llvm.loop !20

308:                                              ; preds = %302
  %309 = load i32, ptr %21, align 4, !tbaa !5
  %310 = load i32, ptr %20, align 4, !tbaa !5
  %311 = load i32, ptr @m, align 4, !tbaa !5
  %312 = add nsw i32 %310, %311
  %313 = icmp slt i32 %309, %312
  br i1 %313, label %314, label %321

314:                                              ; preds = %308
  %315 = load i32, ptr %21, align 4, !tbaa !5
  %316 = sext i32 %315 to i64
  %317 = getelementptr inbounds [405 x double], ptr @que, i64 0, i64 %316
  %318 = load double, ptr %317, align 8, !tbaa !9
  %319 = load double, ptr %22, align 8, !tbaa !9
  %320 = call noundef zeroext i1 @_Z2eqdd(double noundef %318, double noundef %319)
  br i1 %320, label %328, label %321

321:                                              ; preds = %314, %308
  %322 = load i32, ptr %21, align 4, !tbaa !5
  %323 = sub nsw i32 %322, 1
  %324 = sext i32 %323 to i64
  %325 = getelementptr inbounds [405 x i32], ptr @ctr, i64 0, i64 %324
  %326 = load i32, ptr %325, align 4, !tbaa !5
  %327 = icmp ne i32 %326, 0
  br i1 %327, label %333, label %328

328:                                              ; preds = %321, %314
  %329 = load i32, ptr @R, align 4, !tbaa !5
  %330 = load i32, ptr @R, align 4, !tbaa !5
  %331 = add nsw i32 %329, %330
  %332 = sitofp i32 %331 to double
  store double %332, ptr %1, align 8
  store i32 1, ptr %3, align 4
  br label %346

333:                                              ; preds = %321
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #9
  %334 = load i32, ptr %21, align 4, !tbaa !5
  %335 = sub nsw i32 %334, 1
  %336 = sext i32 %335 to i64
  %337 = getelementptr inbounds [405 x double], ptr @que, i64 0, i64 %336
  %338 = load double, ptr %337, align 8, !tbaa !9
  %339 = load i32, ptr %20, align 4, !tbaa !5
  %340 = sext i32 %339 to i64
  %341 = getelementptr inbounds [405 x double], ptr @que, i64 0, i64 %340
  %342 = load double, ptr %341, align 8, !tbaa !9
  %343 = fsub double %338, %342
  store double %343, ptr %23, align 8, !tbaa !9
  %344 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %19, ptr noundef nonnull align 8 dereferenceable(8) %23)
  %345 = load double, ptr %344, align 8, !tbaa !9
  store double %345, ptr %19, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #9
  store i32 0, ptr %3, align 4
  br label %346

346:                                              ; preds = %333, %328
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #9
  %347 = load i32, ptr %3, align 4
  switch i32 %347, label %352 [
    i32 0, label %348
  ]

348:                                              ; preds = %346
  br label %349

349:                                              ; preds = %348
  %350 = load i32, ptr %20, align 4, !tbaa !5
  %351 = add nsw i32 %350, 1
  store i32 %351, ptr %20, align 4, !tbaa !5
  br label %277, !llvm.loop !21

352:                                              ; preds = %346, %281
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #9
  %353 = load i32, ptr %3, align 4
  switch i32 %353, label %363 [
    i32 17, label %354
  ]

354:                                              ; preds = %352
  %355 = load i32, ptr @R, align 4, !tbaa !5
  %356 = load i32, ptr @R, align 4, !tbaa !5
  %357 = add nsw i32 %355, %356
  %358 = sitofp i32 %357 to double
  %359 = load double, ptr %19, align 8, !tbaa !9
  %360 = fdiv double %359, 2.000000e+00
  %361 = call double @sin(double noundef %360) #9
  %362 = fmul double %358, %361
  store double %362, ptr %1, align 8
  store i32 1, ptr %3, align 4
  br label %363

363:                                              ; preds = %354, %352
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #9
  br label %364

364:                                              ; preds = %363, %111
  %365 = load double, ptr %1, align 8
  ret double %365

366:                                              ; preds = %102
  unreachable
}

declare i32 @__isoc99_scanf(ptr noundef, ...) #2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZSt5atan2IiiEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(i32 noundef, i32 noundef) #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef double @_Z7cos_fixd(double noundef) #5

; Function Attrs: nounwind
declare x86_fp80 @sqrtl(x86_fp80 noundef) #0

; Function Attrs: mustprogress uwtable
declare dso_local { double, double } @_ZSt9make_pairIddESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #1

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef double @_Z7ang_fixd(double noundef) #5

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_Z2eqdd(double noundef, double noundef) #4

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #7

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_Z3lesdd(double noundef, double noundef) #4

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #8

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

; Function Attrs: nounwind
declare double @sin(double noundef) #0

attributes #0 = { nounwind "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 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 #2 = { "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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #7 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #8 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #9 = { 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 = !{!"double", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!14, !10, i64 0}
!14 = !{!"_ZTSSt4pairIddE", !10, i64 0, !10, i64 8}
!15 = !{!14, !10, i64 8}
!16 = distinct !{!16, !12}
!17 = distinct !{!17, !12}
!18 = distinct !{!18, !12}
!19 = distinct !{!19, !12}
!20 = distinct !{!20, !12}
!21 = distinct !{!21, !12}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"struct.std::pair" = type { double, double }

@_ZL2pi = external hidden local_unnamed_addr global double, align 8
@n = external dso_local global i32, align 4
@m = external dso_local local_unnamed_addr global i32, align 4
@R = external dso_local global i32, align 4
@ctr = external dso_local local_unnamed_addr global [405 x i32], align 16
@que = external dso_local global [405 x double], align 16
@seg = external dso_local global [101 x %"struct.std::pair"], align 16
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [7 x i8], align 1

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @acos(double noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
define dso_local noundef double @_Z5solvev() local_unnamed_addr #1 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca %"struct.std::pair", align 8
  %5 = alloca double, align 8
  %6 = alloca double, align 8
  %7 = alloca double, align 8
  %8 = alloca double, align 8
  %9 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n, ptr noundef nonnull @R)
  store i32 0, ptr @m, align 4, !tbaa !5
  %10 = load i32, ptr @n, align 4, !tbaa !5
  %11 = icmp sgt i32 %10, 0
  br i1 %11, label %.lr.ph, label %._crit_edge.thread

.lr.ph:                                           ; preds = %0
  %12 = getelementptr inbounds i8, ptr %4, i64 8
  br label %13

._crit_edge:                                      ; preds = %56
  %.pre = load i32, ptr @m, align 4, !tbaa !5
  %.not = icmp eq i32 %.pre, 0
  br i1 %.not, label %._crit_edge.thread, label %63

13:                                               ; preds = %.lr.ph, %56
  %.05783 = phi i32 [ 0, %.lr.ph ], [ %57, %56 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #10
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #10
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #10
  %14 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.2, ptr noundef nonnull %1, ptr noundef nonnull %2, ptr noundef nonnull %3)
  %15 = load i32, ptr %1, align 4, !tbaa !5
  %16 = mul nsw i32 %15, %15
  %17 = load i32, ptr %2, align 4, !tbaa !5
  %18 = mul nsw i32 %17, %17
  %19 = add nuw nsw i32 %18, %16
  %20 = load i32, ptr @R, align 4, !tbaa !5
  %21 = load i32, ptr %3, align 4, !tbaa !5
  %22 = sub nsw i32 %20, %21
  %23 = mul nsw i32 %22, %22
  %.not75 = icmp ugt i32 %19, %23
  br i1 %.not75, label %24, label %56

24:                                               ; preds = %13
  %25 = add nsw i32 %21, %20
  %26 = mul nsw i32 %25, %25
  %.not76 = icmp ult i32 %19, %26
  br i1 %.not76, label %27, label %56

27:                                               ; preds = %24
  %28 = call noundef double @_ZSt5atan2IiiEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(i32 noundef %17, i32 noundef %15)
  %29 = load i32, ptr @R, align 4, !tbaa !5
  %30 = mul nsw i32 %29, %29
  %31 = add nuw nsw i32 %30, %19
  %32 = load i32, ptr %3, align 4, !tbaa !5
  %33 = mul nsw i32 %32, %32
  %34 = sub nsw i32 %31, %33
  %35 = sitofp i32 %34 to x86_fp80
  %36 = shl nsw i32 %29, 1
  %37 = sitofp i32 %36 to x86_fp80
  %38 = uitofp nneg i32 %19 to x86_fp80
  %sqrt = call x86_fp80 @llvm.sqrt.f80(x86_fp80 %38)
  %39 = fmul x86_fp80 %sqrt, %37
  %40 = fdiv x86_fp80 %35, %39
  %41 = fptrunc x86_fp80 %40 to double
  %42 = call noundef double @_Z7cos_fixd(double noundef %41)
  %43 = call double @acos(double noundef %42) #10
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #10
  %44 = fsub double %28, %43
  %45 = call noundef double @_Z7ang_fixd(double noundef %44)
  store double %45, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #10
  %46 = fadd double %28, %43
  %47 = call noundef double @_Z7ang_fixd(double noundef %46)
  store double %47, ptr %6, align 8, !tbaa !9
  %48 = call { double, double } @_ZSt9make_pairIddESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6)
  %49 = extractvalue { double, double } %48, 0
  store double %49, ptr %4, align 8
  %50 = extractvalue { double, double } %48, 1
  store double %50, ptr %12, align 8
  %51 = load i32, ptr @m, align 4, !tbaa !5
  %52 = add nsw i32 %51, 1
  store i32 %52, ptr @m, align 4, !tbaa !5
  %53 = sext i32 %51 to i64
  %54 = getelementptr inbounds [101 x %"struct.std::pair"], ptr @seg, i64 0, i64 %53
  %55 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt4pairIddEaSEOS0_(ptr noundef nonnull align 8 dereferenceable(16) %54, ptr noundef nonnull align 8 dereferenceable(16) %4) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #10
  br label %56

56:                                               ; preds = %13, %24, %27
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #10
  %57 = add nuw nsw i32 %.05783, 1
  %58 = load i32, ptr @n, align 4, !tbaa !5
  %59 = icmp slt i32 %57, %58
  br i1 %59, label %13, label %._crit_edge, !llvm.loop !11

._crit_edge.thread:                               ; preds = %0, %._crit_edge
  %60 = load i32, ptr @R, align 4, !tbaa !5
  %61 = shl nsw i32 %60, 1
  %62 = sitofp i32 %61 to double
  br label %221

63:                                               ; preds = %._crit_edge
  store i32 %.pre, ptr @n, align 4, !tbaa !5
  store i32 0, ptr @m, align 4, !tbaa !5
  %64 = icmp sgt i32 %.pre, 0
  br i1 %64, label %.lr.ph86.preheader, label %70

.lr.ph86.preheader:                               ; preds = %63
  %wide.trip.count = zext nneg i32 %.pre to i64
  %min.iters.check = icmp eq i32 %.pre, 1
  br i1 %min.iters.check, label %.lr.ph86.preheader166, label %vector.ph

.lr.ph86.preheader166:                            ; preds = %middle.block, %.lr.ph86.preheader
  %indvars.iv108.ph = phi i64 [ 0, %.lr.ph86.preheader ], [ %ind.end, %middle.block ]
  %indvars.iv.ph = phi i64 [ 0, %.lr.ph86.preheader ], [ %n.vec, %middle.block ]
  br label %.lr.ph86

vector.ph:                                        ; preds = %.lr.ph86.preheader
  %n.vec = and i64 %wide.trip.count, 2147483646
  %ind.end = shl nuw nsw i64 %n.vec, 1
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %offset.idx = shl i64 %index, 1
  %65 = getelementptr inbounds [101 x %"struct.std::pair"], ptr @seg, i64 0, i64 %index
  %wide.vec = load <4 x double>, ptr %65, align 16, !tbaa !9
  %66 = or disjoint i64 %offset.idx, 1
  %gep = getelementptr [405 x double], ptr getelementptr (i8, ptr @que, i64 -8), i64 0, i64 %66
  store <4 x double> %wide.vec, ptr %gep, align 16, !tbaa !9
  %index.next = add nuw i64 %index, 2
  %67 = icmp eq i64 %index.next, %n.vec
  br i1 %67, label %middle.block, label %vector.body, !llvm.loop !13

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count
  br i1 %cmp.n, label %._crit_edge87, label %.lr.ph86.preheader166

._crit_edge87:                                    ; preds = %.lr.ph86, %middle.block
  %indvars.iv.next109.lcssa = phi i64 [ %ind.end, %middle.block ], [ %indvars.iv.next109, %.lr.ph86 ]
  %68 = trunc nuw i64 %indvars.iv.next109.lcssa to i32
  store i32 %68, ptr @m, align 4, !tbaa !5
  %sext138 = shl i64 %indvars.iv.next109.lcssa, 32
  %69 = ashr exact i64 %sext138, 32
  br label %70

70:                                               ; preds = %._crit_edge87, %63
  %71 = phi i64 [ %69, %._crit_edge87 ], [ 0, %63 ]
  %72 = getelementptr inbounds double, ptr @que, i64 %71
  call void @_ZSt4sortIPdEvT_S1_(ptr noundef nonnull @que, ptr noundef nonnull %72)
  %73 = load i32, ptr @m, align 4, !tbaa !5
  %74 = sext i32 %73 to i64
  %75 = getelementptr inbounds double, ptr @que, i64 %74
  %76 = call noundef ptr @_ZSt6uniqueIPdPFbddEET_S3_S3_T0_(ptr noundef nonnull @que, ptr noundef nonnull %75, ptr noundef nonnull @_Z2eqdd)
  %77 = ptrtoint ptr %76 to i64
  %78 = sub i64 %77, ptrtoint (ptr @que to i64)
  %79 = lshr exact i64 %78, 3
  %80 = trunc i64 %79 to i32
  store i32 %80, ptr @m, align 4, !tbaa !5
  %sext = shl i64 %78, 29
  %81 = ashr i64 %sext, 30
  %82 = and i64 %81, -4
  call void @llvm.memset.p0.i64(ptr nonnull align 16 @ctr, i8 0, i64 %82, i1 false)
  %83 = load i32, ptr @n, align 4, !tbaa !5
  %84 = icmp sgt i32 %83, 0
  br i1 %84, label %.lr.ph91, label %.preheader82

.lr.ph86:                                         ; preds = %.lr.ph86.preheader166, %.lr.ph86
  %indvars.iv108 = phi i64 [ %indvars.iv.next109, %.lr.ph86 ], [ %indvars.iv108.ph, %.lr.ph86.preheader166 ]
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph86 ], [ %indvars.iv.ph, %.lr.ph86.preheader166 ]
  %85 = getelementptr inbounds [101 x %"struct.std::pair"], ptr @seg, i64 0, i64 %indvars.iv
  %86 = getelementptr inbounds [405 x double], ptr @que, i64 0, i64 %indvars.iv108
  %indvars.iv.next109 = add nuw nsw i64 %indvars.iv108, 2
  %87 = load <2 x double>, ptr %85, align 16, !tbaa !9
  store <2 x double> %87, ptr %86, align 16, !tbaa !9
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge87, label %.lr.ph86, !llvm.loop !16

.preheader82.loopexit:                            ; preds = %131
  %.pre133 = load i32, ptr @m, align 4, !tbaa !5
  br label %.preheader82

.preheader82:                                     ; preds = %.preheader82.loopexit, %70
  %88 = phi i32 [ %.pre133, %.preheader82.loopexit ], [ %80, %70 ]
  %89 = icmp sgt i32 %88, 1
  br i1 %89, label %.lr.ph93.preheader, label %.preheader

.lr.ph93.preheader:                               ; preds = %.preheader82
  %wide.trip.count119 = zext nneg i32 %88 to i64
  %.pre134 = load i32, ptr @ctr, align 16, !tbaa !5
  %90 = add nsw i64 %wide.trip.count119, -1
  %91 = add nsw i64 %wide.trip.count119, -2
  %xtraiter = and i64 %90, 3
  %92 = icmp ult i64 %91, 3
  br i1 %92, label %.preheader.loopexit.unr-lcssa, label %.lr.ph93.preheader.new

.lr.ph93.preheader.new:                           ; preds = %.lr.ph93.preheader
  %unroll_iter = and i64 %90, -4
  br label %.lr.ph93

.lr.ph91:                                         ; preds = %70, %131
  %indvars.iv113 = phi i64 [ %indvars.iv.next114, %131 ], [ 0, %70 ]
  %93 = load i32, ptr @m, align 4, !tbaa !5
  %94 = sext i32 %93 to i64
  %95 = getelementptr inbounds double, ptr @que, i64 %94
  %96 = getelementptr inbounds [101 x %"struct.std::pair"], ptr @seg, i64 0, i64 %indvars.iv113
  %97 = call noundef ptr @_ZSt11lower_boundIPddPFbddEET_S3_S3_RKT0_T1_(ptr noundef nonnull @que, ptr noundef nonnull %95, ptr noundef nonnull align 8 dereferenceable(8) %96, ptr noundef nonnull @_Z3lesdd)
  %98 = ptrtoint ptr %97 to i64
  %99 = sub i64 %98, ptrtoint (ptr @que to i64)
  %100 = lshr exact i64 %99, 3
  %101 = trunc i64 %100 to i32
  %102 = load i32, ptr @m, align 4, !tbaa !5
  %103 = sext i32 %102 to i64
  %104 = getelementptr inbounds double, ptr @que, i64 %103
  %105 = getelementptr inbounds i8, ptr %96, i64 8
  %106 = call noundef ptr @_ZSt11lower_boundIPddPFbddEET_S3_S3_RKT0_T1_(ptr noundef nonnull @que, ptr noundef nonnull %104, ptr noundef nonnull align 8 dereferenceable(8) %105, ptr noundef nonnull @_Z3lesdd)
  %107 = ptrtoint ptr %106 to i64
  %108 = sub i64 %107, ptrtoint (ptr @que to i64)
  %109 = lshr exact i64 %108, 3
  %110 = trunc i64 %109 to i32
  %111 = icmp slt i32 %101, %110
  br i1 %111, label %112, label %118

112:                                              ; preds = %.lr.ph91
  %sext73 = shl i64 %99, 29
  %113 = ashr i64 %sext73, 32
  %114 = getelementptr inbounds [405 x i32], ptr @ctr, i64 0, i64 %113
  %115 = load i32, ptr %114, align 4, !tbaa !5
  %116 = add nsw i32 %115, 1
  store i32 %116, ptr %114, align 4, !tbaa !5
  %sext74 = shl i64 %108, 29
  %117 = ashr i64 %sext74, 32
  br label %131

118:                                              ; preds = %.lr.ph91
  %119 = load i32, ptr @ctr, align 16, !tbaa !5
  %120 = add nsw i32 %119, 1
  store i32 %120, ptr @ctr, align 16, !tbaa !5
  %sext71 = shl i64 %108, 29
  %121 = ashr i64 %sext71, 32
  %122 = getelementptr inbounds [405 x i32], ptr @ctr, i64 0, i64 %121
  %123 = load i32, ptr %122, align 4, !tbaa !5
  %124 = add nsw i32 %123, -1
  store i32 %124, ptr %122, align 4, !tbaa !5
  %sext72 = shl i64 %99, 29
  %125 = ashr i64 %sext72, 32
  %126 = getelementptr inbounds [405 x i32], ptr @ctr, i64 0, i64 %125
  %127 = load i32, ptr %126, align 4, !tbaa !5
  %128 = add nsw i32 %127, 1
  store i32 %128, ptr %126, align 4, !tbaa !5
  %129 = load i32, ptr @m, align 4, !tbaa !5
  %130 = sext i32 %129 to i64
  br label %131

131:                                              ; preds = %118, %112
  %.sink145 = phi i64 [ %130, %118 ], [ %117, %112 ]
  %132 = getelementptr inbounds [405 x i32], ptr @ctr, i64 0, i64 %.sink145
  %133 = load i32, ptr %132, align 4, !tbaa !5
  %134 = add nsw i32 %133, -1
  store i32 %134, ptr %132, align 4, !tbaa !5
  %indvars.iv.next114 = add nuw nsw i64 %indvars.iv113, 1
  %135 = load i32, ptr @n, align 4, !tbaa !5
  %136 = sext i32 %135 to i64
  %137 = icmp slt i64 %indvars.iv.next114, %136
  br i1 %137, label %.lr.ph91, label %.preheader82.loopexit, !llvm.loop !17

.preheader.loopexit.unr-lcssa:                    ; preds = %.lr.ph93, %.lr.ph93.preheader
  %.unr = phi i32 [ %.pre134, %.lr.ph93.preheader ], [ %164, %.lr.ph93 ]
  %indvars.iv116.unr = phi i64 [ 1, %.lr.ph93.preheader ], [ %indvars.iv.next117.3, %.lr.ph93 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.preheader, label %.lr.ph93.epil

.lr.ph93.epil:                                    ; preds = %.preheader.loopexit.unr-lcssa, %.lr.ph93.epil
  %138 = phi i32 [ %141, %.lr.ph93.epil ], [ %.unr, %.preheader.loopexit.unr-lcssa ]
  %indvars.iv116.epil = phi i64 [ %indvars.iv.next117.epil, %.lr.ph93.epil ], [ %indvars.iv116.unr, %.preheader.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.lr.ph93.epil ], [ 0, %.preheader.loopexit.unr-lcssa ]
  %139 = getelementptr inbounds [405 x i32], ptr @ctr, i64 0, i64 %indvars.iv116.epil
  %140 = load i32, ptr %139, align 4, !tbaa !5
  %141 = add nsw i32 %140, %138
  store i32 %141, ptr %139, align 4, !tbaa !5
  %indvars.iv.next117.epil = add nuw nsw i64 %indvars.iv116.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %.preheader, label %.lr.ph93.epil, !llvm.loop !18

.preheader:                                       ; preds = %.preheader.loopexit.unr-lcssa, %.lr.ph93.epil, %.preheader82
  %142 = icmp sgt i32 %88, 0
  br i1 %142, label %.lr.ph95, label %._crit_edge96.thread

._crit_edge96.thread:                             ; preds = %.preheader
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #10
  br label %.thread80

.lr.ph95:                                         ; preds = %.preheader
  %143 = load double, ptr @_ZL2pi, align 8, !tbaa !9
  %144 = zext nneg i32 %88 to i64
  %min.iters.check153 = icmp eq i32 %88, 1
  br i1 %min.iters.check153, label %scalar.ph152.preheader, label %vector.ph154

scalar.ph152.preheader:                           ; preds = %middle.block151, %.lr.ph95
  %indvars.iv121.ph = phi i64 [ 0, %.lr.ph95 ], [ %n.vec156, %middle.block151 ]
  br label %scalar.ph152

vector.ph154:                                     ; preds = %.lr.ph95
  %n.vec156 = and i64 %144, 2147483646
  %broadcast.splatinsert = insertelement <2 x double> poison, double %143, i64 0
  %broadcast.splat = shufflevector <2 x double> %broadcast.splatinsert, <2 x double> poison, <2 x i32> zeroinitializer
  br label %vector.body158

vector.body158:                                   ; preds = %vector.body158, %vector.ph154
  %index159 = phi i64 [ 0, %vector.ph154 ], [ %index.next161, %vector.body158 ]
  %145 = getelementptr inbounds [405 x i32], ptr @ctr, i64 0, i64 %index159
  %wide.load = load <2 x i32>, ptr %145, align 8, !tbaa !5
  %146 = add nuw nsw i64 %index159, %144
  %147 = getelementptr inbounds [405 x i32], ptr @ctr, i64 0, i64 %146
  store <2 x i32> %wide.load, ptr %147, align 4, !tbaa !5
  %148 = getelementptr inbounds [405 x double], ptr @que, i64 0, i64 %index159
  %wide.load160 = load <2 x double>, ptr %148, align 16, !tbaa !9
  %149 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %broadcast.splat, <2 x double> <double 2.000000e+00, double 2.000000e+00>, <2 x double> %wide.load160)
  %150 = getelementptr inbounds [405 x double], ptr @que, i64 0, i64 %146
  store <2 x double> %149, ptr %150, align 8, !tbaa !9
  %index.next161 = add nuw i64 %index159, 2
  %151 = icmp eq i64 %index.next161, %n.vec156
  br i1 %151, label %middle.block151, label %vector.body158, !llvm.loop !20

middle.block151:                                  ; preds = %vector.body158
  %cmp.n162 = icmp eq i64 %n.vec156, %144
  br i1 %cmp.n162, label %._crit_edge96, label %scalar.ph152.preheader

.lr.ph93:                                         ; preds = %.lr.ph93, %.lr.ph93.preheader.new
  %152 = phi i32 [ %.pre134, %.lr.ph93.preheader.new ], [ %164, %.lr.ph93 ]
  %indvars.iv116 = phi i64 [ 1, %.lr.ph93.preheader.new ], [ %indvars.iv.next117.3, %.lr.ph93 ]
  %niter = phi i64 [ 0, %.lr.ph93.preheader.new ], [ %niter.next.3, %.lr.ph93 ]
  %153 = getelementptr inbounds [405 x i32], ptr @ctr, i64 0, i64 %indvars.iv116
  %154 = load i32, ptr %153, align 4, !tbaa !5
  %155 = add nsw i32 %154, %152
  store i32 %155, ptr %153, align 4, !tbaa !5
  %indvars.iv.next117 = add nuw nsw i64 %indvars.iv116, 1
  %156 = getelementptr inbounds [405 x i32], ptr @ctr, i64 0, i64 %indvars.iv.next117
  %157 = load i32, ptr %156, align 4, !tbaa !5
  %158 = add nsw i32 %157, %155
  store i32 %158, ptr %156, align 4, !tbaa !5
  %indvars.iv.next117.1 = add nuw nsw i64 %indvars.iv116, 2
  %159 = getelementptr inbounds [405 x i32], ptr @ctr, i64 0, i64 %indvars.iv.next117.1
  %160 = load i32, ptr %159, align 4, !tbaa !5
  %161 = add nsw i32 %160, %158
  store i32 %161, ptr %159, align 4, !tbaa !5
  %indvars.iv.next117.2 = add nuw nsw i64 %indvars.iv116, 3
  %162 = getelementptr inbounds [405 x i32], ptr @ctr, i64 0, i64 %indvars.iv.next117.2
  %163 = load i32, ptr %162, align 4, !tbaa !5
  %164 = add nsw i32 %163, %161
  store i32 %164, ptr %162, align 4, !tbaa !5
  %indvars.iv.next117.3 = add nuw nsw i64 %indvars.iv116, 4
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %.preheader.loopexit.unr-lcssa, label %.lr.ph93, !llvm.loop !21

._crit_edge96:                                    ; preds = %scalar.ph152, %middle.block151
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #10
  store double 0.000000e+00, ptr %7, align 8, !tbaa !9
  br i1 %142, label %.lr.ph107, label %.thread80

scalar.ph152:                                     ; preds = %scalar.ph152.preheader, %scalar.ph152
  %indvars.iv121 = phi i64 [ %indvars.iv.next122, %scalar.ph152 ], [ %indvars.iv121.ph, %scalar.ph152.preheader ]
  %165 = getelementptr inbounds [405 x i32], ptr @ctr, i64 0, i64 %indvars.iv121
  %166 = load i32, ptr %165, align 4, !tbaa !5
  %167 = add nuw nsw i64 %indvars.iv121, %144
  %168 = getelementptr inbounds [405 x i32], ptr @ctr, i64 0, i64 %167
  store i32 %166, ptr %168, align 4, !tbaa !5
  %169 = getelementptr inbounds [405 x double], ptr @que, i64 0, i64 %indvars.iv121
  %170 = load double, ptr %169, align 8, !tbaa !9
  %171 = call double @llvm.fmuladd.f64(double %143, double 2.000000e+00, double %170)
  %172 = getelementptr inbounds [405 x double], ptr @que, i64 0, i64 %167
  store double %171, ptr %172, align 8, !tbaa !9
  %indvars.iv.next122 = add nuw nsw i64 %indvars.iv121, 1
  %exitcond125.not = icmp eq i64 %indvars.iv.next122, %144
  br i1 %exitcond125.not, label %._crit_edge96, label %scalar.ph152, !llvm.loop !22

.lr.ph107:                                        ; preds = %._crit_edge96, %200
  %173 = phi i32 [ %207, %200 ], [ %88, %._crit_edge96 ]
  %indvars.iv129 = phi i64 [ %indvars.iv.next130, %200 ], [ 0, %._crit_edge96 ]
  %.052105 = phi i32 [ %.153.lcssa, %200 ], [ 0, %._crit_edge96 ]
  %174 = getelementptr inbounds [405 x double], ptr @que, i64 0, i64 %indvars.iv129
  %175 = load double, ptr %174, align 8, !tbaa !9
  %176 = load double, ptr @_ZL2pi, align 8, !tbaa !9
  %177 = fadd double %175, %176
  %178 = trunc nuw nsw i64 %indvars.iv129 to i32
  %179 = add nsw i32 %173, %178
  %180 = icmp slt i32 %.052105, %179
  br i1 %180, label %.lr.ph99.preheader, label %.critedge

.lr.ph99.preheader:                               ; preds = %.lr.ph107
  %181 = sext i32 %.052105 to i64
  br label %.lr.ph99

.lr.ph99:                                         ; preds = %.lr.ph99.preheader, %185
  %indvars.iv126 = phi i64 [ %181, %.lr.ph99.preheader ], [ %indvars.iv.next127, %185 ]
  %182 = getelementptr inbounds [405 x double], ptr @que, i64 0, i64 %indvars.iv126
  %183 = load double, ptr %182, align 8, !tbaa !9
  %184 = call noundef zeroext i1 @_Z3lesdd(double noundef %183, double noundef %177)
  %.pre135.pre = load i32, ptr @m, align 4, !tbaa !5
  br i1 %184, label %185, label %.lr.ph99..critedge.loopexit_crit_edge

.lr.ph99..critedge.loopexit_crit_edge:            ; preds = %.lr.ph99
  %.pre137 = add nsw i32 %.pre135.pre, %178
  br label %.critedge.loopexit

185:                                              ; preds = %.lr.ph99
  %indvars.iv.next127 = add nsw i64 %indvars.iv126, 1
  %186 = add nsw i32 %.pre135.pre, %178
  %187 = sext i32 %186 to i64
  %188 = icmp slt i64 %indvars.iv.next127, %187
  br i1 %188, label %.lr.ph99, label %.critedge.loopexit, !llvm.loop !23

.critedge.loopexit:                               ; preds = %185, %.lr.ph99..critedge.loopexit_crit_edge
  %.pre136.pre-phi = phi i32 [ %.pre137, %.lr.ph99..critedge.loopexit_crit_edge ], [ %186, %185 ]
  %.153.lcssa.ph.in = phi i64 [ %indvars.iv126, %.lr.ph99..critedge.loopexit_crit_edge ], [ %indvars.iv.next127, %185 ]
  %.153.lcssa.ph = trunc i64 %.153.lcssa.ph.in to i32
  br label %.critedge

.critedge:                                        ; preds = %.critedge.loopexit, %.lr.ph107
  %.pre-phi = phi i32 [ %.pre136.pre-phi, %.critedge.loopexit ], [ %179, %.lr.ph107 ]
  %.153.lcssa = phi i32 [ %.153.lcssa.ph, %.critedge.loopexit ], [ %.052105, %.lr.ph107 ]
  %189 = icmp slt i32 %.153.lcssa, %.pre-phi
  br i1 %189, label %190, label %195

190:                                              ; preds = %.critedge
  %191 = sext i32 %.153.lcssa to i64
  %192 = getelementptr inbounds [405 x double], ptr @que, i64 0, i64 %191
  %193 = load double, ptr %192, align 8, !tbaa !9
  %194 = call noundef zeroext i1 @_Z2eqdd(double noundef %193, double noundef %177)
  br i1 %194, label %209, label %195

195:                                              ; preds = %190, %.critedge
  %196 = add nsw i32 %.153.lcssa, -1
  %197 = sext i32 %196 to i64
  %198 = getelementptr inbounds [405 x i32], ptr @ctr, i64 0, i64 %197
  %199 = load i32, ptr %198, align 4, !tbaa !5
  %.not69 = icmp eq i32 %199, 0
  br i1 %.not69, label %209, label %200

200:                                              ; preds = %195
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #10
  %201 = getelementptr inbounds [405 x double], ptr @que, i64 0, i64 %197
  %202 = load double, ptr %201, align 8, !tbaa !9
  %203 = load double, ptr %174, align 8, !tbaa !9
  %204 = fsub double %202, %203
  store double %204, ptr %8, align 8, !tbaa !9
  %205 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8)
  %206 = load double, ptr %205, align 8, !tbaa !9
  store double %206, ptr %7, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #10
  %indvars.iv.next130 = add nuw nsw i64 %indvars.iv129, 1
  %207 = load i32, ptr @m, align 4, !tbaa !5
  %208 = sext i32 %207 to i64
  %.not70 = icmp slt i64 %indvars.iv.next130, %208
  br i1 %.not70, label %.lr.ph107, label %.thread80.loopexit, !llvm.loop !24

209:                                              ; preds = %195, %190
  %210 = load i32, ptr @R, align 4, !tbaa !5
  %211 = shl nsw i32 %210, 1
  %212 = sitofp i32 %211 to double
  br label %220

.thread80.loopexit:                               ; preds = %200
  %213 = fmul double %206, 5.000000e-01
  br label %.thread80

.thread80:                                        ; preds = %._crit_edge96.thread, %.thread80.loopexit, %._crit_edge96
  %214 = phi double [ %213, %.thread80.loopexit ], [ 0.000000e+00, %._crit_edge96 ], [ 0.000000e+00, %._crit_edge96.thread ]
  %215 = load i32, ptr @R, align 4, !tbaa !5
  %216 = shl nsw i32 %215, 1
  %217 = sitofp i32 %216 to double
  %218 = call double @sin(double noundef %214) #10
  %219 = fmul double %218, %217
  br label %220

220:                                              ; preds = %209, %.thread80
  %.3 = phi double [ %219, %.thread80 ], [ %212, %209 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #10
  br label %221

221:                                              ; preds = %220, %._crit_edge.thread
  %.4 = phi double [ %.3, %220 ], [ %62, %._crit_edge.thread ]
  ret double %.4
}

; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZSt5atan2IiiEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(i32 noundef, i32 noundef) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef double @_Z7cos_fixd(double noundef) local_unnamed_addr #5

; Function Attrs: mustprogress uwtable
declare dso_local { double, double } @_ZSt9make_pairIddESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef double @_Z7ang_fixd(double noundef) local_unnamed_addr #5

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_Z2eqdd(double noundef, double noundef) #4

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #7

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_Z3lesdd(double noundef, double noundef) #4

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #8

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @sin(double noundef) local_unnamed_addr #0

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare x86_fp80 @llvm.sqrt.f80(x86_fp80) #9

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare <2 x double> @llvm.fmuladd.v2f64(<2 x double>, <2 x double>, <2 x double>) #9

attributes #0 = { mustprogress nofree nounwind willreturn memory(write) "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 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 #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #7 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #8 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #9 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #10 = { 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 = !{!"double", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12, !14, !15}
!14 = !{!"llvm.loop.isvectorized", i32 1}
!15 = !{!"llvm.loop.unroll.runtime.disable"}
!16 = distinct !{!16, !12, !15, !14}
!17 = distinct !{!17, !12}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.unroll.disable"}
!20 = distinct !{!20, !12, !14, !15}
!21 = distinct !{!21, !12}
!22 = distinct !{!22, !12, !15, !14}
!23 = distinct !{!23, !12}
!24 = distinct !{!24, !12}


; Effective O3 passes: AggressiveInstCombinePass,BDCEPass,ConstraintEliminationPass,CorrelatedValuePropagationPass,DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,ReassociatePass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass