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

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

%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::set" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"struct.std::pair" = type <{ %"struct.std::_Rb_tree_const_iterator", i8, [7 x i8] }>
%"struct.std::_Rb_tree_const_iterator" = type { ptr }

@dp_num = external dso_local global [50 x [50 x i64]], align 16
@dp_den = external dso_local global [50 x [50 x i64]], align 16
@cnt = external dso_local global [50 x i64], align 16
@sum = external dso_local global [50 x i64], align 16
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@__FUNCTION__._Z5solvev = external hidden unnamed_addr constant [6 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [108 x i8], align 1
@__PRETTY_FUNCTION__._Z5solvev = external hidden unnamed_addr constant [13 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [8 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5solvev() #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca %"class.std::set", align 8
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca %"struct.std::pair", align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i64, align 8
  %16 = alloca i64, align 8
  %17 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %1) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #7
  %18 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %1, ptr noundef %2)
  call void @llvm.lifetime.start.p0(i64 48, ptr %3) #7
  call void @_ZNSt3setIiSt4lessIiESaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %3) #7
  call void @llvm.memset.p0.i64(ptr align 16 @cnt, i8 0, i64 400, i1 false)
  call void @llvm.memset.p0.i64(ptr align 16 @sum, i8 0, i64 400, i1 false)
  call void @llvm.memset.p0.i64(ptr align 16 @dp_den, i8 0, i64 20000, i1 false)
  call void @llvm.memset.p0.i64(ptr align 16 @dp_num, i8 0, i64 20000, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #7
  store i32 0, ptr %4, align 4, !tbaa !5
  br label %19

19:                                               ; preds = %45, %0
  %20 = load i32, ptr %4, align 4, !tbaa !5
  %21 = load i32, ptr %1, align 4, !tbaa !5
  %22 = icmp slt i32 %20, %21
  br i1 %22, label %24, label %23

23:                                               ; preds = %19
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #7
  br label %52

24:                                               ; preds = %19
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  %25 = invoke i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %5, ptr noundef %6)
          to label %26 unwind label %48

26:                                               ; preds = %24
  %27 = invoke { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 4 dereferenceable(4) %5)
          to label %28 unwind label %48

28:                                               ; preds = %26
  %29 = getelementptr inbounds { ptr, i8 }, ptr %9, i32 0, i32 0
  %30 = extractvalue { ptr, i8 } %27, 0
  store ptr %30, ptr %29, align 8
  %31 = getelementptr inbounds { ptr, i8 }, ptr %9, i32 0, i32 1
  %32 = extractvalue { ptr, i8 } %27, 1
  store i8 %32, ptr %31, align 8
  %33 = load i32, ptr %5, align 4, !tbaa !5
  %34 = sext i32 %33 to i64
  %35 = getelementptr inbounds [50 x i64], ptr @cnt, i64 0, i64 %34
  %36 = load i64, ptr %35, align 8, !tbaa !9
  %37 = add nsw i64 %36, 1
  store i64 %37, ptr %35, align 8, !tbaa !9
  %38 = load i32, ptr %6, align 4, !tbaa !5
  %39 = sext i32 %38 to i64
  %40 = load i32, ptr %5, align 4, !tbaa !5
  %41 = sext i32 %40 to i64
  %42 = getelementptr inbounds [50 x i64], ptr @sum, i64 0, i64 %41
  %43 = load i64, ptr %42, align 8, !tbaa !9
  %44 = add nsw i64 %43, %39
  store i64 %44, ptr %42, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  br label %45

45:                                               ; preds = %28
  %46 = load i32, ptr %4, align 4, !tbaa !5
  %47 = add nsw i32 %46, 1
  store i32 %47, ptr %4, align 4, !tbaa !5
  br label %19, !llvm.loop !11

48:                                               ; preds = %26, %24
  %49 = landingpad { ptr, i32 }
          cleanup
  %50 = extractvalue { ptr, i32 } %49, 0
  store ptr %50, ptr %7, align 8
  %51 = extractvalue { ptr, i32 } %49, 1
  store i32 %51, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #7
  br label %261

52:                                               ; preds = %23
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  %53 = call noundef i64 @_ZNKSt3setIiSt4lessIiESaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %3) #7
  %54 = trunc i64 %53 to i32
  store i32 %54, ptr %10, align 4, !tbaa !5
  store i64 1, ptr @dp_den, align 16, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  store i32 1, ptr %11, align 4, !tbaa !5
  br label %55

55:                                               ; preds = %203, %52
  %56 = load i32, ptr %11, align 4, !tbaa !5
  %57 = icmp slt i32 %56, 50
  br i1 %57, label %59, label %58

58:                                               ; preds = %55
  store i32 5, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  br label %206

59:                                               ; preds = %55
  %60 = load i32, ptr %11, align 4, !tbaa !5
  %61 = sext i32 %60 to i64
  %62 = getelementptr inbounds [50 x [50 x i64]], ptr @dp_den, i64 0, i64 %61
  %63 = getelementptr inbounds [50 x i64], ptr %62, i64 0, i64 0
  store i64 1, ptr %63, align 16, !tbaa !9
  %64 = load i32, ptr %11, align 4, !tbaa !5
  %65 = sext i32 %64 to i64
  %66 = getelementptr inbounds [50 x i64], ptr @cnt, i64 0, i64 %65
  %67 = load i64, ptr %66, align 8, !tbaa !9
  %68 = icmp eq i64 %67, 0
  br i1 %68, label %69, label %108

69:                                               ; preds = %59
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  store i32 1, ptr %13, align 4, !tbaa !5
  br label %70

70:                                               ; preds = %104, %69
  %71 = load i32, ptr %13, align 4, !tbaa !5
  %72 = load i32, ptr %11, align 4, !tbaa !5
  %73 = icmp sle i32 %71, %72
  br i1 %73, label %75, label %74

74:                                               ; preds = %70
  store i32 8, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  br label %107

75:                                               ; preds = %70
  %76 = load i32, ptr %11, align 4, !tbaa !5
  %77 = sub nsw i32 %76, 1
  %78 = sext i32 %77 to i64
  %79 = getelementptr inbounds [50 x [50 x i64]], ptr @dp_num, i64 0, i64 %78
  %80 = load i32, ptr %13, align 4, !tbaa !5
  %81 = sext i32 %80 to i64
  %82 = getelementptr inbounds [50 x i64], ptr %79, i64 0, i64 %81
  %83 = load i64, ptr %82, align 8, !tbaa !9
  %84 = load i32, ptr %11, align 4, !tbaa !5
  %85 = sext i32 %84 to i64
  %86 = getelementptr inbounds [50 x [50 x i64]], ptr @dp_num, i64 0, i64 %85
  %87 = load i32, ptr %13, align 4, !tbaa !5
  %88 = sext i32 %87 to i64
  %89 = getelementptr inbounds [50 x i64], ptr %86, i64 0, i64 %88
  store i64 %83, ptr %89, align 8, !tbaa !9
  %90 = load i32, ptr %11, align 4, !tbaa !5
  %91 = sub nsw i32 %90, 1
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds [50 x [50 x i64]], ptr @dp_den, i64 0, i64 %92
  %94 = load i32, ptr %13, align 4, !tbaa !5
  %95 = sext i32 %94 to i64
  %96 = getelementptr inbounds [50 x i64], ptr %93, i64 0, i64 %95
  %97 = load i64, ptr %96, align 8, !tbaa !9
  %98 = load i32, ptr %11, align 4, !tbaa !5
  %99 = sext i32 %98 to i64
  %100 = getelementptr inbounds [50 x [50 x i64]], ptr @dp_den, i64 0, i64 %99
  %101 = load i32, ptr %13, align 4, !tbaa !5
  %102 = sext i32 %101 to i64
  %103 = getelementptr inbounds [50 x i64], ptr %100, i64 0, i64 %102
  store i64 %97, ptr %103, align 8, !tbaa !9
  br label %104

104:                                              ; preds = %75
  %105 = load i32, ptr %13, align 4, !tbaa !5
  %106 = add nsw i32 %105, 1
  store i32 %106, ptr %13, align 4, !tbaa !5
  br label %70, !llvm.loop !13

107:                                              ; preds = %74
  br label %203

108:                                              ; preds = %59
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  store i32 1, ptr %14, align 4, !tbaa !5
  br label %109

109:                                              ; preds = %199, %108
  %110 = load i32, ptr %14, align 4, !tbaa !5
  %111 = load i32, ptr %11, align 4, !tbaa !5
  %112 = icmp sle i32 %110, %111
  br i1 %112, label %114, label %113

113:                                              ; preds = %109
  store i32 11, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  br label %202

