; LLVM IR from ShahjalalShohag/code-library :: Graph Theory/3 CYCLE and 4 CYCLE.ll (Z6cycle3i)

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

@g = external dso_local global [300009 x %"class.std::vector"], align 16
@G = external dso_local global [300009 x %"class.std::vector"], align 16
@val = external dso_local global [300009 x i32], align 16
@deg = external dso_local global [300009 x i32], align 16

; Function Attrs: mustprogress uwtable
define dso_local noundef i64 @_Z6cycle3i(i32 noundef %0) #0 {
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i64, align 8
  %6 = alloca ptr, align 8
  %7 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %8 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %13 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %14 = alloca i32, align 4
  %15 = alloca ptr, align 8
  %16 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %17 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %18 = alloca i32, align 4
  %19 = alloca ptr, align 8
  %20 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %21 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %22 = alloca i32, align 4
  store i32 %0, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #4
  store i64 0, ptr %5, align 8, !tbaa !9
  store i32 1, ptr %3, align 4, !tbaa !5
  br label %23

23:                                               ; preds = %31, %1
  %24 = load i32, ptr %3, align 4, !tbaa !5
  %25 = load i32, ptr %2, align 4, !tbaa !5
  %26 = icmp sle i32 %24, %25
  br i1 %26, label %27, label %34

27:                                               ; preds = %23
  %28 = load i32, ptr %3, align 4, !tbaa !5
  %29 = sext i32 %28 to i64
  %30 = getelementptr inbounds [300009 x %"class.std::vector"], ptr @G, i64 0, i64 %29
  call void @_ZNSt6vectorIiSaIiEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %30) #4
  br label %31

31:                                               ; preds = %27
  %32 = load i32, ptr %3, align 4, !tbaa !5
  %33 = add nsw i32 %32, 1
  store i32 %33, ptr %3, align 4, !tbaa !5
  br label %23, !llvm.loop !11

34:                                               ; preds = %23
  store i32 1, ptr %3, align 4, !tbaa !5
  br label %35

35:                                               ; preds = %43, %34
  %36 = load i32, ptr %3, align 4, !tbaa !5
  %37 = load i32, ptr %2, align 4, !tbaa !5
  %38 = icmp sle i32 %36, %37
  br i1 %38, label %39, label %46

39:                                               ; preds = %35
  %40 = load i32, ptr %3, align 4, !tbaa !5
  %41 = sext i32 %40 to i64
  %42 = getelementptr inbounds [300009 x i32], ptr @val, i64 0, i64 %41
  store i32 0, ptr %42, align 4, !tbaa !5
  br label %43

43:                                               ; preds = %39
  %44 = load i32, ptr %3, align 4, !tbaa !5
  %45 = add nsw i32 %44, 1
  store i32 %45, ptr %3, align 4, !tbaa !5
  br label %35, !llvm.loop !13

46:                                               ; preds = %35
  store i32 1, ptr %3, align 4, !tbaa !5
  br label %47

47:                                               ; preds = %96, %46
  %48 = load i32, ptr %3, align 4, !tbaa !5
  %49 = load i32, ptr %2, align 4, !tbaa !5
  %50 = icmp sle i32 %48, %49
  br i1 %50, label %51, label %99

51:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #4
  %52 = load i32, ptr %3, align 4, !tbaa !5
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds [300009 x %"class.std::vector"], ptr @g, i64 0, i64 %53
  store ptr %54, ptr %6, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  %55 = load ptr, ptr %6, align 8, !tbaa !14
  %56 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %55) #4
  %57 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %7, i32 0, i32 0
  store ptr %56, ptr %57, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  %58 = load ptr, ptr %6, align 8, !tbaa !14
  %59 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %58) #4
  %60 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %8, i32 0, i32 0
  store ptr %59, ptr %60, align 8
  br label %61

61:                                               ; preds = %93, %51
  %62 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8) #4
  br i1 %62, label %64, label %63

63:                                               ; preds = %61
  store i32 11, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  br label %95

64:                                               ; preds = %61
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  %65 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #4
  %66 = load i32, ptr %65, align 4, !tbaa !5
  store i32 %66, ptr %10, align 4, !tbaa !5
  %67 = load i32, ptr %10, align 4, !tbaa !5
  %68 = load i32, ptr %3, align 4, !tbaa !5
  %69 = icmp slt i32 %67, %68
  br i1 %69, label %70, label %71

70:                                               ; preds = %64
  store i32 12, ptr %9, align 4
  br label %90

71:                                               ; preds = %64
  %72 = load i32, ptr %3, align 4, !tbaa !5
  %73 = sext i32 %72 to i64
  %74 = getelementptr inbounds [300009 x i32], ptr @deg, i64 0, i64 %73
  %75 = load i32, ptr %74, align 4, !tbaa !5
  %76 = load i32, ptr %10, align 4, !tbaa !5
  %77 = sext i32 %76 to i64
  %78 = getelementptr inbounds [300009 x i32], ptr @deg, i64 0, i64 %77
  %79 = load i32, ptr %78, align 4, !tbaa !5
  %80 = icmp sle i32 %75, %79
  br i1 %80, label %81, label %85

81:                                               ; preds = %71
  %82 = load i32, ptr %3, align 4, !tbaa !5
  %83 = sext i32 %82 to i64
  %84 = getelementptr inbounds [300009 x %"class.std::vector"], ptr @G, i64 0, i64 %83
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %84, ptr noundef nonnull align 4 dereferenceable(4) %10)
  br label %89

85:                                               ; preds = %71
  %86 = load i32, ptr %10, align 4, !tbaa !5
  %87 = sext i32 %86 to i64
  %88 = getelementptr inbounds [300009 x %"class.std::vector"], ptr @G, i64 0, i64 %87
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %88, ptr noundef nonnull align 4 dereferenceable(4) %3)
  br label %89

89:                                               ; preds = %85, %81
  store i32 0, ptr %9, align 4
  br label %90

90:                                               ; preds = %89, %70
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  %91 = load i32, ptr %9, align 4
  switch i32 %91, label %186 [
    i32 0, label %92
    i32 12, label %93
  ]

92:                                               ; preds = %90
  br label %93

93:                                               ; preds = %92, %90
  %94 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #4
  br label %61

95:                                               ; preds = %63
  br label %96

96:                                               ; preds = %95
  %97 = load i32, ptr %3, align 4, !tbaa !5
  %98 = add nsw i32 %97, 1
  store i32 %98, ptr %3, align 4, !tbaa !5
  br label %47, !llvm.loop !16

99:                                               ; preds = %47
  store i32 1, ptr %3, align 4, !tbaa !5
  br label %100

100:                                              ; preds = %181, %99
  %101 = load i32, ptr %3, align 4, !tbaa !5
  %102 = load i32, ptr %2, align 4, !tbaa !5
  %103 = icmp sle i32 %101, %102
  br i1 %103, label %104, label %184

104:                                              ; preds = %100
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  %105 = load i32, ptr %3, align 4, !tbaa !5
  %106 = sext i32 %105 to i64
  %107 = getelementptr inbounds [300009 x %"class.std::vector"], ptr @G, i64 0, i64 %106
  store ptr %107, ptr %11, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  %108 = load ptr, ptr %11, align 8, !tbaa !14
  %109 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %108) #4
  %110 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %12, i32 0, i32 0
  store ptr %109, ptr %110, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  %111 = load ptr, ptr %11, align 8, !tbaa !14
  %112 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %111) #4
  %113 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %13, i32 0, i32 0
  store ptr %112, ptr %113, align 8
  br label %114

114:                                              ; preds = %124, %104
  %115 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(8) %13) #4
  br i1 %115, label %117, label %116

116:                                              ; preds = %114
  store i32 16, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  br label %126

117:                                              ; preds = %114
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #4
  %118 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %12) #4
  %119 = load i32, ptr %118, align 4, !tbaa !5
  store i32 %119, ptr %14, align 4, !tbaa !5
  %120 = load i32, ptr %3, align 4, !tbaa !5
  %121 = load i32, ptr %14, align 4, !tbaa !5
  %122 = sext i32 %121 to i64
  %123 = getelementptr inbounds [300009 x i32], ptr @val, i64 0, i64 %122
  store i32 %120, ptr %123, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  br label %124

124:                                              ; preds = %117
  %125 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %12) #4
  br label %114

126:                                              ; preds = %116
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #4
  %127 = load i32, ptr %3, align 4, !tbaa !5
  %128 = sext i32 %127 to i64
  %129 = getelementptr inbounds [300009 x %"class.std::vector"], ptr @g, i64 0, i64 %128
  store ptr %129, ptr %15, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #4
  %130 = load ptr, ptr %15, align 8, !tbaa !14
  %131 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %130) #4
  %132 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %16, i32 0, i32 0
  store ptr %131, ptr %132, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #4
  %133 = load ptr, ptr %15, align 8, !tbaa !14
  %134 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %133) #4
  %135 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %17, i32 0, i32 0
  store ptr %134, ptr %135, align 8
  br label %136

136:                                              ; preds = %178, %126
  %137 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull align 8 dereferenceable(8) %17) #4
  br i1 %137, label %139, label %138

138:                                              ; preds = %136
  store i32 18, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  br label %180

139:                                              ; preds = %136
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #4
  %140 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %16) #4
  %141 = load i32, ptr %140, align 4, !tbaa !5
  store i32 %141, ptr %18, align 4, !tbaa !5
  %142 = load i32, ptr %18, align 4, !tbaa !5
  %143 = load i32, ptr %3, align 4, !tbaa !5
  %144 = icmp slt i32 %142, %143
  br i1 %144, label %145, label %146

145:                                              ; preds = %139
  store i32 19, ptr %9, align 4
  br label %175

146:                                              ; preds = %139
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #4
  %147 = load i32, ptr %18, align 4, !tbaa !5
  %148 = sext i32 %147 to i64
  %149 = getelementptr inbounds [300009 x %"class.std::vector"], ptr @G, i64 0, i64 %148
  store ptr %149, ptr %19, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #4
  %150 = load ptr, ptr %19, align 8, !tbaa !14
  %151 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %150) #4
  %152 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %20, i32 0, i32 0
  store ptr %151, ptr %152, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #4
  %153 = load ptr, ptr %19, align 8, !tbaa !14
  %154 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %153) #4
  %155 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %21, i32 0, i32 0
  store ptr %154, ptr %155, align 8
  br label %156

156:                                              ; preds = %172, %146
  %157 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %20, ptr noundef nonnull align 8 dereferenceable(8) %21) #4
  br i1 %157, label %159, label %158

158:                                              ; preds = %156
  store i32 20, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #4
  br label %174

159:                                              ; preds = %156
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #4
  %160 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %20) #4
  %161 = load i32, ptr %160, align 4, !tbaa !5
  store i32 %161, ptr %22, align 4, !tbaa !5
  %162 = load i32, ptr %22, align 4, !tbaa !5
  %163 = sext i32 %162 to i64
  %164 = getelementptr inbounds [300009 x i32], ptr @val, i64 0, i64 %163
  %165 = load i32, ptr %164, align 4, !tbaa !5
  %166 = load i32, ptr %3, align 4, !tbaa !5
  %167 = icmp eq i32 %165, %166
  br i1 %167, label %168, label %171

168:                                              ; preds = %159
  %169 = load i64, ptr %5, align 8, !tbaa !9
  %170 = add nsw i64 %169, 1
  store i64 %170, ptr %5, align 8, !tbaa !9
  br label %171

171:                                              ; preds = %168, %159
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #4
  br label %172

172:                                              ; preds = %171
  %173 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %20) #4
  br label %156

174:                                              ; preds = %158
  store i32 0, ptr %9, align 4
  br label %175

175:                                              ; preds = %174, %145
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #4
  %176 = load i32, ptr %9, align 4
  switch i32 %176, label %186 [
    i32 0, label %177
    i32 19, label %178
  ]

177:                                              ; preds = %175
  br label %178

178:                                              ; preds = %177, %175
  %179 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %16) #4
  br label %136

180:                                              ; preds = %138
  br label %181

181:                                              ; preds = %180
  %182 = load i32, ptr %3, align 4, !tbaa !5
  %183 = add nsw i32 %182, 1
  store i32 %183, ptr %3, align 4, !tbaa !5
  br label %100, !llvm.loop !17

184:                                              ; preds = %100
  %185 = load i64, ptr %5, align 8, !tbaa !9
  store i32 1, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #4
  ret i64 %185

186:                                              ; preds = %175, %90
  unreachable
}

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

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

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

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

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

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

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

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

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

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { 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 #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"}
!13 = distinct !{!13, !12}
!14 = !{!15, !15, i64 0}
!15 = !{!"any pointer", !7, i64 0}
!16 = distinct !{!16, !12}
!17 = distinct !{!17, !12}


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

@g = external dso_local global [300009 x %"class.std::vector"], align 16
@G = external dso_local global [300009 x %"class.std::vector"], align 16
@val = external dso_local local_unnamed_addr global [300009 x i32], align 16
@deg = external dso_local local_unnamed_addr global [300009 x i32], align 16

; Function Attrs: mustprogress uwtable
define dso_local noundef i64 @_Z6cycle3i(i32 noundef %0) local_unnamed_addr #0 {
  %2 = alloca i32, align 4
  %3 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %4 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %5 = alloca i32, align 4
  %6 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %7 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %8 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %9 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %10 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %11 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #5
  %.not34 = icmp slt i32 %0, 1
  br i1 %.not34, label %._crit_edge61, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %1
  %12 = add nuw i32 %0, 1
  %wide.trip.count = zext i32 %12 to i64
  br label %.lr.ph

.preheader33:                                     ; preds = %.lr.ph
  br i1 %.not34, label %._crit_edge61, label %.lr.ph43.preheader

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph
  %indvars.iv = phi i64 [ 1, %.lr.ph.preheader ], [ %indvars.iv.next, %.lr.ph ]
  %13 = getelementptr inbounds [300009 x %"class.std::vector"], ptr @G, i64 0, i64 %indvars.iv
  tail call void @_ZNSt6vectorIiSaIiEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %13) #5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %.preheader33, label %.lr.ph, !llvm.loop !5

