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

; 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 }
%struct.Seg = type { i32, i32 }

@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@lnk = external dso_local global [30001 x i32], align 16
@dep = external dso_local global [30001 x i32], align 16
@fa = external dso_local global [30001 x i32], align 16
@idx = external dso_local global [30001 x i32], align 16
@top = external dso_local global [30001 x i32], align 16
@e = external dso_local global [60003 x %struct.Edge], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [7 x i8], align 1
@__const.main.ret = external hidden unnamed_addr constant %struct.Seg, align 4
@.str.3 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_Z10tree_buildi(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 nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #5

; Function Attrs: mustprogress uwtable
declare dso_local i64 @_Z7seg_queiiii(i32 noundef, i32 noundef, i32 noundef, i32 noundef) #3

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #6 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca %struct.Edge, align 4
  %6 = alloca %struct.Edge, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca [7 x i8], align 1
  %12 = alloca %struct.Seg, align 4
  %13 = alloca %struct.Seg, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca %struct.Seg, align 4
  %17 = alloca %struct.Seg, align 4
  %18 = alloca %struct.Seg, align 4
  %19 = alloca %struct.Seg, align 4
  store i32 0, ptr %1, align 4
  %20 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @n)
  %21 = load i32, ptr @n, align 4, !tbaa !5
  %22 = sext i32 %21 to i64
  %23 = mul i64 %22, 4
  call void @llvm.memset.p0.i64(ptr align 4 getelementptr inbounds (i32, ptr @lnk, i64 1), i8 -1, i64 %23, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #8
  store i32 0, ptr %2, align 4, !tbaa !5
  br label %24

24:                                               ; preds = %66, %0
  %25 = load i32, ptr %2, align 4, !tbaa !5
  %26 = load i32, ptr @n, align 4, !tbaa !5
  %27 = sub nsw i32 %26, 1
  %28 = icmp slt i32 %25, %27
  br i1 %28, label %30, label %29

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

30:                                               ; preds = %24
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #8
  %31 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %3, ptr noundef %4)
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #8
  %32 = getelementptr inbounds %struct.Edge, ptr %5, i32 0, i32 0
  %33 = load i32, ptr %3, align 4, !tbaa !5
  %34 = sext i32 %33 to i64
  %35 = getelementptr inbounds [30001 x i32], ptr @lnk, i64 0, i64 %34
  %36 = load i32, ptr %35, align 4, !tbaa !5
  store i32 %36, ptr %32, align 4, !tbaa !9
  %37 = getelementptr inbounds %struct.Edge, ptr %5, i32 0, i32 1
  %38 = load i32, ptr %4, align 4, !tbaa !5
  store i32 %38, ptr %37, align 4, !tbaa !11
  %39 = load i32, ptr %2, align 4, !tbaa !5
  %40 = shl i32 %39, 1
  %41 = sext i32 %40 to i64
  %42 = getelementptr inbounds [60003 x %struct.Edge], ptr @e, i64 0, i64 %41
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %42, ptr align 4 %5, i64 8, i1 false), !tbaa.struct !12
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #8
  %43 = load i32, ptr %2, align 4, !tbaa !5
  %44 = shl i32 %43, 1
  %45 = load i32, ptr %3, align 4, !tbaa !5
  %46 = sext i32 %45 to i64
  %47 = getelementptr inbounds [30001 x i32], ptr @lnk, i64 0, i64 %46
  store i32 %44, ptr %47, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #8
  %48 = getelementptr inbounds %struct.Edge, ptr %6, i32 0, i32 0
  %49 = load i32, ptr %4, align 4, !tbaa !5
  %50 = sext i32 %49 to i64
  %51 = getelementptr inbounds [30001 x i32], ptr @lnk, i64 0, i64 %50
  %52 = load i32, ptr %51, align 4, !tbaa !5
  store i32 %52, ptr %48, align 4, !tbaa !9
  %53 = getelementptr inbounds %struct.Edge, ptr %6, i32 0, i32 1
  %54 = load i32, ptr %3, align 4, !tbaa !5
  store i32 %54, ptr %53, align 4, !tbaa !11
  %55 = load i32, ptr %2, align 4, !tbaa !5
  %56 = shl i32 %55, 1
  %57 = or i32 %56, 1
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds [60003 x %struct.Edge], ptr @e, i64 0, i64 %58
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %59, ptr align 4 %6, i64 8, i1 false), !tbaa.struct !12
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #8
  %60 = load i32, ptr %2, align 4, !tbaa !5
  %61 = shl i32 %60, 1
  %62 = or i32 %61, 1
  %63 = load i32, ptr %4, align 4, !tbaa !5
  %64 = sext i32 %63 to i64
  %65 = getelementptr inbounds [30001 x i32], ptr @lnk, i64 0, i64 %64
  store i32 %62, ptr %65, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #8
  br label %66

66:                                               ; preds = %30
  %67 = load i32, ptr %2, align 4, !tbaa !5
  %68 = add nsw i32 %67, 1
  store i32 %68, ptr %2, align 4, !tbaa !5
  br label %24, !llvm.loop !13

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

70:                                               ; preds = %83, %69
  %71 = load i32, ptr %7, align 4, !tbaa !5
  %72 = load i32, ptr @n, align 4, !tbaa !5
  %73 = icmp sle i32 %71, %72
  br i1 %73, label %75, label %74

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

75:                                               ; preds = %70
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #8
  %76 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %8)
  %77 = load i32, ptr @n, align 4, !tbaa !5
  %78 = load i32, ptr %7, align 4, !tbaa !5
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds [30001 x i32], ptr @idx, i64 0, i64 %79
  %81 = load i32, ptr %80, align 4, !tbaa !5
  %82 = load i32, ptr %8, align 4, !tbaa !5
  call void @_Z7seg_updiiii(i32 noundef 1, i32 noundef %77, i32 noundef %81, i32 noundef %82)
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #8
  br label %83

83:                                               ; preds = %75
  %84 = load i32, ptr %7, align 4, !tbaa !5
  %85 = add nsw i32 %84, 1
  store i32 %85, ptr %7, align 4, !tbaa !5
  br label %70, !llvm.loop !15

86:                                               ; preds = %74
  %87 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @m)
  br label %88

88:                                               ; preds = %208, %86
  %89 = load i32, ptr @m, align 4, !tbaa !5
  %90 = add nsw i32 %89, -1
  store i32 %90, ptr @m, align 4, !tbaa !5
  %91 = icmp ne i32 %89, 0
  br i1 %91, label %92, label %209

92:                                               ; preds = %88
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #8
  call void @llvm.lifetime.start.p0(i64 7, ptr %11) #8
  %93 = getelementptr inbounds [7 x i8], ptr %11, i64 0, i64 0
  %94 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.2, ptr noundef %93, ptr noundef %9, ptr noundef %10)
  %95 = getelementptr inbounds [7 x i8], ptr %11, i64 0, i64 0
  %96 = load i8, ptr %95, align 1, !tbaa !16
  %97 = sext i8 %96 to i32
  %98 = icmp eq i32 %97, 67
  br i1 %98, label %99, label %106

99:                                               ; preds = %92
  %100 = load i32, ptr @n, align 4, !tbaa !5
  %101 = load i32, ptr %9, align 4, !tbaa !5
  %102 = sext i32 %101 to i64
  %103 = getelementptr inbounds [30001 x i32], ptr @idx, i64 0, i64 %102
  %104 = load i32, ptr %103, align 4, !tbaa !5
  %105 = load i32, ptr %10, align 4, !tbaa !5
  call void @_Z7seg_updiiii(i32 noundef 1, i32 noundef %100, i32 noundef %104, i32 noundef %105)
  br label %208

106:                                              ; preds = %92
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %12, ptr align 4 @__const.main.ret, i64 8, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #8
  %107 = load i32, ptr %9, align 4, !tbaa !5
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds [30001 x i32], ptr @top, i64 0, i64 %108
  %110 = load i32, ptr %109, align 4, !tbaa !5
  store i32 %110, ptr %14, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #8
  %111 = load i32, ptr %10, align 4, !tbaa !5
  %112 = sext i32 %111 to i64
  %113 = getelementptr inbounds [30001 x i32], ptr @top, i64 0, i64 %112
  %114 = load i32, ptr %113, align 4, !tbaa !5
  store i32 %114, ptr %15, align 4, !tbaa !5
  br label %115

115:                                              ; preds = %153, %106
  %116 = load i32, ptr %14, align 4, !tbaa !5
  %117 = load i32, ptr %15, align 4, !tbaa !5
  %118 = icmp ne i32 %116, %117
  br i1 %118, label %120, label %119

119:                                              ; preds = %115
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #8
  br label %162

120:                                              ; preds = %115
  %121 = load i32, ptr %14, align 4, !tbaa !5
  %122 = sext i32 %121 to i64
  %123 = getelementptr inbounds [30001 x i32], ptr @dep, i64 0, i64 %122
  %124 = load i32, ptr %123, align 4, !tbaa !5
  %125 = load i32, ptr %15, align 4, !tbaa !5
  %126 = sext i32 %125 to i64
  %127 = getelementptr inbounds [30001 x i32], ptr @dep, i64 0, i64 %126
  %128 = load i32, ptr %127, align 4, !tbaa !5
  %129 = icmp slt i32 %124, %128
  br i1 %129, label %130, label %131

130:                                              ; preds = %120
  call void @_ZSt4swapIiENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4) %9, ptr noundef nonnull align 4 dereferenceable(4) %10) #8
  call void @_ZSt4swapIiENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4) %14, ptr noundef nonnull align 4 dereferenceable(4) %15) #8
  br label %131

131:                                              ; preds = %130, %120
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #8
  %132 = load i32, ptr @n, align 4, !tbaa !5
  %133 = load i32, ptr %14, align 4, !tbaa !5
  %134 = sext i32 %133 to i64
  %135 = getelementptr inbounds [30001 x i32], ptr @idx, i64 0, i64 %134
  %136 = load i32, ptr %135, align 4, !tbaa !5
  %137 = load i32, ptr %9, align 4, !tbaa !5
  %138 = sext i32 %137 to i64
  %139 = getelementptr inbounds [30001 x i32], ptr @idx, i64 0, i64 %138
  %140 = load i32, ptr %139, align 4, !tbaa !5
  %141 = call i64 @_Z7seg_queiiii(i32 noundef 1, i32 noundef %132, i32 noundef %136, i32 noundef %140)
  store i64 %141, ptr %16, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %13, ptr align 4 %16, i64 8, i1 false), !tbaa.struct !12
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #8
  %142 = getelementptr inbounds %struct.Seg, ptr %17, i32 0, i32 0
  %143 = getelementptr inbounds %struct.Seg, ptr %12, i32 0, i32 0
  %144 = getelementptr inbounds %struct.Seg, ptr %13, i32 0, i32 0
  %145 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %143, ptr noundef nonnull align 4 dereferenceable(4) %144)
  %146 = load i32, ptr %145, align 4, !tbaa !5
  store i32 %146, ptr %142, align 4, !tbaa !17
  %147 = getelementptr inbounds %struct.Seg, ptr %17, i32 0, i32 1
  %148 = getelementptr inbounds %struct.Seg, ptr %12, i32 0, i32 1
  %149 = load i32, ptr %148, align 4, !tbaa !19
  %150 = getelementptr inbounds %struct.Seg, ptr %13, i32 0, i32 1
  %151 = load i32, ptr %150, align 4, !tbaa !19
  %152 = add nsw i32 %149, %151
  store i32 %152, ptr %147, align 4, !tbaa !19
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %12, ptr align 4 %17, i64 8, i1 false), !tbaa.struct !12
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #8
  br label %153

153:                                              ; preds = %131
  %154 = load i32, ptr %14, align 4, !tbaa !5
  %155 = sext i32 %154 to i64
  %156 = getelementptr inbounds [30001 x i32], ptr @fa, i64 0, i64 %155
  %157 = load i32, ptr %156, align 4, !tbaa !5
  store i32 %157, ptr %9, align 4, !tbaa !5
  %158 = load i32, ptr %9, align 4, !tbaa !5
  %159 = sext i32 %158 to i64
  %160 = getelementptr inbounds [30001 x i32], ptr @top, i64 0, i64 %159
  %161 = load i32, ptr %160, align 4, !tbaa !5
  store i32 %161, ptr %14, align 4, !tbaa !5
  br label %115, !llvm.loop !20

162:                                              ; preds = %119
  %163 = load i32, ptr %9, align 4, !tbaa !5
  %164 = sext i32 %163 to i64
  %165 = getelementptr inbounds [30001 x i32], ptr @dep, i64 0, i64 %164
  %166 = load i32, ptr %165, align 4, !tbaa !5
  %167 = load i32, ptr %10, align 4, !tbaa !5
  %168 = sext i32 %167 to i64
  %169 = getelementptr inbounds [30001 x i32], ptr @dep, i64 0, i64 %168
  %170 = load i32, ptr %169, align 4, !tbaa !5
  %171 = icmp sgt i32 %166, %170
  br i1 %171, label %172, label %173

172:                                              ; preds = %162
  call void @_ZSt4swapIiENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4) %9, ptr noundef nonnull align 4 dereferenceable(4) %10) #8
  br label %173

173:                                              ; preds = %172, %162
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #8
  %174 = load i32, ptr @n, align 4, !tbaa !5
  %175 = load i32, ptr %9, align 4, !tbaa !5
  %176 = sext i32 %175 to i64
  %177 = getelementptr inbounds [30001 x i32], ptr @idx, i64 0, i64 %176
  %178 = load i32, ptr %177, align 4, !tbaa !5
  %179 = load i32, ptr %10, align 4, !tbaa !5
  %180 = sext i32 %179 to i64
  %181 = getelementptr inbounds [30001 x i32], ptr @idx, i64 0, i64 %180
  %182 = load i32, ptr %181, align 4, !tbaa !5
  %183 = call i64 @_Z7seg_queiiii(i32 noundef 1, i32 noundef %174, i32 noundef %178, i32 noundef %182)
  store i64 %183, ptr %18, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %13, ptr align 4 %18, i64 8, i1 false), !tbaa.struct !12
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #8
  %184 = getelementptr inbounds %struct.Seg, ptr %19, i32 0, i32 0
  %185 = getelementptr inbounds %struct.Seg, ptr %12, i32 0, i32 0
  %186 = getelementptr inbounds %struct.Seg, ptr %13, i32 0, i32 0
  %187 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %185, ptr noundef nonnull align 4 dereferenceable(4) %186)
  %188 = load i32, ptr %187, align 4, !tbaa !5
  store i32 %188, ptr %184, align 4, !tbaa !17
  %189 = getelementptr inbounds %struct.Seg, ptr %19, i32 0, i32 1
  %190 = getelementptr inbounds %struct.Seg, ptr %12, i32 0, i32 1
  %191 = load i32, ptr %190, align 4, !tbaa !19
  %192 = getelementptr inbounds %struct.Seg, ptr %13, i32 0, i32 1
  %193 = load i32, ptr %192, align 4, !tbaa !19
  %194 = add nsw i32 %191, %193
  store i32 %194, ptr %189, align 4, !tbaa !19
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %12, ptr align 4 %19, i64 8, i1 false), !tbaa.struct !12
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #8
  %195 = getelementptr inbounds [7 x i8], ptr %11, i64 0, i64 1
  %196 = load i8, ptr %195, align 1, !tbaa !16
  %197 = sext i8 %196 to i32
  %198 = icmp eq i32 %197, 77
  br i1 %198, label %199, label %202

199:                                              ; preds = %173
  %200 = getelementptr inbounds %struct.Seg, ptr %12, i32 0, i32 0
  %201 = load i32, ptr %200, align 4, !tbaa !17
  br label %205

202:                                              ; preds = %173
  %203 = getelementptr inbounds %struct.Seg, ptr %12, i32 0, i32 1
  %204 = load i32, ptr %203, align 4, !tbaa !19
  br label %205

205:                                              ; preds = %202, %199
  %206 = phi i32 [ %201, %199 ], [ %204, %202 ]
  %207 = call i32 (ptr, ...) @printf(ptr noundef @.str.3, i32 noundef %206)
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #8
  br label %208

208:                                              ; preds = %205, %99
  call void @llvm.lifetime.end.p0(i64 7, ptr %11) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #8
  br label %88, !llvm.loop !21

209:                                              ; preds = %88
  ret i32 0
}

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

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

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

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

%struct.Edge = type { i32, i32 }
%struct.Seg = type { i32, i32 }

@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@lnk = external dso_local local_unnamed_addr global [30001 x i32], align 16
@dep = external dso_local local_unnamed_addr global [30001 x i32], align 16
@fa = external dso_local local_unnamed_addr global [30001 x i32], align 16
@idx = external dso_local local_unnamed_addr global [30001 x i32], align 16
@top = external dso_local local_unnamed_addr global [30001 x i32], align 16
@e = external dso_local local_unnamed_addr global [60003 x %struct.Edge], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [7 x i8], align 1
@__const.main.ret = external hidden unnamed_addr constant %struct.Seg, align 4
@.str.3 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_Z10tree_buildi(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 nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local i64 @_Z7seg_queiiii(i32 noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #3

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #5 {
  %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 [7 x i8], align 1
  %7 = alloca %struct.Seg, align 8
  %8 = alloca %struct.Seg, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n)
  %12 = load i32, ptr @n, align 4, !tbaa !5
  %13 = sext i32 %12 to i64
  %14 = shl nsw i64 %13, 2
  tail call void @llvm.memset.p0.i64(ptr nonnull align 4 getelementptr inbounds (i8, ptr @lnk, i64 4), i8 -1, i64 %14, i1 false)
  %15 = icmp sgt i32 %12, 1
  br i1 %15, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %0
  call void @_Z10tree_buildi(i32 noundef 1)
  %16 = load i32, ptr @n, align 4, !tbaa !5
  %.not23 = icmp slt i32 %16, 1
  br i1 %.not23, label %._crit_edge27, label %.lr.ph26

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %0 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #7
  %17 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %1, ptr noundef nonnull %2)
  %18 = load i32, ptr %1, align 4, !tbaa !5
  %19 = sext i32 %18 to i64
  %20 = getelementptr inbounds [30001 x i32], ptr @lnk, i64 0, i64 %19
  %21 = load i32, ptr %20, align 4, !tbaa !5
  %22 = load i32, ptr %2, align 4, !tbaa !5
  %23 = shl nuw i64 %indvars.iv, 1
  %24 = trunc nuw i64 %23 to i32
  %sext = shl i64 %indvars.iv, 33
  %25 = ashr exact i64 %sext, 32
  %26 = getelementptr inbounds [60003 x %struct.Edge], ptr @e, i64 0, i64 %25
  store i32 %21, ptr %26, align 16, !tbaa !5
  %.sroa.410.0..sroa_idx = getelementptr inbounds i8, ptr %26, i64 4
  store i32 %22, ptr %.sroa.410.0..sroa_idx, align 4, !tbaa !5
  store i32 %24, ptr %20, align 4, !tbaa !5
  %27 = sext i32 %22 to i64
  %28 = getelementptr inbounds [30001 x i32], ptr @lnk, i64 0, i64 %27
  %29 = load i32, ptr %28, align 4, !tbaa !5
  %30 = trunc i64 %23 to i32
  %31 = or disjoint i32 %30, 1
  %32 = sext i32 %31 to i64
  %33 = getelementptr inbounds [60003 x %struct.Edge], ptr @e, i64 0, i64 %32
  store i32 %29, ptr %33, align 8, !tbaa !5
  %.sroa.48.0..sroa_idx = getelementptr inbounds i8, ptr %33, i64 4
  store i32 %18, ptr %.sroa.48.0..sroa_idx, align 4, !tbaa !5
  store i32 %31, ptr %28, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #7
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %34 = load i32, ptr @n, align 4, !tbaa !5
  %35 = add nsw i32 %34, -1
  %36 = sext i32 %35 to i64
  %37 = icmp slt i64 %indvars.iv.next, %36
  br i1 %37, label %.lr.ph, label %._crit_edge, !llvm.loop !9

