; LLVM IR from Tunghohin/Competitive_Coding :: Uva/uva1146.ll (Z7two_satRSt6vectorISt4pairIiiESaIS1_EEi)

; 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.std::pair" = type { i32, i32 }

@head = external dso_local global [4020 x i32], align 16
@tot = external dso_local global i32, align 4
@dfn = external dso_local global [4020 x i32], align 16
@low = external dso_local global [4020 x i32], align 16
@timestamp = external dso_local global i32, align 4
@top = external dso_local global i32, align 4
@in_stk = external dso_local global [4020 x i8], align 16
@scc_id = external dso_local global [4020 x i32], align 16
@scc_cnt = external dso_local global i32, align 4

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z6tarjani(i32 noundef) #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
define dso_local noundef zeroext i1 @_Z7two_satRSt6vectorISt4pairIiiESaIS1_EEi(ptr noundef nonnull align 8 dereferenceable(24) %0, i32 noundef %1) #1 {
  %3 = alloca i1, align 1
  %4 = alloca ptr, align 8
  %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
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store i32 %1, ptr %5, align 4, !tbaa !9
  call void @llvm.memset.p0.i64(ptr align 16 @head, i8 0, i64 16080, i1 false)
  call void @llvm.memset.p0.i64(ptr align 16 @dfn, i8 0, i64 16080, i1 false)
  call void @llvm.memset.p0.i64(ptr align 16 @low, i8 0, i64 16080, i1 false)
  call void @llvm.memset.p0.i64(ptr align 16 @in_stk, i8 0, i64 4020, i1 false)
  call void @llvm.memset.p0.i64(ptr align 16 @scc_id, i8 0, i64 16080, i1 false)
  store i32 0, ptr @scc_cnt, align 4, !tbaa !9
  store i32 0, ptr @top, align 4, !tbaa !9
  store i32 0, ptr @timestamp, align 4, !tbaa !9
  store i32 0, ptr @tot, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  store i32 0, ptr %6, align 4, !tbaa !9
  br label %13

13:                                               ; preds = %151, %2
  %14 = load i32, ptr %6, align 4, !tbaa !9
  %15 = sext i32 %14 to i64
  %16 = load ptr, ptr %4, align 8, !tbaa !5
  %17 = call noundef i64 @_ZNKSt6vectorISt4pairIiiESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %16) #5
  %18 = icmp ult i64 %15, %17
  br i1 %18, label %20, label %19

19:                                               ; preds = %13
  store i32 2, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  br label %154

20:                                               ; preds = %13
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  %21 = load i32, ptr %6, align 4, !tbaa !9
  %22 = add nsw i32 %21, 1
  store i32 %22, ptr %8, align 4, !tbaa !9
  br label %23

23:                                               ; preds = %147, %20
  %24 = load i32, ptr %8, align 4, !tbaa !9
  %25 = sext i32 %24 to i64
  %26 = load ptr, ptr %4, align 8, !tbaa !5
  %27 = call noundef i64 @_ZNKSt6vectorISt4pairIiiESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %26) #5
  %28 = icmp ult i64 %25, %27
  br i1 %28, label %30, label %29

29:                                               ; preds = %23
  store i32 5, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  br label %150

30:                                               ; preds = %23
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  %31 = load i32, ptr %6, align 4, !tbaa !9
  %32 = add nsw i32 %31, 1
  store i32 %32, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  %33 = load i32, ptr %8, align 4, !tbaa !9
  %34 = add nsw i32 %33, 1
  store i32 %34, ptr %10, align 4, !tbaa !9
  %35 = load ptr, ptr %4, align 8, !tbaa !5
  %36 = load i32, ptr %6, align 4, !tbaa !9
  %37 = sext i32 %36 to i64
  %38 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %35, i64 noundef %37) #5
  %39 = getelementptr inbounds %"struct.std::pair", ptr %38, i32 0, i32 0
  %40 = load i32, ptr %39, align 4, !tbaa !11
  %41 = load ptr, ptr %4, align 8, !tbaa !5
  %42 = load i32, ptr %8, align 4, !tbaa !9
  %43 = sext i32 %42 to i64
  %44 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %41, i64 noundef %43) #5
  %45 = getelementptr inbounds %"struct.std::pair", ptr %44, i32 0, i32 0
  %46 = load i32, ptr %45, align 4, !tbaa !11
  %47 = sub nsw i32 %40, %46
  %48 = call i32 @llvm.abs.i32(i32 %47, i1 true)
  %49 = load i32, ptr %5, align 4, !tbaa !9
  %50 = icmp slt i32 %48, %49
  br i1 %50, label %51, label %62

51:                                               ; preds = %30
  %52 = load i32, ptr %9, align 4, !tbaa !9
  %53 = mul nsw i32 2, %52
  %54 = sub nsw i32 %53, 1
  %55 = load i32, ptr %10, align 4, !tbaa !9
  %56 = mul nsw i32 2, %55
  call void @_Z8add_edgeii(i32 noundef %54, i32 noundef %56)
  %57 = load i32, ptr %10, align 4, !tbaa !9
  %58 = mul nsw i32 2, %57
  %59 = sub nsw i32 %58, 1
  %60 = load i32, ptr %9, align 4, !tbaa !9
  %61 = mul nsw i32 2, %60
  call void @_Z8add_edgeii(i32 noundef %59, i32 noundef %61)
  br label %62

62:                                               ; preds = %51, %30
  %63 = load ptr, ptr %4, align 8, !tbaa !5
  %64 = load i32, ptr %6, align 4, !tbaa !9
  %65 = sext i32 %64 to i64
  %66 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %63, i64 noundef %65) #5
  %67 = getelementptr inbounds %"struct.std::pair", ptr %66, i32 0, i32 0
  %68 = load i32, ptr %67, align 4, !tbaa !11
  %69 = load ptr, ptr %4, align 8, !tbaa !5
  %70 = load i32, ptr %8, align 4, !tbaa !9
  %71 = sext i32 %70 to i64
  %72 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %69, i64 noundef %71) #5
  %73 = getelementptr inbounds %"struct.std::pair", ptr %72, i32 0, i32 1
  %74 = load i32, ptr %73, align 4, !tbaa !13
  %75 = sub nsw i32 %68, %74
  %76 = call i32 @llvm.abs.i32(i32 %75, i1 true)
  %77 = load i32, ptr %5, align 4, !tbaa !9
  %78 = icmp slt i32 %76, %77
  br i1 %78, label %79, label %90

79:                                               ; preds = %62
  %80 = load i32, ptr %9, align 4, !tbaa !9
  %81 = mul nsw i32 2, %80
  %82 = sub nsw i32 %81, 1
  %83 = load i32, ptr %10, align 4, !tbaa !9
  %84 = mul nsw i32 2, %83
  %85 = sub nsw i32 %84, 1
  call void @_Z8add_edgeii(i32 noundef %82, i32 noundef %85)
  %86 = load i32, ptr %10, align 4, !tbaa !9
  %87 = mul nsw i32 2, %86
  %88 = load i32, ptr %9, align 4, !tbaa !9
  %89 = mul nsw i32 2, %88
  call void @_Z8add_edgeii(i32 noundef %87, i32 noundef %89)
  br label %90

90:                                               ; preds = %79, %62
  %91 = load ptr, ptr %4, align 8, !tbaa !5
  %92 = load i32, ptr %6, align 4, !tbaa !9
  %93 = sext i32 %92 to i64
  %94 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %91, i64 noundef %93) #5
  %95 = getelementptr inbounds %"struct.std::pair", ptr %94, i32 0, i32 1
  %96 = load i32, ptr %95, align 4, !tbaa !13
  %97 = load ptr, ptr %4, align 8, !tbaa !5
  %98 = load i32, ptr %8, align 4, !tbaa !9
  %99 = sext i32 %98 to i64
  %100 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %97, i64 noundef %99) #5
  %101 = getelementptr inbounds %"struct.std::pair", ptr %100, i32 0, i32 0
  %102 = load i32, ptr %101, align 4, !tbaa !11
  %103 = sub nsw i32 %96, %102
  %104 = call i32 @llvm.abs.i32(i32 %103, i1 true)
  %105 = load i32, ptr %5, align 4, !tbaa !9
  %106 = icmp slt i32 %104, %105
  br i1 %106, label %107, label %118

107:                                              ; preds = %90
  %108 = load i32, ptr %9, align 4, !tbaa !9
  %109 = mul nsw i32 2, %108
  %110 = load i32, ptr %10, align 4, !tbaa !9
  %111 = mul nsw i32 2, %110
  call void @_Z8add_edgeii(i32 noundef %109, i32 noundef %111)
  %112 = load i32, ptr %10, align 4, !tbaa !9
  %113 = mul nsw i32 2, %112
  %114 = sub nsw i32 %113, 1
  %115 = load i32, ptr %9, align 4, !tbaa !9
  %116 = mul nsw i32 2, %115
  %117 = sub nsw i32 %116, 1
  call void @_Z8add_edgeii(i32 noundef %114, i32 noundef %117)
  br label %118

118:                                              ; preds = %107, %90
  %119 = load ptr, ptr %4, align 8, !tbaa !5
  %120 = load i32, ptr %6, align 4, !tbaa !9
  %121 = sext i32 %120 to i64
  %122 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %119, i64 noundef %121) #5
  %123 = getelementptr inbounds %"struct.std::pair", ptr %122, i32 0, i32 1
  %124 = load i32, ptr %123, align 4, !tbaa !13
  %125 = load ptr, ptr %4, align 8, !tbaa !5
  %126 = load i32, ptr %8, align 4, !tbaa !9
  %127 = sext i32 %126 to i64
  %128 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %125, i64 noundef %127) #5
  %129 = getelementptr inbounds %"struct.std::pair", ptr %128, i32 0, i32 1
  %130 = load i32, ptr %129, align 4, !tbaa !13
  %131 = sub nsw i32 %124, %130
  %132 = call i32 @llvm.abs.i32(i32 %131, i1 true)
  %133 = load i32, ptr %5, align 4, !tbaa !9
  %134 = icmp slt i32 %132, %133
  br i1 %134, label %135, label %146

135:                                              ; preds = %118
  %136 = load i32, ptr %9, align 4, !tbaa !9
  %137 = mul nsw i32 2, %136
  %138 = load i32, ptr %10, align 4, !tbaa !9
  %139 = mul nsw i32 2, %138
  %140 = sub nsw i32 %139, 1
  call void @_Z8add_edgeii(i32 noundef %137, i32 noundef %140)
  %141 = load i32, ptr %10, align 4, !tbaa !9
  %142 = mul nsw i32 2, %141
  %143 = load i32, ptr %9, align 4, !tbaa !9
  %144 = mul nsw i32 2, %143
  %145 = sub nsw i32 %144, 1
  call void @_Z8add_edgeii(i32 noundef %142, i32 noundef %145)
  br label %146

146:                                              ; preds = %135, %118
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  br label %147

147:                                              ; preds = %146
  %148 = load i32, ptr %8, align 4, !tbaa !9
  %149 = add nsw i32 %148, 1
  store i32 %149, ptr %8, align 4, !tbaa !9
  br label %23, !llvm.loop !14

150:                                              ; preds = %29
  br label %151

151:                                              ; preds = %150
  %152 = load i32, ptr %6, align 4, !tbaa !9
  %153 = add nsw i32 %152, 1
  store i32 %153, ptr %6, align 4, !tbaa !9
  br label %13, !llvm.loop !16

154:                                              ; preds = %19
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  store i32 1, ptr %11, align 4, !tbaa !9
  br label %155

155:                                              ; preds = %172, %154
  %156 = load i32, ptr %11, align 4, !tbaa !9
  %157 = sext i32 %156 to i64
  %158 = load ptr, ptr %4, align 8, !tbaa !5
  %159 = call noundef i64 @_ZNKSt6vectorISt4pairIiiESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %158) #5
  %160 = mul i64 2, %159
  %161 = icmp ule i64 %157, %160
  br i1 %161, label %163, label %162

162:                                              ; preds = %155
  store i32 8, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  br label %175

163:                                              ; preds = %155
  %164 = load i32, ptr %11, align 4, !tbaa !9
  %165 = sext i32 %164 to i64
  %166 = getelementptr inbounds [4020 x i32], ptr @dfn, i64 0, i64 %165
  %167 = load i32, ptr %166, align 4, !tbaa !9
  %168 = icmp ne i32 %167, 0
  br i1 %168, label %171, label %169

169:                                              ; preds = %163
  %170 = load i32, ptr %11, align 4, !tbaa !9
  call void @_Z6tarjani(i32 noundef %170)
  br label %171

171:                                              ; preds = %169, %163
  br label %172

172:                                              ; preds = %171
  %173 = load i32, ptr %11, align 4, !tbaa !9
  %174 = add nsw i32 %173, 1
  store i32 %174, ptr %11, align 4, !tbaa !9
  br label %155, !llvm.loop !17

175:                                              ; preds = %162
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  store i32 1, ptr %12, align 4, !tbaa !9
  br label %176

176:                                              ; preds = %197, %175
  %177 = load i32, ptr %12, align 4, !tbaa !9
  %178 = sext i32 %177 to i64
  %179 = load ptr, ptr %4, align 8, !tbaa !5
  %180 = call noundef i64 @_ZNKSt6vectorISt4pairIiiESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %179) #5
  %181 = mul i64 2, %180
  %182 = icmp ule i64 %178, %181
  br i1 %182, label %184, label %183

183:                                              ; preds = %176
  store i32 11, ptr %7, align 4
  br label %200

184:                                              ; preds = %176
  %185 = load i32, ptr %12, align 4, !tbaa !9
  %186 = sext i32 %185 to i64
  %187 = getelementptr inbounds [4020 x i32], ptr @scc_id, i64 0, i64 %186
  %188 = load i32, ptr %187, align 4, !tbaa !9
  %189 = load i32, ptr %12, align 4, !tbaa !9
  %190 = add nsw i32 %189, 1
  %191 = sext i32 %190 to i64
  %192 = getelementptr inbounds [4020 x i32], ptr @scc_id, i64 0, i64 %191
  %193 = load i32, ptr %192, align 4, !tbaa !9
  %194 = icmp eq i32 %188, %193
  br i1 %194, label %195, label %196

195:                                              ; preds = %184
  store i1 false, ptr %3, align 1
  store i32 1, ptr %7, align 4
  br label %200

196:                                              ; preds = %184
  br label %197

197:                                              ; preds = %196
  %198 = load i32, ptr %12, align 4, !tbaa !9
  %199 = add nsw i32 %198, 2
  store i32 %199, ptr %12, align 4, !tbaa !9
  br label %176, !llvm.loop !18

200:                                              ; preds = %195, %183
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  %201 = load i32, ptr %7, align 4
  switch i32 %201, label %205 [
    i32 11, label %202
    i32 1, label %203
  ]

202:                                              ; preds = %200
  store i1 true, ptr %3, align 1
  br label %203

203:                                              ; preds = %202, %200
  %204 = load i1, ptr %3, align 1
  ret i1 %204

205:                                              ; preds = %200
  unreachable
}

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #0 align 2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.abs.i32(i32, i1 immarg) #4

attributes #0 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { 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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { 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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 0}
!12 = !{!"_ZTSSt4pairIiiE", !10, i64 0, !10, i64 4}
!13 = !{!12, !10, i64 4}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = distinct !{!16, !15}
!17 = distinct !{!17, !15}
!18 = distinct !{!18, !15}


; 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"

@head = external dso_local local_unnamed_addr global [4020 x i32], align 16
@tot = external dso_local local_unnamed_addr global i32, align 4
@dfn = external dso_local local_unnamed_addr global [4020 x i32], align 16
@low = external dso_local local_unnamed_addr global [4020 x i32], align 16
@timestamp = external dso_local local_unnamed_addr global i32, align 4
@top = external dso_local local_unnamed_addr global i32, align 4
@in_stk = external dso_local local_unnamed_addr global [4020 x i8], align 16
@scc_id = external dso_local local_unnamed_addr global [4020 x i32], align 16
@scc_cnt = external dso_local local_unnamed_addr global i32, align 4

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z6tarjani(i32 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_Z7two_satRSt6vectorISt4pairIiiESaIS1_EEi(ptr noundef nonnull align 8 dereferenceable(24) %0, i32 noundef %1) local_unnamed_addr #1 {
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(16080) @head, i8 0, i64 16080, i1 false)
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(16080) @dfn, i8 0, i64 16080, i1 false)
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(16080) @low, i8 0, i64 16080, i1 false)
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(4020) @in_stk, i8 0, i64 4020, i1 false)
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(16080) @scc_id, i8 0, i64 16080, i1 false)
  store i32 0, ptr @scc_cnt, align 4, !tbaa !5
  store i32 0, ptr @top, align 4, !tbaa !5
  store i32 0, ptr @timestamp, align 4, !tbaa !5
  store i32 0, ptr @tot, align 4, !tbaa !5
  %3 = tail call noundef i64 @_ZNKSt6vectorISt4pairIiiESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #4
  %.not80 = icmp eq i64 %3, 0
  br i1 %.not80, label %.preheader67, label %.lr.ph70

.loopexit:                                        ; preds = %59, %.lr.ph70
  %4 = tail call noundef i64 @_ZNKSt6vectorISt4pairIiiESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #4
  %5 = icmp ugt i64 %4, %indvars.iv.next86
  %indvars.iv.next = add i64 %indvars.iv, 1
  br i1 %5, label %.lr.ph70, label %.preheader67, !llvm.loop !9

.preheader67:                                     ; preds = %.loopexit, %2
  %6 = tail call noundef i64 @_ZNKSt6vectorISt4pairIiiESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #4
  %.mask = and i64 %6, 9223372036854775807
  %.not71 = icmp eq i64 %.mask, 0
  br i1 %.not71, label %.preheader, label %.lr.ph73

.lr.ph70:                                         ; preds = %2, %.loopexit
  %indvars.iv85 = phi i64 [ %indvars.iv.next86, %.loopexit ], [ 0, %2 ]
  %indvars.iv = phi i64 [ %indvars.iv.next, %.loopexit ], [ 1, %2 ]
  %indvars.iv.next86 = add nuw nsw i64 %indvars.iv85, 1
  %7 = tail call noundef i64 @_ZNKSt6vectorISt4pairIiiESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #4
  %8 = icmp ugt i64 %7, %indvars.iv.next86
  br i1 %8, label %.lr.ph, label %.loopexit

.lr.ph:                                           ; preds = %.lr.ph70
  %indvars.iv.next86.tr = trunc i64 %indvars.iv.next86 to i32
  %9 = shl i32 %indvars.iv.next86.tr, 1
  %10 = add nsw i32 %9, -1
  br label %11

11:                                               ; preds = %.lr.ph, %59
  %indvars.iv82 = phi i64 [ %indvars.iv, %.lr.ph ], [ %indvars.iv.next83, %59 ]
  %indvars.iv.next83 = add nuw nsw i64 %indvars.iv82, 1
  %12 = tail call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %indvars.iv85) #4
  %13 = load i32, ptr %12, align 4, !tbaa !11
  %14 = tail call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %indvars.iv82) #4
  %15 = load i32, ptr %14, align 4, !tbaa !11
  %16 = sub nsw i32 %13, %15
  %17 = tail call i32 @llvm.abs.i32(i32 %16, i1 true)
  %18 = icmp slt i32 %17, %1
  br i1 %18, label %19, label %22

19:                                               ; preds = %11
  %indvars.iv.next83.tr = trunc i64 %indvars.iv.next83 to i32
  %20 = shl i32 %indvars.iv.next83.tr, 1
  tail call void @_Z8add_edgeii(i32 noundef %10, i32 noundef %20)
  %21 = add nsw i32 %20, -1
  tail call void @_Z8add_edgeii(i32 noundef %21, i32 noundef %9)
  br label %22

22:                                               ; preds = %19, %11
  %23 = tail call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %indvars.iv85) #4
  %24 = load i32, ptr %23, align 4, !tbaa !11
  %25 = tail call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %indvars.iv82) #4
  %26 = getelementptr inbounds i8, ptr %25, i64 4
  %27 = load i32, ptr %26, align 4, !tbaa !13
  %28 = sub nsw i32 %24, %27
  %29 = tail call i32 @llvm.abs.i32(i32 %28, i1 true)
  %30 = icmp slt i32 %29, %1
  br i1 %30, label %31, label %34

31:                                               ; preds = %22
  %indvars.iv.next83.tr93 = trunc i64 %indvars.iv.next83 to i32
  %32 = shl i32 %indvars.iv.next83.tr93, 1
  %33 = add nsw i32 %32, -1
  tail call void @_Z8add_edgeii(i32 noundef %10, i32 noundef %33)
  tail call void @_Z8add_edgeii(i32 noundef %32, i32 noundef %9)
  br label %34

34:                                               ; preds = %31, %22
  %35 = tail call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %indvars.iv85) #4
  %36 = getelementptr inbounds i8, ptr %35, i64 4
  %37 = load i32, ptr %36, align 4, !tbaa !13
  %38 = tail call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %indvars.iv82) #4
  %39 = load i32, ptr %38, align 4, !tbaa !11
  %40 = sub nsw i32 %37, %39
  %41 = tail call i32 @llvm.abs.i32(i32 %40, i1 true)
  %42 = icmp slt i32 %41, %1
  br i1 %42, label %43, label %46

43:                                               ; preds = %34
  %indvars.iv.next83.tr94 = trunc i64 %indvars.iv.next83 to i32
  %44 = shl i32 %indvars.iv.next83.tr94, 1
  tail call void @_Z8add_edgeii(i32 noundef %9, i32 noundef %44)
  %45 = add nsw i32 %44, -1
  tail call void @_Z8add_edgeii(i32 noundef %45, i32 noundef %10)
  br label %46

46:                                               ; preds = %43, %34
  %47 = tail call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %indvars.iv85) #4
  %48 = getelementptr inbounds i8, ptr %47, i64 4
  %49 = load i32, ptr %48, align 4, !tbaa !13
  %50 = tail call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %indvars.iv82) #4
  %51 = getelementptr inbounds i8, ptr %50, i64 4
  %52 = load i32, ptr %51, align 4, !tbaa !13
  %53 = sub nsw i32 %49, %52
  %54 = tail call i32 @llvm.abs.i32(i32 %53, i1 true)
  %55 = icmp slt i32 %54, %1
  br i1 %55, label %56, label %59

56:                                               ; preds = %46
  %indvars.iv.next83.tr95 = trunc i64 %indvars.iv.next83 to i32
  %57 = shl i32 %indvars.iv.next83.tr95, 1
  %58 = add nsw i32 %57, -1
  tail call void @_Z8add_edgeii(i32 noundef %9, i32 noundef %58)
  tail call void @_Z8add_edgeii(i32 noundef %57, i32 noundef %10)
  br label %59

59:                                               ; preds = %56, %46
  %60 = tail call noundef i64 @_ZNKSt6vectorISt4pairIiiESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #4
  %61 = icmp ugt i64 %60, %indvars.iv.next83
  br i1 %61, label %11, label %.loopexit, !llvm.loop !14

.preheader:                                       ; preds = %67, %.preheader67
  %62 = tail call noundef i64 @_ZNKSt6vectorISt4pairIiiESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #4
  %.mask81 = and i64 %62, 9223372036854775807
  %.not6574 = icmp eq i64 %.mask81, 0
  br i1 %.not6574, label %._crit_edge, label %.lr.ph77

.lr.ph73:                                         ; preds = %.preheader67, %67
  %indvars.iv88 = phi i64 [ %indvars.iv.next89, %67 ], [ 1, %.preheader67 ]
  %63 = getelementptr inbounds [4020 x i32], ptr @dfn, i64 0, i64 %indvars.iv88
  %64 = load i32, ptr %63, align 4, !tbaa !5
  %.not66 = icmp eq i32 %64, 0
  br i1 %.not66, label %65, label %67

65:                                               ; preds = %.lr.ph73
  %66 = trunc nuw nsw i64 %indvars.iv88 to i32
  tail call void @_Z6tarjani(i32 noundef %66)
  br label %67

67:                                               ; preds = %.lr.ph73, %65
  %indvars.iv.next89 = add nuw nsw i64 %indvars.iv88, 1
  %68 = tail call noundef i64 @_ZNKSt6vectorISt4pairIiiESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #4
  %69 = shl i64 %68, 1
  %.not.not = icmp ugt i64 %69, %indvars.iv88
  br i1 %.not.not, label %.lr.ph73, label %.preheader, !llvm.loop !15

70:                                               ; preds = %.lr.ph77
  %indvars.iv.next92 = add nuw nsw i64 %indvars.iv91, 2
  %71 = tail call noundef i64 @_ZNKSt6vectorISt4pairIiiESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #4
  %72 = shl i64 %71, 1
  %.not65 = icmp ult i64 %72, %indvars.iv.next92
  br i1 %.not65, label %._crit_edge, label %.lr.ph77, !llvm.loop !16

.lr.ph77:                                         ; preds = %.preheader, %70
  %indvars.iv91 = phi i64 [ %indvars.iv.next92, %70 ], [ 1, %.preheader ]
  %73 = getelementptr inbounds [4020 x i32], ptr @scc_id, i64 0, i64 %indvars.iv91
  %74 = load i32, ptr %73, align 4, !tbaa !5
  %75 = add nuw nsw i64 %indvars.iv91, 1
  %76 = getelementptr inbounds [4020 x i32], ptr @scc_id, i64 0, i64 %75
  %77 = load i32, ptr %76, align 4, !tbaa !5
  %.not = icmp ne i32 %74, %77
  br i1 %.not, label %70, label %._crit_edge

._crit_edge:                                      ; preds = %70, %.lr.ph77, %.preheader
  %.not65.lcssa = phi i1 [ true, %.preheader ], [ %.not, %.lr.ph77 ], [ %.not, %70 ]
  ret i1 %.not65.lcssa
}

; 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 nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorISt4pairIiiESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #0 align 2

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.abs.i32(i32, i1 immarg) #3

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 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 nounwind willreturn memory(argmem: write) }
attributes #3 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { 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 = !{!12, !6, i64 0}
!12 = !{!"_ZTSSt4pairIiiE", !6, i64 0, !6, i64 4}
!13 = !{!12, !6, i64 4}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10}


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