; LLVM IR from eyangch/competitive-programming :: USACOcontests/platinum/2021.12 (tickets)

; 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.segment_tree = type { [400005 x %"struct.std::pair"] }
%"struct.std::pair" = type { i64, i64 }
%"class.std::basic_istream" = type { ptr, i64, %"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::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%class.anon = type { i8 }

@N = external dso_local global i64, align 8
@K = external dso_local global i64, align 8
@C = external dso_local global [100000 x i64], align 16
@P = external dso_local global [100000 x i64], align 16
@A = external dso_local global [100000 x i64], align 16
@B = external dso_local global [100000 x i64], align 16
@I = external dso_local global [100000 x i64], align 16
@rI = external dso_local global [100000 x i64], align 16
@D0 = external dso_local global [100000 x i64], align 16
@D1 = external dso_local global [100000 x i64], align 16
@D2 = external dso_local global [100000 x i64], align 16
@AD0 = external dso_local global [100000 x i64], align 16
@AD1 = external dso_local global [100000 x i64], align 16
@S1 = external dso_local global %struct.segment_tree, align 8
@S2 = external dso_local global %struct.segment_tree, align 8
@S3 = external dso_local global %struct.segment_tree, align 8
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z8dijkstraRA100000_xS0_R12segment_tree(ptr noundef nonnull align 8 dereferenceable(800000), ptr noundef nonnull align 8 dereferenceable(800000), ptr noundef nonnull align 8 dereferenceable(6400080)) #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 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() #2 {
  %1 = alloca i32, align 4
  %2 = alloca i64, align 8
  %3 = alloca %class.anon, align 1
  %4 = alloca i64, align 8
  %5 = alloca i64, align 8
  %6 = alloca %"struct.std::pair", align 8
  %7 = alloca double, align 8
  %8 = alloca double, align 8
  %9 = alloca double, align 8
  %10 = alloca double, align 8
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  %14 = alloca i64, align 8
  store i32 0, ptr %1, align 4
  %15 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %16 = getelementptr i8, ptr %15, i64 -24
  %17 = load i64, ptr %16, align 8
  %18 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %17
  %19 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %18, ptr noundef null)
  %20 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %21 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) @N)
  %22 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %21, ptr noundef nonnull align 8 dereferenceable(8) @K)
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #7
  store i64 0, ptr %2, align 8, !tbaa !8
  br label %23

23:                                               ; preds = %53, %0
  %24 = load i64, ptr %2, align 8, !tbaa !8
  %25 = load i64, ptr @K, align 8, !tbaa !8
  %26 = icmp slt i64 %24, %25
  br i1 %26, label %28, label %27

27:                                               ; preds = %23
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #7
  br label %56

28:                                               ; preds = %23
  %29 = load i64, ptr %2, align 8, !tbaa !8
  %30 = getelementptr inbounds [100000 x i64], ptr @C, i64 0, i64 %29
  %31 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %30)
  %32 = load i64, ptr %2, align 8, !tbaa !8
  %33 = getelementptr inbounds [100000 x i64], ptr @P, i64 0, i64 %32
  %34 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %31, ptr noundef nonnull align 8 dereferenceable(8) %33)
  %35 = load i64, ptr %2, align 8, !tbaa !8
  %36 = getelementptr inbounds [100000 x i64], ptr @A, i64 0, i64 %35
  %37 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %34, ptr noundef nonnull align 8 dereferenceable(8) %36)
  %38 = load i64, ptr %2, align 8, !tbaa !8
  %39 = getelementptr inbounds [100000 x i64], ptr @B, i64 0, i64 %38
  %40 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %37, ptr noundef nonnull align 8 dereferenceable(8) %39)
  %41 = load i64, ptr %2, align 8, !tbaa !8
  %42 = getelementptr inbounds [100000 x i64], ptr @C, i64 0, i64 %41
  %43 = load i64, ptr %42, align 8, !tbaa !8
  %44 = add nsw i64 %43, -1
  store i64 %44, ptr %42, align 8, !tbaa !8
  %45 = load i64, ptr %2, align 8, !tbaa !8
  %46 = getelementptr inbounds [100000 x i64], ptr @A, i64 0, i64 %45
  %47 = load i64, ptr %46, align 8, !tbaa !8
  %48 = add nsw i64 %47, -1
  store i64 %48, ptr %46, align 8, !tbaa !8
  %49 = load i64, ptr %2, align 8, !tbaa !8
  %50 = getelementptr inbounds [100000 x i64], ptr @B, i64 0, i64 %49
  %51 = load i64, ptr %50, align 8, !tbaa !8
  %52 = add nsw i64 %51, -1
  store i64 %52, ptr %50, align 8, !tbaa !8
  br label %53

53:                                               ; preds = %28
  %54 = load i64, ptr %2, align 8, !tbaa !8
  %55 = add nsw i64 %54, 1
  store i64 %55, ptr %2, align 8, !tbaa !8
  br label %23, !llvm.loop !11

56:                                               ; preds = %27
  %57 = load i64, ptr @K, align 8, !tbaa !8
  %58 = getelementptr inbounds i64, ptr @I, i64 %57
  call void @_ZSt4iotaIPxiEvT_S1_T0_(ptr noundef @I, ptr noundef %58, i32 noundef 0)
  %59 = load i64, ptr @K, align 8, !tbaa !8
  %60 = getelementptr inbounds i64, ptr @I, i64 %59
  call void @"_ZSt4sortIPxZ4mainE3$_0EvT_S2_T0_"(ptr noundef @I, ptr noundef %60)
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #7
  store i64 0, ptr %4, align 8, !tbaa !8
  br label %61

61:                                               ; preds = %80, %56
  %62 = load i64, ptr %4, align 8, !tbaa !8
  %63 = load i64, ptr @K, align 8, !tbaa !8
  %64 = icmp slt i64 %62, %63
  br i1 %64, label %66, label %65

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

66:                                               ; preds = %61
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #7
  %67 = load i64, ptr %4, align 8, !tbaa !8
  %68 = getelementptr inbounds [100000 x i64], ptr @I, i64 0, i64 %67
  %69 = load i64, ptr %68, align 8, !tbaa !8
  store i64 %69, ptr %5, align 8, !tbaa !8
  %70 = load i64, ptr %4, align 8, !tbaa !8
  %71 = load i64, ptr %5, align 8, !tbaa !8
  %72 = getelementptr inbounds [100000 x i64], ptr @rI, i64 0, i64 %71
  store i64 %70, ptr %72, align 8, !tbaa !8
  %73 = load i64, ptr %4, align 8, !tbaa !8
  %74 = load i64, ptr %5, align 8, !tbaa !8
  %75 = getelementptr inbounds [100000 x i64], ptr @B, i64 0, i64 %74
  call void @_ZNSt4pairIxxEC2IRxS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull align 8 dereferenceable(8) %75, ptr noundef nonnull align 8 dereferenceable(8) %5)
  %76 = getelementptr inbounds { i64, i64 }, ptr %6, i32 0, i32 0
  %77 = load i64, ptr %76, align 8
  %78 = getelementptr inbounds { i64, i64 }, ptr %6, i32 0, i32 1
  %79 = load i64, ptr %78, align 8
  call void @_ZN12segment_tree3updExSt4pairIxxExxx(ptr noundef nonnull align 8 dereferenceable(6400080) @S1, i64 noundef %73, i64 %77, i64 %79, i64 noundef 0, i64 noundef 99999, i64 noundef 1)
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #7
  br label %80

80:                                               ; preds = %66
  %81 = load i64, ptr %4, align 8, !tbaa !8
  %82 = add nsw i64 %81, 1
  store i64 %82, ptr %4, align 8, !tbaa !8
  br label %61, !llvm.loop !13

83:                                               ; preds = %65
  %84 = call noundef nonnull align 8 dereferenceable(6400080) ptr @_ZN12segment_treeaSERKS_(ptr noundef nonnull align 8 dereferenceable(6400080) @S2, ptr noundef nonnull align 8 dereferenceable(6400080) @S1)
  %85 = call noundef nonnull align 8 dereferenceable(6400080) ptr @_ZN12segment_treeaSERKS_(ptr noundef nonnull align 8 dereferenceable(6400080) @S3, ptr noundef nonnull align 8 dereferenceable(6400080) @S1)
  %86 = load i64, ptr @N, align 8, !tbaa !8
  %87 = getelementptr inbounds i64, ptr @D0, i64 %86
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #7
  store double 1.000000e+15, ptr %7, align 8, !tbaa !14
  call void @_ZSt4fillIPxdEvT_S1_RKT0_(ptr noundef @D0, ptr noundef %87, ptr noundef nonnull align 8 dereferenceable(8) %7)
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  %88 = load i64, ptr @N, align 8, !tbaa !8
  %89 = getelementptr inbounds i64, ptr @AD0, i64 %88
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #7
  store double 1.000000e+15, ptr %8, align 8, !tbaa !14
  call void @_ZSt4fillIPxdEvT_S1_RKT0_(ptr noundef @AD0, ptr noundef %89, ptr noundef nonnull align 8 dereferenceable(8) %8)
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  store i64 0, ptr @D0, align 16, !tbaa !8
  call void @_Z8dijkstraRA100000_xS0_R12segment_tree(ptr noundef nonnull align 8 dereferenceable(800000) @D0, ptr noundef nonnull align 8 dereferenceable(800000) @AD0, ptr noundef nonnull align 8 dereferenceable(6400080) @S1)
  %90 = load i64, ptr @N, align 8, !tbaa !8
  %91 = getelementptr inbounds i64, ptr @D1, i64 %90
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  store double 1.000000e+15, ptr %9, align 8, !tbaa !14
  call void @_ZSt4fillIPxdEvT_S1_RKT0_(ptr noundef @D1, ptr noundef %91, ptr noundef nonnull align 8 dereferenceable(8) %9)
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  %92 = load i64, ptr @N, align 8, !tbaa !8
  %93 = getelementptr inbounds i64, ptr @AD1, i64 %92
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  store double 1.000000e+15, ptr %10, align 8, !tbaa !14
  call void @_ZSt4fillIPxdEvT_S1_RKT0_(ptr noundef @AD1, ptr noundef %93, ptr noundef nonnull align 8 dereferenceable(8) %10)
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  %94 = load i64, ptr @N, align 8, !tbaa !8
  %95 = sub nsw i64 %94, 1
  %96 = getelementptr inbounds [100000 x i64], ptr @D1, i64 0, i64 %95
  store i64 0, ptr %96, align 8, !tbaa !8
  call void @_Z8dijkstraRA100000_xS0_R12segment_tree(ptr noundef nonnull align 8 dereferenceable(800000) @D1, ptr noundef nonnull align 8 dereferenceable(800000) @AD1, ptr noundef nonnull align 8 dereferenceable(6400080) @S2)
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  store i64 0, ptr %11, align 8, !tbaa !8
  br label %97

97:                                               ; preds = %112, %83
  %98 = load i64, ptr %11, align 8, !tbaa !8
  %99 = load i64, ptr @N, align 8, !tbaa !8
  %100 = icmp slt i64 %98, %99
  br i1 %100, label %102, label %101

101:                                              ; preds = %97
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  br label %115

102:                                              ; preds = %97
  %103 = load i64, ptr %11, align 8, !tbaa !8
  %104 = getelementptr inbounds [100000 x i64], ptr @D0, i64 0, i64 %103
  %105 = load i64, ptr %104, align 8, !tbaa !8
  %106 = load i64, ptr %11, align 8, !tbaa !8
  %107 = getelementptr inbounds [100000 x i64], ptr @D1, i64 0, i64 %106
  %108 = load i64, ptr %107, align 8, !tbaa !8
  %109 = add nsw i64 %105, %108
  %110 = load i64, ptr %11, align 8, !tbaa !8
  %111 = getelementptr inbounds [100000 x i64], ptr @D2, i64 0, i64 %110
  store i64 %109, ptr %111, align 8, !tbaa !8
  br label %112

112:                                              ; preds = %102
  %113 = load i64, ptr %11, align 8, !tbaa !8
  %114 = add nsw i64 %113, 1
  store i64 %114, ptr %11, align 8, !tbaa !8
  br label %97, !llvm.loop !16

115:                                              ; preds = %101
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  store i64 0, ptr %12, align 8, !tbaa !8
  br label %116

116:                                              ; preds = %143, %115
  %117 = load i64, ptr %12, align 8, !tbaa !8
  %118 = load i64, ptr @K, align 8, !tbaa !8
  %119 = icmp slt i64 %117, %118
  br i1 %119, label %121, label %120

120:                                              ; preds = %116
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  br label %146

121:                                              ; preds = %116
  %122 = load i64, ptr %12, align 8, !tbaa !8
  %123 = getelementptr inbounds [100000 x i64], ptr @C, i64 0, i64 %122
  %124 = load i64, ptr %123, align 8, !tbaa !8
  %125 = getelementptr inbounds [100000 x i64], ptr @D2, i64 0, i64 %124
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  %126 = load i64, ptr %12, align 8, !tbaa !8
  %127 = getelementptr inbounds [100000 x i64], ptr @AD0, i64 0, i64 %126
  %128 = load i64, ptr %127, align 8, !tbaa !8
  %129 = load i64, ptr %12, align 8, !tbaa !8
  %130 = getelementptr inbounds [100000 x i64], ptr @AD1, i64 0, i64 %129
  %131 = load i64, ptr %130, align 8, !tbaa !8
  %132 = add nsw i64 %128, %131
  %133 = load i64, ptr %12, align 8, !tbaa !8
  %134 = getelementptr inbounds [100000 x i64], ptr @P, i64 0, i64 %133
  %135 = load i64, ptr %134, align 8, !tbaa !8
  %136 = add nsw i64 %132, %135
  store i64 %136, ptr %13, align 8, !tbaa !8
  %137 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %125, ptr noundef nonnull align 8 dereferenceable(8) %13)
  %138 = load i64, ptr %137, align 8, !tbaa !8
  %139 = load i64, ptr %12, align 8, !tbaa !8
  %140 = getelementptr inbounds [100000 x i64], ptr @C, i64 0, i64 %139
  %141 = load i64, ptr %140, align 8, !tbaa !8
  %142 = getelementptr inbounds [100000 x i64], ptr @D2, i64 0, i64 %141
  store i64 %138, ptr %142, align 8, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  br label %143

143:                                              ; preds = %121
  %144 = load i64, ptr %12, align 8, !tbaa !8
  %145 = add nsw i64 %144, 1
  store i64 %145, ptr %12, align 8, !tbaa !8
  br label %116, !llvm.loop !17

146:                                              ; preds = %120
  call void @_Z8dijkstraRA100000_xS0_R12segment_tree(ptr noundef nonnull align 8 dereferenceable(800000) @D2, ptr noundef nonnull align 8 dereferenceable(800000) @AD0, ptr noundef nonnull align 8 dereferenceable(6400080) @S3)
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  store i64 0, ptr %14, align 8, !tbaa !8
  br label %147

147:                                              ; preds = %167, %146
  %148 = load i64, ptr %14, align 8, !tbaa !8
  %149 = load i64, ptr @N, align 8, !tbaa !8
  %150 = icmp slt i64 %148, %149
  br i1 %150, label %152, label %151

151:                                              ; preds = %147
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  br label %170

152:                                              ; preds = %147
  %153 = load i64, ptr %14, align 8, !tbaa !8
  %154 = getelementptr inbounds [100000 x i64], ptr @D2, i64 0, i64 %153
  %155 = load i64, ptr %154, align 8, !tbaa !8
  %156 = sitofp i64 %155 to double
  %157 = fcmp ogt double %156, 1.000000e+14
  br i1 %157, label %158, label %159

158:                                              ; preds = %152
  br label %163

159:                                              ; preds = %152
  %160 = load i64, ptr %14, align 8, !tbaa !8
  %161 = getelementptr inbounds [100000 x i64], ptr @D2, i64 0, i64 %160
  %162 = load i64, ptr %161, align 8, !tbaa !8
  br label %163

163:                                              ; preds = %159, %158
  %164 = phi i64 [ -1, %158 ], [ %162, %159 ]
  %165 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %164)
  %166 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %165, i8 noundef signext 10)
  br label %167

167:                                              ; preds = %163
  %168 = load i64, ptr %14, align 8, !tbaa !8
  %169 = add nsw i64 %168, 1
  store i64 %169, ptr %14, align 8, !tbaa !8
  br label %147, !llvm.loop !18

170:                                              ; preds = %151
  %171 = load i32, ptr %1, align 4
  ret i32 %171
}

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264), ptr noundef) #3 align 2

declare noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext) #4

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZSt4iotaIPxiEvT_S1_T0_(ptr noundef, ptr noundef, i32 noundef) #3

; Function Attrs: inlinehint mustprogress uwtable
declare hidden void @"_ZSt4sortIPxZ4mainE3$_0EvT_S2_T0_"(ptr noundef, ptr noundef) #5

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(6400080) ptr @_ZN12segment_treeaSERKS_(ptr noundef nonnull align 8 dereferenceable(6400080), ptr noundef nonnull align 8 dereferenceable(6400080)) #6 align 2

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

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

; 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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) #0 align 2

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

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

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


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

%struct.segment_tree = type { [400005 x %"struct.std::pair"] }
%"struct.std::pair" = type { i64, i64 }
%"class.std::basic_istream" = type { ptr, i64, %"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::basic_ostream" = type { ptr, %"class.std::basic_ios" }

@N = external dso_local global i64, align 8
@K = external dso_local global i64, align 8
@C = external dso_local global [100000 x i64], align 16
@P = external dso_local global [100000 x i64], align 16
@A = external dso_local global [100000 x i64], align 16
@B = external dso_local global [100000 x i64], align 16
@I = external dso_local global [100000 x i64], align 16
@rI = external dso_local local_unnamed_addr global [100000 x i64], align 16
@D0 = external dso_local global [100000 x i64], align 16
@D1 = external dso_local global [100000 x i64], align 16
@D2 = external dso_local global [100000 x i64], align 16
@AD0 = external dso_local global [100000 x i64], align 16
@AD1 = external dso_local global [100000 x i64], align 16
@S1 = external dso_local global %struct.segment_tree, align 8
@S2 = external dso_local global %struct.segment_tree, align 8
@S3 = external dso_local global %struct.segment_tree, align 8
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z8dijkstraRA100000_xS0_R12segment_tree(ptr noundef nonnull align 8 dereferenceable(800000), ptr noundef nonnull align 8 dereferenceable(800000), ptr noundef nonnull align 8 dereferenceable(6400080)) 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 i64, align 8
  %2 = alloca %"struct.std::pair", align 8
  %3 = alloca double, align 8
  %4 = alloca double, align 8
  %5 = alloca double, align 8
  %6 = alloca double, align 8
  %7 = alloca i64, align 8
  %8 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %9 = getelementptr i8, ptr %8, i64 -24
  %10 = load i64, ptr %9, align 8
  %11 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %10
  %12 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %11, ptr noundef null)
  %13 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %14 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) @N)
  %15 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %14, ptr noundef nonnull align 8 dereferenceable(8) @K)
  %16 = load i64, ptr @K, align 8, !tbaa !8
  %17 = icmp sgt i64 %16, 0
  br i1 %17, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %0
  %.lcssa = phi i64 [ %16, %0 ], [ %39, %.lr.ph ]
  %18 = getelementptr inbounds i64, ptr @I, i64 %.lcssa
  tail call void @_ZSt4iotaIPxiEvT_S1_T0_(ptr noundef nonnull @I, ptr noundef nonnull %18, i32 noundef 0)
  %19 = load i64, ptr @K, align 8, !tbaa !8
  %20 = getelementptr inbounds i64, ptr @I, i64 %19
  tail call void @"_ZSt4sortIPxZ4mainE3$_0EvT_S2_T0_"(ptr noundef nonnull @I, ptr noundef nonnull %20)
  %21 = load i64, ptr @K, align 8, !tbaa !8
  %22 = icmp sgt i64 %21, 0
  br i1 %22, label %.lr.ph39, label %._crit_edge40

.lr.ph39:                                         ; preds = %._crit_edge
  %23 = getelementptr inbounds i8, ptr %2, i64 8
  br label %65

.lr.ph:                                           ; preds = %0, %.lr.ph
  %.03436 = phi i64 [ %38, %.lr.ph ], [ 0, %0 ]
  %24 = getelementptr inbounds [100000 x i64], ptr @C, i64 0, i64 %.03436
  %25 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %24)
  %26 = getelementptr inbounds [100000 x i64], ptr @P, i64 0, i64 %.03436
  %27 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %25, ptr noundef nonnull align 8 dereferenceable(8) %26)
  %28 = getelementptr inbounds [100000 x i64], ptr @A, i64 0, i64 %.03436
  %29 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %27, ptr noundef nonnull align 8 dereferenceable(8) %28)
  %30 = getelementptr inbounds [100000 x i64], ptr @B, i64 0, i64 %.03436
  %31 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %29, ptr noundef nonnull align 8 dereferenceable(8) %30)
  %32 = load i64, ptr %24, align 8, !tbaa !8
  %33 = add nsw i64 %32, -1
  store i64 %33, ptr %24, align 8, !tbaa !8
  %34 = load i64, ptr %28, align 8, !tbaa !8
  %35 = add nsw i64 %34, -1
  store i64 %35, ptr %28, align 8, !tbaa !8
  %36 = load i64, ptr %30, align 8, !tbaa !8
  %37 = add nsw i64 %36, -1
  store i64 %37, ptr %30, align 8, !tbaa !8
  %38 = add nuw nsw i64 %.03436, 1
  %39 = load i64, ptr @K, align 8, !tbaa !8
  %40 = icmp slt i64 %38, %39
  br i1 %40, label %.lr.ph, label %._crit_edge, !llvm.loop !11

._crit_edge40:                                    ; preds = %65, %._crit_edge
  %41 = call noundef nonnull align 8 dereferenceable(6400080) ptr @_ZN12segment_treeaSERKS_(ptr noundef nonnull align 8 dereferenceable(6400080) @S2, ptr noundef nonnull align 8 dereferenceable(6400080) @S1)
  %42 = call noundef nonnull align 8 dereferenceable(6400080) ptr @_ZN12segment_treeaSERKS_(ptr noundef nonnull align 8 dereferenceable(6400080) @S3, ptr noundef nonnull align 8 dereferenceable(6400080) @S1)
  %43 = load i64, ptr @N, align 8, !tbaa !8
  %44 = getelementptr inbounds i64, ptr @D0, i64 %43
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #7
  store double 1.000000e+15, ptr %3, align 8, !tbaa !13
  call void @_ZSt4fillIPxdEvT_S1_RKT0_(ptr noundef nonnull @D0, ptr noundef nonnull %44, ptr noundef nonnull align 8 dereferenceable(8) %3)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #7
  %45 = load i64, ptr @N, align 8, !tbaa !8
  %46 = getelementptr inbounds i64, ptr @AD0, i64 %45
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #7
  store double 1.000000e+15, ptr %4, align 8, !tbaa !13
  call void @_ZSt4fillIPxdEvT_S1_RKT0_(ptr noundef nonnull @AD0, ptr noundef nonnull %46, ptr noundef nonnull align 8 dereferenceable(8) %4)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #7
  store i64 0, ptr @D0, align 16, !tbaa !8
  call void @_Z8dijkstraRA100000_xS0_R12segment_tree(ptr noundef nonnull align 8 dereferenceable(800000) @D0, ptr noundef nonnull align 8 dereferenceable(800000) @AD0, ptr noundef nonnull align 8 dereferenceable(6400080) @S1)
  %47 = load i64, ptr @N, align 8, !tbaa !8
  %48 = getelementptr inbounds i64, ptr @D1, i64 %47
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #7
  store double 1.000000e+15, ptr %5, align 8, !tbaa !13
  call void @_ZSt4fillIPxdEvT_S1_RKT0_(ptr noundef nonnull @D1, ptr noundef nonnull %48, ptr noundef nonnull align 8 dereferenceable(8) %5)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  %49 = load i64, ptr @N, align 8, !tbaa !8
  %50 = getelementptr inbounds i64, ptr @AD1, i64 %49
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #7
  store double 1.000000e+15, ptr %6, align 8, !tbaa !13
  call void @_ZSt4fillIPxdEvT_S1_RKT0_(ptr noundef nonnull @AD1, ptr noundef nonnull %50, ptr noundef nonnull align 8 dereferenceable(8) %6)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  %51 = load i64, ptr @N, align 8, !tbaa !8
  %52 = add nsw i64 %51, -1
  %53 = getelementptr inbounds [100000 x i64], ptr @D1, i64 0, i64 %52
  store i64 0, ptr %53, align 8, !tbaa !8
  call void @_Z8dijkstraRA100000_xS0_R12segment_tree(ptr noundef nonnull align 8 dereferenceable(800000) @D1, ptr noundef nonnull align 8 dereferenceable(800000) @AD1, ptr noundef nonnull align 8 dereferenceable(6400080) @S2)
  %54 = load i64, ptr @N, align 8, !tbaa !8
  %55 = icmp sgt i64 %54, 0
  br i1 %55, label %.lr.ph43.preheader, label %.preheader

.lr.ph43.preheader:                               ; preds = %._crit_edge40
  %min.iters.check = icmp ult i64 %54, 4
  br i1 %min.iters.check, label %.lr.ph43.preheader57, label %vector.ph

.lr.ph43.preheader57:                             ; preds = %middle.block, %.lr.ph43.preheader
  %.03241.ph = phi i64 [ 0, %.lr.ph43.preheader ], [ %n.vec, %middle.block ]
  br label %.lr.ph43

vector.ph:                                        ; preds = %.lr.ph43.preheader
  %n.vec = and i64 %54, 9223372036854775804
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %56 = getelementptr inbounds [100000 x i64], ptr @D0, i64 0, i64 %index
  %57 = getelementptr inbounds i8, ptr %56, i64 16
  %wide.load = load <2 x i64>, ptr %56, align 16, !tbaa !8
  %wide.load54 = load <2 x i64>, ptr %57, align 16, !tbaa !8
  %58 = getelementptr inbounds [100000 x i64], ptr @D1, i64 0, i64 %index
  %59 = getelementptr inbounds i8, ptr %58, i64 16
  %wide.load55 = load <2 x i64>, ptr %58, align 16, !tbaa !8
  %wide.load56 = load <2 x i64>, ptr %59, align 16, !tbaa !8
  %60 = add nsw <2 x i64> %wide.load55, %wide.load
  %61 = add nsw <2 x i64> %wide.load56, %wide.load54
  %62 = getelementptr inbounds [100000 x i64], ptr @D2, i64 0, i64 %index
  %63 = getelementptr inbounds i8, ptr %62, i64 16
  store <2 x i64> %60, ptr %62, align 16, !tbaa !8
  store <2 x i64> %61, ptr %63, align 16, !tbaa !8
  %index.next = add nuw i64 %index, 4
  %64 = icmp eq i64 %index.next, %n.vec
  br i1 %64, label %middle.block, label %vector.body, !llvm.loop !15

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %54, %n.vec
  br i1 %cmp.n, label %.preheader, label %.lr.ph43.preheader57

65:                                               ; preds = %.lr.ph39, %65
  %.03337 = phi i64 [ 0, %.lr.ph39 ], [ %72, %65 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #7
  %66 = getelementptr inbounds [100000 x i64], ptr @I, i64 0, i64 %.03337
  %67 = load i64, ptr %66, align 8, !tbaa !8
  store i64 %67, ptr %1, align 8, !tbaa !8
  %68 = getelementptr inbounds [100000 x i64], ptr @rI, i64 0, i64 %67
  store i64 %.03337, ptr %68, align 8, !tbaa !8
  %69 = getelementptr inbounds [100000 x i64], ptr @B, i64 0, i64 %67
  call void @_ZNSt4pairIxxEC2IRxS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 8 dereferenceable(16) %2, ptr noundef nonnull align 8 dereferenceable(8) %69, ptr noundef nonnull align 8 dereferenceable(8) %1)
  %70 = load i64, ptr %2, align 8
  %71 = load i64, ptr %23, align 8
  call void @_ZN12segment_tree3updExSt4pairIxxExxx(ptr noundef nonnull align 8 dereferenceable(6400080) @S1, i64 noundef %.03337, i64 %70, i64 %71, i64 noundef 0, i64 noundef 99999, i64 noundef 1)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #7
  %72 = add nuw nsw i64 %.03337, 1
  %73 = load i64, ptr @K, align 8, !tbaa !8
  %74 = icmp slt i64 %72, %73
  br i1 %74, label %65, label %._crit_edge40, !llvm.loop !18

.preheader:                                       ; preds = %.lr.ph43, %middle.block, %._crit_edge40
  %75 = load i64, ptr @K, align 8, !tbaa !8
  %76 = icmp sgt i64 %75, 0
  br i1 %76, label %.lr.ph45, label %._crit_edge46

.lr.ph43:                                         ; preds = %.lr.ph43.preheader57, %.lr.ph43
  %.03241 = phi i64 [ %83, %.lr.ph43 ], [ %.03241.ph, %.lr.ph43.preheader57 ]
  %77 = getelementptr inbounds [100000 x i64], ptr @D0, i64 0, i64 %.03241
  %78 = load i64, ptr %77, align 8, !tbaa !8
  %79 = getelementptr inbounds [100000 x i64], ptr @D1, i64 0, i64 %.03241
  %80 = load i64, ptr %79, align 8, !tbaa !8
  %81 = add nsw i64 %80, %78
  %82 = getelementptr inbounds [100000 x i64], ptr @D2, i64 0, i64 %.03241
  store i64 %81, ptr %82, align 8, !tbaa !8
  %83 = add nuw nsw i64 %.03241, 1
  %exitcond.not = icmp eq i64 %83, %54
  br i1 %exitcond.not, label %.preheader, label %.lr.ph43, !llvm.loop !19

._crit_edge46:                                    ; preds = %.lr.ph45, %.preheader
  call void @_Z8dijkstraRA100000_xS0_R12segment_tree(ptr noundef nonnull align 8 dereferenceable(800000) @D2, ptr noundef nonnull align 8 dereferenceable(800000) @AD0, ptr noundef nonnull align 8 dereferenceable(6400080) @S3)
  %84 = load i64, ptr @N, align 8, !tbaa !8
  %85 = icmp sgt i64 %84, 0
  br i1 %85, label %.lr.ph49, label %._crit_edge50

.lr.ph45:                                         ; preds = %.preheader, %.lr.ph45
  %.03144 = phi i64 [ %101, %.lr.ph45 ], [ 0, %.preheader ]
  %86 = getelementptr inbounds [100000 x i64], ptr @C, i64 0, i64 %.03144
  %87 = load i64, ptr %86, align 8, !tbaa !8
  %88 = getelementptr inbounds [100000 x i64], ptr @D2, i64 0, i64 %87
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #7
  %89 = getelementptr inbounds [100000 x i64], ptr @AD0, i64 0, i64 %.03144
  %90 = load i64, ptr %89, align 8, !tbaa !8
  %91 = getelementptr inbounds [100000 x i64], ptr @AD1, i64 0, i64 %.03144
  %92 = load i64, ptr %91, align 8, !tbaa !8
  %93 = add nsw i64 %92, %90
  %94 = getelementptr inbounds [100000 x i64], ptr @P, i64 0, i64 %.03144
  %95 = load i64, ptr %94, align 8, !tbaa !8
  %96 = add nsw i64 %93, %95
  store i64 %96, ptr %7, align 8, !tbaa !8
  %97 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %88, ptr noundef nonnull align 8 dereferenceable(8) %7)
  %98 = load i64, ptr %97, align 8, !tbaa !8
  %99 = load i64, ptr %86, align 8, !tbaa !8
  %100 = getelementptr inbounds [100000 x i64], ptr @D2, i64 0, i64 %99
  store i64 %98, ptr %100, align 8, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  %101 = add nuw nsw i64 %.03144, 1
  %102 = load i64, ptr @K, align 8, !tbaa !8
  %103 = icmp slt i64 %101, %102
  br i1 %103, label %.lr.ph45, label %._crit_edge46, !llvm.loop !20

._crit_edge50:                                    ; preds = %.lr.ph49, %._crit_edge46
  ret i32 0

.lr.ph49:                                         ; preds = %._crit_edge46, %.lr.ph49
  %.047 = phi i64 [ %109, %.lr.ph49 ], [ 0, %._crit_edge46 ]
  %104 = getelementptr inbounds [100000 x i64], ptr @D2, i64 0, i64 %.047
  %105 = load i64, ptr %104, align 8, !tbaa !8
  %106 = icmp sgt i64 %105, 100000000000000
  %spec.select = select i1 %106, i64 -1, i64 %105
  %107 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %spec.select)
  %108 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %107, i8 noundef signext 10)
  %109 = add nuw nsw i64 %.047, 1
  %110 = load i64, ptr @N, align 8, !tbaa !8
  %111 = icmp slt i64 %109, %110
  br i1 %111, label %.lr.ph49, label %._crit_edge50, !llvm.loop !21
}

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264), ptr noundef) local_unnamed_addr #3 align 2

declare noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext) local_unnamed_addr #4

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZSt4iotaIPxiEvT_S1_T0_(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress uwtable
declare hidden void @"_ZSt4sortIPxZ4mainE3$_0EvT_S2_T0_"(ptr noundef, ptr noundef) local_unnamed_addr #5

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(6400080) ptr @_ZN12segment_treeaSERKS_(ptr noundef nonnull align 8 dereferenceable(6400080), ptr noundef nonnull align 8 dereferenceable(6400080)) local_unnamed_addr #6 align 2

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

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

; 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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) local_unnamed_addr #0 align 2

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

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

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


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