114:                                              ; preds = %109
  %115 = load i32, ptr %11, align 4, !tbaa !5
  %116 = sub nsw i32 %115, 1
  %117 = sext i32 %116 to i64
  %118 = getelementptr inbounds [50 x [50 x i64]], ptr @dp_den, i64 0, i64 %117
  %119 = load i32, ptr %14, align 4, !tbaa !5
  %120 = sext i32 %119 to i64
  %121 = getelementptr inbounds [50 x i64], ptr %118, i64 0, i64 %120
  %122 = load i64, ptr %121, align 8, !tbaa !9
  %123 = load i32, ptr %11, align 4, !tbaa !5
  %124 = sub nsw i32 %123, 1
  %125 = sext i32 %124 to i64
  %126 = getelementptr inbounds [50 x [50 x i64]], ptr @dp_den, i64 0, i64 %125
  %127 = load i32, ptr %14, align 4, !tbaa !5
  %128 = sub nsw i32 %127, 1
  %129 = sext i32 %128 to i64
  %130 = getelementptr inbounds [50 x i64], ptr %126, i64 0, i64 %129
  %131 = load i64, ptr %130, align 8, !tbaa !9
  %132 = load i32, ptr %11, align 4, !tbaa !5
  %133 = sext i32 %132 to i64
  %134 = getelementptr inbounds [50 x i64], ptr @cnt, i64 0, i64 %133
  %135 = load i64, ptr %134, align 8, !tbaa !9
  %136 = shl i64 1, %135
  %137 = sub nsw i64 %136, 1
  %138 = mul nsw i64 %131, %137
  %139 = add nsw i64 %122, %138
  %140 = load i32, ptr %11, align 4, !tbaa !5
  %141 = sext i32 %140 to i64
  %142 = getelementptr inbounds [50 x [50 x i64]], ptr @dp_den, i64 0, i64 %141
  %143 = load i32, ptr %14, align 4, !tbaa !5
  %144 = sext i32 %143 to i64
  %145 = getelementptr inbounds [50 x i64], ptr %142, i64 0, i64 %144
  store i64 %139, ptr %145, align 8, !tbaa !9
  %146 = load i32, ptr %11, align 4, !tbaa !5
  %147 = sub nsw i32 %146, 1
  %148 = sext i32 %147 to i64
  %149 = getelementptr inbounds [50 x [50 x i64]], ptr @dp_num, i64 0, i64 %148
  %150 = load i32, ptr %14, align 4, !tbaa !5
  %151 = sext i32 %150 to i64
  %152 = getelementptr inbounds [50 x i64], ptr %149, i64 0, i64 %151
  %153 = load i64, ptr %152, align 8, !tbaa !9
  %154 = load i32, ptr %11, align 4, !tbaa !5
  %155 = sub nsw i32 %154, 1
  %156 = sext i32 %155 to i64
  %157 = getelementptr inbounds [50 x [50 x i64]], ptr @dp_num, i64 0, i64 %156
  %158 = load i32, ptr %14, align 4, !tbaa !5
  %159 = sub nsw i32 %158, 1
  %160 = sext i32 %159 to i64
  %161 = getelementptr inbounds [50 x i64], ptr %157, i64 0, i64 %160
  %162 = load i64, ptr %161, align 8, !tbaa !9
  %163 = load i32, ptr %11, align 4, !tbaa !5
  %164 = sext i32 %163 to i64
  %165 = getelementptr inbounds [50 x i64], ptr @cnt, i64 0, i64 %164
  %166 = load i64, ptr %165, align 8, !tbaa !9
  %167 = shl i64 1, %166
  %168 = sub nsw i64 %167, 1
  %169 = mul nsw i64 %162, %168
  %170 = add nsw i64 %153, %169
  %171 = load i32, ptr %11, align 4, !tbaa !5
  %172 = sext i32 %171 to i64
  %173 = getelementptr inbounds [50 x i64], ptr @cnt, i64 0, i64 %172
  %174 = load i64, ptr %173, align 8, !tbaa !9
  %175 = sub nsw i64 %174, 1
  %176 = shl i64 1, %175
  %177 = load i32, ptr %11, align 4, !tbaa !5
  %178 = sext i32 %177 to i64
  %179 = getelementptr inbounds [50 x i64], ptr @sum, i64 0, i64 %178
  %180 = load i64, ptr %179, align 8, !tbaa !9
  %181 = mul nsw i64 %176, %180
  %182 = load i32, ptr %11, align 4, !tbaa !5
  %183 = sub nsw i32 %182, 1
  %184 = sext i32 %183 to i64
  %185 = getelementptr inbounds [50 x [50 x i64]], ptr @dp_den, i64 0, i64 %184
  %186 = load i32, ptr %14, align 4, !tbaa !5
  %187 = sub nsw i32 %186, 1
  %188 = sext i32 %187 to i64
  %189 = getelementptr inbounds [50 x i64], ptr %185, i64 0, i64 %188
  %190 = load i64, ptr %189, align 8, !tbaa !9
  %191 = mul nsw i64 %181, %190
  %192 = add nsw i64 %170, %191
  %193 = load i32, ptr %11, align 4, !tbaa !5
  %194 = sext i32 %193 to i64
  %195 = getelementptr inbounds [50 x [50 x i64]], ptr @dp_num, i64 0, i64 %194
  %196 = load i32, ptr %14, align 4, !tbaa !5
  %197 = sext i32 %196 to i64
  %198 = getelementptr inbounds [50 x i64], ptr %195, i64 0, i64 %197
  store i64 %192, ptr %198, align 8, !tbaa !9
  br label %199

199:                                              ; preds = %114
  %200 = load i32, ptr %14, align 4, !tbaa !5
  %201 = add nsw i32 %200, 1
  store i32 %201, ptr %14, align 4, !tbaa !5
  br label %109, !llvm.loop !14

202:                                              ; preds = %113
  br label %203

203:                                              ; preds = %202, %107
  %204 = load i32, ptr %11, align 4, !tbaa !5
  %205 = add nsw i32 %204, 1
  store i32 %205, ptr %11, align 4, !tbaa !5
  br label %55, !llvm.loop !15

206:                                              ; preds = %58
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  store i64 0, ptr %15, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  store i64 0, ptr %16, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  %207 = load i32, ptr %2, align 4, !tbaa !5
  store i32 %207, ptr %17, align 4, !tbaa !5
  br label %208

208:                                              ; preds = %226, %206
  %209 = load i32, ptr %17, align 4, !tbaa !5
  %210 = load i32, ptr %10, align 4, !tbaa !5
  %211 = icmp sle i32 %209, %210
  br i1 %211, label %213, label %212

212:                                              ; preds = %208
  store i32 14, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  br label %229

213:                                              ; preds = %208
  %214 = load i32, ptr %17, align 4, !tbaa !5
  %215 = sext i32 %214 to i64
  %216 = getelementptr inbounds [50 x i64], ptr getelementptr inbounds ([50 x [50 x i64]], ptr @dp_num, i64 0, i64 49), i64 0, i64 %215
  %217 = load i64, ptr %216, align 8, !tbaa !9
  %218 = load i64, ptr %15, align 8, !tbaa !9
  %219 = add nsw i64 %218, %217
  store i64 %219, ptr %15, align 8, !tbaa !9
  %220 = load i32, ptr %17, align 4, !tbaa !5
  %221 = sext i32 %220 to i64
  %222 = getelementptr inbounds [50 x i64], ptr getelementptr inbounds ([50 x [50 x i64]], ptr @dp_den, i64 0, i64 49), i64 0, i64 %221
  %223 = load i64, ptr %222, align 8, !tbaa !9
  %224 = load i64, ptr %16, align 8, !tbaa !9
  %225 = add nsw i64 %224, %223
  store i64 %225, ptr %16, align 8, !tbaa !9
  br label %226

226:                                              ; preds = %213
  %227 = load i32, ptr %17, align 4, !tbaa !5
  %228 = add nsw i32 %227, 1
  store i32 %228, ptr %17, align 4, !tbaa !5
  br label %208, !llvm.loop !16

229:                                              ; preds = %212
  %230 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @__FUNCTION__._Z5solvev)
          to label %231 unwind label %248

231:                                              ; preds = %229
  %232 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %230, i8 noundef signext 32)
          to label %233 unwind label %248

233:                                              ; preds = %231
  %234 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %232, i32 noundef 96)
          to label %235 unwind label %248

235:                                              ; preds = %233
  %236 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %234, ptr noundef @.str.1)
          to label %237 unwind label %248

237:                                              ; preds = %235
  invoke void @_Z5traceIRxJS0_S0_S0_EEvPKcOT_DpOT0_(ptr noundef @.str.2, ptr noundef nonnull align 8 dereferenceable(8) %15, ptr noundef nonnull align 8 dereferenceable(8) getelementptr inbounds ([50 x i64], ptr getelementptr inbounds ([50 x [50 x i64]], ptr @dp_num, i64 0, i64 1), i64 0, i64 1), ptr noundef nonnull align 8 dereferenceable(8) getelementptr inbounds ([50 x i64], ptr @sum, i64 0, i64 1), ptr noundef nonnull align 8 dereferenceable(8) getelementptr inbounds ([50 x i64], ptr @cnt, i64 0, i64 1))
          to label %238 unwind label %248

238:                                              ; preds = %237
  %239 = load i64, ptr %15, align 8, !tbaa !9
  %240 = icmp sge i64 %239, 0
  br i1 %240, label %241, label %244

241:                                              ; preds = %238
  %242 = load i64, ptr %16, align 8, !tbaa !9
  %243 = icmp sgt i64 %242, 0
  br label %244

244:                                              ; preds = %241, %238
  %245 = phi i1 [ false, %238 ], [ %243, %241 ]
  br i1 %245, label %246, label %247

246:                                              ; preds = %244
  br label %253

247:                                              ; preds = %244
  call void @__assert_fail(ptr noundef @.str.3, ptr noundef @.str.4, i32 noundef 98, ptr noundef @__PRETTY_FUNCTION__._Z5solvev) #8
  unreachable

248:                                              ; preds = %253, %237, %235, %233, %231, %229
  %249 = landingpad { ptr, i32 }
          cleanup
  %250 = extractvalue { ptr, i32 } %249, 0
  store ptr %250, ptr %7, align 8
  %251 = extractvalue { ptr, i32 } %249, 1
  store i32 %251, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  br label %261

252:                                              ; No predecessors!
  br label %253

253:                                              ; preds = %252, %246
  %254 = load i64, ptr %15, align 8, !tbaa !9
  %255 = sitofp i64 %254 to double
  %256 = load i64, ptr %16, align 8, !tbaa !9
  %257 = sitofp i64 %256 to double
  %258 = fdiv double %255, %257
  %259 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.5, double noundef %258)
          to label %260 unwind label %248

260:                                              ; preds = %253
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  call void @_ZNSt3setIiSt4lessIiESaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %3) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %1) #7
  ret void

261:                                              ; preds = %248, %48
  call void @_ZNSt3setIiSt4lessIiESaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %3) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %1) #7
  br label %262

262:                                              ; preds = %261
  %263 = load ptr, ptr %7, align 8
  %264 = load i32, ptr %8, align 4
  %265 = insertvalue { ptr, i32 } poison, ptr %263, 0
  %266 = insertvalue { ptr, i32 } %265, i32 %264, 1
  resume { ptr, i32 } %266
}

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

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

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(4)) #0 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 i64 @_ZNKSt3setIiSt4lessIiESaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48)) #3 align 2

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

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

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #2

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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #6

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt3setIiSt4lessIiESaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #3 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 = { "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 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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #5 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { noreturn 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 #7 = { nounwind }
attributes #8 = { noreturn nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long long", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !12}
!16 = distinct !{!16, !12}


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

%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::set" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }

@dp_num = external dso_local global [50 x [50 x i64]], align 16
@dp_den = external dso_local local_unnamed_addr global [50 x [50 x i64]], align 16
@cnt = external dso_local global [50 x i64], align 16
@sum = external dso_local global [50 x i64], align 16
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@__FUNCTION__._Z5solvev = external hidden unnamed_addr constant [6 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [108 x i8], align 1
@__PRETTY_FUNCTION__._Z5solvev = external hidden unnamed_addr constant [13 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [8 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5solvev() local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca %"class.std::set", align 8
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i64, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #9
  %7 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %1, ptr noundef nonnull %2)
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %3) #9
  call void @_ZNSt3setIiSt4lessIiESaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %3) #9
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(400) @cnt, i8 0, i64 400, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(400) @sum, i8 0, i64 400, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(20000) @dp_den, i8 0, i64 20000, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(20000) @dp_num, i8 0, i64 20000, i1 false)
  %8 = load i32, ptr %1, align 4, !tbaa !5
  %9 = icmp sgt i32 %8, 0
  br i1 %9, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %13, %0
  %10 = call noundef i64 @_ZNKSt3setIiSt4lessIiESaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %3) #9
  store i64 1, ptr @dp_den, align 16, !tbaa !9
  br label %48

.lr.ph:                                           ; preds = %0, %13
  %.05162 = phi i32 [ %24, %13 ], [ 0, %0 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #9
  %11 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %4, ptr noundef nonnull %5)
  %12 = invoke { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 4 dereferenceable(4) %4)
          to label %13 unwind label %27

13:                                               ; preds = %.lr.ph
  %14 = load i32, ptr %4, align 4, !tbaa !5
  %15 = sext i32 %14 to i64
  %16 = getelementptr inbounds [50 x i64], ptr @cnt, i64 0, i64 %15
  %17 = load i64, ptr %16, align 8, !tbaa !9
  %18 = add nsw i64 %17, 1
  store i64 %18, ptr %16, align 8, !tbaa !9
  %19 = load i32, ptr %5, align 4, !tbaa !5
  %20 = sext i32 %19 to i64
  %21 = getelementptr inbounds [50 x i64], ptr @sum, i64 0, i64 %15
  %22 = load i64, ptr %21, align 8, !tbaa !9
  %23 = add nsw i64 %22, %20
  store i64 %23, ptr %21, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #9
  %24 = add nuw nsw i32 %.05162, 1
  %25 = load i32, ptr %1, align 4, !tbaa !5
  %26 = icmp slt i32 %24, %25
  br i1 %26, label %.lr.ph, label %._crit_edge, !llvm.loop !11

27:                                               ; preds = %.lr.ph
  %28 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #9
  br label %116

29:                                               ; preds = %.loopexit
  %30 = trunc i64 %10 to i32
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #9
  %31 = load i32, ptr %2, align 4, !tbaa !5
  %.not66 = icmp sgt i32 %31, %30
  br i1 %.not66, label %._crit_edge71, label %.lr.ph70.preheader

.lr.ph70.preheader:                               ; preds = %29
  %32 = sext i32 %31 to i64
  %33 = add i32 %30, 1
  %34 = sub i32 %30, %31
  %35 = zext i32 %34 to i64
  %36 = add nuw nsw i64 %35, 1
  %min.iters.check111 = icmp ult i32 %34, 3
  br i1 %min.iters.check111, label %.lr.ph70.preheader131, label %vector.ph112

.lr.ph70.preheader131:                            ; preds = %middle.block109, %.lr.ph70.preheader
  %indvars.iv94.ph = phi i64 [ %32, %.lr.ph70.preheader ], [ %ind.end115, %middle.block109 ]
  %.04767.ph = phi i64 [ 0, %.lr.ph70.preheader ], [ %46, %middle.block109 ]
  %.ph = phi i64 [ 0, %.lr.ph70.preheader ], [ %47, %middle.block109 ]
  br label %.lr.ph70

vector.ph112:                                     ; preds = %.lr.ph70.preheader
  %n.vec114 = and i64 %36, 8589934588
  %ind.end115 = add nsw i64 %n.vec114, %32
  br label %vector.body117

vector.body117:                                   ; preds = %vector.body117, %vector.ph112
  %index118 = phi i64 [ 0, %vector.ph112 ], [ %index.next127, %vector.body117 ]
  %vec.phi = phi <2 x i64> [ zeroinitializer, %vector.ph112 ], [ %43, %vector.body117 ]
  %vec.phi119 = phi <2 x i64> [ zeroinitializer, %vector.ph112 ], [ %44, %vector.body117 ]
  %vec.phi120 = phi <2 x i64> [ zeroinitializer, %vector.ph112 ], [ %39, %vector.body117 ]
  %vec.phi121 = phi <2 x i64> [ zeroinitializer, %vector.ph112 ], [ %40, %vector.body117 ]
  %offset.idx122 = add i64 %index118, %32
  %37 = getelementptr inbounds [50 x i64], ptr getelementptr inbounds (i8, ptr @dp_num, i64 19600), i64 0, i64 %offset.idx122
  %38 = getelementptr inbounds i8, ptr %37, i64 16
  %wide.load123 = load <2 x i64>, ptr %37, align 8, !tbaa !9
  %wide.load124 = load <2 x i64>, ptr %38, align 8, !tbaa !9
  %39 = add <2 x i64> %vec.phi120, %wide.load123
  %40 = add <2 x i64> %vec.phi121, %wide.load124
  %41 = getelementptr inbounds [50 x i64], ptr getelementptr inbounds (i8, ptr @dp_den, i64 19600), i64 0, i64 %offset.idx122
  %42 = getelementptr inbounds i8, ptr %41, i64 16
  %wide.load125 = load <2 x i64>, ptr %41, align 8, !tbaa !9
  %wide.load126 = load <2 x i64>, ptr %42, align 8, !tbaa !9
  %43 = add <2 x i64> %wide.load125, %vec.phi
  %44 = add <2 x i64> %wide.load126, %vec.phi119
  %index.next127 = add nuw i64 %index118, 4
  %45 = icmp eq i64 %index.next127, %n.vec114
  br i1 %45, label %middle.block109, label %vector.body117, !llvm.loop !13

middle.block109:                                  ; preds = %vector.body117
  %bin.rdx = add <2 x i64> %44, %43
  %46 = call i64 @llvm.vector.reduce.add.v2i64(<2 x i64> %bin.rdx)
  %bin.rdx128 = add <2 x i64> %40, %39
  %47 = call i64 @llvm.vector.reduce.add.v2i64(<2 x i64> %bin.rdx128)
  %cmp.n129 = icmp eq i64 %36, %n.vec114
  br i1 %cmp.n129, label %._crit_edge71, label %.lr.ph70.preheader131

48:                                               ; preds = %._crit_edge, %.loopexit
  %indvars.iv88 = phi i64 [ 1, %._crit_edge ], [ %indvars.iv.next89, %.loopexit ]
  %indvars.iv86 = phi i64 [ 2, %._crit_edge ], [ %indvars.iv.next87, %.loopexit ]
  %49 = getelementptr inbounds [50 x [50 x i64]], ptr @dp_den, i64 0, i64 %indvars.iv88
  store i64 1, ptr %49, align 16, !tbaa !9
  %50 = getelementptr inbounds [50 x i64], ptr @cnt, i64 0, i64 %indvars.iv88
  %51 = load i64, ptr %50, align 8, !tbaa !9
  %52 = icmp eq i64 %51, 0
  %53 = add nsw i64 %indvars.iv88, -1
  br i1 %52, label %.preheader.preheader, label %.preheader60

.preheader.preheader:                             ; preds = %48
  %min.iters.check = icmp ult i64 %indvars.iv88, 4
  br i1 %min.iters.check, label %.preheader.preheader138, label %vector.ph

.preheader.preheader138:                          ; preds = %middle.block, %.preheader.preheader
  %indvars.iv81.ph = phi i64 [ 1, %.preheader.preheader ], [ %ind.end, %middle.block ]
  br label %.preheader

vector.ph:                                        ; preds = %.preheader.preheader
  %n.vec = and i64 %indvars.iv88, 9223372036854775804
  %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
  %54 = getelementptr inbounds [50 x [50 x i64]], ptr @dp_num, i64 0, i64 %53, i64 %offset.idx
  %55 = getelementptr inbounds i8, ptr %54, i64 16
  %wide.load = load <2 x i64>, ptr %54, align 8, !tbaa !9
  %wide.load106 = load <2 x i64>, ptr %55, align 8, !tbaa !9
  %56 = getelementptr inbounds [50 x [50 x i64]], ptr @dp_num, i64 0, i64 %indvars.iv88, i64 %offset.idx
  %57 = getelementptr inbounds i8, ptr %56, i64 16
  store <2 x i64> %wide.load, ptr %56, align 8, !tbaa !9
  store <2 x i64> %wide.load106, ptr %57, align 8, !tbaa !9
  %58 = getelementptr inbounds [50 x [50 x i64]], ptr @dp_den, i64 0, i64 %53, i64 %offset.idx
  %59 = getelementptr inbounds i8, ptr %58, i64 16
  %wide.load107 = load <2 x i64>, ptr %58, align 8, !tbaa !9
  %wide.load108 = load <2 x i64>, ptr %59, align 8, !tbaa !9
  %60 = getelementptr inbounds [50 x [50 x i64]], ptr @dp_den, i64 0, i64 %indvars.iv88, i64 %offset.idx
  %61 = getelementptr inbounds i8, ptr %60, i64 16
  store <2 x i64> %wide.load107, ptr %60, align 8, !tbaa !9
  store <2 x i64> %wide.load108, ptr %61, align 8, !tbaa !9
  %index.next = add nuw i64 %index, 4
  %62 = icmp eq i64 %index.next, %n.vec
  br i1 %62, label %middle.block, label %vector.body, !llvm.loop !16

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %indvars.iv88, %n.vec
  br i1 %cmp.n, label %.loopexit, label %.preheader.preheader138

.preheader60:                                     ; preds = %48
  %63 = add nsw i64 %51, -1
  %64 = getelementptr inbounds [50 x i64], ptr @sum, i64 0, i64 %indvars.iv88
  %65 = load i64, ptr %64, align 8, !tbaa !9
  %66 = shl i64 %65, %63
  %.phi.trans.insert = getelementptr inbounds [50 x [50 x i64]], ptr @dp_den, i64 0, i64 %53, i64 0
  %.pre = load i64, ptr %.phi.trans.insert, align 16, !tbaa !9
  %.phi.trans.insert98 = getelementptr inbounds [50 x [50 x i64]], ptr @dp_num, i64 0, i64 %53, i64 0
  %.pre99 = load i64, ptr %.phi.trans.insert98, align 16, !tbaa !9
  br label %73

.preheader:                                       ; preds = %.preheader.preheader138, %.preheader
  %indvars.iv81 = phi i64 [ %indvars.iv.next82, %.preheader ], [ %indvars.iv81.ph, %.preheader.preheader138 ]
  %67 = getelementptr inbounds [50 x [50 x i64]], ptr @dp_num, i64 0, i64 %53, i64 %indvars.iv81
  %68 = load i64, ptr %67, align 8, !tbaa !9
  %69 = getelementptr inbounds [50 x [50 x i64]], ptr @dp_num, i64 0, i64 %indvars.iv88, i64 %indvars.iv81
  store i64 %68, ptr %69, align 8, !tbaa !9
  %70 = getelementptr inbounds [50 x [50 x i64]], ptr @dp_den, i64 0, i64 %53, i64 %indvars.iv81
  %71 = load i64, ptr %70, align 8, !tbaa !9
  %72 = getelementptr inbounds [50 x [50 x i64]], ptr @dp_den, i64 0, i64 %indvars.iv88, i64 %indvars.iv81
  store i64 %71, ptr %72, align 8, !tbaa !9
  %indvars.iv.next82 = add nuw nsw i64 %indvars.iv81, 1
  %exitcond85.not = icmp eq i64 %indvars.iv.next82, %indvars.iv86
  br i1 %exitcond85.not, label %.loopexit, label %.preheader, !llvm.loop !17

73:                                               ; preds = %.preheader60, %73
  %74 = phi i64 [ %.pre99, %.preheader60 ], [ %82, %73 ]
  %75 = phi i64 [ %.pre, %.preheader60 ], [ %77, %73 ]
  %indvars.iv = phi i64 [ 1, %.preheader60 ], [ %indvars.iv.next, %73 ]
  %76 = getelementptr inbounds [50 x [50 x i64]], ptr @dp_den, i64 0, i64 %53, i64 %indvars.iv
  %77 = load i64, ptr %76, align 8, !tbaa !9
  %.fr = freeze i64 %75
  %mulshl = shl i64 %.fr, %51
  %78 = sub i64 %77, %.fr
  %79 = add i64 %78, %mulshl
  %80 = getelementptr inbounds [50 x [50 x i64]], ptr @dp_den, i64 0, i64 %indvars.iv88, i64 %indvars.iv
  store i64 %79, ptr %80, align 8, !tbaa !9
  %81 = getelementptr inbounds [50 x [50 x i64]], ptr @dp_num, i64 0, i64 %53, i64 %indvars.iv
  %82 = load i64, ptr %81, align 8, !tbaa !9
  %.fr56 = freeze i64 %74
  %mulshl57 = shl i64 %.fr56, %51
  %83 = mul nsw i64 %66, %.fr
  %84 = sub i64 %82, %.fr56
  %85 = add i64 %84, %mulshl57
  %86 = add nsw i64 %85, %83
  %87 = getelementptr inbounds [50 x [50 x i64]], ptr @dp_num, i64 0, i64 %indvars.iv88, i64 %indvars.iv
  store i64 %86, ptr %87, align 8, !tbaa !9
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %indvars.iv86
  br i1 %exitcond.not, label %.loopexit, label %73, !llvm.loop !18

.loopexit:                                        ; preds = %73, %.preheader, %middle.block
  %indvars.iv.next89 = add nuw nsw i64 %indvars.iv88, 1
  %indvars.iv.next87 = add nuw nsw i64 %indvars.iv86, 1
  %exitcond93.not = icmp eq i64 %indvars.iv.next89, 50
  br i1 %exitcond93.not, label %29, label %48, !llvm.loop !19

._crit_edge71:                                    ; preds = %.lr.ph70, %middle.block109, %29
  %.lcssa = phi i64 [ 0, %29 ], [ %47, %middle.block109 ], [ %92, %.lr.ph70 ]
  %.047.lcssa = phi i64 [ 0, %29 ], [ %46, %middle.block109 ], [ %95, %.lr.ph70 ]
  store i64 %.lcssa, ptr %6, align 8, !tbaa !9
  %88 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @__FUNCTION__._Z5solvev)
          to label %96 unwind label %109

.lr.ph70:                                         ; preds = %.lr.ph70.preheader131, %.lr.ph70
  %indvars.iv94 = phi i64 [ %indvars.iv.next95, %.lr.ph70 ], [ %indvars.iv94.ph, %.lr.ph70.preheader131 ]
  %.04767 = phi i64 [ %95, %.lr.ph70 ], [ %.04767.ph, %.lr.ph70.preheader131 ]
  %89 = phi i64 [ %92, %.lr.ph70 ], [ %.ph, %.lr.ph70.preheader131 ]
  %90 = getelementptr inbounds [50 x i64], ptr getelementptr inbounds (i8, ptr @dp_num, i64 19600), i64 0, i64 %indvars.iv94
  %91 = load i64, ptr %90, align 8, !tbaa !9
  %92 = add nsw i64 %89, %91
  %93 = getelementptr inbounds [50 x i64], ptr getelementptr inbounds (i8, ptr @dp_den, i64 19600), i64 0, i64 %indvars.iv94
  %94 = load i64, ptr %93, align 8, !tbaa !9
  %95 = add nsw i64 %94, %.04767
  %indvars.iv.next95 = add nsw i64 %indvars.iv94, 1
  %lftr.wideiv = trunc i64 %indvars.iv.next95 to i32
  %exitcond97.not = icmp eq i32 %33, %lftr.wideiv
  br i1 %exitcond97.not, label %._crit_edge71, label %.lr.ph70, !llvm.loop !20

96:                                               ; preds = %._crit_edge71
  %97 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %88, i8 noundef signext 32)
          to label %98 unwind label %109

98:                                               ; preds = %96
  %99 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %97, i32 noundef 96)
          to label %100 unwind label %109

100:                                              ; preds = %98
  %101 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %99, ptr noundef nonnull @.str.1)
          to label %102 unwind label %109

102:                                              ; preds = %100
  invoke void @_Z5traceIRxJS0_S0_S0_EEvPKcOT_DpOT0_(ptr noundef nonnull @.str.2, ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) getelementptr inbounds (i8, ptr @dp_num, i64 408), ptr noundef nonnull align 8 dereferenceable(8) getelementptr inbounds (i8, ptr @sum, i64 8), ptr noundef nonnull align 8 dereferenceable(8) getelementptr inbounds (i8, ptr @cnt, i64 8))
          to label %103 unwind label %109

103:                                              ; preds = %102
  %104 = load i64, ptr %6, align 8, !tbaa !9
  %105 = icmp sgt i64 %104, -1
  %106 = icmp sgt i64 %.047.lcssa, 0
  %107 = select i1 %105, i1 %106, i1 false
  br i1 %107, label %111, label %108

108:                                              ; preds = %103
  call void @__assert_fail(ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.4, i32 noundef 98, ptr noundef nonnull @__PRETTY_FUNCTION__._Z5solvev) #10
  unreachable

109:                                              ; preds = %102, %100, %98, %96, %._crit_edge71
  %110 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #9
  br label %116

111:                                              ; preds = %103
  %112 = uitofp nneg i64 %104 to double
  %113 = uitofp nneg i64 %.047.lcssa to double
  %114 = fdiv double %112, %113
  %115 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, double noundef %114)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #9
  call void @_ZNSt3setIiSt4lessIiESaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %3) #9
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %3) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #9
  ret void

116:                                              ; preds = %109, %27
  %.pn = phi { ptr, i32 } [ %28, %27 ], [ %110, %109 ]
  call void @_ZNSt3setIiSt4lessIiESaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %3) #9
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %3) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #9
  resume { ptr, i32 } %.pn
}

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

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

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #0 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 i64 @_ZNKSt3setIiSt4lessIiESaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #3 align 2

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

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

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #6

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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #7

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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.vector.reduce.add.v2i64(<2 x i64>) #8

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 = { 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 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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #5 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { "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 = { noreturn 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 #8 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #9 = { nounwind }
attributes #10 = { noreturn nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long long", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12, !14, !15}
!14 = !{!"llvm.loop.isvectorized", i32 1}
!15 = !{!"llvm.loop.unroll.runtime.disable"}
!16 = distinct !{!16, !12, !14, !15}
!17 = distinct !{!17, !12, !15, !14}
!18 = distinct !{!18, !12}
!19 = distinct !{!19, !12}
!20 = distinct !{!20, !12, !15, !14}


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