._crit_edge27:                                    ; preds = %.lr.ph26, %._crit_edge
  %38 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @m)
  %39 = load i32, ptr @m, align 4, !tbaa !5
  %40 = add nsw i32 %39, -1
  store i32 %40, ptr @m, align 4, !tbaa !5
  %.not2032 = icmp eq i32 %39, 0
  br i1 %.not2032, label %._crit_edge35, label %.lr.ph34

.lr.ph34:                                         ; preds = %._crit_edge27
  %41 = load i64, ptr @__const.main.ret, align 4
  %42 = getelementptr inbounds i8, ptr %7, i64 4
  %43 = getelementptr inbounds i8, ptr %8, i64 4
  %44 = getelementptr inbounds i8, ptr %6, i64 1
  br label %52

.lr.ph26:                                         ; preds = %._crit_edge, %.lr.ph26
  %indvars.iv37 = phi i64 [ %indvars.iv.next38, %.lr.ph26 ], [ 1, %._crit_edge ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #7
  %45 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %3)
  %46 = load i32, ptr @n, align 4, !tbaa !5
  %47 = getelementptr inbounds [30001 x i32], ptr @idx, i64 0, i64 %indvars.iv37
  %48 = load i32, ptr %47, align 4, !tbaa !5
  %49 = load i32, ptr %3, align 4, !tbaa !5
  call void @_Z7seg_updiiii(i32 noundef 1, i32 noundef %46, i32 noundef %48, i32 noundef %49)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #7
  %indvars.iv.next38 = add nuw nsw i64 %indvars.iv37, 1
  %50 = load i32, ptr @n, align 4, !tbaa !5
  %51 = sext i32 %50 to i64
  %.not.not = icmp slt i64 %indvars.iv37, %51
  br i1 %.not.not, label %.lr.ph26, label %._crit_edge27, !llvm.loop !11

52:                                               ; preds = %.lr.ph34, %130
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #7
  call void @llvm.lifetime.start.p0(i64 7, ptr nonnull %6) #7
  %53 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.2, ptr noundef nonnull %6, ptr noundef nonnull %4, ptr noundef nonnull %5)
  %54 = load i8, ptr %6, align 1, !tbaa !12
  %55 = icmp eq i8 %54, 67
  br i1 %55, label %56, label %63

56:                                               ; preds = %52
  %57 = load i32, ptr @n, align 4, !tbaa !5
  %58 = load i32, ptr %4, align 4, !tbaa !5
  %59 = sext i32 %58 to i64
  %60 = getelementptr inbounds [30001 x i32], ptr @idx, i64 0, i64 %59
  %61 = load i32, ptr %60, align 4, !tbaa !5
  %62 = load i32, ptr %5, align 4, !tbaa !5
  call void @_Z7seg_updiiii(i32 noundef 1, i32 noundef %57, i32 noundef %61, i32 noundef %62)
  br label %130