.lr.ph43.preheader:                               ; preds = %.preheader33
  %14 = zext nneg i32 %0 to i64
  %15 = shl nuw nsw i64 %14, 2
  tail call void @llvm.memset.p0.i64(ptr nonnull align 4 getelementptr inbounds (i8, ptr @val, i64 4), i8 0, i64 %15, i1 false), !tbaa !7
  store i32 1, ptr %2, align 4, !tbaa !7
  br label %.lr.ph43

.preheader:                                       ; preds = %._crit_edge
  store i32 1, ptr %2, align 4, !tbaa !7
  br i1 %.not34, label %._crit_edge61, label %.lr.ph60

.lr.ph43:                                         ; preds = %.lr.ph43.preheader, %._crit_edge
  %storemerge2742 = phi i32 [ %22, %._crit_edge ], [ 1, %.lr.ph43.preheader ]
  %16 = sext i32 %storemerge2742 to i64
  %17 = getelementptr inbounds [300009 x %"class.std::vector"], ptr @g, i64 0, i64 %16
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #5
  %18 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %17) #5
  store ptr %18, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #5
  %19 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %17) #5
  store ptr %19, ptr %4, align 8
  %20 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4) #5
  br i1 %20, label %.lr.ph40, label %._crit_edge

._crit_edge:                                      ; preds = %34, %.lr.ph43
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #5
  %21 = load i32, ptr %2, align 4, !tbaa !7
  %22 = add nsw i32 %21, 1
  store i32 %22, ptr %2, align 4, !tbaa !7
  %.not28.not = icmp slt i32 %21, %0
  br i1 %.not28.not, label %.lr.ph43, label %.preheader, !llvm.loop !11

.lr.ph40:                                         ; preds = %.lr.ph43, %34
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #5
  %23 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #5
  %24 = load i32, ptr %23, align 4, !tbaa !7
  store i32 %24, ptr %5, align 4, !tbaa !7
  %25 = load i32, ptr %2, align 4, !tbaa !7
  %26 = icmp slt i32 %24, %25
  br i1 %26, label %34, label %.sink.split

.sink.split:                                      ; preds = %.lr.ph40
  %27 = sext i32 %25 to i64
  %28 = getelementptr inbounds [300009 x i32], ptr @deg, i64 0, i64 %27
  %29 = load i32, ptr %28, align 4, !tbaa !7
  %30 = sext i32 %24 to i64
  %31 = getelementptr inbounds [300009 x i32], ptr @deg, i64 0, i64 %30
  %32 = load i32, ptr %31, align 4, !tbaa !7
  %.not31 = icmp sgt i32 %29, %32
  %. = select i1 %.not31, i64 %30, i64 %27
  %.70 = select i1 %.not31, ptr %2, ptr %5
  %33 = getelementptr inbounds [300009 x %"class.std::vector"], ptr @G, i64 0, i64 %.
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %33, ptr noundef nonnull align 4 dereferenceable(4) %.70)
  br label %34

34:                                               ; preds = %.sink.split, %.lr.ph40
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #5
  %35 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #5
  %36 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4) #5
  br i1 %36, label %.lr.ph40, label %._crit_edge

.lr.ph60:                                         ; preds = %.preheader, %._crit_edge55
  %.059 = phi i64 [ %.1.lcssa, %._crit_edge55 ], [ 0, %.preheader ]
  %storemerge2958 = phi i32 [ %56, %._crit_edge55 ], [ 1, %.preheader ]
  %37 = sext i32 %storemerge2958 to i64
  %38 = getelementptr inbounds [300009 x %"class.std::vector"], ptr @G, i64 0, i64 %37
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #5
  %39 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %38) #5
  store ptr %39, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #5
  %40 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %38) #5
  store ptr %40, ptr %7, align 8
  %41 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #5
  br i1 %41, label %.lr.ph45, label %._crit_edge46

