; LLVM IR from tangjz/acm-icpc :: lydsy (1579)

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

%struct.Edge = type { i32, i32, i32 }
%"class.std::priority_queue" = type <{ %"class.std::vector", [8 x i8] }>
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::pair<long long, int>, std::allocator<std::pair<long long, int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<long long, int>, std::allocator<std::pair<long long, int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<long long, int>, std::allocator<std::pair<long long, int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<long long, int>, std::allocator<std::pair<long long, int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.std::pair" = type <{ i64, i32, [4 x i8] }>

@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@t = external dso_local global i32, align 4
@pre = external dso_local global [210001 x i32], align 16
@dis = external dso_local global [210001 x i64], align 16
@ans = external dso_local global i64, align 8
@vis = external dso_local global [210001 x i8], align 16
@e = external dso_local global [4200004 x %struct.Edge], align 16
@Q = external dso_local global %"class.std::priority_queue", align 8
@.str = external hidden unnamed_addr constant [7 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [6 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_Z7AddEdgeiii(i32 noundef, i32 noundef, i32 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: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #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 %"struct.std::pair", align 8
  %7 = alloca i32, align 4
  %8 = alloca { i64, i32 }, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca %"struct.std::pair", align 8
  %15 = alloca { i64, i32 }, align 8
  %16 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %17 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @n, ptr noundef @m, ptr noundef @t)
  br label %18

18:                                               ; preds = %86, %0
  %19 = load i32, ptr @m, align 4, !tbaa !5
  %20 = add nsw i32 %19, -1
  store i32 %20, ptr @m, align 4, !tbaa !5
  %21 = icmp ne i32 %19, 0
  br i1 %21, label %22, label %87

22:                                               ; preds = %18
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #7
  %23 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %2, ptr noundef %3, ptr noundef %4)
  %24 = load i32, ptr %2, align 4, !tbaa !5
  %25 = add nsw i32 %24, -1
  store i32 %25, ptr %2, align 4, !tbaa !5
  %26 = load i32, ptr %3, align 4, !tbaa !5
  %27 = add nsw i32 %26, -1
  store i32 %27, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #7
  store i32 0, ptr %5, align 4, !tbaa !5
  br label %28

28:                                               ; preds = %83, %22
  %29 = load i32, ptr %5, align 4, !tbaa !5
  %30 = load i32, ptr @t, align 4, !tbaa !5
  %31 = icmp sle i32 %29, %30
  br i1 %31, label %33, label %32

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

33:                                               ; preds = %28
  %34 = load i32, ptr %5, align 4, !tbaa !5
  %35 = load i32, ptr @n, align 4, !tbaa !5
  %36 = mul nsw i32 %34, %35
  %37 = load i32, ptr %2, align 4, !tbaa !5
  %38 = add nsw i32 %36, %37
  %39 = load i32, ptr %5, align 4, !tbaa !5
  %40 = load i32, ptr @n, align 4, !tbaa !5
  %41 = mul nsw i32 %39, %40
  %42 = load i32, ptr %3, align 4, !tbaa !5
  %43 = add nsw i32 %41, %42
  %44 = load i32, ptr %4, align 4, !tbaa !5
  call void @_Z7AddEdgeiii(i32 noundef %38, i32 noundef %43, i32 noundef %44)
  %45 = load i32, ptr %5, align 4, !tbaa !5
  %46 = load i32, ptr @n, align 4, !tbaa !5
  %47 = mul nsw i32 %45, %46
  %48 = load i32, ptr %3, align 4, !tbaa !5
  %49 = add nsw i32 %47, %48
  %50 = load i32, ptr %5, align 4, !tbaa !5
  %51 = load i32, ptr @n, align 4, !tbaa !5
  %52 = mul nsw i32 %50, %51
  %53 = load i32, ptr %2, align 4, !tbaa !5
  %54 = add nsw i32 %52, %53
  %55 = load i32, ptr %4, align 4, !tbaa !5
  call void @_Z7AddEdgeiii(i32 noundef %49, i32 noundef %54, i32 noundef %55)
  %56 = load i32, ptr %5, align 4, !tbaa !5
  %57 = load i32, ptr @t, align 4, !tbaa !5
  %58 = icmp slt i32 %56, %57
  br i1 %58, label %59, label %82

59:                                               ; preds = %33
  %60 = load i32, ptr %5, align 4, !tbaa !5
  %61 = load i32, ptr @n, align 4, !tbaa !5
  %62 = mul nsw i32 %60, %61
  %63 = load i32, ptr %2, align 4, !tbaa !5
  %64 = add nsw i32 %62, %63
  %65 = load i32, ptr %5, align 4, !tbaa !5
  %66 = add nsw i32 %65, 1
  %67 = load i32, ptr @n, align 4, !tbaa !5
  %68 = mul nsw i32 %66, %67
  %69 = load i32, ptr %3, align 4, !tbaa !5
  %70 = add nsw i32 %68, %69
  call void @_Z7AddEdgeiii(i32 noundef %64, i32 noundef %70, i32 noundef 0)
  %71 = load i32, ptr %5, align 4, !tbaa !5
  %72 = load i32, ptr @n, align 4, !tbaa !5
  %73 = mul nsw i32 %71, %72
  %74 = load i32, ptr %3, align 4, !tbaa !5
  %75 = add nsw i32 %73, %74
  %76 = load i32, ptr %5, align 4, !tbaa !5
  %77 = add nsw i32 %76, 1
  %78 = load i32, ptr @n, align 4, !tbaa !5
  %79 = mul nsw i32 %77, %78
  %80 = load i32, ptr %2, align 4, !tbaa !5
  %81 = add nsw i32 %79, %80
  call void @_Z7AddEdgeiii(i32 noundef %75, i32 noundef %81, i32 noundef 0)
  br label %82

82:                                               ; preds = %59, %33
  br label %83

83:                                               ; preds = %82
  %84 = load i32, ptr %5, align 4, !tbaa !5
  %85 = add nsw i32 %84, 1
  store i32 %85, ptr %5, align 4, !tbaa !5
  br label %28, !llvm.loop !9

86:                                               ; preds = %32
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  br label %18, !llvm.loop !11

87:                                               ; preds = %18
  call void @llvm.memset.p0.i64(ptr align 16 @dis, i8 63, i64 1680008, i1 false)
  store i64 0, ptr @dis, align 16, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 16, ptr %6) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  store i32 0, ptr %7, align 4, !tbaa !5
  %88 = call { i64, i32 } @_ZSt9make_pairIRxiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 8 dereferenceable(8) @dis, ptr noundef nonnull align 4 dereferenceable(4) %7)
  store { i64, i32 } %88, ptr %8, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %6, ptr align 8 %8, i64 12, i1 false)
  call void @_ZNSt14priority_queueISt4pairIxiESt6vectorIS1_SaIS1_EESt7greaterIS1_EE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(25) @Q, ptr noundef nonnull align 8 dereferenceable(12) %6)
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %6) #7
  br label %89

89:                                               ; preds = %166, %164, %87
  %90 = call noundef zeroext i1 @_ZNKSt14priority_queueISt4pairIxiESt6vectorIS1_SaIS1_EESt7greaterIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25) @Q)
  %91 = xor i1 %90, true
  br i1 %91, label %92, label %167

92:                                               ; preds = %89
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  %93 = call noundef nonnull align 8 dereferenceable(12) ptr @_ZNKSt14priority_queueISt4pairIxiESt6vectorIS1_SaIS1_EESt7greaterIS1_EE3topEv(ptr noundef nonnull align 8 dereferenceable(25) @Q)
  %94 = getelementptr inbounds %"struct.std::pair", ptr %93, i32 0, i32 1
  %95 = load i32, ptr %94, align 8, !tbaa !14
  store i32 %95, ptr %9, align 4, !tbaa !5
  call void @_ZNSt14priority_queueISt4pairIxiESt6vectorIS1_SaIS1_EESt7greaterIS1_EE3popEv(ptr noundef nonnull align 8 dereferenceable(25) @Q)
  %96 = load i32, ptr %9, align 4, !tbaa !5
  %97 = sext i32 %96 to i64
  %98 = getelementptr inbounds [210001 x i8], ptr @vis, i64 0, i64 %97
  %99 = load i8, ptr %98, align 1, !tbaa !16, !range !18, !noundef !19
  %100 = trunc i8 %99 to i1
  br i1 %100, label %101, label %102

101:                                              ; preds = %92
  store i32 7, ptr %10, align 4
  br label %164, !llvm.loop !20