63:                                               ; preds = %52
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #7
  store i64 %41, ptr %7, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #7
  %64 = load i32, ptr %4, align 4, !tbaa !5
  %65 = sext i32 %64 to i64
  %66 = getelementptr inbounds [30001 x i32], ptr @top, i64 0, i64 %65
  %67 = load i32, ptr %66, align 4, !tbaa !5
  store i32 %67, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #7
  %68 = load i32, ptr %5, align 4, !tbaa !5
  %69 = sext i32 %68 to i64
  %70 = getelementptr inbounds [30001 x i32], ptr @top, i64 0, i64 %69
  %71 = load i32, ptr %70, align 4, !tbaa !5
  store i32 %71, ptr %10, align 4, !tbaa !5
  %.not2128 = icmp eq i32 %67, %71
  br i1 %.not2128, label %._crit_edge31, label %.lr.ph30

._crit_edge31.loopexit:                           ; preds = %89
  %.pre41 = load i32, ptr %5, align 4, !tbaa !5
  %.pre46 = sext i32 %.pre41 to i64
  br label %._crit_edge31

._crit_edge31:                                    ; preds = %._crit_edge31.loopexit, %63
  %.pre-phi47 = phi i64 [ %.pre46, %._crit_edge31.loopexit ], [ %69, %63 ]
  %.pre-phi = phi i64 [ %107, %._crit_edge31.loopexit ], [ %65, %63 ]
  %72 = phi i32 [ %106, %._crit_edge31.loopexit ], [ %64, %63 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #7
  %73 = getelementptr inbounds [30001 x i32], ptr @dep, i64 0, i64 %.pre-phi
  %74 = load i32, ptr %73, align 4, !tbaa !5
  %75 = getelementptr inbounds [30001 x i32], ptr @dep, i64 0, i64 %.pre-phi47
  %76 = load i32, ptr %75, align 4, !tbaa !5
  %77 = icmp sgt i32 %74, %76
  br i1 %77, label %111, label %112

.lr.ph30:                                         ; preds = %63, %89
  %78 = phi i32 [ %106, %89 ], [ %64, %63 ]
  %79 = phi i32 [ %110, %89 ], [ %71, %63 ]
  %80 = phi i32 [ %109, %89 ], [ %67, %63 ]
  %81 = sext i32 %80 to i64
  %82 = getelementptr inbounds [30001 x i32], ptr @dep, i64 0, i64 %81
  %83 = load i32, ptr %82, align 4, !tbaa !5
  %84 = sext i32 %79 to i64
  %85 = getelementptr inbounds [30001 x i32], ptr @dep, i64 0, i64 %84
  %86 = load i32, ptr %85, align 4, !tbaa !5
  %87 = icmp slt i32 %83, %86
  br i1 %87, label %88, label %89

88:                                               ; preds = %.lr.ph30
  call void @_ZSt4swapIiENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 4 dereferenceable(4) %5) #7
  call void @_ZSt4swapIiENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4) %9, ptr noundef nonnull align 4 dereferenceable(4) %10) #7
  %.pre = load i32, ptr %9, align 4, !tbaa !5
  %.pre40 = load i32, ptr %4, align 4, !tbaa !5
  %.pre44 = sext i32 %.pre to i64
  br label %89

89:                                               ; preds = %88, %.lr.ph30
  %.pre-phi45 = phi i64 [ %.pre44, %88 ], [ %81, %.lr.ph30 ]
  %90 = phi i32 [ %.pre40, %88 ], [ %78, %.lr.ph30 ]
  %91 = load i32, ptr @n, align 4, !tbaa !5
  %92 = getelementptr inbounds [30001 x i32], ptr @idx, i64 0, i64 %.pre-phi45
  %93 = load i32, ptr %92, align 4, !tbaa !5
  %94 = sext i32 %90 to i64
  %95 = getelementptr inbounds [30001 x i32], ptr @idx, i64 0, i64 %94
  %96 = load i32, ptr %95, align 4, !tbaa !5
  %97 = call i64 @_Z7seg_queiiii(i32 noundef 1, i32 noundef %91, i32 noundef %93, i32 noundef %96)
  store i64 %97, ptr %8, align 8
  %98 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %7, ptr noundef nonnull align 4 dereferenceable(4) %8)
  %99 = load i32, ptr %98, align 4, !tbaa !5
  %100 = load i32, ptr %42, align 4, !tbaa !13
  %101 = load i32, ptr %43, align 4, !tbaa !13
  %102 = add nsw i32 %101, %100
  store i32 %99, ptr %7, align 8, !tbaa !5
  store i32 %102, ptr %42, align 4, !tbaa !5
  %103 = load i32, ptr %9, align 4, !tbaa !5
  %104 = sext i32 %103 to i64
  %105 = getelementptr inbounds [30001 x i32], ptr @fa, i64 0, i64 %104
  %106 = load i32, ptr %105, align 4, !tbaa !5
  store i32 %106, ptr %4, align 4, !tbaa !5
  %107 = sext i32 %106 to i64
  %108 = getelementptr inbounds [30001 x i32], ptr @top, i64 0, i64 %107
  %109 = load i32, ptr %108, align 4, !tbaa !5
  store i32 %109, ptr %9, align 4, !tbaa !5
  %110 = load i32, ptr %10, align 4, !tbaa !5
  %.not21 = icmp eq i32 %109, %110
  br i1 %.not21, label %._crit_edge31.loopexit, label %.lr.ph30, !llvm.loop !15

111:                                              ; preds = %._crit_edge31
  call void @_ZSt4swapIiENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 4 dereferenceable(4) %5) #7
  %.pre42 = load i32, ptr %4, align 4, !tbaa !5
  %.pre43 = load i32, ptr %5, align 4, !tbaa !5
  %.pre48 = sext i32 %.pre43 to i64
  br label %112

112:                                              ; preds = %111, %._crit_edge31
  %.pre-phi49 = phi i64 [ %.pre48, %111 ], [ %.pre-phi47, %._crit_edge31 ]
  %113 = phi i32 [ %.pre42, %111 ], [ %72, %._crit_edge31 ]
  %114 = load i32, ptr @n, align 4, !tbaa !5
  %115 = sext i32 %113 to i64
  %116 = getelementptr inbounds [30001 x i32], ptr @idx, i64 0, i64 %115
  %117 = load i32, ptr %116, align 4, !tbaa !5
  %118 = getelementptr inbounds [30001 x i32], ptr @idx, i64 0, i64 %.pre-phi49
  %119 = load i32, ptr %118, align 4, !tbaa !5
  %120 = call i64 @_Z7seg_queiiii(i32 noundef 1, i32 noundef %114, i32 noundef %117, i32 noundef %119)
  store i64 %120, ptr %8, align 8
  %121 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %7, ptr noundef nonnull align 4 dereferenceable(4) %8)
  %122 = load i32, ptr %121, align 4, !tbaa !5
  %123 = load i32, ptr %42, align 4, !tbaa !13
  %124 = load i32, ptr %43, align 4, !tbaa !13
  %125 = add nsw i32 %124, %123
  store i32 %122, ptr %7, align 8, !tbaa !5
  store i32 %125, ptr %42, align 4, !tbaa !5
  %126 = load i8, ptr %44, align 1, !tbaa !12
  %127 = icmp eq i8 %126, 77
  %128 = select i1 %127, i32 %122, i32 %125
  %129 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %128)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  br label %130

130:                                              ; preds = %112, %56
  call void @llvm.lifetime.end.p0(i64 7, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #7
  %131 = load i32, ptr @m, align 4, !tbaa !5
  %132 = add nsw i32 %131, -1
  store i32 %132, ptr @m, align 4, !tbaa !5
  %.not20 = icmp eq i32 %131, 0
  br i1 %.not20, label %._crit_edge35, label %52, !llvm.loop !16

._crit_edge35:                                    ; preds = %130, %._crit_edge27
  ret i32 0
}

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

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

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #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 nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { 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 #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 = { 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 #6 = { 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 #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 = !{!7, !7, i64 0}
!13 = !{!14, !6, i64 4}
!14 = !{!"_ZTS3Seg", !6, i64 0, !6, i64 4}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10}


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