; LLVM IR from ahr9n/psolving-paradigms :: 1.brute-force/1.2.recursive-brute-force-(backtracking)/Gym 325692R - 8 Queens.ll (Z5solvei)

; 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::set" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"struct.std::pair" = type <{ %"struct.std::_Rb_tree_const_iterator", i8, [7 x i8] }>
%"struct.std::_Rb_tree_const_iterator" = type { ptr }

@a = external dso_local global [10 x [10 x i32]], align 16
@maxi = external dso_local global i32, align 4
@cur = external dso_local global i32, align 4
@r = external dso_local global %"class.std::set", align 8
@c = external dso_local global %"class.std::set", align 8
@d1 = external dso_local global %"class.std::set", align 8
@d2 = external dso_local global %"class.std::set", align 8

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5solvei(i32 noundef %0) #0 {
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca %"struct.std::pair", align 8
  %7 = alloca %"struct.std::pair", align 8
  %8 = alloca i32, align 4
  %9 = alloca %"struct.std::pair", align 8
  %10 = alloca i32, align 4
  %11 = alloca %"struct.std::pair", align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  store i32 %0, ptr %2, align 4, !tbaa !5
  %14 = load i32, ptr %2, align 4, !tbaa !5
  %15 = icmp eq i32 %14, 8
  br i1 %15, label %16, label %19

16:                                               ; preds = %1
  %17 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) @maxi, ptr noundef nonnull align 4 dereferenceable(4) @cur)
  %18 = load i32, ptr %17, align 4, !tbaa !5
  store i32 %18, ptr @maxi, align 4, !tbaa !5
  br label %19

19:                                               ; preds = %16, %1
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #3
  store i32 0, ptr %3, align 4, !tbaa !5
  br label %20

20:                                               ; preds = %103, %19
  %21 = load i32, ptr %3, align 4, !tbaa !5
  %22 = icmp slt i32 %21, 8
  br i1 %22, label %24, label %23

23:                                               ; preds = %20
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #3
  br label %106