102:                                              ; preds = %92
  %103 = load i32, ptr %9, align 4, !tbaa !5
  %104 = sext i32 %103 to i64
  %105 = getelementptr inbounds [210001 x i8], ptr @vis, i64 0, i64 %104
  store i8 1, ptr %105, align 1, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  %106 = load i32, ptr %9, align 4, !tbaa !5
  %107 = sext i32 %106 to i64
  %108 = getelementptr inbounds [210001 x i32], ptr @pre, i64 0, i64 %107
  %109 = load i32, ptr %108, align 4, !tbaa !5
  store i32 %109, ptr %11, align 4, !tbaa !5
  br label %110

110:                                              ; preds = %157, %102
  %111 = load i32, ptr %11, align 4, !tbaa !5
  %112 = icmp ne i32 %111, 0
  br i1 %112, label %114, label %113

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

114:                                              ; preds = %110
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  %115 = load i32, ptr %11, align 4, !tbaa !5
  %116 = sext i32 %115 to i64
  %117 = getelementptr inbounds [4200004 x %struct.Edge], ptr @e, i64 0, i64 %116
  %118 = getelementptr inbounds %struct.Edge, ptr %117, i32 0, i32 1
  store ptr %118, ptr %12, align 8, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  %119 = load i32, ptr %11, align 4, !tbaa !5
  %120 = sext i32 %119 to i64
  %121 = getelementptr inbounds [4200004 x %struct.Edge], ptr @e, i64 0, i64 %120
  %122 = getelementptr inbounds %struct.Edge, ptr %121, i32 0, i32 2
  store ptr %122, ptr %13, align 8, !tbaa !21
  %123 = load ptr, ptr %12, align 8, !tbaa !21
  %124 = load i32, ptr %123, align 4, !tbaa !5
  %125 = sext i32 %124 to i64
  %126 = getelementptr inbounds [210001 x i64], ptr @dis, i64 0, i64 %125
  %127 = load i64, ptr %126, align 8, !tbaa !12
  %128 = load i32, ptr %9, align 4, !tbaa !5
  %129 = sext i32 %128 to i64
  %130 = getelementptr inbounds [210001 x i64], ptr @dis, i64 0, i64 %129
  %131 = load i64, ptr %130, align 8, !tbaa !12
  %132 = load ptr, ptr %13, align 8, !tbaa !21
  %133 = load i32, ptr %132, align 4, !tbaa !5
  %134 = sext i32 %133 to i64
  %135 = add nsw i64 %131, %134
  %136 = icmp sgt i64 %127, %135
  br i1 %136, label %137, label %156

137:                                              ; preds = %114
  %138 = load i32, ptr %9, align 4, !tbaa !5
  %139 = sext i32 %138 to i64
  %140 = getelementptr inbounds [210001 x i64], ptr @dis, i64 0, i64 %139
  %141 = load i64, ptr %140, align 8, !tbaa !12
  %142 = load ptr, ptr %13, align 8, !tbaa !21
  %143 = load i32, ptr %142, align 4, !tbaa !5
  %144 = sext i32 %143 to i64
  %145 = add nsw i64 %141, %144
  %146 = load ptr, ptr %12, align 8, !tbaa !21
  %147 = load i32, ptr %146, align 4, !tbaa !5
  %148 = sext i32 %147 to i64
  %149 = getelementptr inbounds [210001 x i64], ptr @dis, i64 0, i64 %148
  store i64 %145, ptr %149, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 16, ptr %14) #7
  %150 = load ptr, ptr %12, align 8, !tbaa !21
  %151 = load i32, ptr %150, align 4, !tbaa !5
  %152 = sext i32 %151 to i64
  %153 = getelementptr inbounds [210001 x i64], ptr @dis, i64 0, i64 %152
  %154 = load ptr, ptr %12, align 8, !tbaa !21
  %155 = call { i64, i32 } @_ZSt9make_pairIRxRiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS3_INS4_IT0_E4typeEE6__typeEEOS5_OSA_(ptr noundef nonnull align 8 dereferenceable(8) %153, ptr noundef nonnull align 4 dereferenceable(4) %154)
  store { i64, i32 } %155, ptr %15, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %14, ptr align 8 %15, i64 12, i1 false)
  call void @_ZNSt14priority_queueISt4pairIxiESt6vectorIS1_SaIS1_EESt7greaterIS1_EE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(25) @Q, ptr noundef nonnull align 8 dereferenceable(12) %14)
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #7
  br label %156

156:                                              ; preds = %137, %114
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  br label %157

157:                                              ; preds = %156
  %158 = load i32, ptr %11, align 4, !tbaa !5
  %159 = sext i32 %158 to i64
  %160 = getelementptr inbounds [4200004 x %struct.Edge], ptr @e, i64 0, i64 %159
  %161 = getelementptr inbounds %struct.Edge, ptr %160, i32 0, i32 0
  %162 = load i32, ptr %161, align 4, !tbaa !23
  store i32 %162, ptr %11, align 4, !tbaa !5
  br label %110, !llvm.loop !25

163:                                              ; preds = %113
  store i32 0, ptr %10, align 4
  br label %164

164:                                              ; preds = %163, %101
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  %165 = load i32, ptr %10, align 4
  switch i32 %165, label %202 [
    i32 0, label %166
    i32 7, label %89
  ]

166:                                              ; preds = %164
  br label %89, !llvm.loop !20

167:                                              ; preds = %89
  store i64 4557430888798830399, ptr @ans, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #7
  store i32 0, ptr %16, align 4, !tbaa !5
  br label %168

168:                                              ; preds = %196, %167
  %169 = load i32, ptr %16, align 4, !tbaa !5
  %170 = load i32, ptr @t, align 4, !tbaa !5
  %171 = icmp sle i32 %169, %170
  br i1 %171, label %173, label %172

172:                                              ; preds = %168
  store i32 12, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  br label %199

173:                                              ; preds = %168
  %174 = load i64, ptr @ans, align 8, !tbaa !12
  %175 = load i32, ptr %16, align 4, !tbaa !5
  %176 = load i32, ptr @n, align 4, !tbaa !5
  %177 = mul nsw i32 %175, %176
  %178 = load i32, ptr @n, align 4, !tbaa !5
  %179 = add nsw i32 %177, %178
  %180 = sub nsw i32 %179, 1
  %181 = sext i32 %180 to i64
  %182 = getelementptr inbounds [210001 x i64], ptr @dis, i64 0, i64 %181
  %183 = load i64, ptr %182, align 8, !tbaa !12
  %184 = icmp sgt i64 %174, %183
  br i1 %184, label %185, label %195

185:                                              ; preds = %173
  %186 = load i32, ptr %16, align 4, !tbaa !5
  %187 = load i32, ptr @n, align 4, !tbaa !5
  %188 = mul nsw i32 %186, %187
  %189 = load i32, ptr @n, align 4, !tbaa !5
  %190 = add nsw i32 %188, %189
  %191 = sub nsw i32 %190, 1
  %192 = sext i32 %191 to i64
  %193 = getelementptr inbounds [210001 x i64], ptr @dis, i64 0, i64 %192
  %194 = load i64, ptr %193, align 8, !tbaa !12
  store i64 %194, ptr @ans, align 8, !tbaa !12
  br label %195

195:                                              ; preds = %185, %173
  br label %196

196:                                              ; preds = %195
  %197 = load i32, ptr %16, align 4, !tbaa !5
  %198 = add nsw i32 %197, 1
  store i32 %198, ptr %16, align 4, !tbaa !5
  br label %168, !llvm.loop !26

199:                                              ; preds = %172
  %200 = load i64, ptr @ans, align 8, !tbaa !12
  %201 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, i64 noundef %200)
  ret i32 0

202:                                              ; preds = %164
  unreachable
}

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt14priority_queueISt4pairIxiESt6vectorIS1_SaIS1_EESt7greaterIS1_EE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(25), ptr noundef nonnull align 8 dereferenceable(12)) #6 align 2

; Function Attrs: mustprogress uwtable
declare dso_local { i64, i32 } @_ZSt9make_pairIRxiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4)) #6

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt14priority_queueISt4pairIxiESt6vectorIS1_SaIS1_EESt7greaterIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25)) #0 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt14priority_queueISt4pairIxiESt6vectorIS1_SaIS1_EESt7greaterIS1_EE3popEv(ptr noundef nonnull align 8 dereferenceable(25)) #6 align 2

; Function Attrs: mustprogress uwtable
declare dso_local { i64, i32 } @_ZSt9make_pairIRxRiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS3_INS4_IT0_E4typeEE6__typeEEOS5_OSA_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4)) #6

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

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


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

%struct.Edge = type { i32, i32, i32 }
%"class.std::priority_queue" = type <{ %"class.std::vector", [8 x i8] }>
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::pair<long long, int>, std::allocator<std::pair<long long, int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<long long, int>, std::allocator<std::pair<long long, int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<long long, int>, std::allocator<std::pair<long long, int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<long long, int>, std::allocator<std::pair<long long, int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.std::pair" = type <{ i64, i32, [4 x i8] }>

@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@t = external dso_local global i32, align 4
@pre = external dso_local local_unnamed_addr global [210001 x i32], align 16
@dis = external dso_local global [210001 x i64], align 16
@ans = external dso_local local_unnamed_addr global i64, align 8
@vis = external dso_local local_unnamed_addr global [210001 x i8], align 16
@e = external dso_local global [4200004 x %struct.Edge], align 16
@Q = external dso_local global %"class.std::priority_queue", align 8
@.str = external hidden unnamed_addr constant [7 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [6 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_Z7AddEdgeiii(i32 noundef, i32 noundef, i32 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 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 #2 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca %"struct.std::pair", align 8
  %5 = alloca i32, align 4
  %6 = alloca %"struct.std::pair", align 8
  %7 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n, ptr noundef nonnull @m, ptr noundef nonnull @t)
  %8 = load i32, ptr @m, align 4, !tbaa !5
  %9 = add nsw i32 %8, -1
  store i32 %9, ptr @m, align 4, !tbaa !5
  %.not42 = icmp eq i32 %8, 0
  br i1 %.not42, label %._crit_edge45, label %.lr.ph44

.lr.ph44:                                         ; preds = %0, %._crit_edge
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #7
  %10 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %1, ptr noundef nonnull %2, ptr noundef nonnull %3)
  %11 = load i32, ptr %1, align 4, !tbaa !5
  %12 = add nsw i32 %11, -1
  store i32 %12, ptr %1, align 4, !tbaa !5
  %13 = load i32, ptr %2, align 4, !tbaa !5
  %14 = add nsw i32 %13, -1
  store i32 %14, ptr %2, align 4, !tbaa !5
  %15 = load i32, ptr @t, align 4, !tbaa !5
  %.not3940 = icmp slt i32 %15, 0
  br i1 %.not3940, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %50, %.lr.ph44
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #7
  %16 = load i32, ptr @m, align 4, !tbaa !5
  %17 = add nsw i32 %16, -1
  store i32 %17, ptr @m, align 4, !tbaa !5
  %.not = icmp eq i32 %16, 0
  br i1 %.not, label %._crit_edge45, label %.lr.ph44, !llvm.loop !9

.lr.ph:                                           ; preds = %.lr.ph44, %50
  %.03341 = phi i32 [ %.pre-phi, %50 ], [ 0, %.lr.ph44 ]
  %18 = load i32, ptr @n, align 4, !tbaa !5
  %19 = mul nsw i32 %18, %.03341
  %20 = load i32, ptr %1, align 4, !tbaa !5
  %21 = add nsw i32 %19, %20
  %22 = load i32, ptr %2, align 4, !tbaa !5
  %23 = add nsw i32 %22, %19
  %24 = load i32, ptr %3, align 4, !tbaa !5
  call void @_Z7AddEdgeiii(i32 noundef %21, i32 noundef %23, i32 noundef %24)
  %25 = load i32, ptr @n, align 4, !tbaa !5
  %26 = mul nsw i32 %25, %.03341
  %27 = load i32, ptr %2, align 4, !tbaa !5
  %28 = add nsw i32 %26, %27
  %29 = load i32, ptr %1, align 4, !tbaa !5
  %30 = add nsw i32 %29, %26
  %31 = load i32, ptr %3, align 4, !tbaa !5
  call void @_Z7AddEdgeiii(i32 noundef %28, i32 noundef %30, i32 noundef %31)
  %32 = load i32, ptr @t, align 4, !tbaa !5
  %33 = icmp slt i32 %.03341, %32
  br i1 %33, label %34, label %.lr.ph._crit_edge

.lr.ph._crit_edge:                                ; preds = %.lr.ph
  %.pre60 = add nuw nsw i32 %.03341, 1
  br label %50

34:                                               ; preds = %.lr.ph
  %35 = load i32, ptr @n, align 4, !tbaa !5
  %36 = mul nsw i32 %35, %.03341
  %37 = load i32, ptr %1, align 4, !tbaa !5
  %38 = add nsw i32 %36, %37
  %39 = add nuw nsw i32 %.03341, 1
  %40 = mul nsw i32 %35, %39
  %41 = load i32, ptr %2, align 4, !tbaa !5
  %42 = add nsw i32 %41, %40
  call void @_Z7AddEdgeiii(i32 noundef %38, i32 noundef %42, i32 noundef 0)
  %43 = load i32, ptr @n, align 4, !tbaa !5
  %44 = mul nsw i32 %43, %.03341
  %45 = load i32, ptr %2, align 4, !tbaa !5
  %46 = add nsw i32 %44, %45
  %47 = mul nsw i32 %43, %39
  %48 = load i32, ptr %1, align 4, !tbaa !5
  %49 = add nsw i32 %48, %47
  call void @_Z7AddEdgeiii(i32 noundef %46, i32 noundef %49, i32 noundef 0)
  %.pre = load i32, ptr @t, align 4, !tbaa !5
  br label %50

50:                                               ; preds = %.lr.ph._crit_edge, %34
  %.pre-phi = phi i32 [ %.pre60, %.lr.ph._crit_edge ], [ %39, %34 ]
  %51 = phi i32 [ %32, %.lr.ph._crit_edge ], [ %.pre, %34 ]
  %.not39.not = icmp slt i32 %.03341, %51
  br i1 %.not39.not, label %.lr.ph, label %._crit_edge, !llvm.loop !11

._crit_edge45:                                    ; preds = %._crit_edge, %0
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(1680008) @dis, i8 63, i64 1680008, i1 false)
  store i64 0, ptr @dis, align 16, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #7
  store i32 0, ptr %5, align 4, !tbaa !5
  %52 = call { i64, i32 } @_ZSt9make_pairIRxiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 8 dereferenceable(8) @dis, ptr noundef nonnull align 4 dereferenceable(4) %5)
  %.fca.0.extract18 = extractvalue { i64, i32 } %52, 0
  %.fca.1.extract19 = extractvalue { i64, i32 } %52, 1
  store i64 %.fca.0.extract18, ptr %4, align 8
  %.sroa.221.0..sroa_idx = getelementptr inbounds i8, ptr %4, i64 8
  store i32 %.fca.1.extract19, ptr %.sroa.221.0..sroa_idx, align 8
  call void @_ZNSt14priority_queueISt4pairIxiESt6vectorIS1_SaIS1_EESt7greaterIS1_EE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(25) @Q, ptr noundef nonnull align 8 dereferenceable(12) %4)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #7
  %53 = call noundef zeroext i1 @_ZNKSt14priority_queueISt4pairIxiESt6vectorIS1_SaIS1_EESt7greaterIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25) @Q)
  br i1 %53, label %._crit_edge53, label %.lr.ph52

.lr.ph52:                                         ; preds = %._crit_edge45
  %.sroa.2.0..sroa_idx = getelementptr inbounds i8, ptr %6, i64 8
  br label %54

54:                                               ; preds = %.lr.ph52, %.loopexit
  %55 = call noundef nonnull align 8 dereferenceable(12) ptr @_ZNKSt14priority_queueISt4pairIxiESt6vectorIS1_SaIS1_EESt7greaterIS1_EE3topEv(ptr noundef nonnull align 8 dereferenceable(25) @Q)
  %56 = getelementptr inbounds i8, ptr %55, i64 8
  %57 = load i32, ptr %56, align 8, !tbaa !14
  call void @_ZNSt14priority_queueISt4pairIxiESt6vectorIS1_SaIS1_EESt7greaterIS1_EE3popEv(ptr noundef nonnull align 8 dereferenceable(25) @Q)
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds [210001 x i8], ptr @vis, i64 0, i64 %58
  %60 = load i8, ptr %59, align 1, !tbaa !16, !range !18, !noundef !19
  %61 = trunc nuw i8 %60 to i1
  br i1 %61, label %.loopexit, label %62, !llvm.loop !20

62:                                               ; preds = %54
  store i8 1, ptr %59, align 1, !tbaa !16
  %63 = getelementptr inbounds [210001 x i32], ptr @pre, i64 0, i64 %58
  %.03446 = load i32, ptr %63, align 4, !tbaa !5
  %.not3847 = icmp eq i32 %.03446, 0
  br i1 %.not3847, label %.loopexit, label %.lr.ph50

.lr.ph50:                                         ; preds = %62
  %64 = getelementptr inbounds [210001 x i64], ptr @dis, i64 0, i64 %58
  br label %65

65:                                               ; preds = %.lr.ph50, %81
  %.03448 = phi i32 [ %.03446, %.lr.ph50 ], [ %.034, %81 ]
  %66 = sext i32 %.03448 to i64
  %67 = getelementptr inbounds [4200004 x %struct.Edge], ptr @e, i64 0, i64 %66
  %68 = getelementptr inbounds i8, ptr %67, i64 4
  %69 = getelementptr inbounds i8, ptr %67, i64 8
  %70 = load i32, ptr %68, align 4, !tbaa !5
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds [210001 x i64], ptr @dis, i64 0, i64 %71
  %73 = load i64, ptr %72, align 8, !tbaa !12
  %74 = load i64, ptr %64, align 8, !tbaa !12
  %75 = load i32, ptr %69, align 4, !tbaa !5
  %76 = sext i32 %75 to i64
  %77 = add nsw i64 %74, %76
  %78 = icmp sgt i64 %73, %77
  br i1 %78, label %79, label %81

79:                                               ; preds = %65
  store i64 %77, ptr %72, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #7
  %80 = call { i64, i32 } @_ZSt9make_pairIRxRiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS3_INS4_IT0_E4typeEE6__typeEEOS5_OSA_(ptr noundef nonnull align 8 dereferenceable(8) %72, ptr noundef nonnull align 4 dereferenceable(4) %68)
  %.fca.0.extract = extractvalue { i64, i32 } %80, 0
  %.fca.1.extract = extractvalue { i64, i32 } %80, 1
  store i64 %.fca.0.extract, ptr %6, align 8
  store i32 %.fca.1.extract, ptr %.sroa.2.0..sroa_idx, align 8
  call void @_ZNSt14priority_queueISt4pairIxiESt6vectorIS1_SaIS1_EESt7greaterIS1_EE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(25) @Q, ptr noundef nonnull align 8 dereferenceable(12) %6)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #7
  br label %81

81:                                               ; preds = %79, %65
  %.034 = load i32, ptr %67, align 4, !tbaa !5
  %.not38 = icmp eq i32 %.034, 0
  br i1 %.not38, label %.loopexit, label %65, !llvm.loop !21

.loopexit:                                        ; preds = %81, %62, %54
  %82 = call noundef zeroext i1 @_ZNKSt14priority_queueISt4pairIxiESt6vectorIS1_SaIS1_EESt7greaterIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25) @Q)
  br i1 %82, label %._crit_edge53, label %54

._crit_edge53:                                    ; preds = %.loopexit, %._crit_edge45
  store i64 4557430888798830399, ptr @ans, align 8, !tbaa !12
  %83 = load i32, ptr @t, align 4, !tbaa !5
  %.not3754 = icmp slt i32 %83, 0
  br i1 %.not3754, label %._crit_edge58, label %.lr.ph57

.lr.ph57:                                         ; preds = %._crit_edge53
  %84 = load i32, ptr @n, align 4, !tbaa !5
  %85 = add nuw i32 %83, 1
  %smax = call i32 @llvm.smax.i32(i32 %85, i32 1)
  %wide.trip.count = zext nneg i32 %smax to i64
  %xtraiter = and i64 %wide.trip.count, 1
  %86 = icmp slt i32 %85, 2
  br i1 %86, label %._crit_edge58.loopexit.unr-lcssa, label %.lr.ph57.new

.lr.ph57.new:                                     ; preds = %.lr.ph57
  %unroll_iter = and i64 %wide.trip.count, 2147483646
  br label %98

._crit_edge58.loopexit.unr-lcssa.loopexit:        ; preds = %119
  %87 = trunc i64 %indvars.iv to i32
  %88 = add i32 %87, 3
  br label %._crit_edge58.loopexit.unr-lcssa

._crit_edge58.loopexit.unr-lcssa:                 ; preds = %._crit_edge58.loopexit.unr-lcssa.loopexit, %.lr.ph57
  %.lcssa.ph = phi i64 [ poison, %.lr.ph57 ], [ %120, %._crit_edge58.loopexit.unr-lcssa.loopexit ]
  %indvars.iv.unr = phi i32 [ 1, %.lr.ph57 ], [ %88, %._crit_edge58.loopexit.unr-lcssa.loopexit ]
  %.unr = phi i64 [ 4557430888798830399, %.lr.ph57 ], [ %120, %._crit_edge58.loopexit.unr-lcssa.loopexit ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge58, label %.epil.preheader

.epil.preheader:                                  ; preds = %._crit_edge58.loopexit.unr-lcssa
  %89 = mul i32 %84, %indvars.iv.unr
  %90 = add nsw i32 %89, -1
  %91 = sext i32 %90 to i64
  %92 = getelementptr inbounds [210001 x i64], ptr @dis, i64 0, i64 %91
  %93 = load i64, ptr %92, align 8, !tbaa !12
  %94 = icmp sgt i64 %.unr, %93
  br i1 %94, label %95, label %._crit_edge58

95:                                               ; preds = %.epil.preheader
  store i64 %93, ptr @ans, align 8, !tbaa !12
  br label %._crit_edge58

._crit_edge58:                                    ; preds = %._crit_edge58.loopexit.unr-lcssa, %95, %.epil.preheader, %._crit_edge53
  %96 = phi i64 [ 4557430888798830399, %._crit_edge53 ], [ %.lcssa.ph, %._crit_edge58.loopexit.unr-lcssa ], [ %.unr, %.epil.preheader ], [ %93, %95 ]
  %97 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef %96)
  ret i32 0

98:                                               ; preds = %119, %.lr.ph57.new
  %indvars.iv = phi i64 [ 0, %.lr.ph57.new ], [ %indvars.iv.next.1, %119 ]
  %99 = phi i64 [ 4557430888798830399, %.lr.ph57.new ], [ %120, %119 ]
  %niter = phi i64 [ 0, %.lr.ph57.new ], [ %niter.next.1, %119 ]
  %100 = trunc i64 %indvars.iv to i32
  %101 = or disjoint i32 %100, 1
  %102 = mul i32 %84, %101
  %103 = add nsw i32 %102, -1
  %104 = sext i32 %103 to i64
  %105 = getelementptr inbounds [210001 x i64], ptr @dis, i64 0, i64 %104
  %106 = load i64, ptr %105, align 8, !tbaa !12
  %107 = icmp sgt i64 %99, %106
  br i1 %107, label %108, label %109

108:                                              ; preds = %98
  store i64 %106, ptr @ans, align 8, !tbaa !12
  br label %109

109:                                              ; preds = %98, %108
  %110 = phi i64 [ %99, %98 ], [ %106, %108 ]
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %111 = trunc nuw nsw i64 %indvars.iv.next.1 to i32
  %112 = mul i32 %84, %111
  %113 = add nsw i32 %112, -1
  %114 = sext i32 %113 to i64
  %115 = getelementptr inbounds [210001 x i64], ptr @dis, i64 0, i64 %114
  %116 = load i64, ptr %115, align 8, !tbaa !12
  %117 = icmp sgt i64 %110, %116
  br i1 %117, label %118, label %119

118:                                              ; preds = %109
  store i64 %116, ptr @ans, align 8, !tbaa !12
  br label %119

119:                                              ; preds = %118, %109
  %120 = phi i64 [ %110, %109 ], [ %116, %118 ]
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %._crit_edge58.loopexit.unr-lcssa.loopexit, label %98, !llvm.loop !22
}

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt14priority_queueISt4pairIxiESt6vectorIS1_SaIS1_EESt7greaterIS1_EE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(25), ptr noundef nonnull align 8 dereferenceable(12)) local_unnamed_addr #5 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt14priority_queueISt4pairIxiESt6vectorIS1_SaIS1_EESt7greaterIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25)) local_unnamed_addr #0 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt14priority_queueISt4pairIxiESt6vectorIS1_SaIS1_EESt7greaterIS1_EE3popEv(ptr noundef nonnull align 8 dereferenceable(25)) local_unnamed_addr #5 align 2

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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smax.i32(i32, i32) #6

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


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