; LLVM IR from Muhammad-Magdi/problem-solving :: Backtracking/Backtracking - Suduku2.ll (Z5solveSt4pairIiiE)

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

%"struct.std::pair" = type { i32, i32 }

@grid = external dso_local global [10 x [10 x i8]], align 16
@ops = external dso_local global i32, align 4

; Function Attrs: mustprogress uwtable
declare dso_local i64 @_Z8nextCellSt4pairIiiE(i64) #0

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_Z5validii(i32 noundef, i32 noundef) #2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_Z5solveSt4pairIiiE(i64 %0) #0 {
  %2 = alloca i1, align 1
  %3 = alloca %"struct.std::pair", align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca %"struct.std::pair", align 4
  %8 = alloca %"struct.std::pair", align 4
  %9 = alloca i8, align 1
  %10 = alloca %"struct.std::pair", align 4
  %11 = alloca %"struct.std::pair", align 4
  store i64 %0, ptr %3, align 4
  %12 = load i32, ptr @ops, align 4, !tbaa !5
  %13 = add nsw i32 %12, 1
  store i32 %13, ptr @ops, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #4
  %14 = getelementptr inbounds %"struct.std::pair", ptr %3, i32 0, i32 0
  %15 = load i32, ptr %14, align 4, !tbaa !9
  store i32 %15, ptr %4, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #4
  %16 = getelementptr inbounds %"struct.std::pair", ptr %3, i32 0, i32 1
  %17 = load i32, ptr %16, align 4, !tbaa !11
  store i32 %17, ptr %5, align 4, !tbaa !5
  %18 = load i32, ptr %4, align 4, !tbaa !5
  %19 = icmp eq i32 %18, 8
  br i1 %19, label %20, label %34

20:                                               ; preds = %1
  %21 = load i32, ptr %5, align 4, !tbaa !5
  %22 = icmp eq i32 %21, 8
  br i1 %22, label %23, label %34

23:                                               ; preds = %20
  %24 = load i32, ptr %4, align 4, !tbaa !5
  %25 = sext i32 %24 to i64
  %26 = getelementptr inbounds [10 x [10 x i8]], ptr @grid, i64 0, i64 %25
  %27 = load i32, ptr %5, align 4, !tbaa !5
  %28 = sext i32 %27 to i64
  %29 = getelementptr inbounds [10 x i8], ptr %26, i64 0, i64 %28
  %30 = load i8, ptr %29, align 1, !tbaa !12
  %31 = sext i8 %30 to i32
  %32 = icmp ne i32 %31, 120
  br i1 %32, label %33, label %34

33:                                               ; preds = %23
  store i1 true, ptr %2, align 1
  store i32 1, ptr %6, align 4
  br label %97

34:                                               ; preds = %23, %20, %1
  %35 = load i32, ptr %4, align 4, !tbaa !5
  %36 = sext i32 %35 to i64
  %37 = getelementptr inbounds [10 x [10 x i8]], ptr @grid, i64 0, i64 %36
  %38 = load i32, ptr %5, align 4, !tbaa !5
  %39 = sext i32 %38 to i64
  %40 = getelementptr inbounds [10 x i8], ptr %37, i64 0, i64 %39
  %41 = load i8, ptr %40, align 1, !tbaa !12
  %42 = sext i8 %41 to i32
  %43 = icmp ne i32 %42, 120
  br i1 %43, label %44, label %49

44:                                               ; preds = %34
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %8, ptr align 4 %3, i64 8, i1 false)
  %45 = load i64, ptr %8, align 4
  %46 = call i64 @_Z8nextCellSt4pairIiiE(i64 %45)
  store i64 %46, ptr %7, align 4
  %47 = load i64, ptr %7, align 4
  %48 = call noundef zeroext i1 @_Z5solveSt4pairIiiE(i64 %47)
  store i1 %48, ptr %2, align 1
  store i32 1, ptr %6, align 4
  br label %97

49:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 1, ptr %9) #4
  store i8 49, ptr %9, align 1, !tbaa !12
  br label %50

50:                                               ; preds = %91, %49
  %51 = load i8, ptr %9, align 1, !tbaa !12
  %52 = sext i8 %51 to i32
  %53 = icmp sle i32 %52, 57
  br i1 %53, label %55, label %54

54:                                               ; preds = %50
  store i32 2, ptr %6, align 4
  br label %94

55:                                               ; preds = %50
  %56 = load i8, ptr %9, align 1, !tbaa !12
  %57 = load i32, ptr %4, align 4, !tbaa !5
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds [10 x [10 x i8]], ptr @grid, i64 0, i64 %58
  %60 = load i32, ptr %5, align 4, !tbaa !5
  %61 = sext i32 %60 to i64
  %62 = getelementptr inbounds [10 x i8], ptr %59, i64 0, i64 %61
  store i8 %56, ptr %62, align 1, !tbaa !12
  %63 = load i32, ptr %4, align 4, !tbaa !5
  %64 = icmp eq i32 %63, 8
  br i1 %64, label %65, label %73

65:                                               ; preds = %55
  %66 = load i32, ptr %5, align 4, !tbaa !5
  %67 = icmp eq i32 %66, 8
  br i1 %67, label %68, label %73

68:                                               ; preds = %65
  %69 = load i32, ptr %4, align 4, !tbaa !5
  %70 = load i32, ptr %5, align 4, !tbaa !5
  %71 = call noundef zeroext i1 @_Z5validii(i32 noundef %69, i32 noundef %70)
  br i1 %71, label %72, label %73

72:                                               ; preds = %68
  store i1 true, ptr %2, align 1
  store i32 1, ptr %6, align 4
  br label %94

73:                                               ; preds = %68, %65, %55
  %74 = load i32, ptr %4, align 4, !tbaa !5
  %75 = load i32, ptr %5, align 4, !tbaa !5
  %76 = call noundef zeroext i1 @_Z5validii(i32 noundef %74, i32 noundef %75)
  br i1 %76, label %77, label %83

77:                                               ; preds = %73
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %11, ptr align 4 %3, i64 8, i1 false)
  %78 = load i64, ptr %11, align 4
  %79 = call i64 @_Z8nextCellSt4pairIiiE(i64 %78)
  store i64 %79, ptr %10, align 4
  %80 = load i64, ptr %10, align 4
  %81 = call noundef zeroext i1 @_Z5solveSt4pairIiiE(i64 %80)
  br i1 %81, label %82, label %83

82:                                               ; preds = %77
  store i1 true, ptr %2, align 1
  store i32 1, ptr %6, align 4
  br label %94

83:                                               ; preds = %77, %73
  br label %84

84:                                               ; preds = %83
  %85 = load i32, ptr %4, align 4, !tbaa !5
  %86 = sext i32 %85 to i64
  %87 = getelementptr inbounds [10 x [10 x i8]], ptr @grid, i64 0, i64 %86
  %88 = load i32, ptr %5, align 4, !tbaa !5
  %89 = sext i32 %88 to i64
  %90 = getelementptr inbounds [10 x i8], ptr %87, i64 0, i64 %89
  store i8 120, ptr %90, align 1, !tbaa !12
  br label %91

91:                                               ; preds = %84
  %92 = load i8, ptr %9, align 1, !tbaa !12
  %93 = add i8 %92, 1
  store i8 %93, ptr %9, align 1, !tbaa !12
  br label %50, !llvm.loop !13

94:                                               ; preds = %82, %72, %54
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #4
  %95 = load i32, ptr %6, align 4
  switch i32 %95, label %97 [
    i32 2, label %96
  ]

96:                                               ; preds = %94
  store i1 false, ptr %2, align 1
  store i32 1, ptr %6, align 4
  br label %97

97:                                               ; preds = %96, %94, %44, %33
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #4
  %98 = load i1, ptr %2, align 1
  ret i1 %98
}

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #3

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { nounwind }

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

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


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

@grid = external dso_local local_unnamed_addr global [10 x [10 x i8]], align 16
@ops = external dso_local local_unnamed_addr global i32, align 4

; Function Attrs: mustprogress uwtable
declare dso_local i64 @_Z8nextCellSt4pairIiiE(i64) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_Z5validii(i32 noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_Z5solveSt4pairIiiE(i64 %0) local_unnamed_addr #0 {
  %.sroa.026.0.extract.trunc47 = trunc i64 %0 to i32
  %.sroa.4.0.extract.shift48 = lshr i64 %0, 32
  %2 = load i32, ptr @ops, align 4, !tbaa !5
  %3 = add nsw i32 %2, 1
  store i32 %3, ptr @ops, align 4, !tbaa !5
  %4 = icmp ne i32 %.sroa.026.0.extract.trunc47, 8
  %5 = icmp ne i64 %.sroa.4.0.extract.shift48, 8
  %or.cond.not4149 = or i1 %4, %5
  %6 = load i8, ptr getelementptr inbounds (i8, ptr @grid, i64 88), align 8
  %.not50 = icmp eq i8 %6, 120
  %or.cond3851 = select i1 %or.cond.not4149, i1 true, i1 %.not50
  br i1 %or.cond3851, label %.lr.ph.preheader, label %.loopexit

.lr.ph.preheader:                                 ; preds = %1
  %sext75 = shl i64 %0, 32
  %7 = ashr exact i64 %sext75, 32
  %8 = ashr i64 %0, 32
  %9 = getelementptr inbounds [10 x [10 x i8]], ptr @grid, i64 0, i64 %7, i64 %8
  %10 = load i8, ptr %9, align 1, !tbaa !9
  %.not3776 = icmp eq i8 %10, 120
  br i1 %.not3776, label %.preheader, label %tailrecurse

.lr.ph:                                           ; preds = %tailrecurse
  %sext = shl i64 %52, 32
  %11 = ashr exact i64 %sext, 32
  %12 = ashr i64 %52, 32
  %13 = getelementptr inbounds [10 x [10 x i8]], ptr @grid, i64 0, i64 %11, i64 %12
  %14 = load i8, ptr %13, align 1, !tbaa !9
  %.not37 = icmp eq i8 %14, 120
  br i1 %.not37, label %.preheader, label %tailrecurse

.preheader:                                       ; preds = %.lr.ph, %.lr.ph.preheader
  %or.cond.not4155.lcssa = phi i1 [ %or.cond.not4149, %.lr.ph.preheader ], [ %or.cond.not41, %.lr.ph ]
  %.sroa.4.0.extract.shift54.lcssa = phi i64 [ %.sroa.4.0.extract.shift48, %.lr.ph.preheader ], [ %.sroa.4.0.extract.shift, %.lr.ph ]
  %.sroa.026.0.extract.trunc53.lcssa = phi i32 [ %.sroa.026.0.extract.trunc47, %.lr.ph.preheader ], [ %.sroa.026.0.extract.trunc, %.lr.ph ]
  %.tr52.lcssa = phi i64 [ %0, %.lr.ph.preheader ], [ %52, %.lr.ph ]
  %.lcssa = phi ptr [ %9, %.lr.ph.preheader ], [ %13, %.lr.ph ]
  %.sroa.4.0.extract.trunc.le = trunc nuw i64 %.sroa.4.0.extract.shift54.lcssa to i32
  store i8 49, ptr %.lcssa, align 1, !tbaa !9
  br i1 %or.cond.not4155.lcssa, label %.preheader.split.us.preheader, label %.preheader.split.preheader

.preheader.split.preheader:                       ; preds = %.preheader
  %15 = tail call noundef zeroext i1 @_Z5validii(i32 noundef 8, i32 noundef 8)
  br i1 %15, label %.loopexit, label %58

.preheader.split.us.preheader:                    ; preds = %.preheader
  %16 = tail call noundef zeroext i1 @_Z5validii(i32 noundef %.sroa.026.0.extract.trunc53.lcssa, i32 noundef %.sroa.4.0.extract.trunc.le)
  br i1 %16, label %17, label %.preheader.split.us.1

17:                                               ; preds = %.preheader.split.us.preheader
  %18 = tail call i64 @_Z8nextCellSt4pairIiiE(i64 %.tr52.lcssa)
  %19 = tail call noundef zeroext i1 @_Z5solveSt4pairIiiE(i64 %18)
  br i1 %19, label %.loopexit, label %.preheader.split.us.1

.preheader.split.us.1:                            ; preds = %17, %.preheader.split.us.preheader
  store i8 50, ptr %.lcssa, align 1, !tbaa !9
  %20 = tail call noundef zeroext i1 @_Z5validii(i32 noundef %.sroa.026.0.extract.trunc53.lcssa, i32 noundef %.sroa.4.0.extract.trunc.le)
  br i1 %20, label %21, label %.preheader.split.us.2

21:                                               ; preds = %.preheader.split.us.1
  %22 = tail call i64 @_Z8nextCellSt4pairIiiE(i64 %.tr52.lcssa)
  %23 = tail call noundef zeroext i1 @_Z5solveSt4pairIiiE(i64 %22)
  br i1 %23, label %.loopexit, label %.preheader.split.us.2

.preheader.split.us.2:                            ; preds = %21, %.preheader.split.us.1
  store i8 51, ptr %.lcssa, align 1, !tbaa !9
  %24 = tail call noundef zeroext i1 @_Z5validii(i32 noundef %.sroa.026.0.extract.trunc53.lcssa, i32 noundef %.sroa.4.0.extract.trunc.le)
  br i1 %24, label %25, label %.preheader.split.us.3

25:                                               ; preds = %.preheader.split.us.2
  %26 = tail call i64 @_Z8nextCellSt4pairIiiE(i64 %.tr52.lcssa)
  %27 = tail call noundef zeroext i1 @_Z5solveSt4pairIiiE(i64 %26)
  br i1 %27, label %.loopexit, label %.preheader.split.us.3

.preheader.split.us.3:                            ; preds = %25, %.preheader.split.us.2
  store i8 52, ptr %.lcssa, align 1, !tbaa !9
  %28 = tail call noundef zeroext i1 @_Z5validii(i32 noundef %.sroa.026.0.extract.trunc53.lcssa, i32 noundef %.sroa.4.0.extract.trunc.le)
  br i1 %28, label %29, label %.preheader.split.us.4

29:                                               ; preds = %.preheader.split.us.3
  %30 = tail call i64 @_Z8nextCellSt4pairIiiE(i64 %.tr52.lcssa)
  %31 = tail call noundef zeroext i1 @_Z5solveSt4pairIiiE(i64 %30)
  br i1 %31, label %.loopexit, label %.preheader.split.us.4

.preheader.split.us.4:                            ; preds = %29, %.preheader.split.us.3
  store i8 53, ptr %.lcssa, align 1, !tbaa !9
  %32 = tail call noundef zeroext i1 @_Z5validii(i32 noundef %.sroa.026.0.extract.trunc53.lcssa, i32 noundef %.sroa.4.0.extract.trunc.le)
  br i1 %32, label %33, label %.preheader.split.us.5

33:                                               ; preds = %.preheader.split.us.4
  %34 = tail call i64 @_Z8nextCellSt4pairIiiE(i64 %.tr52.lcssa)
  %35 = tail call noundef zeroext i1 @_Z5solveSt4pairIiiE(i64 %34)
  br i1 %35, label %.loopexit, label %.preheader.split.us.5

.preheader.split.us.5:                            ; preds = %33, %.preheader.split.us.4
  store i8 54, ptr %.lcssa, align 1, !tbaa !9
  %36 = tail call noundef zeroext i1 @_Z5validii(i32 noundef %.sroa.026.0.extract.trunc53.lcssa, i32 noundef %.sroa.4.0.extract.trunc.le)
  br i1 %36, label %37, label %.preheader.split.us.6

37:                                               ; preds = %.preheader.split.us.5
  %38 = tail call i64 @_Z8nextCellSt4pairIiiE(i64 %.tr52.lcssa)
  %39 = tail call noundef zeroext i1 @_Z5solveSt4pairIiiE(i64 %38)
  br i1 %39, label %.loopexit, label %.preheader.split.us.6

.preheader.split.us.6:                            ; preds = %37, %.preheader.split.us.5
  store i8 55, ptr %.lcssa, align 1, !tbaa !9
  %40 = tail call noundef zeroext i1 @_Z5validii(i32 noundef %.sroa.026.0.extract.trunc53.lcssa, i32 noundef %.sroa.4.0.extract.trunc.le)
  br i1 %40, label %41, label %.preheader.split.us.7

41:                                               ; preds = %.preheader.split.us.6
  %42 = tail call i64 @_Z8nextCellSt4pairIiiE(i64 %.tr52.lcssa)
  %43 = tail call noundef zeroext i1 @_Z5solveSt4pairIiiE(i64 %42)
  br i1 %43, label %.loopexit, label %.preheader.split.us.7

.preheader.split.us.7:                            ; preds = %41, %.preheader.split.us.6
  store i8 56, ptr %.lcssa, align 1, !tbaa !9
  %44 = tail call noundef zeroext i1 @_Z5validii(i32 noundef %.sroa.026.0.extract.trunc53.lcssa, i32 noundef %.sroa.4.0.extract.trunc.le)
  br i1 %44, label %45, label %.preheader.split.us.8

45:                                               ; preds = %.preheader.split.us.7
  %46 = tail call i64 @_Z8nextCellSt4pairIiiE(i64 %.tr52.lcssa)
  %47 = tail call noundef zeroext i1 @_Z5solveSt4pairIiiE(i64 %46)
  br i1 %47, label %.loopexit, label %.preheader.split.us.8

.preheader.split.us.8:                            ; preds = %45, %.preheader.split.us.7
  store i8 57, ptr %.lcssa, align 1, !tbaa !9
  %48 = tail call noundef zeroext i1 @_Z5validii(i32 noundef %.sroa.026.0.extract.trunc53.lcssa, i32 noundef %.sroa.4.0.extract.trunc.le)
  br i1 %48, label %49, label %.loopexit.sink.split

49:                                               ; preds = %.preheader.split.us.8
  %50 = tail call i64 @_Z8nextCellSt4pairIiiE(i64 %.tr52.lcssa)
  %51 = tail call noundef zeroext i1 @_Z5solveSt4pairIiiE(i64 %50)
  br i1 %51, label %.loopexit, label %.loopexit.sink.split

tailrecurse:                                      ; preds = %.lr.ph.preheader, %.lr.ph
  %.tr5277 = phi i64 [ %52, %.lr.ph ], [ %0, %.lr.ph.preheader ]
  %52 = tail call i64 @_Z8nextCellSt4pairIiiE(i64 %.tr5277)
  %.sroa.026.0.extract.trunc = trunc i64 %52 to i32
  %.sroa.4.0.extract.shift = lshr i64 %52, 32
  %53 = load i32, ptr @ops, align 4, !tbaa !5
  %54 = add nsw i32 %53, 1
  store i32 %54, ptr @ops, align 4, !tbaa !5
  %55 = icmp ne i32 %.sroa.026.0.extract.trunc, 8
  %56 = icmp ne i64 %.sroa.4.0.extract.shift, 8
  %or.cond.not41 = or i1 %55, %56
  %57 = load i8, ptr getelementptr inbounds (i8, ptr @grid, i64 88), align 8
  %.not = icmp eq i8 %57, 120
  %or.cond38 = select i1 %or.cond.not41, i1 true, i1 %.not
  br i1 %or.cond38, label %.lr.ph, label %.loopexit

58:                                               ; preds = %.preheader.split.preheader
  %59 = tail call noundef zeroext i1 @_Z5validii(i32 noundef %.sroa.026.0.extract.trunc53.lcssa, i32 noundef %.sroa.4.0.extract.trunc.le)
  br i1 %59, label %60, label %.preheader.split.1

60:                                               ; preds = %58
  %61 = tail call i64 @_Z8nextCellSt4pairIiiE(i64 %.tr52.lcssa)
  %62 = tail call noundef zeroext i1 @_Z5solveSt4pairIiiE(i64 %61)
  br i1 %62, label %.loopexit, label %.preheader.split.1

.preheader.split.1:                               ; preds = %58, %60
  store i8 50, ptr %.lcssa, align 1, !tbaa !9
  %63 = tail call noundef zeroext i1 @_Z5validii(i32 noundef 8, i32 noundef 8)
  br i1 %63, label %.loopexit, label %64

64:                                               ; preds = %.preheader.split.1
  %65 = tail call noundef zeroext i1 @_Z5validii(i32 noundef %.sroa.026.0.extract.trunc53.lcssa, i32 noundef %.sroa.4.0.extract.trunc.le)
  br i1 %65, label %66, label %.preheader.split.2

66:                                               ; preds = %64
  %67 = tail call i64 @_Z8nextCellSt4pairIiiE(i64 %.tr52.lcssa)
  %68 = tail call noundef zeroext i1 @_Z5solveSt4pairIiiE(i64 %67)
  br i1 %68, label %.loopexit, label %.preheader.split.2

.preheader.split.2:                               ; preds = %66, %64
  store i8 51, ptr %.lcssa, align 1, !tbaa !9
  %69 = tail call noundef zeroext i1 @_Z5validii(i32 noundef 8, i32 noundef 8)
  br i1 %69, label %.loopexit, label %70

70:                                               ; preds = %.preheader.split.2
  %71 = tail call noundef zeroext i1 @_Z5validii(i32 noundef %.sroa.026.0.extract.trunc53.lcssa, i32 noundef %.sroa.4.0.extract.trunc.le)
  br i1 %71, label %72, label %.preheader.split.3

72:                                               ; preds = %70
  %73 = tail call i64 @_Z8nextCellSt4pairIiiE(i64 %.tr52.lcssa)
  %74 = tail call noundef zeroext i1 @_Z5solveSt4pairIiiE(i64 %73)
  br i1 %74, label %.loopexit, label %.preheader.split.3

.preheader.split.3:                               ; preds = %72, %70
  store i8 52, ptr %.lcssa, align 1, !tbaa !9
  %75 = tail call noundef zeroext i1 @_Z5validii(i32 noundef 8, i32 noundef 8)
  br i1 %75, label %.loopexit, label %76

76:                                               ; preds = %.preheader.split.3
  %77 = tail call noundef zeroext i1 @_Z5validii(i32 noundef %.sroa.026.0.extract.trunc53.lcssa, i32 noundef %.sroa.4.0.extract.trunc.le)
  br i1 %77, label %78, label %.preheader.split.4

78:                                               ; preds = %76
  %79 = tail call i64 @_Z8nextCellSt4pairIiiE(i64 %.tr52.lcssa)
  %80 = tail call noundef zeroext i1 @_Z5solveSt4pairIiiE(i64 %79)
  br i1 %80, label %.loopexit, label %.preheader.split.4

.preheader.split.4:                               ; preds = %78, %76
  store i8 53, ptr %.lcssa, align 1, !tbaa !9
  %81 = tail call noundef zeroext i1 @_Z5validii(i32 noundef 8, i32 noundef 8)
  br i1 %81, label %.loopexit, label %82

82:                                               ; preds = %.preheader.split.4
  %83 = tail call noundef zeroext i1 @_Z5validii(i32 noundef %.sroa.026.0.extract.trunc53.lcssa, i32 noundef %.sroa.4.0.extract.trunc.le)
  br i1 %83, label %84, label %.preheader.split.5

84:                                               ; preds = %82
  %85 = tail call i64 @_Z8nextCellSt4pairIiiE(i64 %.tr52.lcssa)
  %86 = tail call noundef zeroext i1 @_Z5solveSt4pairIiiE(i64 %85)
  br i1 %86, label %.loopexit, label %.preheader.split.5

.preheader.split.5:                               ; preds = %84, %82
  store i8 54, ptr %.lcssa, align 1, !tbaa !9
  %87 = tail call noundef zeroext i1 @_Z5validii(i32 noundef 8, i32 noundef 8)
  br i1 %87, label %.loopexit, label %88

88:                                               ; preds = %.preheader.split.5
  %89 = tail call noundef zeroext i1 @_Z5validii(i32 noundef %.sroa.026.0.extract.trunc53.lcssa, i32 noundef %.sroa.4.0.extract.trunc.le)
  br i1 %89, label %90, label %.preheader.split.6

90:                                               ; preds = %88
  %91 = tail call i64 @_Z8nextCellSt4pairIiiE(i64 %.tr52.lcssa)
  %92 = tail call noundef zeroext i1 @_Z5solveSt4pairIiiE(i64 %91)
  br i1 %92, label %.loopexit, label %.preheader.split.6

.preheader.split.6:                               ; preds = %90, %88
  store i8 55, ptr %.lcssa, align 1, !tbaa !9
  %93 = tail call noundef zeroext i1 @_Z5validii(i32 noundef 8, i32 noundef 8)
  br i1 %93, label %.loopexit, label %94

94:                                               ; preds = %.preheader.split.6
  %95 = tail call noundef zeroext i1 @_Z5validii(i32 noundef %.sroa.026.0.extract.trunc53.lcssa, i32 noundef %.sroa.4.0.extract.trunc.le)
  br i1 %95, label %96, label %.preheader.split.7

96:                                               ; preds = %94
  %97 = tail call i64 @_Z8nextCellSt4pairIiiE(i64 %.tr52.lcssa)
  %98 = tail call noundef zeroext i1 @_Z5solveSt4pairIiiE(i64 %97)
  br i1 %98, label %.loopexit, label %.preheader.split.7

.preheader.split.7:                               ; preds = %96, %94
  store i8 56, ptr %.lcssa, align 1, !tbaa !9
  %99 = tail call noundef zeroext i1 @_Z5validii(i32 noundef 8, i32 noundef 8)
  br i1 %99, label %.loopexit, label %100

100:                                              ; preds = %.preheader.split.7
  %101 = tail call noundef zeroext i1 @_Z5validii(i32 noundef %.sroa.026.0.extract.trunc53.lcssa, i32 noundef %.sroa.4.0.extract.trunc.le)
  br i1 %101, label %102, label %.preheader.split.8

102:                                              ; preds = %100
  %103 = tail call i64 @_Z8nextCellSt4pairIiiE(i64 %.tr52.lcssa)
  %104 = tail call noundef zeroext i1 @_Z5solveSt4pairIiiE(i64 %103)
  br i1 %104, label %.loopexit, label %.preheader.split.8

.preheader.split.8:                               ; preds = %102, %100
  store i8 57, ptr %.lcssa, align 1, !tbaa !9
  %105 = tail call noundef zeroext i1 @_Z5validii(i32 noundef 8, i32 noundef 8)
  br i1 %105, label %.loopexit, label %106

106:                                              ; preds = %.preheader.split.8
  %107 = tail call noundef zeroext i1 @_Z5validii(i32 noundef %.sroa.026.0.extract.trunc53.lcssa, i32 noundef %.sroa.4.0.extract.trunc.le)
  br i1 %107, label %108, label %.loopexit.sink.split

108:                                              ; preds = %106
  %109 = tail call i64 @_Z8nextCellSt4pairIiiE(i64 %.tr52.lcssa)
  %110 = tail call noundef zeroext i1 @_Z5solveSt4pairIiiE(i64 %109)
  br i1 %110, label %.loopexit, label %.loopexit.sink.split

.loopexit.sink.split:                             ; preds = %106, %108, %.preheader.split.us.8, %49
  store i8 120, ptr %.lcssa, align 1, !tbaa !9
  br label %.loopexit

.loopexit:                                        ; preds = %tailrecurse, %.loopexit.sink.split, %60, %.preheader.split.preheader, %.preheader.split.1, %66, %.preheader.split.2, %72, %.preheader.split.3, %78, %.preheader.split.4, %84, %.preheader.split.5, %90, %.preheader.split.6, %96, %.preheader.split.7, %102, %.preheader.split.8, %108, %17, %21, %25, %29, %33, %37, %41, %45, %49, %1
  %.1 = phi i1 [ true, %1 ], [ true, %17 ], [ true, %21 ], [ true, %25 ], [ true, %29 ], [ true, %33 ], [ true, %37 ], [ true, %41 ], [ true, %45 ], [ true, %49 ], [ true, %60 ], [ true, %.preheader.split.preheader ], [ true, %.preheader.split.1 ], [ true, %66 ], [ true, %.preheader.split.2 ], [ true, %72 ], [ true, %.preheader.split.3 ], [ true, %78 ], [ true, %.preheader.split.4 ], [ true, %84 ], [ true, %.preheader.split.5 ], [ true, %90 ], [ true, %.preheader.split.6 ], [ true, %96 ], [ true, %.preheader.split.7 ], [ true, %102 ], [ true, %.preheader.split.8 ], [ true, %108 ], [ false, %.loopexit.sink.split ], [ true, %tailrecurse ]
  ret i1 %.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 = { 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" }

!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 = !{!7, !7, i64 0}


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