; LLVM IR from eyangch/competitive-programming :: USACOcontests/gold/2014.02/rblock.ll (Z3dijib)

; 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<node, std::allocator<node>>::_Vector_impl" }
%"struct.std::_Vector_base<node, std::allocator<node>>::_Vector_impl" = type { %"struct.std::_Vector_base<node, std::allocator<node>>::_Vector_impl_data" }
%"struct.std::_Vector_base<node, std::allocator<node>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%struct.node = type { i32, i32 }

@N = external dso_local global i32, align 4
@graph = external dso_local global [100 x %"class.std::vector"], align 16
@paths = external dso_local global [10000 x i32], align 16
@dist = external dso_local global [100 x i32], align 16
@vis = external dso_local global [100 x i8], align 16
@spath = external dso_local global %"class.std::vector.0", align 8

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z3dijib(i32 noundef %0, i1 noundef zeroext %1) #0 {
  %3 = alloca i32, align 4
  %4 = alloca i8, align 1
  %5 = alloca i32, align 4
  %6 = alloca i8, align 1
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %14 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %15 = alloca %struct.node, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca ptr, align 8
  %21 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %22 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %23 = alloca %struct.node, align 4
  store i32 %0, ptr %3, align 4, !tbaa !5
  %24 = zext i1 %1 to i8
  store i8 %24, ptr %4, align 1, !tbaa !9
  %25 = load i32, ptr @N, align 4, !tbaa !5
  %26 = sext i32 %25 to i64
  %27 = getelementptr inbounds i32, ptr @dist, i64 %26
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  store i32 2147483647, ptr %5, align 4, !tbaa !5
  call void @_ZSt4fillIPiiEvT_S1_RKT0_(ptr noundef @dist, ptr noundef %27, ptr noundef nonnull align 4 dereferenceable(4) %5)
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  %28 = load i32, ptr @N, align 4, !tbaa !5
  %29 = sext i32 %28 to i64
  %30 = getelementptr inbounds i8, ptr @vis, i64 %29
  call void @llvm.lifetime.start.p0(i64 1, ptr %6) #6
  store i8 0, ptr %6, align 1, !tbaa !9
  call void @_ZSt4fillIPbbEvT_S1_RKT0_(ptr noundef @vis, ptr noundef %30, ptr noundef nonnull align 1 dereferenceable(1) %6)
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #6
  store i32 0, ptr @dist, align 16, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  store i32 0, ptr %7, align 4, !tbaa !5
  br label %31

31:                                               ; preds = %144, %2
  %32 = load i32, ptr %7, align 4, !tbaa !5
  %33 = load i32, ptr @N, align 4, !tbaa !5
  %34 = sub nsw i32 %33, 1
  %35 = icmp slt i32 %32, %34
  br i1 %35, label %37, label %36

36:                                               ; preds = %31
  store i32 2, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  br label %147

37:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  store i32 2147483647, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  store i32 0, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  store i32 0, ptr %11, align 4, !tbaa !5
  br label %38

38:                                               ; preds = %63, %37
  %39 = load i32, ptr %11, align 4, !tbaa !5
  %40 = load i32, ptr @N, align 4, !tbaa !5
  %41 = icmp slt i32 %39, %40
  br i1 %41, label %43, label %42

42:                                               ; preds = %38
  store i32 5, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  br label %66

43:                                               ; preds = %38
  %44 = load i32, ptr %11, align 4, !tbaa !5
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds [100 x i8], ptr @vis, i64 0, i64 %45
  %47 = load i8, ptr %46, align 1, !tbaa !9, !range !11, !noundef !12
  %48 = trunc i8 %47 to i1
  br i1 %48, label %62, label %49

49:                                               ; preds = %43
  %50 = load i32, ptr %11, align 4, !tbaa !5
  %51 = sext i32 %50 to i64
  %52 = getelementptr inbounds [100 x i32], ptr @dist, i64 0, i64 %51
  %53 = load i32, ptr %52, align 4, !tbaa !5
  %54 = load i32, ptr %9, align 4, !tbaa !5
  %55 = icmp sle i32 %53, %54
  br i1 %55, label %56, label %62

56:                                               ; preds = %49
  %57 = load i32, ptr %11, align 4, !tbaa !5
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds [100 x i32], ptr @dist, i64 0, i64 %58
  %60 = load i32, ptr %59, align 4, !tbaa !5
  store i32 %60, ptr %9, align 4, !tbaa !5
  %61 = load i32, ptr %11, align 4, !tbaa !5
  store i32 %61, ptr %10, align 4, !tbaa !5
  br label %62

62:                                               ; preds = %56, %49, %43
  br label %63

63:                                               ; preds = %62
  %64 = load i32, ptr %11, align 4, !tbaa !5
  %65 = add nsw i32 %64, 1
  store i32 %65, ptr %11, align 4, !tbaa !5
  br label %38, !llvm.loop !13

66:                                               ; preds = %42
  %67 = load i32, ptr %10, align 4, !tbaa !5
  %68 = sext i32 %67 to i64
  %69 = getelementptr inbounds [100 x i8], ptr @vis, i64 0, i64 %68
  store i8 1, ptr %69, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  %70 = load i32, ptr %10, align 4, !tbaa !5
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds [100 x %"class.std::vector"], ptr @graph, i64 0, i64 %71
  store ptr %72, ptr %12, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  %73 = load ptr, ptr %12, align 8, !tbaa !15
  %74 = call ptr @_ZNSt6vectorI4nodeSaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %73) #6
  %75 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %13, i32 0, i32 0
  store ptr %74, ptr %75, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  %76 = load ptr, ptr %12, align 8, !tbaa !15
  %77 = call ptr @_ZNSt6vectorI4nodeSaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %76) #6
  %78 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %14, i32 0, i32 0
  store ptr %77, ptr %78, align 8
  br label %79

79:                                               ; preds = %141, %66
  %80 = call noundef zeroext i1 @_ZN9__gnu_cxxneIP4nodeSt6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESB_(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull align 8 dereferenceable(8) %14) #6
  br i1 %80, label %82, label %81

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

82:                                               ; preds = %79
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  %83 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIP4nodeSt6vectorIS1_SaIS1_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %13) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %15, ptr align 4 %83, i64 8, i1 false), !tbaa.struct !17
  %84 = getelementptr inbounds %struct.node, ptr %15, i32 0, i32 0
  %85 = load i32, ptr %84, align 4, !tbaa !18
  %86 = sext i32 %85 to i64
  %87 = getelementptr inbounds [100 x i8], ptr @vis, i64 0, i64 %86
  %88 = load i8, ptr %87, align 1, !tbaa !9, !range !11, !noundef !12
  %89 = trunc i8 %88 to i1
  br i1 %89, label %90, label %91

90:                                               ; preds = %82
  store i32 9, ptr %8, align 4
  br label %138

91:                                               ; preds = %82
  %92 = load i32, ptr %10, align 4, !tbaa !5
  %93 = sext i32 %92 to i64
  %94 = getelementptr inbounds [100 x i32], ptr @dist, i64 0, i64 %93
  %95 = load i32, ptr %94, align 4, !tbaa !5
  %96 = getelementptr inbounds %struct.node, ptr %15, i32 0, i32 1
  %97 = load i32, ptr %96, align 4, !tbaa !20
  %98 = sext i32 %97 to i64
  %99 = getelementptr inbounds [10000 x i32], ptr @paths, i64 0, i64 %98
  %100 = load i32, ptr %99, align 4, !tbaa !5
  %101 = getelementptr inbounds %struct.node, ptr %15, i32 0, i32 1
  %102 = load i32, ptr %101, align 4, !tbaa !20
  %103 = load i32, ptr %3, align 4, !tbaa !5
  %104 = icmp eq i32 %102, %103
  %105 = zext i1 %104 to i32
  %106 = add nsw i32 1, %105
  %107 = mul nsw i32 %100, %106
  %108 = add nsw i32 %95, %107
  %109 = getelementptr inbounds %struct.node, ptr %15, i32 0, i32 0
  %110 = load i32, ptr %109, align 4, !tbaa !18
  %111 = sext i32 %110 to i64
  %112 = getelementptr inbounds [100 x i32], ptr @dist, i64 0, i64 %111
  %113 = load i32, ptr %112, align 4, !tbaa !5
  %114 = icmp slt i32 %108, %113
  br i1 %114, label %115, label %137

115:                                              ; preds = %91
  %116 = load i32, ptr %10, align 4, !tbaa !5
  %117 = sext i32 %116 to i64
  %118 = getelementptr inbounds [100 x i32], ptr @dist, i64 0, i64 %117
  %119 = load i32, ptr %118, align 4, !tbaa !5
  %120 = getelementptr inbounds %struct.node, ptr %15, i32 0, i32 1
  %121 = load i32, ptr %120, align 4, !tbaa !20
  %122 = sext i32 %121 to i64
  %123 = getelementptr inbounds [10000 x i32], ptr @paths, i64 0, i64 %122
  %124 = load i32, ptr %123, align 4, !tbaa !5
  %125 = getelementptr inbounds %struct.node, ptr %15, i32 0, i32 1
  %126 = load i32, ptr %125, align 4, !tbaa !20
  %127 = load i32, ptr %3, align 4, !tbaa !5
  %128 = icmp eq i32 %126, %127
  %129 = zext i1 %128 to i32
  %130 = add nsw i32 1, %129
  %131 = mul nsw i32 %124, %130
  %132 = add nsw i32 %119, %131
  %133 = getelementptr inbounds %struct.node, ptr %15, i32 0, i32 0
  %134 = load i32, ptr %133, align 4, !tbaa !18
  %135 = sext i32 %134 to i64
  %136 = getelementptr inbounds [100 x i32], ptr @dist, i64 0, i64 %135
  store i32 %132, ptr %136, align 4, !tbaa !5
  br label %137

137:                                              ; preds = %115, %91
  store i32 0, ptr %8, align 4
  br label %138

138:                                              ; preds = %137, %90
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  %139 = load i32, ptr %8, align 4
  switch i32 %139, label %212 [
    i32 0, label %140
    i32 9, label %141
  ]

140:                                              ; preds = %138
  br label %141

141:                                              ; preds = %140, %138
  %142 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIP4nodeSt6vectorIS1_SaIS1_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %13) #6
  br label %79

143:                                              ; preds = %81
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  br label %144

144:                                              ; preds = %143
  %145 = load i32, ptr %7, align 4, !tbaa !5
  %146 = add nsw i32 %145, 1
  store i32 %146, ptr %7, align 4, !tbaa !5
  br label %31, !llvm.loop !21

147:                                              ; preds = %36
  %148 = load i8, ptr %4, align 1, !tbaa !9, !range !11, !noundef !12
  %149 = trunc i8 %148 to i1
  br i1 %149, label %150, label %206

150:                                              ; preds = %147
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #6
  %151 = load i32, ptr @N, align 4, !tbaa !5
  %152 = sub nsw i32 %151, 1
  store i32 %152, ptr %16, align 4, !tbaa !5
  br label %153

153:                                              ; preds = %203, %150
  %154 = load i32, ptr %16, align 4, !tbaa !5
  %155 = icmp sgt i32 %154, 0
  br i1 %155, label %156, label %205

156:                                              ; preds = %153
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #6
  store i32 2147483647, ptr %17, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #6
  store i32 0, ptr %18, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #6
  store i32 0, ptr %19, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #6
  %157 = load i32, ptr %16, align 4, !tbaa !5
  %158 = sext i32 %157 to i64
  %159 = getelementptr inbounds [100 x %"class.std::vector"], ptr @graph, i64 0, i64 %158
  store ptr %159, ptr %20, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #6
  %160 = load ptr, ptr %20, align 8, !tbaa !15
  %161 = call ptr @_ZNSt6vectorI4nodeSaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %160) #6
  %162 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %21, i32 0, i32 0
  store ptr %161, ptr %162, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #6
  %163 = load ptr, ptr %20, align 8, !tbaa !15
  %164 = call ptr @_ZNSt6vectorI4nodeSaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %163) #6
  %165 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %22, i32 0, i32 0
  store ptr %164, ptr %165, align 8
  br label %166

166:                                              ; preds = %201, %156
  %167 = call noundef zeroext i1 @_ZN9__gnu_cxxneIP4nodeSt6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESB_(ptr noundef nonnull align 8 dereferenceable(8) %21, ptr noundef nonnull align 8 dereferenceable(8) %22) #6
  br i1 %167, label %169, label %168

168:                                              ; preds = %166
  store i32 12, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #6
  br label %203

169:                                              ; preds = %166
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #6
  %170 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIP4nodeSt6vectorIS1_SaIS1_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %21) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %23, ptr align 4 %170, i64 8, i1 false), !tbaa.struct !17
  %171 = getelementptr inbounds %struct.node, ptr %23, i32 0, i32 0
  %172 = load i32, ptr %171, align 4, !tbaa !18
  %173 = sext i32 %172 to i64
  %174 = getelementptr inbounds [100 x i32], ptr @dist, i64 0, i64 %173
  %175 = load i32, ptr %174, align 4, !tbaa !5
  %176 = getelementptr inbounds %struct.node, ptr %23, i32 0, i32 1
  %177 = load i32, ptr %176, align 4, !tbaa !20
  %178 = sext i32 %177 to i64
  %179 = getelementptr inbounds [10000 x i32], ptr @paths, i64 0, i64 %178
  %180 = load i32, ptr %179, align 4, !tbaa !5
  %181 = add nsw i32 %175, %180
  %182 = load i32, ptr %17, align 4, !tbaa !5
  %183 = icmp sle i32 %181, %182
  br i1 %183, label %184, label %200

184:                                              ; preds = %169
  %185 = getelementptr inbounds %struct.node, ptr %23, i32 0, i32 0
  %186 = load i32, ptr %185, align 4, !tbaa !18
  %187 = sext i32 %186 to i64
  %188 = getelementptr inbounds [100 x i32], ptr @dist, i64 0, i64 %187
  %189 = load i32, ptr %188, align 4, !tbaa !5
  %190 = getelementptr inbounds %struct.node, ptr %23, i32 0, i32 1
  %191 = load i32, ptr %190, align 4, !tbaa !20
  %192 = sext i32 %191 to i64
  %193 = getelementptr inbounds [10000 x i32], ptr @paths, i64 0, i64 %192
  %194 = load i32, ptr %193, align 4, !tbaa !5
  %195 = add nsw i32 %189, %194
  store i32 %195, ptr %17, align 4, !tbaa !5
  %196 = getelementptr inbounds %struct.node, ptr %23, i32 0, i32 0
  %197 = load i32, ptr %196, align 4, !tbaa !18
  store i32 %197, ptr %18, align 4, !tbaa !5
  %198 = getelementptr inbounds %struct.node, ptr %23, i32 0, i32 1
  %199 = load i32, ptr %198, align 4, !tbaa !20
  store i32 %199, ptr %19, align 4, !tbaa !5
  br label %200

200:                                              ; preds = %184, %169
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #6
  br label %201

201:                                              ; preds = %200
  %202 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIP4nodeSt6vectorIS1_SaIS1_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %21) #6
  br label %166

203:                                              ; preds = %168
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) @spath, ptr noundef nonnull align 4 dereferenceable(4) %19)
  %204 = load i32, ptr %18, align 4, !tbaa !5
  store i32 %204, ptr %16, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  br label %153, !llvm.loop !22

205:                                              ; preds = %153
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  br label %206

206:                                              ; preds = %205, %147
  %207 = load i32, ptr @N, align 4, !tbaa !5
  %208 = sub nsw i32 %207, 1
  %209 = sext i32 %208 to i64
  %210 = getelementptr inbounds [100 x i32], ptr @dist, i64 0, i64 %209
  %211 = load i32, ptr %210, align 4, !tbaa !5
  ret i32 %211

212:                                              ; preds = %138
  unreachable
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4fillIPiiEvT_S1_RKT0_(ptr noundef, ptr noundef, ptr noundef nonnull align 4 dereferenceable(4)) #1

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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(4)) #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 = { 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 #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #5 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = !{!"bool", !7, i64 0}
!11 = !{i8 0, i8 2}
!12 = !{}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = !{!16, !16, i64 0}
!16 = !{!"any pointer", !7, i64 0}
!17 = !{i64 0, i64 4, !5, i64 4, i64 4, !5}
!18 = !{!19, !6, i64 0}
!19 = !{!"_ZTS4node", !6, i64 0, !6, i64 4}
!20 = !{!19, !6, i64 4}
!21 = distinct !{!21, !14}
!22 = distinct !{!22, !14}


; 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<node, std::allocator<node>>::_Vector_impl" }
%"struct.std::_Vector_base<node, std::allocator<node>>::_Vector_impl" = type { %"struct.std::_Vector_base<node, std::allocator<node>>::_Vector_impl_data" }
%"struct.std::_Vector_base<node, std::allocator<node>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@N = external dso_local local_unnamed_addr global i32, align 4
@graph = external dso_local global [100 x %"class.std::vector"], align 16
@paths = external dso_local local_unnamed_addr global [10000 x i32], align 16
@dist = external dso_local global [100 x i32], align 16
@vis = external dso_local global [100 x i8], align 16
@spath = external dso_local global %"class.std::vector.0", align 8

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z3dijib(i32 noundef %0, i1 noundef zeroext %1) local_unnamed_addr #0 {
  %3 = alloca i32, align 4
  %4 = alloca i8, align 1
  %5 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %6 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %7 = alloca i32, align 4
  %8 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %9 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %10 = load i32, ptr @N, align 4, !tbaa !5
  %11 = sext i32 %10 to i64
  %12 = getelementptr inbounds i32, ptr @dist, i64 %11
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #6
  store i32 2147483647, ptr %3, align 4, !tbaa !5
  call void @_ZSt4fillIPiiEvT_S1_RKT0_(ptr noundef nonnull @dist, ptr noundef nonnull %12, ptr noundef nonnull align 4 dereferenceable(4) %3)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #6
  %13 = load i32, ptr @N, align 4, !tbaa !5
  %14 = sext i32 %13 to i64
  %15 = getelementptr inbounds i8, ptr @vis, i64 %14
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %4) #6
  store i8 0, ptr %4, align 1, !tbaa !9
  call void @_ZSt4fillIPbbEvT_S1_RKT0_(ptr noundef nonnull @vis, ptr noundef nonnull %15, ptr noundef nonnull align 1 dereferenceable(1) %4)
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #6
  store i32 0, ptr @dist, align 16, !tbaa !5
  %16 = load i32, ptr @N, align 4, !tbaa !5
  %17 = icmp sgt i32 %16, 1
  br i1 %17, label %.preheader49, label %.loopexit

.preheader49:                                     ; preds = %2, %._crit_edge55
  %18 = phi i32 [ %52, %._crit_edge55 ], [ %16, %2 ]
  %.056 = phi i32 [ %51, %._crit_edge55 ], [ 0, %2 ]
  %19 = icmp sgt i32 %18, 0
  br i1 %19, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %.preheader49
  %wide.trip.count = zext nneg i32 %18 to i64
  %xtraiter = and i64 %wide.trip.count, 1
  %20 = icmp eq i32 %18, 1
  br i1 %20, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph.preheader.new

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

._crit_edge57:                                    ; preds = %._crit_edge55
  %21 = icmp sgt i32 %52, 1
  %or.cond = and i1 %21, %1
  br i1 %or.cond, label %.lr.ph66, label %.loopexit

._crit_edge.loopexit.unr-lcssa:                   ; preds = %50, %.lr.ph.preheader
  %.141.lcssa.ph = phi i32 [ poison, %.lr.ph.preheader ], [ %.141.1, %50 ]
  %indvars.iv.unr = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next.1, %50 ]
  %.03452.unr = phi i32 [ 2147483647, %.lr.ph.preheader ], [ %.1.1, %50 ]
  %.04051.unr = phi i32 [ 0, %.lr.ph.preheader ], [ %.141.1, %50 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge, label %.lr.ph.epil

.lr.ph.epil:                                      ; preds = %._crit_edge.loopexit.unr-lcssa
  %22 = getelementptr inbounds [100 x i8], ptr @vis, i64 0, i64 %indvars.iv.unr
  %23 = load i8, ptr %22, align 1, !tbaa !9, !range !11, !noundef !12
  %24 = trunc nuw i8 %23 to i1
  br i1 %24, label %._crit_edge, label %25

25:                                               ; preds = %.lr.ph.epil
  %26 = getelementptr inbounds [100 x i32], ptr @dist, i64 0, i64 %indvars.iv.unr
  %27 = load i32, ptr %26, align 4, !tbaa !5
  %.not47.epil = icmp sgt i32 %27, %.03452.unr
  %28 = trunc nuw nsw i64 %indvars.iv.unr to i32
  %spec.select.epil = select i1 %.not47.epil, i32 %.04051.unr, i32 %28
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit.unr-lcssa, %25, %.lr.ph.epil, %.preheader49
  %.040.lcssa = phi i32 [ 0, %.preheader49 ], [ %.141.lcssa.ph, %._crit_edge.loopexit.unr-lcssa ], [ %.04051.unr, %.lr.ph.epil ], [ %spec.select.epil, %25 ]
  %29 = sext i32 %.040.lcssa to i64
  %30 = getelementptr inbounds [100 x i8], ptr @vis, i64 0, i64 %29
  store i8 1, ptr %30, align 1, !tbaa !9
  %31 = getelementptr inbounds [100 x %"class.std::vector"], ptr @graph, i64 0, i64 %29
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #6
  %32 = call ptr @_ZNSt6vectorI4nodeSaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %31) #6
  store ptr %32, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #6
  %33 = call ptr @_ZNSt6vectorI4nodeSaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %31) #6
  store ptr %33, ptr %6, align 8
  %34 = call noundef zeroext i1 @_ZN9__gnu_cxxneIP4nodeSt6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESB_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6) #6
  br i1 %34, label %.lr.ph54, label %._crit_edge55

.lr.ph54:                                         ; preds = %._crit_edge
  %35 = getelementptr inbounds [100 x i32], ptr @dist, i64 0, i64 %29
  br label %55

.lr.ph:                                           ; preds = %50, %.lr.ph.preheader.new
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader.new ], [ %indvars.iv.next.1, %50 ]
  %.03452 = phi i32 [ 2147483647, %.lr.ph.preheader.new ], [ %.1.1, %50 ]
  %.04051 = phi i32 [ 0, %.lr.ph.preheader.new ], [ %.141.1, %50 ]
  %niter = phi i64 [ 0, %.lr.ph.preheader.new ], [ %niter.next.1, %50 ]
  %36 = getelementptr inbounds [100 x i8], ptr @vis, i64 0, i64 %indvars.iv
  %37 = load i8, ptr %36, align 2, !tbaa !9, !range !11, !noundef !12
  %38 = trunc nuw i8 %37 to i1
  br i1 %38, label %.lr.ph.1, label %39

39:                                               ; preds = %.lr.ph
  %40 = getelementptr inbounds [100 x i32], ptr @dist, i64 0, i64 %indvars.iv
  %41 = load i32, ptr %40, align 8, !tbaa !5
  %.not47 = icmp sgt i32 %41, %.03452
  %42 = trunc nuw nsw i64 %indvars.iv to i32
  %spec.select = select i1 %.not47, i32 %.04051, i32 %42
  %spec.select48 = call i32 @llvm.smin.i32(i32 %41, i32 %.03452)
  br label %.lr.ph.1

.lr.ph.1:                                         ; preds = %39, %.lr.ph
  %.141 = phi i32 [ %.04051, %.lr.ph ], [ %spec.select, %39 ]
  %.1 = phi i32 [ %.03452, %.lr.ph ], [ %spec.select48, %39 ]
  %indvars.iv.next = or disjoint i64 %indvars.iv, 1
  %43 = getelementptr inbounds [100 x i8], ptr @vis, i64 0, i64 %indvars.iv.next
  %44 = load i8, ptr %43, align 1, !tbaa !9, !range !11, !noundef !12
  %45 = trunc nuw i8 %44 to i1
  br i1 %45, label %50, label %46

46:                                               ; preds = %.lr.ph.1
  %47 = getelementptr inbounds [100 x i32], ptr @dist, i64 0, i64 %indvars.iv.next
  %48 = load i32, ptr %47, align 4, !tbaa !5
  %.not47.1 = icmp sgt i32 %48, %.1
  %49 = trunc nuw nsw i64 %indvars.iv.next to i32
  %spec.select.1 = select i1 %.not47.1, i32 %.141, i32 %49
  %spec.select48.1 = call i32 @llvm.smin.i32(i32 %48, i32 %.1)
  br label %50

50:                                               ; preds = %46, %.lr.ph.1
  %.141.1 = phi i32 [ %.141, %.lr.ph.1 ], [ %spec.select.1, %46 ]
  %.1.1 = phi i32 [ %.1, %.lr.ph.1 ], [ %spec.select48.1, %46 ]
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %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_edge.loopexit.unr-lcssa, label %.lr.ph, !llvm.loop !13

._crit_edge55:                                    ; preds = %74, %._crit_edge
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  %51 = add nuw nsw i32 %.056, 1
  %52 = load i32, ptr @N, align 4, !tbaa !5
  %53 = add nsw i32 %52, -1
  %54 = icmp slt i32 %51, %53
  br i1 %54, label %.preheader49, label %._crit_edge57, !llvm.loop !15

55:                                               ; preds = %.lr.ph54, %74
  %56 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIP4nodeSt6vectorIS1_SaIS1_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #6
  %.sroa.09.0.copyload = load i32, ptr %56, align 4, !tbaa !5
  %57 = sext i32 %.sroa.09.0.copyload to i64
  %58 = getelementptr inbounds [100 x i8], ptr @vis, i64 0, i64 %57
  %59 = load i8, ptr %58, align 1, !tbaa !9, !range !11, !noundef !12
  %60 = trunc nuw i8 %59 to i1
  br i1 %60, label %74, label %61

61:                                               ; preds = %55
  %.sroa.612.0..sroa_idx = getelementptr inbounds i8, ptr %56, i64 4
  %.sroa.612.0.copyload = load i32, ptr %.sroa.612.0..sroa_idx, align 4, !tbaa !5
  %62 = load i32, ptr %35, align 4, !tbaa !5
  %63 = sext i32 %.sroa.612.0.copyload to i64
  %64 = getelementptr inbounds [10000 x i32], ptr @paths, i64 0, i64 %63
  %65 = load i32, ptr %64, align 4, !tbaa !5
  %66 = icmp eq i32 %.sroa.612.0.copyload, %0
  %67 = zext i1 %66 to i32
  %68 = shl i32 %65, %67
  %69 = add nsw i32 %68, %62
  %70 = getelementptr inbounds [100 x i32], ptr @dist, i64 0, i64 %57
  %71 = load i32, ptr %70, align 4, !tbaa !5
  %72 = icmp slt i32 %69, %71
  br i1 %72, label %73, label %74

73:                                               ; preds = %61
  store i32 %69, ptr %70, align 4, !tbaa !5
  br label %74

74:                                               ; preds = %61, %73, %55
  %75 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIP4nodeSt6vectorIS1_SaIS1_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #6
  %76 = call noundef zeroext i1 @_ZN9__gnu_cxxneIP4nodeSt6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESB_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6) #6
  br i1 %76, label %55, label %._crit_edge55

.lr.ph66:                                         ; preds = %._crit_edge57, %._crit_edge63
  %.03965 = phi i32 [ %.136, %._crit_edge63 ], [ %53, %._crit_edge57 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #6
  store i32 0, ptr %7, align 4, !tbaa !5
  %77 = zext nneg i32 %.03965 to i64
  %78 = getelementptr inbounds [100 x %"class.std::vector"], ptr @graph, i64 0, i64 %77
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #6
  %79 = call ptr @_ZNSt6vectorI4nodeSaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %78) #6
  store ptr %79, ptr %8, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #6
  %80 = call ptr @_ZNSt6vectorI4nodeSaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %78) #6
  store ptr %80, ptr %9, align 8
  %81 = call noundef zeroext i1 @_ZN9__gnu_cxxneIP4nodeSt6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESB_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %9) #6
  br i1 %81, label %.lr.ph62, label %._crit_edge63.thread

._crit_edge63.thread:                             ; preds = %.lr.ph66
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #6
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) @spath, ptr noundef nonnull align 4 dereferenceable(4) %7)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #6
  br label %.loopexit.loopexit

._crit_edge63:                                    ; preds = %92
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #6
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) @spath, ptr noundef nonnull align 4 dereferenceable(4) %7)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #6
  %82 = icmp sgt i32 %.136, 0
  br i1 %82, label %.lr.ph66, label %.loopexit.loopexit, !llvm.loop !16

.lr.ph62:                                         ; preds = %.lr.ph66, %92
  %.03560 = phi i32 [ %.136, %92 ], [ 0, %.lr.ph66 ]
  %.03759 = phi i32 [ %.138, %92 ], [ 2147483647, %.lr.ph66 ]
  %83 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIP4nodeSt6vectorIS1_SaIS1_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #6
  %.sroa.0.0.copyload = load i32, ptr %83, align 4, !tbaa !5
  %.sroa.6.0..sroa_idx = getelementptr inbounds i8, ptr %83, i64 4
  %.sroa.6.0.copyload = load i32, ptr %.sroa.6.0..sroa_idx, align 4, !tbaa !5
  %84 = sext i32 %.sroa.0.0.copyload to i64
  %85 = getelementptr inbounds [100 x i32], ptr @dist, i64 0, i64 %84
  %86 = load i32, ptr %85, align 4, !tbaa !5
  %87 = sext i32 %.sroa.6.0.copyload to i64
  %88 = getelementptr inbounds [10000 x i32], ptr @paths, i64 0, i64 %87
  %89 = load i32, ptr %88, align 4, !tbaa !5
  %90 = add nsw i32 %89, %86
  %.not = icmp sgt i32 %90, %.03759
  br i1 %.not, label %92, label %91

91:                                               ; preds = %.lr.ph62
  store i32 %.sroa.6.0.copyload, ptr %7, align 4, !tbaa !5
  br label %92

92:                                               ; preds = %91, %.lr.ph62
  %.138 = phi i32 [ %90, %91 ], [ %.03759, %.lr.ph62 ]
  %.136 = phi i32 [ %.sroa.0.0.copyload, %91 ], [ %.03560, %.lr.ph62 ]
  %93 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIP4nodeSt6vectorIS1_SaIS1_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #6
  %94 = call noundef zeroext i1 @_ZN9__gnu_cxxneIP4nodeSt6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESB_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %9) #6
  br i1 %94, label %.lr.ph62, label %._crit_edge63

.loopexit.loopexit:                               ; preds = %._crit_edge63, %._crit_edge63.thread
  %.pre = load i32, ptr @N, align 4, !tbaa !5
  br label %.loopexit

.loopexit:                                        ; preds = %2, %.loopexit.loopexit, %._crit_edge57
  %95 = phi i32 [ %.pre, %.loopexit.loopexit ], [ %52, %._crit_edge57 ], [ %16, %2 ]
  %96 = add nsw i32 %95, -1
  %97 = sext i32 %96 to i64
  %98 = getelementptr inbounds [100 x i32], ptr @dist, i64 0, i64 %97
  %99 = load i32, ptr %98, align 4, !tbaa !5
  ret i32 %99
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4fillIPiiEvT_S1_RKT0_(ptr noundef, ptr noundef, ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #1

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

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

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

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

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

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

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

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

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

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

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 = { 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 #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #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 = !{!"bool", !7, i64 0}
!11 = !{i8 0, i8 2}
!12 = !{}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}
!16 = distinct !{!16, !14}


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