; LLVM IR from lekkas/c-algorithms :: test/graph.ll (ZN33GRAPHTRAVERSAL_BFS_SMOKETEST_Test8TestBodyEv)

; 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.testing::AssertionResult" = type { i8, %"class.testing::internal::scoped_ptr" }
%"class.testing::internal::scoped_ptr" = type { ptr }
%struct.GraphOps = type { ptr, ptr, ptr }
%"class.testing::Message" = type { %"class.testing::internal::scoped_ptr.0" }
%"class.testing::internal::scoped_ptr.0" = type { ptr }
%"class.testing::internal::AssertHelper" = type { ptr }
%struct.Graph = type { ptr, ptr, i32, i32, i8 }

@q = external dso_local global ptr, align 8
@graph = external dso_local global [10 x [2 x i32]], align 16
@.str.3 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [67 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [4 x i8], align 1

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

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

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

; Function Attrs: nounwind allocsize(0)
declare noalias ptr @malloc(i64 noundef) #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 uwtable
declare dso_local void @_Z11processEdgeii(i32 noundef, i32 noundef) #3

declare i32 @__gxx_personality_v0(...)

declare ptr @createGraph(i32 noundef, i1 noundef zeroext) #4

declare ptr @createQueue() #4

declare void @insert_edge(ptr noundef, i32 noundef, i32 noundef, i32 noundef, i1 noundef zeroext) #4

declare void @searchInit(ptr noundef, ptr noundef, ptr noundef) #4

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7testing8internal8EqHelperILb0EE7CompareI5StateS4_EENS_15AssertionResultEPKcS7_RKT_RKT0_(ptr dead_on_unwind noalias writable sret(%"class.testing::AssertionResult") align 8, ptr noundef, ptr noundef, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK7testing15AssertionResultcvbEv(ptr noundef nonnull align 8 dereferenceable(16)) #0 align 2

declare void @_ZN7testing7MessageC1Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZNK7testing15AssertionResult15failure_messageEv(ptr noundef nonnull align 8 dereferenceable(16)) #3 align 2

declare void @_ZN7testing8internal12AssertHelperC1ENS_14TestPartResult4TypeEPKciS5_(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef, ptr noundef, i32 noundef, ptr noundef) unnamed_addr #4

declare void @_ZNK7testing8internal12AssertHelperaSERKNS_7MessageE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #4

; Function Attrs: nounwind
declare void @_ZN7testing8internal12AssertHelperD1Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #5

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN7testing7MessageD2Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #6 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN7testing15AssertionResultD2Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #6 align 2

declare i32 @isQueueEmpty(ptr noundef) #4

declare ptr @dequeue(ptr noundef) #4

; Function Attrs: nounwind
declare void @free(ptr noundef) #5

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7testing8internal8EqHelperILb0EE7CompareIiiEENS_15AssertionResultEPKcS6_RKT_RKT0_(ptr dead_on_unwind noalias writable sret(%"class.testing::AssertionResult") align 8, ptr noundef, ptr noundef, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #3 align 2

declare void @delQueue(ptr noundef) #4

declare void @deleteGraph(ptr noundef) #4

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN33GRAPHTRAVERSAL_BFS_SMOKETEST_Test8TestBodyEv(ptr noundef nonnull align 8 dereferenceable(16) %0) unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca %struct.GraphOps, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %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 %"class.testing::AssertionResult", align 8
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  %16 = alloca %"class.testing::Message", align 8
  %17 = alloca %"class.testing::internal::AssertHelper", align 8
  %18 = alloca i32, align 4
  %19 = alloca ptr, align 8
  %20 = alloca %"class.testing::AssertionResult", align 8
  %21 = alloca %"class.testing::Message", align 8
  %22 = alloca %"class.testing::internal::AssertHelper", align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  %23 = load ptr, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 24, ptr %3) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  store i32 10, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  store i32 10, ptr %8, align 4, !tbaa !9
  %24 = load i32, ptr %7, align 4, !tbaa !9
  %25 = call ptr @createGraph(i32 noundef %24, i1 noundef zeroext false)
  store ptr %25, ptr %4, align 8, !tbaa !5
  %26 = call ptr @createQueue()
  store ptr %26, ptr @q, align 8, !tbaa !5
  %27 = load ptr, ptr %4, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.Graph, ptr %27, i32 0, i32 2
  %29 = load i32, ptr %28, align 8, !tbaa !11
  %30 = add nsw i32 %29, 1
  %31 = sext i32 %30 to i64
  %32 = mul i64 4, %31
  %33 = call noalias ptr @malloc(i64 noundef %32) #8
  store ptr %33, ptr %6, align 8, !tbaa !5
  %34 = load ptr, ptr %4, align 8, !tbaa !5
  %35 = getelementptr inbounds %struct.Graph, ptr %34, i32 0, i32 2
  %36 = load i32, ptr %35, align 8, !tbaa !11
  %37 = add nsw i32 %36, 1
  %38 = sext i32 %37 to i64
  %39 = mul i64 4, %38
  %40 = call noalias ptr @malloc(i64 noundef %39) #8
  store ptr %40, ptr %5, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.GraphOps, ptr %3, i32 0, i32 0
  store ptr @_Z18processVertexEarlyi, ptr %41, align 8, !tbaa !14
  %42 = getelementptr inbounds %struct.GraphOps, ptr %3, i32 0, i32 1
  store ptr @_Z17processVertexLatei, ptr %42, align 8, !tbaa !16
  %43 = getelementptr inbounds %struct.GraphOps, ptr %3, i32 0, i32 2
  store ptr @_Z11processEdgeii, ptr %43, align 8, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  store i32 0, ptr %9, align 4, !tbaa !9
  br label %44

44:                                               ; preds = %61, %1
  %45 = load i32, ptr %9, align 4, !tbaa !9
  %46 = load i32, ptr %8, align 4, !tbaa !9
  %47 = icmp slt i32 %45, %46
  br i1 %47, label %49, label %48

48:                                               ; preds = %44
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  br label %64

49:                                               ; preds = %44
  %50 = load ptr, ptr %4, align 8, !tbaa !5
  %51 = load i32, ptr %9, align 4, !tbaa !9
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds [10 x [2 x i32]], ptr @graph, i64 0, i64 %52
  %54 = getelementptr inbounds [2 x i32], ptr %53, i64 0, i64 0
  %55 = load i32, ptr %54, align 8, !tbaa !9
  %56 = load i32, ptr %9, align 4, !tbaa !9
  %57 = sext i32 %56 to i64
  %58 = getelementptr inbounds [10 x [2 x i32]], ptr @graph, i64 0, i64 %57
  %59 = getelementptr inbounds [2 x i32], ptr %58, i64 0, i64 1
  %60 = load i32, ptr %59, align 4, !tbaa !9
  call void @insert_edge(ptr noundef %50, i32 noundef %55, i32 noundef %60, i32 noundef 0, i1 noundef zeroext false)
  br label %61

61:                                               ; preds = %49
  %62 = load i32, ptr %9, align 4, !tbaa !9
  %63 = add nsw i32 %62, 1
  store i32 %63, ptr %9, align 4, !tbaa !9
  br label %44, !llvm.loop !18

64:                                               ; preds = %48
  %65 = load ptr, ptr %4, align 8, !tbaa !5
  %66 = load ptr, ptr %5, align 8, !tbaa !5
  %67 = load ptr, ptr %6, align 8, !tbaa !5
  call void @searchInit(ptr noundef %65, ptr noundef %66, ptr noundef %67)
  %68 = load ptr, ptr %4, align 8, !tbaa !5
  %69 = load ptr, ptr %5, align 8, !tbaa !5
  %70 = load ptr, ptr %6, align 8, !tbaa !5
  call void @BFS(ptr noundef %68, i32 noundef 1, ptr noundef %69, ptr noundef %70, ptr noundef %3)
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  store i32 1, ptr %10, align 4, !tbaa !9
  br label %71

71:                                               ; preds = %112, %64
  %72 = load i32, ptr %10, align 4, !tbaa !9
  %73 = load i32, ptr %7, align 4, !tbaa !9
  %74 = icmp sle i32 %72, %73
  br i1 %74, label %76, label %75

75:                                               ; preds = %71
  store i32 5, ptr %11, align 4
  br label %116

76:                                               ; preds = %71
  call void @llvm.lifetime.start.p0(i64 16, ptr %12) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  store i32 2, ptr %13, align 4, !tbaa !20
  %77 = load ptr, ptr %5, align 8, !tbaa !5
  %78 = load i32, ptr %10, align 4, !tbaa !9
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds i32, ptr %77, i64 %79
  call void @_ZN7testing8internal8EqHelperILb0EE7CompareI5StateS4_EENS_15AssertionResultEPKcS7_RKT_RKT0_(ptr dead_on_unwind writable sret(%"class.testing::AssertionResult") align 8 %12, ptr noundef @.str.3, ptr noundef @.str.4, ptr noundef nonnull align 4 dereferenceable(4) %13, ptr noundef nonnull align 4 dereferenceable(4) %80)
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  %81 = invoke noundef zeroext i1 @_ZNK7testing15AssertionResultcvbEv(ptr noundef nonnull align 8 dereferenceable(16) %12)
          to label %82 unwind label %84

82:                                               ; preds = %76
  br i1 %81, label %83, label %88

83:                                               ; preds = %82
  br label %108

84:                                               ; preds = %76
  %85 = landingpad { ptr, i32 }
          cleanup
  %86 = extractvalue { ptr, i32 } %85, 0
  store ptr %86, ptr %14, align 8
  %87 = extractvalue { ptr, i32 } %85, 1
  store i32 %87, ptr %15, align 4
  br label %115

88:                                               ; preds = %82
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  invoke void @_ZN7testing7MessageC1Ev(ptr noundef nonnull align 8 dereferenceable(8) %16)
          to label %89 unwind label %94

89:                                               ; preds = %88
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #7
  %90 = invoke noundef ptr @_ZNK7testing15AssertionResult15failure_messageEv(ptr noundef nonnull align 8 dereferenceable(16) %12)
          to label %91 unwind label %98

91:                                               ; preds = %89
  invoke void @_ZN7testing8internal12AssertHelperC1ENS_14TestPartResult4TypeEPKciS5_(ptr noundef nonnull align 8 dereferenceable(8) %17, i32 noundef 2, ptr noundef @.str.5, i32 noundef 128, ptr noundef %90)
          to label %92 unwind label %98

92:                                               ; preds = %91
  invoke void @_ZNK7testing8internal12AssertHelperaSERKNS_7MessageE(ptr noundef nonnull align 8 dereferenceable(8) %17, ptr noundef nonnull align 8 dereferenceable(8) %16)
          to label %93 unwind label %102

93:                                               ; preds = %92
  call void @_ZN7testing8internal12AssertHelperD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %17) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  call void @_ZN7testing7MessageD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %16) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  store i32 1, ptr %11, align 4
  br label %109

94:                                               ; preds = %88
  %95 = landingpad { ptr, i32 }
          cleanup
  %96 = extractvalue { ptr, i32 } %95, 0
  store ptr %96, ptr %14, align 8
  %97 = extractvalue { ptr, i32 } %95, 1
  store i32 %97, ptr %15, align 4
  br label %107

98:                                               ; preds = %91, %89
  %99 = landingpad { ptr, i32 }
          cleanup
  %100 = extractvalue { ptr, i32 } %99, 0
  store ptr %100, ptr %14, align 8
  %101 = extractvalue { ptr, i32 } %99, 1
  store i32 %101, ptr %15, align 4
  br label %106

102:                                              ; preds = %92
  %103 = landingpad { ptr, i32 }
          cleanup
  %104 = extractvalue { ptr, i32 } %103, 0
  store ptr %104, ptr %14, align 8
  %105 = extractvalue { ptr, i32 } %103, 1
  store i32 %105, ptr %15, align 4
  call void @_ZN7testing8internal12AssertHelperD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %17) #7
  br label %106

106:                                              ; preds = %102, %98
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  call void @_ZN7testing7MessageD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %16) #7
  br label %107

107:                                              ; preds = %106, %94
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  br label %115

108:                                              ; preds = %83
  store i32 0, ptr %11, align 4
  br label %109

109:                                              ; preds = %108, %93
  call void @_ZN7testing15AssertionResultD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %12) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #7
  %110 = load i32, ptr %11, align 4
  switch i32 %110, label %116 [
    i32 0, label %111
  ]

111:                                              ; preds = %109
  br label %112

112:                                              ; preds = %111
  %113 = load i32, ptr %10, align 4, !tbaa !9
  %114 = add nsw i32 %113, 1
  store i32 %114, ptr %10, align 4, !tbaa !9
  br label %71, !llvm.loop !22

115:                                              ; preds = %107, %84
  call void @_ZN7testing15AssertionResultD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %12) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  br label %171

116:                                              ; preds = %109, %75
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  %117 = load i32, ptr %11, align 4
  switch i32 %117, label %167 [
    i32 5, label %118
  ]

118:                                              ; preds = %116
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #7
  store i32 0, ptr %18, align 4, !tbaa !9
  br label %119

119:                                              ; preds = %124, %118
  %120 = load ptr, ptr @q, align 8, !tbaa !5
  %121 = call i32 @isQueueEmpty(ptr noundef %120)
  %122 = icmp ne i32 %121, 0
  %123 = xor i1 %122, true
  br i1 %123, label %124, label %130

124:                                              ; preds = %119
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #7
  %125 = load ptr, ptr @q, align 8, !tbaa !5
  %126 = call ptr @dequeue(ptr noundef %125)
  store ptr %126, ptr %19, align 8, !tbaa !5
  %127 = load i32, ptr %18, align 4, !tbaa !9
  %128 = add nsw i32 %127, 1
  store i32 %128, ptr %18, align 4, !tbaa !9
  %129 = load ptr, ptr %19, align 8, !tbaa !5
  call void @free(ptr noundef %129) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  br label %119, !llvm.loop !23

130:                                              ; preds = %119
  call void @llvm.lifetime.start.p0(i64 16, ptr %20) #7
  call void @_ZN7testing8internal8EqHelperILb0EE7CompareIiiEENS_15AssertionResultEPKcS6_RKT_RKT0_(ptr dead_on_unwind writable sret(%"class.testing::AssertionResult") align 8 %20, ptr noundef @.str.6, ptr noundef @.str.7, ptr noundef nonnull align 4 dereferenceable(4) %8, ptr noundef nonnull align 4 dereferenceable(4) %18)
  %131 = invoke noundef zeroext i1 @_ZNK7testing15AssertionResultcvbEv(ptr noundef nonnull align 8 dereferenceable(16) %20)
          to label %132 unwind label %134

132:                                              ; preds = %130
  br i1 %131, label %133, label %138

133:                                              ; preds = %132
  br label %158

134:                                              ; preds = %130
  %135 = landingpad { ptr, i32 }
          cleanup
  %136 = extractvalue { ptr, i32 } %135, 0
  store ptr %136, ptr %14, align 8
  %137 = extractvalue { ptr, i32 } %135, 1
  store i32 %137, ptr %15, align 4
  br label %170

138:                                              ; preds = %132
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #7
  invoke void @_ZN7testing7MessageC1Ev(ptr noundef nonnull align 8 dereferenceable(8) %21)
          to label %139 unwind label %144

139:                                              ; preds = %138
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #7
  %140 = invoke noundef ptr @_ZNK7testing15AssertionResult15failure_messageEv(ptr noundef nonnull align 8 dereferenceable(16) %20)
          to label %141 unwind label %148

141:                                              ; preds = %139
  invoke void @_ZN7testing8internal12AssertHelperC1ENS_14TestPartResult4TypeEPKciS5_(ptr noundef nonnull align 8 dereferenceable(8) %22, i32 noundef 2, ptr noundef @.str.5, i32 noundef 138, ptr noundef %140)
          to label %142 unwind label %148

142:                                              ; preds = %141
  invoke void @_ZNK7testing8internal12AssertHelperaSERKNS_7MessageE(ptr noundef nonnull align 8 dereferenceable(8) %22, ptr noundef nonnull align 8 dereferenceable(8) %21)
          to label %143 unwind label %152

143:                                              ; preds = %142
  call void @_ZN7testing8internal12AssertHelperD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %22) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #7
  call void @_ZN7testing7MessageD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %21) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  store i32 1, ptr %11, align 4
  br label %159

144:                                              ; preds = %138
  %145 = landingpad { ptr, i32 }
          cleanup
  %146 = extractvalue { ptr, i32 } %145, 0
  store ptr %146, ptr %14, align 8
  %147 = extractvalue { ptr, i32 } %145, 1
  store i32 %147, ptr %15, align 4
  br label %157

148:                                              ; preds = %141, %139
  %149 = landingpad { ptr, i32 }
          cleanup
  %150 = extractvalue { ptr, i32 } %149, 0
  store ptr %150, ptr %14, align 8
  %151 = extractvalue { ptr, i32 } %149, 1
  store i32 %151, ptr %15, align 4
  br label %156

152:                                              ; preds = %142
  %153 = landingpad { ptr, i32 }
          cleanup
  %154 = extractvalue { ptr, i32 } %153, 0
  store ptr %154, ptr %14, align 8
  %155 = extractvalue { ptr, i32 } %153, 1
  store i32 %155, ptr %15, align 4
  call void @_ZN7testing8internal12AssertHelperD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %22) #7
  br label %156

156:                                              ; preds = %152, %148
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #7
  call void @_ZN7testing7MessageD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %21) #7
  br label %157

157:                                              ; preds = %156, %144
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  br label %170

158:                                              ; preds = %133
  store i32 0, ptr %11, align 4
  br label %159

159:                                              ; preds = %158, %143
  call void @_ZN7testing15AssertionResultD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %20) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %20) #7
  %160 = load i32, ptr %11, align 4
  switch i32 %160, label %166 [
    i32 0, label %161
  ]

161:                                              ; preds = %159
  %162 = load ptr, ptr %6, align 8, !tbaa !5
  call void @free(ptr noundef %162) #7
  %163 = load ptr, ptr %5, align 8, !tbaa !5
  call void @free(ptr noundef %163) #7
  %164 = load ptr, ptr @q, align 8, !tbaa !5
  call void @delQueue(ptr noundef %164)
  %165 = load ptr, ptr %4, align 8, !tbaa !5
  call void @deleteGraph(ptr noundef %165)
  store i32 0, ptr %11, align 4
  br label %166

166:                                              ; preds = %161, %159
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  br label %167

167:                                              ; preds = %166, %116
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %3) #7
  %168 = load i32, ptr %11, align 4
  switch i32 %168, label %177 [
    i32 0, label %169
    i32 1, label %169
  ]

169:                                              ; preds = %167, %167
  ret void

170:                                              ; preds = %157, %134
  call void @_ZN7testing15AssertionResultD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %20) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  br label %171

171:                                              ; preds = %170, %115
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %3) #7
  br label %172

172:                                              ; preds = %171
  %173 = load ptr, ptr %14, align 8
  %174 = load i32, ptr %15, align 4
  %175 = insertvalue { ptr, i32 } poison, ptr %173, 0
  %176 = insertvalue { ptr, i32 } %175, i32 %174, 1
  resume { ptr, i32 } %176

177:                                              ; preds = %167
  unreachable
}

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

!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 16}
!12 = !{!"_ZTS5Graph", !6, i64 0, !6, i64 8, !10, i64 16, !10, i64 20, !13, i64 24}
!13 = !{!"bool", !7, i64 0}
!14 = !{!15, !6, i64 0}
!15 = !{!"_ZTS8GraphOps", !6, i64 0, !6, i64 8, !6, i64 16}
!16 = !{!15, !6, i64 8}
!17 = !{!15, !6, i64 16}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = !{!21, !21, i64 0}
!21 = !{!"_ZTS5State", !7, i64 0}
!22 = distinct !{!22, !19}
!23 = distinct !{!23, !19}


; 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.testing::AssertionResult" = type { i8, %"class.testing::internal::scoped_ptr" }
%"class.testing::internal::scoped_ptr" = type { ptr }
%struct.GraphOps = type { ptr, ptr, ptr }
%"class.testing::Message" = type { %"class.testing::internal::scoped_ptr.0" }
%"class.testing::internal::scoped_ptr.0" = type { ptr }
%"class.testing::internal::AssertHelper" = type { ptr }

@q = external dso_local local_unnamed_addr global ptr, align 8
@graph = external dso_local local_unnamed_addr global [10 x [2 x i32]], align 16
@.str.3 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [67 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [4 x i8], align 1

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

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

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

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #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 uwtable
declare dso_local void @_Z11processEdgeii(i32 noundef, i32 noundef) #3

declare i32 @__gxx_personality_v0(...)

declare ptr @createGraph(i32 noundef, i1 noundef zeroext) local_unnamed_addr #4

declare ptr @createQueue() local_unnamed_addr #4

declare void @insert_edge(ptr noundef, i32 noundef, i32 noundef, i32 noundef, i1 noundef zeroext) local_unnamed_addr #4

declare void @searchInit(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7testing8internal8EqHelperILb0EE7CompareI5StateS4_EENS_15AssertionResultEPKcS7_RKT_RKT0_(ptr dead_on_unwind noalias writable sret(%"class.testing::AssertionResult") align 8, ptr noundef, ptr noundef, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK7testing15AssertionResultcvbEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #0 align 2

declare void @_ZN7testing7MessageC1Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #4

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

declare void @_ZN7testing8internal12AssertHelperC1ENS_14TestPartResult4TypeEPKciS5_(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef, ptr noundef, i32 noundef, ptr noundef) unnamed_addr #4

declare void @_ZNK7testing8internal12AssertHelperaSERKNS_7MessageE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #4

; Function Attrs: nounwind
declare void @_ZN7testing8internal12AssertHelperD1Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #5

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN7testing7MessageD2Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #6 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN7testing15AssertionResultD2Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #6 align 2

declare i32 @isQueueEmpty(ptr noundef) local_unnamed_addr #4

declare ptr @dequeue(ptr noundef) local_unnamed_addr #4

; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #7

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7testing8internal8EqHelperILb0EE7CompareIiiEENS_15AssertionResultEPKcS6_RKT_RKT0_(ptr dead_on_unwind noalias writable sret(%"class.testing::AssertionResult") align 8, ptr noundef, ptr noundef, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #3 align 2

declare void @delQueue(ptr noundef) local_unnamed_addr #4

declare void @deleteGraph(ptr noundef) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN33GRAPHTRAVERSAL_BFS_SMOKETEST_Test8TestBodyEv(ptr nocapture noundef nonnull readnone align 8 dereferenceable(16) %0) unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
.lr.ph.preheader:
  %1 = alloca %struct.GraphOps, align 8
  %2 = alloca i32, align 4
  %3 = alloca %"class.testing::AssertionResult", align 8
  %4 = alloca i32, align 4
  %5 = alloca %"class.testing::Message", align 8
  %6 = alloca %"class.testing::internal::AssertHelper", align 8
  %7 = alloca i32, align 4
  %8 = alloca %"class.testing::AssertionResult", align 8
  %9 = alloca %"class.testing::Message", align 8
  %10 = alloca %"class.testing::internal::AssertHelper", align 8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %1) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #8
  store i32 10, ptr %2, align 4, !tbaa !5
  %11 = tail call ptr @createGraph(i32 noundef 10, i1 noundef zeroext false)
  %12 = tail call ptr @createQueue()
  store ptr %12, ptr @q, align 8, !tbaa !9
  %13 = getelementptr inbounds i8, ptr %11, i64 16
  %14 = load i32, ptr %13, align 8, !tbaa !11
  %15 = add nsw i32 %14, 1
  %16 = sext i32 %15 to i64
  %17 = shl nsw i64 %16, 2
  %18 = tail call noalias ptr @malloc(i64 noundef %17) #9
  %19 = tail call noalias ptr @malloc(i64 noundef %17) #9
  store ptr @_Z18processVertexEarlyi, ptr %1, align 8, !tbaa !14
  %20 = getelementptr inbounds i8, ptr %1, i64 8
  store ptr @_Z17processVertexLatei, ptr %20, align 8, !tbaa !16
  %21 = getelementptr inbounds i8, ptr %1, i64 16
  store ptr @_Z11processEdgeii, ptr %21, align 8, !tbaa !17
  %22 = load i32, ptr @graph, align 16, !tbaa !5
  %23 = load i32, ptr getelementptr inbounds (i8, ptr @graph, i64 4), align 4, !tbaa !5
  tail call void @insert_edge(ptr noundef %11, i32 noundef %22, i32 noundef %23, i32 noundef 0, i1 noundef zeroext false)
  %24 = load i32, ptr getelementptr inbounds (i8, ptr @graph, i64 8), align 8, !tbaa !5
  %25 = load i32, ptr getelementptr inbounds (i8, ptr @graph, i64 12), align 4, !tbaa !5
  tail call void @insert_edge(ptr noundef %11, i32 noundef %24, i32 noundef %25, i32 noundef 0, i1 noundef zeroext false)
  %26 = load i32, ptr getelementptr inbounds (i8, ptr @graph, i64 16), align 16, !tbaa !5
  %27 = load i32, ptr getelementptr inbounds (i8, ptr @graph, i64 20), align 4, !tbaa !5
  tail call void @insert_edge(ptr noundef %11, i32 noundef %26, i32 noundef %27, i32 noundef 0, i1 noundef zeroext false)
  %28 = load i32, ptr getelementptr inbounds (i8, ptr @graph, i64 24), align 8, !tbaa !5
  %29 = load i32, ptr getelementptr inbounds (i8, ptr @graph, i64 28), align 4, !tbaa !5
  tail call void @insert_edge(ptr noundef %11, i32 noundef %28, i32 noundef %29, i32 noundef 0, i1 noundef zeroext false)
  %30 = load i32, ptr getelementptr inbounds (i8, ptr @graph, i64 32), align 16, !tbaa !5
  %31 = load i32, ptr getelementptr inbounds (i8, ptr @graph, i64 36), align 4, !tbaa !5
  tail call void @insert_edge(ptr noundef %11, i32 noundef %30, i32 noundef %31, i32 noundef 0, i1 noundef zeroext false)
  %32 = load i32, ptr getelementptr inbounds (i8, ptr @graph, i64 40), align 8, !tbaa !5
  %33 = load i32, ptr getelementptr inbounds (i8, ptr @graph, i64 44), align 4, !tbaa !5
  tail call void @insert_edge(ptr noundef %11, i32 noundef %32, i32 noundef %33, i32 noundef 0, i1 noundef zeroext false)
  %34 = load i32, ptr getelementptr inbounds (i8, ptr @graph, i64 48), align 16, !tbaa !5
  %35 = load i32, ptr getelementptr inbounds (i8, ptr @graph, i64 52), align 4, !tbaa !5
  tail call void @insert_edge(ptr noundef %11, i32 noundef %34, i32 noundef %35, i32 noundef 0, i1 noundef zeroext false)
  %36 = load i32, ptr getelementptr inbounds (i8, ptr @graph, i64 56), align 8, !tbaa !5
  %37 = load i32, ptr getelementptr inbounds (i8, ptr @graph, i64 60), align 4, !tbaa !5
  tail call void @insert_edge(ptr noundef %11, i32 noundef %36, i32 noundef %37, i32 noundef 0, i1 noundef zeroext false)
  %38 = load i32, ptr getelementptr inbounds (i8, ptr @graph, i64 64), align 16, !tbaa !5
  %39 = load i32, ptr getelementptr inbounds (i8, ptr @graph, i64 68), align 4, !tbaa !5
  tail call void @insert_edge(ptr noundef %11, i32 noundef %38, i32 noundef %39, i32 noundef 0, i1 noundef zeroext false)
  %40 = load i32, ptr getelementptr inbounds (i8, ptr @graph, i64 72), align 8, !tbaa !5
  %41 = load i32, ptr getelementptr inbounds (i8, ptr @graph, i64 76), align 4, !tbaa !5
  tail call void @insert_edge(ptr noundef %11, i32 noundef %40, i32 noundef %41, i32 noundef 0, i1 noundef zeroext false)
  tail call void @searchInit(ptr noundef %11, ptr noundef %19, ptr noundef %18)
  call void @BFS(ptr noundef %11, i32 noundef 1, ptr noundef %19, ptr noundef %18, ptr noundef nonnull %1)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #8
  store i32 2, ptr %4, align 4, !tbaa !18
  %42 = getelementptr inbounds i8, ptr %19, i64 4
  call void @_ZN7testing8internal8EqHelperILb0EE7CompareI5StateS4_EENS_15AssertionResultEPKcS7_RKT_RKT0_(ptr dead_on_unwind nonnull writable sret(%"class.testing::AssertionResult") align 8 %3, ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.4, ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 4 dereferenceable(4) %42)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #8
  %43 = call noundef zeroext i1 @_ZNK7testing15AssertionResultcvbEv(ptr noundef nonnull align 8 dereferenceable(16) %3)
  br i1 %43, label %57, label %44

44:                                               ; preds = %81, %78, %75, %72, %69, %66, %63, %60, %57, %.lr.ph.preheader
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #8
  invoke void @_ZN7testing7MessageC1Ev(ptr noundef nonnull align 8 dereferenceable(8) %5)
          to label %45 unwind label %49

45:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #8
  %46 = invoke noundef ptr @_ZNK7testing15AssertionResult15failure_messageEv(ptr noundef nonnull align 8 dereferenceable(16) %3)
          to label %47 unwind label %51

47:                                               ; preds = %45
  invoke void @_ZN7testing8internal12AssertHelperC1ENS_14TestPartResult4TypeEPKciS5_(ptr noundef nonnull align 8 dereferenceable(8) %6, i32 noundef 2, ptr noundef nonnull @.str.5, i32 noundef 128, ptr noundef %46)
          to label %48 unwind label %51

48:                                               ; preds = %47
  invoke void @_ZNK7testing8internal12AssertHelperaSERKNS_7MessageE(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %5)
          to label %86 unwind label %53

49:                                               ; preds = %44
  %50 = landingpad { ptr, i32 }
          cleanup
  br label %56

51:                                               ; preds = %47, %45
  %52 = landingpad { ptr, i32 }
          cleanup
  br label %55

53:                                               ; preds = %48
  %54 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7testing8internal12AssertHelperD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #8
  br label %55

55:                                               ; preds = %53, %51
  %.pn = phi { ptr, i32 } [ %54, %53 ], [ %52, %51 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #8
  call void @_ZN7testing7MessageD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %5) #8
  br label %56

56:                                               ; preds = %55, %49
  %.pn.pn = phi { ptr, i32 } [ %.pn, %55 ], [ %50, %49 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #8
  call void @_ZN7testing15AssertionResultD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %3) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #8
  br label %112

57:                                               ; preds = %.lr.ph.preheader
  call void @_ZN7testing15AssertionResultD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %3) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #8
  store i32 2, ptr %4, align 4, !tbaa !18
  %58 = getelementptr inbounds i8, ptr %19, i64 8
  call void @_ZN7testing8internal8EqHelperILb0EE7CompareI5StateS4_EENS_15AssertionResultEPKcS7_RKT_RKT0_(ptr dead_on_unwind nonnull writable sret(%"class.testing::AssertionResult") align 8 %3, ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.4, ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 4 dereferenceable(4) %58)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #8
  %59 = call noundef zeroext i1 @_ZNK7testing15AssertionResultcvbEv(ptr noundef nonnull align 8 dereferenceable(16) %3)
  br i1 %59, label %60, label %44

60:                                               ; preds = %57
  call void @_ZN7testing15AssertionResultD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %3) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #8
  store i32 2, ptr %4, align 4, !tbaa !18
  %61 = getelementptr inbounds i8, ptr %19, i64 12
  call void @_ZN7testing8internal8EqHelperILb0EE7CompareI5StateS4_EENS_15AssertionResultEPKcS7_RKT_RKT0_(ptr dead_on_unwind nonnull writable sret(%"class.testing::AssertionResult") align 8 %3, ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.4, ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 4 dereferenceable(4) %61)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #8
  %62 = call noundef zeroext i1 @_ZNK7testing15AssertionResultcvbEv(ptr noundef nonnull align 8 dereferenceable(16) %3)
  br i1 %62, label %63, label %44

63:                                               ; preds = %60
  call void @_ZN7testing15AssertionResultD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %3) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #8
  store i32 2, ptr %4, align 4, !tbaa !18
  %64 = getelementptr inbounds i8, ptr %19, i64 16
  call void @_ZN7testing8internal8EqHelperILb0EE7CompareI5StateS4_EENS_15AssertionResultEPKcS7_RKT_RKT0_(ptr dead_on_unwind nonnull writable sret(%"class.testing::AssertionResult") align 8 %3, ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.4, ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 4 dereferenceable(4) %64)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #8
  %65 = call noundef zeroext i1 @_ZNK7testing15AssertionResultcvbEv(ptr noundef nonnull align 8 dereferenceable(16) %3)
  br i1 %65, label %66, label %44

66:                                               ; preds = %63
  call void @_ZN7testing15AssertionResultD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %3) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #8
  store i32 2, ptr %4, align 4, !tbaa !18
  %67 = getelementptr inbounds i8, ptr %19, i64 20
  call void @_ZN7testing8internal8EqHelperILb0EE7CompareI5StateS4_EENS_15AssertionResultEPKcS7_RKT_RKT0_(ptr dead_on_unwind nonnull writable sret(%"class.testing::AssertionResult") align 8 %3, ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.4, ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 4 dereferenceable(4) %67)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #8
  %68 = call noundef zeroext i1 @_ZNK7testing15AssertionResultcvbEv(ptr noundef nonnull align 8 dereferenceable(16) %3)
  br i1 %68, label %69, label %44

69:                                               ; preds = %66
  call void @_ZN7testing15AssertionResultD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %3) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #8
  store i32 2, ptr %4, align 4, !tbaa !18
  %70 = getelementptr inbounds i8, ptr %19, i64 24
  call void @_ZN7testing8internal8EqHelperILb0EE7CompareI5StateS4_EENS_15AssertionResultEPKcS7_RKT_RKT0_(ptr dead_on_unwind nonnull writable sret(%"class.testing::AssertionResult") align 8 %3, ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.4, ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 4 dereferenceable(4) %70)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #8
  %71 = call noundef zeroext i1 @_ZNK7testing15AssertionResultcvbEv(ptr noundef nonnull align 8 dereferenceable(16) %3)
  br i1 %71, label %72, label %44

72:                                               ; preds = %69
  call void @_ZN7testing15AssertionResultD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %3) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #8
  store i32 2, ptr %4, align 4, !tbaa !18
  %73 = getelementptr inbounds i8, ptr %19, i64 28
  call void @_ZN7testing8internal8EqHelperILb0EE7CompareI5StateS4_EENS_15AssertionResultEPKcS7_RKT_RKT0_(ptr dead_on_unwind nonnull writable sret(%"class.testing::AssertionResult") align 8 %3, ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.4, ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 4 dereferenceable(4) %73)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #8
  %74 = call noundef zeroext i1 @_ZNK7testing15AssertionResultcvbEv(ptr noundef nonnull align 8 dereferenceable(16) %3)
  br i1 %74, label %75, label %44

75:                                               ; preds = %72
  call void @_ZN7testing15AssertionResultD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %3) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #8
  store i32 2, ptr %4, align 4, !tbaa !18
  %76 = getelementptr inbounds i8, ptr %19, i64 32
  call void @_ZN7testing8internal8EqHelperILb0EE7CompareI5StateS4_EENS_15AssertionResultEPKcS7_RKT_RKT0_(ptr dead_on_unwind nonnull writable sret(%"class.testing::AssertionResult") align 8 %3, ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.4, ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 4 dereferenceable(4) %76)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #8
  %77 = call noundef zeroext i1 @_ZNK7testing15AssertionResultcvbEv(ptr noundef nonnull align 8 dereferenceable(16) %3)
  br i1 %77, label %78, label %44

78:                                               ; preds = %75
  call void @_ZN7testing15AssertionResultD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %3) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #8
  store i32 2, ptr %4, align 4, !tbaa !18
  %79 = getelementptr inbounds i8, ptr %19, i64 36
  call void @_ZN7testing8internal8EqHelperILb0EE7CompareI5StateS4_EENS_15AssertionResultEPKcS7_RKT_RKT0_(ptr dead_on_unwind nonnull writable sret(%"class.testing::AssertionResult") align 8 %3, ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.4, ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 4 dereferenceable(4) %79)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #8
  %80 = call noundef zeroext i1 @_ZNK7testing15AssertionResultcvbEv(ptr noundef nonnull align 8 dereferenceable(16) %3)
  br i1 %80, label %81, label %44

81:                                               ; preds = %78
  call void @_ZN7testing15AssertionResultD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %3) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #8
  store i32 2, ptr %4, align 4, !tbaa !18
  %82 = getelementptr inbounds i8, ptr %19, i64 40
  call void @_ZN7testing8internal8EqHelperILb0EE7CompareI5StateS4_EENS_15AssertionResultEPKcS7_RKT_RKT0_(ptr dead_on_unwind nonnull writable sret(%"class.testing::AssertionResult") align 8 %3, ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.4, ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 4 dereferenceable(4) %82)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #8
  %83 = call noundef zeroext i1 @_ZNK7testing15AssertionResultcvbEv(ptr noundef nonnull align 8 dereferenceable(16) %3)
  br i1 %83, label %.critedge47, label %44

