; LLVM IR from abeaumont/competitive-programming :: codeforces/1316/d.ll (Z3dfsii)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::vector<long long>, std::allocator<std::vector<long long>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<long long>, std::allocator<std::vector<long long>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<long long>, std::allocator<std::vector<long long>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<long long>, std::allocator<std::vector<long long>>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@n = external dso_local global i32, align 4
@xs = external dso_local global %"class.std::vector", align 8
@ys = external dso_local global %"class.std::vector", align 8
@zs = external dso_local global %"class.std::vector", align 8
@s = external dso_local global %"class.std::vector", align 8
@__const._Z3dfsii.dys = external hidden unnamed_addr constant [4 x i32], align 16
@__const._Z3dfsii.dxs = external hidden unnamed_addr constant [4 x i32], align 16

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_Z3dfsii(i32 noundef %0, i32 noundef %1) #0 {
  %3 = alloca i1, align 1
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca [4 x i32], align 16
  %7 = alloca [4 x i32], align 16
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  store i32 %0, ptr %4, align 4, !tbaa !5
  store i32 %1, ptr %5, align 4, !tbaa !5
  %12 = load i32, ptr %4, align 4, !tbaa !5
  %13 = sext i32 %12 to i64
  %14 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IxSaIxEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @s, i64 noundef %13) #4
  %15 = load i32, ptr %5, align 4, !tbaa !5
  %16 = sext i32 %15 to i64
  %17 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %16) #4
  store i64 1, ptr %17, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 16, ptr %6) #4
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %6, ptr align 16 @__const._Z3dfsii.dys, i64 16, i1 false)
  call void @llvm.lifetime.start.p0(i64 16, ptr %7) #4
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %7, ptr align 16 @__const._Z3dfsii.dxs, i64 16, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  store i32 0, ptr %8, align 4, !tbaa !5
  br label %18

18:                                               ; preds = %176, %2
  %19 = load i32, ptr %8, align 4, !tbaa !5
  %20 = icmp slt i32 %19, 4
  br i1 %20, label %22, label %21

21:                                               ; preds = %18
  store i32 2, ptr %9, align 4
  br label %179

22:                                               ; preds = %18
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  %23 = load i32, ptr %4, align 4, !tbaa !5
  %24 = load i32, ptr %8, align 4, !tbaa !5
  %25 = sext i32 %24 to i64
  %26 = getelementptr inbounds [4 x i32], ptr %6, i64 0, i64 %25
  %27 = load i32, ptr %26, align 4, !tbaa !5
  %28 = add nsw i32 %23, %27
  store i32 %28, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  %29 = load i32, ptr %5, align 4, !tbaa !5
  %30 = load i32, ptr %8, align 4, !tbaa !5
  %31 = sext i32 %30 to i64
  %32 = getelementptr inbounds [4 x i32], ptr %7, i64 0, i64 %31
  %33 = load i32, ptr %32, align 4, !tbaa !5
  %34 = add nsw i32 %29, %33
  store i32 %34, ptr %11, align 4, !tbaa !5
  %35 = load i32, ptr %10, align 4, !tbaa !5
  %36 = icmp slt i32 %35, 0
  br i1 %36, label %41, label %37

37:                                               ; preds = %22
  %38 = load i32, ptr %10, align 4, !tbaa !5
  %39 = load i32, ptr @n, align 4, !tbaa !5
  %40 = icmp sge i32 %38, %39
  br i1 %40, label %41, label %42

41:                                               ; preds = %37, %22
  store i32 4, ptr %9, align 4
  br label %173

42:                                               ; preds = %37
  %43 = load i32, ptr %11, align 4, !tbaa !5
  %44 = icmp slt i32 %43, 0
  br i1 %44, label %49, label %45

45:                                               ; preds = %42
  %46 = load i32, ptr %11, align 4, !tbaa !5
  %47 = load i32, ptr @n, align 4, !tbaa !5
  %48 = icmp sge i32 %46, %47
  br i1 %48, label %49, label %50

49:                                               ; preds = %45, %42
  store i32 4, ptr %9, align 4
  br label %173

50:                                               ; preds = %45
  %51 = load i32, ptr %10, align 4, !tbaa !5
  %52 = sext i32 %51 to i64
  %53 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IxSaIxEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @xs, i64 noundef %52) #4
  %54 = load i32, ptr %11, align 4, !tbaa !5
  %55 = sext i32 %54 to i64
  %56 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %53, i64 noundef %55) #4
  %57 = load i64, ptr %56, align 8, !tbaa !9
  %58 = icmp ne i64 %57, -2
  br i1 %58, label %68, label %59

59:                                               ; preds = %50
  %60 = load i32, ptr %10, align 4, !tbaa !5
  %61 = sext i32 %60 to i64
  %62 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IxSaIxEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @ys, i64 noundef %61) #4
  %63 = load i32, ptr %11, align 4, !tbaa !5
  %64 = sext i32 %63 to i64
  %65 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %62, i64 noundef %64) #4
  %66 = load i64, ptr %65, align 8, !tbaa !9
  %67 = icmp ne i64 %66, -2
  br i1 %67, label %68, label %69

68:                                               ; preds = %59, %50
  store i32 4, ptr %9, align 4
  br label %173

69:                                               ; preds = %59
  %70 = load i32, ptr %10, align 4, !tbaa !5
  %71 = sext i32 %70 to i64
  %72 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IxSaIxEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @s, i64 noundef %71) #4
  %73 = load i32, ptr %11, align 4, !tbaa !5
  %74 = sext i32 %73 to i64
  %75 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %72, i64 noundef %74) #4
  %76 = load i64, ptr %75, align 8, !tbaa !9
  %77 = icmp ne i64 %76, 0
  br i1 %77, label %78, label %118

78:                                               ; preds = %69
  %79 = load i32, ptr %8, align 4, !tbaa !5
  %80 = icmp eq i32 %79, 0
  br i1 %80, label %81, label %88

81:                                               ; preds = %78
  %82 = load i32, ptr %4, align 4, !tbaa !5
  %83 = sext i32 %82 to i64
  %84 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IxSaIxEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @zs, i64 noundef %83) #4
  %85 = load i32, ptr %5, align 4, !tbaa !5
  %86 = sext i32 %85 to i64
  %87 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %84, i64 noundef %86) #4
  store i64 85, ptr %87, align 8, !tbaa !9
  br label %117

88:                                               ; preds = %78
  %89 = load i32, ptr %8, align 4, !tbaa !5
  %90 = icmp eq i32 %89, 1
  br i1 %90, label %91, label %98

91:                                               ; preds = %88
  %92 = load i32, ptr %4, align 4, !tbaa !5
  %93 = sext i32 %92 to i64
  %94 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IxSaIxEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @zs, i64 noundef %93) #4
  %95 = load i32, ptr %5, align 4, !tbaa !5
  %96 = sext i32 %95 to i64
  %97 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %94, i64 noundef %96) #4
  store i64 76, ptr %97, align 8, !tbaa !9
  br label %116

98:                                               ; preds = %88
  %99 = load i32, ptr %8, align 4, !tbaa !5
  %100 = icmp eq i32 %99, 2
  br i1 %100, label %101, label %108

101:                                              ; preds = %98
  %102 = load i32, ptr %4, align 4, !tbaa !5
  %103 = sext i32 %102 to i64
  %104 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IxSaIxEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @zs, i64 noundef %103) #4
  %105 = load i32, ptr %5, align 4, !tbaa !5
  %106 = sext i32 %105 to i64
  %107 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %104, i64 noundef %106) #4
  store i64 68, ptr %107, align 8, !tbaa !9
  br label %115

108:                                              ; preds = %98
  %109 = load i32, ptr %4, align 4, !tbaa !5
  %110 = sext i32 %109 to i64
  %111 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IxSaIxEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @zs, i64 noundef %110) #4
  %112 = load i32, ptr %5, align 4, !tbaa !5
  %113 = sext i32 %112 to i64
  %114 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %111, i64 noundef %113) #4
  store i64 82, ptr %114, align 8, !tbaa !9
  br label %115

115:                                              ; preds = %108, %101
  br label %116

116:                                              ; preds = %115, %91
  br label %117

117:                                              ; preds = %116, %81
  store i1 true, ptr %3, align 1
  store i32 1, ptr %9, align 4
  br label %173

118:                                              ; preds = %69
  %119 = load i32, ptr %10, align 4, !tbaa !5
  %120 = sext i32 %119 to i64
  %121 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IxSaIxEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @zs, i64 noundef %120) #4
  %122 = load i32, ptr %11, align 4, !tbaa !5
  %123 = sext i32 %122 to i64
  %124 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %121, i64 noundef %123) #4
  %125 = load i64, ptr %124, align 8, !tbaa !9
  %126 = icmp ne i64 %125, 0
  br i1 %126, label %127, label %128

127:                                              ; preds = %118
  store i32 4, ptr %9, align 4
  br label %173

128:                                              ; preds = %118
  %129 = load i32, ptr %10, align 4, !tbaa !5
  %130 = load i32, ptr %11, align 4, !tbaa !5
  %131 = call noundef zeroext i1 @_Z3dfsii(i32 noundef %129, i32 noundef %130)
  br i1 %131, label %132, label %172

132:                                              ; preds = %128
  %133 = load i32, ptr %8, align 4, !tbaa !5
  %134 = icmp eq i32 %133, 0
  br i1 %134, label %135, label %142

135:                                              ; preds = %132
  %136 = load i32, ptr %4, align 4, !tbaa !5
  %137 = sext i32 %136 to i64
  %138 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IxSaIxEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @zs, i64 noundef %137) #4
  %139 = load i32, ptr %5, align 4, !tbaa !5
  %140 = sext i32 %139 to i64
  %141 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %138, i64 noundef %140) #4
  store i64 85, ptr %141, align 8, !tbaa !9
  br label %171

142:                                              ; preds = %132
  %143 = load i32, ptr %8, align 4, !tbaa !5
  %144 = icmp eq i32 %143, 1
  br i1 %144, label %145, label %152

145:                                              ; preds = %142
  %146 = load i32, ptr %4, align 4, !tbaa !5
  %147 = sext i32 %146 to i64
  %148 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IxSaIxEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @zs, i64 noundef %147) #4
  %149 = load i32, ptr %5, align 4, !tbaa !5
  %150 = sext i32 %149 to i64
  %151 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %148, i64 noundef %150) #4
  store i64 76, ptr %151, align 8, !tbaa !9
  br label %170

152:                                              ; preds = %142
  %153 = load i32, ptr %8, align 4, !tbaa !5
  %154 = icmp eq i32 %153, 2
  br i1 %154, label %155, label %162

155:                                              ; preds = %152
  %156 = load i32, ptr %4, align 4, !tbaa !5
  %157 = sext i32 %156 to i64
  %158 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IxSaIxEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @zs, i64 noundef %157) #4
  %159 = load i32, ptr %5, align 4, !tbaa !5
  %160 = sext i32 %159 to i64
  %161 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %158, i64 noundef %160) #4
  store i64 68, ptr %161, align 8, !tbaa !9
  br label %169

162:                                              ; preds = %152
  %163 = load i32, ptr %4, align 4, !tbaa !5
  %164 = sext i32 %163 to i64
  %165 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IxSaIxEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @zs, i64 noundef %164) #4
  %166 = load i32, ptr %5, align 4, !tbaa !5
  %167 = sext i32 %166 to i64
  %168 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %165, i64 noundef %167) #4
  store i64 82, ptr %168, align 8, !tbaa !9
  br label %169

169:                                              ; preds = %162, %155
  br label %170

170:                                              ; preds = %169, %145
  br label %171

171:                                              ; preds = %170, %135
  store i1 true, ptr %3, align 1
  store i32 1, ptr %9, align 4
  br label %173

172:                                              ; preds = %128
  store i32 0, ptr %9, align 4
  br label %173

173:                                              ; preds = %172, %171, %127, %117, %68, %49, %41
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  %174 = load i32, ptr %9, align 4
  switch i32 %174, label %179 [
    i32 0, label %175
    i32 4, label %176
  ]

175:                                              ; preds = %173
  br label %176

176:                                              ; preds = %175, %173
  %177 = load i32, ptr %8, align 4, !tbaa !5
  %178 = add nsw i32 %177, 1
  store i32 %178, ptr %8, align 4, !tbaa !5
  br label %18, !llvm.loop !11

179:                                              ; preds = %173, %21
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  %180 = load i32, ptr %9, align 4
  switch i32 %180, label %182 [
    i32 2, label %181
  ]

181:                                              ; preds = %179
  store i1 false, ptr %3, align 1
  store i32 1, ptr %9, align 4
  br label %182

