; LLVM IR from VastoLorde95/Competitive-Programming :: CodeChef/WF/Easy Medium/AVGSHORT/A.ll (Z1fdii)

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

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

@n = external dso_local global i32, align 4
@g = external dso_local global [510 x %"class.std::vector"], align 16
@c = external dso_local global [510 x %"class.std::vector"], align 16
@dis = external dso_local global [510 x double], align 16
@ok1 = external dso_local global [510 x i32], align 16
@ok2 = external dso_local global [510 x i32], align 16

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

29:                                               ; preds = %100, %3
  %30 = load i32, ptr %8, align 4, !tbaa !9
  %31 = load i32, ptr @n, align 4, !tbaa !9
  %32 = icmp sle i32 %30, %31
  br i1 %32, label %34, label %33

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

34:                                               ; preds = %29
  %35 = load i32, ptr %8, align 4, !tbaa !9
  %36 = sext i32 %35 to i64
  %37 = getelementptr inbounds [510 x %"class.std::vector"], ptr @c, i64 0, i64 %36
  call void @_ZNSt6vectorISt4pairIidESaIS1_EE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %37) #4
  %38 = load i32, ptr %8, align 4, !tbaa !9
  %39 = sext i32 %38 to i64
  %40 = getelementptr inbounds [510 x i32], ptr @ok1, i64 0, i64 %39
  %41 = load i32, ptr %40, align 4, !tbaa !9
  %42 = icmp ne i32 %41, 0
  br i1 %42, label %43, label %99

43:                                               ; preds = %34
  %44 = load i32, ptr %8, align 4, !tbaa !9
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds [510 x i32], ptr @ok2, i64 0, i64 %45
  %47 = load i32, ptr %46, align 4, !tbaa !9
  %48 = icmp ne i32 %47, 0
  br i1 %48, label %49, label %99

49:                                               ; preds = %43
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  %50 = load i32, ptr %8, align 4, !tbaa !9
  %51 = sext i32 %50 to i64
  %52 = getelementptr inbounds [510 x %"class.std::vector"], ptr @g, i64 0, i64 %51
  %53 = call ptr @_ZNSt6vectorISt4pairIidESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %52) #4
  %54 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %10, i32 0, i32 0
  store ptr %53, ptr %54, align 8
  br label %55

55:                                               ; preds = %96, %49
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  %56 = load i32, ptr %8, align 4, !tbaa !9
  %57 = sext i32 %56 to i64
  %58 = getelementptr inbounds [510 x %"class.std::vector"], ptr @g, i64 0, i64 %57
  %59 = call ptr @_ZNSt6vectorISt4pairIidESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %58) #4
  %60 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %11, i32 0, i32 0
  store ptr %59, ptr %60, align 8
  %61 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIidESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 8 dereferenceable(8) %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  br i1 %61, label %63, label %62

62:                                               ; preds = %55
  store i32 5, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  br label %98

63:                                               ; preds = %55
  %64 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIidESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %10) #4
  %65 = getelementptr inbounds %"struct.std::pair", ptr %64, i32 0, i32 0
  %66 = load i32, ptr %65, align 8, !tbaa !11
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds [510 x i32], ptr @ok1, i64 0, i64 %67
  %69 = load i32, ptr %68, align 4, !tbaa !9
  %70 = icmp ne i32 %69, 0
  br i1 %70, label %71, label %95

71:                                               ; preds = %63
  %72 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIidESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %10) #4
  %73 = getelementptr inbounds %"struct.std::pair", ptr %72, i32 0, i32 0
  %74 = load i32, ptr %73, align 8, !tbaa !11
  %75 = sext i32 %74 to i64
  %76 = getelementptr inbounds [510 x i32], ptr @ok2, i64 0, i64 %75
  %77 = load i32, ptr %76, align 4, !tbaa !9
  %78 = icmp ne i32 %77, 0
  br i1 %78, label %79, label %95

79:                                               ; preds = %71
  %80 = load i32, ptr %8, align 4, !tbaa !9
  %81 = sext i32 %80 to i64
  %82 = getelementptr inbounds [510 x %"class.std::vector"], ptr @c, i64 0, i64 %81
  call void @llvm.lifetime.start.p0(i64 16, ptr %12) #4
  %83 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIidESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %10) #4
  %84 = getelementptr inbounds %"struct.std::pair", ptr %83, i32 0, i32 0
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  %85 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIidESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %10) #4
  %86 = getelementptr inbounds %"struct.std::pair", ptr %85, i32 0, i32 1
  %87 = load double, ptr %86, align 8, !tbaa !13
  %88 = load double, ptr %5, align 8, !tbaa !5
  %89 = fsub double %87, %88
  store double %89, ptr %13, align 8, !tbaa !5
  %90 = call { i32, double } @_ZSt9make_pairIRidESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %84, ptr noundef nonnull align 8 dereferenceable(8) %13)
  %91 = getelementptr inbounds { i32, double }, ptr %12, i32 0, i32 0
  %92 = extractvalue { i32, double } %90, 0
  store i32 %92, ptr %91, align 8
  %93 = getelementptr inbounds { i32, double }, ptr %12, i32 0, i32 1
  %94 = extractvalue { i32, double } %90, 1
  store double %94, ptr %93, align 8
  call void @_ZNSt6vectorISt4pairIidESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %82, ptr noundef nonnull align 8 dereferenceable(16) %12)
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #4
  br label %95

95:                                               ; preds = %79, %71, %63
  br label %96

96:                                               ; preds = %95
  %97 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt4pairIidESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %10) #4
  br label %55, !llvm.loop !14

98:                                               ; preds = %62
  br label %99

99:                                               ; preds = %98, %43, %34
  br label %100

100:                                              ; preds = %99
  %101 = load i32, ptr %8, align 4, !tbaa !9
  %102 = add nsw i32 %101, 1
  store i32 %102, ptr %8, align 4, !tbaa !9
  br label %29, !llvm.loop !16

103:                                              ; preds = %33
  %104 = load i32, ptr %7, align 4, !tbaa !9
  %105 = sext i32 %104 to i64
  %106 = getelementptr inbounds [510 x %"class.std::vector"], ptr @c, i64 0, i64 %105
  call void @llvm.lifetime.start.p0(i64 16, ptr %14) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #4
  store i32 0, ptr %16, align 4, !tbaa !9
  %107 = call i64 @_ZSt9make_pairIRiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull align 4 dereferenceable(4) %16)
  store i64 %107, ptr %15, align 4
  call void @_ZNSt4pairIidEC2IiiTnNSt9enable_ifIXaaclsr6_PCCFPIT_T0_EE22_MoveConstructiblePairIS3_S4_EEclsr6_PCCFPIS3_S4_EE30_ImplicitlyMoveConvertiblePairIS3_S4_EEEbE4typeELb1EEEOS_IS3_S4_E(ptr noundef nonnull align 8 dereferenceable(16) %14, ptr noundef nonnull align 4 dereferenceable(8) %15)
  call void @_ZNSt6vectorISt4pairIidESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %106, ptr noundef nonnull align 8 dereferenceable(16) %14)
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #4
  store i32 1, ptr %17, align 4, !tbaa !9
  br label %108

108:                                              ; preds = %117, %103
  %109 = load i32, ptr %17, align 4, !tbaa !9
  %110 = load i32, ptr @n, align 4, !tbaa !9
  %111 = icmp sle i32 %109, %110
  br i1 %111, label %113, label %112

112:                                              ; preds = %108
  store i32 8, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #4
  br label %120

113:                                              ; preds = %108
  %114 = load i32, ptr %17, align 4, !tbaa !9
  %115 = sext i32 %114 to i64
  %116 = getelementptr inbounds [510 x double], ptr @dis, i64 0, i64 %115
  store double 1.000000e+09, ptr %116, align 8, !tbaa !5
  br label %117

117:                                              ; preds = %113
  %118 = load i32, ptr %17, align 4, !tbaa !9
  %119 = add nsw i32 %118, 1
  store i32 %119, ptr %17, align 4, !tbaa !9
  br label %108, !llvm.loop !17

120:                                              ; preds = %112
  %121 = load i32, ptr %6, align 4, !tbaa !9
  %122 = sext i32 %121 to i64
  %123 = getelementptr inbounds [510 x double], ptr @dis, i64 0, i64 %122
  store double 0.000000e+00, ptr %123, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #4
  store i32 1, ptr %18, align 4, !tbaa !9
  br label %124

124:                                              ; preds = %185, %120
  %125 = load i32, ptr %18, align 4, !tbaa !9
  %126 = load i32, ptr @n, align 4, !tbaa !9
  %127 = icmp slt i32 %125, %126
  br i1 %127, label %129, label %128

128:                                              ; preds = %124
  store i32 11, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #4
  br label %188

129:                                              ; preds = %124
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #4
  store i32 1, ptr %19, align 4, !tbaa !9
  br label %130

130:                                              ; preds = %181, %129
  %131 = load i32, ptr %19, align 4, !tbaa !9
  %132 = load i32, ptr @n, align 4, !tbaa !9
  %133 = icmp sle i32 %131, %132
  br i1 %133, label %135, label %134

134:                                              ; preds = %130
  store i32 14, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #4
  br label %184

135:                                              ; preds = %130
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #4
  %136 = load i32, ptr %19, align 4, !tbaa !9
  %137 = sext i32 %136 to i64
  %138 = getelementptr inbounds [510 x %"class.std::vector"], ptr @c, i64 0, i64 %137
  %139 = call ptr @_ZNSt6vectorISt4pairIidESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %138) #4
  %140 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %20, i32 0, i32 0
  store ptr %139, ptr %140, align 8
  br label %141

141:                                              ; preds = %178, %135
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #4
  %142 = load i32, ptr %19, align 4, !tbaa !9
  %143 = sext i32 %142 to i64
  %144 = getelementptr inbounds [510 x %"class.std::vector"], ptr @c, i64 0, i64 %143
  %145 = call ptr @_ZNSt6vectorISt4pairIidESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %144) #4
  %146 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %21, i32 0, i32 0
  store ptr %145, ptr %146, align 8
  %147 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIidESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %20, ptr noundef nonnull align 8 dereferenceable(8) %21) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #4
  br i1 %147, label %149, label %148

148:                                              ; preds = %141
  store i32 17, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #4
  br label %180

149:                                              ; preds = %141
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #4
  %150 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIidESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %20) #4
  %151 = getelementptr inbounds %"struct.std::pair", ptr %150, i32 0, i32 0
  %152 = load i32, ptr %151, align 8, !tbaa !11
  store i32 %152, ptr %22, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #4
  %153 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIidESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %20) #4
  %154 = getelementptr inbounds %"struct.std::pair", ptr %153, i32 0, i32 1
  %155 = load double, ptr %154, align 8, !tbaa !13
  store double %155, ptr %23, align 8, !tbaa !5
  %156 = load i32, ptr %19, align 4, !tbaa !9
  %157 = sext i32 %156 to i64
  %158 = getelementptr inbounds [510 x double], ptr @dis, i64 0, i64 %157
  %159 = load double, ptr %158, align 8, !tbaa !5
  %160 = load double, ptr %23, align 8, !tbaa !5
  %161 = fadd double %159, %160
  %162 = load i32, ptr %22, align 4, !tbaa !9
  %163 = sext i32 %162 to i64
  %164 = getelementptr inbounds [510 x double], ptr @dis, i64 0, i64 %163
  %165 = load double, ptr %164, align 8, !tbaa !5
  %166 = fcmp olt double %161, %165
  br i1 %166, label %167, label %177

167:                                              ; preds = %149
  %168 = load i32, ptr %19, align 4, !tbaa !9
  %169 = sext i32 %168 to i64
  %170 = getelementptr inbounds [510 x double], ptr @dis, i64 0, i64 %169
  %171 = load double, ptr %170, align 8, !tbaa !5
  %172 = load double, ptr %23, align 8, !tbaa !5
  %173 = fadd double %171, %172
  %174 = load i32, ptr %22, align 4, !tbaa !9
  %175 = sext i32 %174 to i64
  %176 = getelementptr inbounds [510 x double], ptr @dis, i64 0, i64 %175
  store double %173, ptr %176, align 8, !tbaa !5
  br label %177

177:                                              ; preds = %167, %149
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #4
  br label %178

178:                                              ; preds = %177
  %179 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt4pairIidESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %20) #4
  br label %141, !llvm.loop !18

180:                                              ; preds = %148
  br label %181

181:                                              ; preds = %180
  %182 = load i32, ptr %19, align 4, !tbaa !9
  %183 = add nsw i32 %182, 1
  store i32 %183, ptr %19, align 4, !tbaa !9
  br label %130, !llvm.loop !19

184:                                              ; preds = %134
  br label %185

185:                                              ; preds = %184
  %186 = load i32, ptr %18, align 4, !tbaa !9
  %187 = add nsw i32 %186, 1
  store i32 %187, ptr %18, align 4, !tbaa !9
  br label %124, !llvm.loop !20

188:                                              ; preds = %128
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #4
  store i32 1, ptr %24, align 4, !tbaa !9
  br label %189

189:                                              ; preds = %236, %188
  %190 = load i32, ptr %24, align 4, !tbaa !9
  %191 = load i32, ptr @n, align 4, !tbaa !9
  %192 = icmp sle i32 %190, %191
  br i1 %192, label %194, label %193

193:                                              ; preds = %189
  store i32 20, ptr %9, align 4
  br label %239

194:                                              ; preds = %189
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #4
  %195 = load i32, ptr %24, align 4, !tbaa !9
  %196 = sext i32 %195 to i64
  %197 = getelementptr inbounds [510 x %"class.std::vector"], ptr @c, i64 0, i64 %196
  %198 = call ptr @_ZNSt6vectorISt4pairIidESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %197) #4
  %199 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %25, i32 0, i32 0
  store ptr %198, ptr %199, align 8
  br label %200

200:                                              ; preds = %231, %194
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #4
  %201 = load i32, ptr %24, align 4, !tbaa !9
  %202 = sext i32 %201 to i64
  %203 = getelementptr inbounds [510 x %"class.std::vector"], ptr @c, i64 0, i64 %202
  %204 = call ptr @_ZNSt6vectorISt4pairIidESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %203) #4
  %205 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %26, i32 0, i32 0
  store ptr %204, ptr %205, align 8
  %206 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIidESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %25, ptr noundef nonnull align 8 dereferenceable(8) %26) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #4
  br i1 %206, label %208, label %207

207:                                              ; preds = %200
  store i32 23, ptr %9, align 4
  br label %233

208:                                              ; preds = %200
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #4
  %209 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIidESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %25) #4
  %210 = getelementptr inbounds %"struct.std::pair", ptr %209, i32 0, i32 0
  %211 = load i32, ptr %210, align 8, !tbaa !11
  store i32 %211, ptr %27, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #4
  %212 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIidESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %25) #4
  %213 = getelementptr inbounds %"struct.std::pair", ptr %212, i32 0, i32 1
  %214 = load double, ptr %213, align 8, !tbaa !13
  store double %214, ptr %28, align 8, !tbaa !5
  %215 = load i32, ptr %24, align 4, !tbaa !9
  %216 = sext i32 %215 to i64
  %217 = getelementptr inbounds [510 x double], ptr @dis, i64 0, i64 %216
  %218 = load double, ptr %217, align 8, !tbaa !5
  %219 = load double, ptr %28, align 8, !tbaa !5
  %220 = fadd double %218, %219
  %221 = load i32, ptr %27, align 4, !tbaa !9
  %222 = sext i32 %221 to i64
  %223 = getelementptr inbounds [510 x double], ptr @dis, i64 0, i64 %222
  %224 = load double, ptr %223, align 8, !tbaa !5
  %225 = fcmp olt double %220, %224
  br i1 %225, label %226, label %227

226:                                              ; preds = %208
  store i1 true, ptr %4, align 1
  store i32 1, ptr %9, align 4
  br label %228

227:                                              ; preds = %208
  store i32 0, ptr %9, align 4
  br label %228

228:                                              ; preds = %227, %226
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #4
  %229 = load i32, ptr %9, align 4
  switch i32 %229, label %233 [
    i32 0, label %230
  ]

230:                                              ; preds = %228
  br label %231

231:                                              ; preds = %230
  %232 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt4pairIidESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %25) #4
  br label %200, !llvm.loop !21

233:                                              ; preds = %228, %207
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #4
  %234 = load i32, ptr %9, align 4
  switch i32 %234, label %239 [
    i32 23, label %235
  ]

235:                                              ; preds = %233
  br label %236

236:                                              ; preds = %235
  %237 = load i32, ptr %24, align 4, !tbaa !9
  %238 = add nsw i32 %237, 1
  store i32 %238, ptr %24, align 4, !tbaa !9
  br label %189, !llvm.loop !22

239:                                              ; preds = %233, %193
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #4
  %240 = load i32, ptr %9, align 4
  switch i32 %240, label %244 [
    i32 20, label %241
    i32 1, label %242
  ]

241:                                              ; preds = %239
  store i1 false, ptr %4, align 1
  br label %242

242:                                              ; preds = %241, %239
  %243 = load i1, ptr %4, align 1
  ret i1 %243

244:                                              ; preds = %239
  unreachable
}

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local { i32, double } @_ZSt9make_pairIRidESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 8 dereferenceable(8)) #0

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

; 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)) #0

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

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 = !{!"double", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 0}
!12 = !{!"_ZTSSt4pairIidE", !10, i64 0, !6, i64 8}
!13 = !{!12, !6, i64 8}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = distinct !{!16, !15}
!17 = distinct !{!17, !15}
!18 = distinct !{!18, !15}
!19 = distinct !{!19, !15}
!20 = distinct !{!20, !15}
!21 = distinct !{!21, !15}
!22 = distinct !{!22, !15}


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

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

@n = external dso_local local_unnamed_addr global i32, align 4
@g = external dso_local global [510 x %"class.std::vector"], align 16
@c = external dso_local global [510 x %"class.std::vector"], align 16
@dis = external dso_local local_unnamed_addr global [510 x double], align 16
@ok1 = external dso_local local_unnamed_addr global [510 x i32], align 16
@ok2 = external dso_local local_unnamed_addr global [510 x i32], align 16

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_Z1fdii(double noundef %0, i32 noundef %1, i32 noundef %2) local_unnamed_addr #0 {
  %4 = alloca i32, align 4
  %5 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %6 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %7 = alloca %"struct.std::pair", align 8
  %8 = alloca double, align 8
  %9 = alloca %"struct.std::pair", align 8
  %10 = alloca %"struct.std::pair.0", align 8
  %11 = alloca i32, align 4
  %12 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %13 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %14 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %15 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  store i32 %1, ptr %4, align 4, !tbaa !5
  %16 = load i32, ptr @n, align 4, !tbaa !5
  %.not56 = icmp slt i32 %16, 1
  br i1 %.not56, label %._crit_edge60, label %.lr.ph59

.lr.ph59:                                         ; preds = %3
  %17 = getelementptr inbounds i8, ptr %7, i64 8
  br label %30

._crit_edge60:                                    ; preds = %66, %3
  %18 = sext i32 %2 to i64
  %19 = getelementptr inbounds [510 x %"class.std::vector"], ptr @c, i64 0, i64 %18
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #4
  store i32 0, ptr %11, align 4, !tbaa !5
  %20 = call i64 @_ZSt9make_pairIRiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 4 dereferenceable(4) %11)
  store i64 %20, ptr %10, align 8
  call void @_ZNSt4pairIidEC2IiiTnNSt9enable_ifIXaaclsr6_PCCFPIT_T0_EE22_MoveConstructiblePairIS3_S4_EEclsr6_PCCFPIS3_S4_EE30_ImplicitlyMoveConvertiblePairIS3_S4_EEEbE4typeELb1EEEOS_IS3_S4_E(ptr noundef nonnull align 8 dereferenceable(16) %9, ptr noundef nonnull align 4 dereferenceable(8) %10)
  call void @_ZNSt6vectorISt4pairIidESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %19, ptr noundef nonnull align 8 dereferenceable(16) %9)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #4
  %21 = load i32, ptr @n, align 4, !tbaa !5
  %.not4561 = icmp slt i32 %21, 1
  br i1 %.not4561, label %.preheader.thread, label %.lr.ph64.preheader

.preheader.thread:                                ; preds = %._crit_edge60
  %22 = load i32, ptr %4, align 4, !tbaa !5
  %23 = sext i32 %22 to i64
  %24 = getelementptr inbounds [510 x double], ptr @dis, i64 0, i64 %23
  store double 0.000000e+00, ptr %24, align 8, !tbaa !9
  br label %.loopexit

.lr.ph64.preheader:                               ; preds = %._crit_edge60
  %25 = add nuw i32 %21, 1
  %wide.trip.count = zext i32 %25 to i64
  %26 = zext nneg i32 %21 to i64
  %min.iters.check = icmp ult i32 %21, 4
  br i1 %min.iters.check, label %.lr.ph64.preheader96, label %vector.ph

.lr.ph64.preheader96:                             ; preds = %middle.block, %.lr.ph64.preheader
  %indvars.iv84.ph = phi i64 [ 1, %.lr.ph64.preheader ], [ %ind.end, %middle.block ]
  br label %.lr.ph64

vector.ph:                                        ; preds = %.lr.ph64.preheader
  %n.vec = and i64 %26, 2147483644
  %ind.end = or disjoint 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 = or disjoint i64 %index, 1
  %27 = getelementptr inbounds [510 x double], ptr @dis, i64 0, i64 %offset.idx
  %28 = getelementptr inbounds i8, ptr %27, i64 16
  store <2 x double> <double 1.000000e+09, double 1.000000e+09>, ptr %27, align 8, !tbaa !9
  store <2 x double> <double 1.000000e+09, double 1.000000e+09>, ptr %28, align 8, !tbaa !9
  %index.next = add nuw i64 %index, 4
  %29 = icmp eq i64 %index.next, %n.vec
  br i1 %29, label %middle.block, label %vector.body, !llvm.loop !11

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.vec, %26
  br i1 %cmp.n, label %._crit_edge65, label %.lr.ph64.preheader96

30:                                               ; preds = %.lr.ph59, %66
  %indvars.iv = phi i64 [ 1, %.lr.ph59 ], [ %indvars.iv.next, %66 ]
  %31 = getelementptr inbounds [510 x %"class.std::vector"], ptr @c, i64 0, i64 %indvars.iv
  call void @_ZNSt6vectorISt4pairIidESaIS1_EE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %31) #4
  %32 = getelementptr inbounds [510 x i32], ptr @ok1, i64 0, i64 %indvars.iv
  %33 = load i32, ptr %32, align 4, !tbaa !5
  %.not48 = icmp eq i32 %33, 0
  br i1 %.not48, label %66, label %34

34:                                               ; preds = %30
  %35 = getelementptr inbounds [510 x i32], ptr @ok2, i64 0, i64 %indvars.iv
  %36 = load i32, ptr %35, align 4, !tbaa !5
  %.not49 = icmp eq i32 %36, 0
  br i1 %.not49, label %66, label %37

37:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #4
  %38 = getelementptr inbounds [510 x %"class.std::vector"], ptr @g, i64 0, i64 %indvars.iv
  %39 = call ptr @_ZNSt6vectorISt4pairIidESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %38) #4
  store ptr %39, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #4
  %40 = call ptr @_ZNSt6vectorISt4pairIidESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %38) #4
  store ptr %40, ptr %6, align 8
  %41 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIidESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #4
  br i1 %41, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %62, %37
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #4
  br label %66

.lr.ph:                                           ; preds = %37, %62
  %42 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIidESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #4
  %43 = load i32, ptr %42, align 8, !tbaa !15
  %44 = sext i32 %43 to i64
  %45 = getelementptr inbounds [510 x i32], ptr @ok1, i64 0, i64 %44
  %46 = load i32, ptr %45, align 4, !tbaa !5
  %.not50 = icmp eq i32 %46, 0
  br i1 %.not50, label %62, label %47

47:                                               ; preds = %.lr.ph
  %48 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIidESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #4
  %49 = load i32, ptr %48, align 8, !tbaa !15
  %50 = sext i32 %49 to i64
  %51 = getelementptr inbounds [510 x i32], ptr @ok2, i64 0, i64 %50
  %52 = load i32, ptr %51, align 4, !tbaa !5
  %.not51 = icmp eq i32 %52, 0
  br i1 %.not51, label %62, label %53

53:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #4
  %54 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIidESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #4
  %55 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIidESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #4
  %56 = getelementptr inbounds i8, ptr %55, i64 8
  %57 = load double, ptr %56, align 8, !tbaa !17
  %58 = fsub double %57, %0
  store double %58, ptr %8, align 8, !tbaa !9
  %59 = call { i32, double } @_ZSt9make_pairIRidESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %54, ptr noundef nonnull align 8 dereferenceable(8) %8)
  %60 = extractvalue { i32, double } %59, 0
  store i32 %60, ptr %7, align 8
  %61 = extractvalue { i32, double } %59, 1
  store double %61, ptr %17, align 8
  call void @_ZNSt6vectorISt4pairIidESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %31, ptr noundef nonnull align 8 dereferenceable(16) %7)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #4
  br label %62

62:                                               ; preds = %.lr.ph, %47, %53
  %63 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt4pairIidESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #4
  %64 = call ptr @_ZNSt6vectorISt4pairIidESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %38) #4
  store ptr %64, ptr %6, align 8
  %65 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIidESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #4
  br i1 %65, label %.lr.ph, label %._crit_edge, !llvm.loop !18

66:                                               ; preds = %30, %34, %._crit_edge
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %67 = load i32, ptr @n, align 4, !tbaa !5
  %68 = sext i32 %67 to i64
  %.not.not = icmp slt i64 %indvars.iv, %68
  br i1 %.not.not, label %30, label %._crit_edge60, !llvm.loop !19

._crit_edge65:                                    ; preds = %.lr.ph64, %middle.block
  %69 = load i32, ptr %4, align 4, !tbaa !5
  %70 = sext i32 %69 to i64
  %71 = getelementptr inbounds [510 x double], ptr @dis, i64 0, i64 %70
  store double 0.000000e+00, ptr %71, align 8, !tbaa !9
  %.not = icmp eq i32 %21, 1
  br i1 %.not, label %.lr.ph80.preheader, label %.preheader53

.lr.ph80.preheader:                               ; preds = %.preheader.loopexit, %._crit_edge65
  br label %.lr.ph80

.lr.ph64:                                         ; preds = %.lr.ph64.preheader96, %.lr.ph64
  %indvars.iv84 = phi i64 [ %indvars.iv.next85, %.lr.ph64 ], [ %indvars.iv84.ph, %.lr.ph64.preheader96 ]
  %72 = getelementptr inbounds [510 x double], ptr @dis, i64 0, i64 %indvars.iv84
  store double 1.000000e+09, ptr %72, align 8, !tbaa !9
  %indvars.iv.next85 = add nuw nsw i64 %indvars.iv84, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next85, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge65, label %.lr.ph64, !llvm.loop !20

.preheader53:                                     ; preds = %._crit_edge65, %._crit_edge72
  %73 = phi i32 [ %75, %._crit_edge72 ], [ %21, %._crit_edge65 ]
  %.04373 = phi i32 [ %76, %._crit_edge72 ], [ 1, %._crit_edge65 ]
  %.not4769 = icmp slt i32 %73, 1
  br i1 %.not4769, label %._crit_edge72, label %.lr.ph71

.preheader.loopexit:                              ; preds = %._crit_edge72
  %74 = icmp sgt i32 %75, 0
  br i1 %74, label %.lr.ph80.preheader, label %.loopexit

._crit_edge72:                                    ; preds = %._crit_edge68, %.preheader53
  %75 = phi i32 [ %73, %.preheader53 ], [ %83, %._crit_edge68 ]
  %76 = add nuw nsw i32 %.04373, 1
  %77 = icmp slt i32 %76, %75
  br i1 %77, label %.preheader53, label %.preheader.loopexit, !llvm.loop !21

.lr.ph71:                                         ; preds = %.preheader53, %._crit_edge68
  %indvars.iv87 = phi i64 [ %indvars.iv.next88, %._crit_edge68 ], [ 1, %.preheader53 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #4
  %78 = getelementptr inbounds [510 x %"class.std::vector"], ptr @c, i64 0, i64 %indvars.iv87
  %79 = call ptr @_ZNSt6vectorISt4pairIidESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %78) #4
  store ptr %79, ptr %12, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #4
  %80 = call ptr @_ZNSt6vectorISt4pairIidESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %78) #4
  store ptr %80, ptr %13, align 8
  %81 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIidESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(8) %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #4
  br i1 %81, label %.lr.ph67, label %._crit_edge68

.lr.ph67:                                         ; preds = %.lr.ph71
  %82 = getelementptr inbounds [510 x double], ptr @dis, i64 0, i64 %indvars.iv87
  br label %85

._crit_edge68:                                    ; preds = %98, %.lr.ph71
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #4
  %indvars.iv.next88 = add nuw nsw i64 %indvars.iv87, 1
  %83 = load i32, ptr @n, align 4, !tbaa !5
  %84 = sext i32 %83 to i64
  %.not47.not = icmp slt i64 %indvars.iv87, %84
  br i1 %.not47.not, label %.lr.ph71, label %._crit_edge72, !llvm.loop !23

85:                                               ; preds = %.lr.ph67, %98
  %86 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIidESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %12) #4
  %87 = load i32, ptr %86, align 8, !tbaa !15
  %88 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIidESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %12) #4
  %89 = getelementptr inbounds i8, ptr %88, i64 8
  %90 = load double, ptr %89, align 8, !tbaa !17
  %91 = load double, ptr %82, align 8, !tbaa !9
  %92 = fadd double %90, %91
  %93 = sext i32 %87 to i64
  %94 = getelementptr inbounds [510 x double], ptr @dis, i64 0, i64 %93
  %95 = load double, ptr %94, align 8, !tbaa !9
  %96 = fcmp olt double %92, %95
  br i1 %96, label %97, label %98

97:                                               ; preds = %85
  store double %92, ptr %94, align 8, !tbaa !9
  br label %98

98:                                               ; preds = %97, %85
  %99 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt4pairIidESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %12) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #4
  %100 = call ptr @_ZNSt6vectorISt4pairIidESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %78) #4
  store ptr %100, ptr %13, align 8
  %101 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIidESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(8) %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #4
  br i1 %101, label %85, label %._crit_edge68, !llvm.loop !24

.lr.ph80:                                         ; preds = %.lr.ph80.preheader, %._crit_edge76
  %indvars.iv90 = phi i64 [ %indvars.iv.next91, %._crit_edge76 ], [ 1, %.lr.ph80.preheader ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #4
  %102 = getelementptr inbounds [510 x %"class.std::vector"], ptr @c, i64 0, i64 %indvars.iv90
  %103 = call ptr @_ZNSt6vectorISt4pairIidESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %102) #4
  store ptr %103, ptr %14, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #4
  %104 = call ptr @_ZNSt6vectorISt4pairIidESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %102) #4
  store ptr %104, ptr %15, align 8
  %105 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIidESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(8) %15) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #4
  br i1 %105, label %.lr.ph75, label %._crit_edge76

.lr.ph75:                                         ; preds = %.lr.ph80
  %106 = getelementptr inbounds [510 x double], ptr @dis, i64 0, i64 %indvars.iv90
  br label %107

107:                                              ; preds = %.lr.ph75, %119
  %108 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIidESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %14) #4
  %109 = load i32, ptr %108, align 8, !tbaa !15
  %110 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIidESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %14) #4
  %111 = getelementptr inbounds i8, ptr %110, i64 8
  %112 = load double, ptr %111, align 8, !tbaa !17
  %113 = load double, ptr %106, align 8, !tbaa !9
  %114 = fadd double %112, %113
  %115 = sext i32 %109 to i64
  %116 = getelementptr inbounds [510 x double], ptr @dis, i64 0, i64 %115
  %117 = load double, ptr %116, align 8, !tbaa !9
  %118 = fcmp uge double %114, %117
  br i1 %118, label %119, label %.thread

.thread:                                          ; preds = %107
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #4
  br label %.loopexit

119:                                              ; preds = %107
  %120 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt4pairIidESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %14) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #4
  %121 = call ptr @_ZNSt6vectorISt4pairIidESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %102) #4
  store ptr %121, ptr %15, align 8
  %122 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIidESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(8) %15) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #4
  br i1 %122, label %107, label %._crit_edge76, !llvm.loop !25

._crit_edge76:                                    ; preds = %119, %.lr.ph80
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #4
  %indvars.iv.next91 = add nuw nsw i64 %indvars.iv90, 1
  %123 = load i32, ptr @n, align 4, !tbaa !5
  %124 = sext i32 %123 to i64
  %.not46 = icmp slt i64 %indvars.iv90, %124
  br i1 %.not46, label %.lr.ph80, label %.loopexit, !llvm.loop !26

.loopexit:                                        ; preds = %._crit_edge76, %.preheader.thread, %.preheader.loopexit, %.thread
  %.not4655 = phi i1 [ true, %.thread ], [ false, %.preheader.loopexit ], [ false, %.preheader.thread ], [ false, %._crit_edge76 ]
  ret i1 %.not4655
}

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local { i32, double } @_ZSt9make_pairIRidESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #0

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

; 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 #0

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

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


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,ReassociatePass,SCCPPass,SROAPass,SimpleLoopUnswitchPass,SimplifyCFGPass