; LLVM IR from ravireddy07/cpp-book :: src/Rat-and-Maze/RatInMaze.ll (Z9RatinMazePA1001_ciiii)

; 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::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }

@visited = external dso_local global [1001 x [1001 x i8]], align 16
@solution = external dso_local global [1001 x [1001 x i8]], align 16
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_Z9RatinMazePA1001_ciiii(ptr noundef %0, i32 noundef %1, i32 noundef %2, i32 noundef %3, i32 noundef %4) #0 {
  %6 = alloca i1, align 1
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i8, align 1
  %16 = alloca i8, align 1
  store ptr %0, ptr %7, align 8, !tbaa !5
  store i32 %1, ptr %8, align 4, !tbaa !9
  store i32 %2, ptr %9, align 4, !tbaa !9
  store i32 %3, ptr %10, align 4, !tbaa !9
  store i32 %4, ptr %11, align 4, !tbaa !9
  %17 = load i32, ptr %8, align 4, !tbaa !9
  %18 = load i32, ptr %10, align 4, !tbaa !9
  %19 = icmp eq i32 %17, %18
  br i1 %19, label %20, label %62

20:                                               ; preds = %5
  %21 = load i32, ptr %9, align 4, !tbaa !9
  %22 = load i32, ptr %11, align 4, !tbaa !9
  %23 = icmp eq i32 %21, %22
  br i1 %23, label %24, label %62

24:                                               ; preds = %20
  %25 = load i32, ptr %8, align 4, !tbaa !9
  %26 = sext i32 %25 to i64
  %27 = getelementptr inbounds [1001 x [1001 x i8]], ptr @solution, i64 0, i64 %26
  %28 = load i32, ptr %9, align 4, !tbaa !9
  %29 = sext i32 %28 to i64
  %30 = getelementptr inbounds [1001 x i8], ptr %27, i64 0, i64 %29
  store i8 1, ptr %30, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #3
  store i32 0, ptr %12, align 4, !tbaa !9
  br label %31

31:                                               ; preds = %58, %24
  %32 = load i32, ptr %12, align 4, !tbaa !9
  %33 = load i32, ptr %10, align 4, !tbaa !9
  %34 = icmp sle i32 %32, %33
  br i1 %34, label %36, label %35

35:                                               ; preds = %31
  store i32 2, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #3
  br label %61

36:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #3
  store i32 0, ptr %14, align 4, !tbaa !9
  br label %37

37:                                               ; preds = %53, %36
  %38 = load i32, ptr %14, align 4, !tbaa !9
  %39 = load i32, ptr %11, align 4, !tbaa !9
  %40 = icmp sle i32 %38, %39
  br i1 %40, label %42, label %41

41:                                               ; preds = %37
  store i32 5, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #3
  br label %56

42:                                               ; preds = %37
  %43 = load i32, ptr %12, align 4, !tbaa !9
  %44 = sext i32 %43 to i64
  %45 = getelementptr inbounds [1001 x [1001 x i8]], ptr @solution, i64 0, i64 %44
  %46 = load i32, ptr %14, align 4, !tbaa !9
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds [1001 x i8], ptr %45, i64 0, i64 %47
  %49 = load i8, ptr %48, align 1, !tbaa !11, !range !13, !noundef !14
  %50 = trunc i8 %49 to i1
  %51 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEb(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i1 noundef zeroext %50)
  %52 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %51, ptr noundef @.str)
  br label %53

53:                                               ; preds = %42
  %54 = load i32, ptr %14, align 4, !tbaa !9
  %55 = add nsw i32 %54, 1
  store i32 %55, ptr %14, align 4, !tbaa !9
  br label %37, !llvm.loop !15

56:                                               ; preds = %41
  %57 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %58

58:                                               ; preds = %56
  %59 = load i32, ptr %12, align 4, !tbaa !9
  %60 = add nsw i32 %59, 1
  store i32 %60, ptr %12, align 4, !tbaa !9
  br label %31, !llvm.loop !17

61:                                               ; preds = %35
  store i1 true, ptr %6, align 1
  br label %157

62:                                               ; preds = %20, %5
  %63 = load i32, ptr %8, align 4, !tbaa !9
  %64 = sext i32 %63 to i64
  %65 = getelementptr inbounds [1001 x [1001 x i8]], ptr @visited, i64 0, i64 %64
  %66 = load i32, ptr %9, align 4, !tbaa !9
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds [1001 x i8], ptr %65, i64 0, i64 %67
  %69 = load i8, ptr %68, align 1, !tbaa !11, !range !13, !noundef !14
  %70 = trunc i8 %69 to i1
  br i1 %70, label %71, label %72

71:                                               ; preds = %62
  store i1 false, ptr %6, align 1
  br label %157

72:                                               ; preds = %62
  %73 = load i32, ptr %8, align 4, !tbaa !9
  %74 = sext i32 %73 to i64
  %75 = getelementptr inbounds [1001 x [1001 x i8]], ptr @visited, i64 0, i64 %74
  %76 = load i32, ptr %9, align 4, !tbaa !9
  %77 = sext i32 %76 to i64
  %78 = getelementptr inbounds [1001 x i8], ptr %75, i64 0, i64 %77
  store i8 1, ptr %78, align 1, !tbaa !11
  %79 = load i32, ptr %8, align 4, !tbaa !9
  %80 = sext i32 %79 to i64
  %81 = getelementptr inbounds [1001 x [1001 x i8]], ptr @solution, i64 0, i64 %80
  %82 = load i32, ptr %9, align 4, !tbaa !9
  %83 = sext i32 %82 to i64
  %84 = getelementptr inbounds [1001 x i8], ptr %81, i64 0, i64 %83
  store i8 1, ptr %84, align 1, !tbaa !11
  %85 = load i32, ptr %9, align 4, !tbaa !9
  %86 = add nsw i32 %85, 1
  %87 = load i32, ptr %11, align 4, !tbaa !9
  %88 = icmp sle i32 %86, %87
  br i1 %88, label %89, label %117

89:                                               ; preds = %72
  %90 = load i32, ptr %8, align 4, !tbaa !9
  %91 = sext i32 %90 to i64
  %92 = getelementptr inbounds [1001 x [1001 x i8]], ptr @visited, i64 0, i64 %91
  %93 = load i32, ptr %9, align 4, !tbaa !9
  %94 = add nsw i32 %93, 1
  %95 = sext i32 %94 to i64
  %96 = getelementptr inbounds [1001 x i8], ptr %92, i64 0, i64 %95
  %97 = load i8, ptr %96, align 1, !tbaa !11, !range !13, !noundef !14
  %98 = trunc i8 %97 to i1
  br i1 %98, label %117, label %99

99:                                               ; preds = %89
  call void @llvm.lifetime.start.p0(i64 1, ptr %15) #3
  %100 = load ptr, ptr %7, align 8, !tbaa !5
  %101 = load i32, ptr %8, align 4, !tbaa !9
  %102 = load i32, ptr %9, align 4, !tbaa !9
  %103 = add nsw i32 %102, 1
  %104 = load i32, ptr %10, align 4, !tbaa !9
  %105 = load i32, ptr %11, align 4, !tbaa !9
  %106 = call noundef zeroext i1 @_Z9RatinMazePA1001_ciiii(ptr noundef %100, i32 noundef %101, i32 noundef %103, i32 noundef %104, i32 noundef %105)
  %107 = zext i1 %106 to i8
  store i8 %107, ptr %15, align 1, !tbaa !11
  %108 = load i8, ptr %15, align 1, !tbaa !11, !range !13, !noundef !14
  %109 = trunc i8 %108 to i1
  %110 = zext i1 %109 to i32
  %111 = icmp eq i32 %110, 1
  br i1 %111, label %112, label %113

112:                                              ; preds = %99
  store i1 true, ptr %6, align 1
  store i32 1, ptr %13, align 4
  br label %114

113:                                              ; preds = %99
  store i32 0, ptr %13, align 4
  br label %114

114:                                              ; preds = %113, %112
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #3
  %115 = load i32, ptr %13, align 4
  switch i32 %115, label %159 [
    i32 0, label %116
    i32 1, label %157
  ]

116:                                              ; preds = %114
  br label %117

117:                                              ; preds = %116, %89, %72
  %118 = load i32, ptr %8, align 4, !tbaa !9
  %119 = add nsw i32 %118, 1
  %120 = load i32, ptr %10, align 4, !tbaa !9
  %121 = icmp sle i32 %119, %120
  br i1 %121, label %122, label %150

122:                                              ; preds = %117
  %123 = load i32, ptr %8, align 4, !tbaa !9
  %124 = add nsw i32 %123, 1
  %125 = sext i32 %124 to i64
  %126 = getelementptr inbounds [1001 x [1001 x i8]], ptr @visited, i64 0, i64 %125
  %127 = load i32, ptr %9, align 4, !tbaa !9
  %128 = sext i32 %127 to i64
  %129 = getelementptr inbounds [1001 x i8], ptr %126, i64 0, i64 %128
  %130 = load i8, ptr %129, align 1, !tbaa !11, !range !13, !noundef !14
  %131 = trunc i8 %130 to i1
  br i1 %131, label %150, label %132

132:                                              ; preds = %122
  call void @llvm.lifetime.start.p0(i64 1, ptr %16) #3
  %133 = load ptr, ptr %7, align 8, !tbaa !5
  %134 = load i32, ptr %8, align 4, !tbaa !9
  %135 = add nsw i32 %134, 1
  %136 = load i32, ptr %9, align 4, !tbaa !9
  %137 = load i32, ptr %10, align 4, !tbaa !9
  %138 = load i32, ptr %11, align 4, !tbaa !9
  %139 = call noundef zeroext i1 @_Z9RatinMazePA1001_ciiii(ptr noundef %133, i32 noundef %135, i32 noundef %136, i32 noundef %137, i32 noundef %138)
  %140 = zext i1 %139 to i8
  store i8 %140, ptr %16, align 1, !tbaa !11
  %141 = load i8, ptr %16, align 1, !tbaa !11, !range !13, !noundef !14
  %142 = trunc i8 %141 to i1
  %143 = zext i1 %142 to i32
  %144 = icmp eq i32 %143, 1
  br i1 %144, label %145, label %146

145:                                              ; preds = %132
  store i1 true, ptr %6, align 1
  store i32 1, ptr %13, align 4
  br label %147

146:                                              ; preds = %132
  store i32 0, ptr %13, align 4
  br label %147

147:                                              ; preds = %146, %145
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #3
  %148 = load i32, ptr %13, align 4
  switch i32 %148, label %159 [
    i32 0, label %149
    i32 1, label %157
  ]

149:                                              ; preds = %147
  br label %150

150:                                              ; preds = %149, %122, %117
  %151 = load i32, ptr %8, align 4, !tbaa !9
  %152 = sext i32 %151 to i64
  %153 = getelementptr inbounds [1001 x [1001 x i8]], ptr @solution, i64 0, i64 %152
  %154 = load i32, ptr %9, align 4, !tbaa !9
  %155 = sext i32 %154 to i64
  %156 = getelementptr inbounds [1001 x i8], ptr %153, i64 0, i64 %155
  store i8 0, ptr %156, align 1, !tbaa !11
  store i1 false, ptr %6, align 1
  br label %157

157:                                              ; preds = %150, %147, %114, %71, %61
  %158 = load i1, ptr %6, align 1
  ret i1 %158

159:                                              ; preds = %147, %114
  unreachable
}

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #2

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEb(ptr noundef nonnull align 8 dereferenceable(8), i1 noundef zeroext) #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 uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #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 = { inlinehint 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 #3 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{i8 0, i8 2}
!14 = !{}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = distinct !{!17, !16}


; 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::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }

@visited = external dso_local local_unnamed_addr global [1001 x [1001 x i8]], align 16
@solution = external dso_local local_unnamed_addr global [1001 x [1001 x i8]], align 16
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_Z9RatinMazePA1001_ciiii(ptr noundef %0, i32 noundef %1, i32 noundef %2, i32 noundef %3, i32 noundef %4) local_unnamed_addr #0 {
  %6 = icmp eq i32 %1, %3
  %7 = icmp eq i32 %2, %4
  %or.cond = and i1 %6, %7
  %8 = sext i32 %1 to i64
  %9 = sext i32 %2 to i64
  br i1 %or.cond, label %10, label %23

10:                                               ; preds = %5
  %11 = getelementptr inbounds [1001 x [1001 x i8]], ptr @solution, i64 0, i64 %8, i64 %9
  store i8 1, ptr %11, align 1, !tbaa !5
  %.not60 = icmp slt i32 %1, 0
  br i1 %.not60, label %.loopexit, label %.preheader.lr.ph

.preheader.lr.ph:                                 ; preds = %10
  %.not5558 = icmp slt i32 %2, 0
  br i1 %.not5558, label %.preheader.us, label %.preheader.preheader

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

.preheader.us:                                    ; preds = %.preheader.lr.ph, %.preheader.us
  %.04461.us = phi i32 [ %15, %.preheader.us ], [ 0, %.preheader.lr.ph ]
  %14 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %15 = add nuw i32 %.04461.us, 1
  %exitcond70.not = icmp eq i32 %.04461.us, %1
  br i1 %exitcond70.not, label %.loopexit, label %.preheader.us, !llvm.loop !9

.preheader:                                       ; preds = %.preheader.preheader, %._crit_edge
  %indvars.iv65 = phi i64 [ 0, %.preheader.preheader ], [ %indvars.iv.next66, %._crit_edge ]
  br label %17

._crit_edge:                                      ; preds = %17
  %16 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %indvars.iv.next66 = add nuw nsw i64 %indvars.iv65, 1
  %exitcond69.not = icmp eq i64 %indvars.iv.next66, %wide.trip.count68
  br i1 %exitcond69.not, label %.loopexit, label %.preheader, !llvm.loop !9

17:                                               ; preds = %.preheader, %17
  %indvars.iv = phi i64 [ 0, %.preheader ], [ %indvars.iv.next, %17 ]
  %18 = getelementptr inbounds [1001 x [1001 x i8]], ptr @solution, i64 0, i64 %indvars.iv65, i64 %indvars.iv
  %19 = load i8, ptr %18, align 1, !tbaa !5, !range !11, !noundef !12
  %20 = trunc nuw i8 %19 to i1
  %21 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEb(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i1 noundef zeroext %20)
  %22 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %21, ptr noundef nonnull @.str)
  %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 %._crit_edge, label %17, !llvm.loop !13

23:                                               ; preds = %5
  %24 = getelementptr inbounds [1001 x [1001 x i8]], ptr @visited, i64 0, i64 %8, i64 %9
  %25 = load i8, ptr %24, align 1, !tbaa !5, !range !11, !noundef !12
  %26 = trunc nuw i8 %25 to i1
  br i1 %26, label %.loopexit, label %27

27:                                               ; preds = %23
  store i8 1, ptr %24, align 1, !tbaa !5
  %28 = getelementptr inbounds [1001 x [1001 x i8]], ptr @solution, i64 0, i64 %8, i64 %9
  store i8 1, ptr %28, align 1, !tbaa !5
  %29 = add nsw i32 %2, 1
  %.not.not = icmp slt i32 %2, %4
  br i1 %.not.not, label %30, label %37

30:                                               ; preds = %27
  %31 = sext i32 %29 to i64
  %32 = getelementptr inbounds [1001 x [1001 x i8]], ptr @visited, i64 0, i64 %8, i64 %31
  %33 = load i8, ptr %32, align 1, !tbaa !5, !range !11, !noundef !12
  %34 = trunc nuw i8 %33 to i1
  br i1 %34, label %37, label %35

35:                                               ; preds = %30
  %36 = tail call noundef zeroext i1 @_Z9RatinMazePA1001_ciiii(ptr noundef %0, i32 noundef %1, i32 noundef %29, i32 noundef %3, i32 noundef %4)
  br i1 %36, label %.loopexit, label %37

37:                                               ; preds = %35, %30, %27
  %38 = add nsw i32 %1, 1
  %.not.not54 = icmp slt i32 %1, %3
  br i1 %.not.not54, label %39, label %46

39:                                               ; preds = %37
  %40 = sext i32 %38 to i64
  %41 = getelementptr inbounds [1001 x [1001 x i8]], ptr @visited, i64 0, i64 %40, i64 %9
  %42 = load i8, ptr %41, align 1, !tbaa !5, !range !11, !noundef !12
  %43 = trunc nuw i8 %42 to i1
  br i1 %43, label %46, label %44

44:                                               ; preds = %39
  %45 = tail call noundef zeroext i1 @_Z9RatinMazePA1001_ciiii(ptr noundef %0, i32 noundef %38, i32 noundef %2, i32 noundef %3, i32 noundef %4)
  br i1 %45, label %.loopexit, label %46

46:                                               ; preds = %44, %39, %37
  store i8 0, ptr %28, align 1, !tbaa !5
  br label %.loopexit

.loopexit:                                        ; preds = %._crit_edge, %.preheader.us, %10, %44, %35, %23, %46
  %.3 = phi i1 [ false, %46 ], [ true, %44 ], [ true, %35 ], [ false, %23 ], [ true, %10 ], [ true, %.preheader.us ], [ true, %._crit_edge ]
  ret i1 %.3
}

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEb(ptr noundef nonnull align 8 dereferenceable(8), i1 noundef zeroext) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #1

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 = { inlinehint 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" }

!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 = !{!"bool", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{i8 0, i8 2}
!12 = !{}
!13 = distinct !{!13, !10}


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