24:                                               ; preds = %20
  %25 = call noundef i64 @_ZNKSt3setIiSt4lessIiESaIiEE5countERKi(ptr noundef nonnull align 8 dereferenceable(48) @r, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %26 = icmp ne i64 %25, 0
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #3
  br i1 %26, label %43, label %27

27:                                               ; preds = %24
  %28 = call noundef i64 @_ZNKSt3setIiSt4lessIiESaIiEE5countERKi(ptr noundef nonnull align 8 dereferenceable(48) @c, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %29 = icmp ne i64 %28, 0
  br i1 %29, label %43, label %30

30:                                               ; preds = %27
  %31 = load i32, ptr %2, align 4, !tbaa !5
  %32 = load i32, ptr %3, align 4, !tbaa !5
  %33 = add nsw i32 %31, %32
  store i32 %33, ptr %4, align 4, !tbaa !5
  %34 = call noundef i64 @_ZNKSt3setIiSt4lessIiESaIiEE5countERKi(ptr noundef nonnull align 8 dereferenceable(48) @d1, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %35 = icmp ne i64 %34, 0
  br i1 %35, label %43, label %36

36:                                               ; preds = %30
  %37 = load i32, ptr %2, align 4, !tbaa !5
  %38 = load i32, ptr %3, align 4, !tbaa !5
  %39 = sub nsw i32 %37, %38
  store i32 %39, ptr %5, align 4, !tbaa !5
  %40 = call noundef i64 @_ZNKSt3setIiSt4lessIiESaIiEE5countERKi(ptr noundef nonnull align 8 dereferenceable(48) @d2, ptr noundef nonnull align 4 dereferenceable(4) %5)
  %41 = icmp ne i64 %40, 0
  %42 = xor i1 %41, true
  br label %43

43:                                               ; preds = %36, %30, %27, %24
  %44 = phi i1 [ false, %30 ], [ false, %27 ], [ false, %24 ], [ %42, %36 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #3
  br i1 %44, label %45, label %102

45:                                               ; preds = %43
  %46 = call { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) @r, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %47 = getelementptr inbounds { ptr, i8 }, ptr %6, i32 0, i32 0
  %48 = extractvalue { ptr, i8 } %46, 0
  store ptr %48, ptr %47, align 8
  %49 = getelementptr inbounds { ptr, i8 }, ptr %6, i32 0, i32 1
  %50 = extractvalue { ptr, i8 } %46, 1
  store i8 %50, ptr %49, align 8
  %51 = call { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) @c, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %52 = getelementptr inbounds { ptr, i8 }, ptr %7, i32 0, i32 0
  %53 = extractvalue { ptr, i8 } %51, 0
  store ptr %53, ptr %52, align 8
  %54 = getelementptr inbounds { ptr, i8 }, ptr %7, i32 0, i32 1
  %55 = extractvalue { ptr, i8 } %51, 1
  store i8 %55, ptr %54, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #3
  %56 = load i32, ptr %2, align 4, !tbaa !5
  %57 = load i32, ptr %3, align 4, !tbaa !5
  %58 = add nsw i32 %56, %57
  store i32 %58, ptr %8, align 4, !tbaa !5
  %59 = call { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertEOi(ptr noundef nonnull align 8 dereferenceable(48) @d1, ptr noundef nonnull align 4 dereferenceable(4) %8)
  %60 = getelementptr inbounds { ptr, i8 }, ptr %9, i32 0, i32 0
  %61 = extractvalue { ptr, i8 } %59, 0
  store ptr %61, ptr %60, align 8
  %62 = getelementptr inbounds { ptr, i8 }, ptr %9, i32 0, i32 1
  %63 = extractvalue { ptr, i8 } %59, 1
  store i8 %63, ptr %62, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #3
  %64 = load i32, ptr %2, align 4, !tbaa !5
  %65 = load i32, ptr %3, align 4, !tbaa !5
  %66 = sub nsw i32 %64, %65
  store i32 %66, ptr %10, align 4, !tbaa !5
  %67 = call { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertEOi(ptr noundef nonnull align 8 dereferenceable(48) @d2, ptr noundef nonnull align 4 dereferenceable(4) %10)
  %68 = getelementptr inbounds { ptr, i8 }, ptr %11, i32 0, i32 0
  %69 = extractvalue { ptr, i8 } %67, 0
  store ptr %69, ptr %68, align 8
  %70 = getelementptr inbounds { ptr, i8 }, ptr %11, i32 0, i32 1
  %71 = extractvalue { ptr, i8 } %67, 1
  store i8 %71, ptr %70, align 8
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #3
  %72 = load i32, ptr %2, align 4, !tbaa !5
  %73 = sext i32 %72 to i64
  %74 = getelementptr inbounds [10 x [10 x i32]], ptr @a, i64 0, i64 %73
  %75 = load i32, ptr %3, align 4, !tbaa !5
  %76 = sext i32 %75 to i64
  %77 = getelementptr inbounds [10 x i32], ptr %74, i64 0, i64 %76
  %78 = load i32, ptr %77, align 4, !tbaa !5
  %79 = load i32, ptr @cur, align 4, !tbaa !5
  %80 = add nsw i32 %79, %78
  store i32 %80, ptr @cur, align 4, !tbaa !5
  %81 = load i32, ptr %2, align 4, !tbaa !5
  %82 = add nsw i32 %81, 1
  call void @_Z5solvei(i32 noundef %82)
  %83 = call noundef i64 @_ZNSt3setIiSt4lessIiESaIiEE5eraseERKi(ptr noundef nonnull align 8 dereferenceable(48) @r, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %84 = call noundef i64 @_ZNSt3setIiSt4lessIiESaIiEE5eraseERKi(ptr noundef nonnull align 8 dereferenceable(48) @c, ptr noundef nonnull align 4 dereferenceable(4) %3)
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #3
  %85 = load i32, ptr %2, align 4, !tbaa !5
  %86 = load i32, ptr %3, align 4, !tbaa !5
  %87 = add nsw i32 %85, %86
  store i32 %87, ptr %12, align 4, !tbaa !5
  %88 = call noundef i64 @_ZNSt3setIiSt4lessIiESaIiEE5eraseERKi(ptr noundef nonnull align 8 dereferenceable(48) @d1, ptr noundef nonnull align 4 dereferenceable(4) %12)
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #3
  %89 = load i32, ptr %2, align 4, !tbaa !5
  %90 = load i32, ptr %3, align 4, !tbaa !5
  %91 = sub nsw i32 %89, %90
  store i32 %91, ptr %13, align 4, !tbaa !5
  %92 = call noundef i64 @_ZNSt3setIiSt4lessIiESaIiEE5eraseERKi(ptr noundef nonnull align 8 dereferenceable(48) @d2, ptr noundef nonnull align 4 dereferenceable(4) %13)
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #3
  %93 = load i32, ptr %2, align 4, !tbaa !5
  %94 = sext i32 %93 to i64
  %95 = getelementptr inbounds [10 x [10 x i32]], ptr @a, i64 0, i64 %94
  %96 = load i32, ptr %3, align 4, !tbaa !5
  %97 = sext i32 %96 to i64
  %98 = getelementptr inbounds [10 x i32], ptr %95, i64 0, i64 %97
  %99 = load i32, ptr %98, align 4, !tbaa !5
  %100 = load i32, ptr @cur, align 4, !tbaa !5
  %101 = sub nsw i32 %100, %99
  store i32 %101, ptr @cur, align 4, !tbaa !5
  br label %102

102:                                              ; preds = %45, %43
  br label %103

103:                                              ; preds = %102
  %104 = load i32, ptr %3, align 4, !tbaa !5
  %105 = add nsw i32 %104, 1
  store i32 %105, ptr %3, align 4, !tbaa !5
  br label %20, !llvm.loop !9

106:                                              ; preds = %23
  ret void
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #1

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZNKSt3setIiSt4lessIiESaIiEE5countERKi(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(4)) #0 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(4)) #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertEOi(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(4)) #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZNSt3setIiSt4lessIiESaIiEE5eraseERKi(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(4)) #0 align 2

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { 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 #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"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"

%"class.std::set" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }

@a = external dso_local local_unnamed_addr global [10 x [10 x i32]], align 16
@maxi = external dso_local global i32, align 4
@cur = external dso_local global i32, align 4
@r = external dso_local global %"class.std::set", align 8
@c = external dso_local global %"class.std::set", align 8
@d1 = external dso_local global %"class.std::set", align 8
@d2 = external dso_local global %"class.std::set", align 8

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5solvei(i32 noundef %0) local_unnamed_addr #0 {
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  store i32 %0, ptr %2, align 4, !tbaa !5
  %10 = icmp eq i32 %0, 8
  br i1 %10, label %11, label %14

11:                                               ; preds = %1
  %12 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) @maxi, ptr noundef nonnull align 4 dereferenceable(4) @cur)
  %13 = load i32, ptr %12, align 4, !tbaa !5
  store i32 %13, ptr @maxi, align 4, !tbaa !5
  br label %14

14:                                               ; preds = %11, %1
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #3
  store i32 0, ptr %3, align 4, !tbaa !5
  br label %16

15:                                               ; preds = %68
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #3
  ret void

16:                                               ; preds = %14, %68
  %17 = call noundef i64 @_ZNKSt3setIiSt4lessIiESaIiEE5countERKi(ptr noundef nonnull align 8 dereferenceable(48) @r, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %.not = icmp eq i64 %17, 0
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #3
  br i1 %.not, label %18, label %.critedge

18:                                               ; preds = %16
  %19 = call noundef i64 @_ZNKSt3setIiSt4lessIiESaIiEE5countERKi(ptr noundef nonnull align 8 dereferenceable(48) @c, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %.not7 = icmp eq i64 %19, 0
  br i1 %.not7, label %20, label %.critedge

20:                                               ; preds = %18
  %21 = load i32, ptr %2, align 4, !tbaa !5
  %22 = load i32, ptr %3, align 4, !tbaa !5
  %23 = add nsw i32 %22, %21
  store i32 %23, ptr %4, align 4, !tbaa !5
  %24 = call noundef i64 @_ZNKSt3setIiSt4lessIiESaIiEE5countERKi(ptr noundef nonnull align 8 dereferenceable(48) @d1, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %.not8 = icmp eq i64 %24, 0
  br i1 %.not8, label %25, label %.critedge

25:                                               ; preds = %20
  %26 = load i32, ptr %2, align 4, !tbaa !5
  %27 = load i32, ptr %3, align 4, !tbaa !5
  %28 = sub nsw i32 %26, %27
  store i32 %28, ptr %5, align 4, !tbaa !5
  %29 = call noundef i64 @_ZNKSt3setIiSt4lessIiESaIiEE5countERKi(ptr noundef nonnull align 8 dereferenceable(48) @d2, ptr noundef nonnull align 4 dereferenceable(4) %5)
  %.not9 = icmp eq i64 %29, 0
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #3
  br i1 %.not9, label %30, label %68

30:                                               ; preds = %25
  %31 = call { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) @r, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %32 = call { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) @c, ptr noundef nonnull align 4 dereferenceable(4) %3)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #3
  %33 = load i32, ptr %2, align 4, !tbaa !5
  %34 = load i32, ptr %3, align 4, !tbaa !5
  %35 = add nsw i32 %34, %33
  store i32 %35, ptr %6, align 4, !tbaa !5
  %36 = call { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertEOi(ptr noundef nonnull align 8 dereferenceable(48) @d1, ptr noundef nonnull align 4 dereferenceable(4) %6)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #3
  %37 = load i32, ptr %2, align 4, !tbaa !5
  %38 = load i32, ptr %3, align 4, !tbaa !5
  %39 = sub nsw i32 %37, %38
  store i32 %39, ptr %7, align 4, !tbaa !5
  %40 = call { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertEOi(ptr noundef nonnull align 8 dereferenceable(48) @d2, ptr noundef nonnull align 4 dereferenceable(4) %7)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #3
  %41 = load i32, ptr %2, align 4, !tbaa !5
  %42 = sext i32 %41 to i64
  %43 = load i32, ptr %3, align 4, !tbaa !5
  %44 = sext i32 %43 to i64
  %45 = getelementptr inbounds [10 x [10 x i32]], ptr @a, i64 0, i64 %42, i64 %44
  %46 = load i32, ptr %45, align 4, !tbaa !5
  %47 = load i32, ptr @cur, align 4, !tbaa !5
  %48 = add nsw i32 %47, %46
  store i32 %48, ptr @cur, align 4, !tbaa !5
  %49 = add nsw i32 %41, 1
  call void @_Z5solvei(i32 noundef %49)
  %50 = call noundef i64 @_ZNSt3setIiSt4lessIiESaIiEE5eraseERKi(ptr noundef nonnull align 8 dereferenceable(48) @r, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %51 = call noundef i64 @_ZNSt3setIiSt4lessIiESaIiEE5eraseERKi(ptr noundef nonnull align 8 dereferenceable(48) @c, ptr noundef nonnull align 4 dereferenceable(4) %3)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #3
  %52 = load i32, ptr %2, align 4, !tbaa !5
  %53 = load i32, ptr %3, align 4, !tbaa !5
  %54 = add nsw i32 %53, %52
  store i32 %54, ptr %8, align 4, !tbaa !5
  %55 = call noundef i64 @_ZNSt3setIiSt4lessIiESaIiEE5eraseERKi(ptr noundef nonnull align 8 dereferenceable(48) @d1, ptr noundef nonnull align 4 dereferenceable(4) %8)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #3
  %56 = load i32, ptr %2, align 4, !tbaa !5
  %57 = load i32, ptr %3, align 4, !tbaa !5
  %58 = sub nsw i32 %56, %57
  store i32 %58, ptr %9, align 4, !tbaa !5
  %59 = call noundef i64 @_ZNSt3setIiSt4lessIiESaIiEE5eraseERKi(ptr noundef nonnull align 8 dereferenceable(48) @d2, ptr noundef nonnull align 4 dereferenceable(4) %9)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #3
  %60 = load i32, ptr %2, align 4, !tbaa !5
  %61 = sext i32 %60 to i64
  %62 = load i32, ptr %3, align 4, !tbaa !5
  %63 = sext i32 %62 to i64
  %64 = getelementptr inbounds [10 x [10 x i32]], ptr @a, i64 0, i64 %61, i64 %63
  %65 = load i32, ptr %64, align 4, !tbaa !5
  %66 = load i32, ptr @cur, align 4, !tbaa !5
  %67 = sub nsw i32 %66, %65
  store i32 %67, ptr @cur, align 4, !tbaa !5
  br label %68

.critedge:                                        ; preds = %16, %18, %20
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #3
  br label %68

68:                                               ; preds = %25, %30, %.critedge
  %69 = load i32, ptr %3, align 4, !tbaa !5
  %70 = add nsw i32 %69, 1
  store i32 %70, ptr %3, align 4, !tbaa !5
  %71 = icmp slt i32 %69, 7
  br i1 %71, label %16, label %15, !llvm.loop !9
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #1

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZNKSt3setIiSt4lessIiESaIiEE5countERKi(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #0 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertEOi(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZNSt3setIiSt4lessIiESaIiEE5eraseERKi(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #0 align 2

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


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,LoopRotatePass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass