; LLVM IR from tangjz/acm-icpc :: buaa/oj3rd (727)

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

@t = external dso_local global i32, align 4
@n = external dso_local global i32, align 4
@a = external dso_local global [131072 x i32], align 16
@l = external dso_local global [131072 x i32], align 16
@r = external dso_local global [131072 x i32], align 16
@seg = external dso_local global [262377 x i32], align 16
@ans = external dso_local global i32, align 4
@b = external dso_local global [131072 x %struct.Node], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [4 x i8], align 1

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

; 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)) #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: mustprogress uwtable
declare dso_local noundef i32 @_Z5queryiiiii(i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) #0

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #3 {
  %1 = alloca i32, align 4
  %2 = alloca %struct.Node, align 4
  %3 = alloca i32, align 4
  %4 = alloca %struct.Node, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %11 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @t)
  br label %12

12:                                               ; preds = %199, %0
  %13 = load i32, ptr @t, align 4, !tbaa !5
  %14 = add nsw i32 %13, -1
  store i32 %14, ptr @t, align 4, !tbaa !5
  %15 = icmp ne i32 %13, 0
  br i1 %15, label %16, label %202

16:                                               ; preds = %12
  call void @llvm.memset.p0.i64(ptr align 16 @seg, i8 0, i64 1049508, i1 false)
  %17 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @n)
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #8
  %18 = getelementptr inbounds %struct.Node, ptr %2, i32 0, i32 0
  store i32 -1, ptr %18, align 4, !tbaa !9
  %19 = getelementptr inbounds %struct.Node, ptr %2, i32 0, i32 1
  store i32 0, ptr %19, align 4, !tbaa !11
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 @b, ptr align 4 %2, i64 8, i1 false), !tbaa.struct !12
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #8
  store i32 1, ptr %3, align 4, !tbaa !5
  br label %20

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

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

25:                                               ; preds = %20
  %26 = load i32, ptr %3, align 4, !tbaa !5
  %27 = sext i32 %26 to i64
  %28 = getelementptr inbounds i32, ptr @a, i64 %27
  %29 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %28)
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #8
  %30 = getelementptr inbounds %struct.Node, ptr %4, i32 0, i32 0
  %31 = load i32, ptr %3, align 4, !tbaa !5
  %32 = sext i32 %31 to i64
  %33 = getelementptr inbounds [131072 x i32], ptr @a, i64 0, i64 %32
  %34 = load i32, ptr %33, align 4, !tbaa !5
  store i32 %34, ptr %30, align 4, !tbaa !9
  %35 = getelementptr inbounds %struct.Node, ptr %4, i32 0, i32 1
  %36 = load i32, ptr %3, align 4, !tbaa !5
  store i32 %36, ptr %35, align 4, !tbaa !11
  %37 = load i32, ptr %3, align 4, !tbaa !5
  %38 = sext i32 %37 to i64
  %39 = getelementptr inbounds [131072 x %struct.Node], ptr @b, i64 0, i64 %38
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %39, ptr align 4 %4, i64 8, i1 false), !tbaa.struct !12
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #8
  br label %40

40:                                               ; preds = %25
  %41 = load i32, ptr %3, align 4, !tbaa !5
  %42 = add nsw i32 %41, 1
  store i32 %42, ptr %3, align 4, !tbaa !5
  br label %20, !llvm.loop !13

43:                                               ; preds = %24
  %44 = load i32, ptr @n, align 4, !tbaa !5
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds %struct.Node, ptr @b, i64 %45
  %47 = getelementptr inbounds %struct.Node, ptr %46, i64 1
  call void @_ZSt4sortIP4NodeEvT_S2_(ptr noundef getelementptr inbounds (%struct.Node, ptr @b, i64 1), ptr noundef %47)
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #8
  store i32 1, ptr %5, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #8
  store i32 0, ptr %6, align 4, !tbaa !5
  br label %48

48:                                               ; preds = %80, %43
  %49 = load i32, ptr %5, align 4, !tbaa !5
  %50 = load i32, ptr @n, align 4, !tbaa !5
  %51 = icmp sle i32 %49, %50
  br i1 %51, label %53, label %52

52:                                               ; preds = %48
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #8
  br label %83

53:                                               ; preds = %48
  %54 = load i32, ptr %5, align 4, !tbaa !5
  %55 = sub nsw i32 %54, 1
  %56 = sext i32 %55 to i64
  %57 = getelementptr inbounds [131072 x %struct.Node], ptr @b, i64 0, i64 %56
  %58 = getelementptr inbounds %struct.Node, ptr %57, i32 0, i32 0
  %59 = load i32, ptr %58, align 8, !tbaa !9
  %60 = load i32, ptr %5, align 4, !tbaa !5
  %61 = sext i32 %60 to i64
  %62 = getelementptr inbounds [131072 x %struct.Node], ptr @b, i64 0, i64 %61
  %63 = getelementptr inbounds %struct.Node, ptr %62, i32 0, i32 0
  %64 = load i32, ptr %63, align 8, !tbaa !9
  %65 = icmp eq i32 %59, %64
  br i1 %65, label %66, label %68

