; LLVM IR from VastoLorde95/Competitive-Programming :: Hackerrank/101 Hacks/101 Hack 2015/101 Hack May/Problem D (D)

; 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, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.std::pair" = type { i32, i32 }

@t = external dso_local global i32, align 4
@n = external dso_local global i32, align 4
@k = external dso_local global i32, align 4
@u = external dso_local global i32, align 4
@v = external dso_local global i32, align 4
@w = external dso_local global i32, align 4
@d = external dso_local global [51 x i64], align 16
@inf = external dso_local global i64, align 8
@adj = external dso_local global [51 x %"class.std::vector"], align 16
@ans = external dso_local global double, align 8
@p = external dso_local global [51 x [51 x double]], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [7 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z3bfsiix(i32 noundef, i32 noundef, i64 noundef) #0

; 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 noundef i64 @_ZNKSt6vectorISt4pairIiiESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #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 norecurse uwtable
define dso_local noundef i32 @main() #3 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca %"struct.std::pair", align 4
  %8 = alloca %"struct.std::pair", align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %13 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @t)
  br label %14

14:                                               ; preds = %190, %0
  %15 = load i32, ptr @t, align 4, !tbaa !5
  %16 = add nsw i32 %15, -1
  store i32 %16, ptr @t, align 4, !tbaa !5
  %17 = icmp ne i32 %15, 0
  br i1 %17, label %18, label %193

18:                                               ; preds = %14
  %19 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.2, ptr noundef @n, ptr noundef @k)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  store i32 0, ptr %2, align 4, !tbaa !5
  br label %20

20:                                               ; preds = %33, %18
  %21 = load i32, ptr %2, align 4, !tbaa !5
  %22 = load i32, ptr @n, align 4, !tbaa !5
  %23 = icmp sle i32 %21, %22
  br i1 %23, label %25, label %24

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

25:                                               ; preds = %20
  %26 = load i32, ptr %2, align 4, !tbaa !5
  %27 = sext i32 %26 to i64
  %28 = getelementptr inbounds [51 x %"class.std::vector"], ptr @adj, i64 0, i64 %27
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %28) #6
  %29 = load i64, ptr @inf, align 8, !tbaa !9
  %30 = load i32, ptr %2, align 4, !tbaa !5
  %31 = sext i32 %30 to i64
  %32 = getelementptr inbounds [51 x i64], ptr @d, i64 0, i64 %31
  store i64 %29, ptr %32, align 8, !tbaa !9
  br label %33

33:                                               ; preds = %25
  %34 = load i32, ptr %2, align 4, !tbaa !5
  %35 = add nsw i32 %34, 1
  store i32 %35, ptr %2, align 4, !tbaa !5
  br label %20, !llvm.loop !11

36:                                               ; preds = %24
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  store i32 1, ptr %3, align 4, !tbaa !5
  br label %37

37:                                               ; preds = %59, %36
  %38 = load i32, ptr %3, align 4, !tbaa !5
  %39 = load i32, ptr @k, align 4, !tbaa !5
  %40 = icmp sle i32 %38, %39
  br i1 %40, label %42, label %41

41:                                               ; preds = %37
  store i32 7, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  br label %62

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

43:                                               ; preds = %55, %42
  %44 = load i32, ptr %5, align 4, !tbaa !5
  %45 = load i32, ptr @n, align 4, !tbaa !5
  %46 = icmp sle i32 %44, %45
  br i1 %46, label %48, label %47

47:                                               ; preds = %43
  store i32 10, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  br label %58

48:                                               ; preds = %43
  %49 = load i32, ptr %3, align 4, !tbaa !5
  %50 = sext i32 %49 to i64
  %51 = getelementptr inbounds [51 x [51 x double]], ptr @p, i64 0, i64 %50
  %52 = load i32, ptr %5, align 4, !tbaa !5
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds [51 x double], ptr %51, i64 0, i64 %53
  store double 0.000000e+00, ptr %54, align 8, !tbaa !13
  br label %55

55:                                               ; preds = %48
  %56 = load i32, ptr %5, align 4, !tbaa !5
  %57 = add nsw i32 %56, 1
  store i32 %57, ptr %5, align 4, !tbaa !5
  br label %43, !llvm.loop !15

58:                                               ; preds = %47
  br label %59

59:                                               ; preds = %58
  %60 = load i32, ptr %3, align 4, !tbaa !5
  %61 = add nsw i32 %60, 1
  store i32 %61, ptr %3, align 4, !tbaa !5
  br label %37, !llvm.loop !16

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