.critedge47:                                      ; preds = %81
  call void @_ZN7testing15AssertionResultD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %3) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #8
  store i32 0, ptr %7, align 4, !tbaa !5
  %84 = load ptr, ptr @q, align 8, !tbaa !9
  %85 = call i32 @isQueueEmpty(ptr noundef %84)
  %.not52 = icmp eq i32 %85, 0
  br i1 %.not52, label %.lr.ph53, label %._crit_edge54

86:                                               ; preds = %48
  call void @_ZN7testing8internal12AssertHelperD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #8
  call void @_ZN7testing7MessageD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %5) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #8
  call void @_ZN7testing15AssertionResultD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %3) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #8
  br label %111

.lr.ph53:                                         ; preds = %.critedge47, %.lr.ph53
  %87 = phi i32 [ %90, %.lr.ph53 ], [ 0, %.critedge47 ]
  %88 = load ptr, ptr @q, align 8, !tbaa !9
  %89 = call ptr @dequeue(ptr noundef %88)
  %90 = add nuw nsw i32 %87, 1
  store i32 %90, ptr %7, align 4, !tbaa !5
  call void @free(ptr noundef %89) #8
  %91 = load ptr, ptr @q, align 8, !tbaa !9
  %92 = call i32 @isQueueEmpty(ptr noundef %91)
  %.not = icmp eq i32 %92, 0
  br i1 %.not, label %.lr.ph53, label %._crit_edge54, !llvm.loop !20

._crit_edge54:                                    ; preds = %.lr.ph53, %.critedge47
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #8
  call void @_ZN7testing8internal8EqHelperILb0EE7CompareIiiEENS_15AssertionResultEPKcS6_RKT_RKT0_(ptr dead_on_unwind nonnull writable sret(%"class.testing::AssertionResult") align 8 %8, ptr noundef nonnull @.str.6, ptr noundef nonnull @.str.7, ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) %7)
  %93 = call noundef zeroext i1 @_ZNK7testing15AssertionResultcvbEv(ptr noundef nonnull align 8 dereferenceable(16) %8)
  br i1 %93, label %108, label %94

94:                                               ; preds = %._crit_edge54
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #8
  invoke void @_ZN7testing7MessageC1Ev(ptr noundef nonnull align 8 dereferenceable(8) %9)
          to label %95 unwind label %100

95:                                               ; preds = %94
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #8
  %96 = invoke noundef ptr @_ZNK7testing15AssertionResult15failure_messageEv(ptr noundef nonnull align 8 dereferenceable(16) %8)
          to label %97 unwind label %102

97:                                               ; preds = %95
  invoke void @_ZN7testing8internal12AssertHelperC1ENS_14TestPartResult4TypeEPKciS5_(ptr noundef nonnull align 8 dereferenceable(8) %10, i32 noundef 2, ptr noundef nonnull @.str.5, i32 noundef 138, ptr noundef %96)
          to label %98 unwind label %102

98:                                               ; preds = %97
  invoke void @_ZNK7testing8internal12AssertHelperaSERKNS_7MessageE(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 8 dereferenceable(8) %9)
          to label %99 unwind label %104

99:                                               ; preds = %98
  call void @_ZN7testing8internal12AssertHelperD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %10) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #8
  call void @_ZN7testing7MessageD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %9) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #8
  call void @_ZN7testing15AssertionResultD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %8) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #8
  br label %110

100:                                              ; preds = %94
  %101 = landingpad { ptr, i32 }
          cleanup
  br label %107

102:                                              ; preds = %97, %95
  %103 = landingpad { ptr, i32 }
          cleanup
  br label %106

104:                                              ; preds = %98
  %105 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7testing8internal12AssertHelperD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %10) #8
  br label %106

106:                                              ; preds = %104, %102
  %.pn42 = phi { ptr, i32 } [ %105, %104 ], [ %103, %102 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #8
  call void @_ZN7testing7MessageD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %9) #8
  br label %107

107:                                              ; preds = %106, %100
  %.pn42.pn = phi { ptr, i32 } [ %.pn42, %106 ], [ %101, %100 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #8
  call void @_ZN7testing15AssertionResultD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %8) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #8
  br label %112

108:                                              ; preds = %._crit_edge54
  call void @_ZN7testing15AssertionResultD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %8) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #8
  call void @free(ptr noundef %18) #8
  call void @free(ptr noundef %19) #8
  %109 = load ptr, ptr @q, align 8, !tbaa !9
  call void @delQueue(ptr noundef %109)
  call void @deleteGraph(ptr noundef %11)
  br label %110

110:                                              ; preds = %99, %108
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #8
  br label %111

111:                                              ; preds = %86, %110
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %1) #8
  ret void

112:                                              ; preds = %107, %56
  %.pn42.pn.pn = phi { ptr, i32 } [ %.pn42.pn, %107 ], [ %.pn.pn, %56 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %1) #8
  resume { ptr, i32 } %.pn42.pn.pn
}

declare void @BFS(ptr noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "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 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { 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 #7 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #8 = { nounwind }
attributes #9 = { nounwind allocsize(0) }

!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 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !6, i64 16}
!12 = !{!"_ZTS5Graph", !10, i64 0, !10, i64 8, !6, i64 16, !6, i64 20, !13, i64 24}
!13 = !{!"bool", !7, i64 0}
!14 = !{!15, !10, i64 0}
!15 = !{!"_ZTS8GraphOps", !10, i64 0, !10, i64 8, !10, i64 16}
!16 = !{!15, !10, i64 8}
!17 = !{!15, !10, i64 16}
!18 = !{!19, !19, i64 0}
!19 = !{!"_ZTS5State", !7, i64 0}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.mustprogress"}


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