; LLVM IR from tangjz/acm-icpc :: TDL_training/2015-11-15 (A - Podracing - lzy)

; 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 { i32, i32 }
%"struct.std::pair.0" = type { ptr, ptr }

@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@l = external dso_local global i32, align 4
@ll = external dso_local global i32, align 4
@q = external dso_local global i32, align 4
@p = external dso_local global i32, align 4
@r = external dso_local global [100009 x %"struct.std::pair"], align 16
@s = external dso_local global [100009 x %"struct.std::pair"], align 16
@tt = external dso_local global %"struct.std::pair", align 4
@t = external dso_local global [100009 x %"struct.std::pair"], align 16
@y = external dso_local global [300009 x i32], align 16
@ans = external dso_local global x86_fp80, align 16
@tmp = external dso_local global x86_fp80, align 16
@x = external dso_local global [300009 x x86_fp80], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [5 x i8], align 1
@_ZL3inf = external hidden constant i32, align 4
@.str.2 = external hidden unnamed_addr constant [6 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_Z3cmpSt4pairIiiES0_(i64, i64) #0

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

28:                                               ; preds = %52, %0
  %29 = load i32, ptr %2, align 4, !tbaa !5
  %30 = load i32, ptr @n, align 4, !tbaa !5
  %31 = icmp slt i32 %29, %30
  br i1 %31, label %33, label %32

32:                                               ; preds = %28
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  br label %55

33:                                               ; preds = %28
  %34 = load i32, ptr %2, align 4, !tbaa !5
  %35 = sext i32 %34 to i64
  %36 = getelementptr inbounds [100009 x %"struct.std::pair"], ptr @r, i64 0, i64 %35
  %37 = getelementptr inbounds %"struct.std::pair", ptr %36, i32 0, i32 1
  %38 = load i32, ptr %2, align 4, !tbaa !5
  %39 = sext i32 %38 to i64
  %40 = getelementptr inbounds [100009 x %"struct.std::pair"], ptr @r, i64 0, i64 %39
  %41 = getelementptr inbounds %"struct.std::pair", ptr %40, i32 0, i32 0
  %42 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %37, ptr noundef %41)
  %43 = load i32, ptr %2, align 4, !tbaa !5
  %44 = sext i32 %43 to i64
  %45 = getelementptr inbounds [100009 x %"struct.std::pair"], ptr @r, i64 0, i64 %44
  %46 = getelementptr inbounds %"struct.std::pair", ptr %45, i32 0, i32 0
  %47 = load i32, ptr %46, align 8, !tbaa !9
  %48 = load i32, ptr @q, align 4, !tbaa !5
  %49 = add nsw i32 %48, 1
  store i32 %49, ptr @q, align 4, !tbaa !5
  %50 = sext i32 %48 to i64
  %51 = getelementptr inbounds [300009 x i32], ptr @y, i64 0, i64 %50
  store i32 %47, ptr %51, align 4, !tbaa !5
  br label %52

52:                                               ; preds = %33
  %53 = load i32, ptr %2, align 4, !tbaa !5
  %54 = add nsw i32 %53, 1
  store i32 %54, ptr %2, align 4, !tbaa !5
  br label %28, !llvm.loop !11

55:                                               ; preds = %32
  %56 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @m)
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #7
  store i32 0, ptr %3, align 4, !tbaa !5
  br label %57

57:                                               ; preds = %81, %55
  %58 = load i32, ptr %3, align 4, !tbaa !5
  %59 = load i32, ptr @m, align 4, !tbaa !5
  %60 = icmp slt i32 %58, %59
  br i1 %60, label %62, label %61

61:                                               ; preds = %57
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #7
  br label %84

62:                                               ; preds = %57
  %63 = load i32, ptr %3, align 4, !tbaa !5
  %64 = sext i32 %63 to i64
  %65 = getelementptr inbounds [100009 x %"struct.std::pair"], ptr @s, i64 0, i64 %64
  %66 = getelementptr inbounds %"struct.std::pair", ptr %65, i32 0, i32 1
  %67 = load i32, ptr %3, align 4, !tbaa !5
  %68 = sext i32 %67 to i64
  %69 = getelementptr inbounds [100009 x %"struct.std::pair"], ptr @s, i64 0, i64 %68
  %70 = getelementptr inbounds %"struct.std::pair", ptr %69, i32 0, i32 0
  %71 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %66, ptr noundef %70)
  %72 = load i32, ptr %3, align 4, !tbaa !5
  %73 = sext i32 %72 to i64
  %74 = getelementptr inbounds [100009 x %"struct.std::pair"], ptr @s, i64 0, i64 %73
  %75 = getelementptr inbounds %"struct.std::pair", ptr %74, i32 0, i32 0
  %76 = load i32, ptr %75, align 8, !tbaa !9
  %77 = load i32, ptr @q, align 4, !tbaa !5
  %78 = add nsw i32 %77, 1
  store i32 %78, ptr @q, align 4, !tbaa !5
  %79 = sext i32 %77 to i64
  %80 = getelementptr inbounds [300009 x i32], ptr @y, i64 0, i64 %79
  store i32 %76, ptr %80, align 4, !tbaa !5
  br label %81

81:                                               ; preds = %62
  %82 = load i32, ptr %3, align 4, !tbaa !5
  %83 = add nsw i32 %82, 1
  store i32 %83, ptr %3, align 4, !tbaa !5
  br label %57, !llvm.loop !13

84:                                               ; preds = %61
  %85 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @ll)
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #7
  store i32 0, ptr %4, align 4, !tbaa !5
  br label %86

86:                                               ; preds = %117, %84
  %87 = load i32, ptr %4, align 4, !tbaa !5
  %88 = load i32, ptr @ll, align 4, !tbaa !5
  %89 = icmp slt i32 %87, %88
  br i1 %89, label %91, label %90

90:                                               ; preds = %86
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #7
  br label %120

91:                                               ; preds = %86
  %92 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef getelementptr inbounds (%"struct.std::pair", ptr @tt, i32 0, i32 1), ptr noundef @tt)
  %93 = load i32, ptr @r, align 16, !tbaa !9
  %94 = load i32, ptr @tt, align 4, !tbaa !9
  %95 = icmp sle i32 %93, %94
  br i1 %95, label %96, label %116

96:                                               ; preds = %91
  %97 = load i32, ptr @tt, align 4, !tbaa !9
  %98 = load i32, ptr @n, align 4, !tbaa !5
  %99 = sub nsw i32 %98, 1
  %100 = sext i32 %99 to i64
  %101 = getelementptr inbounds [100009 x %"struct.std::pair"], ptr @r, i64 0, i64 %100
  %102 = getelementptr inbounds %"struct.std::pair", ptr %101, i32 0, i32 0
  %103 = load i32, ptr %102, align 8, !tbaa !9
  %104 = icmp sle i32 %97, %103
  br i1 %104, label %105, label %116

105:                                              ; preds = %96
  %106 = load i32, ptr @l, align 4, !tbaa !5
  %107 = add nsw i32 %106, 1
  store i32 %107, ptr @l, align 4, !tbaa !5
  %108 = sext i32 %106 to i64
  %109 = getelementptr inbounds [100009 x %"struct.std::pair"], ptr @t, i64 0, i64 %108
  %110 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSERKS0_(ptr noundef nonnull align 4 dereferenceable(8) %109, ptr noundef nonnull align 4 dereferenceable(8) @tt)
  %111 = load i32, ptr @tt, align 4, !tbaa !9
  %112 = load i32, ptr @q, align 4, !tbaa !5
  %113 = add nsw i32 %112, 1
  store i32 %113, ptr @q, align 4, !tbaa !5
  %114 = sext i32 %112 to i64
  %115 = getelementptr inbounds [300009 x i32], ptr @y, i64 0, i64 %114
  store i32 %111, ptr %115, align 4, !tbaa !5
  br label %116

116:                                              ; preds = %105, %96, %91
  br label %117

117:                                              ; preds = %116
  %118 = load i32, ptr %4, align 4, !tbaa !5
  %119 = add nsw i32 %118, 1
  store i32 %119, ptr %4, align 4, !tbaa !5
  br label %86, !llvm.loop !14

120:                                              ; preds = %90
  %121 = load i32, ptr @q, align 4, !tbaa !5
  %122 = sext i32 %121 to i64
  %123 = getelementptr inbounds i32, ptr @y, i64 %122
  call void @_ZSt4sortIPiEvT_S1_(ptr noundef @y, ptr noundef %123)
  %124 = load i32, ptr @q, align 4, !tbaa !5
  %125 = sext i32 %124 to i64
  %126 = getelementptr inbounds i32, ptr @y, i64 %125
  %127 = call noundef ptr @_ZSt6uniqueIPiET_S1_S1_(ptr noundef @y, ptr noundef %126)
  %128 = ptrtoint ptr %127 to i64
  %129 = sub i64 %128, ptrtoint (ptr @y to i64)
  %130 = sdiv exact i64 %129, 4
  %131 = trunc i64 %130 to i32
  store i32 %131, ptr @q, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  store i32 -1073741823, ptr %6, align 4, !tbaa !5
  %132 = call i64 @_ZSt9make_pairIRKiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS3_INS4_IT0_E4typeEE6__typeEEOS5_OSA_(ptr noundef nonnull align 4 dereferenceable(4) @_ZL3inf, ptr noundef nonnull align 4 dereferenceable(4) %6)
  store i64 %132, ptr %5, align 4
  %133 = load i32, ptr @n, align 4, !tbaa !5
  %134 = add nsw i32 %133, 1
  store i32 %134, ptr @n, align 4, !tbaa !5
  %135 = sext i32 %133 to i64
  %136 = getelementptr inbounds [100009 x %"struct.std::pair"], ptr @r, i64 0, i64 %135
  %137 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %136, ptr noundef nonnull align 4 dereferenceable(8) %5) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  store i32 1073741823, ptr %8, align 4, !tbaa !5
  %138 = call i64 @_ZSt9make_pairIRKiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS3_INS4_IT0_E4typeEE6__typeEEOS5_OSA_(ptr noundef nonnull align 4 dereferenceable(4) @_ZL3inf, ptr noundef nonnull align 4 dereferenceable(4) %8)
  store i64 %138, ptr %7, align 4
  %139 = load i32, ptr @m, align 4, !tbaa !5
  %140 = add nsw i32 %139, 1
  store i32 %140, ptr @m, align 4, !tbaa !5
  %141 = sext i32 %139 to i64
  %142 = getelementptr inbounds [100009 x %"struct.std::pair"], ptr @s, i64 0, i64 %141
  %143 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %142, ptr noundef nonnull align 4 dereferenceable(8) %7) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  store x86_fp80 0xK4026E8D4A51000000000, ptr @ans, align 16, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  store i32 0, ptr %9, align 4, !tbaa !5
  br label %144

144:                                              ; preds = %361, %120
  %145 = load i32, ptr %9, align 4, !tbaa !5
  %146 = load i32, ptr @q, align 4, !tbaa !5
  %147 = icmp slt i32 %145, %146
  br i1 %147, label %149, label %148

148:                                              ; preds = %144
  store i32 11, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  br label %364

149:                                              ; preds = %144
  store i32 0, ptr @p, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  call void @_ZNSt4pairIiiEC2IiiTnNSt9enable_ifIXsr6__and_ISt37__is_implicitly_default_constructibleIT_ES3_IT0_EEE5valueEbE4typeELb1EEEv(ptr noundef nonnull align 4 dereferenceable(8) %11)
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  call void @_ZNSt4pairIiiEC2IiiTnNSt9enable_ifIXsr6__and_ISt37__is_implicitly_default_constructibleIT_ES3_IT0_EEE5valueEbE4typeELb1EEEv(ptr noundef nonnull align 4 dereferenceable(8) %12)
  %150 = load i32, ptr @n, align 4, !tbaa !5
  %151 = sext i32 %150 to i64
  %152 = getelementptr inbounds %"struct.std::pair", ptr @r, i64 %151
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  %153 = load i32, ptr %9, align 4, !tbaa !5
  %154 = sext i32 %153 to i64
  %155 = getelementptr inbounds [300009 x i32], ptr @y, i64 0, i64 %154
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  store i32 0, ptr %14, align 4, !tbaa !5
  %156 = call i64 @_ZSt9make_pairIRiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %155, ptr noundef nonnull align 4 dereferenceable(4) %14)
  store i64 %156, ptr %13, align 4
  %157 = call noundef ptr @_ZSt11upper_boundIPSt4pairIiiES1_PFbS1_S1_EET_S5_S5_RKT0_T1_(ptr noundef @r, ptr noundef %152, ptr noundef nonnull align 4 dereferenceable(8) %13, ptr noundef @_Z3cmpSt4pairIiiES0_)
  %158 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSERKS0_(ptr noundef nonnull align 4 dereferenceable(8) %12, ptr noundef nonnull align 4 dereferenceable(8) %157)
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  %159 = load i32, ptr @n, align 4, !tbaa !5
  %160 = sext i32 %159 to i64
  %161 = getelementptr inbounds %"struct.std::pair", ptr @r, i64 %160
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  %162 = load i32, ptr %9, align 4, !tbaa !5
  %163 = sext i32 %162 to i64
  %164 = getelementptr inbounds [300009 x i32], ptr @y, i64 0, i64 %163
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #7
  store i32 0, ptr %16, align 4, !tbaa !5
  %165 = call i64 @_ZSt9make_pairIRiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %164, ptr noundef nonnull align 4 dereferenceable(4) %16)
  store i64 %165, ptr %15, align 4
  %166 = call noundef ptr @_ZSt11upper_boundIPSt4pairIiiES1_PFbS1_S1_EET_S5_S5_RKT0_T1_(ptr noundef @r, ptr noundef %161, ptr noundef nonnull align 4 dereferenceable(8) %15, ptr noundef @_Z3cmpSt4pairIiiES0_)
  %167 = getelementptr inbounds %"struct.std::pair", ptr %166, i64 -1
  %168 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSERKS0_(ptr noundef nonnull align 4 dereferenceable(8) %11, ptr noundef nonnull align 4 dereferenceable(8) %167)
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  %169 = getelementptr inbounds %"struct.std::pair", ptr %11, i32 0, i32 0
  %170 = load i32, ptr %169, align 4, !tbaa !9
  %171 = load i32, ptr %9, align 4, !tbaa !5
  %172 = sext i32 %171 to i64
  %173 = getelementptr inbounds [300009 x i32], ptr @y, i64 0, i64 %172
  %174 = load i32, ptr %173, align 4, !tbaa !5
  %175 = icmp eq i32 %170, %174
  br i1 %175, label %176, label %184

176:                                              ; preds = %149
  %177 = getelementptr inbounds %"struct.std::pair", ptr %11, i32 0, i32 1
  %178 = load i32, ptr %177, align 4, !tbaa !17
  %179 = sitofp i32 %178 to x86_fp80
  %180 = load i32, ptr @p, align 4, !tbaa !5
  %181 = add nsw i32 %180, 1
  store i32 %181, ptr @p, align 4, !tbaa !5
  %182 = sext i32 %180 to i64
  %183 = getelementptr inbounds [300009 x x86_fp80], ptr @x, i64 0, i64 %182
  store x86_fp80 %179, ptr %183, align 16, !tbaa !15
  br label %216

184:                                              ; preds = %149
  %185 = getelementptr inbounds %"struct.std::pair", ptr %12, i32 0, i32 1
  %186 = load i32, ptr %185, align 4, !tbaa !17
  %187 = getelementptr inbounds %"struct.std::pair", ptr %11, i32 0, i32 1
  %188 = load i32, ptr %187, align 4, !tbaa !17
  %189 = sub nsw i32 %186, %188
  %190 = sext i32 %189 to i64
  %191 = load i32, ptr %9, align 4, !tbaa !5
  %192 = sext i32 %191 to i64
  %193 = getelementptr inbounds [300009 x i32], ptr @y, i64 0, i64 %192
  %194 = load i32, ptr %193, align 4, !tbaa !5
  %195 = getelementptr inbounds %"struct.std::pair", ptr %11, i32 0, i32 0
  %196 = load i32, ptr %195, align 4, !tbaa !9
  %197 = sub nsw i32 %194, %196
  %198 = sext i32 %197 to i64
  %199 = mul nsw i64 %190, %198
  %200 = sitofp i64 %199 to x86_fp80
  %201 = getelementptr inbounds %"struct.std::pair", ptr %12, i32 0, i32 0
  %202 = load i32, ptr %201, align 4, !tbaa !9
  %203 = getelementptr inbounds %"struct.std::pair", ptr %11, i32 0, i32 0
  %204 = load i32, ptr %203, align 4, !tbaa !9
  %205 = sub nsw i32 %202, %204
  %206 = sitofp i32 %205 to x86_fp80
  %207 = fdiv x86_fp80 %200, %206
  %208 = getelementptr inbounds %"struct.std::pair", ptr %11, i32 0, i32 1
  %209 = load i32, ptr %208, align 4, !tbaa !17
  %210 = sitofp i32 %209 to x86_fp80
  %211 = fadd x86_fp80 %207, %210
  %212 = load i32, ptr @p, align 4, !tbaa !5
  %213 = add nsw i32 %212, 1
  store i32 %213, ptr @p, align 4, !tbaa !5
  %214 = sext i32 %212 to i64
  %215 = getelementptr inbounds [300009 x x86_fp80], ptr @x, i64 0, i64 %214
  store x86_fp80 %211, ptr %215, align 16, !tbaa !15
  br label %216

216:                                              ; preds = %184, %176
  %217 = load i32, ptr @m, align 4, !tbaa !5
  %218 = sext i32 %217 to i64
  %219 = getelementptr inbounds %"struct.std::pair", ptr @s, i64 %218
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #7
  %220 = load i32, ptr %9, align 4, !tbaa !5
  %221 = sext i32 %220 to i64
  %222 = getelementptr inbounds [300009 x i32], ptr @y, i64 0, i64 %221
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #7
  store i32 0, ptr %18, align 4, !tbaa !5
  %223 = call i64 @_ZSt9make_pairIRiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %222, ptr noundef nonnull align 4 dereferenceable(4) %18)
  store i64 %223, ptr %17, align 4
  %224 = call noundef ptr @_ZSt11upper_boundIPSt4pairIiiES1_PFbS1_S1_EET_S5_S5_RKT0_T1_(ptr noundef @s, ptr noundef %219, ptr noundef nonnull align 4 dereferenceable(8) %17, ptr noundef @_Z3cmpSt4pairIiiES0_)
  %225 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSERKS0_(ptr noundef nonnull align 4 dereferenceable(8) %12, ptr noundef nonnull align 4 dereferenceable(8) %224)
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  %226 = load i32, ptr @m, align 4, !tbaa !5
  %227 = sext i32 %226 to i64
  %228 = getelementptr inbounds %"struct.std::pair", ptr @s, i64 %227
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #7
  %229 = load i32, ptr %9, align 4, !tbaa !5
  %230 = sext i32 %229 to i64
  %231 = getelementptr inbounds [300009 x i32], ptr @y, i64 0, i64 %230
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #7
  store i32 0, ptr %20, align 4, !tbaa !5
  %232 = call i64 @_ZSt9make_pairIRiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %231, ptr noundef nonnull align 4 dereferenceable(4) %20)
  store i64 %232, ptr %19, align 4
  %233 = call noundef ptr @_ZSt11upper_boundIPSt4pairIiiES1_PFbS1_S1_EET_S5_S5_RKT0_T1_(ptr noundef @s, ptr noundef %228, ptr noundef nonnull align 4 dereferenceable(8) %19, ptr noundef @_Z3cmpSt4pairIiiES0_)
  %234 = getelementptr inbounds %"struct.std::pair", ptr %233, i64 -1
  %235 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSERKS0_(ptr noundef nonnull align 4 dereferenceable(8) %11, ptr noundef nonnull align 4 dereferenceable(8) %234)
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  %236 = getelementptr inbounds %"struct.std::pair", ptr %11, i32 0, i32 0
  %237 = load i32, ptr %236, align 4, !tbaa !9
  %238 = load i32, ptr %9, align 4, !tbaa !5
  %239 = sext i32 %238 to i64
  %240 = getelementptr inbounds [300009 x i32], ptr @y, i64 0, i64 %239
  %241 = load i32, ptr %240, align 4, !tbaa !5
  %242 = icmp eq i32 %237, %241
  br i1 %242, label %243, label %251

243:                                              ; preds = %216
  %244 = getelementptr inbounds %"struct.std::pair", ptr %11, i32 0, i32 1
  %245 = load i32, ptr %244, align 4, !tbaa !17
  %246 = sitofp i32 %245 to x86_fp80
  %247 = load i32, ptr @p, align 4, !tbaa !5
  %248 = add nsw i32 %247, 1
  store i32 %248, ptr @p, align 4, !tbaa !5
  %249 = sext i32 %247 to i64
  %250 = getelementptr inbounds [300009 x x86_fp80], ptr @x, i64 0, i64 %249
  store x86_fp80 %246, ptr %250, align 16, !tbaa !15
  br label %283

251:                                              ; preds = %216
  %252 = getelementptr inbounds %"struct.std::pair", ptr %12, i32 0, i32 1
  %253 = load i32, ptr %252, align 4, !tbaa !17
  %254 = getelementptr inbounds %"struct.std::pair", ptr %11, i32 0, i32 1
  %255 = load i32, ptr %254, align 4, !tbaa !17
  %256 = sub nsw i32 %253, %255
  %257 = sext i32 %256 to i64
  %258 = load i32, ptr %9, align 4, !tbaa !5
  %259 = sext i32 %258 to i64
  %260 = getelementptr inbounds [300009 x i32], ptr @y, i64 0, i64 %259
  %261 = load i32, ptr %260, align 4, !tbaa !5
  %262 = getelementptr inbounds %"struct.std::pair", ptr %11, i32 0, i32 0
  %263 = load i32, ptr %262, align 4, !tbaa !9
  %264 = sub nsw i32 %261, %263
  %265 = sext i32 %264 to i64
  %266 = mul nsw i64 %257, %265
  %267 = sitofp i64 %266 to x86_fp80
  %268 = getelementptr inbounds %"struct.std::pair", ptr %12, i32 0, i32 0
  %269 = load i32, ptr %268, align 4, !tbaa !9
  %270 = getelementptr inbounds %"struct.std::pair", ptr %11, i32 0, i32 0
  %271 = load i32, ptr %270, align 4, !tbaa !9
  %272 = sub nsw i32 %269, %271
  %273 = sitofp i32 %272 to x86_fp80
  %274 = fdiv x86_fp80 %267, %273
  %275 = getelementptr inbounds %"struct.std::pair", ptr %11, i32 0, i32 1
  %276 = load i32, ptr %275, align 4, !tbaa !17
  %277 = sitofp i32 %276 to x86_fp80
  %278 = fadd x86_fp80 %274, %277
  %279 = load i32, ptr @p, align 4, !tbaa !5
  %280 = add nsw i32 %279, 1
  store i32 %280, ptr @p, align 4, !tbaa !5
  %281 = sext i32 %279 to i64
  %282 = getelementptr inbounds [300009 x x86_fp80], ptr @x, i64 0, i64 %281
  store x86_fp80 %278, ptr %282, align 16, !tbaa !15
  br label %283

283:                                              ; preds = %251, %243
  call void @llvm.lifetime.start.p0(i64 16, ptr %21) #7
  %284 = load i32, ptr @l, align 4, !tbaa !5
  %285 = sext i32 %284 to i64
  %286 = getelementptr inbounds %"struct.std::pair", ptr @t, i64 %285
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #7
  %287 = load i32, ptr %9, align 4, !tbaa !5
  %288 = sext i32 %287 to i64
  %289 = getelementptr inbounds [300009 x i32], ptr @y, i64 0, i64 %288
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #7
  store i32 0, ptr %23, align 4, !tbaa !5
  %290 = call i64 @_ZSt9make_pairIRiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %289, ptr noundef nonnull align 4 dereferenceable(4) %23)
  store i64 %290, ptr %22, align 4
  %291 = call { ptr, ptr } @_ZSt11equal_rangeIPSt4pairIiiES1_PFbS1_S1_EES0_IT_S5_ES5_S5_RKT0_T1_(ptr noundef @t, ptr noundef %286, ptr noundef nonnull align 4 dereferenceable(8) %22, ptr noundef @_Z3cmpSt4pairIiiES0_)
  %292 = getelementptr inbounds { ptr, ptr }, ptr %21, i32 0, i32 0
  %293 = extractvalue { ptr, ptr } %291, 0
  store ptr %293, ptr %292, align 8
  %294 = getelementptr inbounds { ptr, ptr }, ptr %21, i32 0, i32 1
  %295 = extractvalue { ptr, ptr } %291, 1
  store ptr %295, ptr %294, align 8
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #7
  %296 = getelementptr inbounds %"struct.std::pair.0", ptr %21, i32 0, i32 0
  %297 = load ptr, ptr %296, align 8, !tbaa !18
  store ptr %297, ptr %24, align 8, !tbaa !21
  br label %298

298:                                              ; preds = %330, %283
  %299 = load ptr, ptr %24, align 8, !tbaa !21
  %300 = getelementptr inbounds %"struct.std::pair.0", ptr %21, i32 0, i32 1
  %301 = load ptr, ptr %300, align 8, !tbaa !22
  %302 = icmp ult ptr %299, %301
  br i1 %302, label %304, label %303

303:                                              ; preds = %298
  store i32 14, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #7
  br label %333

304:                                              ; preds = %298
  %305 = load x86_fp80, ptr @x, align 16, !tbaa !15
  %306 = fsub x86_fp80 %305, 0xK3FE7D6BF94D5E57A4000
  %307 = load ptr, ptr %24, align 8, !tbaa !21
  %308 = getelementptr inbounds %"struct.std::pair", ptr %307, i32 0, i32 1
  %309 = load i32, ptr %308, align 4, !tbaa !17
  %310 = sitofp i32 %309 to x86_fp80
  %311 = fcmp olt x86_fp80 %306, %310
  br i1 %311, label %312, label %329

312:                                              ; preds = %304
  %313 = load ptr, ptr %24, align 8, !tbaa !21
  %314 = getelementptr inbounds %"struct.std::pair", ptr %313, i32 0, i32 1
  %315 = load i32, ptr %314, align 4, !tbaa !17
  %316 = sitofp i32 %315 to x86_fp80
  %317 = load x86_fp80, ptr getelementptr inbounds ([300009 x x86_fp80], ptr @x, i64 0, i64 1), align 16, !tbaa !15
  %318 = fadd x86_fp80 %317, 0xK3FE7D6BF94D5E57A4000
  %319 = fcmp olt x86_fp80 %316, %318
  br i1 %319, label %320, label %329

320:                                              ; preds = %312
  %321 = load ptr, ptr %24, align 8, !tbaa !21
  %322 = getelementptr inbounds %"struct.std::pair", ptr %321, i32 0, i32 1
  %323 = load i32, ptr %322, align 4, !tbaa !17
  %324 = sitofp i32 %323 to x86_fp80
  %325 = load i32, ptr @p, align 4, !tbaa !5
  %326 = add nsw i32 %325, 1
  store i32 %326, ptr @p, align 4, !tbaa !5
  %327 = sext i32 %325 to i64
  %328 = getelementptr inbounds [300009 x x86_fp80], ptr @x, i64 0, i64 %327
  store x86_fp80 %324, ptr %328, align 16, !tbaa !15
  br label %329

329:                                              ; preds = %320, %312, %304
  br label %330

330:                                              ; preds = %329
  %331 = load ptr, ptr %24, align 8, !tbaa !21
  %332 = getelementptr inbounds %"struct.std::pair", ptr %331, i32 1
  store ptr %332, ptr %24, align 8, !tbaa !21
  br label %298, !llvm.loop !23

333:                                              ; preds = %303
  %334 = load i32, ptr @p, align 4, !tbaa !5
  %335 = sext i32 %334 to i64
  %336 = getelementptr inbounds x86_fp80, ptr @x, i64 %335
  call void @_ZSt4sortIPeEvT_S1_(ptr noundef @x, ptr noundef %336)
  store x86_fp80 0xK00000000000000000000, ptr @tmp, align 16, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #7
  store i32 1, ptr %25, align 4, !tbaa !5
  br label %337

337:                                              ; preds = %355, %333
  %338 = load i32, ptr %25, align 4, !tbaa !5
  %339 = load i32, ptr @p, align 4, !tbaa !5
  %340 = icmp slt i32 %338, %339
  br i1 %340, label %342, label %341

341:                                              ; preds = %337
  store i32 17, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #7
  br label %358

342:                                              ; preds = %337
  call void @llvm.lifetime.start.p0(i64 16, ptr %26) #7
  %343 = load i32, ptr %25, align 4, !tbaa !5
  %344 = sext i32 %343 to i64
  %345 = getelementptr inbounds [300009 x x86_fp80], ptr @x, i64 0, i64 %344
  %346 = load x86_fp80, ptr %345, align 16, !tbaa !15
  %347 = load i32, ptr %25, align 4, !tbaa !5
  %348 = sub nsw i32 %347, 1
  %349 = sext i32 %348 to i64
  %350 = getelementptr inbounds [300009 x x86_fp80], ptr @x, i64 0, i64 %349
  %351 = load x86_fp80, ptr %350, align 16, !tbaa !15
  %352 = fsub x86_fp80 %346, %351
  store x86_fp80 %352, ptr %26, align 16, !tbaa !15
  %353 = call noundef nonnull align 16 dereferenceable(16) ptr @_ZSt3maxIeERKT_S2_S2_(ptr noundef nonnull align 16 dereferenceable(16) @tmp, ptr noundef nonnull align 16 dereferenceable(16) %26)
  %354 = load x86_fp80, ptr %353, align 16, !tbaa !15
  store x86_fp80 %354, ptr @tmp, align 16, !tbaa !15
  call void @llvm.lifetime.end.p0(i64 16, ptr %26) #7
  br label %355

355:                                              ; preds = %342
  %356 = load i32, ptr %25, align 4, !tbaa !5
  %357 = add nsw i32 %356, 1
  store i32 %357, ptr %25, align 4, !tbaa !5
  br label %337, !llvm.loop !24

358:                                              ; preds = %341
  %359 = call noundef nonnull align 16 dereferenceable(16) ptr @_ZSt3minIeERKT_S2_S2_(ptr noundef nonnull align 16 dereferenceable(16) @ans, ptr noundef nonnull align 16 dereferenceable(16) @tmp)
  %360 = load x86_fp80, ptr %359, align 16, !tbaa !15
  store x86_fp80 %360, ptr @ans, align 16, !tbaa !15
  call void @llvm.lifetime.end.p0(i64 16, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  br label %361

361:                                              ; preds = %358
  %362 = load i32, ptr %9, align 4, !tbaa !5
  %363 = add nsw i32 %362, 1
  store i32 %363, ptr %9, align 4, !tbaa !5
  br label %144, !llvm.loop !25

364:                                              ; preds = %148
  %365 = load x86_fp80, ptr @ans, align 16, !tbaa !15
  %366 = fptrunc x86_fp80 %365 to double
  %367 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, double noundef %366)
  ret i32 0
}

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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #3

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

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

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

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

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

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

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

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

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

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

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

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

declare i32 @printf(ptr noundef, ...) #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 = { mustprogress norecurse 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 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 = { 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 = { 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 #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, !6, i64 0}
!10 = !{!"_ZTSSt4pairIiiE", !6, i64 0, !6, i64 4}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = !{!16, !16, i64 0}
!16 = !{!"long double", !7, i64 0}
!17 = !{!10, !6, i64 4}
!18 = !{!19, !20, i64 0}
!19 = !{!"_ZTSSt4pairIPS_IiiES1_E", !20, i64 0, !20, i64 8}
!20 = !{!"any pointer", !7, i64 0}
!21 = !{!20, !20, i64 0}
!22 = !{!19, !20, i64 8}
!23 = distinct !{!23, !12}
!24 = distinct !{!24, !12}
!25 = distinct !{!25, !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 { i32, i32 }

@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@l = external dso_local local_unnamed_addr global i32, align 4
@ll = external dso_local global i32, align 4
@q = external dso_local local_unnamed_addr global i32, align 4
@p = external dso_local local_unnamed_addr global i32, align 4
@r = external dso_local global [100009 x %"struct.std::pair"], align 16
@s = external dso_local global [100009 x %"struct.std::pair"], align 16
@tt = external dso_local global %"struct.std::pair", align 4
@t = external dso_local global [100009 x %"struct.std::pair"], align 16
@y = external dso_local global [300009 x i32], align 16
@ans = external dso_local global x86_fp80, align 16
@tmp = external dso_local global x86_fp80, align 16
@x = external dso_local global [300009 x x86_fp80], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [5 x i8], align 1
@_ZL3inf = external hidden constant i32, align 4
@.str.2 = external hidden unnamed_addr constant [6 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_Z3cmpSt4pairIiiES0_(i64, i64) #0

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #1 {
  %1 = alloca %"struct.std::pair", align 8
  %2 = alloca i32, align 4
  %3 = alloca %"struct.std::pair", align 8
  %4 = alloca i32, align 4
  %5 = alloca %"struct.std::pair", align 4
  %6 = alloca %"struct.std::pair", align 4
  %7 = alloca %"struct.std::pair", align 8
  %8 = alloca i32, align 4
  %9 = alloca %"struct.std::pair", align 8
  %10 = alloca i32, align 4
  %11 = alloca %"struct.std::pair", align 8
  %12 = alloca i32, align 4
  %13 = alloca %"struct.std::pair", align 8
  %14 = alloca i32, align 4
  %15 = alloca %"struct.std::pair", align 8
  %16 = alloca i32, align 4
  %17 = alloca x86_fp80, align 16
  %18 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n)
  %19 = load i32, ptr @n, align 4, !tbaa !5
  %20 = icmp sgt i32 %19, 0
  br i1 %20, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %0
  %21 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @m)
  %22 = load i32, ptr @m, align 4, !tbaa !5
  %23 = icmp sgt i32 %22, 0
  br i1 %23, label %.lr.ph46, label %._crit_edge47

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %0 ]
  %24 = getelementptr inbounds [100009 x %"struct.std::pair"], ptr @r, i64 0, i64 %indvars.iv
  %25 = getelementptr inbounds i8, ptr %24, i64 4
  %26 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %25, ptr noundef nonnull %24)
  %27 = load i32, ptr %24, align 8, !tbaa !9
  %28 = load i32, ptr @q, align 4, !tbaa !5
  %29 = add nsw i32 %28, 1
  store i32 %29, ptr @q, align 4, !tbaa !5
  %30 = sext i32 %28 to i64
  %31 = getelementptr inbounds [300009 x i32], ptr @y, i64 0, i64 %30
  store i32 %27, ptr %31, align 4, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %32 = load i32, ptr @n, align 4, !tbaa !5
  %33 = sext i32 %32 to i64
  %34 = icmp slt i64 %indvars.iv.next, %33
  br i1 %34, label %.lr.ph, label %._crit_edge, !llvm.loop !11

._crit_edge47:                                    ; preds = %.lr.ph46, %._crit_edge
  %35 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @ll)
  %36 = load i32, ptr @ll, align 4, !tbaa !5
  %37 = icmp sgt i32 %36, 0
  br i1 %37, label %.lr.ph50, label %._crit_edge51

.lr.ph46:                                         ; preds = %._crit_edge, %.lr.ph46
  %indvars.iv65 = phi i64 [ %indvars.iv.next66, %.lr.ph46 ], [ 0, %._crit_edge ]
  %38 = getelementptr inbounds [100009 x %"struct.std::pair"], ptr @s, i64 0, i64 %indvars.iv65
  %39 = getelementptr inbounds i8, ptr %38, i64 4
  %40 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %39, ptr noundef nonnull %38)
  %41 = load i32, ptr %38, align 8, !tbaa !9
  %42 = load i32, ptr @q, align 4, !tbaa !5
  %43 = add nsw i32 %42, 1
  store i32 %43, ptr @q, align 4, !tbaa !5
  %44 = sext i32 %42 to i64
  %45 = getelementptr inbounds [300009 x i32], ptr @y, i64 0, i64 %44
  store i32 %41, ptr %45, align 4, !tbaa !5
  %indvars.iv.next66 = add nuw nsw i64 %indvars.iv65, 1
  %46 = load i32, ptr @m, align 4, !tbaa !5
  %47 = sext i32 %46 to i64
  %48 = icmp slt i64 %indvars.iv.next66, %47
  br i1 %48, label %.lr.ph46, label %._crit_edge47, !llvm.loop !13

._crit_edge51:                                    ; preds = %96, %._crit_edge47
  %49 = load i32, ptr @q, align 4, !tbaa !5
  %50 = sext i32 %49 to i64
  %51 = getelementptr inbounds i32, ptr @y, i64 %50
  tail call void @_ZSt4sortIPiEvT_S1_(ptr noundef nonnull @y, ptr noundef nonnull %51)
  %52 = load i32, ptr @q, align 4, !tbaa !5
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds i32, ptr @y, i64 %53
  %55 = tail call noundef ptr @_ZSt6uniqueIPiET_S1_S1_(ptr noundef nonnull @y, ptr noundef nonnull %54)
  %56 = ptrtoint ptr %55 to i64
  %57 = sub i64 %56, ptrtoint (ptr @y to i64)
  %58 = lshr exact i64 %57, 2
  %59 = trunc i64 %58 to i32
  store i32 %59, ptr @q, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #7
  store i32 -1073741823, ptr %2, align 4, !tbaa !5
  %60 = call i64 @_ZSt9make_pairIRKiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS3_INS4_IT0_E4typeEE6__typeEEOS5_OSA_(ptr noundef nonnull align 4 dereferenceable(4) @_ZL3inf, ptr noundef nonnull align 4 dereferenceable(4) %2)
  store i64 %60, ptr %1, align 8
  %61 = load i32, ptr @n, align 4, !tbaa !5
  %62 = add nsw i32 %61, 1
  store i32 %62, ptr @n, align 4, !tbaa !5
  %63 = sext i32 %61 to i64
  %64 = getelementptr inbounds [100009 x %"struct.std::pair"], ptr @r, i64 0, i64 %63
  %65 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %64, ptr noundef nonnull align 4 dereferenceable(8) %1) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #7
  store i32 1073741823, ptr %4, align 4, !tbaa !5
  %66 = call i64 @_ZSt9make_pairIRKiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS3_INS4_IT0_E4typeEE6__typeEEOS5_OSA_(ptr noundef nonnull align 4 dereferenceable(4) @_ZL3inf, ptr noundef nonnull align 4 dereferenceable(4) %4)
  store i64 %66, ptr %3, align 8
  %67 = load i32, ptr @m, align 4, !tbaa !5
  %68 = add nsw i32 %67, 1
  store i32 %68, ptr @m, align 4, !tbaa !5
  %69 = sext i32 %67 to i64
  %70 = getelementptr inbounds [100009 x %"struct.std::pair"], ptr @s, i64 0, i64 %69
  %71 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %70, ptr noundef nonnull align 4 dereferenceable(8) %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #7
  store x86_fp80 0xK4026E8D4A51000000000, ptr @ans, align 16, !tbaa !14
  %72 = load i32, ptr @q, align 4, !tbaa !5
  %73 = icmp sgt i32 %72, 0
  br i1 %73, label %.lr.ph62, label %._crit_edge63

.lr.ph62:                                         ; preds = %._crit_edge51
  %74 = getelementptr inbounds i8, ptr %6, i64 4
  %75 = getelementptr inbounds i8, ptr %5, i64 4
  br label %103

.lr.ph50:                                         ; preds = %._crit_edge47, %96
  %.03548 = phi i32 [ %97, %96 ], [ 0, %._crit_edge47 ]
  %76 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull getelementptr inbounds (i8, ptr @tt, i64 4), ptr noundef nonnull @tt)
  %77 = load i32, ptr @r, align 16, !tbaa !9
  %78 = load i32, ptr @tt, align 4, !tbaa !9
  %.not = icmp sgt i32 %77, %78
  br i1 %.not, label %96, label %79

79:                                               ; preds = %.lr.ph50
  %80 = load i32, ptr @n, align 4, !tbaa !5
  %81 = add nsw i32 %80, -1
  %82 = sext i32 %81 to i64
  %83 = getelementptr inbounds [100009 x %"struct.std::pair"], ptr @r, i64 0, i64 %82
  %84 = load i32, ptr %83, align 8, !tbaa !9
  %.not42 = icmp sgt i32 %78, %84
  br i1 %.not42, label %96, label %85

85:                                               ; preds = %79
  %86 = load i32, ptr @l, align 4, !tbaa !5
  %87 = add nsw i32 %86, 1
  store i32 %87, ptr @l, align 4, !tbaa !5
  %88 = sext i32 %86 to i64
  %89 = getelementptr inbounds [100009 x %"struct.std::pair"], ptr @t, i64 0, i64 %88
  %90 = tail call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSERKS0_(ptr noundef nonnull align 4 dereferenceable(8) %89, ptr noundef nonnull align 4 dereferenceable(8) @tt)
  %91 = load i32, ptr @tt, align 4, !tbaa !9
  %92 = load i32, ptr @q, align 4, !tbaa !5
  %93 = add nsw i32 %92, 1
  store i32 %93, ptr @q, align 4, !tbaa !5
  %94 = sext i32 %92 to i64
  %95 = getelementptr inbounds [300009 x i32], ptr @y, i64 0, i64 %94
  store i32 %91, ptr %95, align 4, !tbaa !5
  br label %96

96:                                               ; preds = %.lr.ph50, %79, %85
  %97 = add nuw nsw i32 %.03548, 1
  %98 = load i32, ptr @ll, align 4, !tbaa !5
  %99 = icmp slt i32 %97, %98
  br i1 %99, label %.lr.ph50, label %._crit_edge51, !llvm.loop !16

._crit_edge63.loopexit:                           ; preds = %._crit_edge59
  %100 = fptrunc x86_fp80 %215 to double
  br label %._crit_edge63

._crit_edge63:                                    ; preds = %._crit_edge63.loopexit, %._crit_edge51
  %101 = phi double [ %100, %._crit_edge63.loopexit ], [ 1.000000e+12, %._crit_edge51 ]
  %102 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, double noundef %101)
  ret i32 0

103:                                              ; preds = %.lr.ph62, %._crit_edge59
  %indvars.iv71 = phi i64 [ 0, %.lr.ph62 ], [ %indvars.iv.next72, %._crit_edge59 ]
  store i32 0, ptr @p, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #7
  call void @_ZNSt4pairIiiEC2IiiTnNSt9enable_ifIXsr6__and_ISt37__is_implicitly_default_constructibleIT_ES3_IT0_EEE5valueEbE4typeELb1EEEv(ptr noundef nonnull align 4 dereferenceable(8) %5)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #7
  call void @_ZNSt4pairIiiEC2IiiTnNSt9enable_ifIXsr6__and_ISt37__is_implicitly_default_constructibleIT_ES3_IT0_EEE5valueEbE4typeELb1EEEv(ptr noundef nonnull align 4 dereferenceable(8) %6)
  %104 = load i32, ptr @n, align 4, !tbaa !5
  %105 = sext i32 %104 to i64
  %106 = getelementptr inbounds %"struct.std::pair", ptr @r, i64 %105
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #7
  %107 = getelementptr inbounds [300009 x i32], ptr @y, i64 0, i64 %indvars.iv71
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #7
  store i32 0, ptr %8, align 4, !tbaa !5
  %108 = call i64 @_ZSt9make_pairIRiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %107, ptr noundef nonnull align 4 dereferenceable(4) %8)
  store i64 %108, ptr %7, align 8
  %109 = call noundef ptr @_ZSt11upper_boundIPSt4pairIiiES1_PFbS1_S1_EET_S5_S5_RKT0_T1_(ptr noundef nonnull @r, ptr noundef nonnull %106, ptr noundef nonnull align 4 dereferenceable(8) %7, ptr noundef nonnull @_Z3cmpSt4pairIiiES0_)
  %110 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSERKS0_(ptr noundef nonnull align 4 dereferenceable(8) %6, ptr noundef nonnull align 4 dereferenceable(8) %109)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  %111 = load i32, ptr @n, align 4, !tbaa !5
  %112 = sext i32 %111 to i64
  %113 = getelementptr inbounds %"struct.std::pair", ptr @r, i64 %112
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #7
  store i32 0, ptr %10, align 4, !tbaa !5
  %114 = call i64 @_ZSt9make_pairIRiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %107, ptr noundef nonnull align 4 dereferenceable(4) %10)
  store i64 %114, ptr %9, align 8
  %115 = call noundef ptr @_ZSt11upper_boundIPSt4pairIiiES1_PFbS1_S1_EET_S5_S5_RKT0_T1_(ptr noundef nonnull @r, ptr noundef nonnull %113, ptr noundef nonnull align 4 dereferenceable(8) %9, ptr noundef nonnull @_Z3cmpSt4pairIiiES0_)
  %116 = getelementptr inbounds i8, ptr %115, i64 -8
  %117 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSERKS0_(ptr noundef nonnull align 4 dereferenceable(8) %5, ptr noundef nonnull align 4 dereferenceable(8) %116)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #7
  %118 = load i32, ptr %5, align 4, !tbaa !9
  %119 = load i32, ptr %107, align 4, !tbaa !5
  %120 = icmp eq i32 %118, %119
  br i1 %120, label %121, label %124

121:                                              ; preds = %103
  %122 = load i32, ptr %75, align 4, !tbaa !17
  %123 = sitofp i32 %122 to x86_fp80
  br label %139

124:                                              ; preds = %103
  %125 = load i32, ptr %74, align 4, !tbaa !17
  %126 = load i32, ptr %75, align 4, !tbaa !17
  %127 = sub nsw i32 %125, %126
  %128 = sext i32 %127 to i64
  %129 = sub nsw i32 %119, %118
  %130 = sext i32 %129 to i64
  %131 = mul nsw i64 %128, %130
  %132 = sitofp i64 %131 to x86_fp80
  %133 = load i32, ptr %6, align 4, !tbaa !9
  %134 = sub nsw i32 %133, %118
  %135 = sitofp i32 %134 to x86_fp80
  %136 = fdiv x86_fp80 %132, %135
  %137 = sitofp i32 %126 to x86_fp80
  %138 = fadd x86_fp80 %136, %137
  br label %139

139:                                              ; preds = %124, %121
  %.sink77 = phi x86_fp80 [ %138, %124 ], [ %123, %121 ]
  %140 = load i32, ptr @p, align 4, !tbaa !5
  %141 = sext i32 %140 to i64
  %142 = getelementptr inbounds [300009 x x86_fp80], ptr @x, i64 0, i64 %141
  store x86_fp80 %.sink77, ptr %142, align 16, !tbaa !14
  %.sink = add nsw i32 %140, 1
  store i32 %.sink, ptr @p, align 4
  %143 = load i32, ptr @m, align 4, !tbaa !5
  %144 = sext i32 %143 to i64
  %145 = getelementptr inbounds %"struct.std::pair", ptr @s, i64 %144
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #7
  store i32 0, ptr %12, align 4, !tbaa !5
  %146 = call i64 @_ZSt9make_pairIRiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %107, ptr noundef nonnull align 4 dereferenceable(4) %12)
  store i64 %146, ptr %11, align 8
  %147 = call noundef ptr @_ZSt11upper_boundIPSt4pairIiiES1_PFbS1_S1_EET_S5_S5_RKT0_T1_(ptr noundef nonnull @s, ptr noundef nonnull %145, ptr noundef nonnull align 4 dereferenceable(8) %11, ptr noundef nonnull @_Z3cmpSt4pairIiiES0_)
  %148 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSERKS0_(ptr noundef nonnull align 4 dereferenceable(8) %6, ptr noundef nonnull align 4 dereferenceable(8) %147)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #7
  %149 = load i32, ptr @m, align 4, !tbaa !5
  %150 = sext i32 %149 to i64
  %151 = getelementptr inbounds %"struct.std::pair", ptr @s, i64 %150
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %14) #7
  store i32 0, ptr %14, align 4, !tbaa !5
  %152 = call i64 @_ZSt9make_pairIRiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %107, ptr noundef nonnull align 4 dereferenceable(4) %14)
  store i64 %152, ptr %13, align 8
  %153 = call noundef ptr @_ZSt11upper_boundIPSt4pairIiiES1_PFbS1_S1_EET_S5_S5_RKT0_T1_(ptr noundef nonnull @s, ptr noundef nonnull %151, ptr noundef nonnull align 4 dereferenceable(8) %13, ptr noundef nonnull @_Z3cmpSt4pairIiiES0_)
  %154 = getelementptr inbounds i8, ptr %153, i64 -8
  %155 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSERKS0_(ptr noundef nonnull align 4 dereferenceable(8) %5, ptr noundef nonnull align 4 dereferenceable(8) %154)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #7
  %156 = load i32, ptr %5, align 4, !tbaa !9
  %157 = load i32, ptr %107, align 4, !tbaa !5
  %158 = icmp eq i32 %156, %157
  br i1 %158, label %159, label %162

159:                                              ; preds = %139
  %160 = load i32, ptr %75, align 4, !tbaa !17
  %161 = sitofp i32 %160 to x86_fp80
  br label %177

162:                                              ; preds = %139
  %163 = load i32, ptr %74, align 4, !tbaa !17
  %164 = load i32, ptr %75, align 4, !tbaa !17
  %165 = sub nsw i32 %163, %164
  %166 = sext i32 %165 to i64
  %167 = sub nsw i32 %157, %156
  %168 = sext i32 %167 to i64
  %169 = mul nsw i64 %166, %168
  %170 = sitofp i64 %169 to x86_fp80
  %171 = load i32, ptr %6, align 4, !tbaa !9
  %172 = sub nsw i32 %171, %156
  %173 = sitofp i32 %172 to x86_fp80
  %174 = fdiv x86_fp80 %170, %173
  %175 = sitofp i32 %164 to x86_fp80
  %176 = fadd x86_fp80 %174, %175
  br label %177

177:                                              ; preds = %162, %159
  %.sink81 = phi x86_fp80 [ %176, %162 ], [ %161, %159 ]
  %178 = load i32, ptr @p, align 4, !tbaa !5
  %179 = sext i32 %178 to i64
  %180 = getelementptr inbounds [300009 x x86_fp80], ptr @x, i64 0, i64 %179
  store x86_fp80 %.sink81, ptr %180, align 16, !tbaa !14
  %.sink74 = add nsw i32 %178, 1
  store i32 %.sink74, ptr @p, align 4
  %181 = load i32, ptr @l, align 4, !tbaa !5
  %182 = sext i32 %181 to i64
  %183 = getelementptr inbounds %"struct.std::pair", ptr @t, i64 %182
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %16) #7
  store i32 0, ptr %16, align 4, !tbaa !5
  %184 = call i64 @_ZSt9make_pairIRiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %107, ptr noundef nonnull align 4 dereferenceable(4) %16)
  store i64 %184, ptr %15, align 8
  %185 = call { ptr, ptr } @_ZSt11equal_rangeIPSt4pairIiiES1_PFbS1_S1_EES0_IT_S5_ES5_S5_RKT0_T1_(ptr noundef nonnull @t, ptr noundef nonnull %183, ptr noundef nonnull align 4 dereferenceable(8) %15, ptr noundef nonnull @_Z3cmpSt4pairIiiES0_)
  %186 = extractvalue { ptr, ptr } %185, 0
  %187 = extractvalue { ptr, ptr } %185, 1
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #7
  %p.promoted = load i32, ptr @p, align 4, !tbaa !5
  %188 = icmp ult ptr %186, %187
  br i1 %188, label %.lr.ph54.preheader, label %._crit_edge55

.lr.ph54.preheader:                               ; preds = %177
  %.pre75 = load x86_fp80, ptr @x, align 16, !tbaa !14
  br label %.lr.ph54

._crit_edge55:                                    ; preds = %209, %177
  %189 = phi i32 [ %p.promoted, %177 ], [ %211, %209 ]
  %190 = sext i32 %189 to i64
  %191 = getelementptr inbounds x86_fp80, ptr @x, i64 %190
  call void @_ZSt4sortIPeEvT_S1_(ptr noundef nonnull @x, ptr noundef nonnull %191)
  store x86_fp80 0xK00000000000000000000, ptr @tmp, align 16, !tbaa !14
  %192 = load i32, ptr @p, align 4, !tbaa !5
  %193 = icmp sgt i32 %192, 1
  br i1 %193, label %.lr.ph58, label %._crit_edge59

.lr.ph54:                                         ; preds = %.lr.ph54.preheader, %209
  %194 = phi x86_fp80 [ %210, %209 ], [ %.pre75, %.lr.ph54.preheader ]
  %.03152 = phi ptr [ %212, %209 ], [ %186, %.lr.ph54.preheader ]
  %195 = phi i32 [ %211, %209 ], [ %p.promoted, %.lr.ph54.preheader ]
  %196 = fadd x86_fp80 %194, 0xKBFE7D6BF94D5E57A4000
  %197 = getelementptr inbounds i8, ptr %.03152, i64 4
  %198 = load i32, ptr %197, align 4, !tbaa !17
  %199 = sitofp i32 %198 to x86_fp80
  %200 = fcmp olt x86_fp80 %196, %199
  br i1 %200, label %201, label %209

201:                                              ; preds = %.lr.ph54
  %202 = load x86_fp80, ptr getelementptr inbounds (i8, ptr @x, i64 16), align 16, !tbaa !14
  %203 = fadd x86_fp80 %202, 0xK3FE7D6BF94D5E57A4000
  %204 = fcmp ogt x86_fp80 %203, %199
  br i1 %204, label %205, label %209

205:                                              ; preds = %201
  %206 = add nsw i32 %195, 1
  store i32 %206, ptr @p, align 4, !tbaa !5
  %207 = sext i32 %195 to i64
  %208 = getelementptr inbounds [300009 x x86_fp80], ptr @x, i64 0, i64 %207
  store x86_fp80 %199, ptr %208, align 16, !tbaa !14
  %.pre = load x86_fp80, ptr @x, align 16, !tbaa !14
  br label %209

209:                                              ; preds = %.lr.ph54, %201, %205
  %210 = phi x86_fp80 [ %194, %.lr.ph54 ], [ %194, %201 ], [ %.pre, %205 ]
  %211 = phi i32 [ %195, %.lr.ph54 ], [ %195, %201 ], [ %206, %205 ]
  %212 = getelementptr inbounds i8, ptr %.03152, i64 8
  %213 = icmp ult ptr %212, %187
  br i1 %213, label %.lr.ph54, label %._crit_edge55, !llvm.loop !18

._crit_edge59:                                    ; preds = %.lr.ph58, %._crit_edge55
  %214 = call noundef nonnull align 16 dereferenceable(16) ptr @_ZSt3minIeERKT_S2_S2_(ptr noundef nonnull align 16 dereferenceable(16) @ans, ptr noundef nonnull align 16 dereferenceable(16) @tmp)
  %215 = load x86_fp80, ptr %214, align 16, !tbaa !14
  store x86_fp80 %215, ptr @ans, align 16, !tbaa !14
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  %indvars.iv.next72 = add nuw nsw i64 %indvars.iv71, 1
  %216 = load i32, ptr @q, align 4, !tbaa !5
  %217 = sext i32 %216 to i64
  %218 = icmp slt i64 %indvars.iv.next72, %217
  br i1 %218, label %103, label %._crit_edge63.loopexit, !llvm.loop !19

.lr.ph58:                                         ; preds = %._crit_edge55, %.lr.ph58
  %indvars.iv68 = phi i64 [ %indvars.iv.next69, %.lr.ph58 ], [ 1, %._crit_edge55 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %17) #7
  %219 = getelementptr inbounds [300009 x x86_fp80], ptr @x, i64 0, i64 %indvars.iv68
  %220 = load x86_fp80, ptr %219, align 16, !tbaa !14
  %221 = add nsw i64 %indvars.iv68, -1
  %222 = getelementptr inbounds [300009 x x86_fp80], ptr @x, i64 0, i64 %221
  %223 = load x86_fp80, ptr %222, align 16, !tbaa !14
  %224 = fsub x86_fp80 %220, %223
  store x86_fp80 %224, ptr %17, align 16, !tbaa !14
  %225 = call noundef nonnull align 16 dereferenceable(16) ptr @_ZSt3maxIeERKT_S2_S2_(ptr noundef nonnull align 16 dereferenceable(16) @tmp, ptr noundef nonnull align 16 dereferenceable(16) %17)
  %226 = load x86_fp80, ptr %225, align 16, !tbaa !14
  store x86_fp80 %226, ptr @tmp, align 16, !tbaa !14
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %17) #7
  %indvars.iv.next69 = add nuw nsw i64 %indvars.iv68, 1
  %227 = load i32, ptr @p, align 4, !tbaa !5
  %228 = sext i32 %227 to i64
  %229 = icmp slt i64 %indvars.iv.next69, %228
  br i1 %229, label %.lr.ph58, label %._crit_edge59, !llvm.loop !20
}

; 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: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #3

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

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

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

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

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

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

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

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

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

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

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

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

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #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 = { mustprogress norecurse 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 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 = { 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 = { 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 #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, !6, i64 0}
!10 = !{!"_ZTSSt4pairIiiE", !6, i64 0, !6, i64 4}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = !{!15, !15, i64 0}
!15 = !{!"long double", !7, i64 0}
!16 = distinct !{!16, !12}
!17 = !{!10, !6, i64 4}
!18 = distinct !{!18, !12}
!19 = distinct !{!19, !12}
!20 = distinct !{!20, !12}


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