63:                                               ; preds = %78, %62
  %64 = load i32, ptr %6, align 4, !tbaa !5
  %65 = load i32, ptr @n, align 4, !tbaa !5
  %66 = icmp slt i32 %64, %65
  br i1 %66, label %68, label %67

67:                                               ; preds = %63
  store i32 13, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  br label %81

68:                                               ; preds = %63
  %69 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.3, ptr noundef @u, ptr noundef @v, ptr noundef @w)
  %70 = load i32, ptr @u, align 4, !tbaa !5
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds [51 x %"class.std::vector"], ptr @adj, i64 0, i64 %71
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  %73 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) @v, ptr noundef nonnull align 4 dereferenceable(4) @w)
  store i64 %73, ptr %7, align 4
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %72, ptr noundef nonnull align 4 dereferenceable(8) %7)
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  %74 = load i32, ptr @v, align 4, !tbaa !5
  %75 = sext i32 %74 to i64
  %76 = getelementptr inbounds [51 x %"class.std::vector"], ptr @adj, i64 0, i64 %75
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  %77 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) @u, ptr noundef nonnull align 4 dereferenceable(4) @w)
  store i64 %77, ptr %8, align 4
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %76, ptr noundef nonnull align 4 dereferenceable(8) %8)
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  br label %78

78:                                               ; preds = %68
  %79 = load i32, ptr %6, align 4, !tbaa !5
  %80 = add nsw i32 %79, 1
  store i32 %80, ptr %6, align 4, !tbaa !5
  br label %63, !llvm.loop !17

81:                                               ; preds = %67
  store double 0.000000e+00, ptr @ans, align 8, !tbaa !13
  store double 1.000000e+00, ptr getelementptr inbounds ([51 x double], ptr @p, i64 0, i64 1), align 8, !tbaa !13
  call void @_Z3bfsiix(i32 noundef 1, i32 noundef -1, i64 noundef 0)
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  store i32 1, ptr %9, align 4, !tbaa !5
  br label %82

82:                                               ; preds = %153, %81
  %83 = load i32, ptr %9, align 4, !tbaa !5
  %84 = load i32, ptr @k, align 4, !tbaa !5
  %85 = icmp sle i32 %83, %84
  br i1 %85, label %87, label %86

86:                                               ; preds = %82
  store i32 16, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  br label %156

87:                                               ; preds = %82
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  store i32 1, ptr %10, align 4, !tbaa !5
  br label %88

88:                                               ; preds = %149, %87
  %89 = load i32, ptr %10, align 4, !tbaa !5
  %90 = load i32, ptr @n, align 4, !tbaa !5
  %91 = icmp sle i32 %89, %90
  br i1 %91, label %93, label %92

92:                                               ; preds = %88
  store i32 19, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  br label %152

93:                                               ; preds = %88
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  store i32 0, ptr %11, align 4, !tbaa !5
  br label %94

94:                                               ; preds = %145, %93
  %95 = load i32, ptr %11, align 4, !tbaa !5
  %96 = sext i32 %95 to i64
  %97 = load i32, ptr %10, align 4, !tbaa !5
  %98 = sext i32 %97 to i64
  %99 = getelementptr inbounds [51 x %"class.std::vector"], ptr @adj, i64 0, i64 %98
  %100 = call noundef i64 @_ZNKSt6vectorISt4pairIiiESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %99) #6
  %101 = icmp ult i64 %96, %100
  br i1 %101, label %103, label %102

102:                                              ; preds = %94
  store i32 22, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  br label %148

103:                                              ; preds = %94
  %104 = load i32, ptr %10, align 4, !tbaa !5
  %105 = sext i32 %104 to i64
  %106 = getelementptr inbounds [51 x %"class.std::vector"], ptr @adj, i64 0, i64 %105
  %107 = load i32, ptr %11, align 4, !tbaa !5
  %108 = sext i32 %107 to i64
  %109 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %106, i64 noundef %108) #6
  %110 = getelementptr inbounds %"struct.std::pair", ptr %109, i32 0, i32 0
  %111 = load i32, ptr %110, align 4, !tbaa !18
  store i32 %111, ptr @v, align 4, !tbaa !5
  %112 = load i32, ptr %9, align 4, !tbaa !5
  %113 = sub nsw i32 %112, 1
  %114 = sext i32 %113 to i64
  %115 = getelementptr inbounds [51 x [51 x double]], ptr @p, i64 0, i64 %114
  %116 = load i32, ptr @v, align 4, !tbaa !5
  %117 = sext i32 %116 to i64
  %118 = getelementptr inbounds [51 x double], ptr %115, i64 0, i64 %117
  %119 = load double, ptr %118, align 8, !tbaa !13
  %120 = fcmp une double %119, 0.000000e+00
  br i1 %120, label %121, label %144

121:                                              ; preds = %103
  %122 = load i32, ptr %9, align 4, !tbaa !5
  %123 = sub nsw i32 %122, 1
  %124 = sext i32 %123 to i64
  %125 = getelementptr inbounds [51 x [51 x double]], ptr @p, i64 0, i64 %124
  %126 = load i32, ptr @v, align 4, !tbaa !5
  %127 = sext i32 %126 to i64
  %128 = getelementptr inbounds [51 x double], ptr %125, i64 0, i64 %127
  %129 = load double, ptr %128, align 8, !tbaa !13
  %130 = load i32, ptr @v, align 4, !tbaa !5
  %131 = sext i32 %130 to i64
  %132 = getelementptr inbounds [51 x %"class.std::vector"], ptr @adj, i64 0, i64 %131
  %133 = call noundef i64 @_ZNKSt6vectorISt4pairIiiESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %132) #6
  %134 = uitofp i64 %133 to double
  %135 = fdiv double %129, %134
  %136 = load i32, ptr %9, align 4, !tbaa !5
  %137 = sext i32 %136 to i64
  %138 = getelementptr inbounds [51 x [51 x double]], ptr @p, i64 0, i64 %137
  %139 = load i32, ptr %10, align 4, !tbaa !5
  %140 = sext i32 %139 to i64
  %141 = getelementptr inbounds [51 x double], ptr %138, i64 0, i64 %140
  %142 = load double, ptr %141, align 8, !tbaa !13
  %143 = fadd double %142, %135
  store double %143, ptr %141, align 8, !tbaa !13
  br label %144

144:                                              ; preds = %121, %103
  br label %145

145:                                              ; preds = %144
  %146 = load i32, ptr %11, align 4, !tbaa !5
  %147 = add nsw i32 %146, 1
  store i32 %147, ptr %11, align 4, !tbaa !5
  br label %94, !llvm.loop !20

148:                                              ; preds = %102
  br label %149

149:                                              ; preds = %148
  %150 = load i32, ptr %10, align 4, !tbaa !5
  %151 = add nsw i32 %150, 1
  store i32 %151, ptr %10, align 4, !tbaa !5
  br label %88, !llvm.loop !21

152:                                              ; preds = %92
  br label %153

153:                                              ; preds = %152
  %154 = load i32, ptr %9, align 4, !tbaa !5
  %155 = add nsw i32 %154, 1
  store i32 %155, ptr %9, align 4, !tbaa !5
  br label %82, !llvm.loop !22

156:                                              ; preds = %86
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  store i32 1, ptr %12, align 4, !tbaa !5
  br label %157

157:                                              ; preds = %187, %156
  %158 = load i32, ptr %12, align 4, !tbaa !5
  %159 = load i32, ptr @n, align 4, !tbaa !5
  %160 = icmp sle i32 %158, %159
  br i1 %160, label %162, label %161

161:                                              ; preds = %157
  store i32 25, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  br label %190

162:                                              ; preds = %157
  %163 = load i32, ptr @k, align 4, !tbaa !5
  %164 = sext i32 %163 to i64
  %165 = getelementptr inbounds [51 x [51 x double]], ptr @p, i64 0, i64 %164
  %166 = load i32, ptr %12, align 4, !tbaa !5
  %167 = sext i32 %166 to i64
  %168 = getelementptr inbounds [51 x double], ptr %165, i64 0, i64 %167
  %169 = load double, ptr %168, align 8, !tbaa !13
  %170 = fcmp ogt double %169, 0.000000e+00
  br i1 %170, label %171, label %186

171:                                              ; preds = %162
  %172 = load i32, ptr %12, align 4, !tbaa !5
  %173 = sext i32 %172 to i64
  %174 = getelementptr inbounds [51 x i64], ptr @d, i64 0, i64 %173
  %175 = load i64, ptr %174, align 8, !tbaa !9
  %176 = sitofp i64 %175 to double
  %177 = load i32, ptr @k, align 4, !tbaa !5
  %178 = sext i32 %177 to i64
  %179 = getelementptr inbounds [51 x [51 x double]], ptr @p, i64 0, i64 %178
  %180 = load i32, ptr %12, align 4, !tbaa !5
  %181 = sext i32 %180 to i64
  %182 = getelementptr inbounds [51 x double], ptr %179, i64 0, i64 %181
  %183 = load double, ptr %182, align 8, !tbaa !13
  %184 = load double, ptr @ans, align 8, !tbaa !13
  %185 = call double @llvm.fmuladd.f64(double %176, double %183, double %184)
  store double %185, ptr @ans, align 8, !tbaa !13
  br label %186

186:                                              ; preds = %171, %162
  br label %187

187:                                              ; preds = %186
  %188 = load i32, ptr %12, align 4, !tbaa !5
  %189 = add nsw i32 %188, 1
  store i32 %189, ptr %12, align 4, !tbaa !5
  br label %157, !llvm.loop !23

190:                                              ; preds = %161
  %191 = load double, ptr @ans, align 8, !tbaa !13
  %192 = call i32 (ptr, ...) @printf(ptr noundef @.str.4, double noundef %191)
  br label %14, !llvm.loop !24

193:                                              ; preds = %14
  ret i32 0
}

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__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: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #5

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

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

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

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


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

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

@t = external dso_local global i32, align 4
@n = external dso_local global i32, align 4
@k = external dso_local global i32, align 4
@u = external dso_local global i32, align 4
@v = external dso_local global i32, align 4
@w = external dso_local global i32, align 4
@d = external dso_local local_unnamed_addr global [51 x i64], align 16
@inf = external dso_local local_unnamed_addr global i64, align 8
@adj = external dso_local global [51 x %"class.std::vector"], align 16
@ans = external dso_local local_unnamed_addr global double, align 8
@p = external dso_local local_unnamed_addr global [51 x [51 x double]], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [7 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z3bfsiix(i32 noundef, i32 noundef, i64 noundef) local_unnamed_addr #0

; 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 noundef i64 @_ZNKSt6vectorISt4pairIiiESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) 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 norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #3 {
  %1 = alloca %"struct.std::pair", align 8
  %2 = alloca %"struct.std::pair", align 8
  %3 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @t)
  %4 = load i32, ptr @t, align 4, !tbaa !5
  %5 = add nsw i32 %4, -1
  store i32 %5, ptr @t, align 4, !tbaa !5
  %.not75 = icmp eq i32 %4, 0
  br i1 %.not75, label %._crit_edge78, label %.lr.ph77

.lr.ph77:                                         ; preds = %0, %._crit_edge74
  %6 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.2, ptr noundef nonnull @n, ptr noundef nonnull @k)
  %7 = load i32, ptr @n, align 4, !tbaa !5
  %.not4052 = icmp slt i32 %7, 0
  br i1 %.not4052, label %.preheader50, label %.lr.ph

.preheader50:                                     ; preds = %.lr.ph, %.lr.ph77
  %8 = phi i32 [ %7, %.lr.ph77 ], [ %16, %.lr.ph ]
  %9 = load i32, ptr @k, align 4, !tbaa !5
  %.not4157 = icmp slt i32 %9, 1
  br i1 %.not4157, label %.preheader49, label %.preheader47.lr.ph

.preheader47.lr.ph:                               ; preds = %.preheader50
  %.not4554 = icmp slt i32 %8, 1
  br i1 %.not4554, label %._crit_edge61, label %.preheader47.preheader

.preheader47.preheader:                           ; preds = %.preheader47.lr.ph
  %10 = zext nneg i32 %8 to i64
  %11 = shl nuw nsw i64 %10, 3
  %wide.trip.count = zext nneg i32 %9 to i64
  %xtraiter = and i64 %wide.trip.count, 7
  %12 = icmp ult i32 %9, 8
  br i1 %12, label %.preheader49.loopexit.unr-lcssa, label %.preheader47.preheader.new

.preheader47.preheader.new:                       ; preds = %.preheader47.preheader
  %unroll_iter = and i64 %wide.trip.count, 2147483640
  br label %.preheader47

.lr.ph:                                           ; preds = %.lr.ph77, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %.lr.ph77 ]
  %13 = getelementptr inbounds [51 x %"class.std::vector"], ptr @adj, i64 0, i64 %indvars.iv
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %13) #7
  %14 = load i64, ptr @inf, align 8, !tbaa !9
  %15 = getelementptr inbounds [51 x i64], ptr @d, i64 0, i64 %indvars.iv
  store i64 %14, ptr %15, align 8, !tbaa !9
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %16 = load i32, ptr @n, align 4, !tbaa !5
  %17 = sext i32 %16 to i64
  %.not40.not = icmp slt i64 %indvars.iv, %17
  br i1 %.not40.not, label %.lr.ph, label %.preheader50, !llvm.loop !11

.preheader49.loopexit.unr-lcssa:                  ; preds = %.preheader47, %.preheader47.preheader
  %indvar.unr = phi i64 [ 0, %.preheader47.preheader ], [ %indvar.next.7, %.preheader47 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.preheader49, label %.preheader47.epil

.preheader47.epil:                                ; preds = %.preheader49.loopexit.unr-lcssa, %.preheader47.epil
  %indvar.epil = phi i64 [ %indvar.next.epil, %.preheader47.epil ], [ %indvar.unr, %.preheader49.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.preheader47.epil ], [ 0, %.preheader49.loopexit.unr-lcssa ]
  %18 = mul nuw nsw i64 %indvar.epil, 408
  %gep.epil = getelementptr i8, ptr getelementptr inbounds (i8, ptr @p, i64 416), i64 %18
  call void @llvm.memset.p0.i64(ptr align 8 %gep.epil, i8 0, i64 %11, i1 false), !tbaa !13
  %indvar.next.epil = add nuw nsw i64 %indvar.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %.preheader49, label %.preheader47.epil, !llvm.loop !15

.preheader49:                                     ; preds = %.preheader49.loopexit.unr-lcssa, %.preheader47.epil, %.preheader50
  %19 = icmp sgt i32 %8, 1
  br i1 %19, label %.lr.ph60, label %._crit_edge61

.preheader47:                                     ; preds = %.preheader47, %.preheader47.preheader.new
  %indvar = phi i64 [ 0, %.preheader47.preheader.new ], [ %indvar.next.7, %.preheader47 ]
  %niter = phi i64 [ 0, %.preheader47.preheader.new ], [ %niter.next.7, %.preheader47 ]
  %20 = mul nuw nsw i64 %indvar, 408
  %gep = getelementptr i8, ptr getelementptr inbounds (i8, ptr @p, i64 416), i64 %20
  call void @llvm.memset.p0.i64(ptr align 16 %gep, i8 0, i64 %11, i1 false), !tbaa !13
  %21 = mul nuw i64 %indvar, 408
  %gep128 = getelementptr i8, ptr getelementptr (i8, ptr getelementptr inbounds (i8, ptr @p, i64 416), i64 408), i64 %21
  call void @llvm.memset.p0.i64(ptr align 8 %gep128, i8 0, i64 %11, i1 false), !tbaa !13
  %22 = mul nuw i64 %indvar, 408
  %gep129 = getelementptr i8, ptr getelementptr (i8, ptr getelementptr inbounds (i8, ptr @p, i64 416), i64 816), i64 %22
  call void @llvm.memset.p0.i64(ptr align 16 %gep129, i8 0, i64 %11, i1 false), !tbaa !13
  %23 = mul nuw i64 %indvar, 408
  %gep130 = getelementptr i8, ptr getelementptr (i8, ptr getelementptr inbounds (i8, ptr @p, i64 416), i64 1224), i64 %23
  call void @llvm.memset.p0.i64(ptr align 8 %gep130, i8 0, i64 %11, i1 false), !tbaa !13
  %24 = mul nuw i64 %indvar, 408
  %gep131 = getelementptr i8, ptr getelementptr (i8, ptr getelementptr inbounds (i8, ptr @p, i64 416), i64 1632), i64 %24
  call void @llvm.memset.p0.i64(ptr align 16 %gep131, i8 0, i64 %11, i1 false), !tbaa !13
  %25 = mul nuw i64 %indvar, 408
  %gep132 = getelementptr i8, ptr getelementptr (i8, ptr getelementptr inbounds (i8, ptr @p, i64 416), i64 2040), i64 %25
  call void @llvm.memset.p0.i64(ptr align 8 %gep132, i8 0, i64 %11, i1 false), !tbaa !13
  %26 = mul nuw i64 %indvar, 408
  %gep133 = getelementptr i8, ptr getelementptr (i8, ptr getelementptr inbounds (i8, ptr @p, i64 416), i64 2448), i64 %26
  call void @llvm.memset.p0.i64(ptr align 16 %gep133, i8 0, i64 %11, i1 false), !tbaa !13
  %27 = mul nuw i64 %indvar, 408
  %gep134 = getelementptr i8, ptr getelementptr (i8, ptr getelementptr inbounds (i8, ptr @p, i64 416), i64 2856), i64 %27
  call void @llvm.memset.p0.i64(ptr align 8 %gep134, i8 0, i64 %11, i1 false), !tbaa !13
  %indvar.next.7 = add nuw nsw i64 %indvar, 8
  %niter.next.7 = add i64 %niter, 8
  %niter.ncmp.7 = icmp eq i64 %niter.next.7, %unroll_iter
  br i1 %niter.ncmp.7, label %.preheader49.loopexit.unr-lcssa, label %.preheader47, !llvm.loop !17

._crit_edge61:                                    ; preds = %.lr.ph60, %.preheader47.lr.ph, %.preheader49
  store double 0.000000e+00, ptr @ans, align 8, !tbaa !13
  store double 1.000000e+00, ptr getelementptr inbounds (i8, ptr @p, i64 8), align 8, !tbaa !13
  call void @_Z3bfsiix(i32 noundef 1, i32 noundef -1, i64 noundef 0)
  %28 = load i32, ptr @k, align 4, !tbaa !5
  %.not4268 = icmp slt i32 %28, 1
  %.pre102 = load i32, ptr @n, align 4, !tbaa !5
  br i1 %.not4268, label %.preheader48, label %.preheader46.lr.ph

.preheader46.lr.ph:                               ; preds = %._crit_edge61
  %29 = icmp slt i32 %.pre102, 1
  br i1 %29, label %.preheader48.._crit_edge74_crit_edge, label %.preheader46

.lr.ph60:                                         ; preds = %.preheader49, %.lr.ph60
  %.03359 = phi i32 [ %39, %.lr.ph60 ], [ 1, %.preheader49 ]
  %30 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.3, ptr noundef nonnull @u, ptr noundef nonnull @v, ptr noundef nonnull @w)
  %31 = load i32, ptr @u, align 4, !tbaa !5
  %32 = sext i32 %31 to i64
  %33 = getelementptr inbounds [51 x %"class.std::vector"], ptr @adj, i64 0, i64 %32
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #7
  %34 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) @v, ptr noundef nonnull align 4 dereferenceable(4) @w)
  store i64 %34, ptr %1, align 8
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %33, ptr noundef nonnull align 4 dereferenceable(8) %1)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #7
  %35 = load i32, ptr @v, align 4, !tbaa !5
  %36 = sext i32 %35 to i64
  %37 = getelementptr inbounds [51 x %"class.std::vector"], ptr @adj, i64 0, i64 %36
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #7
  %38 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) @u, ptr noundef nonnull align 4 dereferenceable(4) @w)
  store i64 %38, ptr %2, align 8
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %37, ptr noundef nonnull align 4 dereferenceable(8) %2)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #7
  %39 = add nuw nsw i32 %.03359, 1
  %40 = load i32, ptr @n, align 4, !tbaa !5
  %41 = icmp slt i32 %39, %40
  br i1 %41, label %.lr.ph60, label %._crit_edge61, !llvm.loop !18

