; LLVM IR from AlgoGenesis/C :: Searching Algorithms/Bidirectional Search (Bidirectional Search)

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

@.str.2 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [33 x i8], align 1

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

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

; Function Attrs: nounwind uwtable
declare dso_local zeroext i1 @isEmpty(ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local void @enqueue(ptr noundef, ptr noundef, ptr noundef, i32 noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local i32 @dequeue(ptr noundef, ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local void @printPath(ptr noundef, ptr noundef, i32 noundef, i32 noundef, i32 noundef) #1

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

; Function Attrs: nounwind uwtable
define dso_local void @bidirectionalSearch(ptr noundef %0, i32 noundef %1, i32 noundef %2, i32 noundef %3) #1 {
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca [100 x i32], align 16
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca [100 x i32], align 16
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca [100 x i8], align 16
  %16 = alloca [100 x i8], align 16
  %17 = alloca [100 x i32], align 16
  %18 = alloca [100 x i32], align 16
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store i32 %1, ptr %6, align 4, !tbaa !9
  store i32 %2, ptr %7, align 4, !tbaa !9
  store i32 %3, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 400, ptr %9) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  store i32 -1, ptr %10, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  store i32 -1, ptr %11, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 400, ptr %12) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  store i32 -1, ptr %13, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #4
  store i32 -1, ptr %14, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 100, ptr %15) #4
  call void @llvm.memset.p0.i64(ptr align 16 %15, i8 0, i64 100, i1 false)
  call void @llvm.lifetime.start.p0(i64 100, ptr %16) #4
  call void @llvm.memset.p0.i64(ptr align 16 %16, i8 0, i64 100, i1 false)
  call void @llvm.lifetime.start.p0(i64 400, ptr %17) #4
  call void @llvm.lifetime.start.p0(i64 400, ptr %18) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #4
  store i32 0, ptr %19, align 4, !tbaa !9
  br label %25

25:                                               ; preds = %37, %4
  %26 = load i32, ptr %19, align 4, !tbaa !9
  %27 = load i32, ptr %8, align 4, !tbaa !9
  %28 = icmp slt i32 %26, %27
  br i1 %28, label %30, label %29

29:                                               ; preds = %25
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #4
  br label %40

30:                                               ; preds = %25
  %31 = load i32, ptr %19, align 4, !tbaa !9
  %32 = sext i32 %31 to i64
  %33 = getelementptr inbounds [100 x i32], ptr %17, i64 0, i64 %32
  store i32 -1, ptr %33, align 4, !tbaa !9
  %34 = load i32, ptr %19, align 4, !tbaa !9
  %35 = sext i32 %34 to i64
  %36 = getelementptr inbounds [100 x i32], ptr %18, i64 0, i64 %35
  store i32 -1, ptr %36, align 4, !tbaa !9
  br label %37

37:                                               ; preds = %30
  %38 = load i32, ptr %19, align 4, !tbaa !9
  %39 = add nsw i32 %38, 1
  store i32 %39, ptr %19, align 4, !tbaa !9
  br label %25, !llvm.loop !11

40:                                               ; preds = %29
  %41 = load i32, ptr %6, align 4, !tbaa !9
  %42 = sext i32 %41 to i64
  %43 = getelementptr inbounds [100 x i8], ptr %15, i64 0, i64 %42
  store i8 1, ptr %43, align 1, !tbaa !13
  %44 = load i32, ptr %7, align 4, !tbaa !9
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds [100 x i8], ptr %16, i64 0, i64 %45
  store i8 1, ptr %46, align 1, !tbaa !13
  %47 = getelementptr inbounds [100 x i32], ptr %9, i64 0, i64 0
  %48 = load i32, ptr %6, align 4, !tbaa !9
  call void @enqueue(ptr noundef %47, ptr noundef %10, ptr noundef %11, i32 noundef %48)
  %49 = getelementptr inbounds [100 x i32], ptr %12, i64 0, i64 0
  %50 = load i32, ptr %7, align 4, !tbaa !9
  call void @enqueue(ptr noundef %49, ptr noundef %13, ptr noundef %14, i32 noundef %50)
  br label %51

51:                                               ; preds = %170, %40
  %52 = getelementptr inbounds [100 x i32], ptr %9, i64 0, i64 0
  %53 = call zeroext i1 @isEmpty(ptr noundef %52, ptr noundef %10)
  br i1 %53, label %58, label %54

54:                                               ; preds = %51
  %55 = getelementptr inbounds [100 x i32], ptr %12, i64 0, i64 0
  %56 = call zeroext i1 @isEmpty(ptr noundef %55, ptr noundef %13)
  %57 = xor i1 %56, true
  br label %58

58:                                               ; preds = %54, %51
  %59 = phi i1 [ false, %51 ], [ %57, %54 ]
  br i1 %59, label %60, label %171

60:                                               ; preds = %58
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #4
  %61 = getelementptr inbounds [100 x i32], ptr %9, i64 0, i64 0
  %62 = call i32 @dequeue(ptr noundef %61, ptr noundef %10, ptr noundef %11)
  store i32 %62, ptr %20, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #4
  store i32 0, ptr %21, align 4, !tbaa !9
  br label %63

63:                                               ; preds = %108, %60
  %64 = load i32, ptr %21, align 4, !tbaa !9
  %65 = load i32, ptr %8, align 4, !tbaa !9
  %66 = icmp slt i32 %64, %65
  br i1 %66, label %68, label %67

67:                                               ; preds = %63
  store i32 7, ptr %22, align 4
  br label %111

68:                                               ; preds = %63
  %69 = load ptr, ptr %5, align 8, !tbaa !5
  %70 = load i32, ptr %20, align 4, !tbaa !9
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds [100 x i32], ptr %69, i64 %71
  %73 = load i32, ptr %21, align 4, !tbaa !9
  %74 = sext i32 %73 to i64
  %75 = getelementptr inbounds [100 x i32], ptr %72, i64 0, i64 %74
  %76 = load i32, ptr %75, align 4, !tbaa !9
  %77 = icmp ne i32 %76, 0
  br i1 %77, label %78, label %107

78:                                               ; preds = %68
  %79 = load i32, ptr %21, align 4, !tbaa !9
  %80 = sext i32 %79 to i64
  %81 = getelementptr inbounds [100 x i8], ptr %15, i64 0, i64 %80
  %82 = load i8, ptr %81, align 1, !tbaa !13, !range !15, !noundef !16
  %83 = trunc i8 %82 to i1
  br i1 %83, label %107, label %84

84:                                               ; preds = %78
  %85 = load i32, ptr %21, align 4, !tbaa !9
  %86 = sext i32 %85 to i64
  %87 = getelementptr inbounds [100 x i8], ptr %15, i64 0, i64 %86
  store i8 1, ptr %87, align 1, !tbaa !13
  %88 = load i32, ptr %20, align 4, !tbaa !9
  %89 = load i32, ptr %21, align 4, !tbaa !9
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds [100 x i32], ptr %17, i64 0, i64 %90
  store i32 %88, ptr %91, align 4, !tbaa !9
  %92 = getelementptr inbounds [100 x i32], ptr %9, i64 0, i64 0
  %93 = load i32, ptr %21, align 4, !tbaa !9
  call void @enqueue(ptr noundef %92, ptr noundef %10, ptr noundef %11, i32 noundef %93)
  %94 = load i32, ptr %21, align 4, !tbaa !9
  %95 = sext i32 %94 to i64
  %96 = getelementptr inbounds [100 x i8], ptr %16, i64 0, i64 %95
  %97 = load i8, ptr %96, align 1, !tbaa !13, !range !15, !noundef !16
  %98 = trunc i8 %97 to i1
  br i1 %98, label %99, label %106

99:                                               ; preds = %84
  %100 = call i32 (ptr, ...) @printf(ptr noundef @.str.2)
  %101 = getelementptr inbounds [100 x i32], ptr %17, i64 0, i64 0
  %102 = getelementptr inbounds [100 x i32], ptr %18, i64 0, i64 0
  %103 = load i32, ptr %21, align 4, !tbaa !9
  %104 = load i32, ptr %6, align 4, !tbaa !9
  %105 = load i32, ptr %7, align 4, !tbaa !9
  call void @printPath(ptr noundef %101, ptr noundef %102, i32 noundef %103, i32 noundef %104, i32 noundef %105)
  store i32 1, ptr %22, align 4
  br label %111

106:                                              ; preds = %84
  br label %107

107:                                              ; preds = %106, %78, %68
  br label %108

108:                                              ; preds = %107
  %109 = load i32, ptr %21, align 4, !tbaa !9
  %110 = add nsw i32 %109, 1
  store i32 %110, ptr %21, align 4, !tbaa !9
  br label %63, !llvm.loop !17

111:                                              ; preds = %99, %67
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #4
  %112 = load i32, ptr %22, align 4
  switch i32 %112, label %168 [
    i32 7, label %113
  ]

113:                                              ; preds = %111
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #4
  %114 = getelementptr inbounds [100 x i32], ptr %12, i64 0, i64 0
  %115 = call i32 @dequeue(ptr noundef %114, ptr noundef %13, ptr noundef %14)
  store i32 %115, ptr %23, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #4
  store i32 0, ptr %24, align 4, !tbaa !9
  br label %116

116:                                              ; preds = %161, %113
  %117 = load i32, ptr %24, align 4, !tbaa !9
  %118 = load i32, ptr %8, align 4, !tbaa !9
  %119 = icmp slt i32 %117, %118
  br i1 %119, label %121, label %120

120:                                              ; preds = %116
  store i32 10, ptr %22, align 4
  br label %164

121:                                              ; preds = %116
  %122 = load ptr, ptr %5, align 8, !tbaa !5
  %123 = load i32, ptr %23, align 4, !tbaa !9
  %124 = sext i32 %123 to i64
  %125 = getelementptr inbounds [100 x i32], ptr %122, i64 %124
  %126 = load i32, ptr %24, align 4, !tbaa !9
  %127 = sext i32 %126 to i64
  %128 = getelementptr inbounds [100 x i32], ptr %125, i64 0, i64 %127
  %129 = load i32, ptr %128, align 4, !tbaa !9
  %130 = icmp ne i32 %129, 0
  br i1 %130, label %131, label %160

131:                                              ; preds = %121
  %132 = load i32, ptr %24, align 4, !tbaa !9
  %133 = sext i32 %132 to i64
  %134 = getelementptr inbounds [100 x i8], ptr %16, i64 0, i64 %133
  %135 = load i8, ptr %134, align 1, !tbaa !13, !range !15, !noundef !16
  %136 = trunc i8 %135 to i1
  br i1 %136, label %160, label %137

137:                                              ; preds = %131
  %138 = load i32, ptr %24, align 4, !tbaa !9
  %139 = sext i32 %138 to i64
  %140 = getelementptr inbounds [100 x i8], ptr %16, i64 0, i64 %139
  store i8 1, ptr %140, align 1, !tbaa !13
  %141 = load i32, ptr %23, align 4, !tbaa !9
  %142 = load i32, ptr %24, align 4, !tbaa !9
  %143 = sext i32 %142 to i64
  %144 = getelementptr inbounds [100 x i32], ptr %18, i64 0, i64 %143
  store i32 %141, ptr %144, align 4, !tbaa !9
  %145 = getelementptr inbounds [100 x i32], ptr %12, i64 0, i64 0
  %146 = load i32, ptr %24, align 4, !tbaa !9
  call void @enqueue(ptr noundef %145, ptr noundef %13, ptr noundef %14, i32 noundef %146)
  %147 = load i32, ptr %24, align 4, !tbaa !9
  %148 = sext i32 %147 to i64
  %149 = getelementptr inbounds [100 x i8], ptr %15, i64 0, i64 %148
  %150 = load i8, ptr %149, align 1, !tbaa !13, !range !15, !noundef !16
  %151 = trunc i8 %150 to i1
  br i1 %151, label %152, label %159

152:                                              ; preds = %137
  %153 = call i32 (ptr, ...) @printf(ptr noundef @.str.2)
  %154 = getelementptr inbounds [100 x i32], ptr %17, i64 0, i64 0
  %155 = getelementptr inbounds [100 x i32], ptr %18, i64 0, i64 0
  %156 = load i32, ptr %24, align 4, !tbaa !9
  %157 = load i32, ptr %6, align 4, !tbaa !9
  %158 = load i32, ptr %7, align 4, !tbaa !9
  call void @printPath(ptr noundef %154, ptr noundef %155, i32 noundef %156, i32 noundef %157, i32 noundef %158)
  store i32 1, ptr %22, align 4
  br label %164

159:                                              ; preds = %137
  br label %160

160:                                              ; preds = %159, %131, %121
  br label %161

161:                                              ; preds = %160
  %162 = load i32, ptr %24, align 4, !tbaa !9
  %163 = add nsw i32 %162, 1
  store i32 %163, ptr %24, align 4, !tbaa !9
  br label %116, !llvm.loop !18

164:                                              ; preds = %152, %120
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #4
  %165 = load i32, ptr %22, align 4
  switch i32 %165, label %167 [
    i32 10, label %166
  ]

166:                                              ; preds = %164
  store i32 0, ptr %22, align 4
  br label %167

167:                                              ; preds = %166, %164
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #4
  br label %168

168:                                              ; preds = %167, %111
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #4
  %169 = load i32, ptr %22, align 4
  switch i32 %169, label %175 [
    i32 0, label %170
  ]

170:                                              ; preds = %168
  br label %51, !llvm.loop !19

171:                                              ; preds = %58
  %172 = load i32, ptr %6, align 4, !tbaa !9
  %173 = load i32, ptr %7, align 4, !tbaa !9
  %174 = call i32 (ptr, ...) @printf(ptr noundef @.str.3, i32 noundef %172, i32 noundef %173)
  store i32 0, ptr %22, align 4
  br label %175

175:                                              ; preds = %171, %168
  call void @llvm.lifetime.end.p0(i64 400, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 400, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 100, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 100, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 400, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 400, ptr %9) #4
  %176 = load i32, ptr %22, align 4
  switch i32 %176, label %178 [
    i32 0, label %177
    i32 1, label %177
  ]

177:                                              ; preds = %175, %175
  ret void

178:                                              ; preds = %175
  unreachable
}

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

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

@.str.2 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [33 x i8], align 1

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

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

; Function Attrs: nounwind uwtable
declare dso_local zeroext i1 @isEmpty(ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local void @enqueue(ptr noundef, ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local i32 @dequeue(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local void @printPath(ptr noundef, ptr noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #1

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

; Function Attrs: nounwind uwtable
define dso_local void @bidirectionalSearch(ptr nocapture noundef readonly %0, i32 noundef %1, i32 noundef %2, i32 noundef %3) local_unnamed_addr #1 {
  %5 = alloca [100 x i32], align 16
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca [100 x i32], align 16
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca [100 x i8], align 16
  %12 = alloca [100 x i8], align 16
  %13 = alloca [100 x i32], align 16
  %14 = alloca [100 x i32], align 16
  call void @llvm.lifetime.start.p0(i64 400, ptr nonnull %5) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #4
  store i32 -1, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #4
  store i32 -1, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 400, ptr nonnull %8) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #4
  store i32 -1, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #4
  store i32 -1, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 100, ptr nonnull %11) #4
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(100) %11, i8 0, i64 100, i1 false)
  call void @llvm.lifetime.start.p0(i64 100, ptr nonnull %12) #4
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(100) %12, i8 0, i64 100, i1 false)
  call void @llvm.lifetime.start.p0(i64 400, ptr nonnull %13) #4
  call void @llvm.lifetime.start.p0(i64 400, ptr nonnull %14) #4
  %15 = icmp sgt i32 %3, 0
  br i1 %15, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %4
  %16 = zext nneg i32 %3 to i64
  %17 = shl nuw nsw i64 %16, 2
  call void @llvm.memset.p0.i64(ptr nonnull align 16 %13, i8 -1, i64 %17, i1 false), !tbaa !5
  call void @llvm.memset.p0.i64(ptr nonnull align 16 %14, i8 -1, i64 %17, i1 false), !tbaa !5
  br label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph.preheader, %4
  %18 = sext i32 %1 to i64
  %19 = getelementptr inbounds [100 x i8], ptr %11, i64 0, i64 %18
  store i8 1, ptr %19, align 1, !tbaa !9
  %20 = sext i32 %2 to i64
  %21 = getelementptr inbounds [100 x i8], ptr %12, i64 0, i64 %20
  store i8 1, ptr %21, align 1, !tbaa !9
  call void @enqueue(ptr noundef nonnull %5, ptr noundef nonnull %6, ptr noundef nonnull %7, i32 noundef %1)
  call void @enqueue(ptr noundef nonnull %8, ptr noundef nonnull %9, ptr noundef nonnull %10, i32 noundef %2)
  %22 = call zeroext i1 @isEmpty(ptr noundef nonnull %5, ptr noundef nonnull %6)
  br i1 %22, label %.critedge, label %.lr.ph67

.lr.ph67:                                         ; preds = %._crit_edge
  br i1 %15, label %.lr.ph67.split.us.preheader, label %.lr.ph67.split.split

.lr.ph67.split.us.preheader:                      ; preds = %.lr.ph67
  %wide.trip.count = zext nneg i32 %3 to i64
  br label %.lr.ph67.split.us

.lr.ph67.split.us:                                ; preds = %.lr.ph67.split.us.preheader, %.loopexit.us
  %23 = call zeroext i1 @isEmpty(ptr noundef nonnull %8, ptr noundef nonnull %9)
  br i1 %23, label %.critedge, label %.lr.ph62.us

.lr.ph62.us:                                      ; preds = %.lr.ph67.split.us
  %24 = call i32 @dequeue(ptr noundef nonnull %5, ptr noundef nonnull %6, ptr noundef nonnull %7)
  %25 = sext i32 %24 to i64
  br label %40

26:                                               ; preds = %.lr.ph65.us, %39
  %indvars.iv86 = phi i64 [ 0, %.lr.ph65.us ], [ %indvars.iv.next87, %39 ]
  %27 = getelementptr inbounds [100 x i32], ptr %0, i64 %56, i64 %indvars.iv86
  %28 = load i32, ptr %27, align 4, !tbaa !5
  %.not50.us = icmp eq i32 %28, 0
  br i1 %.not50.us, label %39, label %29

29:                                               ; preds = %26
  %30 = getelementptr inbounds [100 x i8], ptr %12, i64 0, i64 %indvars.iv86
  %31 = load i8, ptr %30, align 1, !tbaa !9, !range !11, !noundef !12
  %32 = trunc nuw i8 %31 to i1
  br i1 %32, label %39, label %33

33:                                               ; preds = %29
  store i8 1, ptr %30, align 1, !tbaa !9
  %34 = getelementptr inbounds [100 x i32], ptr %14, i64 0, i64 %indvars.iv86
  store i32 %55, ptr %34, align 4, !tbaa !5
  %35 = trunc nuw nsw i64 %indvars.iv86 to i32
  call void @enqueue(ptr noundef nonnull %8, ptr noundef nonnull %9, ptr noundef nonnull %10, i32 noundef %35)
  %36 = getelementptr inbounds [100 x i8], ptr %11, i64 0, i64 %indvars.iv86
  %37 = load i8, ptr %36, align 1, !tbaa !9, !range !11, !noundef !12
  %38 = trunc nuw i8 %37 to i1
  br i1 %38, label %.split.us, label %39

39:                                               ; preds = %33, %29, %26
  %indvars.iv.next87 = add nuw nsw i64 %indvars.iv86, 1
  %exitcond90.not = icmp eq i64 %indvars.iv.next87, %wide.trip.count
  br i1 %exitcond90.not, label %.loopexit.us, label %26, !llvm.loop !13

40:                                               ; preds = %.lr.ph62.us, %53
  %indvars.iv = phi i64 [ 0, %.lr.ph62.us ], [ %indvars.iv.next, %53 ]
  %41 = getelementptr inbounds [100 x i32], ptr %0, i64 %25, i64 %indvars.iv
  %42 = load i32, ptr %41, align 4, !tbaa !5
  %.not.us = icmp eq i32 %42, 0
  br i1 %.not.us, label %53, label %43

43:                                               ; preds = %40
  %44 = getelementptr inbounds [100 x i8], ptr %11, i64 0, i64 %indvars.iv
  %45 = load i8, ptr %44, align 1, !tbaa !9, !range !11, !noundef !12
  %46 = trunc nuw i8 %45 to i1
  br i1 %46, label %53, label %47

47:                                               ; preds = %43
  store i8 1, ptr %44, align 1, !tbaa !9
  %48 = getelementptr inbounds [100 x i32], ptr %13, i64 0, i64 %indvars.iv
  store i32 %24, ptr %48, align 4, !tbaa !5
  %49 = trunc nuw nsw i64 %indvars.iv to i32
  call void @enqueue(ptr noundef nonnull %5, ptr noundef nonnull %6, ptr noundef nonnull %7, i32 noundef %49)
  %50 = getelementptr inbounds [100 x i8], ptr %12, i64 0, i64 %indvars.iv
  %51 = load i8, ptr %50, align 1, !tbaa !9, !range !11, !noundef !12
  %52 = trunc nuw i8 %51 to i1
  br i1 %52, label %.split70.us, label %53

53:                                               ; preds = %47, %43, %40
  %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 %.lr.ph65.us, label %40, !llvm.loop !15

.loopexit.us:                                     ; preds = %39
  %54 = call zeroext i1 @isEmpty(ptr noundef nonnull %5, ptr noundef nonnull %6)
  br i1 %54, label %.critedge, label %.lr.ph67.split.us, !llvm.loop !16

.lr.ph65.us:                                      ; preds = %53
  %55 = call i32 @dequeue(ptr noundef nonnull %8, ptr noundef nonnull %9, ptr noundef nonnull %10)
  %56 = sext i32 %55 to i64
  br label %26

.lr.ph67.split.split:                             ; preds = %.lr.ph67, %.critedge53
  %57 = call zeroext i1 @isEmpty(ptr noundef nonnull %8, ptr noundef nonnull %9)
  br i1 %57, label %.critedge, label %.critedge53

.critedge53:                                      ; preds = %.lr.ph67.split.split
  %58 = call i32 @dequeue(ptr noundef nonnull %5, ptr noundef nonnull %6, ptr noundef nonnull %7)
  %59 = call i32 @dequeue(ptr noundef nonnull %8, ptr noundef nonnull %9, ptr noundef nonnull %10)
  %60 = call zeroext i1 @isEmpty(ptr noundef nonnull %5, ptr noundef nonnull %6)
  br i1 %60, label %.critedge, label %.lr.ph67.split.split, !llvm.loop !16

.split70.us:                                      ; preds = %47
  %61 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2)
  call void @printPath(ptr noundef nonnull %13, ptr noundef nonnull %14, i32 noundef %49, i32 noundef %1, i32 noundef %2)
  br label %.thread

.split.us:                                        ; preds = %33
  %62 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2)
  call void @printPath(ptr noundef nonnull %13, ptr noundef nonnull %14, i32 noundef %35, i32 noundef %1, i32 noundef %2)
  br label %.thread

.critedge:                                        ; preds = %.lr.ph67.split.split, %.critedge53, %.lr.ph67.split.us, %.loopexit.us, %._crit_edge
  %63 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %1, i32 noundef %2)
  br label %.thread

.thread:                                          ; preds = %.split.us, %.split70.us, %.critedge
  call void @llvm.lifetime.end.p0(i64 400, ptr nonnull %14) #4
  call void @llvm.lifetime.end.p0(i64 400, ptr nonnull %13) #4
  call void @llvm.lifetime.end.p0(i64 100, ptr nonnull %12) #4
  call void @llvm.lifetime.end.p0(i64 100, ptr nonnull %11) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #4
  call void @llvm.lifetime.end.p0(i64 400, ptr nonnull %8) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #4
  call void @llvm.lifetime.end.p0(i64 400, ptr nonnull %5) #4
  ret void
}

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

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


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopIdiomRecognizePass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SCCPPass,SROAPass,SimplifyCFGPass