66:                                               ; preds = %53
  %67 = load i32, ptr %6, align 4, !tbaa !5
  br label %71

68:                                               ; preds = %53
  %69 = load i32, ptr %6, align 4, !tbaa !5
  %70 = add nsw i32 %69, 1
  store i32 %70, ptr %6, align 4, !tbaa !5
  br label %71

71:                                               ; preds = %68, %66
  %72 = phi i32 [ %67, %66 ], [ %70, %68 ]
  %73 = load i32, ptr %5, align 4, !tbaa !5
  %74 = sext i32 %73 to i64
  %75 = getelementptr inbounds [131072 x %struct.Node], ptr @b, i64 0, i64 %74
  %76 = getelementptr inbounds %struct.Node, ptr %75, i32 0, i32 1
  %77 = load i32, ptr %76, align 4, !tbaa !11
  %78 = sext i32 %77 to i64
  %79 = getelementptr inbounds [131072 x i32], ptr @a, i64 0, i64 %78
  store i32 %72, ptr %79, align 4, !tbaa !5
  br label %80

80:                                               ; preds = %71
  %81 = load i32, ptr %5, align 4, !tbaa !5
  %82 = add nsw i32 %81, 1
  store i32 %82, ptr %5, align 4, !tbaa !5
  br label %48, !llvm.loop !15

83:                                               ; preds = %52
  store i32 1, ptr getelementptr inbounds ([131072 x i32], ptr @l, i64 0, i64 1), align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #8
  store i32 2, ptr %7, align 4, !tbaa !5
  br label %84

84:                                               ; preds = %113, %83
  %85 = load i32, ptr %7, align 4, !tbaa !5
  %86 = load i32, ptr @n, align 4, !tbaa !5
  %87 = icmp sle i32 %85, %86
  br i1 %87, label %89, label %88

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

89:                                               ; preds = %84
  %90 = load i32, ptr %7, align 4, !tbaa !5
  %91 = sub nsw i32 %90, 1
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds [131072 x i32], ptr @a, i64 0, i64 %92
  %94 = load i32, ptr %93, align 4, !tbaa !5
  %95 = load i32, ptr %7, align 4, !tbaa !5
  %96 = sext i32 %95 to i64
  %97 = getelementptr inbounds [131072 x i32], ptr @a, i64 0, i64 %96
  %98 = load i32, ptr %97, align 4, !tbaa !5
  %99 = icmp slt i32 %94, %98
  br i1 %99, label %100, label %107

100:                                              ; preds = %89
  %101 = load i32, ptr %7, align 4, !tbaa !5
  %102 = sub nsw i32 %101, 1
  %103 = sext i32 %102 to i64
  %104 = getelementptr inbounds [131072 x i32], ptr @l, i64 0, i64 %103
  %105 = load i32, ptr %104, align 4, !tbaa !5
  %106 = add nsw i32 %105, 1
  br label %108

107:                                              ; preds = %89
  br label %108

108:                                              ; preds = %107, %100
  %109 = phi i32 [ %106, %100 ], [ 1, %107 ]
  %110 = load i32, ptr %7, align 4, !tbaa !5
  %111 = sext i32 %110 to i64
  %112 = getelementptr inbounds [131072 x i32], ptr @l, i64 0, i64 %111
  store i32 %109, ptr %112, align 4, !tbaa !5
  br label %113

113:                                              ; preds = %108
  %114 = load i32, ptr %7, align 4, !tbaa !5
  %115 = add nsw i32 %114, 1
  store i32 %115, ptr %7, align 4, !tbaa !5
  br label %84, !llvm.loop !16

116:                                              ; preds = %88
  %117 = load i32, ptr @n, align 4, !tbaa !5
  %118 = sext i32 %117 to i64
  %119 = getelementptr inbounds [131072 x i32], ptr @r, i64 0, i64 %118
  store i32 1, ptr %119, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #8
  %120 = load i32, ptr @n, align 4, !tbaa !5
  %121 = sub nsw i32 %120, 1
  store i32 %121, ptr %8, align 4, !tbaa !5
  br label %122

122:                                              ; preds = %150, %116
  %123 = load i32, ptr %8, align 4, !tbaa !5
  %124 = icmp ne i32 %123, 0
  br i1 %124, label %126, label %125

125:                                              ; preds = %122
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #8
  br label %153

126:                                              ; preds = %122
  %127 = load i32, ptr %8, align 4, !tbaa !5
  %128 = sext i32 %127 to i64
  %129 = getelementptr inbounds [131072 x i32], ptr @a, i64 0, i64 %128
  %130 = load i32, ptr %129, align 4, !tbaa !5
  %131 = load i32, ptr %8, align 4, !tbaa !5
  %132 = add nsw i32 %131, 1
  %133 = sext i32 %132 to i64
  %134 = getelementptr inbounds [131072 x i32], ptr @a, i64 0, i64 %133
  %135 = load i32, ptr %134, align 4, !tbaa !5
  %136 = icmp slt i32 %130, %135
  br i1 %136, label %137, label %144

137:                                              ; preds = %126
  %138 = load i32, ptr %8, align 4, !tbaa !5
  %139 = add nsw i32 %138, 1
  %140 = sext i32 %139 to i64
  %141 = getelementptr inbounds [131072 x i32], ptr @r, i64 0, i64 %140
  %142 = load i32, ptr %141, align 4, !tbaa !5
  %143 = add nsw i32 %142, 1
  br label %145

144:                                              ; preds = %126
  br label %145

145:                                              ; preds = %144, %137
  %146 = phi i32 [ %143, %137 ], [ 1, %144 ]
  %147 = load i32, ptr %8, align 4, !tbaa !5
  %148 = sext i32 %147 to i64
  %149 = getelementptr inbounds [131072 x i32], ptr @r, i64 0, i64 %148
  store i32 %146, ptr %149, align 4, !tbaa !5
  br label %150

150:                                              ; preds = %145
  %151 = load i32, ptr %8, align 4, !tbaa !5
  %152 = add nsw i32 %151, -1
  store i32 %152, ptr %8, align 4, !tbaa !5
  br label %122, !llvm.loop !17

153:                                              ; preds = %125
  store i32 0, ptr @ans, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #8
  store i32 1, ptr %9, align 4, !tbaa !5
  br label %154

154:                                              ; preds = %196, %153
  %155 = load i32, ptr %9, align 4, !tbaa !5
  %156 = load i32, ptr @n, align 4, !tbaa !5
  %157 = icmp sle i32 %155, %156
  br i1 %157, label %159, label %158

158:                                              ; preds = %154
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #8
  br label %199

159:                                              ; preds = %154
  %160 = load i32, ptr %9, align 4, !tbaa !5
  %161 = sext i32 %160 to i64
  %162 = getelementptr inbounds [131072 x i32], ptr @a, i64 0, i64 %161
  %163 = load i32, ptr %162, align 4, !tbaa !5
  %164 = icmp sgt i32 %163, 1
  br i1 %164, label %165, label %180

165:                                              ; preds = %159
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #8
  %166 = load i32, ptr %9, align 4, !tbaa !5
  %167 = sext i32 %166 to i64
  %168 = getelementptr inbounds [131072 x i32], ptr @r, i64 0, i64 %167
  %169 = load i32, ptr %168, align 4, !tbaa !5
  %170 = load i32, ptr @n, align 4, !tbaa !5
  %171 = load i32, ptr %9, align 4, !tbaa !5
  %172 = sext i32 %171 to i64
  %173 = getelementptr inbounds [131072 x i32], ptr @a, i64 0, i64 %172
  %174 = load i32, ptr %173, align 4, !tbaa !5
  %175 = sub nsw i32 %174, 1
  %176 = call noundef i32 @_Z5queryiiiii(i32 noundef 1, i32 noundef 1, i32 noundef %170, i32 noundef 1, i32 noundef %175)
  %177 = add nsw i32 %169, %176
  store i32 %177, ptr %10, align 4, !tbaa !5
  %178 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) @ans, ptr noundef nonnull align 4 dereferenceable(4) %10)
  %179 = load i32, ptr %178, align 4, !tbaa !5
  store i32 %179, ptr @ans, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #8
  br label %186

180:                                              ; preds = %159
  %181 = load i32, ptr %9, align 4, !tbaa !5
  %182 = sext i32 %181 to i64
  %183 = getelementptr inbounds [131072 x i32], ptr @r, i64 0, i64 %182
  %184 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) @ans, ptr noundef nonnull align 4 dereferenceable(4) %183)
  %185 = load i32, ptr %184, align 4, !tbaa !5
  store i32 %185, ptr @ans, align 4, !tbaa !5
  br label %186

186:                                              ; preds = %180, %165
  %187 = load i32, ptr @n, align 4, !tbaa !5
  %188 = load i32, ptr %9, align 4, !tbaa !5
  %189 = sext i32 %188 to i64
  %190 = getelementptr inbounds [131072 x i32], ptr @a, i64 0, i64 %189
  %191 = load i32, ptr %190, align 4, !tbaa !5
  %192 = load i32, ptr %9, align 4, !tbaa !5
  %193 = sext i32 %192 to i64
  %194 = getelementptr inbounds [131072 x i32], ptr @l, i64 0, i64 %193
  %195 = load i32, ptr %194, align 4, !tbaa !5
  call void @_Z6updateiiiii(i32 noundef 1, i32 noundef 1, i32 noundef %187, i32 noundef %191, i32 noundef %195)
  br label %196

196:                                              ; preds = %186
  %197 = load i32, ptr %9, align 4, !tbaa !5
  %198 = add nsw i32 %197, 1
  store i32 %198, ptr %9, align 4, !tbaa !5
  br label %154, !llvm.loop !18

199:                                              ; preds = %158
  %200 = load i32, ptr @ans, align 4, !tbaa !5
  %201 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, i32 noundef %200)
  br label %12, !llvm.loop !19

202:                                              ; preds = %12
  ret i32 0
}

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

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

; Function Attrs: 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) #6

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIP4NodeEvT_S2_(ptr noundef, ptr noundef) #7

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

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { 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 #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #6 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #7 = { 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 #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 = !{!"_ZTS4Node", !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 = distinct !{!16, !14}
!17 = distinct !{!17, !14}
!18 = distinct !{!18, !14}
!19 = distinct !{!19, !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.Node = type { i32, i32 }

@t = external dso_local global i32, align 4
@n = external dso_local global i32, align 4
@a = external dso_local global [131072 x i32], align 16
@l = external dso_local local_unnamed_addr global [131072 x i32], align 16
@r = external dso_local global [131072 x i32], align 16
@seg = external dso_local local_unnamed_addr global [262377 x i32], align 16
@ans = external dso_local global i32, align 4
@b = external dso_local global [131072 x %struct.Node], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [4 x i8], align 1

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

; 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 #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: mustprogress uwtable
declare dso_local noundef i32 @_Z5queryiiiii(i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #3 {
  %1 = alloca i32, align 4
  %2 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @t)
  %3 = load i32, ptr @t, align 4, !tbaa !5
  %4 = add nsw i32 %3, -1
  store i32 %4, ptr @t, align 4, !tbaa !5
  %.not74 = icmp eq i32 %3, 0
  br i1 %.not74, label %._crit_edge77, label %.lr.ph76

.lr.ph76:                                         ; preds = %0, %._crit_edge73
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(1049508) @seg, i8 0, i64 1049508, i1 false)
  %5 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n)
  store i32 -1, ptr @b, align 16, !tbaa !5
  store i32 0, ptr getelementptr inbounds (i8, ptr @b, i64 4), align 4, !tbaa !5
  %6 = load i32, ptr @n, align 4, !tbaa !5
  %.not4248 = icmp slt i32 %6, 1
  br i1 %.not4248, label %.lr.ph76.._crit_edge_crit_edge, label %.lr.ph

.lr.ph76.._crit_edge_crit_edge:                   ; preds = %.lr.ph76
  %.pre96 = sext i32 %6 to i64
  br label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %.lr.ph76.._crit_edge_crit_edge
  %.pre-phi = phi i64 [ %.pre96, %.lr.ph76.._crit_edge_crit_edge ], [ %20, %.lr.ph ]
  %gep = getelementptr %struct.Node, ptr getelementptr inbounds (i8, ptr @b, i64 8), i64 %.pre-phi
  call void @_ZSt4sortIP4NodeEvT_S2_(ptr noundef nonnull getelementptr inbounds (i8, ptr @b, i64 8), ptr noundef nonnull %gep)
  %7 = load i32, ptr @n, align 4, !tbaa !5
  %.not4350 = icmp slt i32 %7, 1
  br i1 %.not4350, label %._crit_edge61.thread, label %.lr.ph54.preheader

._crit_edge61.thread:                             ; preds = %._crit_edge
  store i32 1, ptr getelementptr inbounds (i8, ptr @l, i64 4), align 4, !tbaa !5
  %8 = sext i32 %7 to i64
  %9 = getelementptr inbounds [131072 x i32], ptr @r, i64 0, i64 %8
  store i32 1, ptr %9, align 4, !tbaa !5
  %.0356298 = add nsw i32 %7, -1
  br label %.lr.ph67.preheader

.lr.ph54.preheader:                               ; preds = %._crit_edge
  %10 = add nuw i32 %7, 1
  %wide.trip.count = zext i32 %10 to i64
  %.pre = load i32, ptr @b, align 16, !tbaa !9
  %11 = zext nneg i32 %7 to i64
  %12 = add nsw i64 %wide.trip.count, -2
  %xtraiter = and i64 %11, 1
  %13 = icmp eq i64 %12, 0
  br i1 %13, label %._crit_edge55.unr-lcssa, label %.lr.ph54.preheader.new

.lr.ph54.preheader.new:                           ; preds = %.lr.ph54.preheader
  %unroll_iter = and i64 %11, 2147483646
  br label %.lr.ph54

.lr.ph:                                           ; preds = %.lr.ph76, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 1, %.lr.ph76 ]
  %14 = getelementptr inbounds i32, ptr @a, i64 %indvars.iv
  %15 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %14)
  %16 = load i32, ptr %14, align 4, !tbaa !5
  %17 = getelementptr inbounds [131072 x %struct.Node], ptr @b, i64 0, i64 %indvars.iv
  store i32 %16, ptr %17, align 8, !tbaa !5
  %.sroa.4.0..sroa_idx = getelementptr inbounds i8, ptr %17, i64 4
  %18 = trunc nuw nsw i64 %indvars.iv to i32
  store i32 %18, ptr %.sroa.4.0..sroa_idx, align 4, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %19 = load i32, ptr @n, align 4, !tbaa !5
  %20 = sext i32 %19 to i64
  %.not42.not = icmp slt i64 %indvars.iv, %20
  br i1 %.not42.not, label %.lr.ph, label %._crit_edge, !llvm.loop !11

._crit_edge55.unr-lcssa:                          ; preds = %.lr.ph54, %.lr.ph54.preheader
  %.unr = phi i32 [ %.pre, %.lr.ph54.preheader ], [ %42, %.lr.ph54 ]
  %indvars.iv80.unr = phi i64 [ 1, %.lr.ph54.preheader ], [ %indvars.iv.next81.1, %.lr.ph54 ]
  %.03752.unr = phi i32 [ 0, %.lr.ph54.preheader ], [ %45, %.lr.ph54 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge55, label %.lr.ph54.epil

.lr.ph54.epil:                                    ; preds = %._crit_edge55.unr-lcssa
  %21 = getelementptr inbounds [131072 x %struct.Node], ptr @b, i64 0, i64 %indvars.iv80.unr
  %22 = load i32, ptr %21, align 8, !tbaa !9
  %23 = icmp ne i32 %.unr, %22
  %24 = zext i1 %23 to i32
  %25 = add nuw nsw i32 %.03752.unr, %24
  %26 = getelementptr inbounds i8, ptr %21, i64 4
  %27 = load i32, ptr %26, align 4, !tbaa !13
  %28 = sext i32 %27 to i64
  %29 = getelementptr inbounds [131072 x i32], ptr @a, i64 0, i64 %28
  store i32 %25, ptr %29, align 4, !tbaa !5
  br label %._crit_edge55

._crit_edge55:                                    ; preds = %._crit_edge55.unr-lcssa, %.lr.ph54.epil
  store i32 1, ptr getelementptr inbounds (i8, ptr @l, i64 4), align 4, !tbaa !5
  %.not4457 = icmp eq i32 %7, 1
  br i1 %.not4457, label %._crit_edge61, label %.lr.ph60.preheader

.lr.ph60.preheader:                               ; preds = %._crit_edge55
  %.pre94 = load i32, ptr getelementptr inbounds (i8, ptr @a, i64 4), align 4, !tbaa !5
  %xtraiter101 = and i64 %wide.trip.count, 1
  %30 = icmp eq i32 %10, 3
  br i1 %30, label %._crit_edge61.loopexit.unr-lcssa, label %.lr.ph60.preheader.new

.lr.ph60.preheader.new:                           ; preds = %.lr.ph60.preheader
  %unroll_iter105 = and i64 %12, -2
  br label %.lr.ph60

.lr.ph54:                                         ; preds = %.lr.ph54, %.lr.ph54.preheader.new
  %31 = phi i32 [ %.pre, %.lr.ph54.preheader.new ], [ %42, %.lr.ph54 ]
  %indvars.iv80 = phi i64 [ 1, %.lr.ph54.preheader.new ], [ %indvars.iv.next81.1, %.lr.ph54 ]
  %.03752 = phi i32 [ 0, %.lr.ph54.preheader.new ], [ %45, %.lr.ph54 ]
  %niter = phi i64 [ 0, %.lr.ph54.preheader.new ], [ %niter.next.1, %.lr.ph54 ]
  %32 = getelementptr inbounds [131072 x %struct.Node], ptr @b, i64 0, i64 %indvars.iv80
  %33 = load i32, ptr %32, align 8, !tbaa !9
  %34 = icmp ne i32 %31, %33
  %35 = zext i1 %34 to i32
  %36 = add nuw nsw i32 %.03752, %35
  %37 = getelementptr inbounds i8, ptr %32, i64 4
  %38 = load i32, ptr %37, align 4, !tbaa !13
  %39 = sext i32 %38 to i64
  %40 = getelementptr inbounds [131072 x i32], ptr @a, i64 0, i64 %39
  store i32 %36, ptr %40, align 4, !tbaa !5
  %indvars.iv.next81 = add nuw nsw i64 %indvars.iv80, 1
  %41 = getelementptr inbounds [131072 x %struct.Node], ptr @b, i64 0, i64 %indvars.iv.next81
  %42 = load i32, ptr %41, align 8, !tbaa !9
  %43 = icmp ne i32 %33, %42
  %44 = zext i1 %43 to i32
  %45 = add nuw nsw i32 %36, %44
  %46 = getelementptr inbounds i8, ptr %41, i64 4
  %47 = load i32, ptr %46, align 4, !tbaa !13
  %48 = sext i32 %47 to i64
  %49 = getelementptr inbounds [131072 x i32], ptr @a, i64 0, i64 %48
  store i32 %45, ptr %49, align 4, !tbaa !5
  %indvars.iv.next81.1 = add nuw nsw i64 %indvars.iv80, 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_edge55.unr-lcssa, label %.lr.ph54, !llvm.loop !14

._crit_edge61.loopexit.unr-lcssa:                 ; preds = %.lr.ph60, %.lr.ph60.preheader
  %.unr102 = phi i32 [ 1, %.lr.ph60.preheader ], [ %84, %.lr.ph60 ]
  %.unr103 = phi i32 [ %.pre94, %.lr.ph60.preheader ], [ %81, %.lr.ph60 ]
  %indvars.iv83.unr = phi i64 [ 2, %.lr.ph60.preheader ], [ %indvars.iv.next84.1, %.lr.ph60 ]
  %lcmp.mod104.not = icmp eq i64 %xtraiter101, 0
  br i1 %lcmp.mod104.not, label %._crit_edge61, label %.lr.ph60.epil

.lr.ph60.epil:                                    ; preds = %._crit_edge61.loopexit.unr-lcssa
  %50 = getelementptr inbounds [131072 x i32], ptr @a, i64 0, i64 %indvars.iv83.unr
  %51 = load i32, ptr %50, align 4, !tbaa !5
  %52 = icmp slt i32 %.unr103, %51
  %53 = add nsw i32 %.unr102, 1
  %54 = select i1 %52, i32 %53, i32 1
  %55 = getelementptr inbounds [131072 x i32], ptr @l, i64 0, i64 %indvars.iv83.unr
  store i32 %54, ptr %55, align 4, !tbaa !5
  br label %._crit_edge61

._crit_edge61:                                    ; preds = %.lr.ph60.epil, %._crit_edge61.loopexit.unr-lcssa, %._crit_edge55
  %56 = zext nneg i32 %7 to i64
  %57 = getelementptr inbounds [131072 x i32], ptr @r, i64 0, i64 %56
  store i32 1, ptr %57, align 4, !tbaa !5
  %.03562 = add nsw i32 %7, -1
  %.not4563 = icmp eq i32 %.03562, 0
  br i1 %.not4563, label %._crit_edge68.thread, label %.lr.ph67.preheader

._crit_edge68.thread:                             ; preds = %._crit_edge61
  store i32 0, ptr @ans, align 4, !tbaa !5
  br label %.lr.ph72.preheader

.lr.ph67.preheader:                               ; preds = %._crit_edge61.thread, %._crit_edge61
  %.03562100 = phi i32 [ %.0356298, %._crit_edge61.thread ], [ %.03562, %._crit_edge61 ]
  %58 = sext i32 %.03562100 to i64
  %xtraiter107 = and i64 %58, 1
  %lcmp.mod108.not = icmp eq i64 %xtraiter107, 0
  br i1 %lcmp.mod108.not, label %.lr.ph67.prol.loopexit, label %.lr.ph67.prol

.lr.ph67.prol:                                    ; preds = %.lr.ph67.preheader
  %59 = getelementptr inbounds [131072 x i32], ptr @a, i64 0, i64 %58
  %60 = load i32, ptr %59, align 4, !tbaa !5
  %61 = sext i32 %7 to i64
  %62 = getelementptr inbounds [131072 x i32], ptr @a, i64 0, i64 %61
  %63 = load i32, ptr %62, align 4, !tbaa !5
  %64 = icmp slt i32 %60, %63
  br i1 %64, label %65, label %.lr.ph67.prol.loopexit.unr-lcssa

65:                                               ; preds = %.lr.ph67.prol
  %66 = getelementptr inbounds [131072 x i32], ptr @r, i64 0, i64 %61
  %67 = load i32, ptr %66, align 4, !tbaa !5
  %68 = add nsw i32 %67, 1
  br label %.lr.ph67.prol.loopexit.unr-lcssa

.lr.ph67.prol.loopexit.unr-lcssa:                 ; preds = %65, %.lr.ph67.prol
  %69 = phi i32 [ %68, %65 ], [ 1, %.lr.ph67.prol ]
  %70 = getelementptr inbounds [131072 x i32], ptr @r, i64 0, i64 %58
  store i32 %69, ptr %70, align 4, !tbaa !5
  %indvars.iv.next89.prol = add nsw i64 %58, -1
  br label %.lr.ph67.prol.loopexit

.lr.ph67.prol.loopexit:                           ; preds = %.lr.ph67.prol.loopexit.unr-lcssa, %.lr.ph67.preheader
  %indvars.iv88.unr = phi i64 [ %58, %.lr.ph67.preheader ], [ %indvars.iv.next89.prol, %.lr.ph67.prol.loopexit.unr-lcssa ]
  %.035.in64.unr = phi i32 [ %7, %.lr.ph67.preheader ], [ %.03562100, %.lr.ph67.prol.loopexit.unr-lcssa ]
  %71 = icmp eq i32 %.03562100, 1
  br i1 %71, label %._crit_edge68, label %.lr.ph67

.lr.ph60:                                         ; preds = %.lr.ph60, %.lr.ph60.preheader.new
  %72 = phi i32 [ 1, %.lr.ph60.preheader.new ], [ %84, %.lr.ph60 ]
  %73 = phi i32 [ %.pre94, %.lr.ph60.preheader.new ], [ %81, %.lr.ph60 ]
  %indvars.iv83 = phi i64 [ 2, %.lr.ph60.preheader.new ], [ %indvars.iv.next84.1, %.lr.ph60 ]
  %niter106 = phi i64 [ 0, %.lr.ph60.preheader.new ], [ %niter106.next.1, %.lr.ph60 ]
  %74 = getelementptr inbounds [131072 x i32], ptr @a, i64 0, i64 %indvars.iv83
  %75 = load i32, ptr %74, align 8, !tbaa !5
  %76 = icmp slt i32 %73, %75
  %77 = add nsw i32 %72, 1
  %78 = select i1 %76, i32 %77, i32 1
  %79 = getelementptr inbounds [131072 x i32], ptr @l, i64 0, i64 %indvars.iv83
  store i32 %78, ptr %79, align 8, !tbaa !5
  %indvars.iv.next84 = or disjoint i64 %indvars.iv83, 1
  %80 = getelementptr inbounds [131072 x i32], ptr @a, i64 0, i64 %indvars.iv.next84
  %81 = load i32, ptr %80, align 4, !tbaa !5
  %82 = icmp slt i32 %75, %81
  %83 = add nsw i32 %78, 1
  %84 = select i1 %82, i32 %83, i32 1
  %85 = getelementptr inbounds [131072 x i32], ptr @l, i64 0, i64 %indvars.iv.next84
  store i32 %84, ptr %85, align 4, !tbaa !5
  %indvars.iv.next84.1 = add nuw nsw i64 %indvars.iv83, 2
  %niter106.next.1 = add i64 %niter106, 2
  %niter106.ncmp.1 = icmp eq i64 %niter106.next.1, %unroll_iter105
  br i1 %niter106.ncmp.1, label %._crit_edge61.loopexit.unr-lcssa, label %.lr.ph60, !llvm.loop !15

._crit_edge68:                                    ; preds = %108, %.lr.ph67.prol.loopexit
  store i32 0, ptr @ans, align 4, !tbaa !5
  br i1 %.not4350, label %._crit_edge73, label %.lr.ph72.preheader

.lr.ph72.preheader:                               ; preds = %._crit_edge68.thread, %._crit_edge68
  br label %.lr.ph72

.lr.ph67:                                         ; preds = %.lr.ph67.prol.loopexit, %108
  %indvars.iv88 = phi i64 [ %indvars.iv.next89.1, %108 ], [ %indvars.iv88.unr, %.lr.ph67.prol.loopexit ]
  %.035.in64 = phi i32 [ %111, %108 ], [ %.035.in64.unr, %.lr.ph67.prol.loopexit ]
  %86 = getelementptr inbounds [131072 x i32], ptr @a, i64 0, i64 %indvars.iv88
  %87 = load i32, ptr %86, align 4, !tbaa !5
  %88 = sext i32 %.035.in64 to i64
  %89 = getelementptr inbounds [131072 x i32], ptr @a, i64 0, i64 %88
  %90 = load i32, ptr %89, align 4, !tbaa !5
  %91 = icmp slt i32 %87, %90
  br i1 %91, label %92, label %.lr.ph67.1

92:                                               ; preds = %.lr.ph67
  %93 = getelementptr inbounds [131072 x i32], ptr @r, i64 0, i64 %88
  %94 = load i32, ptr %93, align 4, !tbaa !5
  %95 = add nsw i32 %94, 1
  br label %.lr.ph67.1

.lr.ph67.1:                                       ; preds = %.lr.ph67, %92
  %96 = phi i32 [ %95, %92 ], [ 1, %.lr.ph67 ]
  %97 = getelementptr inbounds [131072 x i32], ptr @r, i64 0, i64 %indvars.iv88
  store i32 %96, ptr %97, align 4, !tbaa !5
  %indvars.iv.next89 = add nsw i64 %indvars.iv88, -1
  %98 = getelementptr inbounds [131072 x i32], ptr @a, i64 0, i64 %indvars.iv.next89
  %99 = load i32, ptr %98, align 4, !tbaa !5
  %sext = shl i64 %indvars.iv88, 32
  %100 = ashr exact i64 %sext, 32
  %101 = getelementptr inbounds [131072 x i32], ptr @a, i64 0, i64 %100
  %102 = load i32, ptr %101, align 4, !tbaa !5
  %103 = icmp slt i32 %99, %102
  br i1 %103, label %104, label %108

104:                                              ; preds = %.lr.ph67.1
  %105 = getelementptr inbounds [131072 x i32], ptr @r, i64 0, i64 %100
  %106 = load i32, ptr %105, align 4, !tbaa !5
  %107 = add nsw i32 %106, 1
  br label %108

108:                                              ; preds = %104, %.lr.ph67.1
  %109 = phi i32 [ %107, %104 ], [ 1, %.lr.ph67.1 ]
  %110 = getelementptr inbounds [131072 x i32], ptr @r, i64 0, i64 %indvars.iv.next89
  store i32 %109, ptr %110, align 4, !tbaa !5
  %indvars.iv.next89.1 = add nsw i64 %indvars.iv88, -2
  %.not45.1 = icmp eq i64 %indvars.iv.next89.1, 0
  %111 = trunc nsw i64 %indvars.iv.next89 to i32
  br i1 %.not45.1, label %._crit_edge68, label %.lr.ph67, !llvm.loop !16

._crit_edge73.loopexit:                           ; preds = %132
  %.pre95 = load i32, ptr @ans, align 4, !tbaa !5
  br label %._crit_edge73

._crit_edge73:                                    ; preds = %._crit_edge73.loopexit, %._crit_edge68
  %112 = phi i32 [ %.pre95, %._crit_edge73.loopexit ], [ 0, %._crit_edge68 ]
  %113 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %112)
  %114 = load i32, ptr @t, align 4, !tbaa !5
  %115 = add nsw i32 %114, -1
  store i32 %115, ptr @t, align 4, !tbaa !5
  %.not = icmp eq i32 %114, 0
  br i1 %.not, label %._crit_edge77, label %.lr.ph76, !llvm.loop !17

.lr.ph72:                                         ; preds = %.lr.ph72.preheader, %132
  %indvars.iv91 = phi i64 [ %indvars.iv.next92, %132 ], [ 1, %.lr.ph72.preheader ]
  %116 = phi i32 [ %137, %132 ], [ %7, %.lr.ph72.preheader ]
  %117 = getelementptr inbounds [131072 x i32], ptr @a, i64 0, i64 %indvars.iv91
  %118 = load i32, ptr %117, align 4, !tbaa !5
  %119 = icmp sgt i32 %118, 1
  br i1 %119, label %120, label %128

120:                                              ; preds = %.lr.ph72
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #7
  %121 = getelementptr inbounds [131072 x i32], ptr @r, i64 0, i64 %indvars.iv91
  %122 = load i32, ptr %121, align 4, !tbaa !5
  %123 = add nsw i32 %118, -1
  %124 = call noundef i32 @_Z5queryiiiii(i32 noundef 1, i32 noundef 1, i32 noundef %116, i32 noundef 1, i32 noundef %123)
  %125 = add nsw i32 %124, %122
  store i32 %125, ptr %1, align 4, !tbaa !5
  %126 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) @ans, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %127 = load i32, ptr %126, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #7
  br label %132

128:                                              ; preds = %.lr.ph72
  %129 = getelementptr inbounds [131072 x i32], ptr @r, i64 0, i64 %indvars.iv91
  %130 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) @ans, ptr noundef nonnull align 4 dereferenceable(4) %129)
  %131 = load i32, ptr %130, align 4, !tbaa !5
  br label %132

132:                                              ; preds = %128, %120
  %.sink = phi i32 [ %127, %120 ], [ %131, %128 ]
  store i32 %.sink, ptr @ans, align 4
  %133 = load i32, ptr @n, align 4, !tbaa !5
  %134 = load i32, ptr %117, align 4, !tbaa !5
  %135 = getelementptr inbounds [131072 x i32], ptr @l, i64 0, i64 %indvars.iv91
  %136 = load i32, ptr %135, align 4, !tbaa !5
  call void @_Z6updateiiiii(i32 noundef 1, i32 noundef 1, i32 noundef %133, i32 noundef %134, i32 noundef %136)
  %indvars.iv.next92 = add nuw nsw i64 %indvars.iv91, 1
  %137 = load i32, ptr @n, align 4, !tbaa !5
  %138 = sext i32 %137 to i64
  %.not46.not = icmp slt i64 %indvars.iv91, %138
  br i1 %.not46.not, label %.lr.ph72, label %._crit_edge73.loopexit, !llvm.loop !18

._crit_edge77:                                    ; preds = %._crit_edge73, %0
  ret i32 0
}

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIP4NodeEvT_S2_(ptr noundef, ptr noundef) local_unnamed_addr #6

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

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

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

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


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