.preheader48:                                     ; preds = %._crit_edge67, %._crit_edge61
  %42 = phi i32 [ %.pre102, %._crit_edge61 ], [ %53, %._crit_edge67 ]
  %.lcssa51 = phi i32 [ %28, %._crit_edge61 ], [ %52, %._crit_edge67 ]
  %.not4371 = icmp slt i32 %42, 1
  br i1 %.not4371, label %.preheader48.._crit_edge74_crit_edge, label %.lr.ph73

.preheader48.._crit_edge74_crit_edge:             ; preds = %.preheader46.lr.ph, %.preheader48
  %.pre103 = load double, ptr @ans, align 8, !tbaa !13
  br label %._crit_edge74

.lr.ph73:                                         ; preds = %.preheader48
  %ans.promoted = load double, ptr @ans, align 8, !tbaa !13
  %43 = sext i32 %.lcssa51 to i64
  %44 = zext nneg i32 %42 to i64
  %xtraiter118 = and i64 %44, 1
  %45 = icmp eq i32 %42, 1
  br i1 %45, label %._crit_edge74.loopexit.unr-lcssa, label %.lr.ph73.new

.lr.ph73.new:                                     ; preds = %.lr.ph73
  %unroll_iter122 = and i64 %44, 2147483646
  br label %86

.preheader46:                                     ; preds = %.preheader46.lr.ph, %._crit_edge67
  %46 = phi i32 [ %52, %._crit_edge67 ], [ %28, %.preheader46.lr.ph ]
  %47 = phi i32 [ %53, %._crit_edge67 ], [ %.pre102, %.preheader46.lr.ph ]
  %indvars.iv94 = phi i64 [ %indvars.iv.next95, %._crit_edge67 ], [ 1, %.preheader46.lr.ph ]
  %.not4465 = icmp slt i32 %47, 1
  br i1 %.not4465, label %._crit_edge67, label %.preheader.lr.ph

.preheader.lr.ph:                                 ; preds = %.preheader46
  %48 = add nsw i64 %indvars.iv94, -1
  br label %.preheader

.preheader:                                       ; preds = %.preheader.lr.ph, %._crit_edge64
  %indvars.iv91 = phi i64 [ 1, %.preheader.lr.ph ], [ %indvars.iv.next92, %._crit_edge64 ]
  %49 = getelementptr inbounds [51 x %"class.std::vector"], ptr @adj, i64 0, i64 %indvars.iv91
  %50 = call noundef i64 @_ZNKSt6vectorISt4pairIiiESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %49) #7
  %.not79 = icmp eq i64 %50, 0
  br i1 %.not79, label %._crit_edge64, label %.lr.ph63

.lr.ph63:                                         ; preds = %.preheader
  %51 = getelementptr inbounds [51 x [51 x double]], ptr @p, i64 0, i64 %indvars.iv94, i64 %indvars.iv91
  br label %57

._crit_edge67.loopexit:                           ; preds = %._crit_edge64
  %.pre = load i32, ptr @k, align 4, !tbaa !5
  br label %._crit_edge67

._crit_edge67:                                    ; preds = %._crit_edge67.loopexit, %.preheader46
  %52 = phi i32 [ %.pre, %._crit_edge67.loopexit ], [ %46, %.preheader46 ]
  %53 = phi i32 [ %55, %._crit_edge67.loopexit ], [ %47, %.preheader46 ]
  %indvars.iv.next95 = add nuw nsw i64 %indvars.iv94, 1
  %54 = sext i32 %52 to i64
  %.not42.not = icmp slt i64 %indvars.iv94, %54
  br i1 %.not42.not, label %.preheader46, label %.preheader48, !llvm.loop !19

._crit_edge64:                                    ; preds = %71, %.preheader
  %indvars.iv.next92 = add nuw nsw i64 %indvars.iv91, 1
  %55 = load i32, ptr @n, align 4, !tbaa !5
  %56 = sext i32 %55 to i64
  %.not44.not = icmp slt i64 %indvars.iv91, %56
  br i1 %.not44.not, label %.preheader, label %._crit_edge67.loopexit, !llvm.loop !21

57:                                               ; preds = %.lr.ph63, %71
  %indvars.iv88 = phi i64 [ 0, %.lr.ph63 ], [ %indvars.iv.next89, %71 ]
  %58 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %49, i64 noundef %indvars.iv88) #7
  %59 = load i32, ptr %58, align 4, !tbaa !22
  store i32 %59, ptr @v, align 4, !tbaa !5
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds [51 x [51 x double]], ptr @p, i64 0, i64 %48, i64 %60
  %62 = load double, ptr %61, align 8, !tbaa !13
  %63 = fcmp une double %62, 0.000000e+00
  br i1 %63, label %64, label %71

64:                                               ; preds = %57
  %65 = getelementptr inbounds [51 x %"class.std::vector"], ptr @adj, i64 0, i64 %60
  %66 = call noundef i64 @_ZNKSt6vectorISt4pairIiiESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %65) #7
  %67 = uitofp i64 %66 to double
  %68 = fdiv double %62, %67
  %69 = load double, ptr %51, align 8, !tbaa !13
  %70 = fadd double %69, %68
  store double %70, ptr %51, align 8, !tbaa !13
  br label %71

71:                                               ; preds = %57, %64
  %indvars.iv.next89 = add nuw nsw i64 %indvars.iv88, 1
  %72 = call noundef i64 @_ZNKSt6vectorISt4pairIiiESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %49) #7
  %73 = icmp ugt i64 %72, %indvars.iv.next89
  br i1 %73, label %57, label %._crit_edge64, !llvm.loop !24

._crit_edge74.loopexit.unr-lcssa:                 ; preds = %106, %.lr.ph73
  %.lcssa117.ph = phi double [ poison, %.lr.ph73 ], [ %107, %106 ]
  %indvars.iv97.unr = phi i64 [ 1, %.lr.ph73 ], [ %indvars.iv.next98.1, %106 ]
  %.unr = phi double [ %ans.promoted, %.lr.ph73 ], [ %107, %106 ]
  %lcmp.mod120.not = icmp eq i64 %xtraiter118, 0
  br i1 %lcmp.mod120.not, label %._crit_edge74, label %.epil.preheader

.epil.preheader:                                  ; preds = %._crit_edge74.loopexit.unr-lcssa
  %74 = getelementptr inbounds [51 x [51 x double]], ptr @p, i64 0, i64 %43, i64 %indvars.iv97.unr
  %75 = load double, ptr %74, align 8, !tbaa !13
  %76 = fcmp ogt double %75, 0.000000e+00
  br i1 %76, label %77, label %._crit_edge74

77:                                               ; preds = %.epil.preheader
  %78 = getelementptr inbounds [51 x i64], ptr @d, i64 0, i64 %indvars.iv97.unr
  %79 = load i64, ptr %78, align 8, !tbaa !9
  %80 = sitofp i64 %79 to double
  %81 = call double @llvm.fmuladd.f64(double %80, double %75, double %.unr)
  store double %81, ptr @ans, align 8, !tbaa !13
  br label %._crit_edge74

._crit_edge74:                                    ; preds = %._crit_edge74.loopexit.unr-lcssa, %77, %.epil.preheader, %.preheader48.._crit_edge74_crit_edge
  %82 = phi double [ %.pre103, %.preheader48.._crit_edge74_crit_edge ], [ %.lcssa117.ph, %._crit_edge74.loopexit.unr-lcssa ], [ %.unr, %.epil.preheader ], [ %81, %77 ]
  %83 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, double noundef %82)
  %84 = load i32, ptr @t, align 4, !tbaa !5
  %85 = add nsw i32 %84, -1
  store i32 %85, ptr @t, align 4, !tbaa !5
  %.not = icmp eq i32 %84, 0
  br i1 %.not, label %._crit_edge78, label %.lr.ph77, !llvm.loop !25

86:                                               ; preds = %106, %.lr.ph73.new
  %indvars.iv97 = phi i64 [ 1, %.lr.ph73.new ], [ %indvars.iv.next98.1, %106 ]
  %87 = phi double [ %ans.promoted, %.lr.ph73.new ], [ %107, %106 ]
  %niter123 = phi i64 [ 0, %.lr.ph73.new ], [ %niter123.next.1, %106 ]
  %88 = getelementptr inbounds [51 x [51 x double]], ptr @p, i64 0, i64 %43, i64 %indvars.iv97
  %89 = load double, ptr %88, align 8, !tbaa !13
  %90 = fcmp ogt double %89, 0.000000e+00
  br i1 %90, label %91, label %96

91:                                               ; preds = %86
  %92 = getelementptr inbounds [51 x i64], ptr @d, i64 0, i64 %indvars.iv97
  %93 = load i64, ptr %92, align 8, !tbaa !9
  %94 = sitofp i64 %93 to double
  %95 = call double @llvm.fmuladd.f64(double %94, double %89, double %87)
  store double %95, ptr @ans, align 8, !tbaa !13
  br label %96

96:                                               ; preds = %86, %91
  %97 = phi double [ %87, %86 ], [ %95, %91 ]
  %indvars.iv.next98 = add nuw nsw i64 %indvars.iv97, 1
  %98 = getelementptr inbounds [51 x [51 x double]], ptr @p, i64 0, i64 %43, i64 %indvars.iv.next98
  %99 = load double, ptr %98, align 8, !tbaa !13
  %100 = fcmp ogt double %99, 0.000000e+00
  br i1 %100, label %101, label %106

101:                                              ; preds = %96
  %102 = getelementptr inbounds [51 x i64], ptr @d, i64 0, i64 %indvars.iv.next98
  %103 = load i64, ptr %102, align 8, !tbaa !9
  %104 = sitofp i64 %103 to double
  %105 = call double @llvm.fmuladd.f64(double %104, double %99, double %97)
  store double %105, ptr @ans, align 8, !tbaa !13
  br label %106

106:                                              ; preds = %101, %96
  %107 = phi double [ %97, %96 ], [ %105, %101 ]
  %indvars.iv.next98.1 = add nuw nsw i64 %indvars.iv97, 2
  %niter123.next.1 = add i64 %niter123, 2
  %niter123.ncmp.1 = icmp eq i64 %niter123.next.1, %unroll_iter122
  br i1 %niter123.ncmp.1, label %._crit_edge74.loopexit.unr-lcssa, label %86, !llvm.loop !26

._crit_edge78:                                    ; preds = %._crit_edge74, %0
  ret i32 0
}

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__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 nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #5

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

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

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

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

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


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopIdiomRecognizePass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimpleLoopUnswitchPass,SimplifyCFGPass,TailCallElimPass