._crit_edge46:                                    ; preds = %.lr.ph45, %.lr.ph60
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #5
  %42 = load i32, ptr %2, align 4, !tbaa !7
  %43 = sext i32 %42 to i64
  %44 = getelementptr inbounds [300009 x %"class.std::vector"], ptr @g, i64 0, i64 %43
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #5
  %45 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %44) #5
  store ptr %45, ptr %8, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #5
  %46 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %44) #5
  store ptr %46, ptr %9, align 8
  %47 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %9) #5
  br i1 %47, label %.lr.ph54, label %._crit_edge55

.lr.ph45:                                         ; preds = %.lr.ph60, %.lr.ph45
  %48 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #5
  %49 = load i32, ptr %48, align 4, !tbaa !7
  %50 = load i32, ptr %2, align 4, !tbaa !7
  %51 = sext i32 %49 to i64
  %52 = getelementptr inbounds [300009 x i32], ptr @val, i64 0, i64 %51
  store i32 %50, ptr %52, align 4, !tbaa !7
  %53 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #5
  %54 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #5
  br i1 %54, label %.lr.ph45, label %._crit_edge46

._crit_edge55:                                    ; preds = %77, %._crit_edge46
  %.1.lcssa = phi i64 [ %.059, %._crit_edge46 ], [ %.4, %77 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #5
  %55 = load i32, ptr %2, align 4, !tbaa !7
  %56 = add nsw i32 %55, 1
  store i32 %56, ptr %2, align 4, !tbaa !7
  %.not30.not = icmp slt i32 %55, %0
  br i1 %.not30.not, label %.lr.ph60, label %._crit_edge61, !llvm.loop !12

.lr.ph54:                                         ; preds = %._crit_edge46, %77
  %.152 = phi i64 [ %.4, %77 ], [ %.059, %._crit_edge46 ]
  %57 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #5
  %58 = load i32, ptr %57, align 4, !tbaa !7
  %59 = load i32, ptr %2, align 4, !tbaa !7
  %60 = icmp slt i32 %58, %59
  br i1 %60, label %77, label %61

61:                                               ; preds = %.lr.ph54
  %62 = sext i32 %58 to i64
  %63 = getelementptr inbounds [300009 x %"class.std::vector"], ptr @G, i64 0, i64 %62
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #5
  %64 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %63) #5
  store ptr %64, ptr %10, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #5
  %65 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %63) #5
  store ptr %65, ptr %11, align 8
  %66 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 8 dereferenceable(8) %11) #5
  br i1 %66, label %.lr.ph49, label %._crit_edge50

._crit_edge50:                                    ; preds = %.lr.ph49, %61
  %.2.lcssa = phi i64 [ %.152, %61 ], [ %spec.select, %.lr.ph49 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #5
  br label %77

.lr.ph49:                                         ; preds = %61, %.lr.ph49
  %.247 = phi i64 [ %spec.select, %.lr.ph49 ], [ %.152, %61 ]
  %67 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %10) #5
  %68 = load i32, ptr %67, align 4, !tbaa !7
  %69 = sext i32 %68 to i64
  %70 = getelementptr inbounds [300009 x i32], ptr @val, i64 0, i64 %69
  %71 = load i32, ptr %70, align 4, !tbaa !7
  %72 = load i32, ptr %2, align 4, !tbaa !7
  %73 = icmp eq i32 %71, %72
  %74 = zext i1 %73 to i64
  %spec.select = add nsw i64 %.247, %74
  %75 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %10) #5
  %76 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 8 dereferenceable(8) %11) #5
  br i1 %76, label %.lr.ph49, label %._crit_edge50

77:                                               ; preds = %.lr.ph54, %._crit_edge50
  %.4 = phi i64 [ %.2.lcssa, %._crit_edge50 ], [ %.152, %.lr.ph54 ]
  %78 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #5
  %79 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %9) #5
  br i1 %79, label %.lr.ph54, label %._crit_edge55

._crit_edge61:                                    ; preds = %._crit_edge55, %.preheader33, %1, %.preheader
  %.0.lcssa = phi i64 [ 0, %.preheader ], [ 0, %1 ], [ 0, %.preheader33 ], [ %.1.lcssa, %._crit_edge55 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #5
  ret i64 %.0.lcssa
}

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

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

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

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

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

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

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

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

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { 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 #4 = { nocallback nofree nounwind willreturn memory(argmem: write) }
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 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}
!7 = !{!8, !8, i64 0}
!8 = !{!"int", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = distinct !{!11, !6}
!12 = distinct !{!12, !6}


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