182:                                              ; preds = %181, %179
  call void @llvm.lifetime.end.p0(i64 16, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %6) #4
  %183 = load i1, ptr %3, align 1
  ret i1 %183
}

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

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

; 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 nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #3

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

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


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

%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::vector<long long>, std::allocator<std::vector<long long>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<long long>, std::allocator<std::vector<long long>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<long long>, std::allocator<std::vector<long long>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<long long>, std::allocator<std::vector<long long>>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@n = external dso_local local_unnamed_addr global i32, align 4
@xs = external dso_local global %"class.std::vector", align 8
@ys = external dso_local global %"class.std::vector", align 8
@zs = external dso_local global %"class.std::vector", align 8
@s = external dso_local global %"class.std::vector", align 8
@__const._Z3dfsii.dys = external hidden unnamed_addr constant [4 x i32], align 16
@__const._Z3dfsii.dxs = external hidden unnamed_addr constant [4 x i32], align 16

; Function Attrs: mustprogress nounwind uwtable
define dso_local noundef zeroext i1 @_Z3dfsii(i32 noundef %0, i32 noundef %1) local_unnamed_addr #0 {
  %3 = sext i32 %0 to i64
  %4 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IxSaIxEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @s, i64 noundef %3) #1
  %5 = sext i32 %1 to i64
  %6 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %5) #1
  store i64 1, ptr %6, align 8, !tbaa !5
  %7 = load i32, ptr @__const._Z3dfsii.dys, align 16, !tbaa !9
  %8 = add nsw i32 %7, %0
  %9 = load i32, ptr @__const._Z3dfsii.dxs, align 16, !tbaa !9
  %10 = add nsw i32 %9, %1
  %11 = icmp slt i32 %8, 0
  br i1 %11, label %36, label %12

12:                                               ; preds = %2
  %13 = load i32, ptr @n, align 4, !tbaa !9
  %.not = icmp slt i32 %8, %13
  br i1 %.not, label %14, label %36

14:                                               ; preds = %12
  %15 = icmp sgt i32 %10, -1
  %.not52 = icmp slt i32 %10, %13
  %or.cond = and i1 %15, %.not52
  br i1 %or.cond, label %16, label %36

16:                                               ; preds = %14
  %17 = zext nneg i32 %8 to i64
  %18 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IxSaIxEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @xs, i64 noundef %17) #1
  %19 = zext nneg i32 %10 to i64
  %20 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %18, i64 noundef %19) #1
  %21 = load i64, ptr %20, align 8, !tbaa !5
  %.not53 = icmp eq i64 %21, -2
  br i1 %.not53, label %22, label %36

22:                                               ; preds = %16
  %23 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IxSaIxEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @ys, i64 noundef %17) #1
  %24 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %23, i64 noundef %19) #1
  %25 = load i64, ptr %24, align 8, !tbaa !5
  %.not54 = icmp eq i64 %25, -2
  br i1 %.not54, label %26, label %36

26:                                               ; preds = %22
  %27 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IxSaIxEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @s, i64 noundef %17) #1
  %28 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %27, i64 noundef %19) #1
  %29 = load i64, ptr %28, align 8, !tbaa !5
  %.not55 = icmp eq i64 %29, 0
  br i1 %.not55, label %30, label %.critedge.sink.split

30:                                               ; preds = %26
  %31 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IxSaIxEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @zs, i64 noundef %17) #1
  %32 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %31, i64 noundef %19) #1
  %33 = load i64, ptr %32, align 8, !tbaa !5
  %.not56 = icmp eq i64 %33, 0
  br i1 %.not56, label %34, label %36

34:                                               ; preds = %30
  %35 = tail call noundef zeroext i1 @_Z3dfsii(i32 noundef %8, i32 noundef %10)
  br i1 %35, label %.critedge.sink.split, label %36

36:                                               ; preds = %12, %2, %14, %22, %16, %30, %34
  %37 = load i32, ptr getelementptr inbounds (i8, ptr @__const._Z3dfsii.dys, i64 4), align 4, !tbaa !9
  %38 = add nsw i32 %37, %0
  %39 = load i32, ptr getelementptr inbounds (i8, ptr @__const._Z3dfsii.dxs, i64 4), align 4, !tbaa !9
  %40 = add nsw i32 %39, %1
  %41 = icmp slt i32 %38, 0
  br i1 %41, label %66, label %42

42:                                               ; preds = %36
  %43 = load i32, ptr @n, align 4, !tbaa !9
  %.not.1 = icmp slt i32 %38, %43
  br i1 %.not.1, label %44, label %66

44:                                               ; preds = %42
  %45 = icmp sgt i32 %40, -1
  %.not52.1 = icmp slt i32 %40, %43
  %or.cond.1 = and i1 %45, %.not52.1
  br i1 %or.cond.1, label %46, label %66

46:                                               ; preds = %44
  %47 = zext nneg i32 %38 to i64
  %48 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IxSaIxEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @xs, i64 noundef %47) #1
  %49 = zext nneg i32 %40 to i64
  %50 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %48, i64 noundef %49) #1
  %51 = load i64, ptr %50, align 8, !tbaa !5
  %.not53.1 = icmp eq i64 %51, -2
  br i1 %.not53.1, label %52, label %66

52:                                               ; preds = %46
  %53 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IxSaIxEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @ys, i64 noundef %47) #1
  %54 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %53, i64 noundef %49) #1
  %55 = load i64, ptr %54, align 8, !tbaa !5
  %.not54.1 = icmp eq i64 %55, -2
  br i1 %.not54.1, label %56, label %66

56:                                               ; preds = %52
  %57 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IxSaIxEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @s, i64 noundef %47) #1
  %58 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %57, i64 noundef %49) #1
  %59 = load i64, ptr %58, align 8, !tbaa !5
  %.not55.1 = icmp eq i64 %59, 0
  br i1 %.not55.1, label %60, label %.critedge.sink.split

60:                                               ; preds = %56
  %61 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IxSaIxEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @zs, i64 noundef %47) #1
  %62 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %61, i64 noundef %49) #1
  %63 = load i64, ptr %62, align 8, !tbaa !5
  %.not56.1 = icmp eq i64 %63, 0
  br i1 %.not56.1, label %64, label %66

64:                                               ; preds = %60
  %65 = tail call noundef zeroext i1 @_Z3dfsii(i32 noundef %38, i32 noundef %40)
  br i1 %65, label %.critedge.sink.split, label %66

66:                                               ; preds = %64, %60, %52, %46, %44, %42, %36
  %67 = load i32, ptr getelementptr inbounds (i8, ptr @__const._Z3dfsii.dys, i64 8), align 8, !tbaa !9
  %68 = add nsw i32 %67, %0
  %69 = load i32, ptr getelementptr inbounds (i8, ptr @__const._Z3dfsii.dxs, i64 8), align 8, !tbaa !9
  %70 = add nsw i32 %69, %1
  %71 = icmp slt i32 %68, 0
  br i1 %71, label %96, label %72

72:                                               ; preds = %66
  %73 = load i32, ptr @n, align 4, !tbaa !9
  %.not.2 = icmp slt i32 %68, %73
  br i1 %.not.2, label %74, label %96

74:                                               ; preds = %72
  %75 = icmp sgt i32 %70, -1
  %.not52.2 = icmp slt i32 %70, %73
  %or.cond.2 = and i1 %75, %.not52.2
  br i1 %or.cond.2, label %76, label %96

76:                                               ; preds = %74
  %77 = zext nneg i32 %68 to i64
  %78 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IxSaIxEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @xs, i64 noundef %77) #1
  %79 = zext nneg i32 %70 to i64
  %80 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %78, i64 noundef %79) #1
  %81 = load i64, ptr %80, align 8, !tbaa !5
  %.not53.2 = icmp eq i64 %81, -2
  br i1 %.not53.2, label %82, label %96

82:                                               ; preds = %76
  %83 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IxSaIxEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @ys, i64 noundef %77) #1
  %84 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %83, i64 noundef %79) #1
  %85 = load i64, ptr %84, align 8, !tbaa !5
  %.not54.2 = icmp eq i64 %85, -2
  br i1 %.not54.2, label %86, label %96

86:                                               ; preds = %82
  %87 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IxSaIxEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @s, i64 noundef %77) #1
  %88 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %87, i64 noundef %79) #1
  %89 = load i64, ptr %88, align 8, !tbaa !5
  %.not55.2 = icmp eq i64 %89, 0
  br i1 %.not55.2, label %90, label %.critedge.sink.split

90:                                               ; preds = %86
  %91 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IxSaIxEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @zs, i64 noundef %77) #1
  %92 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %91, i64 noundef %79) #1
  %93 = load i64, ptr %92, align 8, !tbaa !5
  %.not56.2 = icmp eq i64 %93, 0
  br i1 %.not56.2, label %94, label %96

94:                                               ; preds = %90
  %95 = tail call noundef zeroext i1 @_Z3dfsii(i32 noundef %68, i32 noundef %70)
  br i1 %95, label %.critedge.sink.split, label %96

96:                                               ; preds = %94, %90, %82, %76, %74, %72, %66
  %97 = load i32, ptr getelementptr inbounds (i8, ptr @__const._Z3dfsii.dys, i64 12), align 4, !tbaa !9
  %98 = add nsw i32 %97, %0
  %99 = load i32, ptr getelementptr inbounds (i8, ptr @__const._Z3dfsii.dxs, i64 12), align 4, !tbaa !9
  %100 = add nsw i32 %99, %1
  %101 = icmp slt i32 %98, 0
  br i1 %101, label %.critedge, label %102

102:                                              ; preds = %96
  %103 = load i32, ptr @n, align 4, !tbaa !9
  %.not.3 = icmp slt i32 %98, %103
  br i1 %.not.3, label %104, label %.critedge

104:                                              ; preds = %102
  %105 = icmp sgt i32 %100, -1
  %.not52.3 = icmp slt i32 %100, %103
  %or.cond.3 = and i1 %105, %.not52.3
  br i1 %or.cond.3, label %106, label %.critedge

106:                                              ; preds = %104
  %107 = zext nneg i32 %98 to i64
  %108 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IxSaIxEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @xs, i64 noundef %107) #1
  %109 = zext nneg i32 %100 to i64
  %110 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %108, i64 noundef %109) #1
  %111 = load i64, ptr %110, align 8, !tbaa !5
  %.not53.3 = icmp eq i64 %111, -2
  br i1 %.not53.3, label %112, label %.critedge

112:                                              ; preds = %106
  %113 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IxSaIxEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @ys, i64 noundef %107) #1
  %114 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %113, i64 noundef %109) #1
  %115 = load i64, ptr %114, align 8, !tbaa !5
  %.not54.3 = icmp eq i64 %115, -2
  br i1 %.not54.3, label %116, label %.critedge

116:                                              ; preds = %112
  %117 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IxSaIxEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @s, i64 noundef %107) #1
  %118 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %117, i64 noundef %109) #1
  %119 = load i64, ptr %118, align 8, !tbaa !5
  %.not55.3 = icmp eq i64 %119, 0
  br i1 %.not55.3, label %120, label %.critedge.sink.split

120:                                              ; preds = %116
  %121 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IxSaIxEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @zs, i64 noundef %107) #1
  %122 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %121, i64 noundef %109) #1
  %123 = load i64, ptr %122, align 8, !tbaa !5
  %.not56.3 = icmp eq i64 %123, 0
  br i1 %.not56.3, label %124, label %.critedge

124:                                              ; preds = %120
  %125 = tail call noundef zeroext i1 @_Z3dfsii(i32 noundef %98, i32 noundef %100)
  br i1 %125, label %.critedge.sink.split, label %.critedge

.critedge.sink.split:                             ; preds = %124, %94, %64, %34, %116, %86, %56, %26
  %.sink = phi i64 [ 85, %26 ], [ 76, %56 ], [ 68, %86 ], [ 82, %116 ], [ 85, %34 ], [ 76, %64 ], [ 68, %94 ], [ 82, %124 ]
  %126 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IxSaIxEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @zs, i64 noundef %3) #1
  %127 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %126, i64 noundef %5) #1
  store i64 %.sink, ptr %127, align 8, !tbaa !5
  br label %.critedge

.critedge:                                        ; preds = %.critedge.sink.split, %96, %102, %104, %106, %112, %120, %124
  %128 = phi i1 [ false, %124 ], [ false, %120 ], [ false, %112 ], [ false, %106 ], [ false, %104 ], [ false, %102 ], [ false, %96 ], [ true, %.critedge.sink.split ]
  ret i1 %128
}

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

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

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 = { 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 = !{!"long long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LCSSAPass,LoopRotatePass,LoopSimplifyPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass